From 6cf1a8d8d6b827709a5d61a760c9851df7b68e22 Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 14 Oct 2024 16:05:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=9B=B8=E5=85=B3-=E5=88=86?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E9=A1=B9=E7=9B=AE=E9=83=A8=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/process/branchPro.js | 89 ++++-- src/views/process/branchPro/index.vue | 432 ++++++++++++-------------- src/views/process/roles/index.vue | 2 + vue.config.js | 2 +- 4 files changed, 268 insertions(+), 257 deletions(-) diff --git a/src/api/process/branchPro.js b/src/api/process/branchPro.js index 5e077de..3e01e21 100644 --- a/src/api/process/branchPro.js +++ b/src/api/process/branchPro.js @@ -10,52 +10,99 @@ export function listType(query) { } // 查询详细 -export function getType(dictId) { +export function getType(orgId) { return request({ - url: '/system/dict/type/' + dictId, + url: '/system/subOrg/' + orgId, method: 'get' }) } // 新增 export function addType(data) { - console.log(data) + let dataList = handle(data) return request({ - url: '/system/dict/type', + url: '/system/subOrg', method: 'post', - data: data + data: dataList }) } // 修改 export function updateType(data) { + let dataList = handle(data) return request({ - url: '/system/dict/type', + url: '/system/subOrg', method: 'put', - data: data + data: dataList }) } +//对数据进行处理 +function handle(data) { + let dataList = { + id:data.id, + orgName: data.orgName, + address: data.address, + + isDepartment: "1", + isProvince: data.isProvince, + orgHeadUserId: data.orgHeadUserId, + orgHeadUserName: data.orgHeadUserName, + parentId: data.parentId, + roleList: [ + { + "deptRoleId": 1, + "userId": data.manager + }, + { + "deptRoleId": 2, + "userId": data.safety + }, + { + "deptRoleId": 3, + "userId": data.quality + }, + { + "deptRoleId": 4, + "userId": data.pro + }, + { + "deptRoleId": 5, + "userId": data.mechanic + }, + { + "deptRoleId": 6, + "userId": data.documenter + }, + { + "deptRoleId": 7, + "userId": data.construction + }, + { + "deptRoleId": 8, + "userId": data.materialman + }, + { + "deptRoleId": 9, + "userId": data.other + } + ] + } + return dataList; +} + // 删除 -export function delType(dictId) { +export function delType(orgId) { return request({ - url: '/system/dict/type/' + dictId, + url: '/system/subOrg/' + orgId, method: 'delete' }) } -// 刷新 -export function refreshCache() { +// 审批/提交/撤回 +export function changeStatus(orgId,reviewerStatus) { return request({ - url: '/system/dict/type/refreshCache', - method: 'delete' - }) -} - -// 获取选择框列表 -export function optionselect() { - return request({ - url: '/system/dict/type/optionselect', - method: 'get' + url: '/system/subOrg/changeStatus/'+orgId+"/"+reviewerStatus, + method: 'put' }) } diff --git a/src/views/process/branchPro/index.vue b/src/views/process/branchPro/index.vue index b6a821e..6fa3a41 100644 --- a/src/views/process/branchPro/index.vue +++ b/src/views/process/branchPro/index.vue @@ -43,11 +43,9 @@ 导出 @@ -55,11 +53,9 @@ 权限分配 @@ -84,6 +80,7 @@ 待审核 已审核 未通过 + 撤回 @@ -92,8 +89,8 @@ 详情 修改 撤回 删除 @@ -327,7 +327,7 @@ @@ -335,8 +335,8 @@ diff --git a/src/views/process/roles/index.vue b/src/views/process/roles/index.vue index 54d60cd..4926734 100644 --- a/src/views/process/roles/index.vue +++ b/src/views/process/roles/index.vue @@ -280,6 +280,7 @@ export default { this.processData(node.children, node.uniqueId); // 递归处理子节点 } }); + console.log("this.uniqueIdToIdMap",this.uniqueIdToIdMap) }, /** 设置默认选中的节点 */ @@ -351,6 +352,7 @@ export default { getStaffAllCheckedKeys() { // 目前被选中的菜单节点 let checkedKeys = this.$refs.staff.getCheckedKeys(); + console.log("checkedKeys,",checkedKeys) const checkedIds = checkedKeys.map(uniqueId => this.uniqueIdToIdMap[uniqueId]); // 半选中的菜单节点 // let halfCheckedKeys = this.$refs.staff.getHalfCheckedKeys(); diff --git a/vue.config.js b/vue.config.js index 8c455d7..cb0aee0 100644 --- a/vue.config.js +++ b/vue.config.js @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://192.168.0.32:8100`, + target: `http://192.168.0.137:8100`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''