From 327dc1c2666c2387c8a9a967b8f8c8d06e7d8ba9 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Wed, 5 Mar 2025 18:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82=E5=BC=80=E5=8F=91?= =?UTF-8?q?=20=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/role.js | 140 +-- .../business-details.vue | 807 ++++++++++-------- .../direct-rotation-apply/index.vue | 395 ++++----- .../receive-apply/business-details.vue | 8 +- .../countersign/config/config-data.vue | 72 +- .../engineering-in-use/index.vue | 265 ++++++ vue.config.js | 4 +- 7 files changed, 1041 insertions(+), 650 deletions(-) create mode 100644 src/views/warning-analysis/engineering-in-use/index.vue diff --git a/src/api/system/role.js b/src/api/system/role.js index abbe6cba..abe8dd6b 100644 --- a/src/api/system/role.js +++ b/src/api/system/role.js @@ -2,118 +2,126 @@ import request from '@/utils/request' // 查询角色列表 export function listRole(query) { - return request({ - url: '/system/role/list', - method: 'get', - params: query - }) + return request({ + url: '/system/role/list', + method: 'get', + params: query + }) } // 查询角色详细 export function getRole(roleId) { - return request({ - url: '/system/role/' + roleId, - method: 'get' - }) + return request({ + url: '/system/role/' + roleId, + method: 'get' + }) } // 新增角色 export function addRole(data) { - return request({ - url: '/system/role', - method: 'post', - data: data - }) + return request({ + url: '/system/role', + method: 'post', + data: data + }) } // 修改角色 export function updateRole(data) { - return request({ - url: '/system/role/edit', - method: 'post', - data: data - }) + return request({ + url: '/system/role/edit', + method: 'post', + data: data + }) } // 角色数据权限 export function dataScope(data) { - return request({ - url: '/system/role/dataScope/edit', - method: 'post', - data: data - }) + return request({ + url: '/system/role/dataScope/edit', + method: 'post', + data: data + }) } // 角色状态修改 export function changeRoleStatus(roleId, status) { - const data = { - roleId, - status - } - return request({ - url: '/system/role/changeStatus', - method: 'post', - data: data - }) + const data = { + roleId, + status + } + return request({ + url: '/system/role/changeStatus', + method: 'post', + data: data + }) } // 删除角色 export function delRole(roleId) { - return request({ - url: '/system/role/delete/' + roleId, - method: 'post' - }) + return request({ + url: '/system/role/delete/' + roleId, + method: 'post' + }) } // 查询角色已授权用户列表 export function allocatedUserList(query) { - return request({ - url: '/system/role/authUser/allocatedList', - method: 'get', - params: query - }) + return request({ + url: '/system/role/authUser/allocatedList', + method: 'get', + params: query + }) +} +// 查询角色已授权用户列表 +export function allocatedUserListAllApi(query) { + return request({ + url: 'system/user/list', + method: 'get', + params: query + }) } // 查询角色未授权用户列表 export function unallocatedUserList(query) { - return request({ - url: '/system/role/authUser/unallocatedList', - method: 'get', - params: query - }) + return request({ + url: '/system/role/authUser/unallocatedList', + method: 'get', + params: query + }) } // 取消用户授权角色 export function authUserCancel(data) { - return request({ - url: '/system/role/authUser/cancel', - method: 'post', - data: data - }) + return request({ + url: '/system/role/authUser/cancel', + method: 'post', + data: data + }) } // 批量取消用户授权角色 export function authUserCancelAll(data) { - return request({ - url: '/system/role/authUser/cancelAll', - method: 'post', - params: data - }) + return request({ + url: '/system/role/authUser/cancelAll', + method: 'post', + params: data + }) } // 授权用户选择 export function authUserSelectAll(data) { - return request({ - url: '/system/role/authUser/selectAll', - method: 'post', - params: data - }) + return request({ + url: '/system/role/authUser/selectAll', + method: 'post', + params: data + }) } // 根据角色ID查询部门树结构 export function deptTreeSelect(roleId) { - return request({ - url: '/system/role/deptTree/' + roleId, - method: 'get' - }) + return request({ + url: '/system/role/deptTree/' + roleId, + method: 'get' + }) } diff --git a/src/views/business-examine/direct-rotation-apply/business-details.vue b/src/views/business-examine/direct-rotation-apply/business-details.vue index 2f3b292a..0c7b76c1 100644 --- a/src/views/business-examine/direct-rotation-apply/business-details.vue +++ b/src/views/business-examine/direct-rotation-apply/business-details.vue @@ -1,371 +1,424 @@ diff --git a/src/views/business-examine/direct-rotation-apply/index.vue b/src/views/business-examine/direct-rotation-apply/index.vue index e06755cd..cfd21803 100644 --- a/src/views/business-examine/direct-rotation-apply/index.vue +++ b/src/views/business-examine/direct-rotation-apply/index.vue @@ -1,41 +1,46 @@ diff --git a/src/views/business-examine/receive-apply/business-details.vue b/src/views/business-examine/receive-apply/business-details.vue index 83391f4a..487311ac 100644 --- a/src/views/business-examine/receive-apply/business-details.vue +++ b/src/views/business-examine/receive-apply/business-details.vue @@ -167,10 +167,10 @@ export default { const { recordId, id, typeId, isAccept } = currentAuditing[0] - if (isAccept !== 0) { - this.$modal.msgError('当前已审核,不可重复审核') - return - } + // if (isAccept !== 0) { + // this.$modal.msgError('当前已审核,不可重复审核') + // return + // } Object.assign(this.auditingParams, { typeId, recordId, diff --git a/src/views/material/countersign/config/config-data.vue b/src/views/material/countersign/config/config-data.vue index 0273d6e3..bfe1516f 100644 --- a/src/views/material/countersign/config/config-data.vue +++ b/src/views/material/countersign/config/config-data.vue @@ -124,13 +124,19 @@ - + 角色 用户 - + 0) { + this.form.configValues = this.userIds.join(',') + this.form.roleIds = this.form.configValuesList.join(',') + } else { + this.form.configValues = this.form.configValuesList.join(',') + } const addOrEditForm = JSON.parse(JSON.stringify(this.form)) @@ -324,6 +347,7 @@ export default { const res = await SUBMIT_FUN(addOrEditForm) if (res.code === 200) { this.$modal.msgSuccess(`${this.title}成功`) + this.userIds = [] this.getList() this.open = false } @@ -342,6 +366,34 @@ export default { this.$modal.msgSuccess('删除成功') }) .catch(() => {}) + }, + // 审核角色用户切换 + onChangeNodeSignConfig(val) { + console.log(val, '角色用户切换') + + if (val == 0) { + this.form.configValuesList = [] + } + }, + // 角色复选框change事件 + async onRolesChange(val) { + console.log('val', val) + const newRoles = val.map(e => e * 1) + + if (val.length === 0) { + this.userIds = [] + } else { + val.forEach(e => { + allocatedUserList({ pageNum: 1, pageSize: 999, roleId: e }).then(res => { + res.rows.forEach(j => { + this.userIds.push(j.userId) + }) + }) + }) + } + + // const res = await allocatedUserList(val) + // console.log('res', res) } } } diff --git a/src/views/warning-analysis/engineering-in-use/index.vue b/src/views/warning-analysis/engineering-in-use/index.vue new file mode 100644 index 00000000..4ce3b40b --- /dev/null +++ b/src/views/warning-analysis/engineering-in-use/index.vue @@ -0,0 +1,265 @@ + + + + + diff --git a/vue.config.js b/vue.config.js index 23e017ad..9cc77185 100644 --- a/vue.config.js +++ b/vue.config.js @@ -40,10 +40,10 @@ module.exports = { // target: `http://192.168.0.244:18580`,//测试 // target: `http://192.168.2.223:18080`,//山 // target: `http://192.168.2.23:18080`,//洪 - target: `http://192.168.0.234:18080`, //阮 + // target: `http://192.168.0.234:18080`, //阮 // target: `http://192.168.137.1:18080`,// // target: `http://192.168.0.15:18080`,// 韩傲宇 - // target: `http://192.168.2.209:18080`, // 赵福海 + target: `http://192.168.0.60:18080`, // 赵福海 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''