+
+
+ 项目类别
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+ 移除
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue
index 3dcb74f..d3f7709 100644
--- a/src/components/patientRegister/PatientRegisterList.vue
+++ b/src/components/patientRegister/PatientRegisterList.vue
@@ -211,8 +211,9 @@ export default {
rowick(row) {
this.patientRegister.photo = '' //清除照片缓存
this.patientRegister.patientRegisterId = row.id
- this.patientRegister.patientRegisterRd = row
- //console.log('row',row)
+ this.patientRegister.patientRegisterRd = row
+ this.patientRegister.query.customerOrgParentId = row.customerOrgParentId
+ console.log('row',row)
},
//体检次数 相关操作
diff --git a/src/components/patientRegister/customerOrgTreeAll.vue b/src/components/patientRegister/customerOrgTreeAll.vue
index da50443..e486e00 100644
--- a/src/components/patientRegister/customerOrgTreeAll.vue
+++ b/src/components/patientRegister/customerOrgTreeAll.vue
@@ -13,7 +13,7 @@ export default {
},
//
computed:{
- ...mapState(['customerOrg','patientRegister']),
+ ...mapState(['dict','customerOrg','patientRegister']),
},
//创建组件后
created() {},
@@ -32,20 +32,60 @@ export default {
(res) => {
//customerOrgTree = res.data;
console.log('res.data',res.data)
- this.patientRegister.customerOrgTreeAll =res.data
+ this.patientRegister.customerOrgTreeAll = res.data
//tcdate(this.patientRegister.customerOrgTreeAll)
}
- );
-
+ );
+ },
+
+ //获取体检单位父级ID api/app/customer-org/parent/[CustomerOrgld
+ getCustomerOrgParentld(customerOrgld){
+ if(customerOrgld == this.dict.personOrgId){
+ this.patientRegister.query.CustomerOrgParentld = 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.CustomerOrgParentld = res.data
+ }
+ }
+ )
+ },
+
+ //获取单位分组 /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
+ getCustomerOrgGroup(customerOrgld){
+ getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`).then(
+ (res) => {
+ console.log('res.data',res.data)
+ if(res.code == 1){
+ this.patientRegister.customerOrgGroup = res.data
+ }
+ }
+ )
},
//点击树节点
treeclick(data) {
- this.patientRegister.query.times++ //用于触发查询条件
- this.patientRegister.query.customerOrgId = data.id
+
+ this.patientRegister.query.customerOrgId = data.id
+ this.getCustomerOrgParentld(data.id)
+ this.patientRegister.query.times++ //用于触发查询条件
},
},
+
+ //监听事件
+ watch: {
+ //
+ 'patientRegister.query.CustomerOrgParentld'(newVal, oldVal) {
+ console.log('patientRegister.query.CustomerOrgParentld newVal:',newVal,' oldVal:',oldVal)
+ if (newVal != oldVal && newVal !== this.dict.personOrgId) {
+ this.getCustomerOrgGroup(newVal)
+ }
+ },
+ },
};