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); } }); }