diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js
index f07d400..765292b 100644
--- a/src/i18n/zh-CN.js
+++ b/src/i18n/zh-CN.js
@@ -365,7 +365,9 @@ t.role.remark = '备注'
t.role.createDate = '创建时间'
t.role.menuList = '菜单授权'
t.role.deptList = '数据授权'
-t.role.appMenuList = 'App菜单授权'
+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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cancel') }}
+ {{ $t('confirm') }}
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+ {{ $t('query') }}
+
+
+ {{ $t('add') }}
+
+
+ {{ $t('deleteBatch') }}
+
+
+
+
+
+
+
+
+
+
+
+ 不可用
+ 可用
+
+
+
+
+
+
+
+
+
+
+ {{ $t('update') }}
+ {{ $t('delete') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/sys/role-add-or-update.vue b/src/views/modules/sys/role-add-or-update.vue
index ce213ed..dfe285f 100644
--- a/src/views/modules/sys/role-add-or-update.vue
+++ b/src/views/modules/sys/role-add-or-update.vue
@@ -1,5 +1,5 @@
-
@@ -29,7 +29,7 @@
:placeholder="$t('role.remark')">
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -83,7 +108,9 @@ export default {
visible: false,
menuList: [],
deptList: [],
+ whistleDeptList: [],
appMenuList: [],
+ categoryList: [],
roleTypeList: [],
dataForm: {
id: '',
@@ -91,6 +118,8 @@ export default {
menuIdList: [],
deptIdList: [],
appMenuIdList: [],
+ categoryIdList: [],
+ whistleDeptIdList: [],
remark: '',
typeKey: ''
}
@@ -116,10 +145,14 @@ export default {
this.$refs.menuListTree.setCheckedKeys([])
this.$refs.deptListTree.setCheckedKeys([])
this.$refs.appMenuListTree.setCheckedKeys([])
+ this.$refs.categoryListTree.setCheckedKeys([])
+ this.$refs.whistleDeptListTree.setCheckedKeys([])
Promise.all([
this.getMenuList(),
this.getDeptList(),
- this.getAppMenuList()
+ this.getAppMenuList(),
+ this.getCategoryList(),
+ this.getWhistleDeptList()
]).then(() => {
if (this.dataForm.id) {
this.getInfo()
@@ -145,6 +178,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 }) => {
@@ -154,6 +196,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(() => { })
+ },
// 获取信息
getInfo () {
this.$http.get(`/sys/role/${this.dataForm.id}`).then(({ data: res }) => {
@@ -167,6 +218,8 @@ 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.$refs.whistleDeptListTree.setCheckedKeys(this.dataForm.whistleDeptIdList)
}).catch(() => { })
},
// 表单提交
@@ -184,6 +237,11 @@ export default {
...this.$refs.appMenuListTree.getCheckedKeys(),
...this.$refs.appMenuListTree.getHalfCheckedKeys()
]
+ this.dataForm.categoryIdList = [
+ ...this.$refs.categoryListTree.getCheckedKeys(),
+ ...this.$refs.categoryListTree.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)
@@ -211,3 +269,15 @@ export default {
}
}
+// 添加树样式
+