From 1f7cfdf3e315db01c99377a6d22079d115a3db0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Tue, 29 Oct 2024 18:03:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A3=80=E6=B5=8B=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inspection/project/index.js | 63 ++++++ .../project/DlInspectionProjectForm.vue | 124 ++++++++++++ src/views/inspection/project/index.vue | 182 ++++++++++++++++++ src/views/system/role/index.vue | 31 ++- 4 files changed, 399 insertions(+), 1 deletion(-) create mode 100644 src/api/inspection/project/index.js create mode 100644 src/views/inspection/project/DlInspectionProjectForm.vue create mode 100644 src/views/inspection/project/index.vue diff --git a/src/api/inspection/project/index.js b/src/api/inspection/project/index.js new file mode 100644 index 0000000..cc0de69 --- /dev/null +++ b/src/api/inspection/project/index.js @@ -0,0 +1,63 @@ +import request from '@/utils/request' + +// 创建检测项目 +export function createDlInspectionProject(data) { + return request({ + url: '/inspection/dl-inspection-project/create', + method: 'post', + data: data + }) +} + +// 更新检测项目 +export function updateDlInspectionProject(data) { + return request({ + url: '/inspection/dl-inspection-project/update', + method: 'put', + data: data + }) +} + +// 删除检测项目 +export function deleteDlInspectionProject(id) { + return request({ + url: '/inspection/dl-inspection-project/delete?id=' + id, + method: 'delete' + }) +} + +// 获得检测项目 +export function getDlInspectionProject(id) { + return request({ + url: '/inspection/dl-inspection-project/get?id=' + id, + method: 'get' + }) +} + +// 获得检测项目分页 +export function getDlInspectionProjectPage(params) { + return request({ + url: '/inspection/dl-inspection-project/page', + method: 'get', + params + }) +} +// 导出检测项目 Excel +export function exportDlInspectionProjectExcel(params) { + return request({ + url: '/inspection/dl-inspection-project/export-excel', + method: 'get', + params, + responseType: 'blob' + }) +} +// 获取检测的角色 Excel +export function getRole(params) { + return request({ + url: '/system/role/pageByQuery', + method: 'get', + params:{ + servicePackageId:'jiance' + }, + }) +} diff --git a/src/views/inspection/project/DlInspectionProjectForm.vue b/src/views/inspection/project/DlInspectionProjectForm.vue new file mode 100644 index 0000000..14658e0 --- /dev/null +++ b/src/views/inspection/project/DlInspectionProjectForm.vue @@ -0,0 +1,124 @@ + + + diff --git a/src/views/inspection/project/index.vue b/src/views/inspection/project/index.vue new file mode 100644 index 0000000..678a1cc --- /dev/null +++ b/src/views/inspection/project/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index eecdfaf..fb4dfa9 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -84,6 +84,16 @@ + + + + + @@ -178,6 +188,7 @@ import {assignRoleMenu, listRoleMenus, assignRoleDataScope} from "@/api/system/p import {listSimpleDepts} from "@/api/system/dept"; import {CommonStatusEnum, SystemDataScopeEnum} from "@/utils/constants"; import {DICT_TYPE, getDictDatas} from "@/utils/dict"; +import {getServicePackagePage} from "@/api/system/servicePackage"; export default { name: "SystemRole", @@ -205,6 +216,11 @@ export default { menuNodeAll: false, deptExpand: true, deptNodeAll: false, + servicePackages: [ + // { id: 1, name: '服务包1' }, + // { id: 2, name: '服务包2' }, + // { id: 3, name: '服务包3' } + ], // 菜单列表 menuOptions: [], // 部门列表 @@ -235,7 +251,8 @@ export default { ], sort: [ { required: true, message: "角色顺序不能为空", trigger: "blur" } - ] + ], + servicePackageId: [{ required: true, message: '所属服务不能为空', trigger: 'change' }] }, // 枚举 @@ -357,6 +374,7 @@ export default { }, /** 新增按钮操作 */ handleAdd() { + this.getServicePackage() this.reset(); this.open = true; this.title = "添加角色"; @@ -490,6 +508,17 @@ export default { }).finally(() => { this.exportLoading = false; }); + }, + /** 获取服务套餐 */ + getServicePackage() { + console.log('看看执行') + const query = { + pageNo: 1, + pageSize: 100 + } + getServicePackagePage(query).then(response => { + this.servicePackages = response.data.list; + }); } } };