Browse Source

djseo

master
pengjun 1 year ago
parent
commit
a2b01b1565
  1. 29
      src/components/patientRegister/customerOrgTreeAll.vue

29
src/components/patientRegister/customerOrgTreeAll.vue

@ -6,8 +6,8 @@
<div>
<el-tree
:style="'overflow: scroll;height:' + (window.pageHeight < 600 ? 465 : window.pageHeight - 135) + 'px;width:200px;'"
:data="patientRegister.customerOrgTreeAll" :props="treeprops" node-key="id" @node-contextmenu="nodeContextmenu"
:filter-node-method="filterNode" @node-click="treeclick" highlight-current ref="customerOrgTree">
:data="customerOrgTreeAll" :props="treeprops" node-key="id" @node-contextmenu="nodeContextmenu"
@node-click="treeclick" highlight-current ref="customerOrgTree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<div>
<span class="treeicons">
@ -45,7 +45,8 @@ export default {
patientRegister: {
dispCustomerOrgCode: 'N', // -- customerOrgCode
}
}
},
customerOrgTreeAll:[]
};
},
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
@ -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,10 +169,14 @@ 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)
}
},
},
};
</script>
<style scoped>

Loading…
Cancel
Save