From 8364261d787d8d625daeaf8160fc7aed5536676a Mon Sep 17 00:00:00 2001 From: yujt Date: Tue, 12 May 2020 14:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E6=88=90=E5=90=B9=E5=93=A8=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/zh-CN.js | 4 +- .../events/handlecategory-add-or-update.vue | 166 ++++++++++++++++++ src/views/modules/events/handlecategory.vue | 82 +++++++++ src/views/modules/sys/role-add-or-update.vue | 80 ++++++++- 4 files changed, 326 insertions(+), 6 deletions(-) create mode 100644 src/views/modules/events/handlecategory-add-or-update.vue create mode 100644 src/views/modules/events/handlecategory.vue diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index 7033682..1cbe994 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -366,8 +366,10 @@ t.role.remark = '备注' t.role.createDate = '创建时间' t.role.menuList = '菜单授权' t.role.deptList = '数据授权' -t.role.appMenuList = 'App菜单授权' t.role.analysisMenuList = '数据端菜单授权' +t.role.appMenuList = '工作端菜单授权' +t.role.categoryList = '项目处理类型授权' +t.role.whistleDeptList = '吹哨部门授权' t.user = {} t.user.username = '用户名' diff --git a/src/views/modules/events/handlecategory-add-or-update.vue b/src/views/modules/events/handlecategory-add-or-update.vue new file mode 100644 index 0000000..b0a65d4 --- /dev/null +++ b/src/views/modules/events/handlecategory-add-or-update.vue @@ -0,0 +1,166 @@ + + + diff --git a/src/views/modules/events/handlecategory.vue b/src/views/modules/events/handlecategory.vue new file mode 100644 index 0000000..3869784 --- /dev/null +++ b/src/views/modules/events/handlecategory.vue @@ -0,0 +1,82 @@ + + + diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue index ea46f67..d503eab 100644 --- a/src/views/modules/sys/role-add-or-update.vue +++ b/src/views/modules/sys/role-add-or-update.vue @@ -29,7 +29,7 @@ :placeholder="$t('role.remark')"> - + - + - + - + + + + + + + + + + + + + { if (this.dataForm.id) { @@ -161,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 }) => { @@ -170,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) { @@ -191,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(() => { }) }, // 表单提交 @@ -209,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) @@ -240,3 +298,15 @@ export default { } } +// 添加树样式 +