style(map): branchOffice MenJin 对接统计接口、点位接口、点位详情弹窗
parent
6f4b53b3eb
commit
f23b8d0f0d
|
|
@ -12,9 +12,9 @@ export const getProjectTaskScoreCount = declareRequest(
|
||||||
"getProjectTaskScoreCountLoading",
|
"getProjectTaskScoreCountLoading",
|
||||||
"Get > /domain/projectTask/scoreCount",
|
"Get > /domain/projectTask/scoreCount",
|
||||||
);
|
);
|
||||||
export const getHiddenStatisticsByCorp = declareRequest(
|
export const getHiddenStatisticsByPortArea = declareRequest(
|
||||||
"getHiddenStatisticsByCorpLoading",
|
"getHiddenStatisticsByPortAreaLoading",
|
||||||
"Post > @/hidden/hidden/statisticsByCorp",
|
"Post > @/hidden/hidden/statisticsByPortArea",
|
||||||
);
|
);
|
||||||
export const getXgfStatisticsListCorpStatistics = declareRequest(
|
export const getXgfStatisticsListCorpStatistics = declareRequest(
|
||||||
"getXgfStatisticsListCorpStatisticsLoading",
|
"getXgfStatisticsListCorpStatisticsLoading",
|
||||||
|
|
@ -120,3 +120,15 @@ export const getPrimeportMkmjStatistics = declareRequest(
|
||||||
"getPrimeportMkmjStatisticsLoading",
|
"getPrimeportMkmjStatisticsLoading",
|
||||||
"Get > /primeport/mkmj/statistics",
|
"Get > /primeport/mkmj/statistics",
|
||||||
);
|
);
|
||||||
|
export const getPrimeportClosedAreaCorpStat = declareRequest(
|
||||||
|
"getPrimeportClosedAreaCorpStatLoading",
|
||||||
|
"Post > @/primeport/closedArea/corpStat",
|
||||||
|
);
|
||||||
|
export const getPrimeportClosedAreaCarApplyScreenList = declareRequest(
|
||||||
|
"getPrimeportClosedAreaCarApplyScreenListLoading",
|
||||||
|
"Post > @/primeport/closedAreaCarApply/screenList",
|
||||||
|
);
|
||||||
|
export const getPrimeportClosedAreaPersonApplyScreenList = declareRequest(
|
||||||
|
"getPrimeportClosedAreaPersonApplyScreenListLoading",
|
||||||
|
"Post > @/primeport/closedAreaPersonApply/screenList",
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function RectificationPanel(props) {
|
||||||
const [data, setData] = useState([]);
|
const [data, setData] = useState([]);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
const { data = [] } = await props.getHiddenStatisticsByCorp({
|
const { data = [] } = await props.getHiddenStatisticsByPortArea({
|
||||||
pageIndex: 1,
|
pageIndex: 1,
|
||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
});
|
});
|
||||||
|
|
@ -27,7 +27,7 @@ function RectificationPanel(props) {
|
||||||
title="当前各公司隐患整改情况"
|
title="当前各公司隐患整改情况"
|
||||||
className="index-info-left-panel__rectification"
|
className="index-info-left-panel__rectification"
|
||||||
>
|
>
|
||||||
<Spin spinning={props.biStatistics.getHiddenStatisticsByCorpLoading}>
|
<Spin spinning={props.biStatistics.getHiddenStatisticsByPortAreaLoading}>
|
||||||
<div className="index-info-rectification__table">
|
<div className="index-info-rectification__table">
|
||||||
<div
|
<div
|
||||||
className="index-info-rectification__header"
|
className="index-info-rectification__header"
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,48 @@
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Spin } from "antd";
|
||||||
|
import { useContext, useEffect, useState } from "react";
|
||||||
import CountUp from "react-countup";
|
import CountUp from "react-countup";
|
||||||
import closedAreaIcon from "~/assets/images/map_bi/content/ico15.png";
|
import closedAreaIcon from "~/assets/images/map_bi/content/ico15.png";
|
||||||
import vehiclePassageIcon from "~/assets/images/map_bi/content/ico16.png";
|
import vehiclePassageIcon from "~/assets/images/map_bi/content/ico16.png";
|
||||||
import pedestrianPassageIcon from "~/assets/images/map_bi/content/ico17.png";
|
import pedestrianPassageIcon from "~/assets/images/map_bi/content/ico17.png";
|
||||||
import peopleIcon from "~/assets/images/map_bi/content/ico18.png";
|
import peopleIcon from "~/assets/images/map_bi/content/ico18.png";
|
||||||
import cornerIcon from "~/assets/images/map_bi/content/icon32.png";
|
import cornerIcon from "~/assets/images/map_bi/content/icon32.png";
|
||||||
|
import { NS_BI_STATISTICS } from "~/enumerate/namespace";
|
||||||
import Panel from "~/pages/Container/Map/components/Content/branchOffice/Panel";
|
import Panel from "~/pages/Container/Map/components/Content/branchOffice/Panel";
|
||||||
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const records = [
|
const statistics = [
|
||||||
{ label: "封闭区域数", count: 123, icon: closedAreaIcon },
|
{ label: "封闭区域数", count: 0, icon: closedAreaIcon, field: "closedAreaCount" },
|
||||||
{ label: "车行通道数", count: 123, icon: vehiclePassageIcon },
|
{ label: "车行通道数", count: 0, icon: vehiclePassageIcon, field: "carPassageCount" },
|
||||||
{ label: "人行通道数", count: 123, icon: pedestrianPassageIcon },
|
{ label: "人行通道数", count: 0, icon: pedestrianPassageIcon, field: "personPassageCount" },
|
||||||
{ label: "封闭区域当前人数", count: 123, icon: peopleIcon },
|
{ label: "封闭区域当前人数", count: 0, icon: peopleIcon },
|
||||||
];
|
];
|
||||||
|
|
||||||
/** 负责展示封闭区域及通道基础统计。 */
|
/** 负责展示封闭区域及通道基础统计。 */
|
||||||
function ClosedAreaStatsPanel() {
|
function ClosedAreaStatsPanel(props) {
|
||||||
|
const { portArea, currentBranchOffice } = useContext(Context);
|
||||||
|
|
||||||
|
const [data, setData] = useState(statistics);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const loadData = async () => {
|
||||||
|
const { data = {} } = await props.getPrimeportClosedAreaCorpStat({ portArea, corpinfoId: currentBranchOffice });
|
||||||
|
|
||||||
|
setData(statistics.map(item => ({
|
||||||
|
...item,
|
||||||
|
count: item.field ? data[item.field] || 0 : item.count,
|
||||||
|
})));
|
||||||
|
};
|
||||||
|
|
||||||
|
loadData();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Panel title="封闭区域统计">
|
<Panel title="封闭区域统计">
|
||||||
|
<Spin spinning={props.biStatistics.getPrimeportClosedAreaCorpStatLoading}>
|
||||||
<div className="branch-office-gate-stats__content">
|
<div className="branch-office-gate-stats__content">
|
||||||
{records.map(item => (
|
{data.map(item => (
|
||||||
<div className="branch-office-gate-stats__item" key={item.label}>
|
<div className="branch-office-gate-stats__item" key={item.label}>
|
||||||
<div className="branch-office-gate-stats__image">
|
<div className="branch-office-gate-stats__image">
|
||||||
<img src={item.icon} alt="" />
|
<img src={item.icon} alt="" />
|
||||||
|
|
@ -39,6 +62,7 @@ function ClosedAreaStatsPanel() {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</Spin>
|
||||||
</Panel>
|
</Panel>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -52,4 +76,4 @@ function Corner({ className }) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ClosedAreaStatsPanel;
|
export default Connect([NS_BI_STATISTICS], true)(ClosedAreaStatsPanel);
|
||||||
|
|
|
||||||
|
|
@ -1,75 +1,45 @@
|
||||||
import { useState } from "react";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Spin } from "antd";
|
||||||
|
import { useContext, useEffect, useState } from "react";
|
||||||
import SeamlessScroll from "zy-react-library/components/SeamlessScroll";
|
import SeamlessScroll from "zy-react-library/components/SeamlessScroll";
|
||||||
|
import { NS_BI_STATISTICS } from "~/enumerate/namespace";
|
||||||
import Panel from "~/pages/Container/Map/components/Content/branchOffice/Panel";
|
import Panel from "~/pages/Container/Map/components/Content/branchOffice/Panel";
|
||||||
|
import { Context } from "~/pages/Container/Map/js/context";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const tabs = ["人员", "车辆"];
|
const tabs = ["人员", "车辆"];
|
||||||
const records = [
|
|
||||||
{
|
|
||||||
permissionRange: "A区",
|
|
||||||
status: "1",
|
|
||||||
applicant: "张三",
|
|
||||||
approver: "李主管",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "B区",
|
|
||||||
status: "1",
|
|
||||||
applicant: "李四",
|
|
||||||
approver: "王经理",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "C区",
|
|
||||||
status: "1",
|
|
||||||
applicant: "王五",
|
|
||||||
approver: "赵主任",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "D区",
|
|
||||||
status: "0",
|
|
||||||
applicant: "赵六",
|
|
||||||
approver: "钱总监",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "E区",
|
|
||||||
status: "0",
|
|
||||||
applicant: "钱七",
|
|
||||||
approver: "孙部长",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "F区",
|
|
||||||
status: "0",
|
|
||||||
applicant: "孙八",
|
|
||||||
approver: "周经理",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "G区",
|
|
||||||
status: "0",
|
|
||||||
applicant: "周九",
|
|
||||||
approver: "吴主任",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "H区",
|
|
||||||
status: "1",
|
|
||||||
applicant: "吴十",
|
|
||||||
approver: "郑主管",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "I区",
|
|
||||||
status: "0",
|
|
||||||
applicant: "郑一",
|
|
||||||
approver: "王总监",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
permissionRange: "J区",
|
|
||||||
status: "1",
|
|
||||||
applicant: "王二",
|
|
||||||
approver: "张部长",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
/** 负责展示口门申请记录及人员、车辆分类标签状态。 */
|
/** 负责展示口门申请记录及人员、车辆分类标签状态。 */
|
||||||
function GateApplicationPanel() {
|
function GateApplicationPanel(props) {
|
||||||
|
const { portArea, currentBranchOffice } = useContext(Context);
|
||||||
|
|
||||||
const [activeIndex, setActiveIndex] = useState(0);
|
const [activeIndex, setActiveIndex] = useState(0);
|
||||||
|
const [data, setData] = useState([]);
|
||||||
|
const [isVisible, setIsVisible] = useState(false);
|
||||||
|
|
||||||
|
const loadData = async (activeIndex) => {
|
||||||
|
setIsVisible(false);
|
||||||
|
const { data = [] } = await props[activeIndex === 1 ? "getPrimeportClosedAreaCarApplyScreenList" : "getPrimeportClosedAreaPersonApplyScreenList"]({
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 9999,
|
||||||
|
portArea,
|
||||||
|
corpinfoId: currentBranchOffice,
|
||||||
|
});
|
||||||
|
setData(data);
|
||||||
|
setIsVisible(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleTabClick = (index) => {
|
||||||
|
if (index === activeIndex)
|
||||||
|
return;
|
||||||
|
|
||||||
|
setActiveIndex(index);
|
||||||
|
loadData(index);
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
loadData(activeIndex);
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Panel
|
<Panel
|
||||||
|
|
@ -81,7 +51,7 @@ function GateApplicationPanel() {
|
||||||
<div
|
<div
|
||||||
className={`branch-office-gate-application__tab ${index === activeIndex ? "branch-office-gate-application__tab--active" : ""}`}
|
className={`branch-office-gate-application__tab ${index === activeIndex ? "branch-office-gate-application__tab--active" : ""}`}
|
||||||
key={item}
|
key={item}
|
||||||
onClick={() => setActiveIndex(index)}
|
onClick={() => handleTabClick(index)}
|
||||||
>
|
>
|
||||||
{item}
|
{item}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -92,29 +62,29 @@ function GateApplicationPanel() {
|
||||||
<div className="branch-office-gate-application__content">
|
<div className="branch-office-gate-application__content">
|
||||||
<div className="branch-office-gate-application__table">
|
<div className="branch-office-gate-application__table">
|
||||||
<div className="branch-office-gate-application__row">
|
<div className="branch-office-gate-application__row">
|
||||||
<div>权限范围</div>
|
|
||||||
<div>申请类型</div>
|
|
||||||
<div>申请人</div>
|
<div>申请人</div>
|
||||||
<div>审批人</div>
|
<div>申请口门</div>
|
||||||
|
<div>开始时间</div>
|
||||||
|
<div>结束时间</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="branch-office-gate-application__body">
|
<div className="branch-office-gate-application__body">
|
||||||
<SeamlessScroll list={records} step={0.5}>
|
<Spin spinning={props.biStatistics.getPrimeportClosedAreaCarApplyScreenListLoading || props.biStatistics.getPrimeportClosedAreaPersonApplyScreenListLoading}>
|
||||||
{records.map((item, index) => (
|
{isVisible && (
|
||||||
|
<SeamlessScroll list={data} step={0.5}>
|
||||||
|
{data.map((item, index) => (
|
||||||
<div
|
<div
|
||||||
className="branch-office-gate-application__row"
|
className="branch-office-gate-application__row"
|
||||||
key={index}
|
key={index}
|
||||||
>
|
>
|
||||||
<div>{item.permissionRange}</div>
|
<div>{item.applyUserName}</div>
|
||||||
<div
|
<div>{item.levelOneMkmjName}</div>
|
||||||
className={`branch-office-gate-application__type branch-office-gate-application__type--${item.status}`}
|
<div>{item.visitStartTime}</div>
|
||||||
>
|
<div>{item.visitEndTime}</div>
|
||||||
{item.status === "1" ? "临时" : "长期"}
|
|
||||||
</div>
|
|
||||||
<div>{item.applicant}</div>
|
|
||||||
<div>{item.approver}</div>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</SeamlessScroll>
|
</SeamlessScroll>
|
||||||
|
)}
|
||||||
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -122,4 +92,4 @@ function GateApplicationPanel() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default GateApplicationPanel;
|
export default Connect([NS_BI_STATISTICS], true)(GateApplicationPanel);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
background-color: rgba(42, 86, 158, 0.53);
|
background-color: rgba(42, 86, 158, 0.53);
|
||||||
}
|
}
|
||||||
|
|
||||||
.branch-office-gate-application__body
|
.branch-office-gate-application__body,
|
||||||
.branch-office-gate-application__row:nth-child(odd) {
|
.branch-office-gate-application__row:nth-child(odd) {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +47,3 @@
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.branch-office-gate-application__row .branch-office-gate-application__type--1 {
|
|
||||||
color: #fc6b13;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { Spin } from "antd";
|
||||||
import { useContext, useEffect, useState } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import gateIcon from "~/assets/images/map_bi/content/img7.png";
|
import gateIcon from "~/assets/images/map_bi/content/img7.png";
|
||||||
import barrierIcon from "~/assets/images/map_bi/content/img8.png";
|
import barrierIcon from "~/assets/images/map_bi/content/img8.png";
|
||||||
|
|
@ -40,6 +41,7 @@ function GateStatsPanel(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Panel title="口门统计">
|
<Panel title="口门统计">
|
||||||
|
<Spin spinning={props.biStatistics.getPrimeportMkmjStatisticsLoading}>
|
||||||
<div className="port-gate-stats__options">
|
<div className="port-gate-stats__options">
|
||||||
{data.map((item, index) => (
|
{data.map((item, index) => (
|
||||||
<div key={index} className="port-gate-stats__option">
|
<div key={index} className="port-gate-stats__option">
|
||||||
|
|
@ -61,6 +63,7 @@ function GateStatsPanel(props) {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
</Spin>
|
||||||
</Panel>
|
</Panel>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue