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));
};
// 格式化多边形