diff --git a/src/api/index.ts b/src/api/index.ts index f1bf45d1e8b9ad76c6d8c18b2e43c58995636300..f467431935b5ae479b9a6ad04175bcef7bf36da0 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -39,4 +39,9 @@ export async function driverInfo(id: string) { // 喷头数据 export async function sprayerInfo(id: string) { return request.post(handleGateway('/supervisoryCommand/sprayData?carId=' + id, '/element')) +} + +// 预警数据 +export async function warnInfo(month: string) { + return request.post(handleGateway('/supervisoryCommand/gps/carAlarm?month=' + month, '/element')) } \ No newline at end of file diff --git a/src/pages/IntegratedCommand/pages/BaseElement/index.tsx b/src/pages/IntegratedCommand/pages/BaseElement/index.tsx index 71ef20a6518bb442345b3a3b6a26ad843567ac25..00634b695bf8cdf981afed29a93abc140720e328 100644 --- a/src/pages/IntegratedCommand/pages/BaseElement/index.tsx +++ b/src/pages/IntegratedCommand/pages/BaseElement/index.tsx @@ -209,7 +209,7 @@ export default function () { icon: icon13, name: "作业标段", unit: "条", - value: 22, + value: 0, }, { icon: icon16, @@ -220,7 +220,7 @@ export default function () { ), - value: 22, + value: 0, }, ], }, @@ -230,14 +230,14 @@ export default function () { { icon: icon8, name: "一线管理人员", - total: 56, - value: 22, + total: 1, + value: 0, }, { icon: icon8, name: "环卫工人", - total: 56, - value: 22, + total: 1, + value: 0, }, ], }, diff --git a/src/pages/IntegratedCommand/pages/BaseIndex/index.tsx b/src/pages/IntegratedCommand/pages/BaseIndex/index.tsx index 141912733147a500f8dfd67fda1990c4b07a5cd5..d7fcc3b734c05d0632db54397df8874d44c092d0 100644 --- a/src/pages/IntegratedCommand/pages/BaseIndex/index.tsx +++ b/src/pages/IntegratedCommand/pages/BaseIndex/index.tsx @@ -1,15 +1,16 @@ import { Flex } from "antd"; import styles from "./index.module.css"; export default function () { - return ( - -
- 今日综合体征指数 95.6 -
- -
环卫作业 50/50
-
垃圾分类 45.6/50
-
-
- ); + return undefined +// ( +// +//
+// 今日综合体征指数 95.6 +//
+// +//
环卫作业 50/50
+//
垃圾分类 45.6/50
+//
+//
+// ); } diff --git a/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx b/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx index bd3517ccae7a2d9c6daff4b878879a1f610792e9..3dc130b8ce2227ea4dd16286fa99493a321fbf7a 100644 --- a/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx +++ b/src/pages/IntegratedCommand/pages/CarDetail/CarDetail.tsx @@ -1,6 +1,6 @@ import { FC, useEffect, useState } from 'react' import styles from './CarDetail.module.less' -import { Button, Flex, Image } from 'antd' +import { Button, Flex, Image, message } from 'antd' import InstrumentpanelChart from '../../components/InstrumentpanelChart/InstrumentpanelChart' import { carBaseInfo, carCamera, carRealTimeInfo, driverInfo, sprayerInfo } from '@/api' import VideoDplayer from '../../components/VideoDplayer' @@ -20,10 +20,10 @@ const CarDetail: FC = (props) => { const [cameraList, setCameraList] = useState([]) const getCamera = async () => { - const res = await carCamera('4f7b39a774f6086961d850c344184122') - if (res.code === 0) { - setCameraList(res.data) - } + // const res = await carCamera(carId) + // if (res.code === 0) { + // setCameraList(res.data) + // } } const [baseInfo, setBaseInfo] = useState({}) @@ -102,7 +102,7 @@ const CarDetail: FC = (props) => { -
水量(T)
+
水量(L)
{realTimeInfo.weight}
diff --git a/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx b/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx index e8ca0bf5b4a57e85dbc4abad0e6264ee9998dd7b..5df41b4b39bc1f2e77bb3648e82ba10e65bdd57f 100644 --- a/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx +++ b/src/pages/IntegratedCommand/pages/CompletePeriod/index.tsx @@ -26,7 +26,7 @@ export default function () { >
- 垃圾总量658T + 垃圾总量0T
@@ -34,7 +34,7 @@ export default function () { @@ -42,7 +42,7 @@ export default function () { @@ -50,7 +50,7 @@ export default function () { @@ -58,7 +58,7 @@ export default function () { @@ -67,7 +67,7 @@ export default function () {
- 562T + 0T
垃圾收集点
@@ -76,7 +76,7 @@ export default function () {
- 562T + 0T
收运车辆
@@ -85,7 +85,7 @@ export default function () {
- 562T + 0T
转运站
@@ -94,7 +94,7 @@ export default function () {
- 562T + 0T
末端处置厂
@@ -106,7 +106,7 @@ export default function () { icon={icon25} title={"混装混运"} gap={6} - value={5} + value={0} valueStyle={{ color: "#fff" }} unit={"次"} /> @@ -115,7 +115,7 @@ export default function () { { }} /> })} - {overlays.map((item, index) => { + {/* {overlays.map((item, index) => { // @ts-ignore return - })} + })} */} setCarDetailShow(false)} carData={carData} /> diff --git a/src/pages/IntegratedCommand/pages/OperationSupervision/index.tsx b/src/pages/IntegratedCommand/pages/OperationSupervision/index.tsx index c40f68b05e1a95c96c647a6358d244fd30c648ef..a77fec8311447a25eab883a36692c03443591715 100644 --- a/src/pages/IntegratedCommand/pages/OperationSupervision/index.tsx +++ b/src/pages/IntegratedCommand/pages/OperationSupervision/index.tsx @@ -40,7 +40,7 @@ const Progress = () => { const CustomBarChart = () => { const xAxis = ["道路不洁", "暴露垃圾", "路面污染", "作业遗留", "其它问题"]; - const data = [68, 58, 44, 21, 10]; + const data = [10, 10, 10, 10, 10]; const sub = data.reduce((a, b) => a + b, 0); const length = 20; @@ -89,7 +89,7 @@ export default function () { @@ -103,7 +103,7 @@ export default function () { icon={icon27} title={"机械化作业率"} gap={31} - value={458} + value={0} unit={"%"} /> @@ -127,7 +127,7 @@ export default function () { - + ); } diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx index 1f8a2a86b166dc3b5d2debe13437a5cf59b4970f..5567a4df6d0906026d567214722e0b6dbec9f8ae 100644 --- a/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/IllegalDrivingModal/IllegalDrivingModal.tsx @@ -1,5 +1,5 @@ import BasicsModal from "@/components/BasicsModal/BasicsModal" -import { FC, useRef, useState } from "react" +import { FC, useEffect, useRef, useState } from "react" import styles from './IllegalDrivingModal.module.less' import head from '@/assets/images/bg/head2.png' import { DatePicker, Flex, Image } from "antd" @@ -7,6 +7,8 @@ import { CustomOverlay, Map, MapApiLoaderHOC, Marker, Polygon } from "react-bmap import styleJson from "@/assets/styles/custom_map_config.json"; import PersonnelDetail from "../PersonnelDetail/PersonnelDetail" import { debounce } from 'lodash' +import { warnInfo } from "@/api" +import dayjs from "dayjs" type IllegalDrivingModalProps = { @@ -21,6 +23,19 @@ const IllegalDrivingModal: FC = (props) => { const [list, setList] = useState([]) const [total, setTotal] = useState(0) + const [month, setMonth] = useState(dayjs().format('YYYY-MM')) + const getData = async () => { + // const res = await warnInfo(month) + // if (res.code === 200) { + // console.log(res); + // } + } + useEffect(() => { + if (open) { + getData() + } + }, [open, month]) + // 触底加载 const boxScroll = debounce(() => { if (scrollRef.current) { @@ -44,7 +59,7 @@ const IllegalDrivingModal: FC = (props) => {
车辆超速报警
当前
历史
- + setMonth(data as string)} />
diff --git a/src/pages/IntegratedCommand/pages/RealtimeWarning/index.tsx b/src/pages/IntegratedCommand/pages/RealtimeWarning/index.tsx index 112abf4906826c6ed98ef3d2332690128d24702f..c3fc6d5f19cec2a3bf92c20ababe389509bbba46 100644 --- a/src/pages/IntegratedCommand/pages/RealtimeWarning/index.tsx +++ b/src/pages/IntegratedCommand/pages/RealtimeWarning/index.tsx @@ -7,15 +7,15 @@ export default function () { const listData = [ { name: "违规驾驶报警", - total: 102, - value: 15, + total: 0, + value: 0, onClick: () => { setIllegalDrivingShow(true) } }, - { name: "人员SOS报警", total: 102, value: 15 }, - { name: "车载超速报警", total: 102, value: 15 }, - { name: "车辆超载报警", total: 102, value: 2 }, + { name: "人员SOS报警", total: 0, value: 0 }, + { name: "车载超速报警", total: 0, value: 0 }, + { name: "车辆超载报警", total: 0, value: 0 }, ] return
diff --git a/src/router/index.tsx b/src/router/index.tsx index 8acd1339e0a6a5d282ff296b70e975559614a291..5983e7f69a5b736b12c7f4405694fab21429f24c 100644 --- a/src/router/index.tsx +++ b/src/router/index.tsx @@ -27,8 +27,6 @@ const router = createBrowserRouter([ }, ], }, -], { - // basename: "/sanitation", -}) +]) export default router; diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 376223be02c1896f37a866491d5b4c633b7b9721..825731cf4427f160a28041c69482d37a62976f88 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -2,7 +2,7 @@ // 处理请求访问网关 const IS_PROD = process.env.NODE_ENV === 'production'; export const handleGateway = (url: string, gateway: string = '') => { - // return '/sanitation/api' + gateway + url + // return '/api' + gateway + url if (IS_PROD) { return '/api' + gateway + url diff --git a/vite.config.ts b/vite.config.ts index 527533498f2691633cf6e60104ea47dc0033d257..976a905591c0636de28d05d4c01d26848abff46b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,7 +25,7 @@ export default defineConfig({ proxy: { "/api": { // target: "http://172.23.0.140:15999", // 唐 - target: "http://171.217.92.33:58089", // 测试服务 + target: "http://171.217.92.33:58089/element", // 测试服务 changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), }