diff --git a/src/assets/images/imgs/carImg.png b/src/assets/images/imgs/carImg.png index 075642afc70c642086812d973c82943c5621ffaf..c4eaf8cff297f514ac033ecc8af1890d09cbba33 100644 Binary files a/src/assets/images/imgs/carImg.png and b/src/assets/images/imgs/carImg.png differ diff --git a/src/assets/images/imgs/mapIcon.png b/src/assets/images/imgs/mapIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..6740a8f31805486d12f441ad38fa1728d8c5a620 Binary files /dev/null and b/src/assets/images/imgs/mapIcon.png differ diff --git a/src/assets/images/imgs/testImg1.png b/src/assets/images/imgs/testImg1.png new file mode 100644 index 0000000000000000000000000000000000000000..ee2e2adc03da0a0188ce13632bb86d3d1ac6320c Binary files /dev/null and b/src/assets/images/imgs/testImg1.png differ diff --git a/src/assets/images/imgs/testImg2.png b/src/assets/images/imgs/testImg2.png new file mode 100644 index 0000000000000000000000000000000000000000..d699978c1c54c0c1ca7307a3e13225ade5eca900 Binary files /dev/null and b/src/assets/images/imgs/testImg2.png differ diff --git a/src/components/Modal1/Modal1.module.less b/src/components/Modal1/Modal1.module.less new file mode 100644 index 0000000000000000000000000000000000000000..655f640c8b615c2d0770af8f41363b1cb5f5d5d4 --- /dev/null +++ b/src/components/Modal1/Modal1.module.less @@ -0,0 +1,27 @@ +.close { + width: 76px; + height: 76px; + background: rgba(255, 255, 255, 0.5); + border-radius: 50%; + opacity: 0.5; + color: #fff; + font-size: 70px; +} + +.modalBox { + border-radius: 30px; + overflow: hidden; + backdrop-filter: blur(10px); + + .header { + width: 100%; + height: 110px; + background-size: 100% 100%; + background-repeat: no-repeat; + padding: 0 60px; + font-weight: 400; + font-size: 56px; + color: #FFFFFF; + font-family: YouSheBiaoTiYuan; + } +} \ No newline at end of file diff --git a/src/components/Modal1/Modal1.tsx b/src/components/Modal1/Modal1.tsx new file mode 100644 index 0000000000000000000000000000000000000000..31a2a132837bfaa52685fcd9cd7c308ea2cd9b61 --- /dev/null +++ b/src/components/Modal1/Modal1.tsx @@ -0,0 +1,55 @@ +import { CSSProperties, FC, ReactNode } from "react" +import BasicsModal from "../BasicsModal/BasicsModal" +import styles from './Modal1.module.less' +import { Flex } from "antd" +import headUlr3 from '@/assets/images/bg/head3.png' +import headUlr2 from '@/assets/images/bg/head2.png' + + +type Modal1Props = { + open: boolean + onCancel: () => void + title: ReactNode + children: ReactNode + type?: 'green' | 'red' + width?: CSSProperties['width'] +} + +const bgTypes = { + green: { + headUlr: headUlr3, + // bgColor: 'rgba(123, 199, 204, 0.5)', + bgColor: '#010D1C50', + borderColor: '#0DFFB8' + }, + red: { + headUlr: headUlr2, + bgColor: ' rgba(255, 151, 151, 0.2)', + borderColor: '#FF9797' + } +} + +const Modal1: FC = (props) => { + const { open, onCancel, children, title, type = 'green', width = 'auto' } = props + // @ts-ignore + const { headUlr, bgColor, borderColor } = bgTypes[type] + + return ×} + > +
+ + {title} + + {children} +
+
+} + +export default Modal1 \ No newline at end of file diff --git a/src/pages/IntegratedCommand/components/ImgAndValue/index.tsx b/src/pages/IntegratedCommand/components/ImgAndValue/index.tsx index ae7287d68bdd5cac3b7edfa0a46e0f7b91e55ad9..b42eaca34af9f358bccfb55394237ef21a67f2c4 100644 --- a/src/pages/IntegratedCommand/components/ImgAndValue/index.tsx +++ b/src/pages/IntegratedCommand/components/ImgAndValue/index.tsx @@ -9,11 +9,12 @@ interface PropsTypes { gap?: number; iconStyle?: CSSProperties; valueStyle?: CSSProperties; + onClick?:()=>void } export default function (props: PropsTypes) { - const { icon, title, value, gap = 24, valueStyle = {}, unit } = props; + const { icon, title, value, gap = 24, valueStyle = {}, unit,onClick } = props; return ( -
+
diff --git a/src/pages/IntegratedCommand/pages/BaseElement/index.module.css b/src/pages/IntegratedCommand/pages/BaseElement/index.module.css index eed9d4540361731a0ad77893773a90fbb2207d01..53ddd550ebbebdbf2ed80cea8394571521d6d0ab 100644 --- a/src/pages/IntegratedCommand/pages/BaseElement/index.module.css +++ b/src/pages/IntegratedCommand/pages/BaseElement/index.module.css @@ -1,4 +1,6 @@ .container { + position: relative; + z-index: 20; padding: 34px; } diff --git a/src/pages/IntegratedCommand/pages/BaseElement/index.tsx b/src/pages/IntegratedCommand/pages/BaseElement/index.tsx index 00634b695bf8cdf981afed29a93abc140720e328..a973df61f46066cff00aa99fc2f15fb1fdec1812 100644 --- a/src/pages/IntegratedCommand/pages/BaseElement/index.tsx +++ b/src/pages/IntegratedCommand/pages/BaseElement/index.tsx @@ -230,13 +230,13 @@ export default function () { { icon: icon8, name: "一线管理人员", - total: 1, + total: '0', value: 0, }, { icon: icon8, name: "环卫工人", - total: 1, + total: '0', value: 0, }, ], @@ -254,7 +254,7 @@ export default function () { obj.list.push({ icon: icon12, name: carTypeName, - total: carTotalCount, + total: carTotalCount + '', value: carOnlineCount, }) }) @@ -267,7 +267,7 @@ export default function () { obj2.list.push({ icon: icon12, name: carTypeName, - total: carTotalCount, + total: carTotalCount + '', value: carOnlineCount, }) }) diff --git a/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx b/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx index 3dc130b8ce2227ea4dd16286fa99493a321fbf7a..2a4b1016d46da36c5c748b9b1188c7bc28701ec3 100644 --- a/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx +++ b/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx @@ -20,10 +20,19 @@ const CarDetail: FC = (props) => { const [cameraList, setCameraList] = useState([]) const getCamera = async () => { - // const res = await carCamera(carId) - // if (res.code === 0) { - // setCameraList(res.data) - // } + const res = await carCamera(carId) + if (res.code === 0) { + // setCameraList([ + // { + // url: 'http://49.232.205.236:60019/video', + // playInstructUrl: 'http://49.232.205.236:60017/gps/handler.jsp', + // c: 'send9101', + // tid: '014060461333', + // tdh: '4' + // } + // ]) + setCameraList(res.data) + } } const [baseInfo, setBaseInfo] = useState({}) @@ -102,7 +111,7 @@ const CarDetail: FC = (props) => { -
水量(L)
+
重量(kg)
{realTimeInfo.weight}
@@ -191,7 +200,7 @@ const CarDetail: FC = (props) => { 20% - + {/* 左前喷头: @@ -206,7 +215,7 @@ const CarDetail: FC = (props) => { 右扫盘: - + */} 垃圾重量: {sprayerData.weight || 0} diff --git a/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx b/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx index 5df41b4b39bc1f2e77bb3648e82ba10e65bdd57f..b9046ac84281f77531480769361f25c50e8f60b6 100644 --- a/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx +++ b/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx @@ -5,7 +5,7 @@ import icon19 from "@/assets/images/icon/icon19.png"; import Tabs from "../../components/Tabs"; import SubTitle from "../../components/SubTitle"; import styles from "./index.module.css"; -import { Col, Flex, Row } from "antd"; +import { Col, Flex, Row, Image } from "antd"; import ImgAndValue from "../../components/ImgAndValue"; import icon20 from "@/assets/images/icon/icon20.png"; import icon21 from "@/assets/images/icon/icon21.png"; @@ -13,125 +13,152 @@ import icon22 from "@/assets/images/icon/icon22.png"; import icon23 from "@/assets/images/icon/icon23.png"; import icon24 from "@/assets/images/icon/icon24.png"; import icon25 from "@/assets/images/icon/icon25.png"; +import testImg1 from '@/assets/images/imgs/testImg1.png' +import testImg2 from '@/assets/images/imgs/testImg2.png' +import { useState } from "react"; export default function () { - return ( - - ( - <img alt="" src={icon19} style={{ width: 56, height: 46 }}></img> - )} - extra={<Tabs></Tabs>} - > - -
- 垃圾总量0T -
-
- - - - - - - - - - - - - - - - -
-
- 0T -
-
垃圾收集点
-
-
- -
-
-
- 0T -
-
收运车辆
-
-
- -
-
-
- 0T -
-
转运站
-
-
- -
-
-
- 0T -
-
末端处置厂
-
-
- - - - - - - - - - - - -
- ); + const [prevShow, setPrevShow] = useState(false) + const [prevUrl, setPrevUrl] = useState('') + + return ( + + ( + <img alt="" src={icon19} style={{ width: 56, height: 46 }}></img> + )} + extra={<Tabs></Tabs>} + > + +
+ 垃圾总量0T +
+
+ + + + + + + + + + + + + + + + +
+
+ 0T +
+
垃圾收集点
+
+
+ +
+
+
+ 0T +
+
收运车辆
+
+
+ +
+
+
+ 0T +
+
转运站
+
+
+ +
+
+
+ 0T +
+
末端处置厂
+
+
+ + { + setPrevShow(value); + }, + }} + /> + + + { + setPrevUrl(testImg1) + setPrevShow(true) + }} + /> + + {/* + + */} + + { + setPrevUrl(testImg2) + setPrevShow(true) + }} + /> + + +
+ ); } diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.module.less b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.module.less index 52eb79bfd8c50cd451b95f2b6fd64db64774f116..7a84e71db6662c8f76800c4483fea565cd4595c0 100644 --- a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.module.less +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.module.less @@ -8,6 +8,23 @@ font-size: 70px; } +.mapIcon { + width: 116px; + height: 126px; + background-size: 100% 100%; + background-repeat: no-repeat; + + .txt { + font-weight: bold; + font-size: 50px; + color: #FFEC91; + text-shadow: 0px 2px 1px rgba(0, 0, 0, 0.68); + background: linear-gradient(180deg, #FFEC91 0%, #FF4027 98.6328125%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } +} + .modalBox { background: rgba(255, 151, 151, 0.2); border: 2px solid #FF9797; diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx index 5567a4df6d0906026d567214722e0b6dbec9f8ae..ca7e6a247e4e0df8f1ef77e04eea8d5dbfb587d3 100644 --- a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx @@ -9,6 +9,8 @@ import PersonnelDetail from "../PersonnelDetail/PersonnelDetail" import { debounce } from 'lodash' import { warnInfo } from "@/api" import dayjs from "dayjs" +import mapIcon from '@/assets/images/imgs/mapIcon.png' +import IssueDetail from "../IssueDetail/IssueDetail" type IllegalDrivingModalProps = { @@ -18,17 +20,26 @@ type IllegalDrivingModalProps = { const IllegalDrivingModal: FC = (props) => { const { open, onCancel } = props const mapRef = useRef(null); - const scrollRef = useRef(null); - const [list, setList] = useState([]) - const [total, setTotal] = useState(0) + const [list, setList] = useState({ + alarmList: [] as any[], + pointList: [] as any[] + }) const [month, setMonth] = useState(dayjs().format('YYYY-MM')) const getData = async () => { - // const res = await warnInfo(month) - // if (res.code === 200) { - // console.log(res); - // } + const res = await warnInfo(month) + if (res.code === 0) { + setList(res.data) + const points = res.data.pointList.map((v: any) => { + const { latitude, longitude } = v + const point = new BMapGL.Point(longitude, latitude) + return point + }) + console.log(points); + + mapRef.current?.setViewport(points, {}) + } } useEffect(() => { if (open) { @@ -36,18 +47,10 @@ const IllegalDrivingModal: FC = (props) => { } }, [open, month]) - // 触底加载 - const boxScroll = debounce(() => { - if (scrollRef.current) { - const { scrollTop, clientHeight, scrollHeight } = scrollRef.current; - const isBottom = scrollTop + clientHeight >= scrollHeight - 50 - if (isBottom && list.length < total) { - - } - } - }, 300) - const [personShow, setPersonShow] = useState(false) + + const [issueShow, setIssueShow] = useState(false) + const [issueDetail, setIssueDetail] = useState({}) return = (props) => { >
-
车辆超速报警
+
违规驾驶报警
当前
历史
setMonth(data as string)} />
+ {/* @ts-ignore */} = (props) => { enableScrollWheelZoom zoom={13.6} mapStyleV2={{ styleJson }} - > + > + {list.pointList.map((v) => { + const { latitude, longitude, serialNumber } = v + const point = new BMapGL.Point(longitude, latitude) + // @ts-ignore + return + +
+ {serialNumber} +
+
+
+ })} +
- - {new Array(10).fill('').map((_, i) => { - return { - setPersonShow(true) + + {list.alarmList.map((v) => { + const { plateNumber, alarmDescribe, happenPosition, pictures = [], serialNumber, happenTime, driverName, orgName } = v + return { + // setPersonShow(true) + setIssueDetail(v) + setIssueShow(true) }}> - + -
川A01024
-
超速预警
+
{plateNumber}
+
违规预警
-
驾驶员:张三
-
所属单位:绿洲
+
驾驶员:{driverName || '暂无'}
+
所属单位:{orgName || '暂无'}
-
车辆超过80km/h的安全限速,持续10分钟
-
成都市高新区天府大道666号希顿国际东
-
2024-05-25 10:20:20
+
{alarmDescribe}
+
{happenPosition}
+
{happenTime}
- - {i + 1} - + {serialNumber}
})}
setPersonShow(false)} /> + setIssueShow(false)} detailData={issueDetail} />
} diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.module.less b/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.module.less new file mode 100644 index 0000000000000000000000000000000000000000..6732bdefb80eb125885da17f133daa8a15a3f644 --- /dev/null +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.module.less @@ -0,0 +1,44 @@ +.contentBox { + padding: 45px 40px; + + .img { + width: 1350px; + height: 1200px; + border-radius: 20px; + } + + .title { + font-weight: 400; + font-size: 40px; + color: #FFFFFF; + } + + .cell { + margin-top: 30px; + + span { + font-weight: 400; + font-size: 32px; + color: #82A3B6; + } + + span:last-child { + color: #fff; + padding-left: 5px; + flex: 1; + } + } + + .cell2 { + margin-top: 30px; + div { + font-weight: 400; + font-size: 28px; + color: #82A3B6; + } + + div:last-child { + color: #fff; + } + } +} \ No newline at end of file diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.tsx b/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.tsx new file mode 100644 index 0000000000000000000000000000000000000000..257dab9078a62b5d2d225d3fc60ebe2b529f64a2 --- /dev/null +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/IssueDetail/IssueDetail.tsx @@ -0,0 +1,72 @@ +import { FC } from "react" +import styles from './IssueDetail.module.less' +import Modal1 from "@/components/Modal1/Modal1" +import { Flex, Image } from "antd" + +type IssueDetailProps = { + open: boolean + onCancel: () => void + detailData: any +} + +const IssueDetail: FC = (props) => { + const { open, onCancel, detailData } = props + // const { } = detailData + const { plateNumber, alarmDescribe, happenPosition, pictures = [], serialNumber, happenTime, driverName, orgName } = detailData + + + return + + + +
道路不洁
+ + 问题大类: + 违规驾驶预警 + + + 问题来源: + 智能巡检 + + + 上报车辆: + {plateNumber} + + + 上报时间: + {happenTime} + + + 问题地点: + {happenPosition} + + + 问题描述: + {alarmDescribe} + + + 责任单位: + {orgName} + + + 责任人: + {driverName||'暂无'} + + {/* + 路段作业要素: + 要素111 + +
+
日常保洁计划(09:00 - 18:00)
+
张三三、李四、王五
+
+
+
机械普扫计划(09:00 - 18:00)
+
保洁1、保洁2
+
*/} +
+
+
+} + +export default IssueDetail \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 976a905591c0636de28d05d4c01d26848abff46b..68110e6efc4ef72f695041178c4fcebd80b41c97 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -24,8 +24,8 @@ export default defineConfig({ host: '0.0.0.0', proxy: { "/api": { - // target: "http://172.23.0.140:15999", // 唐 - target: "http://171.217.92.33:58089/element", // 测试服务 + target: "http://172.23.0.140:15999", // 唐 + // target: "http://171.217.92.33:58089/element", // 测试服务 changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), }