From 54e216e3879d8c7cd45b8fbe5e66f23cc2708221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=AE=8F=E6=9D=B0?= <1943105267@qq.com> Date: Wed, 28 Aug 2024 16:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=88=97=E8=A1=A8=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/xiaoqu/bottomList.vue | 44 ++++++++++++++++------ 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/src/views/components/xiaoqu/bottomList.vue b/src/views/components/xiaoqu/bottomList.vue index 12b0ede..f5d9e73 100644 --- a/src/views/components/xiaoqu/bottomList.vue +++ b/src/views/components/xiaoqu/bottomList.vue @@ -107,21 +107,43 @@ export default { }, components: { introduceTitle, ColorCell }, watch: { - queryParamsXiaoqu: { - handler(newValue, oldValue) { - console.log(newValue); - this.reset(); - this.queryParams = { ...this.queryParams, ...newValue }; - this.disabled = false; - this.load(); - }, - deep: true, // Deeply watch all nested properties - immediate: true, + "queryParamsXiaoqu.color"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.isd"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.isj"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.isk"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.isx"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.parentid"(newValue, oldValue) { + this.handleChange(); + }, + "queryParamsXiaoqu.type"(newValue, oldValue) { + this.handleChange(); }, }, + created() { + this.handleChange(); + }, methods: { + handleChange(newValue) { + this.reset(); + delete this.queryParamsXiaoqu.buildingid; + delete this.queryParamsXiaoqu.deptId; + this.queryParams = { ...this.queryParams, ...this.queryParamsXiaoqu }; + this.disabled = false; + this.load(); + }, reset() { - (this.disabled = true), (this.total = 0); + this.disabled = true; + this.total = 0; this.list = []; this.queryParams = { pageNum: 1,