diff --git a/super-screen/client/assets/images/homepage/enter/row1-select.png b/super-screen/client/assets/images/homepage/enter/row1-select.png index 455426e..2260ec4 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row1-select.png and b/super-screen/client/assets/images/homepage/enter/row1-select.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row1.png b/super-screen/client/assets/images/homepage/enter/row1.png index 646faa2..ffe88d5 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row1.png and b/super-screen/client/assets/images/homepage/enter/row1.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-1-select.png b/super-screen/client/assets/images/homepage/enter/row2-1-select.png index 9aa2967..e63d2af 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-1-select.png and b/super-screen/client/assets/images/homepage/enter/row2-1-select.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-1.png b/super-screen/client/assets/images/homepage/enter/row2-1.png index a3bb942..ddd0e17 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-1.png and b/super-screen/client/assets/images/homepage/enter/row2-1.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-2-select.png b/super-screen/client/assets/images/homepage/enter/row2-2-select.png index c51f519..9e03a11 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-2-select.png and b/super-screen/client/assets/images/homepage/enter/row2-2-select.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-2.png b/super-screen/client/assets/images/homepage/enter/row2-2.png index 95ce59d..3fbee8f 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-2.png and b/super-screen/client/assets/images/homepage/enter/row2-2.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-3-select.png b/super-screen/client/assets/images/homepage/enter/row2-3-select.png index 3301a4a..3e11f9d 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-3-select.png and b/super-screen/client/assets/images/homepage/enter/row2-3-select.png differ diff --git a/super-screen/client/assets/images/homepage/enter/row2-3.png b/super-screen/client/assets/images/homepage/enter/row2-3.png index d6f7ccb..1a48f3e 100644 Binary files a/super-screen/client/assets/images/homepage/enter/row2-3.png and b/super-screen/client/assets/images/homepage/enter/row2-3.png differ diff --git a/super-screen/client/index.ejs b/super-screen/client/index.ejs index b2ce1f0..2843462 100644 --- a/super-screen/client/index.ejs +++ b/super-screen/client/index.ejs @@ -5,6 +5,22 @@ + -
diff --git a/super-screen/client/index.html b/super-screen/client/index.html index c77ac4d..1995630 100644 --- a/super-screen/client/index.html +++ b/super-screen/client/index.html @@ -6,6 +6,22 @@ + -
diff --git a/super-screen/client/src/app.js b/super-screen/client/src/app.js index 2ea44d8..5491516 100644 --- a/super-screen/client/src/app.js +++ b/super-screen/client/src/app.js @@ -21,7 +21,7 @@ const App = props => { homePage, Auth, waterprevention, - // communitysafty, + communitysafty, firecontrol ]} /> diff --git a/super-screen/client/src/components/index.js b/super-screen/client/src/components/index.js index 2c24267..a326c9d 100644 --- a/super-screen/client/src/components/index.js +++ b/super-screen/client/src/components/index.js @@ -11,6 +11,7 @@ import Box from './public/table-card'; import CarouselList from './public/carousel-list'; import NoData from './public/noData' import FullScreenContainer from './full-screen-container' +import AutoRollComponent from './rollComponent/index' export { Upload, Uploads, @@ -21,5 +22,6 @@ export { Box, CarouselList, NoData, - FullScreenContainer + FullScreenContainer, + AutoRollComponent }; diff --git a/super-screen/client/src/components/rollComponent/index.js b/super-screen/client/src/components/rollComponent/index.js new file mode 100644 index 0000000..a35c3ed --- /dev/null +++ b/super-screen/client/src/components/rollComponent/index.js @@ -0,0 +1,112 @@ +'use strict' +import React, { Component } from 'react'; +import { Row, Col, Tag, Tooltip, Icon } from 'antd'; +import './style.less'; +export default class AutoRollComponent extends Component { + + constructor(props) { + super(props); + this.scrollElem = null; + this.stopscroll = false; + this.preTop = 0; + this.cloneEle = null; + this.currentTop = 0; + this.marqueesHeight = 0; + this.interval = null; + this.state = { + showContent: false, + dataObj: {} + } + } + + marque = (height) => { + try { + this.scrollElem = document.getElementById(this.props.divId); + this.marqueesHeight = height; + if (this.scrollElem) { + this.scrollElem.style.height = this.marqueesHeight; + this.scrollElem.style.overflow = 'hidden'; + } + + if (!this.props.closeroll) { + if (this.props.canScroll) { + this.cloneEle = document.getElementById(this.props.divId); + this.scrollElem.appendChild(this.cloneEle.cloneNode(true)); + this.repeat() + } + } + // let length = this.props.data.length; + // if (length > 5) { + // this.cloneEle = document.getElementById(this.props.divId); + // this.scrollElem.appendChild(this.cloneEle.cloneNode(true)); + // this.repeat(); + // } + } catch (e) { console.log(e) } + } + + + repeat = () => { + this.scrollElem.scrollTop = 0; + + this.interval = setInterval(() => { + if (this.stopscroll) return; + this.currentTop = this.currentTop + 1; + this.preTop = this.scrollElem.scrollTop; + this.scrollElem.scrollTop = this.scrollElem.scrollTop + 1; + // console.log(`this.scrollElem.scrollTop:${this.scrollElem.scrollTop} === this.preTop:${this.preTop}`); + if (this.preTop === this.scrollElem.scrollTop) { + this.scrollElem.scrollTop = this.marqueesHeight; + this.scrollElem.scrollTop = this.scrollElem.scrollTop + 1; + } + }, 50); + } + + + componentWillUnmount() { + clearInterval(this.interval); + } + + componentDidMount() { + this.marque(10); + } + + onMouseOver = () => { + this.stopscroll = true; + } + + onMouseOut = () => { + this.stopscroll = false; + } + + handelShowContent = (q) => { + this.setState({ dataObj: q, showContent: true }) + } + + close = () => { + this.stopscroll = false; + this.setState({ showContent: false, begin: 0, end: 100, dataObj: {} }) + } + + + render() { + const { dataObj } = this.state; + const { changeStyleCol, heads, spans, data, showWord, divId, divHeight, content, color, type, titleLeft, canScroll } = this.props; + return ( +
+ {heads ? + + {heads.map((c, index) => { + return {c} + }) + } + + : ''} +
+
+ {content ? content : ''} +
+
+
+ ) + } +} \ No newline at end of file diff --git a/super-screen/client/src/components/rollComponent/style.less b/super-screen/client/src/components/rollComponent/style.less new file mode 100644 index 0000000..d133be7 --- /dev/null +++ b/super-screen/client/src/components/rollComponent/style.less @@ -0,0 +1,76 @@ +.alarm-title-b{ + + font-size:15px; + font-family:PingFangSC-Regular,PingFang SC; + // font-weight:400; + color:rgba(255,255,255,1); + + // line-height:25px; + } + + .alarm-title-s{ + + font-size:14px; + font-family:PingFangSC-Regular,PingFang SC; + // font-weight:400; + color:rgba(175,196,215,1); + margin-right: 20px; + // line-height:22px; + } + + .list-first{ + width: 22px; + height: 22px; + background-size: cover; + display: inline-block; + } + .autovideo-modal .ant-modal, .autoimage-modal .ant-modal { + top: 50%; + transform: translateY(-50%); + -webkit-transform: translateY(-50%); + } + .autovideo-modal .ant-modal, .autovideo-modal .ant-modal-body { + height: 450px; + } + .autovideo-modal .ant-modal-footer, .autoimage-modal .ant-modal-footer { + display: none; + } + .autovideo-modal .ant-modal-close, .autoimage-modal .ant-modal-close { + top: -10px; + right: -10px; + } + .autoimage-modal .ant-modal-body img { + width: 100%; + height: auto; + } + .punish-ybj { + background: url('/assets/images/ui/ybj.png') no-repeat; + background-size: 100% 100%; + padding: 5px; + text-align: center; + } + .punish-dcl { + background: url('/assets/images/ui/dcl.png') no-repeat; + background-size: 100% 100%; + padding: 5px; + text-align: center; + } + .bg-row { + background: url('/assets/images/ui/cjx.png') no-repeat; + background-size: 100% 100%; + } + .bg-qs { + margin-top: 15px; + background: url('/assets/images/ui/jxqs.png') no-repeat; + background-size: 100% 100%; + } + .margin-left-5 { + margin-left: 5px; + } + + .hidden-scroll-bar-y{ + overflow-y: scroll !important; + scrollbar-width: none !important; + } + + .hidden-scroll-bar-y::-webkit-scrollbar { width: 0 !important } \ No newline at end of file diff --git a/super-screen/client/src/sections/community-safty/components/city-safty.js b/super-screen/client/src/sections/community-safty/components/city-safty.js index f481368..82a3a49 100644 --- a/super-screen/client/src/sections/community-safty/components/city-safty.js +++ b/super-screen/client/src/sections/community-safty/components/city-safty.js @@ -1,11 +1,11 @@ import React, { useEffect, useState } from 'react' -import { Box } from '$components'; +import { Box, AutoRollComponent } from '$components'; import './style.less'; function CitySafty(props) { - return -
+ const getContent = () => { + return
@@ -37,6 +37,9 @@ function CitySafty(props) {
+ } + return + } diff --git a/super-screen/client/src/sections/community-safty/components/style.less b/super-screen/client/src/sections/community-safty/components/style.less index 637e9ba..e627a9f 100644 --- a/super-screen/client/src/sections/community-safty/components/style.less +++ b/super-screen/client/src/sections/community-safty/components/style.less @@ -391,9 +391,9 @@ color: #E2F8FF; letter-spacing: 1.17px; line-height: 19px; - padding: 20px 14px 0px 14px; + // padding: 20px 14px 0px 14px; overflow: auto; - height: 100%; + // height: 100%; .alarm_handle { display: flex; diff --git a/super-screen/client/src/sections/community-safty/components/traffic-ranking.js b/super-screen/client/src/sections/community-safty/components/traffic-ranking.js index 29b0ff1..cfebbfe 100644 --- a/super-screen/client/src/sections/community-safty/components/traffic-ranking.js +++ b/super-screen/client/src/sections/community-safty/components/traffic-ranking.js @@ -1,10 +1,25 @@ import React, { useEffect, useState } from 'react' -import { Box } from '$components'; +import { Box, AutoRollComponent } from '$components'; import './style.less'; function DataTop5(props) { + const content =
+ {[1, 2, 3, 4, 5, 6, 7, 8].map(s => { + return
+
+
+
{s}
+ +
+
+
小区名称{s}
+
{1400 - s}
+
+ })} +
+ return
@@ -14,21 +29,7 @@ function DataTop5(props) {
人流量/人次
-
- {[1, 2, 3, 4, 5, 6, 7, 8].map(s => { - return
-
-
-
{s}
- -
-
-
小区名称{s}
-
{1400 - s}
-
- })} -
- +
} diff --git a/super-screen/client/src/sections/community-safty/containers/homePage.js b/super-screen/client/src/sections/community-safty/containers/homePage.js index 4ee09cf..2783d46 100644 --- a/super-screen/client/src/sections/community-safty/containers/homePage.js +++ b/super-screen/client/src/sections/community-safty/containers/homePage.js @@ -27,7 +27,7 @@ function homePage(props) { 流动人口
-
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
+
{ dispatch(push('/homepage')) }} className='_exit' >返回平台
diff --git a/super-screen/client/src/sections/fire-control/components/left-bottom.js b/super-screen/client/src/sections/fire-control/components/left-bottom.js index 5d5bf0d..cbfe037 100644 --- a/super-screen/client/src/sections/fire-control/components/left-bottom.js +++ b/super-screen/client/src/sections/fire-control/components/left-bottom.js @@ -1,11 +1,10 @@ import React from 'react' -import { Box } from '$components'; +import { Box, AutoRollComponent } from '$components'; function Infrastructure(props) { - - return -
+ const getContent = () => { + return
14:22
红花岗区大队
@@ -26,7 +25,15 @@ function Infrastructure(props) {
红花岗区大队
划龙桥路77号
+
+
14:22
+
红花岗区大队
+
划龙桥路77号
+
+ } + return + } diff --git a/super-screen/client/src/sections/fire-control/components/style.less b/super-screen/client/src/sections/fire-control/components/style.less index 35c0cc2..d6d6f4a 100644 --- a/super-screen/client/src/sections/fire-control/components/style.less +++ b/super-screen/client/src/sections/fire-control/components/style.less @@ -161,14 +161,14 @@ } .fire_item_right_container { - display: flex; - width: 100%; - height: 100%; - text-align: center; - flex-direction: column; - align-items: center; - overflow: auto; - padding-top: 24px; + // display: flex; + // width: 100%; + // height: 100%; + // text-align: center; + // flex-direction: column; + // align-items: center; + // // overflow: auto; + // padding-top: 12px; .fire_right_item { width: 95%; @@ -445,6 +445,7 @@ justify-content: center; .today_item { + margin-bottom: 15px; width: 91%; height: 41px; background: url('/assets/images/homepage/fire/alarmbg.png') no-repeat; diff --git a/super-screen/client/src/sections/fire-control/containers/homePage.js b/super-screen/client/src/sections/fire-control/containers/homePage.js index 8792559..3e59a45 100644 --- a/super-screen/client/src/sections/fire-control/containers/homePage.js +++ b/super-screen/client/src/sections/fire-control/containers/homePage.js @@ -31,7 +31,7 @@ function homePage(props) { 一键护航
-
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
+
{ dispatch(push('/homepage')) }} className='_exit' >返回平台
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 d59d52d..3d3f3f6 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,11 +1,29 @@ import React, { useEffect, useState } from 'react' -import { Box } from '$components'; +import { Box, AutoRollComponent } from '$components'; import { Tooltip } from 'antd'; import './style.less'; function CitySafty(props) { const { trendData } = props; + const getContent = () => { + return
+ {trendData?.map((s, index) => { + return
+
+ {s.name} +
+
{s.currentTime}
+
{s.waterLevel}{s.waterLevel &&
0 ? '_upicon' : '_downicon'} />}
+
+
+ {s.futureState === '正常' ? '正常' : s.futureState.length ? '告警' : '--'} +
+
+
+ })} +
+ } return
@@ -15,22 +33,7 @@ function CitySafty(props) {
未来1小时趋势
-
- {trendData?.map((s, index) => { - return
-
- {s.name} -
-
{s.currentTime}
-
{s.waterLevel}{s.waterLevel &&
0 ? '_upicon' : '_downicon'} />}
-
-
- {s.futureState === '正常' ? '正常' : s.futureState.length ? '告警' : '--'} -
-
-
- })} -
+
} diff --git a/super-screen/client/src/sections/water-prevention/containers/gis.js b/super-screen/client/src/sections/water-prevention/containers/gis.js index 63bcb85..8e54688 100644 --- a/super-screen/client/src/sections/water-prevention/containers/gis.js +++ b/super-screen/client/src/sections/water-prevention/containers/gis.js @@ -408,8 +408,8 @@ function Map(props) { } const tabs = tab == 'overview' ? [ - { name: '房屋分布', tab: 'overview' }, - { name: '基础设施', tab: 'emergency' } + { name: '实时监测', tab: 'overview' }, + { name: '应急抢险', tab: 'emergency' } ] : [ { name: '应急机构', tab: 'yjjg', className: 'emergency_button' }, { name: '应急队伍', tab: 'yjdw', className: 'emergency_button' }, @@ -570,10 +570,10 @@ function Map(props) {
{s.name}
{s.className &&
7
}
- { + {/* { tab !== 'overview' && <>
- } + } */} }) } diff --git a/super-screen/client/src/sections/water-prevention/containers/homePage.js b/super-screen/client/src/sections/water-prevention/containers/homePage.js index 29f534c..cc06fa9 100644 --- a/super-screen/client/src/sections/water-prevention/containers/homePage.js +++ b/super-screen/client/src/sections/water-prevention/containers/homePage.js @@ -170,7 +170,7 @@ function homePage(props) { 水务防汛实时监测预警系统
-
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
+
{ dispatch(push('/homepage')) }} className='_exit' >返回平台
@@ -194,6 +194,7 @@ function homePage(props) { }} trendData={trendData} waterLevelAlarms={waterLevelAlarms} + emerResource={emerResource} />
diff --git a/super-screen/client/src/utils/webapi.js b/super-screen/client/src/utils/webapi.js index c6b3e0f..5fdc211 100644 --- a/super-screen/client/src/utils/webapi.js +++ b/super-screen/client/src/utils/webapi.js @@ -117,19 +117,19 @@ export const ApiTable = { lookField: 'lookField', //大屏-水务 - waterLogin: '_water/login', - getWaterLevelTrend: '_water/overview/monitoring-station', - getWaterStructures: '_water/organizations/84/structures', - getWaterVideoList: '_water/structures/{struIds}/ipcs?stationIds=undefined', - getYsAccessToken: '_water/yingshi/accessToken', - getWaterAlarms: '_water/axy/alarm?userId=1134&orderBy=endTime&orderDirection=desc&limit=10&offset=0', + waterLogin: '_water/_api/login', + getWaterLevelTrend: '_water/_api/overview/monitoring-station', + getWaterStructures: '_water/_api/organizations/84/structures', + getWaterVideoList: '_water/_api/structures/{struIds}/ipcs?stationIds=undefined', + getYsAccessToken: '_water/_api/yingshi/accessToken', + getWaterAlarms: '_water/_api/axy/alarm?userId=1134&orderBy=endTime&orderDirection=desc&limit=10&offset=0', //安监 - worksafetyLogin: '_worksafety/project/login', - getEmerOrgList: '_worksafety/emergency/resource-org-list', // 应急机构 - getEmerTeamList: '_worksafety/emergency/resource-team-list', // 应急队伍 - getEmerExpertList: '_worksafety/emergency/resource-expert-list', // 应急专家 - getEmerMedicalList: '_worksafety/emergency/resource-medical-list', // 医疗机构 - getEmerRefugeList: '_worksafety/emergency/resource-refuge-list', // 避难场所 + worksafetyLogin: '_worksafety/_api/project/login', + getEmerOrgList: '_worksafety/_api/emergency/resource-org-list', // 应急机构 + getEmerTeamList: '_worksafety/_api/emergency/resource-team-list', // 应急队伍 + getEmerExpertList: '_worksafety/_api/emergency/resource-expert-list', // 应急专家 + getEmerMedicalList: '_worksafety/_api/emergency/resource-medical-list', // 医疗机构 + getEmerRefugeList: '_worksafety/_api/emergency/resource-refuge-list', // 避难场所 }; export const RouteTable = {