From bf11b180f35f20067a975da9ccaa82752ae01c3e Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Thu, 23 Jul 2026 11:41:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(map):=20dataZoom=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=A4=A7=E5=B0=8F=E3=80=81=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E3=80=81branchOffice=20=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/biStatistics/index.js | 4 + .../LeftPanel/RectificationPanel/index.js | 2 +- .../IndexInfo/LeftPanel/WeatherPanel/index.js | 5 +- .../IndexInfo/RightPanel/AlarmPanel/index.js | 5 +- .../RightPanel/PartnerPanel/index.js | 5 +- .../Content/branchOffice/FengBi/echarts.js | 9 ++ .../Content/branchOffice/IndexLeft/echarts.js | 9 ++ .../branchOffice/IndexRight/echarts.js | 9 ++ .../Content/branchOffice/IndexRight/index.js | 134 +++++++++++------- .../Content/branchOffice/MenJin/echarts.js | 9 ++ .../Content/branchOffice/RenYuan/echarts.js | 9 ++ .../XiaoFang/FireAlarmRecordPanel/index.js | 2 + .../XiaoFang/FireDeviceStatusPanel/index.js | 3 +- .../XiaoFang/FirePumpRoomPanel/index.js | 4 +- .../XiaoFang/VolunteerFireTeamPanel/index.js | 116 +++++---------- .../VolunteerFireTeamPanel/index.less | 2 +- .../ZhongDian/ContractProjectPanel/index.js | 2 + .../ZhongDian/MobileMonitoringPanel/index.js | 18 ++- .../port/FengBi/EntryExitTrendPanel/index.js | 9 ++ .../port/Index/PersonnelStatsPanel/index.js | 2 + .../port/MenJin/EntryExitTrendPanel/index.js | 9 ++ .../components/CenterPanel/echarts.js | 18 +++ 22 files changed, 241 insertions(+), 144 deletions(-) diff --git a/src/api/biStatistics/index.js b/src/api/biStatistics/index.js index 45c1fb7..5c53cd8 100644 --- a/src/api/biStatistics/index.js +++ b/src/api/biStatistics/index.js @@ -112,3 +112,7 @@ export const getSensorDeviceFireSituation = declareRequest( "getSensorDeviceFireSituationLoading", "Post > @/iotalarm/sensorDevice/fireSituation", ); +export const getFireBrigadeList = declareRequest( + "getFireBrigadeListLoading", + "Post > @/fireAlarm/fireBrigade/list", +); diff --git a/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/RectificationPanel/index.js b/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/RectificationPanel/index.js index 02c3770..294f47e 100644 --- a/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/RectificationPanel/index.js +++ b/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/RectificationPanel/index.js @@ -15,7 +15,7 @@ function RectificationPanel(props) { const loadList = async () => { const { data = [] } = await props.getHiddenStatisticsByCorp({ pageIndex: 1, - pageSize: 999, + pageSize: 9999, }); setList(data); }; diff --git a/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/WeatherPanel/index.js b/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/WeatherPanel/index.js index 3bdb6d6..92af71f 100644 --- a/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/WeatherPanel/index.js +++ b/src/pages/Container/Map/components/Content/IndexInfo/LeftPanel/WeatherPanel/index.js @@ -24,7 +24,10 @@ function WeatherPanel(props) { alertTitle: result.alerts?.[0]?.title || "当前暂无气象预警", }); - const { data = [] } = await props.getEventReportListUnfinished(); + const { data = [] } = await props.getEventReportListUnfinished({ + pageIndex: 1, + pageSize: 9999, + }); setEmergencyList(data); }; loadData(); diff --git a/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/AlarmPanel/index.js b/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/AlarmPanel/index.js index 1cda64c..df58f1a 100644 --- a/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/AlarmPanel/index.js +++ b/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/AlarmPanel/index.js @@ -13,7 +13,10 @@ function AlarmPanel(props) { const [list, setList] = useState([]); useEffect(() => { const loadList = async () => { - const { data = [] } = await props.getAlarmRecordScreenIotDeviceAlarmPage(); + const { data = [] } = await props.getAlarmRecordScreenIotDeviceAlarmPage({ + pageIndex: 1, + pageSize: 9999, + }); setList(data); }; diff --git a/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/PartnerPanel/index.js b/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/PartnerPanel/index.js index 32fd149..9bc9105 100644 --- a/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/PartnerPanel/index.js +++ b/src/pages/Container/Map/components/Content/IndexInfo/RightPanel/PartnerPanel/index.js @@ -13,7 +13,10 @@ function PartnerPanel(props) { const [list, setList] = useState([]); useEffect(() => { const loadList = async () => { - const { data = [] } = await props.getXgfStatisticsListCorpStatistics(); + const { data = [] } = await props.getXgfStatisticsListCorpStatistics({ + pageIndex: 1, + pageSize: 9999, + }); setList(data); }; diff --git a/src/pages/Container/Map/components/Content/branchOffice/FengBi/echarts.js b/src/pages/Container/Map/components/Content/branchOffice/FengBi/echarts.js index b0522dd..1d27f68 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/FengBi/echarts.js +++ b/src/pages/Container/Map/components/Content/branchOffice/FengBi/echarts.js @@ -26,6 +26,15 @@ export const initEcharts1 = (mainRef, chartInstance, data) => { itemHeight: 10, }, dataZoom: [ + { + type: "inside", + xAxisIndex: 0, + start: 0, + end: 50, + zoomOnMouseWheel: "shift", + moveOnMouseWheel: true, + moveOnMouseMove: true, + }, { type: "slider", height: 6, diff --git a/src/pages/Container/Map/components/Content/branchOffice/IndexLeft/echarts.js b/src/pages/Container/Map/components/Content/branchOffice/IndexLeft/echarts.js index bd00a88..f8e2b27 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/IndexLeft/echarts.js +++ b/src/pages/Container/Map/components/Content/branchOffice/IndexLeft/echarts.js @@ -24,6 +24,15 @@ export const initEcharts1 = (mainRef, chartInstance, data) => { containLabel: true, }, dataZoom: [ + { + type: "inside", + xAxisIndex: 0, + start: 0, + end: 50, + zoomOnMouseWheel: "shift", + moveOnMouseWheel: true, + moveOnMouseMove: true, + }, { type: "slider", height: 6, diff --git a/src/pages/Container/Map/components/Content/branchOffice/IndexRight/echarts.js b/src/pages/Container/Map/components/Content/branchOffice/IndexRight/echarts.js index 26672d6..7590c50 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/IndexRight/echarts.js +++ b/src/pages/Container/Map/components/Content/branchOffice/IndexRight/echarts.js @@ -36,6 +36,15 @@ export const initEcharts1 = (mainRef, chartInstance, data) => { }, }, dataZoom: [ + { + type: "inside", + xAxisIndex: 0, + start: 0, + end: 50, + zoomOnMouseWheel: "shift", + moveOnMouseWheel: true, + moveOnMouseMove: true, + }, { type: "slider", height: 6, diff --git a/src/pages/Container/Map/components/Content/branchOffice/IndexRight/index.js b/src/pages/Container/Map/components/Content/branchOffice/IndexRight/index.js index 891ad5c..6447a22 100644 --- a/src/pages/Container/Map/components/Content/branchOffice/IndexRight/index.js +++ b/src/pages/Container/Map/components/Content/branchOffice/IndexRight/index.js @@ -1,43 +1,27 @@ +import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { useMount } from "ahooks"; -import { useRef, useState } from "react"; +import { Spin } from "antd"; +import { useContext, useEffect, useRef, useState } from "react"; import SeamlessScroll from "zy-react-library/components/SeamlessScroll"; import bg4 from "~/assets/images/map_bi/content/bg4.png"; import bg5 from "~/assets/images/map_bi/content/bg5.png"; +import { NS_BI_STATISTICS } from "~/enumerate/namespace"; import Title from "~/pages/Container/Map/components/Content/branchOffice/Title"; +import { Context } from "~/pages/Container/Map/js/context"; import { initEcharts1 } from "./echarts"; import "./index.less"; -function IndexRight() { +function IndexRight(props) { + const { portArea, currentBranchOffice } = useContext(Context); + const [block1List, setBlock1List] = useState([ { title: "口门进出统计", label1: "人数", label2: "车数", count1: 123, count2: 123, bgImg: bg4 }, { title: "进入申请待审批", label1: "人数", label2: "车数", count1: 123, count2: 123, bgImg: bg4 }, { title: "封闭区域人员情况", label1: "区域数", label2: "人数", count1: 123, count2: 123, bgImg: bg5 }, { title: "封闭区域作业情况", label1: "区域数", label2: "作业数", count1: 123, count2: 123, bgImg: bg5 }, ]); - const [block3List, setBlock3List] = useState([ - { name: "A区", requiredDevices: "入侵检测", anchoredDevices: "2024-01-01 10:00:00", status: "1" }, - { name: "B区", requiredDevices: "烟雾报警", anchoredDevices: "2024-01-01 10:05:00", status: "2" }, - { name: "C区", requiredDevices: "温度异常", anchoredDevices: "2024-01-01 10:10:00", status: "1" }, - { name: "D区", requiredDevices: "门禁异常", anchoredDevices: "2024-01-01 10:15:00", status: "2" }, - { name: "E区", requiredDevices: "视频遮挡", anchoredDevices: "2024-01-01 10:20:00", status: "1" }, - { name: "F区", requiredDevices: "入侵检测", anchoredDevices: "2024-01-01 10:25:00", status: "2" }, - { name: "G区", requiredDevices: "紧急按钮", anchoredDevices: "2024-01-01 10:30:00", status: "1" }, - { name: "H区", requiredDevices: "烟雾报警", anchoredDevices: "2024-01-01 10:35:00", status: "2" }, - { name: "I区", requiredDevices: "温度异常", anchoredDevices: "2024-01-01 10:40:00", status: "1" }, - { name: "J区", requiredDevices: "门禁异常", anchoredDevices: "2024-01-01 10:45:00", status: "2" }, - ]); - const [block4List, setBlock4List] = useState([ - { department: "技术部", threeOrMoreWork: 12, dangerousWork: 8, newWork: 5 }, - { department: "生产部", threeOrMoreWork: 15, dangerousWork: 10, newWork: 3 }, - { department: "安全部", threeOrMoreWork: 5, dangerousWork: 12, newWork: 2 }, - { department: "质检部", threeOrMoreWork: 8, dangerousWork: 6, newWork: 4 }, - { department: "设备部", threeOrMoreWork: 10, dangerousWork: 15, newWork: 7 }, - { department: "维修部", threeOrMoreWork: 18, dangerousWork: 9, newWork: 6 }, - { department: "仓储部", threeOrMoreWork: 7, dangerousWork: 5, newWork: 3 }, - { department: "物流部", threeOrMoreWork: 9, dangerousWork: 4, newWork: 2 }, - { department: "人事部", threeOrMoreWork: 3, dangerousWork: 2, newWork: 1 }, - { department: "财务部", threeOrMoreWork: 2, dangerousWork: 1, newWork: 0 }, - ]); + const [block3List, setBlock3List] = useState([]); + const [block4List, setBlock4List] = useState([]); const chartInstance = useRef(null); const main1Ref = useRef(null); @@ -64,6 +48,57 @@ function IndexRight() { }; }); + const getAlarmRecordScreenIotDeviceAlarmPage = async () => { + const { data } = await props.getAlarmRecordScreenIotDeviceAlarmPage({ + portArea, + corpinfoId: currentBranchOffice, + pageIndex: 1, + pageSize: 9999, + }); + setBlock3List(data); + }; + + const getBlock4List = async () => { + const [{ data: eightWorkData = [] }, { data: keyProjectData = [] }] + = await Promise.all([ + props.getEightWorkInfoScreenDepartmentStatistics({ + portArea, + corpinfoId: currentBranchOffice, + }), + props.getKeyProjectLargeScreenDepartmentStatistics({ + portArea, + corpinfoId: currentBranchOffice, + }), + ]); + const departmentMap = new Map( + keyProjectData.map(item => [ + item.departmentId, + { + departmentName: item.departmentName, + fourNewHomeworkCount: item.fourNewHomeworkCount, + eightWorkCount: 0, + morePeopleCount: item.morePeopleCount, + }, + ]), + ); + eightWorkData.forEach((item) => { + const department = departmentMap.get(item.departmentId) || { + departmentName: item.departmentName, + fourNewHomeworkCount: 0, + eightWorkCount: 0, + morePeopleCount: 0, + }; + department.eightWorkCount = item.workCount || 0; + departmentMap.set(item.departmentId, department); + }); + setBlock4List([...departmentMap.values()]); + }; + + useEffect(() => { + getAlarmRecordScreenIotDeviceAlarmPage(); + getBlock4List(); + }, []); + return (