@@ -45,7 +45,8 @@ export default {
patientRegister: {
dispCustomerOrgCode: 'N', // 人员登记列表--单位树是否显示 customerOrgCode
}
- }
+ },
+ customerOrgTreeAll:[]
};
},
//
@@ -77,6 +78,7 @@ export default {
// 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)
}
});
@@ -144,13 +146,16 @@ export default {
//树过滤
filterNode(value, data) {
- //console.log(value,data)
- if (!value) return true;
- return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1
- || data['shortName'].indexOf(value.toUpperCase()) > -1 || data['customerOrgCode'].indexOf(value.toUpperCase()) > -1
- ;
+ // console.log(value, data)
+ // if (!value) return true;
+ // return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1 || data['shortName'].indexOf(value) > -1 || data['customerOrgCode'].indexOf(value) > -1;
+ this.customerOrgTreeAll = this.patientRegister.customerOrgTreeAll.filter(e => {
+ return e.label.indexOf(value) > -1 || e.simpleCode.indexOf(value.toUpperCase()) > -1 || e.shortName.indexOf(value) > -1
+ })
+
},
+
//点击树节点
treeclick(data) {
// console.log('data',data)
@@ -164,9 +169,13 @@ export default {
},
},
watch: {
- "filterText"(newVal, oldVal) {
- this.$refs['customerOrgTree'].filter(newVal);
- }
+ "filterText": {
+ // immediate: true,
+ handler(newVal, oldVal) {
+ // console.log(`watch 人员登记 newVal:${newVal} oldVal:${oldVal} registerCheckId: ${this.dataTransOpts.tableS.patient_register.id}`);
+ if (newVal != oldVal) this.filterNode(newVal)
+ }
+ },
},
};