|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<el-dialog :visible.sync="visible" width="1500px" |
|
|
|
<el-dialog :visible.sync="visible" width="1000px" |
|
|
|
:title="!dataForm.id ? $t('add') : $t('update')" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false"> |
|
|
@ -29,7 +29,7 @@ |
|
|
|
:placeholder="$t('role.remark')"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-row> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.menuList')"> |
|
|
|
<el-tree :data="menuList" |
|
|
@ -41,7 +41,7 @@ |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.deptList')"> |
|
|
|
<el-tree :data="deptList" |
|
|
@ -53,7 +53,20 @@ |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.whistleDeptList')"> |
|
|
|
<el-tree :data="whistleDeptList" |
|
|
|
:props="{ label: 'name', children: 'children' }" |
|
|
|
node-key="id" |
|
|
|
ref="whistleDeptListTree" |
|
|
|
accordion |
|
|
|
show-checkbox |
|
|
|
:check-strictly="true"> |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.appMenuList')"> |
|
|
|
<el-tree :data="appMenuList" |
|
|
@ -65,38 +78,37 @@ |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.categoryList')"> |
|
|
|
<el-tree :data="categoryList" |
|
|
|
:label="$t('role.analysisMenuList')"> |
|
|
|
<el-tree :data="analysisMenuList" |
|
|
|
:props="{ label: 'name', children: 'children' }" |
|
|
|
node-key="id" |
|
|
|
ref="categoryListTree" |
|
|
|
ref="analysisMenuListTree" |
|
|
|
accordion |
|
|
|
show-checkbox> |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.whistleDeptList')"> |
|
|
|
<el-tree :data="whistleDeptList" |
|
|
|
:label="$t('role.categoryList')"> |
|
|
|
<el-tree :data="categoryList" |
|
|
|
:props="{ label: 'name', children: 'children' }" |
|
|
|
node-key="id" |
|
|
|
ref="whistleDeptListTree" |
|
|
|
ref="categoryListTree" |
|
|
|
accordion |
|
|
|
show-checkbox |
|
|
|
:check-strictly="true"> |
|
|
|
show-checkbox> |
|
|
|
</el-tree> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item size="mini" |
|
|
|
:label="$t('role.analysisMenuList')"> |
|
|
|
<el-tree :data="analysisMenuList" |
|
|
|
:props="{ label: 'name', children: 'children' }" |
|
|
|
label="事件标签授权"> |
|
|
|
<el-tree :data="eventsTagsList" |
|
|
|
:props="{ label: 'tagName', children: 'children' }" |
|
|
|
node-key="id" |
|
|
|
ref="analysisMenuListTree" |
|
|
|
ref="eventsTagsListTree" |
|
|
|
accordion |
|
|
|
show-checkbox> |
|
|
|
</el-tree> |
|
|
@ -125,6 +137,7 @@ export default { |
|
|
|
categoryList: [], |
|
|
|
roleTypeList: [], |
|
|
|
analysisMenuList: [], |
|
|
|
eventsTagsList: [], |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
name: '', |
|
|
@ -134,6 +147,7 @@ export default { |
|
|
|
categoryIdList: [], |
|
|
|
whistleDeptIdList: [], |
|
|
|
analysisMenuIdList: [], |
|
|
|
eventsTagsIdList: [], |
|
|
|
remark: '', |
|
|
|
typeKey: '' |
|
|
|
} |
|
|
@ -162,11 +176,13 @@ export default { |
|
|
|
this.$refs.categoryListTree.setCheckedKeys([]) |
|
|
|
this.$refs.whistleDeptListTree.setCheckedKeys([]) |
|
|
|
this.$refs.analysisMenuListTree.setCheckedKeys([]) |
|
|
|
this.$refs.eventsTagsListTree.setCheckedKeys([]) |
|
|
|
Promise.all([ |
|
|
|
this.getMenuList(), |
|
|
|
this.getDeptList(), |
|
|
|
this.getAppMenuList(), |
|
|
|
this.getCategoryList() |
|
|
|
this.getCategoryList(), |
|
|
|
this.getEventsTagsList() |
|
|
|
// this.getWhistleDeptList() |
|
|
|
// this.getAnalysisMenuList() |
|
|
|
]).then(() => { |
|
|
@ -224,6 +240,15 @@ export default { |
|
|
|
this.categoryList = res.data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 获取事件标签列表 |
|
|
|
getEventsTagsList () { |
|
|
|
return this.$http.get('/events/eventtag/eventstags').then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.eventsTagsList = res.data |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// getAnalysisMenuList () { |
|
|
|
// return this.$http.get('/sys/analysismenu/select').then(({ data: res }) => { |
|
|
|
// if (res.code !== 0) { |
|
|
@ -248,6 +273,7 @@ export default { |
|
|
|
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) |
|
|
|
this.dataForm.eventsTagsIdList.forEach(item => this.$refs.eventsTagsListTree.setChecked(item, true)) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 表单提交 |
|
|
@ -269,6 +295,10 @@ export default { |
|
|
|
...this.$refs.categoryListTree.getCheckedKeys(), |
|
|
|
...this.$refs.categoryListTree.getHalfCheckedKeys() |
|
|
|
] |
|
|
|
this.dataForm.eventsTagsIdList = [ |
|
|
|
...this.$refs.eventsTagsListTree.getCheckedKeys(), |
|
|
|
...this.$refs.eventsTagsListTree.getHalfCheckedKeys() |
|
|
|
] |
|
|
|
this.dataForm.analysisMenuIdList = [ |
|
|
|
...this.$refs.analysisMenuListTree.getCheckedKeys(), |
|
|
|
...this.$refs.analysisMenuListTree.getHalfCheckedKeys() |
|
|
|