|
@@ -36,6 +36,7 @@
|
|
|
@checkTree="checkTree"
|
|
@checkTree="checkTree"
|
|
|
ref="tree"
|
|
ref="tree"
|
|
|
@getList="getMessageList"
|
|
@getList="getMessageList"
|
|
|
|
|
+ :list="treeData"
|
|
|
></tree>
|
|
></tree>
|
|
|
</div>
|
|
</div>
|
|
|
<div style="flex: 1">
|
|
<div style="flex: 1">
|
|
@@ -254,15 +255,31 @@ export default {
|
|
|
searchName: "",
|
|
searchName: "",
|
|
|
tabs: 1,
|
|
tabs: 1,
|
|
|
deptId: "",
|
|
deptId: "",
|
|
|
|
|
+ treeData:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.resetForm = { ...this.dataForm };
|
|
this.resetForm = { ...this.dataForm };
|
|
|
this.getAuthList();
|
|
this.getAuthList();
|
|
|
|
|
+ this.getMechanismTree()
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // .getMechanismTree()
|
|
|
},
|
|
},
|
|
|
- mounted() {},
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ getMechanismTree() {
|
|
|
|
|
+ // console.log(this.userInfo);
|
|
|
|
|
+ this.$API.mechanism
|
|
|
|
|
+ .getMechanismTree({ deptId: this.userInfo.deptId })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
|
+ this.treeData = res.data.data;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
filter(inputValue, path) {
|
|
filter(inputValue, path) {
|
|
|
return path.some(
|
|
return path.some(
|
|
|
(option) =>
|
|
(option) =>
|
|
@@ -315,7 +332,7 @@ export default {
|
|
|
leaderId: this.formState.leaderId[this.formState.leaderId.length - 1],
|
|
leaderId: this.formState.leaderId[this.formState.leaderId.length - 1],
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
- console.log(res);
|
|
|
|
|
|
|
+
|
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
|
this.perLoading = false;
|
|
this.perLoading = false;
|
|
|
this.perTable = [...res.data.data.content];
|
|
this.perTable = [...res.data.data.content];
|
|
@@ -340,7 +357,7 @@ export default {
|
|
|
this.title = "数据权限配置";
|
|
this.title = "数据权限配置";
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.dataForm = { ...item.record };
|
|
this.dataForm = { ...item.record };
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.$refs.tree.setExpandKys(item.record);
|
|
this.$refs.tree.setExpandKys(item.record);
|
|
|
// this.defaultCheckList = [""];
|
|
// this.defaultCheckList = [""];
|
|
@@ -357,7 +374,7 @@ export default {
|
|
|
|
|
|
|
|
// this.setExpandKys(item.record);
|
|
// this.setExpandKys(item.record);
|
|
|
},
|
|
},
|
|
|
- setExpandKys() {},
|
|
|
|
|
|
|
+
|
|
|
onChange(pagination) {
|
|
onChange(pagination) {
|
|
|
// this.$message.info('表格状态改变了')
|
|
// this.$message.info('表格状态改变了')
|
|
|
// console.log(pagination, filters, sorter, { currentDataSource });
|
|
// console.log(pagination, filters, sorter, { currentDataSource });
|