From f3f5609bab0fb5e81638ed5d76b7b7d9dd53796f Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Wed, 16 Aug 2023 11:15:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=B4=E5=88=A9-=E8=B6=8B=E5=8A=BF=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=B1=95=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../water-prevention/components/right-top.js | 14 ++++++++++++-- .../water-prevention/components/style.less | 14 +++++++------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/super-screen/client/src/sections/water-prevention/components/right-top.js b/super-screen/client/src/sections/water-prevention/components/right-top.js index cd45611..e0da99e 100644 --- a/super-screen/client/src/sections/water-prevention/components/right-top.js +++ b/super-screen/client/src/sections/water-prevention/components/right-top.js @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react' import { Box, AutoRollComponent } from '$components'; import { Tooltip } from 'antd'; +import moment from 'moment'; import './style.less'; function CitySafty(props) { @@ -12,7 +13,7 @@ function CitySafty(props) {
{s.name}
-
{s.currentTime}
+
{s.currentTime ? moment(s.currentTime).format('HH:mm:ss') : '--'}
{s.waterLevel}{s.waterLevel &&
0 ? '_upicon' : '_downicon'} />}
@@ -24,7 +25,16 @@ function CitySafty(props) {
} - return + const renderDate = () => { + let renderTime = '' + const time = trendData?.find(t => t.currentTime)?.currentTime + if (time) { + renderTime = moment(time).format('YYYY-MM-DD') + } + return
{renderTime}
+ } + + return
点位名称
diff --git a/super-screen/client/src/sections/water-prevention/components/style.less b/super-screen/client/src/sections/water-prevention/components/style.less index 2b86414..e80f85f 100644 --- a/super-screen/client/src/sections/water-prevention/components/style.less +++ b/super-screen/client/src/sections/water-prevention/components/style.less @@ -407,22 +407,22 @@ ._rank_item1 { text-align: center; - width: 25%; + width: 35%; } ._rank_item2 { text-align: center; - width: 20%; + width: 15%; } ._rank_item3 { - text-align: right; - width: 25%; + text-align: center; + width: 20%; } ._rank_item4 { text-align: center; - width: 35%; + width: 30%; } } @@ -445,7 +445,7 @@ ._rank_item1 { text-align: center; - width: 20%; + width: 35%; margin-left: 5px; white-space: nowrap; overflow: hidden; @@ -454,7 +454,7 @@ ._rank_item2 { // text-align: center; - width: 35%; + width: 20%; } ._rank_item3 {