diff --git a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue index 6095a2b..7dc8897 100644 --- a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue +++ b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue @@ -224,14 +224,15 @@ export default { } }, onSelectBlur(val) { - if (val.key == 'sywzmc' && !val.type != 'cancel') { + if (val.key == 'sywzmc' && ((!this.formData.sywzmc||this.formData.sywzmc=='') || val.type == 'save')) { this.filterGyjl(val, true) } - if (val.key == 'gyjl' && !val.type != 'cancel') { + if (val.key == 'gyjl' && ((!this.formData.gyjl||this.formData.gyjl=='') || val.type == 'save')) { this.filterGynd(val, true) } }, filterGyjl(val, reset) { + let that = this let tmp = [] _.forEach(_.filter(this.gyjlOptionsOld, function (o) { if (o.remark && o.remark != '') { @@ -248,10 +249,12 @@ export default { this.gyjlOptions = tmp if (reset) { this.gyndOptions = [] - this.$refs.baseInfoRef.batchUpdateFormData({ - gyjl: ' ', - xynd: ' ', - }); + setTimeout(() => { + that.$refs.baseInfoRef.batchUpdateFormData({ + gyjl: '', + xynd: '', + }); + }, 10) } }, filterGynd(val, reset) { @@ -270,9 +273,11 @@ export default { }) this.gyndOptions = tmp if (reset) { - this.$refs.baseInfoRef.batchUpdateFormData({ - xynd: ' ', - }); + setTimeout(() => { + that.$refs.baseInfoRef.batchUpdateFormData({ + xynd: '', + }); + }, 10) } }, //获取给药剂量