From 81a01ba47642c958b345346cf4e07d841271c9b5 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Wed, 10 Dec 2025 16:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96MapSelector=E3=80=81Personnel?= =?UTF-8?q?Select=E3=80=81HiddenInfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HiddenInfo/gwj/index.js | 21 ++++++++++----------- components/Map/MapSelector.js | 16 +++++++++++++++- components/Select/Personnel/Gwj/index.d.ts | 2 ++ components/Select/Personnel/Gwj/index.js | 5 +++-- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/components/HiddenInfo/gwj/index.js b/components/HiddenInfo/gwj/index.js index 8ba3885..5e03913 100644 --- a/components/HiddenInfo/gwj/index.js +++ b/components/HiddenInfo/gwj/index.js @@ -63,19 +63,18 @@ function HiddenInfo(props) { setHiddenVideoFiles(hiddenVideoFiles); if (info.hiddenRectifyUserCO && info.hiddenRectifyUserCO.length > 0) { - const afterRectificationImageFiles = await getFile({ - eqType: UPLOAD_FILE_TYPE_ENUM["4"], - eqForeignKey: hiddenId || query[hiddenIdKey], - }); - setAfterRectificationImageFiles(afterRectificationImageFiles); - for (let i = 0; i < info.hiddenRectifyUserCO.length; i++) { - if ((info.hiddenRectifyUserCO[i].isRectificationScheme === 1 && info.hiddenRectifyUserCO[i].hiddenSchemeCO && Object.keys(info.hiddenRectifyUserCO[i].hiddenSchemeCO).length > 0)) { + const afterRectificationImageFiles = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM["4"], + eqForeignKey: info.hiddenRectifyUserCO[i].hiddenUserId, + }); + setAfterRectificationImageFiles(prevState => [...prevState, afterRectificationImageFiles]); + if (info.hiddenRectifyUserCO[i].isRectificationScheme === 1 && info.hiddenRectifyUserCO[i].hiddenSchemeCO && Object.keys(info.hiddenRectifyUserCO[i].hiddenSchemeCO).length > 0) { const rectificationPlanImageFiles = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["8"], - eqForeignKey: hiddenId || query[hiddenIdKey], + eqForeignKey: info.hiddenRectifyUserCO[i].hiddenSchemeId, }); - setRectificationPlanImageFiles(prevState => [...prevState, ...rectificationPlanImageFiles]); + setRectificationPlanImageFiles(prevState => [...prevState, rectificationPlanImageFiles]); } } } @@ -86,7 +85,7 @@ function HiddenInfo(props) { eqType: UPLOAD_FILE_TYPE_ENUM["5"], eqForeignKey: hiddenId || query[hiddenIdKey], }); - setAcceptImageFiles(prevState => [...prevState, ...acceptImageFiles]); + setAcceptImageFiles(prevState => [...prevState, acceptImageFiles]); } } @@ -392,7 +391,7 @@ function HiddenInfo(props) { { label: "整改描述", children: item.descr }, { label: "投入资金", children: item.investmentFunds }, { label: "临时安全措施", children: info.tempSafeMeasure }, - { label: "整改后图片", children: }, + { label: "整改后图片", children: }, { label: "整改方案", children: item.isRectificationScheme === 0 ? "无" : "有" }, ...((item.isRectificationScheme === 1 && item.hiddenSchemeCO && Object.keys(item.hiddenSchemeCO).length > 0) ? [ diff --git a/components/Map/MapSelector.js b/components/Map/MapSelector.js index c0f5138..83c0615 100644 --- a/components/Map/MapSelector.js +++ b/components/Map/MapSelector.js @@ -93,6 +93,17 @@ const MapSelector = (props) => { } }; + // 清空 + const handleLocalClear = () => { + setLocalSearch(""); + if (mapInstanceRef.current) { + const local = new window.BMapGL.LocalSearch(mapInstanceRef.current, { + renderOptions: { map: mapInstanceRef.current }, + }); + local.search(""); + } + }; + // 关闭弹窗 const handleClose = () => { setLocalSearch(""); @@ -191,10 +202,13 @@ const MapSelector = (props) => { - + + diff --git a/components/Select/Personnel/Gwj/index.d.ts b/components/Select/Personnel/Gwj/index.d.ts index 9e1bacc..e7b5d93 100644 --- a/components/Select/Personnel/Gwj/index.d.ts +++ b/components/Select/Personnel/Gwj/index.d.ts @@ -27,6 +27,8 @@ export interface PersonnelSelectProps extends Omit { getData(); - }, [JSON.stringify(params), isNeedCorpInfoId, isNeedDepartmentId, isNeedPostId]); + }, [JSON.stringify(params), isNeedCorpInfoId, isNeedDepartmentId, isNeedPostId, noMain]); return (