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; + }); } } };