From 7ea41a4d58c8a5627f4628ab81d8ad76555e05a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Tue, 8 Oct 2024 13:39:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B9=B4=E4=BA=BA=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/resiSearch.vue | 48 +++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 2036f0277..91d691f93 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -34,7 +34,7 @@ !newVal.includes(val)); + console.log(cancelledValues, "cancelledValues"); + cancelledValues.forEach(val => { + if (['FLOATING_FLAG', 'OLD_PEOPLE_FLAG','OLD_PEOPLE_FLAG', 'LIVE_ALONE_FLAG', 'DEMENTED_FLAG', 'EMPTY_NESTER_FLAG', + 'DISABLED_FLAG', 'SUBSISTENCE_ALLOWANCE_FLAG', 'ENSURE_HOUSE_FLAG', 'VETERAN_FLAG', 'FERTILE_WOMAN_FLAG', + 'SPECIAL_SUPPORT_FLAG', 'NEW_STRATUM_FLAG','NEG_FLAG', 'LBC_FLAG', 'AIDS_FLAG'].includes(val)) { + // formCopy.attentionCrowds = formCopy.attentionCrowds.filter(item => item !== val); + this.categoryAll + } + }) + + + // this.form.attentionCrowds.filter(item => item === val) + // this.handleCategoryChange(newVal, oldVal) + // 这里可以添加你想要在 attentionCrowds 变化时执行的代码 + }, + deep: true, // 如果需要深度监听对象或数组,必须添加 deep: true + }, form: { handler(val, val2) { + console.log(val, val2, "F"); for (let n in val) { if (this.constForm[n] !== val[n]) { this.handleChangeForm(n) @@ -912,11 +934,18 @@ export default { }, categoryAll: { handler(val, val2) { - console.log(val,val2,"dslkkldjsf"); - this.handleCategoryChange(val, val2) + console.log(val,val2,"F"); + this.handleCategoryChange(val, val2) }, deep: true }, + // form.attentionCrowds: { + // handler(val, val2) { + // console.log(val,val2,"F"); + // this.handleCategoryChange(val, val2) + // }, + // deep: true + // }, }, directives: { "el-select-loadmore": { @@ -963,6 +992,14 @@ export default { }) }, methods: { + handleChange(val){ + console.log(this.form.attentionCrowds,"dskljldsks"); + + console.log(val,"dslkjflkdsklfjdskl"); + + + }, + handleCategoryChange(newVal, oldVal) { console.log(newVal, oldVal,"slkdfjlfj"); let formCopy = JSON.parse(JSON.stringify(this.form)); @@ -1012,6 +1049,8 @@ export default { // 更新表单数据 this.form = formCopy; + console.log(this.form,"dl;sfjlfjs"); + }, handelWatchStartDate(val) { @@ -1130,7 +1169,10 @@ export default { }, // 监听基础form handleChangeForm(val) { + console.log(val,"skldjfklsjf"); for (let n in this.fixedForm) { + console.log("324234"); + if (n === val) { if (this.fixedList.length > 0) { let _item = {}