From 0b690d010c935c471151d0e942a0615419a74a17 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 21 Jul 2026 11:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E9=98=B2=E7=AE=A1=E6=8E=A7=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/biMark/index.js | 24 ++++++++++++ .../BottomUtils/branchOfficeUtilsList.js | 12 ++++++ .../Map/components/BottomUtils/index.js | 39 +++++++++++++++---- .../components/BottomUtils/portUtilsList.js | 12 ++++++ .../Container/Map/components/Header/index.js | 2 +- .../Map/components/RightUtils/index.js | 2 +- src/pages/Container/Map/js/mapMethods.js | 15 ++++--- src/pages/Container/Map/js/pointClickEvent.js | 4 +- 8 files changed, 92 insertions(+), 18 deletions(-) diff --git a/src/api/biMark/index.js b/src/api/biMark/index.js index 0da703d..96ec99f 100644 --- a/src/api/biMark/index.js +++ b/src/api/biMark/index.js @@ -4,3 +4,27 @@ export const getCorpInfoListAll = declareRequest( "biFullLoading", "Post > @/basicInfo/corpInfo/corpListAll", ); +export const getFirePointDeviceList = declareRequest( + "biFullLoading", + "Post > @/fireCheck/firePoint/deviceList", +); +export const getSensorDeviceScreenList = declareRequest( + "biFullLoading", + "Post > @/iotalarm/sensorDevice/screenList", +); +export const getControlRoomScreenList = declareRequest( + "biFullLoading", + "Post > @/fireResource/controlRoom/screenList", +); +export const getRescueTeamScreenList = declareRequest( + "biFullLoading", + "Post > @/fireResource/rescueTeam/screenList", +); +export const getWaterSourceScreenList = declareRequest( + "biFullLoading", + "Post > @/fireResource/waterSource/screenList", +); +export const getPumpRoomScreenList = declareRequest( + "biFullLoading", + "Post > @/fireResource/pumpRoom/screenList", +); diff --git a/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js b/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js index 8503577..214ee4d 100644 --- a/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js +++ b/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js @@ -131,36 +131,48 @@ export const branchOfficeUtilsList = [ check: false, markIcon: pointIco4, type: "xfjyd01", + request: "getRescueTeamScreenList", + titleKey: "teamName", }, { label: "消防控制室", check: false, type: "xfkzs01", markIcon: pointIco5, + request: "getControlRoomScreenList", + titleKey: "roomName", }, { label: "消防泵房", check: false, type: "xfbf01", markIcon: pointIco6, + request: "getPumpRoomScreenList", + titleKey: "pumpRoomName", }, { label: "消防水源", check: false, type: "xfsy01", markIcon: pointIco7, + request: "getWaterSourceScreenList", + titleKey: "waterSourceName", }, { label: "消防点位", check: false, type: "point", markIcon: pointIco8, + request: "getFirePointDeviceList", + titleKey: "firePointName", }, { label: "报警设备", check: false, type: "alarm", markIcon: pointIco32, + request: "getSensorDeviceScreenList", + titleKey: "sensorName", }, ], }, diff --git a/src/pages/Container/Map/components/BottomUtils/index.js b/src/pages/Container/Map/components/BottomUtils/index.js index 784b05a..fac5d2b 100644 --- a/src/pages/Container/Map/components/BottomUtils/index.js +++ b/src/pages/Container/Map/components/BottomUtils/index.js @@ -1,3 +1,4 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { produce } from "immer"; import { AnimatePresence, motion } from "motion/react"; import { useContext, useEffect, useState } from "react"; @@ -5,6 +6,7 @@ import bg7 from "~/assets/images/map_bi/bottom_utils/bg7.png"; import bg8 from "~/assets/images/map_bi/bottom_utils/bg8.png"; import titleImg from "~/assets/images/map_bi/bottom_utils/title.png"; import titleOnImg from "~/assets/images/map_bi/bottom_utils/title_on.png"; +import { NS_BI_MARK } from "~/enumerate/namespace"; import { branchOfficeUtilsList } from "~/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList"; import { Context } from "~/pages/Container/Map/js/context"; import { portUtilsList } from "./portUtilsList"; @@ -17,7 +19,7 @@ const bottomUtilsAnimation = { exit: { y: 100, opacity: 0, transition: { duration: 0.3, ease: "easeIn" } }, }; -// 分公司子项按顺序进入、反向退出,保留原来的波浪式效果。 +// 分公司子项按顺序进入、反向退出,波浪式效果。 const branchOfficeContainerAnimation = { hidden: { y: 200, @@ -36,14 +38,16 @@ const branchOfficeItemAnimation = { visible: { y: 0, opacity: 1, transition: { duration: 0.3, ease: "easeOut" } }, }; -function BottomUtils() { +function BottomUtils(props) { const { + mapMethods, currentPort, pureMap, currentBranchOffice, bottomUtilsCurrentIndex, bottomUtilsResetVersion, actions, + portArea, } = useContext(Context); const bottomUtilsMode = !pureMap && currentPort && !currentBranchOffice @@ -91,7 +95,6 @@ function BottomUtils() { setListMode(bottomUtilsMode); }, [bottomUtilsMode]); - // reducer 递增版本号时重置本组件维护的子项勾选状态,不再依赖全局事件订阅。 useEffect(() => { resetAllCheck(); }, [bottomUtilsResetVersion]); @@ -100,10 +103,24 @@ function BottomUtils() { actions.setBottomUtilsIndex(bottomUtilsCurrentIndex === index ? -1 : index); }; - const optionsItemsClick = (index, index1, item, item1) => { - // 子选项点击处理 + const optionsItemsClick = async (index, index1, item, item1) => { + const check = !list[index].list[index1].check; + if (check) { + if (item1.request) { + const { data } = await props[item1.request]({ portArea, corpinfoId: currentBranchOffice }); + mapMethods.current.addMarkPoint(data, { + markType: item1.type, + markIcon: item1.markIcon, + subLabel: item1.label, + titleKey: item1.titleKey, + }); + } + } + else { + mapMethods.current.removeMarkPoint(item1.type); + } setList(produce((draft) => { - draft[index].list[index1].check = !draft[index].list[index1].check; + draft[index].list[index1].check = check; })); }; @@ -177,7 +194,13 @@ function BottomUtils() {