From e0299668fbf7e734959715838c8646113d0ddc75 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 24 Jul 2024 19:07:20 +0800 Subject: [PATCH] doctor --- .../patientRegister/customerOrgTreeAll.vue | 30 ++----------------- src/views/doctorCheck/doctorCheck.vue | 29 ++++++++++++------ 2 files changed, 22 insertions(+), 37 deletions(-) diff --git a/src/components/patientRegister/customerOrgTreeAll.vue b/src/components/patientRegister/customerOrgTreeAll.vue index 985c52f..5dd6e5d 100644 --- a/src/components/patientRegister/customerOrgTreeAll.vue +++ b/src/components/patientRegister/customerOrgTreeAll.vue @@ -68,8 +68,7 @@ export default { //挂载组件完成 mounted() { - //获取体检单位列表树信息 - // this.getCustomerOrgTree(); + //获取体检单位列表树信息 this.getCustomerOrgChild(null) .then(res => { this.customerOrgTreeAll = res @@ -99,31 +98,7 @@ export default { }, - //获取体检单位列表树信息 - getCustomerOrgTree() { - getapi("/api/app/customerorg/getbycodeall").then((res) => { - // console.log("res.data", res.data); - if (res.code > -1) { - this.patientRegister.customerOrgTreeAll = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode); - this.customerOrgTreeAll = deepCopy(this.patientRegister.customerOrgTreeAll) - // tcdate(this.patientRegister.customerOrgTreeAll) - } - }); - }, - - //获取体检单位父级ID api/app/customer-org/parent/[CustomerOrgld - // getCustomerOrgParentId(customerOrgld) { - // if (customerOrgld == this.dict.personOrgId) { - // this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId; - // return; - // } - // getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => { - // // console.log("res.data", res.data); - // if (res.code == 1) { - // this.patientRegister.query.CustomerOrgParentId = res.data; - // } - // }); - // }, + loadNode(node, resolve) { // console.log('node', node) if (node && node.data && node.data.id) { @@ -177,7 +152,6 @@ export default { // console.log('data,sortType',data,sortType) putapi(`/api/app/customerorg/updatemanysort?id=${data.id}&SortType=${sortType}`).then(res => { if (res.code > -1) { - // this.getCustomerOrgTree() this.getCustomerOrgChild(data.parentId).then(res => { data.treeChildren = res if(data.parentId == null){ diff --git a/src/views/doctorCheck/doctorCheck.vue b/src/views/doctorCheck/doctorCheck.vue index 5173fd3..49d33ac 100644 --- a/src/views/doctorCheck/doctorCheck.vue +++ b/src/views/doctorCheck/doctorCheck.vue @@ -25,8 +25,9 @@ - - + + @@ -141,7 +142,7 @@ export default { } - console.log('this.LocalConfig',this.LocalConfig) + console.log('this.LocalConfig', this.LocalConfig) }, //挂载完成 @@ -283,12 +284,22 @@ export default { }); //获取体检单位列表树信息 - getapi("/api/app/customerorg/getbycodeall").then((res) => { - //customerOrgTree = res.data; - console.log("res.data", res.data); - this.patientRegister.customerOrgTreeAll = res.data; - tcdate(this.patientRegister.customerOrgTreeAll) - }); + // getapi("/api/app/customerorg/getbycodeall").then((res) => { + // //customerOrgTree = res.data; + // console.log("res.data", res.data); + // this.patientRegister.customerOrgTreeAll = res.data; + // tcdate(this.patientRegister.customerOrgTreeAll) + // }); + postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId: null }) + .then(res => { + if (res.code > -1) { + res.data.forEach(e => { + e.isLeaf = e.isChild == 'Y' ? false : true + }); + this.patientRegister.customerOrgTreeAll = res.data; + tcdate(this.patientRegister.customerOrgTreeAll) + } + }) console.log("dict", this.dict);