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 { } } +// 添加树样式 +