Merge branch 'release_electronic_bid_evaluation_room' of http://gitlab.tianti.tg.unicom.local/eshop/fe_service_ebtp_frontend into release_electronic_bid_evaluation_room

This commit is contained in:
袁帅
2022-09-28 14:57:11 +08:00
76 changed files with 2233 additions and 1865 deletions

View File

@ -1,10 +1,8 @@
import { Button, Col, Input, List, message, PaginationProps, Row, Tag, Tooltip } from "antd"
import moment from "moment";
import { Button, Col, Input, List, message, Row, Tag, Tooltip } from "antd"
import '../Home/style.less'
import './style.less';
import content_title from '@/assets/screen/content_title.png'
import React, { useEffect, useRef, useState } from "react"
import { LeftCircleOutlined, RightCircleOutlined } from "@ant-design/icons";
import { getMonitorList } from "./service";
import { isNotEmpty } from "@/utils/CommonUtils";
import { history } from "umi";
@ -139,15 +137,15 @@ const provinceList = [{
"provincesRemark": "新疆",
},];
const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => {
if (type === 'prev') {
return <LeftCircleOutlined className="pagination-icon" />;
}
if (type === 'next') {
return <RightCircleOutlined className="pagination-icon" />;
}
return originalElement;
};
// const itemRender: PaginationProps['itemRender'] = (_, type, originalElement) => {
// if (type === 'prev') {
// return <LeftCircleOutlined className="pagination-icon" />;
// }
// if (type === 'next') {
// return <RightCircleOutlined className="pagination-icon" />;
// }
// return originalElement;
// };
export const homeClick = () => {
history.push("/ElecMonitorScreen/Home");
}
@ -332,6 +330,7 @@ export default () => {
grid={{ gutter: 16, column: 3 }}
pagination={{
defaultPageSize: 6,
showSizeChanger: false,
onChange: onPageChange,
current: pageNo.current,
total: totalItem,

View File

@ -1,4 +1,4 @@
import { Col, Radio, Row, Table, Tag, Tooltip, Image, Drawer } from "antd"
import { Col, Radio, Row, Table, Tooltip, Image, Drawer } from "antd"
import React, { useEffect, useRef, useState } from "react"
import { EarlyWarn, LocalTime, onCell, onHeaderCell } from "../Home";
import '../Home/style.less'
@ -6,13 +6,13 @@ import '../MonitorRoom/style.less'
import './style.less';
import warn_icon_01 from '@/assets/screen/warn_icon_01.png'
import warn_icon_02 from '@/assets/screen/warn_icon_02.png'
import { getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service";
import { getAllStranger, getBidRoomData, getCameraList, getExpertReports, getLookBackList } from "./service";
import { bidStatusMap, homeClick, previousClick } from "../MonitorRoom";
import { getWarnData } from "../Home/service";
import ScreenVideoPlay from "@/components/ElecBidEvaluation/ScreenVideoPlay";
import { pictureDisplayPath } from "@/utils/DownloadUtils";
import { getURLInformation } from "@/utils/CommonUtils";
import { getDicData } from "@/utils/session";
import { getDicData, getSessionRoleData } from "@/utils/session";
const statusMap = ["未报道", "已报道"];
@ -126,6 +126,8 @@ export default (props: any) => {
const [caremaList, setCaremaList] = useState<any[]>([]);
//报道列表
const [expertList, setExpertList] = useState<any[]>([]);
//陌生人预警-进行中
const [strangerList, setStrangerList] = useState<any[]>([]);
//陌生人预警-回看
const [backStrangerList, setBackStrangerList] = useState<any[]>([]);
//人数预警-回看
@ -142,6 +144,8 @@ export default (props: any) => {
const zoomImg = useRef<any>(null);
//定时刷新间隔
const _time = 10000;
//当前登录人角色
const roleCode = getSessionRoleData()?.roleCode;
const onChange = (e: any) => {
setBtnSelect(e.target.value);
@ -182,7 +186,7 @@ export default (props: any) => {
getCaremaData(data);//获取监控点列表
if (data.status == "2") {//评标结束-回看
getBackList("2");//数量预警
getBackList("3");//陌生人预警
roleCode == "ebtp-watcher" && getBackList("3");//陌生人预警
}
}
})
@ -193,6 +197,7 @@ export default (props: any) => {
if (res?.code == 200) {
const data = res?.data;
setEarlyWarnData(data);
(roleCode == "ebtp-watcher" && data?.strangerDetails) && setStrangerList(data.strangerDetails.slice(0, 5));
}
})
}
@ -203,10 +208,6 @@ export default (props: any) => {
const data = res?.data;
setCaremaList(data);
if (data?.length > 0) {
//获取回看时间
// getCaremaBackList(monitorId).then(response => {
// if (response?.code == 200) {
// const backData = response?.data;
setCameraSelect(data[0].id);
setCameraParams(data[0].platform);
setTimeout(() => {
@ -216,8 +217,6 @@ export default (props: any) => {
videoRef.current?.play(data[0].deviceCode);
}
}, 4000);
// }
// })
}
}
})
@ -233,12 +232,24 @@ export default (props: any) => {
}
//获取告警-回看数据
const getBackList = (type: string) => {
getLookBackList({ reserveId: monitorId, type }).then(res => {
getLookBackList({ reserveId: monitorId, type, pageNo: 1, pageSize: type == "3" ? 1 : 5 }).then(res => {
if (res?.code == 200) {
const data = res?.data.records;
if (type == "2") {//2-人数预警
setBackNumberList(data);
} else if (type == "3") {//3-陌生人预警
data.length > 0 && setBackStrangerList(data[0].details.slice(0, 5));
}
}
})
}
//获取陌生人告警-全部告警
const getAllStrangerList = () => {
getAllStranger({ reserveId: monitorId }).then(res => {
if (res?.code == 200) {
const data = res?.data;
if (data && data.length > 0) {
setStrangerList(data);
setBackStrangerList(data);
}
}
@ -293,6 +304,7 @@ export default (props: any) => {
getRoomData();
getWarnInfo();
getExpertList();
if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); }
}, [])
//定时器
useEffect(() => {
@ -301,6 +313,7 @@ export default (props: any) => {
interval = setInterval(function () {
getWarnInfo();
getExpertList();
if (roleCode == "ebtp-site-supervision" || roleCode == "ebtp-after-supervision") { getAllStrangerList(); }
}, _time);
}
return () => {
@ -365,12 +378,16 @@ export default (props: any) => {
<Row>
<Col span={6}></Col>
<Col span={18}>
<div className="answer-supplier">
<span>{basicInfo?.supplierLength}</span>
<Tooltip placement="topLeft" title={<>{basicInfo?.sectionPayerList?.map((item: any, index: any) => <p key={index}>{item.sectionName}{item.payerNumber}{item.payerNames.join("、")}</p>)}</>} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag">
<span>{basicInfo?.sectionPayerList?.[0]?.payerNames.slice(0, 5).join("、")}<a onMouseEnter={() => setVisible(true)} onMouseLeave={() => setVisible(false)}></a></span>
</Tooltip>
</div>
{basicInfo?.status == "2" ? (
<div className="answer-supplier">
<span>{basicInfo?.supplierLength}</span>
<Tooltip placement="topLeft" title={<>{basicInfo?.sectionPayerList?.map((item: any, index: any) => <p key={index}>{item.sectionName}{item.payerNumber}{item.payerNames.join("、")}</p>)}</>} visible={visible} color="rgba(4,20,47,0.85)" overlayInnerStyle={{ width: '250%' }} overlayClassName="screen-tag">
<span>{basicInfo?.sectionPayerList?.[0]?.sectionName}{basicInfo?.sectionPayerList?.[0]?.payerNumber}<a onMouseEnter={() => setVisible(true)} onMouseLeave={() => setVisible(false)}></a></span>
</Tooltip>
</div>
) : (
<div style={{ height: "40px" }}></div>
)}
</Col>
{/* <Col span={6}></Col> */}
</Row>
@ -403,14 +420,14 @@ export default (props: any) => {
? backStrangerList.map((item: any, index: any) => (
<div className="stranger-list-card" key={index}>
<div>
<p><span></span>{item.createDate}</p>
<p><span></span>{item.eventTime}</p>
</div>
<div>
<Image src={pictureDisplayPath + "?filePath=" + item.details[0].filePath} preview={{ getContainer: "null" }} height={"100%"} onClick={() => drawerClick(item.details[0].filePath)} />
<Image src={pictureDisplayPath + "?filePath=" + item.filePath} preview={{ getContainer: "null" }} height={"100%"} onClick={() => drawerClick(item.filePath)} />
</div>
</div>
))
: earlyWarnData?.strangerDetails?.map((item: any, index: any) => (
: strangerList.map((item: any, index: any) => (
<div className="stranger-list-card" key={index}>
<div>
<p><span></span>{item.eventTime}</p>

View File

@ -56,4 +56,16 @@ export async function getLookBackList(params: any) {
// return request('/api/biz-service-ebtp-evaluation/v1/eval/room/reserve/' + id, {
// method: 'GET',
// });
// }
// }
/**
* 陌生人预警-查询全部
* @param params
* @returns
*/
export async function getAllStranger(params: any) {
return request('/api/biz-service-ebtp-evaluation/v1/eval/room/alarm/screamOfAlarm/strangerImg', {
method: 'GET',
params: params
});
}