From aafe5027aee2465713ab44a7f660727ff9c17913 Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 23 Jan 2026 20:36:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=EF=BC=9A[=E9=BA=BB=E7=B2=BE=E8=8D=AF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95]=E7=94=B3=E8=AF=B7=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/gsp/MJYLQSQD.vue | 76 +++++++++++++++------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue index a434388..6095a2b 100644 --- a/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue +++ b/src/views/business/comps/template/comps/gsp/MJYLQSQD.vue @@ -96,7 +96,7 @@ export default { SD: { label: "template.gsp.MJYLQSQD.sd", type: "input", - disabled:true, + disabled: true, fillType: "actFill", }, sywzmc: { @@ -215,31 +215,63 @@ export default { mounted() { }, methods: { - onSelectBlur(val) { + init(val) { if (val.key == 'sywzmc') { - let tmp = [] - _.forEach(_.filter(this.gyjlOptionsOld, function (o) { - return o.remark.indexOf(val.value) > -1; - }), function (item) { - tmp.push({ label: item.dictLabel, value: item.dictValue }) - }) - this.gyjlOptions = tmp + this.filterGyjl(val, false) + } + if (val.key == 'gyjl') { + this.filterGynd(val, false) + } + }, + onSelectBlur(val) { + if (val.key == 'sywzmc' && !val.type != 'cancel') { + this.filterGyjl(val, true) + } + if (val.key == 'gyjl' && !val.type != 'cancel') { + this.filterGynd(val, true) + } + }, + filterGyjl(val, reset) { + let tmp = [] + _.forEach(_.filter(this.gyjlOptionsOld, function (o) { + if (o.remark && o.remark != '') { + let _index = _.findIndex(o.remark.split(','), function (r) { + return r == val.value; + }) + return _index > -1 ? true : false; + } else { + return false; + } + }), function (item) { + tmp.push({ label: item.dictLabel, value: item.dictValue }) + }) + this.gyjlOptions = tmp + if (reset) { this.gyndOptions = [] this.$refs.baseInfoRef.batchUpdateFormData({ - gyjl: '', - xynd: '', + gyjl: ' ', + xynd: ' ', }); } - if (val.key == 'gyjl') { - let tmp = [] - _.forEach(_.filter(this.gyndOptionsOld, function (o) { - return o.remark.indexOf(val.value) > -1; - }), function (item) { - tmp.push({ label: item.dictLabel, value: item.dictValue }) - }) - this.gyndOptions = tmp + }, + filterGynd(val, reset) { + let tmp = [] + _.forEach(_.filter(this.gyndOptionsOld, function (o) { + if (o.remark && o.remark != '') { + let _index = _.findIndex(o.remark.split(','), function (r) { + return r == val.value; + }) + return _index > -1 ? true : false; + } else { + return false; + } + }), function (item) { + tmp.push({ label: item.dictLabel, value: item.dictValue }) + }) + this.gyndOptions = tmp + if (reset) { this.$refs.baseInfoRef.batchUpdateFormData({ - xynd: '', + xynd: ' ', }); } }, @@ -253,7 +285,7 @@ export default { }).then(response => { this.gyjlOptionsOld = response.rows if (this.formData.sywzmc && this.formData.sywzmc !== '') { - this.onSelectBlur({ key: 'sywzmc', value: this.formData.sywzmc }) + this.init({ key: 'sywzmc', value: this.formData.sywzmc }) } }) }, @@ -267,7 +299,7 @@ export default { }).then(response => { this.gyndOptionsOld = response.rows if (this.formData.gyjl && this.formData.gyjl !== '') { - this.onSelectBlur({ key: 'gyjl', value: this.formData.gyjl }) + this.init({ key: 'gyjl', value: this.formData.gyjl }) } }) }, From c19b40ec26c8aa387e292431bb8af8bb9c298bdc Mon Sep 17 00:00:00 2001 From: "15881625488@163.com" <15881625488@163.com> Date: Fri, 23 Jan 2026 20:50:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9A[=E9=BA=BB=E7=B2=BE=E8=8D=AF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95]=E7=94=B3=E8=AF=B7=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/gsp/MJYLQSQD.vue | 23 +++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) 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) } }, //获取给药剂量