From 6d258f2567f4507028b1c959d97b3129760def12 Mon Sep 17 00:00:00 2001 From: Befend <18814382464@163.com> Date: Sat, 15 Mar 2025 20:38:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Main/Dike/components/BaseInfo.vue | 10 +++++----- src/views/Main/Reservoir/components/BaseInfo.vue | 12 ++++++------ src/views/Main/Sluice/components/BaseInfo.vue | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/Main/Dike/components/BaseInfo.vue b/src/views/Main/Dike/components/BaseInfo.vue index 3619285..61e437f 100644 --- a/src/views/Main/Dike/components/BaseInfo.vue +++ b/src/views/Main/Dike/components/BaseInfo.vue @@ -294,12 +294,12 @@ const form: any = ref({}); const emits = defineEmits(["getResInfo"]); function initBaseInfo() { getJbxx(props.resCode).then((res) => { - if (res?.data) { + if (res) { form.value = { ...form.value, - ...res.data, + ...res, }; - emits("getResInfo", res.data); + emits("getResInfo", res); } }); } @@ -311,8 +311,8 @@ function initRsppInfo() { dikeCode: props.resCode, }, }).then((res) => { - if (res?.data) { - Object.assign(form.value, res.data[0] || {}); + if (res) { + Object.assign(form.value, res[0] || {}); } }); } diff --git a/src/views/Main/Reservoir/components/BaseInfo.vue b/src/views/Main/Reservoir/components/BaseInfo.vue index b594d4e..b730541 100644 --- a/src/views/Main/Reservoir/components/BaseInfo.vue +++ b/src/views/Main/Reservoir/components/BaseInfo.vue @@ -552,20 +552,20 @@ const dutyPersonList: any = ref([]); const emits = defineEmits(["getResInfo"]); function initBaseInfo() { getReservoirBaseDetailData(props.resCode).then((res) => { - if (res?.data) { + if (res) { form.value = { ...form.value, - ...res.data, + ...res, }; - emits("getResInfo", res.data); + emits("getResInfo", res); } }); } function initRsppInfo() { getReservoirRsppDetailData(props.resCode).then((res) => { - if (res?.data) { - Object.keys(res.data).forEach((key) => { - form.value[key] = res.data[key]; + if (res) { + Object.keys(res).forEach((key) => { + form.value[key] = res[key]; }); } }); diff --git a/src/views/Main/Sluice/components/BaseInfo.vue b/src/views/Main/Sluice/components/BaseInfo.vue index b43a539..ed26e93 100644 --- a/src/views/Main/Sluice/components/BaseInfo.vue +++ b/src/views/Main/Sluice/components/BaseInfo.vue @@ -203,12 +203,12 @@ const form: any = ref({}); const emits = defineEmits(["getResInfo"]); function initBaseInfo() { getJbxx(props.resCode).then((res) => { - if (res?.data) { + if (res) { form.value = { ...form.value, - ...res.data, + ...res, }; - emits("getResInfo", res.data); + emits("getResInfo", res); } }); }