From e84b4191a6ace7a8867d7b3861a56e4abaff8998 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 21 Jul 2026 16:48:02 +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=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/biMarkInfo/index.js | 26 ++++++ src/enumerate/namespace/index.js | 1 + .../BottomUtils/branchOfficeUtilsList.js | 12 +-- .../components/BottomUtils/portUtilsList.js | 12 +-- .../Content/branchOffice/Camera/index.js | 2 +- .../Content/branchOffice/Camera/index.less | 2 - .../Content/modal/AlarmEquipment/index.js | 57 ++++++++++++ .../Content/modal/FireControlRoom/index.js | 89 ++++++++++++++++++ .../Content/modal/FirePointLocation/index.js | 41 +++++++++ .../Content/modal/FirePumpRoom/index.js | 79 ++++++++++++++++ .../Content/modal/FireRescueTeam/index.js | 52 +++++++++++ .../Content/modal/FireWaterSource/index.js | 58 ++++++++++++ .../Map/components/Content/modal/index.js | 32 +++++-- src/pages/Container/Map/index.js | 4 +- src/pages/Container/Map/index.less | 92 ++++++++++++++++--- src/pages/Container/Map/js/mapMethods.js | 4 +- src/pages/Container/Map/js/utils.js | 8 +- 17 files changed, 528 insertions(+), 43 deletions(-) create mode 100644 src/api/biMarkInfo/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/AlarmEquipment/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/FireControlRoom/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/FirePointLocation/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/FirePumpRoom/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/FireRescueTeam/index.js create mode 100644 src/pages/Container/Map/components/Content/modal/FireWaterSource/index.js diff --git a/src/api/biMarkInfo/index.js b/src/api/biMarkInfo/index.js new file mode 100644 index 0000000..313024e --- /dev/null +++ b/src/api/biMarkInfo/index.js @@ -0,0 +1,26 @@ +import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; + +export const fireRescueTeamInfo = declareRequest( + "biFullLoading", + `Get > /fireResource/rescueTeam/{id}`, +); +export const fireControlRoomInfo = declareRequest( + "biFullLoading", + `Get > /fireResource/controlRoom/{id}`, +); +export const firePumpRoomInfo = declareRequest( + "biFullLoading", + `Get > /fireResource/pumpRoom/{id}`, +); +export const fireWaterSourceInfo = declareRequest( + "biFullLoading", + `Get > /fireResource/waterSource/{id}`, +); +export const firePointInfo = declareRequest( + "biFullLoading", + `Get > /fireCheck/firePoint/getInfoById/{id}`, +); +export const sensorDeviceInfo = declareRequest( + "biFullLoading", + `Get > /iotalarm/sensorDevice/{id}`, +); diff --git a/src/enumerate/namespace/index.js b/src/enumerate/namespace/index.js index f305d6e..a309dde 100644 --- a/src/enumerate/namespace/index.js +++ b/src/enumerate/namespace/index.js @@ -8,3 +8,4 @@ export const NS_GLOBAL = defineNamespace("global"); export const NS_BI_STATISTICS = defineNamespace("biStatistics"); export const NS_BI_MARK = defineNamespace("biMark"); +export const NS_BI_MARK_INFO = defineNamespace("biMarkInfo"); diff --git a/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js b/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js index 214ee4d..92e8fa6 100644 --- a/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js +++ b/src/pages/Container/Map/components/BottomUtils/branchOfficeUtilsList.js @@ -130,14 +130,14 @@ export const branchOfficeUtilsList = [ label: "消防救援队", check: false, markIcon: pointIco4, - type: "xfjyd01", + type: "fireRescueTeam", request: "getRescueTeamScreenList", titleKey: "teamName", }, { label: "消防控制室", check: false, - type: "xfkzs01", + type: "fireControlRoom", markIcon: pointIco5, request: "getControlRoomScreenList", titleKey: "roomName", @@ -145,7 +145,7 @@ export const branchOfficeUtilsList = [ { label: "消防泵房", check: false, - type: "xfbf01", + type: "firePumpRoom", markIcon: pointIco6, request: "getPumpRoomScreenList", titleKey: "pumpRoomName", @@ -153,7 +153,7 @@ export const branchOfficeUtilsList = [ { label: "消防水源", check: false, - type: "xfsy01", + type: "fireWaterSource", markIcon: pointIco7, request: "getWaterSourceScreenList", titleKey: "waterSourceName", @@ -161,7 +161,7 @@ export const branchOfficeUtilsList = [ { label: "消防点位", check: false, - type: "point", + type: "firePointLocation", markIcon: pointIco8, request: "getFirePointDeviceList", titleKey: "firePointName", @@ -169,7 +169,7 @@ export const branchOfficeUtilsList = [ { label: "报警设备", check: false, - type: "alarm", + type: "alarmEquipment", markIcon: pointIco32, request: "getSensorDeviceScreenList", titleKey: "sensorName", diff --git a/src/pages/Container/Map/components/BottomUtils/portUtilsList.js b/src/pages/Container/Map/components/BottomUtils/portUtilsList.js index c964d11..ba828de 100644 --- a/src/pages/Container/Map/components/BottomUtils/portUtilsList.js +++ b/src/pages/Container/Map/components/BottomUtils/portUtilsList.js @@ -152,14 +152,14 @@ export const portUtilsList = [ img: ico4, checkImg: ico4On, markIcon: pointIco4, - type: "xfjyd01", + type: "fireRescueTeam", request: "getRescueTeamScreenList", titleKey: "teamName", }, { label: "消防控制室", check: false, - type: "xfkzs01", + type: "fireControlRoom", img: ico5, checkImg: ico5On, markIcon: pointIco5, @@ -169,7 +169,7 @@ export const portUtilsList = [ { label: "消防泵房", check: false, - type: "xfbf01", + type: "firePumpRoom", img: ico6, checkImg: ico6On, markIcon: pointIco6, @@ -179,7 +179,7 @@ export const portUtilsList = [ { label: "消防水源", check: false, - type: "xfsy01", + type: "fireWaterSource", img: ico7, checkImg: ico7On, markIcon: pointIco7, @@ -189,7 +189,7 @@ export const portUtilsList = [ { label: "消防点位", check: false, - type: "point", + type: "firePointLocation", img: ico8, checkImg: ico8On, markIcon: pointIco8, @@ -199,7 +199,7 @@ export const portUtilsList = [ { label: "报警设备", check: false, - type: "alarm", + type: "alarmEquipment", img: ico28, checkImg: ico28On, markIcon: pointIco32, diff --git a/src/pages/Container/Map/components/Content/branchOffice/Camera/index.js b/src/pages/Container/Map/components/Content/branchOffice/Camera/index.js index b8efd8c..a309f41 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/Camera/index.js +++ b/src/pages/Container/Map/components/Content/branchOffice/Camera/index.js @@ -54,7 +54,7 @@ function Camera() { width={1500} onCancel={setFalse} title="视频巡屏" - wrapClassName="map_content_branch_office_camera_modal map_bi_model" + classNames={{ wrapper: "map_content_branch_office_camera_modal map_bi_model" }} >
diff --git a/src/pages/Container/Map/components/Content/branchOffice/Camera/index.less b/src/pages/Container/Map/components/Content/branchOffice/Camera/index.less index 7586479..b0ee3b7 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/Camera/index.less +++ b/src/pages/Container/Map/components/Content/branchOffice/Camera/index.less @@ -1,7 +1,5 @@ .map_content_branch_office_camera_modal { .container { - padding: 27px 14px; - .parent_tabs { display: flex; align-items: center; diff --git a/src/pages/Container/Map/components/Content/modal/AlarmEquipment/index.js b/src/pages/Container/Map/components/Content/modal/AlarmEquipment/index.js new file mode 100644 index 0000000..d32c01f --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/AlarmEquipment/index.js @@ -0,0 +1,57 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions } from "antd"; +import { useEffect, useState } from "react"; +import { getLabelName } from "zy-react-library/utils"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const SENSOR_ATTR_OPTIONS = [ + { bianma: "NUMBER", name: "数值类" }, + { bianma: "SWITCH", name: "开关类" }, +]; + +const YES_NO_OPTIONS = [ + { bianma: 1, name: "是" }, + { bianma: 0, name: "否" }, +]; + +const SENSOR_STATUS_OPTIONS = [ + { bianma: "NORMAL", name: "正常" }, + { bianma: "FAULT", name: "故障" }, + { bianma: "OFFLINE", name: "离线" }, + { bianma: "deactivate", name: "停用" }, +]; + +const FireRescueTeam = (props) => { + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.sensorDeviceInfo({ id: props.id }); + + setInfo(data); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ +
+ ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/FireControlRoom/index.js b/src/pages/Container/Map/components/Content/modal/FireControlRoom/index.js new file mode 100644 index 0000000..9bc46dc --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/FireControlRoom/index.js @@ -0,0 +1,89 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions, Divider } from "antd"; +import { useEffect, useState } from "react"; +import PreviewImg from "zy-react-library/components/PreviewImg"; +import Table from "zy-react-library/components/Table"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useDictionary from "zy-react-library/hooks/useDictionary"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import { getLabelName } from "zy-react-library/utils"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const FireRescueTeam = (props) => { + const { getDictionary } = useDictionary(); + const { getFile } = useGetFile(); + + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.fireControlRoomInfo({ id: props.id }); + const dictionaryData = await getDictionary({ dictValue: "fire_resource_contro_root_type" }); + const files = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM[302], + eqForeignKey: data.roomId, + }); + setInfo({ + ...data, + roomImages: files, + roomStatusName: getLabelName({ + list: dictionaryData, + status: data.roomStatus, + idKey: "dictValue", + nameKey: "dictLabel", + }), + }); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ 基本信息 + 0 && (), + }, + ]} + /> + 设备信息 + + 人员信息 +
+ + ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/FirePointLocation/index.js b/src/pages/Container/Map/components/Content/modal/FirePointLocation/index.js new file mode 100644 index 0000000..027ce89 --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/FirePointLocation/index.js @@ -0,0 +1,41 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions } from "antd"; +import { useEffect, useState } from "react"; +import PreviewImg from "zy-react-library/components/PreviewImg"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const FireRescueTeam = (props) => { + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.firePointInfo({ id: props.id }); + + setInfo(data); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ ) }, + ]} + /> +
+ ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/FirePumpRoom/index.js b/src/pages/Container/Map/components/Content/modal/FirePumpRoom/index.js new file mode 100644 index 0000000..8d97a87 --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/FirePumpRoom/index.js @@ -0,0 +1,79 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions, Divider } from "antd"; +import { useEffect, useState } from "react"; +import PreviewImg from "zy-react-library/components/PreviewImg"; +import Table from "zy-react-library/components/Table"; +import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; +import useDictionary from "zy-react-library/hooks/useDictionary"; +import useGetFile from "zy-react-library/hooks/useGetFile"; +import { getLabelName } from "zy-react-library/utils"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const FireRescueTeam = (props) => { + const { getDictionary } = useDictionary(); + const { getFile } = useGetFile(); + + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.firePumpRoomInfo({ id: props.id }); + const dictionaryData = await getDictionary({ dictValue: "fire_resource_contro_root_type" }); + const files = await getFile({ + eqType: UPLOAD_FILE_TYPE_ENUM[302], + eqForeignKey: data.pumpRoomId, + }); + setInfo({ + ...data, + roomImages: files, + pumpStatusName: getLabelName({ + list: dictionaryData, + status: data.pumpRoomStatus, + idKey: "dictValue", + nameKey: "dictLabel", + }), + }); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ 基本信息 + 0 && , + }, + ]} + /> + 设备信息 +
+ + ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/FireRescueTeam/index.js b/src/pages/Container/Map/components/Content/modal/FireRescueTeam/index.js new file mode 100644 index 0000000..617f465 --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/FireRescueTeam/index.js @@ -0,0 +1,52 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions, Divider } from "antd"; +import { useEffect, useState } from "react"; +import Table from "zy-react-library/components/Table"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const FireRescueTeam = (props) => { + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.fireRescueTeamInfo({ id: props.id }); + setInfo(data); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ 基本信息 + + 队员信息 +
+ + ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/FireWaterSource/index.js b/src/pages/Container/Map/components/Content/modal/FireWaterSource/index.js new file mode 100644 index 0000000..da52f7d --- /dev/null +++ b/src/pages/Container/Map/components/Content/modal/FireWaterSource/index.js @@ -0,0 +1,58 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; +import { Descriptions, Divider } from "antd"; +import { useEffect, useState } from "react"; +import useDictionary from "zy-react-library/hooks/useDictionary"; +import { getLabelName } from "zy-react-library/utils"; +import { NS_BI_MARK_INFO } from "~/enumerate/namespace"; + +const FireRescueTeam = (props) => { + const { getDictionary } = useDictionary(); + + const [info, setInfo] = useState({}); + + const getData = async () => { + const { data } = await props.fireWaterSourceInfo({ id: props.id }); + const dictionaryData = await getDictionary({ dictValue: "fire_resource_water_type" }); + + setInfo({ + ...data, + waterSourceStatusName: getLabelName({ + list: dictionaryData, + status: data.waterSourceStatus, + idKey: "dictValue", + nameKey: "dictLabel", + }), + }); + }; + + useEffect(() => { + getData(); + }, []); + + return ( +
+ 基本信息 + +
+ ); +}; + +export default Connect([NS_BI_MARK_INFO], true)(FireRescueTeam); diff --git a/src/pages/Container/Map/components/Content/modal/index.js b/src/pages/Container/Map/components/Content/modal/index.js index 6db89cb..e07efa2 100644 --- a/src/pages/Container/Map/components/Content/modal/index.js +++ b/src/pages/Container/Map/components/Content/modal/index.js @@ -1,26 +1,46 @@ -import { Modal } from "antd"; +import { Button, Modal } from "antd"; import { useContext } from "react"; import { Context } from "~/pages/Container/Map/js/context"; +import AlarmEquipment from "./AlarmEquipment"; +import FireControlRoom from "./FireControlRoom"; +import FirePointLocation from "./FirePointLocation"; +import FirePumpRoom from "./FirePumpRoom"; +import FireRescueTeam from "./FireRescueTeam"; +import FireWaterSource from "./FireWaterSource"; import MeteorologicalMonitoring from "./MeteorologicalMonitoring"; const CustomModal = () => { const { modalVisible, modalData, actions } = useContext(Context); + const renderContent = () => { + return { + meteorologicalMonitoring: , // 气象监测 + fireRescueTeam: , // 消防救援队 + fireControlRoom: , // 消防控制室 + firePumpRoom: , // 消防泵房 + fireWaterSource: , // 消防水源 + firePointLocation: , // 消防点位 + alarmEquipment: , // 报警设备 + }[modalData.markType?.replace("标记点_", "")]; + }; + return ( actions.resetMark()}>取消, + ]} width={1500} onCancel={() => { actions.resetMark(); }} title={modalData.title || ""} - wrapClassName="map_bi_model" + classNames={{ root: "map_bi_model" }} > - { - modalData.markType === "meteorologicalMonitoring" && - } +
+ {renderContent()} +
); }; diff --git a/src/pages/Container/Map/index.js b/src/pages/Container/Map/index.js index 92db372..b111a09 100644 --- a/src/pages/Container/Map/index.js +++ b/src/pages/Container/Map/index.js @@ -4,7 +4,7 @@ import { message, Spin } from "antd"; import autoFit from "autofit.js"; import { useEffect, useMemo, useReducer, useRef, useState } from "react"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; -import { NS_BI_MARK } from "~/enumerate/namespace"; +import { NS_BI_MARK, NS_BI_MARK_INFO } from "~/enumerate/namespace"; import BottomUtils from "./components/BottomUtils"; import CenterUtils from "./components/CenterUtils"; import Content from "./components/Content"; @@ -138,4 +138,4 @@ function Map(props) { ); } -export default Connect([NS_BI_MARK], true)(Map); +export default Connect([NS_BI_MARK, NS_BI_MARK_INFO], true)(Map); diff --git a/src/pages/Container/Map/index.less b/src/pages/Container/Map/index.less index f4a7d44..140152f 100644 --- a/src/pages/Container/Map/index.less +++ b/src/pages/Container/Map/index.less @@ -34,24 +34,94 @@ } } -.map_bi_model{ - .@{ant-prefix}-modal { - .@{ant-prefix}-modal-header { - background-color: #06103b; - padding: 16px 20px; +.map_bi_model { + .@{ant-prefix} { + &-modal { - .@{ant-prefix}-modal-title { + &-close { color: #fff; } + + &-header { + background-color: #06103b; + padding: 16px 20px; + } + + &-title { + color: #fff; + } + + &-container { + padding: 0; + background-color: #020828; + } + + &-body { + padding: 20px 24px; + } + + &-footer { + padding: 0 20px 16px 20px; + } } - .@{ant-prefix}-modal-body,.@{ant-prefix}-modal-container { - padding: 0; - background-color: #020828; + &-divider { + &-inner-text { + color: #fff; + } + + &-rail { + background-color: #0c1957; + } } - .@{ant-prefix}-modal-close { - color: #fff; + &-descriptions { + &-item-label { + width: 200px; + color: #fff !important; + border: 1px solid #0c1957 !important; + background-color: #0b1544 !important; + } + + &-item-content { + color: #fff; + border: 1px solid #0c1957 !important; + } + } + + &-table { + background-color: #020828; + + &-container { + border-inline-start: 1px solid #0c1957 !important; + border-top: 1px solid #0c1957 !important; + } + + &-thead { + th { + background-color: #0b1544 !important; + color: #fff !important; + border-inline-end: 1px solid #0c1957 !important; + border-bottom: 1px solid #0c1957 !important; + } + } + + &-tbody { + td { + background-color: #020828 !important; + color: #fff !important; + border-inline-end: 1px solid #0c1957 !important; + border-bottom: 1px solid #0c1957 !important; + + span { + color: #fff !important; + } + } + } + } + + &-empty-description { + color: #fff !important; } } } diff --git a/src/pages/Container/Map/js/mapMethods.js b/src/pages/Container/Map/js/mapMethods.js index d4fd401..6631d54 100644 --- a/src/pages/Container/Map/js/mapMethods.js +++ b/src/pages/Container/Map/js/mapMethods.js @@ -354,8 +354,6 @@ export default function useMapMethods(viewerRef, request) { throw new Error("请传入markType(扎点类型)"); if (!options.markIcon) throw new Error("请传入markIcon(扎点图标)"); - if (!options.titleKey) - throw new Error("请传入titleKey(标题键)"); mitt.emit(changeCoverMaskVisibleMittKey, true); await chunkedLoad(filterNull(pointList), 10, async (item) => { const entityCollection = createEntityCollection( @@ -366,7 +364,7 @@ export default function useMapMethods(viewerRef, request) { new Cesium.Entity({ id: createId(), name, - position: getPosition(item.longitude, item.latitude), + position: getPosition(item.longitude || item.lng, item.latitude || item.lat), billboard: await getBillboard({ image: options.markIcon, name }), monitorItems: { data: { ...item, markType: `标记点_${options.markType}`, title: options.subLabel }, diff --git a/src/pages/Container/Map/js/utils.js b/src/pages/Container/Map/js/utils.js index 2f01db3..0d10164 100644 --- a/src/pages/Container/Map/js/utils.js +++ b/src/pages/Container/Map/js/utils.js @@ -1,10 +1,6 @@ // 过滤掉无经纬度的数据 -export const filterNull = ( - arr = [], - longitudeKey = "longitude", - latitudeKey = "latitude", -) => { - return arr.filter(item => item[longitudeKey] && item[latitudeKey]); +export const filterNull = (arr = []) => { + return arr.filter(item => (item.longitude || item.lng) && (item.latitude || item.lat)); }; // 格式化多边形