|
|
@ -2,8 +2,7 @@ |
|
|
<el-tree |
|
|
<el-tree |
|
|
:data="customerOrg.customerOrgTree" |
|
|
:data="customerOrg.customerOrgTree" |
|
|
:props="customerOrg.treeprops" |
|
|
:props="customerOrg.treeprops" |
|
|
@node-click="treeclick" |
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
@node-click="treeclick"/> |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import { mapState, mapMutations } from "vuex"; |
|
|
import { mapState, mapMutations } from "vuex"; |
|
|
@ -48,20 +47,18 @@ export default { |
|
|
//console.log('getCustomerOrgTree start') |
|
|
//console.log('getCustomerOrgTree start') |
|
|
// api/app/organization-units/organization-unit-by-is-peis // api/app/customer-org/by-code-all |
|
|
// api/app/organization-units/organization-unit-by-is-peis // api/app/customer-org/by-code-all |
|
|
getapi("/api/app/customer-org/by-code-all").then((res) => { |
|
|
getapi("/api/app/customer-org/by-code-all").then((res) => { |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
//customerOrgTree = res.data; |
|
|
console.log("res.data", res.data); |
|
|
console.log("res.data", res.data); |
|
|
this.setData({ key: "customerOrg.customerOrgTree", value: res.data }); |
|
|
this.setData({ key: "customerOrg.customerOrgTree", value: res.data }); |
|
|
tcdate(this.customerOrg.customerOrgTree); |
|
|
tcdate(this.customerOrg.customerOrgTree); |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//获取单位基本信息 |
|
|
//获取单位基本信息 |
|
|
getCustomerOrgRd(id) { |
|
|
getCustomerOrgRd(id) { |
|
|
getapi(`/api/app/customer-org/${id}`).then((res) => { |
|
|
getapi(`/api/app/customer-org/${id}`).then((res) => { |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
//console.log("res.data", res.data); |
|
|
this.customerOrg.customerOrgRd = res.data; |
|
|
this.customerOrg.customerOrgRd = res.data; |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -70,9 +67,8 @@ export default { |
|
|
getapi( |
|
|
getapi( |
|
|
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}` |
|
|
`/api/app/customer-org-register/in-customer-org-id/${customerOrgId}` |
|
|
).then((res) => { |
|
|
).then((res) => { |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
//console.log('res.data',res.data) |
|
|
this.customerOrg.customerOrgRegisterList = res.data; |
|
|
this.customerOrg.customerOrgRegisterList = res.data; |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -81,9 +77,8 @@ export default { |
|
|
getapi( |
|
|
getapi( |
|
|
`/api/app/contact-person/in-customer-org-id/${customerOrgId}` |
|
|
`/api/app/contact-person/in-customer-org-id/${customerOrgId}` |
|
|
).then((res) => { |
|
|
).then((res) => { |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
//console.log('res.data',res.data) |
|
|
this.customerOrg.contactPersonList = res.data; |
|
|
this.customerOrg.contactPersonList = res.data; |
|
|
} |
|
|
|
|
|
if (res.data.length > 0) { |
|
|
if (res.data.length > 0) { |
|
|
this.getContactMethodList(res.data[0].id); |
|
|
this.getContactMethodList(res.data[0].id); |
|
|
} else { |
|
|
} else { |
|
|
@ -98,26 +93,21 @@ export default { |
|
|
getapi("/api/app/contact-method/in-contact-person-id", { |
|
|
getapi("/api/app/contact-method/in-contact-person-id", { |
|
|
ContactPersonId, |
|
|
ContactPersonId, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if(res.code != -1){ |
|
|
|
|
|
|
|
|
//console.log('res.data',res.data) |
|
|
this.customerOrg.contactMethodList = res.data; |
|
|
this.customerOrg.contactMethodList = res.data; |
|
|
} |
|
|
|
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//点击树节点 |
|
|
//点击树节点 |
|
|
treeclick(data) { |
|
|
treeclick(data) { |
|
|
//this.$message.success(data.id + " 查询单位详情、体检次数、联系人等信息 " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1 |
|
|
//this.$message.success(data.id + " 查询单位详情、体检次数、联系人等信息 " + data.displayName);// api/app/customer-org/3a0c0439-a5ca-8a63-b2b9-e0eb24cb58b1 |
|
|
console.log('data',data); |
|
|
|
|
|
this.customerOrg.customerOrgId = data.id; |
|
|
this.customerOrg.customerOrgId = data.id; |
|
|
this.getCustomerOrgRd(data.id); |
|
|
this.getCustomerOrgRd(data.id); |
|
|
|
|
|
|
|
|
//只有单位才有体检次数登记,部门无 |
|
|
|
|
|
if(!data.parentId){ |
|
|
|
|
|
this.getCustomerOrgRegisterList(data.id); |
|
|
this.getCustomerOrgRegisterList(data.id); |
|
|
} |
|
|
|
|
|
this.getContactPersonList(data.id); |
|
|
this.getContactPersonList(data.id); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|