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