|
|
|
@ -1,10 +1,12 @@ |
|
|
|
<template> |
|
|
|
<el-tree :data="customerOrg.customerOrgTree" :props="customerOrg.treeprops" @node-click="treeclick" /> |
|
|
|
<el-tree :data="customerOrg.customerOrgTree" :props="customerOrg.treeprops" @node-click="treeclick" highlight-current/> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { mapState, mapMutations } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { tcdate, deepCopy } from "../../utlis/proFunc"; |
|
|
|
import { getTreePids} from "../../utlis/tree"; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: {}, |
|
|
|
data() { |
|
|
|
@ -105,10 +107,17 @@ export default { |
|
|
|
//this.$message.success(data.id + " 查询单位详情、体检次数、联系人等信息 " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1 |
|
|
|
this.customerOrg.customerOrgId = data.id; |
|
|
|
this.getCustomerOrgRd(data.id); |
|
|
|
|
|
|
|
//只有单位才有体检次数登记,部门无 |
|
|
|
if(!data.parentId){ |
|
|
|
this.getCustomerOrgRegisterList(data.id); |
|
|
|
let firstId = data.id //一级单位ID |
|
|
|
if(data.parentId){ |
|
|
|
let pids = getTreePids(this.customerOrg.customerOrgTree,"treeChildren", 'parentId', 'id', data.id) |
|
|
|
console.log('pids',pids) |
|
|
|
firstId = pids[pids.length - 2] |
|
|
|
} |
|
|
|
this.getCustomerOrgRegisterList(firstId); |
|
|
|
|
|
|
|
//联系人 |
|
|
|
this.getContactPersonList(data.id); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|