|
|
@@ -70,6 +70,8 @@ export default {
|
|
|
checkList: [],
|
|
|
autoExpandParent: true,
|
|
|
expandedKeys: [],
|
|
|
+ userId: "",
|
|
|
+ agencyId: "",
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -82,10 +84,10 @@ export default {
|
|
|
// console.log(val);
|
|
|
// },
|
|
|
},
|
|
|
- created() {},
|
|
|
- mounted() {
|
|
|
+ created() {
|
|
|
this.getUserTree();
|
|
|
},
|
|
|
+ mounted() {},
|
|
|
methods: {
|
|
|
onExpand(expandedKeys) {
|
|
|
this.expandedKeys = expandedKeys;
|
|
|
@@ -119,7 +121,25 @@ export default {
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code === 200) {
|
|
|
- this.$emit("showTab", res.data.data.type);
|
|
|
+ this.$emit("showTab", {
|
|
|
+ type: res.data.data.type,
|
|
|
+ userId:
|
|
|
+ res.data.data.userList != null
|
|
|
+ ? res.data.data.userList[0].id
|
|
|
+ : "",
|
|
|
+ agencyId:
|
|
|
+ res.data.data.deptList != null
|
|
|
+ ? res.data.data.deptList[0].id
|
|
|
+ : "",
|
|
|
+ });
|
|
|
+ // this.userId =
|
|
|
+ // res.data.data.userList != null
|
|
|
+ // ? res.data.data.userList[0].id
|
|
|
+ // : "";
|
|
|
+ // this.agencyId =
|
|
|
+ // res.data.data.deptList != null
|
|
|
+ // ? res.data.data.deptList[0].id
|
|
|
+ // : "";
|
|
|
this.userTreeData = res.data.data.userList;
|
|
|
this.treeData = res.data.data.deptList;
|
|
|
}
|