mirror of
https://gitee.com/xiongmao1988/rax-medical.git
synced 2025-08-24 13:04:57 +08:00
页面优化,医生管理功能完善
This commit is contained in:
parent
637286cab7
commit
d7928198ad
|
@ -70,7 +70,11 @@ const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
const userInfo = useLoginStore().getlogin()
|
const userInfo = useLoginStore().getlogin()
|
||||||
const hospitals: any = getHospitalsData()
|
let hospitals: any
|
||||||
|
getHospitalsData().then((res: any) => {
|
||||||
|
hospitals = res
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
|
||||||
const menus = [] as any
|
const menus = [] as any
|
||||||
switch (userInfo.permissions) {
|
switch (userInfo.permissions) {
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
<div class="header-box">
|
<div class="header-box">
|
||||||
<h3 class="f18">电子病史</h3>
|
<h3 class="f18">电子病史</h3>
|
||||||
<div class="btn-box">
|
<div class="btn-box">
|
||||||
<el-button v-if="tableData && tableData.length > 0"
|
<TableAbility :isDownload="tableData && tableData.length > 0" @searchBtn="isSearch = !isSearch" @refreshBtn="queryData(queryParams)"
|
||||||
@click="exportMultiData('电子病史', tableData, 'startTime', 'data')">下载</el-button>
|
@downloadBtn="exportMultiData('电子病史', tableData, 'startTime', 'data')"></TableAbility>
|
||||||
<!-- <el-button @click="router.back()">返回</el-button> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-box">
|
<div class="search-box" v-show="isSearch">
|
||||||
<div class="search-cell">
|
<div class="search-cell">
|
||||||
<span class="label">姓名</span>
|
<span class="label">姓名</span>
|
||||||
<el-select v-model="queryParams.name" popper-class="custom-patients-option" filterable placeholder="请选择(可搜素)"
|
<el-select v-model="queryParams.name" popper-class="custom-patients-option" filterable placeholder="请选择(可搜素)"
|
||||||
|
@ -103,6 +102,7 @@ const route = useRoute()
|
||||||
const patients = getPatients()
|
const patients = getPatients()
|
||||||
|
|
||||||
const selectFormTypesDialog = ref()
|
const selectFormTypesDialog = ref()
|
||||||
|
const isSearch = ref(true)
|
||||||
const queryParams = ref({} as any)
|
const queryParams = ref({} as any)
|
||||||
const timeActive = ref<number>(0)
|
const timeActive = ref<number>(0)
|
||||||
const customFormTypes = ref([] as any)
|
const customFormTypes = ref([] as any)
|
||||||
|
@ -191,6 +191,8 @@ const addFormType = (e: any) => {
|
||||||
.surgery-info-page {
|
.surgery-info-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
.header-box {
|
.header-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -230,6 +232,7 @@ const addFormType = (e: any) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-box {
|
.content-box {
|
||||||
|
flex-grow: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100% - 100px);
|
height: calc(100% - 100px);
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog v-model="isFormDialog" :title="formDialogTitle" width="750px">
|
<el-dialog v-model="isFormDialog" :title="formDialogTitle" width="750px">
|
||||||
<DoctorForm ref="doctorFormRef" :type="formDialogTitle === '添加' ? 'add' : 'edit'" @close="isFormDialog = false" />
|
<DoctorForm ref="doctorFormRef" :type="formDialogTitle === '添加' ? 'add' : 'edit'" @close="isFormDialog = false" @save="doctorFormSave" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<ImportDialog ref="importDialogRef" title="用户导入" templateUrl="#" importUrl="#" />
|
<ImportDialog ref="importDialogRef" title="用户导入" templateUrl="#" importUrl="#" />
|
||||||
</template>
|
</template>
|
||||||
|
@ -85,6 +85,7 @@ function queryData(e: any) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
while (tableData.value.length < 10) {
|
while (tableData.value.length < 10) {
|
||||||
tableData.value.push({
|
tableData.value.push({
|
||||||
|
id: tableData.value.length + 1,
|
||||||
userName: 'cscs',
|
userName: 'cscs',
|
||||||
name: e.userName || '测试',
|
name: e.userName || '测试',
|
||||||
phone: '12312345678',
|
phone: '12312345678',
|
||||||
|
@ -111,7 +112,9 @@ const removeData = (e?: any) => {
|
||||||
const selectRow = e || tableRef.value.getSelectionRows()
|
const selectRow = e || tableRef.value.getSelectionRows()
|
||||||
tableRemoveRow({ data: selectRow }, (res: boolean) => {
|
tableRemoveRow({ data: selectRow }, (res: boolean) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
console.log('调用删除', selectRow)
|
const index = tableData.value.findIndex((item: any) => item === selectRow)
|
||||||
|
tableData.value.splice(index, 1)
|
||||||
|
console.log('调用删除', selectRow, index)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -134,6 +137,18 @@ const editData = (e: any) => {
|
||||||
const tableRowClick = (row: any) => {
|
const tableRowClick = (row: any) => {
|
||||||
tableRef.value.toggleRowSelection(row)
|
tableRef.value.toggleRowSelection(row)
|
||||||
}
|
}
|
||||||
|
const doctorFormSave = (data: any, type: string) => {
|
||||||
|
if(type === 'add') {
|
||||||
|
tableData.value.unshift(Object.assign({}, data))
|
||||||
|
}else {
|
||||||
|
tableData.value.forEach((item: any) => {
|
||||||
|
if(item.id === data.id) {
|
||||||
|
Object.assign(item, data)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log(data, type)
|
||||||
|
}
|
||||||
const paginationChange = (page: number, size: number) => {
|
const paginationChange = (page: number, size: number) => {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
import { onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close', 'save'])
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: String
|
type: String
|
||||||
|
@ -118,6 +118,7 @@ const saveData = async () => {
|
||||||
await formRef.value.validate((valid: any, fields: any) => {
|
await formRef.value.validate((valid: any, fields: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
ElMessage.success('保存成功!')
|
ElMessage.success('保存成功!')
|
||||||
|
emit('save', formData.value, props.type)
|
||||||
close()
|
close()
|
||||||
} else {
|
} else {
|
||||||
console.log('error submit!', fields)
|
console.log('error submit!', fields)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user