From c0b99c2ba21e2adf5c724955abf6149ac902eeea Mon Sep 17 00:00:00 2001 From: Euni4U <958079825@qq.com> Date: Mon, 17 Feb 2025 17:59:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BD=93=E6=A3=80=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E7=95=8C=E9=9D=A2=E7=9B=B8=E5=85=B3=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9F=BA=E7=A1=80=E9=A1=B9=E7=9B=AE=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inspect/exammodule/index.ts | 42 +++ src/api/inspect/inspectdepartment/index.ts | 2 +- src/api/inspect/inspectitems/index.ts | 1 + .../project-management/base/createUI.vue | 10 +- src/views/project-management/base/editUI.vue | 11 +- .../exam-package/drawer.vue | 243 ++++++++++++++++++ .../exam-package/exam-packageUI.vue | 221 +++++++++++++--- .../project-management/exam-package/new.vue | 152 +++++++++++ 8 files changed, 642 insertions(+), 40 deletions(-) create mode 100644 src/api/inspect/exammodule/index.ts create mode 100644 src/views/project-management/exam-package/drawer.vue create mode 100644 src/views/project-management/exam-package/new.vue diff --git a/src/api/inspect/exammodule/index.ts b/src/api/inspect/exammodule/index.ts new file mode 100644 index 0000000..c0a6f87 --- /dev/null +++ b/src/api/inspect/exammodule/index.ts @@ -0,0 +1,42 @@ +import request from '@/config/axios' + +// 体检套餐 VO +export interface ExammoduleVO { + id: number // 主键 + examModuleName: string // 套餐名称 + examModuleID: number // 套餐ID + itemCode: string // 项目ID +} + +// 体检套餐 API +export const ExammoduleApi = { + // 查询体检套餐分页 + getExammodulePage: async (params: any) => { + return await request.get({ url: `/inspect/exammodule/page`, params }) + }, + + // 查询体检套餐详情 + getExammodule: async (id: number) => { + return await request.get({ url: `/inspect/exammodule/get?id=` + id }) + }, + + // 新增体检套餐 + createExammodule: async (data: ExammoduleVO) => { + return await request.post({ url: `/inspect/exammodule/create`, data }) + }, + + // 修改体检套餐 + updateExammodule: async (data: ExammoduleVO) => { + return await request.put({ url: `/inspect/exammodule/update`, data }) + }, + + // 删除体检套餐 + deleteExammodule: async (id: number) => { + return await request.delete({ url: `/inspect/exammodule/delete?id=` + id }) + }, + + // 导出体检套餐 Excel + exportExammodule: async (params) => { + return await request.download({ url: `/inspect/exammodule/export-excel`, params }) + }, +} diff --git a/src/api/inspect/inspectdepartment/index.ts b/src/api/inspect/inspectdepartment/index.ts index 74daa11..e9261d4 100644 --- a/src/api/inspect/inspectdepartment/index.ts +++ b/src/api/inspect/inspectdepartment/index.ts @@ -12,7 +12,7 @@ export interface DepartmentVO { deletePerson: string // 删除操作人 deleteDate: Date // 删除时间 departmentAddress: string // 科室具体位置 - orgId: string // 机构ID + sectionID: string // 科室ID } export interface InspectDepartmentRespVO { diff --git a/src/api/inspect/inspectitems/index.ts b/src/api/inspect/inspectitems/index.ts index 73544ad..445621a 100644 --- a/src/api/inspect/inspectitems/index.ts +++ b/src/api/inspect/inspectitems/index.ts @@ -17,6 +17,7 @@ export interface itemsVO { createTime: Date // 创建时间 moduleID: number // 模块ID:体检单元ID 模块名称ID moduleName: string // 模块名称:体检单元 + sectionID: string // 科室ID } // 检查项目 API diff --git a/src/views/project-management/base/createUI.vue b/src/views/project-management/base/createUI.vue index c7870cf..3a41294 100644 --- a/src/views/project-management/base/createUI.vue +++ b/src/views/project-management/base/createUI.vue @@ -22,7 +22,7 @@ v-for="item in departmentOptions" :key="item.value" :label="item.label" - :value="item.value" + :value="item.value + '|' + item.label" /> @@ -139,7 +139,8 @@ const formData = ref>({ moduleName: '', highValue: undefined, lowValue: undefined, - moduleID: undefined + moduleID: undefined, + sectionID: '' }) // 表单验证规则 @@ -176,6 +177,11 @@ const handleSubmit = async () => { formData.value.moduleName = moduleName.split('|')[0] formData.value.moduleID = parseInt(moduleName.split('|')[1]) } + if (formData.value.section) { + const section = formData.value.section + formData.value.section = section.split('|')[0] + formData.value.sectionID = section.split('|')[1] + } await itemsApi.createitems(formData.value as itemsVO) ElMessage.success('添加成功') handleClose() diff --git a/src/views/project-management/base/editUI.vue b/src/views/project-management/base/editUI.vue index 251882e..ea29c85 100644 --- a/src/views/project-management/base/editUI.vue +++ b/src/views/project-management/base/editUI.vue @@ -14,7 +14,7 @@ v-for="item in departmentOptions" :key="item.value" :label="item.label" - :value="item.value" + :value="item.label + '|' + item.value" /> @@ -137,7 +137,7 @@ const getDepartmentList = async () => { try { const data = await DepartmentApi.getListDepartment() departmentOptions.value = data.map((item: DepartmentVO) => ({ - value: item.departmentName, + value: item.departmentCode, label: item.departmentName })) } catch (error) { @@ -158,6 +158,13 @@ const handleSubmit = async () => { formData.value.moduleName = moduleName.split('|')[0] formData.value.moduleID = parseInt(moduleName.split('|')[1]) } + if (formData.value.section) { + + const section = formData.value.section + formData.value.section = section.split('|')[0] + formData.value.sectionID = section.split('|')[1] + } + console.log('section', formData.value.sectionID) await itemsApi.updateitems(formData.value as itemsVO) ElMessage.success('修改成功') handleClose() diff --git a/src/views/project-management/exam-package/drawer.vue b/src/views/project-management/exam-package/drawer.vue new file mode 100644 index 0000000..d445502 --- /dev/null +++ b/src/views/project-management/exam-package/drawer.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/src/views/project-management/exam-package/exam-packageUI.vue b/src/views/project-management/exam-package/exam-packageUI.vue index 75e6ae1..3c4f05f 100644 --- a/src/views/project-management/exam-package/exam-packageUI.vue +++ b/src/views/project-management/exam-package/exam-packageUI.vue @@ -8,8 +8,21 @@ v-model="searchKeyword" placeholder="请输入关键字" :prefix-icon="Search" + @input="handleSearch" /> + +
+
+
{{ item.examModuleName }}
+
+
@@ -21,7 +34,7 @@ 删除 - + 添加项目 @@ -31,36 +44,18 @@
- - - - - - - - - - - - - - - + + - - - - +
- - + - @@ -86,20 +81,35 @@ background /> + + + + + + + - @@ -220,13 +294,13 @@ const handleCurrentChange = (val) => { .pagination-container { margin-top: 20px; display: flex; - justify-content: flex-end; /* 内容靠右对齐 */ - padding: 15px 20px; /* 增加左右内边距 */ + justify-content: flex-end; /* 内容靠右对齐 */ + padding: 15px 20px; /* 增加左右内边距 */ background-color: #fff; } .el-pagination { - justify-content: flex-end; /* 分页组件内部靠右对齐 */ + justify-content: flex-end; /* 分页组件内部靠右对齐 */ } /* 可选:美化分页样式 */ @@ -240,4 +314,81 @@ const handleCurrentChange = (val) => { flex: 1; overflow-y: auto; } + +/* 添加套餐列表样式 */ +.package-list { + margin-top: 10px; +} + +.package-item { + padding: 10px; + border-bottom: 1px solid #eee; + cursor: pointer; + transition: background-color 0.3s; +} + +.package-item:hover { + background-color: #f5f7fa; +} + +.package-item.active { + background-color: #ecf5ff; +} + +.package-code { + font-size: 14px; + color: #666; + margin-bottom: 5px; +} + +.package-name { + font-size: 14px; + color: #333; +} + +.drawer-content { + padding: 20px; +} + +.image-container { + width: 100%; + height: 60vh; + display: flex; + justify-content: center; + align-items: center; + background-color: #f5f7fa; + border-radius: 8px; + overflow: hidden; +} + +.el-image { + max-width: 100%; + max-height: 100%; +} + +.image-slot { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + height: 100%; + color: #909399; +} + +.description { + margin-top: 20px; + padding: 20px; + background-color: #f5f7fa; + border-radius: 8px; +} + +.description h3 { + margin-bottom: 10px; + color: #303133; +} + +.description p { + color: #606266; + line-height: 1.6; +} diff --git a/src/views/project-management/exam-package/new.vue b/src/views/project-management/exam-package/new.vue new file mode 100644 index 0000000..716fc8d --- /dev/null +++ b/src/views/project-management/exam-package/new.vue @@ -0,0 +1,152 @@ + + + + +