diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/index.scss b/src/pages/DataAnalysisPrediction/ParkingOverview/index.scss index fb2dd46..4f1e883 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/index.scss +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/index.scss @@ -381,6 +381,17 @@ $color-primary : var(--color-primary); } } + .r_xd { + z-index: 1000; + width: max-content; + height: 30px; + position: absolute; + top: 40px; + right: 120px; + color: #fff; + white-space: nowrap; + } + .r_xld { z-index: 1000; width: 30px; diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index 63195ce..f865711 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -56,12 +56,13 @@ import Kx from "@/assets/images/equip/home/kx.png"; import Yc from "@/assets/images/equip/home/yc.png"; import Poto from "@/assets/images/equip/home/poto.png"; import BaseMap from "./Map"; +import moment from "moment"; // import errorImg from "@/assets/images/layout/error.png" // import { useLocation } from "react-router-dom"; let timer = null; let qftimer = null; let crtimer = null; -let option = null; +let timerption = null; const ParkingOverview = connect(function mapStateToProps(state) { return { user: state.user, @@ -477,7 +478,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { ]); //底部车场切换展示 const [CarShow, setCarShow] = useState(0); - + const [DayDa, setDayDa] = useState(""); //页码 function onShowSizeChange(pn, size) { let temFormData = {}; @@ -614,7 +615,10 @@ const ParkingOverview = connect(function mapStateToProps(state) { setOption([]); } }; - + //日期 + const DateDay = () => { + return moment().format("YYYY/MM/DD HH:mm"); + }; //右侧时间切换 const SelectDay = (str, val) => { if (str == 1) { @@ -752,7 +756,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { }; //右下 const getRevenueOption = ( - data = [ + datas = [ { key: "", value: 0, @@ -760,7 +764,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { ] ) => { // 获取所有地区名称 - + let data = datas.sort((a, b) => a.key - b.key); setRightThree({ title: { text: "", @@ -847,7 +851,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { grid: { x: 50, y: 35, - x2: 20, + x2: 30, y2: 30, }, }); @@ -1298,8 +1302,12 @@ const ParkingOverview = connect(function mapStateToProps(state) { getSelectData(); GetCar(); GetAreaShop(); + timerption = setInterval(() => { + setDayDa(DateDay()); + }, 1000); return () => { clearInterval(qftimer); + clearInterval(timerption); crtimer.close(); }; }, []); @@ -1551,6 +1559,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { +
{DayDa}
{