From 388d2bb9398c89f7d65849bc3450238170f37e90 Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Thu, 17 Sep 2020 15:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=B8=82=E5=8C=97=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=87=B3=E5=AE=89=E5=AE=81=E3=80=91=E3=80=90?= =?UTF-8?q?=E6=9D=83=E9=99=90=E7=AE=A1=E7=90=86-=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E3=80=91-=E7=8E=8B=E5=85=AC=E5=B3=B0-2020-09?= =?UTF-8?q?-17?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/sys/role-add-or-update.vue | 86 +++++++++++++++++--- 1 file changed, 74 insertions(+), 12 deletions(-) diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index 6c83925..7c9a8a1 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -6,12 +6,11 @@ @@ -27,12 +26,10 @@ - + - + - + - + + + + + + + + + + + + + { if (this.dataForm.id) { @@ -164,6 +194,15 @@ export default { this.deptList = res.data }).catch(() => { }) }, + // 获取吹哨部门列表 + getWhistleDeptList () { + return this.$http.get('/sys/dept/list').then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.whistleDeptList = res.data + }).catch(() => { }) + }, // 获取App菜单列表 getAppMenuList () { return this.$http.get('/sys/appmenu/select').then(({ data: res }) => { @@ -173,6 +212,15 @@ export default { this.appMenuList = res.data }).catch(() => { }) }, + // 获取项目处理类型授权 + getCategoryList () { + return this.$http.get('/events/handlecategory/getCategoryList').then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.categoryList = res.data + }).catch(() => { }) + }, getAnalysisMenuList () { return this.$http.get('/sys/analysismenu/select').then(({ data: res }) => { if (res.code !== 0) { @@ -194,7 +242,9 @@ export default { this.dataForm.menuIdList.forEach(item => this.$refs.menuListTree.setChecked(item, true)) this.$refs.deptListTree.setCheckedKeys(this.dataForm.deptIdList) this.dataForm.appMenuIdList.forEach(item => this.$refs.appMenuListTree.setChecked(item, true)) + this.dataForm.categoryIdList.forEach(item => this.$refs.categoryListTree.setChecked(item, true)) this.dataForm.analysisMenuIdList.forEach(item => this.$refs.analysisMenuListTree.setChecked(item, true)) + this.$refs.whistleDeptListTree.setCheckedKeys(this.dataForm.whistleDeptIdList) }).catch(() => { }) }, // 表单提交 @@ -212,10 +262,15 @@ export default { ...this.$refs.appMenuListTree.getCheckedKeys(), ...this.$refs.appMenuListTree.getHalfCheckedKeys() ] + this.dataForm.categoryIdList = [ + ...this.$refs.categoryListTree.getCheckedKeys(), + ...this.$refs.categoryListTree.getHalfCheckedKeys() + ] this.dataForm.analysisMenuIdList = [ ...this.$refs.analysisMenuListTree.getCheckedKeys(), ...this.$refs.analysisMenuListTree.getHalfCheckedKeys() ] + this.dataForm.whistleDeptIdList = this.$refs.whistleDeptListTree.getCheckedKeys() this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -243,8 +298,15 @@ export default { } } -