|
|
@@ -13,7 +13,8 @@
|
|
|
<div class="tree-container">
|
|
|
<div style="margin-bottom: 10px" v-show="showLowerCheck">
|
|
|
<el-checkbox v-model="checkSub" @change="changeCheckBox"
|
|
|
- >关联下级</el-checkbox>
|
|
|
+ >关联下级</el-checkbox
|
|
|
+ >
|
|
|
</div>
|
|
|
<el-tree
|
|
|
:data="treeList"
|
|
|
@@ -33,7 +34,8 @@
|
|
|
class="item"
|
|
|
effect="light"
|
|
|
:content="node.label"
|
|
|
- placement="top-start">
|
|
|
+ placement="top-start"
|
|
|
+ >
|
|
|
<span>{{ node.label }}</span>
|
|
|
</el-tooltip>
|
|
|
</span>
|
|
|
@@ -110,17 +112,19 @@ export default {
|
|
|
this.customRequest().then((response) => {
|
|
|
this.treeList = response.data;
|
|
|
this.dataFn(response.data);
|
|
|
- return
|
|
|
+ return;
|
|
|
});
|
|
|
+ } else {
|
|
|
+ if (this.hangsheTree) {
|
|
|
+ this.treeList = this.$store.getters.depTree;
|
|
|
+ } else {
|
|
|
+ this.treeList = this.$store.getters.orgTree;
|
|
|
+ }
|
|
|
+ this.dataFn(this.treeList);
|
|
|
}
|
|
|
- this.treeList = this.$store.getters.orgTree;
|
|
|
- if (this.hangsheTree) {
|
|
|
- this.treeList = this.$store.getters.depTree;
|
|
|
- }
|
|
|
- this.dataFn(this.treeList);
|
|
|
},
|
|
|
- dataFn(arr){
|
|
|
- console.log(arr,'arrr')
|
|
|
+ dataFn(arr) {
|
|
|
+ console.log(arr, "arrr");
|
|
|
this.defaultKeys.push(arr[0].id);
|
|
|
this.$emit("defaultKey", arr[0].id);
|
|
|
this.$emit("defaultOrg", arr[0]);
|