diff --git a/super-screen/client/assets/images/homepage/communtity/monitor.png b/super-screen/client/assets/images/homepage/communtity/monitor.png new file mode 100644 index 0000000..777a567 Binary files /dev/null and b/super-screen/client/assets/images/homepage/communtity/monitor.png differ diff --git a/super-screen/client/assets/images/homepage/enter/bg.gif b/super-screen/client/assets/images/homepage/enter/bg.gif new file mode 100644 index 0000000..c5a5bf0 Binary files /dev/null and b/super-screen/client/assets/images/homepage/enter/bg.gif differ diff --git a/super-screen/client/assets/images/homepage/enter/bg.png b/super-screen/client/assets/images/homepage/enter/bg.png deleted file mode 100644 index e31d45b..0000000 Binary files a/super-screen/client/assets/images/homepage/enter/bg.png and /dev/null differ diff --git a/super-screen/client/assets/images/homepage/fire/add.png b/super-screen/client/assets/images/homepage/fire/add.png new file mode 100644 index 0000000..fad3be7 Binary files /dev/null and b/super-screen/client/assets/images/homepage/fire/add.png differ diff --git a/super-screen/client/assets/images/homepage/fire/location_infowindow.png b/super-screen/client/assets/images/homepage/fire/location_infowindow.png new file mode 100644 index 0000000..9a65e91 Binary files /dev/null and b/super-screen/client/assets/images/homepage/fire/location_infowindow.png differ diff --git a/super-screen/client/assets/images/homepage/fire/reportbg.png b/super-screen/client/assets/images/homepage/fire/reportbg.png new file mode 100644 index 0000000..7b91309 Binary files /dev/null and b/super-screen/client/assets/images/homepage/fire/reportbg.png differ diff --git a/super-screen/client/assets/images/homepage/water/_monitor.png b/super-screen/client/assets/images/homepage/water/_monitor.png new file mode 100644 index 0000000..038118c Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/_monitor.png differ diff --git a/super-screen/client/assets/images/homepage/water/back.png b/super-screen/client/assets/images/homepage/water/back.png new file mode 100644 index 0000000..4a0faae Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/back.png differ diff --git a/super-screen/client/assets/images/homepage/water/bncs.png b/super-screen/client/assets/images/homepage/water/bncs.png new file mode 100644 index 0000000..8a30e50 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/bncs.png differ diff --git a/super-screen/client/assets/images/homepage/water/bncsselect.png b/super-screen/client/assets/images/homepage/water/bncsselect.png new file mode 100644 index 0000000..b389d55 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/bncsselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/devicebutton.png b/super-screen/client/assets/images/homepage/water/devicebutton.png new file mode 100644 index 0000000..33f50cf Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/devicebutton.png differ diff --git a/super-screen/client/assets/images/homepage/water/devicebuttonselect.png b/super-screen/client/assets/images/homepage/water/devicebuttonselect.png new file mode 100644 index 0000000..a2eacbb Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/devicebuttonselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/docbg.png b/super-screen/client/assets/images/homepage/water/docbg.png new file mode 100644 index 0000000..1143c54 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/docbg.png differ diff --git a/super-screen/client/assets/images/homepage/water/dotbg.png b/super-screen/client/assets/images/homepage/water/dotbg.png new file mode 100644 index 0000000..2298d8b Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/dotbg.png differ diff --git a/super-screen/client/assets/images/homepage/water/high_risk.png b/super-screen/client/assets/images/homepage/water/high_risk.png new file mode 100644 index 0000000..3c1321d Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/high_risk.png differ diff --git a/super-screen/client/assets/images/homepage/water/home.png b/super-screen/client/assets/images/homepage/water/home.png new file mode 100644 index 0000000..b25d171 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/home.png differ diff --git a/super-screen/client/assets/images/homepage/water/homeselect.png b/super-screen/client/assets/images/homepage/water/homeselect.png new file mode 100644 index 0000000..e5e2fde Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/homeselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/left.png b/super-screen/client/assets/images/homepage/water/left.png new file mode 100644 index 0000000..821f0de Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/left.png differ diff --git a/super-screen/client/assets/images/homepage/water/low_risk.png b/super-screen/client/assets/images/homepage/water/low_risk.png new file mode 100644 index 0000000..ed0b83f Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/low_risk.png differ diff --git a/super-screen/client/assets/images/homepage/water/middle_risk.png b/super-screen/client/assets/images/homepage/water/middle_risk.png new file mode 100644 index 0000000..fe8fb1a Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/middle_risk.png differ diff --git a/super-screen/client/assets/images/homepage/water/off.png b/super-screen/client/assets/images/homepage/water/off.png new file mode 100644 index 0000000..3c55d1b Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/off.png differ diff --git a/super-screen/client/assets/images/homepage/water/on.png b/super-screen/client/assets/images/homepage/water/on.png new file mode 100644 index 0000000..3eaa80e Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/on.png differ diff --git a/super-screen/client/assets/images/homepage/water/realrightbg.png b/super-screen/client/assets/images/homepage/water/realrightbg.png new file mode 100644 index 0000000..6647744 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/realrightbg.png differ diff --git a/super-screen/client/assets/images/homepage/water/realtitle.png b/super-screen/client/assets/images/homepage/water/realtitle.png new file mode 100644 index 0000000..a5740d3 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/realtitle.png differ diff --git a/super-screen/client/assets/images/homepage/water/right.png b/super-screen/client/assets/images/homepage/water/right.png new file mode 100644 index 0000000..84e6f47 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/right.png differ diff --git a/super-screen/client/assets/images/homepage/water/waterinfowindow.png b/super-screen/client/assets/images/homepage/water/waterinfowindow.png new file mode 100644 index 0000000..fcdb41d Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/waterinfowindow.png differ diff --git a/super-screen/client/assets/images/homepage/water/waterwarningbg.png b/super-screen/client/assets/images/homepage/water/waterwarningbg.png new file mode 100644 index 0000000..ee6055e Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/waterwarningbg.png differ diff --git a/super-screen/client/assets/images/homepage/water/weather.png b/super-screen/client/assets/images/homepage/water/weather.png new file mode 100644 index 0000000..6e65e7a Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/weather.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjdw.png b/super-screen/client/assets/images/homepage/water/yjdw.png new file mode 100644 index 0000000..fba3f47 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjdw.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjdwselect.png b/super-screen/client/assets/images/homepage/water/yjdwselect.png new file mode 100644 index 0000000..83ea79b Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjdwselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjjg.png b/super-screen/client/assets/images/homepage/water/yjjg.png new file mode 100644 index 0000000..9939c6e Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjjg.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjjgselect.png b/super-screen/client/assets/images/homepage/water/yjjgselect.png new file mode 100644 index 0000000..8fc7ff0 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjjgselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjzj.png b/super-screen/client/assets/images/homepage/water/yjzj.png new file mode 100644 index 0000000..e635b54 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjzj.png differ diff --git a/super-screen/client/assets/images/homepage/water/yjzjselect.png b/super-screen/client/assets/images/homepage/water/yjzjselect.png new file mode 100644 index 0000000..8c3610a Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yjzjselect.png differ diff --git a/super-screen/client/assets/images/homepage/water/yljg.png b/super-screen/client/assets/images/homepage/water/yljg.png new file mode 100644 index 0000000..32b1f79 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yljg.png differ diff --git a/super-screen/client/assets/images/homepage/water/yljgselect.png b/super-screen/client/assets/images/homepage/water/yljgselect.png new file mode 100644 index 0000000..425f4c4 Binary files /dev/null and b/super-screen/client/assets/images/homepage/water/yljgselect.png differ diff --git a/super-screen/client/src/components/public/index.less b/super-screen/client/src/components/public/index.less index dbc079e..b998586 100644 --- a/super-screen/client/src/components/public/index.less +++ b/super-screen/client/src/components/public/index.less @@ -93,6 +93,7 @@ border: 1px solid #12B2E5; background-color: rgba(91, 193, 255, 0.2); margin-right: 3px; + cursor: pointer; } ._item { @@ -104,5 +105,21 @@ border: 1px solid #0B6AEA; background-color: rgba(35, 108, 254, 0.3); margin-right: 3px; + cursor: pointer; } +} + +.children-container { + height: calc(100% - 42px); + background-image: linear-gradient(180deg, #04377ecc 1%, #001241 100%); +} + +.box_header_bg { + background: url(/assets/images/homePage/bigscreen/headertitlebg.png) no-repeat; + background-size: 100% 100%; + height: 42px; + padding-top: 4px; + word-break: keep-all; + white-space: nowrap; + width: 100%; } \ No newline at end of file diff --git a/super-screen/client/src/components/public/table-card.js b/super-screen/client/src/components/public/table-card.js index d538efd..4a19012 100644 --- a/super-screen/client/src/components/public/table-card.js +++ b/super-screen/client/src/components/public/table-card.js @@ -1,45 +1,43 @@ 'use strict' -import React from 'react' +import React, { useState } from 'react' import './index.less' -class Box extends React.Component { - render() { - const { title, height = '100%', children, margin, overflow, subtitle, subtitleSelect } = this.props +function Box(props) { + const [range, setRange] = useState('week'); + const { title, height = '100%', children, margin, overflow, subtitle, subtitleSelect } = props - const headerbg = { - background: 'url(/assets/images/homePage/bigscreen/headertitlebg.png) no-repeat', - backgroundSize: '100% 100%', - } - return ( -
-
+
-
- {title} + }}> +
+ {title} - {subtitle &&
-
本周
-
本月
-
本年
-
} - - {subtitleSelect &&
- {subtitleSelect} -
} -
-
- {children} -
+ {subtitle &&
+ {[ + { key: 'week', name: '本周' }, + { key: 'month', name: '本月' }, + { key: 'year', name: '本年' } + ].map(s => { + return
{ setRange(s.key) }} + className={range == s.key ? '_item_select' : '_item'}>{s.name}
+ })} +
} + {subtitleSelect &&
+ {subtitleSelect} +
} +
+
+ {children}
- ) - } +
+ ) } + export default Box diff --git a/super-screen/client/src/sections/community-safty/containers/gis.js b/super-screen/client/src/sections/community-safty/containers/gis.js index 955a333..f7e766c 100644 --- a/super-screen/client/src/sections/community-safty/containers/gis.js +++ b/super-screen/client/src/sections/community-safty/containers/gis.js @@ -3,6 +3,7 @@ import { connect } from 'react-redux'; import { render } from 'react-dom'; import { data as heatmapData } from './data' import './gis.less' + const MAPDOMID = 'fs-amap-container'; let map = null; let heatmap = null; @@ -141,7 +142,7 @@ function Map(props) {
{ map.clearInfoWindow(); }} /> -
+
小区名称 小区名称
@@ -404,20 +405,39 @@ function Map(props) { } const renderRightBottom = () => { - return
-
-
- 廉租房 -
-
-
- 回迁房 -
-
-
- 城中村 + return tab == 'person' ? +
+
+
特殊人群
+ +
+ 新生儿热力图 + 单位:人/平方公里 +
+ +
+
+ 0 + 10 + 20 + 30 + 40 +
+
: +
+
+
+ 廉租房 +
+
+
+ 回迁房 +
+
+
+ 城中村 +
-
} return ( diff --git a/super-screen/client/src/sections/community-safty/containers/gis.less b/super-screen/client/src/sections/community-safty/containers/gis.less index e0d7ee0..f817e6f 100644 --- a/super-screen/client/src/sections/community-safty/containers/gis.less +++ b/super-screen/client/src/sections/community-safty/containers/gis.less @@ -456,4 +456,64 @@ letter-spacing: 0; } } +} + +.person_home_right { + position: absolute; + right: 26%; + bottom: 7%; + z-index: 999; + width: 224px; + height: 96px; + background-image: linear-gradient(270deg, rgba(4, 55, 126, 0.65) 0%, rgba(0, 18, 65, 0.69) 50%, rgba(0, 18, 65, 0.65) 96%); + padding-left: 5px; + + ._right_row1 { + width: 100%; + display: flex; + align-items: center; + padding-right: 22px; + justify-content: flex-end; + + .monitor_text { + background: linear-gradient(180deg, #FFFFFF, rgba(17, 124, 213, 1)); + background-clip: border-box; + -webkit-background-clip: text; + color: transparent; + font-family: YouSheBiaoTiHei; + font-size: 16px; + letter-spacing: 0; + } + + ._monitor { + width: 7.39px; + height: 6px; + background: url('/assets/images/homepage/communtity/monitor.png') no-repeat; + background-size: 100% 100%; + margin-right: 13px; + } + } + + .legend_color { + width: 210.77px; + height: 3px; + background-image: linear-gradient(90deg, #A1FF00 1%, #FFF800 23%, #EF8C00 74%, #FF0000 100%); + } + + ._title_1 { + background: linear-gradient(180deg, #FFFFFF, rgba(17, 124, 213, 1)); + background-clip: border-box; + -webkit-background-clip: text; + color: transparent; + font-family: YouSheBiaoTiHei; + font-size: 16px; + } + + ._title_2 { + font-family: SourceHanSansCN-Medium; + font-weight: 500; + font-size: 12px; + color: #93ABC0; + } + } \ No newline at end of file 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 9a28aaa..cdb10cb 100644 --- a/super-screen/client/src/sections/community-safty/containers/homePage.js +++ b/super-screen/client/src/sections/community-safty/containers/homePage.js @@ -8,6 +8,7 @@ import RightTop from '../components/city-safty' import RightMiddle from '../components/special-person' import RightBottom from '../components/traffic-ranking' import Gis from './gis'; +import Weather from '../../water-prevention/components/weather'; import './style.less' function homePage(props) { @@ -23,7 +24,8 @@ function homePage(props) {
流动人口
-
{ dispatch(push('/metadataManagement/latestMetadata')) }} className='_exit' >返回平台
+ +
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
diff --git a/super-screen/client/src/sections/community-safty/containers/style.less b/super-screen/client/src/sections/community-safty/containers/style.less index 9b1cbaf..3befb10 100644 --- a/super-screen/client/src/sections/community-safty/containers/style.less +++ b/super-screen/client/src/sections/community-safty/containers/style.less @@ -257,4 +257,5 @@ left: 0; width: 100%; height: 100%; -} \ No newline at end of file +} + diff --git a/super-screen/client/src/sections/fire-control/components/item-left.js b/super-screen/client/src/sections/fire-control/components/item-left.js index 46b8ab2..6c86b1b 100644 --- a/super-screen/client/src/sections/fire-control/components/item-left.js +++ b/super-screen/client/src/sections/fire-control/components/item-left.js @@ -11,7 +11,18 @@ function BasicInfo(props) {
{ props.endEvent() }}>结束案件
南昌县第一消防大队
- +
+
着火场所
+
住宅
+
人员分布情况
+
密集
+
+
+
着火物质
+
煤气
+
是否需要救援
+
+
diff --git a/super-screen/client/src/sections/fire-control/components/item-right.js b/super-screen/client/src/sections/fire-control/components/item-right.js index 8c285a8..56b6a59 100644 --- a/super-screen/client/src/sections/fire-control/components/item-right.js +++ b/super-screen/client/src/sections/fire-control/components/item-right.js @@ -1,7 +1,15 @@ import React from 'react' import { Box } from '$components'; -function BasicInfo() { +function BasicInfo(props) { + const { emengencyTab } = props; + const tab_name = { + yjjg: '应急机构', + yjdw: '应急队伍', + yjzj: '应急专家', + yljg: '医疗机构', + bncs: '避难场所', + } return
@@ -12,7 +20,7 @@ function BasicInfo() {
场所名称
-
南昌县人民公园中心市场
+
{tab_name[emengencyTab] + s}
场所地点
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 e6551dd..c181374 100644 --- a/super-screen/client/src/sections/fire-control/components/style.less +++ b/super-screen/client/src/sections/fire-control/components/style.less @@ -20,6 +20,17 @@ color: #ECF7FF; } + @media screen and (min-height:1080px) { + + .alarm_time { + height: 185px; + } + + .event_title { + margin-top: 30px; + } + } + .end_event { width: 202px; height: 39px; @@ -42,7 +53,7 @@ justify-content: space-around; align-items: center; width: 81%; - margin-top: 30px; + margin-top: 15px; margin-bottom: 10px; .event_title_left { @@ -64,7 +75,43 @@ height: 160px; background: url('/assets/images/homePage/fire/secondbg.png') no-repeat; background-size: 100% 100%; + display: flex; + justify-content: space-between; + + ._title { + font-size: 14px; + color: #5999C8; + } + + ._content { + font-size: 16px; + color: #ECF7FF; + } + ._second_item1 { + width: 95px; + height: 100%; + text-align: right; + padding-top: 12px; + + } + + ._second_item2 { + width: 155px; + height: 100%; + padding-top: 12px; + } + + @media screen and (min-height:1080px) { + + ._second_item1 { + padding-top: 24px; + } + + ._second_item2 { + padding-top: 24px; + } + } } .left_third_bg { diff --git a/super-screen/client/src/sections/fire-control/constant/index.js b/super-screen/client/src/sections/fire-control/constant/index.js new file mode 100644 index 0000000..ceb1435 --- /dev/null +++ b/super-screen/client/src/sections/fire-control/constant/index.js @@ -0,0 +1,130 @@ +115.921049, 28.559176 +115.926542, 28.559327 +115.921218, 28.555168 +115.926311, 28.55532 +export const heatmapData = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "count": 6 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.921049, 28.559176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 3 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.922049, 28.556176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 2 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.923049, 28.556176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 2 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.924049, 28.557176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 5 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.925049, 28.558176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 7 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.926049, 28.556176 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 8 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.92365, 28.557404 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 8 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.92465, 28.555404 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 8 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.92465, 28.556404 + ] + } + }, + { + "type": "Feature", + "properties": { + "count": 8 + }, + "geometry": { + "type": "Point", + "coordinates": [ + 115.92565, 28.557404 + ] + } + }, + ] +} + diff --git a/super-screen/client/src/sections/fire-control/containers/gis.js b/super-screen/client/src/sections/fire-control/containers/gis.js index cae8946..981d0d4 100644 --- a/super-screen/client/src/sections/fire-control/containers/gis.js +++ b/super-screen/client/src/sections/fire-control/containers/gis.js @@ -1,22 +1,34 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { render } from 'react-dom'; -import { Row, Col } from 'antd'; -import { data as heatmapData } from './data' +import { Row, Col, Modal, Form, Input, Select } from 'antd'; +import { heatmapData } from '../constant/index' import './gis.less' const MAPDOMID = 'fs-amap-container'; +const LOCATION_MAP_ID = 'location_map_id'; let map = null; let heatmap = null; let loca = null; let interval = null; -const MARKER_IMG_NAME = { - markergreen: '回迁房', - markerblue: '城中村', - markeryellow: '廉租房', -} + +const tabs = [ + { name: '应急机构', tab: 'yjjg', className: 'emergency_button' }, + { name: '应急队伍', tab: 'yjdw', className: 'emergency_button' }, + { name: '应急专家', tab: 'yjzj', className: 'emergency_button' }, + { name: '医疗机构', tab: 'yljg', className: 'emergency_button' }, + { name: '避难场所', tab: 'bncs', className: 'emergency_button' }, +] + +const { Option } = Select; + function Map(props) { const [delay, setDelay] = useState(true) - const [tab, setTab] = useState('home') + const [tab, setTab] = useState('yjjg') + const [visible, setVisible] = useState(false) + const [level, setLevel] = useState('I') + const [alarmData, setAlarmData] = useState() + const [locationVisible, setLocationVisible] = useState(false) + const [lnglat, setLnglat] = useState() // 地图初始化 const loadMap = () => { // 图片图层 实现瓦片地图中国地图样式 bounds 第一个点为左下角 第二个点为右上角 @@ -81,8 +93,42 @@ function Map(props) { // 初始化GIS 组件销毁清空定时器 useEffect(() => { loadMap(); + map && renderAlarms() + loca && renderHeapLayer() }, []); + useEffect(() => { + if (alarmData) renderAlarmInfowindow(alarmData) + }, [level]) + + + useEffect(() => { + + setTimeout(() => { + if (locationVisible && document.getElementById(LOCATION_MAP_ID)) { + const locationMap = new AMap.Map(LOCATION_MAP_ID, { + // center: [116.054664, 28.538966], + zoomEnable: true, + dragEnable: true, + cursor: 'pointer', + }); + + locationMap.on('click', (e) => { + locationMap.clearMap(); + const marker = new AMap.Marker({ + icon: '/assets/images/homepage/fire/position.png', + position: e.lnglat, + offset: new AMap.Pixel(-5, -15) + }); + marker.setMap(locationMap); + setLnglat(e.lnglat.lng + ',' + e.lnglat.lat) + }) + } + }, 200); + + + }, [locationVisible]) + const renderMarkers = () => { map.clearMap(); map.setZoom(10.3) @@ -300,7 +346,7 @@ function Map(props) { } const renderAlarms = () => { - map.clearMap(); + // map.clearMap(); const alarms = [ { lng: 115.92365, lat: 28.557404, type: 'device', name: '廉租房1', kind: 'markeralarm' }, ] @@ -317,9 +363,27 @@ function Map(props) { marker.setTitle(x.name); map.add(marker); + var circle = new AMap.Circle({ + center: [x.lng, x.lat], + radius: 300, //半径 + borderWeight: 3, + strokeColor: "#AE0000", + strokeOpacity: 1, + strokeWeight: 6, + strokeOpacity: 0.8, + fillOpacity: 0.2, + // strokeStyle: 'dashed', + strokeDasharray: [10, 10], + // 线样式还支持 'dashed' + fillColor: 'rgba(243, 0, 0, 0.15)', + zIndex: 50, + }) + + map.add(circle); + let infowindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 - content: `
+ content: `
`, offset: new AMap.Pixel(233, 260) }); @@ -335,88 +399,164 @@ function Map(props) { let position = marker.getPosition ? marker.getPosition() : marker.getCenter(); infowindow.open(map, position); map.setCenter(position) + setAlarmData(x) setTimeout(() => { if (document.getElementById(`alarmcontentid${x.name}`)) { - render(
-
{ - map.setCenter([115.922069, 28.554867]) - map.clearInfoWindow(); - }} /> - -
- 地址信息: - 南湖大道 -
-
- 告警来源: - 烟雾报警 -
-
- 告警内容 - 火情 -
- - -
请根据火灾态势,选择应急预案等级
- - I级 - II级 - III级 - IV级 - -
-
-
{ props.alarmOk() }}>是
-
-
, - document.getElementById(`alarmcontentid${x.name}`)); + renderAlarmInfowindow(x) } }, 50) }) }) } - const renderLeftTop = () => { - return tab == 'person' ? -
-
区域总人数
-
455
+ const renderHeapLayer = () => { + var geo = new Loca.GeoJSONSource({ + data: heatmapData + }); -
新生儿总数
-
45
+ heatmap = new Loca.HeatMapLayer({ + // loca, + zIndex: 60, + opacity: 1, + visible: true, + zooms: [2, 22], + }); -
老人总数
-
45
-
: -
-
租赁房屋总数
-
4556
+ heatmap.setSource(geo, { + radius: 50, + unit: 'px', + height: 10, + // radius: 10, + // unit: 'px', + // height: 10, + gradient: { + 0.1: 'rgba(50,48,118,1)', + 0.2: 'rgba(127,60,255,1)', + 0.4: 'rgba(166,53,219,1)', + 0.6: 'rgba(254,64,95,1)', + 0.8: 'rgba(255,98,4,1)', + 1: 'rgba(236,220,79,1)', + }, + value: function (index, feature) { + return feature.properties.count; + }, + min: 0, + max: 10, //4.6 + heightBezier: [0, .53, .37, .98], + }); + loca.add(heatmap); + } -
回迁房总数
-
4556
+ const renderAlarmInfowindow = (x) => { + return x && render(
+
{ + map.setCenter([115.922069, 28.554867]) + map.clearInfoWindow(); + }} /> -
城中村总数
-
4556
+
+ 地址信息: + 南湖大道 +
+
+ 告警来源: + 烟雾报警 +
+
+ 告警内容 + 火情 +
+ +
消除警情
+ +
请根据火灾态势,选择应急预案等级
+ + {['I', 'II', 'III', 'IV'].map(s => { + return { setLevel(s) }} + span={6} + style={{ + border: level == s ? '1px solid #fff' : '', + textAlign: 'center' + }}>{s} + })} + +
+
+
{ props.alarmOk() }}>是
+
+
, + document.getElementById(`alarmcontentid${x.name}`)); + } + const renderLeftTop = () => { + return
{ setVisible(true) }} /> + } -
廉租房
-
4556
+ const layout = { + labelCol: { span: 8 }, + wrapperCol: { span: 12 }, + }; + const renderInfowindow = () => { + return
+
{ setVisible(false) }} /> +
+ + + + { + setLocationVisible(true) + }} + name="地点" label="地点" > + {/* */} +
{ setLocationVisible(true) }} + style={{ color: 'rgba(89, 153, 200, 1)', paddingLeft: 12 }}>请选择事件地点
+
+ + + + + + + + + +
+ +
+
取消
+
上报
+ +
} - const renderRightBottom = () => { - return
-
-
- 廉租房 + const renderLocationInfowindow = () => { + return
+
{ setLocationVisible(false) }} /> + +
+ 经纬度: + {lnglat}
-
-
- 回迁房 +
+ 坐标点位置: +
-
-
- 城中村 +
+ +
+
+ 重置点位 +
+
+ 确认选择 +
} @@ -433,31 +573,64 @@ function Map(props) { {/* 地图容器 */}
{/* {map && renderMarkers()} */} - {map && renderAlarms()} + {/* 底部按钮 */} - {/* {!delay && [ - { name: '房屋分布', tab: 'home' }, - { name: '人口分布', tab: 'person' }, - { name: '基础设施', tab: 'device' } - ].map((s, index) => { - return
{ setTab(s.tab) }} - > -
-
{s.name}
-
+ {props.propTab == 'item' && tabs.map((s, index) => { + return <> +
{ + setTab(s.tab) + s.className ? props.changeEmengencyTab(s.tab) : props.changeTab(s.tab) + }} + > +
+
{s.name}
+ {s.className &&
7
} +
+
+
+ }) - } */} + } {/* 左上角图例 */} - {/* {renderLeftTop()} - {renderRightBottom()} */} + {renderLeftTop()} {/* 四周遮罩 */}
+ + + {renderInfowindow()} + + + + {renderLocationInfowindow()} + ); } diff --git a/super-screen/client/src/sections/fire-control/containers/gis.less b/super-screen/client/src/sections/fire-control/containers/gis.less index f9854f4..9b9c68e 100644 --- a/super-screen/client/src/sections/fire-control/containers/gis.less +++ b/super-screen/client/src/sections/fire-control/containers/gis.less @@ -116,7 +116,7 @@ } -.gis-infowindow { +.fire-gis-infowindow { width: 302px; height: 420px; background: url('/assets/images/homepage/communtity/infowindowbg.png') no-repeat; @@ -124,7 +124,7 @@ opacity: 0.8; padding-left: 69px; padding-left: 22px; - padding-top: 157px; + padding-top: 127px; color: #fff; .gis_exit { @@ -164,9 +164,25 @@ line-height: 21px; } } + + .clear_alarm { + width: 92px; + height: 30px; + background-image: linear-gradient(180deg, #3072D2 0%, rgba(0, 41, 117, 0.43) 51%, #163FA6 100%); + border: 1.5px solid #005AB7; + box-shadow: inset 0 1px 14px 0 rgba(18, 142, 232, 0.35); + border-radius: 4px; + font-size: 14px; + color: #FFFFFF; + text-align: center; + line-height: 27px; + margin-bottom: 20px; + cursor: pointer; + margin-left: 87px; + } } -.gis-infowindow-alarm { +.fire-gis-infowindow-alarm { background: url('/assets/images/homepage/communtity/alarminfowindow.png') no-repeat; height: 432px; width: 311px; @@ -268,58 +284,16 @@ } -.home_left { +.home_left_add { position: absolute; left: 26%; top: 3%; z-index: 999; - font-family: YouSheBiaoTiHei; - font-size: 16px; - color: #FFFFFF; - letter-spacing: 1.33px; - text-shadow: -2px 0 0 #0C5FA6; - - .hometotalbg { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/total.png') no-repeat; - background-size: 100% 100%; - } - - .home_total_number { - font-family: D-DIN-Italic; - font-weight: Italic; - font-size: 28px; - color: #EAF2FF; - letter-spacing: 0; - margin-left: 40px; - } - - .hqtotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/hqtotal.png') no-repeat; - background-size: 100% 100%; - } - - .cztotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/cztotal.png') no-repeat; - background-size: 100% 100%; - } - - .lztotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/lztotal.png') no-repeat; - background-size: 100% 100%; - } - + width: 112px; + height: 51px; + background: url('/assets/images/homepage/fire/add.png') no-repeat; + background-size: 100% 100%; + cursor: pointer; } .home_right { @@ -405,4 +379,167 @@ letter-spacing: 0; } } +} + +.custom-modal { + .ant-modal-content { + background-color: transparent !important; + box-shadow: none !important; + } +} + +.report_container { + width: 360px; + height: 455px; + background: url('/assets/images/homepage/fire/reportbg.png') no-repeat; + background-size: 100% 100%; + color: rgba(195, 230, 255, 1); + padding-top: 124px; + + .gis_exit { + cursor: pointer; + position: absolute; + right: -16px; + top: 50px; + width: 30.75px; + height: 23px; + background: url('/assets/images/homepage/communtity/exit.png') no-repeat; + background-size: 100% 100%; + cursor: pointer; + } + + .cancel_button { + width: 92px; + height: 30px; + background-image: linear-gradient(180deg, #3072D2 0%, rgba(0, 41, 117, 0.43) 51%, #163FA6 100%); + border: 1.5px solid #005AB7; + box-shadow: inset 0 1px 14px 0 rgba(18, 142, 232, 0.35); + border-radius: 4px; + text-align: center; + line-height: 26px; + cursor: pointer; + } + + .report_button { + width: 92px; + height: 30px; + background-image: linear-gradient(180deg, #00ACC5 1%, rgba(0, 158, 182, 0.43) 52%, #00ACC5 100%); + border: 1.5px solid #009DB4; + box-shadow: inset 0 1px 14px 0 rgba(43, 240, 255, 0.35); + border-radius: 4px; + text-align: center; + line-height: 26px; + cursor: pointer; + } + + .ant-form-item-label>label { + color: rgba(195, 230, 255, 1) !important; + } + + .ant-select:not(.ant-select-customize-input) .ant-select-selector { + background-color: transparent !important; + border: 1px solid transparent !important; + } + + .ant-select-selection-placeholder { + color: rgba(89, 153, 200, 1) !important; + } + + .ant-select-arrow { + color: rgba(89, 153, 200, 1); + } + + .ant-input { + background-color: transparent !important; + border: 1px solid transparent !important; + color: rgba(89, 153, 200, 1); + } + + .ant-input-placeholder { + color: rgba(89, 153, 200, 1) !important; + } +} + +.location_infowindow { + width: 569px; + height: 580px; + background: url('/assets/images/homepage/fire/location_infowindow.png') no-repeat; + background-size: 100% 100%; + padding-top: 150px; + display: flex; + flex-direction: column; + padding-left: 20px; + + .gis_exit { + cursor: pointer; + position: absolute; + right: -17px; + top: 49px; + width: 30.75px; + height: 23px; + background: url('/assets/images/homepage/communtity/exit.png') no-repeat; + background-size: 100% 100%; + } + + .location_map { + width: 529px; + height: 222px; + margin-top: 20px; + } + + .info_div { + border-bottom: 1px solid rgba(5, 85, 167, 0.57); + color: rgba(255, 255, 255, 1); + font-size: 14px; + margin-top: 18px; + + .location_title { + color: rgba(195, 230, 255, 1); + margin-right: 12px; + } + } + + .ant-input { + background-color: transparent !important; + border: 1px solid transparent !important; + color: rgba(255, 255, 255, 1); + } + + .ant-input-placeholder { + color: rgba(89, 153, 200, 1) !important; + + } + + .location_btn_container { + display: flex; + width: 100%; + justify-content: space-around; + margin-top: 15px; + + .reset_btn { + width: 92px; + height: 30px; + background-image: linear-gradient(180deg, #3072D2 0%, rgba(0, 41, 117, 0.43) 51%, #163FA6 100%); + border: 1.5px solid #005AB7; + box-shadow: inset 0 1px 14px 0 rgba(18, 142, 232, 0.35); + border-radius: 4px; + color: #fff; + text-align: center; + line-height: 30px; + cursor: pointer; + } + + .ok_btn { + width: 92px; + height: 30px; + background-image: linear-gradient(180deg, #00ACC5 1%, rgba(0, 158, 182, 0.43) 52%, #00ACC5 100%); + border: 1.5px solid #009DB4; + box-shadow: inset 0 1px 14px 0 rgba(43, 240, 255, 0.35); + border-radius: 4px; + color: #fff; + text-align: center; + line-height: 30px; + cursor: pointer; + } + } } \ No newline at end of file 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 150ab21..b481139 100644 --- a/super-screen/client/src/sections/fire-control/containers/homePage.js +++ b/super-screen/client/src/sections/fire-control/containers/homePage.js @@ -11,13 +11,14 @@ import RightMiddle from '../components/right-middle' import RightBottom from '../components/right-bottom' import Gis from './gis'; import './style.less' - +import Weather from '../../water-prevention/components/weather'; function homePage(props) { const { dispatch } = props; const childStyle = { height: '32%', color: '#fff', marginBottom: 17 } const cardHeight = document.body.clientHeight * 0.896 * 0.32 const cardContentHeight = cardHeight - 42 - 13 const [tab, setTab] = useState('overview') + const [emengencyTab, setEmengencyTab] = useState('yjjg'); return <>
@@ -26,7 +27,8 @@ function homePage(props) {
一键护航
-
{ dispatch(push('/metadataManagement/latestMetadata')) }} className='_exit' >返回平台
+ +
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
@@ -53,9 +55,13 @@ function homePage(props) {
{ setTab('item') }} + changeEmengencyTab={(e) => { + setEmengencyTab(e) + }} />
@@ -71,7 +77,7 @@ function homePage(props) {
:
- +
}
diff --git a/super-screen/client/src/sections/homePage/containers/homePage copy.js b/super-screen/client/src/sections/homePage/containers/homePage copy.js deleted file mode 100644 index ef570f6..0000000 --- a/super-screen/client/src/sections/homePage/containers/homePage copy.js +++ /dev/null @@ -1,74 +0,0 @@ -import React, { useEffect, useState } from 'react' -import { connect } from 'react-redux'; -import { push } from 'react-router-redux'; -import AccessData from '../components/accessData' -import AlarmList from '../components/alarmList' -import DataShare from '../components/dataShare' -import DataTop5 from '../components/dataTop5' -import HotspotData from '../components/hotspotData' -import NodeResource from '../components/nodeResource' -import AbnormalMonitoring from '../components/abnormalMonitoring' -import CenterTop from '../components/centerTop' -import './style.less' - -function homePage(props) { - const { dispatch } = props; - const childStyle = { height: '32%', color: '#fff', marginBottom: 17 } - const cardHeight = document.body.clientHeight * 0.896 * 0.32 - const cardContentHeight = cardHeight - 42 - 13 - return
-
-
{ dispatch(push('/metadataManagement/latestMetadata')) }} className='_exit' >
进入后台
-
-
-
-
- -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
-
- -
-
- -
-
- -
-
-
-
- -} - -function mapStateToProps(state) { - const { - auth, global - } = state; - return { - clientHeight: global.clientHeight, - actions: global.actions, - - }; -} - -export default connect(mapStateToProps)(homePage); - - diff --git a/super-screen/client/src/sections/homePage/containers/style.less b/super-screen/client/src/sections/homePage/containers/style.less index bf3b8bd..851669c 100644 --- a/super-screen/client/src/sections/homePage/containers/style.less +++ b/super-screen/client/src/sections/homePage/containers/style.less @@ -4,7 +4,7 @@ position: absolute; top: 0; left: 0; - background: url('/assets/images/homePage/enter/bg.png') !important; + background: url('/assets/images/homePage/enter/bg.gif') !important; background-repeat: no-repeat; background-size: 100% 100%; overflow: hidden; diff --git a/super-screen/client/src/sections/water-prevention/components/emergency-left-top.js b/super-screen/client/src/sections/water-prevention/components/emergency-left-top.js index bcded96..2317d81 100644 --- a/super-screen/client/src/sections/water-prevention/components/emergency-left-top.js +++ b/super-screen/client/src/sections/water-prevention/components/emergency-left-top.js @@ -3,8 +3,33 @@ import { Box } from '$components'; function BasicInfo() { + const data = [ + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + { title: '防汛I级应急预案', url: '' }, + ] return - +
+ {data.map(s => { + return
+
+
查看
+
{s.title}
+
+ +
+ })} +
} diff --git a/super-screen/client/src/sections/water-prevention/components/emergency-right-top.js b/super-screen/client/src/sections/water-prevention/components/emergency-right-top.js index 087da32..fd9260a 100644 --- a/super-screen/client/src/sections/water-prevention/components/emergency-right-top.js +++ b/super-screen/client/src/sections/water-prevention/components/emergency-right-top.js @@ -3,7 +3,14 @@ import { Box } from '$components'; import './style.less'; function CitySafty(props) { - + const { emengencyTab } = props; + const tab_name = { + yjjg: '应急机构', + yjdw: '应急队伍', + yjzj: '应急专家', + yljg: '医疗机构', + bncs: '避难场所', + } return
{ @@ -13,7 +20,7 @@ function CitySafty(props) {
场所名称
-
南昌县人民公园中心市场
+
{tab_name[emengencyTab] + s}
场所地点
diff --git a/super-screen/client/src/sections/water-prevention/components/left-top.js b/super-screen/client/src/sections/water-prevention/components/left-top.js index b60c952..6da58ca 100644 --- a/super-screen/client/src/sections/water-prevention/components/left-top.js +++ b/super-screen/client/src/sections/water-prevention/components/left-top.js @@ -21,7 +21,59 @@ function BasicInfo() { ); return +
+
+
+
+
今天
+ 2023-06-21 +
+
+
+ 晴转多云 + 17-28℃ +
+
+
+
今日雨量
+
35m
+
+
+
+
+
+
+
明天
+
+
17-28℃
+
+
+
后天
+
+
17-28℃
+
+
+
+
+
明日雨量
+
35m
+
+
+ +
+ 影响人口: + 约611人 +
+
+ 预警等级: + 2 +
+
+ 防汛责任人: + 掌上明珠 1920394090697 +
+
} 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 017147d..23a7d79 100644 --- a/super-screen/client/src/sections/water-prevention/components/style.less +++ b/super-screen/client/src/sections/water-prevention/components/style.less @@ -596,7 +596,6 @@ } - //建设数据 .type-chart-wrapper { width: 220px; @@ -658,4 +657,222 @@ color: inherit; color: rgba(36, 220, 247, 1) !important; } +} + + +.super-dropdownClassName { + color: #a1c1d1 !important; + background-color: rgba(36, 220, 247, 0.3) !important; + border: 1px solid rgba(36, 220, 247, 1); + max-height: 200px; + + .ant-select-dropdown { + color: #a1c1d1 !important; + background-color: rgba(9, 22, 44, 0.75) !important; + } + + .ant-select-item-option-content { + color: #a1c1d1 !important; + } + + .ant-select-item-option-active { + color: #a1c1d1 !important; + background-color: rgba(36, 220, 247, 1) !important; + } + + .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { + color: rgba(0, 0, 0, 0.85); + background-color: rgba(36, 220, 247, 1); + } +} + +.real_state_container { + padding: 14px 36px 17px 12px; + height: 100%; + width: 100%; + + .real_weather { + display: flex; + margin-bottom: 2%; + + .weather_left { + width: calc(100% - 100px); + color: #C0E2FF; + + ._basictitlebg { + background: url('/assets/images/homePage/communtity/basictitlebg.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 220px; + height: 17.5px; + display: flex; + flex-direction: row; + justify-content: space-around; + align-items: center; + + ._basic_title { + font-family: YouSheBiaoTiHei; + font-size: 21px; + color: #FFFFFF; + letter-spacing: 0.74px; + width: 70px; + margin-top: -13px; + } + + ._basic_sub_title { + // font-family: YouSheBiaoTiHei; + font-size: 14px; + color: #C0E2FF; + letter-spacing: 0; + } + } + + .row1_container { + width: 220px; + height: 45px; + display: flex; + align-items: center; + justify-content: space-around; + padding-left: 20px; + } + + .row2_container { + width: 220px; + height: 75px; + display: flex; + align-items: center; + justify-content: space-around; + + .row2_item { + width: 50%; + display: flex; + flex-direction: column; + align-items: center; + + ._number { + font-family: YouSheBiaoTiHei; + font-size: 18px; + color: #FFFFFF; + } + } + } + + .weather_icon { + width: 43.02px; + height: 38px; + background: url('/assets/images/homePage/water/weather.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + display: inline-block; + } + } + + .weather_right { + width: 90px; + height: 77px; + background: url('/assets/images/homePage/water/realrightbg.png') no-repeat; + background-size: 100% 100%; + font-size: 14px; + color: #C3E6FF; + padding-left: 16px; + padding-top: 3px; + + .weather_data { + font-family: D-DIN-Italic; + font-weight: DIN; + font-size: 38px; + color: #FFFFFF; + } + } + + } + + + .basictextbg { + background: url('/assets/images/homePage/communtity/basictextbg.png') no-repeat; + background-size: 100% 100%; + height: 43px; + display: flex; + font-family: SourceHanSansCN-Medium; + font-weight: 500; + font-size: 13px; + color: #C0E2FF; + align-items: center; + justify-content: space-between; + padding-left: 16px; + padding-right: 16px; + margin-top: 14px; + + .row1_row3_subtitle { + font-size: 16px; + color: #FFFFFF; + letter-spacing: 0; + font-family: YouSheBiaoTiHei; + } + + ._row2_bg { + width: 28px; + height: 10px; + background: url(/assets/images/homePage/communtity/top1.png); + background-repeat: no-repeat; + background-size: 100% 100%; + display: inline-block; + text-align: center; + line-height: 1px; + font-size: 18px; + font-family: D-DIN-Italic; + } + } + + @media screen and (min-height:1080px) { + padding-top: 24px; + + .real_weather { + margin-bottom: 24px; + } + } +} + +.prevent_doc { + height: 100%; + width: 100%; + display: flex; + flex-wrap: wrap; + overflow: auto; + + .doc_container { + width: 50%; + height: 83px; + margin-bottom: 20px; + + .doc_bg { + width: 177px; + height: 83px; + background: url('/assets/images/homePage/water/docbg.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + position: relative; + + .doc_row1 { + position: absolute; + right: 20%; + top: 20px; + right: 29%; + top: 24px; + cursor: pointer; + } + + .doc_row2 { + position: absolute; + left: 49%; + top: 50px; + width: 121px; + color: #C3E6FF; + } + } + } +} + +.prevent_doc::-webkit-scrollbar { + width: 0 !important } \ No newline at end of file diff --git a/super-screen/client/src/sections/water-prevention/components/weather.js b/super-screen/client/src/sections/water-prevention/components/weather.js new file mode 100644 index 0000000..4e7536e --- /dev/null +++ b/super-screen/client/src/sections/water-prevention/components/weather.js @@ -0,0 +1,22 @@ +import React, { useEffect, useState } from 'react' +import moment from 'moment'; + +function Weather() { + + return
+
+
{moment().format('YYYY-MM-DD')}
+
{moment().format('HH:mm:ss')}
+
+
+
+
+
晴转多云
+
18~26℃
+
+
+} + +export default Weather; + + 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 dbd672a..e5d0985 100644 --- a/super-screen/client/src/sections/water-prevention/containers/gis.js +++ b/super-screen/client/src/sections/water-prevention/containers/gis.js @@ -7,6 +7,7 @@ const MAPDOMID = 'fs-amap-container1'; let map = null; let heatmap = null; let loca = null; +let gridLayer = null; let interval = null; const MARKER_IMG_NAME = { markergreen: '回迁房', @@ -67,7 +68,13 @@ function Map(props) { }) loca = new Loca.Container({ map: map }) - createText() + { map && renderMarkers() } + { map && renderAlarms() } + setTimeout(() => { + renderLayer() + createText() + }, 1000); + }; @@ -147,129 +154,85 @@ function Map(props) { map.setPitch(22.9) map.setRotation(1.7000) if (loca && heatmap) loca.remove(heatmap) - if (tab == 'person') { - var geo = new Loca.GeoJSONSource({ - data: heatmapData - }); + //初始层级 zoom14以下显示聚合点 + const data = [ + { lng: 116.117906, lat: 28.678096, type: 'home', name: '泵站1', kind: 'markergreen' }, + { lng: 116.195238, lat: 28.842114, type: 'home', name: '泵站2', kind: 'markerblue' }, + { lng: 116.037227, lat: 28.558811, type: 'home', name: '泵站3', kind: 'markeryellow' }, + { lng: 115.925856, lat: 28.558811, type: 'home', name: '泵站4', kind: 'markergreen' }, + { lng: 115.989847, lat: 28.484411, type: 'home', name: '泵站5', kind: 'markergreen' }, + ] - heatmap = new Loca.HeatMapLayer({ - // loca, - zIndex: 10, - opacity: 1, - visible: true, - zooms: [2, 22], + //初始点位显示 + data.map((x, index) => { + var marker = new AMap.Marker({ + position: new AMap.LngLat(x.lng, x.lat), + // 将一张图片的地址设置为 icon + icon: '/assets/images/homepage/water/_monitor.png', + // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 + offset: new AMap.Pixel(-13, -30), + zooms: [3, 14], }); - - heatmap.setSource(geo, { - radius: 20, - unit: 'px', - height: 10, - // radius: 10, - // unit: 'px', - // height: 10, - gradient: { - 0.1: 'rgba(50,48,118,1)', - 0.2: 'rgba(127,60,255,1)', - 0.4: 'rgba(166,53,219,1)', - 0.6: 'rgba(254,64,95,1)', - 0.8: 'rgba(255,98,4,1)', - 1: 'rgba(236,220,79,1)', - }, - value: function (index, feature) { - return feature.properties.count; - }, - min: 0, - max: 10, //4.6 - heightBezier: [0, .53, .37, .98], + marker.setTitle(x.name); + map.add(marker); + let infowindow = new AMap.InfoWindow({ + isCustom: true, //使用自定义窗体 + content: `
+
`, + offset: new AMap.Pixel(153, 260) }); - loca.add(heatmap); - - map.on('click', (e) => { - const feat = heatmap.queryFeature(e.pixel.toArray()); - const random = Math.random() - if (feat) { - let infowindow = new AMap.InfoWindow({ - isCustom: true, //使用自定义窗体 - content: `
-
`, - offset: new AMap.Pixel(133, 260) - }); - let position = map.getCenter(); - infowindow.open(map, position); - setTimeout(() => { - if (document.getElementById(`contentidheatmap${random}`)) { - render(
-
{ - map.clearInfoWindow(); - }} /> -
- 小区名称 - 小区名称 -
-
- 人口 - 2344人 + marker.on('click', () => { + let position = marker.getPosition ? marker.getPosition() : marker.getCenter(); + infowindow.open(map, position); + map.setCenter(position) + setTimeout(() => { + if (document.getElementById(`contentid${x.name}`)) { + render(
+
{ + map.setCenter([115.922069, 28.554867]) + map.clearInfoWindow(); + }} /> +
+ 泵站名称: + {x.name} +
+
+ 1#提升泵: +
-
- 新生儿 - 23人 +
+
+ 2#提升泵: +
-
- 老人 - 342人 +
+
+ 3#提升泵: +
-
, - document.getElementById(`contentidheatmap${random}`)); - } - }, 50) +
+
, + document.getElementById(`contentid${x.name}`)); + } + }, 50) + }) + }) - } - }); - } else { - //初始层级 zoom14以下显示聚合点 + + if (tab == 'device') { const data = [ - { lng: 116.117906, lat: 28.678096, type: 'home', name: '廉租房1', kind: 'markergreen' }, - { lng: 116.195238, lat: 28.842114, type: 'home', name: '廉租房2', kind: 'markerblue' }, - { lng: 116.037227, lat: 28.558811, type: 'home', name: '廉租房3', kind: 'markeryellow' }, - { lng: 115.925856, lat: 28.558811, type: 'home', name: '廉租房4', kind: 'markergreen' }, - { lng: 115.989847, lat: 28.484411, type: 'home', name: '廉租房5', kind: 'markergreen' }, - - { lng: 116.054664, lat: 28.538966, type: 'device', name: '廉租房1', kind: 'markergreen' }, - { lng: 116.074711, lat: 28.746745, type: 'device', name: '廉租房2', kind: 'markerblue' }, - { lng: 116.111632, lat: 28.56532, type: 'device', name: '廉租房3', kind: 'markeryellow' }, - { lng: 115.978519, lat: 28.56532, type: 'device', name: '廉租房4', kind: 'markergreen' }, - { lng: 115.95792, lat: 28.417395, type: 'device', name: '廉租房5', kind: 'markergreen' }, + { lng: 115.921895, lat: 28.556351, type: 'device', name: '廉租房1', kind: 'devicemarker' }, + { lng: 115.920839, lat: 28.555323, type: 'device', name: '廉租房2', kind: 'devicemarker' }, + { lng: 115.918329, lat: 28.55445, type: 'device', name: '廉租房3', kind: 'devicemarker' }, + { lng: 115.919309, lat: 28.553166, type: 'device', name: '廉租房1', kind: 'devicemarker' }, + { lng: 115.921585, lat: 28.553925, type: 'device', name: '廉租房2', kind: 'devicemarker' }, + { lng: 115.92565, lat: 28.556996, type: 'device', name: '廉租房3', kind: 'devicemarker' }, + { lng: 115.922671, lat: 28.558769, type: 'device', name: '廉租房1', kind: 'devicemarker' }, ] - //zoom14以上显示详情 - const databig = [ - { lng: 115.924246, lat: 28.554835, type: 'device', name: '廉租房1', kind: 'markergreenbig' }, - { lng: 115.921495, lat: 28.553053, type: 'device', name: '廉租房2', kind: 'markerbluebig' }, - { lng: 115.919115, lat: 28.557256, type: 'device', name: '廉租房3', kind: 'markeryellowbig' }, - ] - //初始点位显示 data.filter(s => s.type == tab).map((x, index) => { - var marker = new AMap.Marker({ - position: new AMap.LngLat(x.lng, x.lat), - // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', - // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 - offset: new AMap.Pixel(-13, -30), - zooms: [3, 14], - }); - marker.setTitle(x.name); - map.add(marker); - marker.on('click', () => { - map.setZoom(17.4) - map.setCenter([115.922069, 28.554867]) - map.setPitch(47.30) - map.setRotation(1.7000) - }) - }) - //下钻点位显示 - databig.map((x, index) => { var marker = new AMap.Marker({ position: new AMap.LngLat(x.lng, x.lat), // 将一张图片的地址设置为 icon @@ -280,80 +243,10 @@ function Map(props) { }); marker.setTitle(x.name); map.add(marker); - - let infowindow = new AMap.InfoWindow({ - isCustom: true, //使用自定义窗体 - content: `
-
`, - offset: new AMap.Pixel(233, 260) - }); - - marker.on('click', () => { - let position = marker.getPosition ? marker.getPosition() : marker.getCenter(); - infowindow.open(map, position); - map.setCenter(position) - setTimeout(() => { - if (document.getElementById(`contentid${x.name}`)) { - render(
-
{ - map.setCenter([115.922069, 28.554867]) - map.clearInfoWindow(); - }} /> -
- 小区名称 - {x.name} -
-
- 人流量 - 123次 - 房龄 - 9年 -
-
- 租赁中房屋 - 165套 -
-
- 网格员 - 张三 -
-
- 手机号码 - 15765845845 -
-
, - document.getElementById(`contentid${x.name}`)); - } - }, 50) - }) }) - - if (tab == 'device') { - const data = [ - { lng: 115.921895, lat: 28.556351, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - { lng: 115.920839, lat: 28.555323, type: 'device', name: '廉租房2', kind: 'devicemarker' }, - { lng: 115.918329, lat: 28.55445, type: 'device', name: '廉租房3', kind: 'devicemarker' }, - { lng: 115.919309, lat: 28.553166, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - { lng: 115.921585, lat: 28.553925, type: 'device', name: '廉租房2', kind: 'devicemarker' }, - { lng: 115.92565, lat: 28.556996, type: 'device', name: '廉租房3', kind: 'devicemarker' }, - { lng: 115.922671, lat: 28.558769, type: 'device', name: '廉租房1', kind: 'devicemarker' }, - ] - - data.filter(s => s.type == tab).map((x, index) => { - var marker = new AMap.Marker({ - position: new AMap.LngLat(x.lng, x.lat), - // 将一张图片的地址设置为 icon - icon: '/assets/images/homepage/communtity/' + x.kind + '.png', - // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 - offset: new AMap.Pixel(-13, -30), - zooms: [15, 19], - }); - marker.setTitle(x.name); - map.add(marker); - }) - } } + } const renderAlarms = () => { @@ -362,7 +255,7 @@ function Map(props) { } const alarms = [ - { lng: 115.92365, lat: 28.557404, type: 'device', name: '廉租房1', kind: 'markeralarm' }, + { lng: 116.044599, lat: 28.663869, type: 'device', name: 'xxx水位1', kind: 'markeralarm' }, ] alarms.map((x, index) => { @@ -372,14 +265,14 @@ function Map(props) { icon: '/assets/images/homepage/communtity/' + x.kind + '.png', // 设置了 icon 以后,设置 icon 的偏移量,以 icon 的 [center bottom] 为原点 offset: new AMap.Pixel(-13, -30), - zooms: [15, 19], + zooms: [3, 14], }); marker.setTitle(x.name); map.add(marker); let infowindow = new AMap.InfoWindow({ isCustom: true, //使用自定义窗体 - content: `
+ content: `
`, offset: new AMap.Pixel(233, 260) }); @@ -394,7 +287,7 @@ function Map(props) { marker.on('click', () => { let position = marker.getPosition ? marker.getPosition() : marker.getCenter(); infowindow.open(map, position); - map.setCenter(position) + // map.setCenter(position) setTimeout(() => { if (document.getElementById(`alarmcontentid${x.name}`)) { render(
@@ -403,33 +296,26 @@ function Map(props) { map.clearInfoWindow(); }} />
- 小区名称 + 点位名称 {x.name}
- 人流量 - 123次 - 房龄 - 9年 + 实时水位 + 7.86m
- 租赁中房屋 - 165套 + 预警水位 + 7.86m
- 网格员 - 张三 + 近1h雨量 + 1.5mm
- 手机号码 - 15765845845 + 告警 + 高风险
-
人流量较大,确认是否安装消防设施?
-
-
-
-
, document.getElementById(`alarmcontentid${x.name}`)); } @@ -439,50 +325,213 @@ function Map(props) { } const renderLeftTop = () => { - return tab == 'person' ? -
-
区域总人数
-
455
+ return
+ {[{ name: '高风险区域', key: 'high', data: 3 }, + { name: '中风险区域', key: 'middle', data: 13 }, + { name: '低风险区域', key: 'low', data: 13 }].map(s => { + return
+
+
+
+
+
{s.name}
+
{s.data}/21
+
+
+ })} -
新生儿总数
-
45
+
+ } -
老人总数
-
45
+ const renderRightBottom = () => { + return tab == 'overview' ? +
+
+
监测点
+
+ 预警阈值参照表 +
+
三级告警二级告警一级告警
+
+
+
+
+
+
+ 0m + 5m + 10m + 15m + 20m + 25m + 30m +
+
+
: -
-
租赁房屋总数
-
4556
- -
回迁房总数
-
4556
- -
城中村总数
-
4556
- -
廉租房
-
4556
- +
{ + setTab('overview') + props.changeTab('overview') + }}> +
返回实时监测
} - const renderRightBottom = () => { - return
-
-
- 廉租房 -
-
-
- 回迁房 + const renderWaterwarningbg = () => { + return
+
+
城区沿江水涝
未启动
+
[自然灾害事故]
-
-
- 城中村 +
+
2023-02-12 16:42:34
+
+ 6月11日上午11点左右,低洼堤坝出现江水倒灌灾,需要进行救援。6月11日上午11点左右,低洼堤坝出现江水倒灌灾,需要进行救援。 +
} + const tabs = tab == 'overview' ? [ + { name: '房屋分布', tab: 'overview' }, + { name: '基础设施', tab: 'emergency' } + ] : [ + { name: '应急机构', tab: 'yjjg', className: 'emergency_button' }, + { name: '应急队伍', tab: 'yjdw', className: 'emergency_button' }, + { name: '应急专家', tab: 'yjzj', className: 'emergency_button' }, + { name: '医疗机构', tab: 'yljg', className: 'emergency_button' }, + { name: '避难场所', tab: 'bncs', className: 'emergency_button' }, + ] + + const renderLayer = () => { + if (!loca) return; + const dataSource = [ + { lng: 116.194039, lat: 28.712472, data: 14 }, + { lng: 116.051963, lat: 28.546815, data: 25 }, + { lng: 116.064207, lat: 28.694385, data: 35 }, + { lng: 115.983192, lat: 28.345722, data: 20 } + ] + + if (gridLayer && loca) loca.remove(gridLayer) + + let data = [] + dataSource.map(x => { + data.push({ + "type": "Feature", "properties": { "time": 1534296083, x }, + "geometry": { "coordinates": [x.lng, x.lat], "type": "Point", x } + }) + }) + var geo = new Loca.GeoJSONSource({ + data: { + "features": data, "type": "FeatureCollection" + } + }); + + gridLayer = new Loca.GridLayer({ + // loca, + zIndex: 10, + opacity: 1, + visible: true, + zooms: [2, 22], + acceptLight: true, + // shinniness: 0, + // cullface: 'none', + // depth: true, + // hasSide: true, + }); + + + var colors = ['#FAE200', '#D27E37', '#C53634', '#C12B6E', '#A92E9A', '#67238A', '#211A50', '#18244E'].reverse(); + var heights = [100, 200, 400, 600, 800, 1400, 1800, 4000]; + gridLayer.setSource(geo); + gridLayer.setStyle({ + unit: 'meter', + radius: 200, + gap: 0, + altitude: 100, + // height: function (index, feature) { + // return 6000 + + // }, + // topColor: function (index, feature) { + // console.log(feature) + // return 'red' + // }, + // sideColor: function (index, feature) { + // return 'red' + // } + height: function (index, feature) { + const baseHeigh = 1200 + return feature.coordinates[0].properties.x.data > 30 ? baseHeigh * 6 : + feature.coordinates[0].properties.x.data > 25 ? baseHeigh * 5 : + feature.coordinates[0].properties.x.data > 20 ? baseHeigh * 4 : + feature.coordinates[0].properties.x.data > 15 ? baseHeigh * 3 : + feature.coordinates[0].properties.x.data > 10 ? baseHeigh * 2 : + feature.coordinates[0].properties.x.data > 0 ? baseHeigh * 1 : 0 + + }, + topColor: function (index, feature) { + return feature.coordinates[0].properties.x.data > 30 ? 'rgba(255,136,140,1)' : 'rgba(117,154,206,1)' + }, + sideColor: function (index, feature) { + return feature.coordinates[0].properties.x.data > 30 ? 'rgba(255,136,140,1)' : 'rgba(117,154,206,1)' + }, + sideTopColor: function (index, feature) { + return feature.coordinates[0].properties.x.data > 30 ? 'rgba(255,136,140,1)' : 'rgba(117,154,206,1)' + }, + sideBottomColor: function (index, feature) { + return feature.coordinates[0].properties.x.data > 30 ? 'rgba(255,136,140,0.5)' : 'rgba(117,154,206,0.5)' + }, + }); + gridLayer = gridLayer + loca.add(gridLayer); + + dataSource.map(s => { + // 创建纯文本标记 + var text = new AMap.Text({ + text: '纯文本标记', + anchor: 'center', // 设置文本标记锚点 + // draggable: true, + cursor: 'pointer', + angle: 0, + // visible: false, + offset: [0, -s.data], + style: { + 'padding': '5px 10px', + 'margin-bottom': '1rem', + 'border-radius': '.25rem', + 'background-color': '#143857', + // 'width': '12rem', + 'border-width': 0, + 'box-shadow': '0 2px 6px 0 rgba(255, 255, 255, .3)', + 'text-align': 'center', + 'font-size': '16px', + 'color': '#DCF2FD', + }, + }); + text.setMap(map); + text.show(); + text.setText(s.data + 'm') + text.setPosition(new AMap.LngLat(s.lng, s.lat)); + }) + + + // // 拾取 + // map.on('mousemove', (e) => { + // text.setMap(map); + // var feat = gridLayer.queryFeature(e.pixel.toArray()); + + // if (feat) { + // text.show(); + // text.setText(feat.coordinates[0].properties.x.data + 'm'); + // text.setPosition(e.lnglat); + + // } else { + // text.hide(); + // } + // }); + } + return ( <> {/* 延缓加载遮罩 */} @@ -494,29 +543,34 @@ function Map(props) { {/* 地图容器 */}
- {map && renderMarkers()} - {map && renderAlarms()} + {/* 底部按钮 */} - {!delay && [ - { name: '房屋分布', tab: 'overview' }, - // { name: '人口分布', tab: 'person' }, - { name: '基础设施', tab: 'emergency' } - ].map((s, index) => { - return
{ - setTab(s.tab) - props.changeTab(s.tab) - }} - > -
-
{s.name}
-
+ {!delay && tabs.map((s, index) => { + return <> +
{ + setTab(s.tab) + s.className ? props.changeEmengencyTab(s.tab) : props.changeTab(s.tab) + }} + > +
+
{s.name}
+ {s.className &&
7
} +
+ { + tab !== 'overview' && <>
+
+ } + }) } {/* 左上角图例 */} - {renderLeftTop()} + {tab == 'overview' && renderLeftTop()} + {tab == 'emergency' && renderWaterwarningbg()} {renderRightBottom()} {/* 四周遮罩 */}
diff --git a/super-screen/client/src/sections/water-prevention/containers/gis.less b/super-screen/client/src/sections/water-prevention/containers/gis.less index 2e3de89..54066f4 100644 --- a/super-screen/client/src/sections/water-prevention/containers/gis.less +++ b/super-screen/client/src/sections/water-prevention/containers/gis.less @@ -48,7 +48,7 @@ z-index: 999; .button_img { - background: url('/assets/images/homePage/communtity/home.png'); + background: url('/assets/images/homePage/water/home.png'); background-repeat: no-repeat; background-size: 100% 100%; width: 76.95px; @@ -56,7 +56,7 @@ } .button_img_select { - background: url('/assets/images/homePage/communtity/homeselect.png'); + background: url('/assets/images/homePage/water/homeselect.png'); } @@ -77,7 +77,7 @@ z-index: 999; .button_img { - background: url('/assets/images/homePage/communtity/devicebutton.png'); + background: url('/assets/images/homePage/water/devicebutton.png'); background-repeat: no-repeat; background-size: 100% 100%; width: 76.95px; @@ -85,21 +85,21 @@ } .button_img_select { - background: url('/assets/images/homePage/communtity/devicebuttonselect.png'); + background: url('/assets/images/homePage/water/devicebuttonselect.png'); } } -.gis-infowindow { - width: 302px; - height: 420px; - background: url('/assets/images/homepage/communtity/infowindowbg.png') no-repeat; +.water-gis-infowindow { + width: 276px; + height: 376px; + background: url('/assets/images/homepage/water/waterinfowindow.png') no-repeat; background-size: 100% 100%; opacity: 0.8; padding-left: 69px; padding-left: 22px; - padding-top: 157px; + padding-top: 197px; color: #fff; .gis_exit { @@ -130,13 +130,18 @@ margin-right: 12px; } - .gis_text { - font-family: SourceHanSansCN-Regular; - font-weight: 400; - font-size: 14px; - color: #FFFFFF; - letter-spacing: 0; - line-height: 21px; + .gis_text_on { + width: 83px; + height: 24px; + background: url('/assets/images/homepage/water/on.png') no-repeat; + background-size: 100% 100%; + } + + .gis_text_off { + width: 83px; + height: 24px; + background: url('/assets/images/homepage/water/off.png') no-repeat; + background-size: 100% 100%; } } } @@ -194,9 +199,10 @@ .gis-infowindow-alarm { background: url('/assets/images/homepage/communtity/alarminfowindow.png') no-repeat; - height: 432px; + background-size: 100% 100% !important; + height: 380px !important; width: 311px; - padding-top: 107px; + padding-top: 137px !important; .gis_exit { cursor: pointer; @@ -294,141 +300,405 @@ } -.home_left { +.water_gis_home_left { position: absolute; left: 26%; top: 3%; z-index: 999; - font-family: YouSheBiaoTiHei; - font-size: 16px; + // font-family: YouSheBiaoTiHei; + font-size: 14px; color: #FFFFFF; letter-spacing: 1.33px; text-shadow: -2px 0 0 #0C5FA6; - .hometotalbg { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/total.png') no-repeat; - background-size: 100% 100%; - } - - .home_total_number { - font-family: D-DIN-Italic; - font-weight: Italic; - font-size: 28px; - color: #EAF2FF; - letter-spacing: 0; - margin-left: 40px; - } - - .hqtotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/hqtotal.png') no-repeat; - background-size: 100% 100%; - } - - .cztotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/cztotal.png') no-repeat; - background-size: 100% 100%; - } + .left_item { + width: 153px; + height: 80px; + background: rgba(2, 39, 81, 0.73); + margin-bottom: 8px; + color: #C0E2FF; + display: flex; + align-items: center; + justify-content: space-between; + + .gis_item_left { + width: 55px; + height: 55px; + + .high_risk { + width: 55px; + height: 55px; + background: url('/assets/images/homepage/water/high_risk.png') no-repeat; + background-size: 100% 100%; + } + + .middle_risk { + width: 55px; + height: 55px; + background: url('/assets/images/homepage/water/middle_risk.png') no-repeat; + background-size: 100% 100%; + } + + .low_risk { + width: 55px; + height: 55px; + background: url('/assets/images/homepage/water/low_risk.png') no-repeat; + background-size: 100% 100%; + } + } - .lztotal { - width: 126.45px; - height: 26.23px; - padding-left: 24px; - background: url('/assets/images/homepage/communtity/lztotal.png') no-repeat; - background-size: 100% 100%; + .gis_item_right { + width: 90px; + + .high_text { + font-family: D-DIN-Italic; + line-height: 34px; + font-size: 38px; + color: #FFFFFF; + letter-spacing: 0; + text-shadow: 0 0 7px #FF0000; + margin-right: 17px; + } + + .middle_text { + font-family: D-DIN-Italic; + line-height: 34px; + font-size: 38px; + color: #FFFFFF; + letter-spacing: 0; + text-shadow: 0 0 7px #FF8600; + margin-right: 17px; + } + + .low_text { + font-family: D-DIN-Italic; + line-height: 34px; + font-size: 38px; + color: #FFFFFF; + letter-spacing: 0; + text-shadow: 0 0 7px #008AFF; + margin-right: 17px; + } + } } } -.home_right { +.water_home_right { position: absolute; - right: 26%; + right: 24%; bottom: 7%; z-index: 999; - font-family: YouSheBiaoTiHei; font-size: 14px; - background: #021d33ad; - // border: 1px solid rgba(2, 29, 51, 0.68); - padding: 7px 14px 7px 14px; - border: 1px solid; - border-image: linear-gradient(133deg, rgba(0, 197, 255, 0.53) 0%, rgba(0, 138, 255, 0.62)) 1; + width: 436px; + height: 102px; + background-image: linear-gradient(270deg, rgba(4, 55, 126, 0.32) 0%, rgba(0, 18, 65, 0.47) 50%, rgba(0, 18, 65, 0.42) 96%); + color: rgba(147, 171, 192, 1); + padding-top: 7px; - ._lz { + ._right_row1 { + width: 100%; display: flex; align-items: center; + padding-right: 22px; + justify-content: flex-end; - ._icon { - display: inline-block; - width: 15px; - height: 15px; - background: url('/assets/images/homepage/communtity/lzicon.png') no-repeat; - background-size: 100% 100%; - margin-right: 4px; - } - - span { + .monitor_text { + background: linear-gradient(180deg, #FFFFFF, rgba(17, 124, 213, 1)); + background-clip: border-box; + -webkit-background-clip: text; + color: transparent; font-family: YouSheBiaoTiHei; - font-size: 14px; + font-size: 16px; letter-spacing: 0; - background: linear-gradient(180deg, rgba(255, 255, 255, 1) 1%, rgba(250, 196, 110, 1) 100%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; } - } - - ._hq { - display: flex; - align-items: center; - margin-top: 10px; - ._icon { - display: inline-block; - width: 15px; - height: 15px; - background: url('/assets/images/homepage/communtity/hqicon.png') no-repeat; + ._monitor { + width: 20px; + height: 29.84px; + background: url('/assets/images/homepage/water/_monitor.png') no-repeat; background-size: 100% 100%; - margin-right: 4px; + margin-right: 13px; } + } - span { - font-family: YouSheBiaoTiHei; - font-size: 14px; - background: linear-gradient(180deg, rgba(255, 255, 255, 1) 1%, rgba(36, 220, 247, 1) 100%); + ._right_row2 { + width: 100%; + display: flex; + + .column1 { + background: linear-gradient(180deg, #FFFFFF, rgba(17, 124, 213, 1)); + background-clip: border-box; -webkit-background-clip: text; - -webkit-text-fill-color: transparent; + color: transparent; + font-family: YouSheBiaoTiHei; + font-size: 16px; letter-spacing: 0; + width: 108px; + margin-top: 9px; + margin-left: 16px; + } + + .column2 { + width: calc(100% - 142px); + + .level3 { + width: 92px; + height: 4px; + background-image: linear-gradient(90deg, #008AFF 1%, #0260B0 100%); + } + + .level2 { + width: 92px; + height: 4px; + background-image: linear-gradient(90deg, #FF8E11 1%, #9F5504 100%); + } + + .level1 { + width: 92px; + height: 4px; + background-image: linear-gradient(90deg, #FF0000 1%, #910000 100%); + } } } +} - ._cz { - display: flex; - align-items: center; - margin-top: 10px; +.water_home_right_back { + position: absolute; + right: 24%; + bottom: 7%; + z-index: 999; + width: 158px; + height: 28px; + font-size: 16px; + color: rgba(153, 247, 255, 1); + letter-spacing: 2px; + text-align: center; + text-shadow: 0 0 18px rgba(0, 128, 255, 0.8); + border: 1px solid rgba(0, 128, 255, 0.8); + background: rgba(2, 29, 51, 0.68); + cursor: pointer; + display: flex; + align-items: center; + + ._back_icon { + width: 35px; + height: 35.5px; + background: url('/assets/images/homepage/water/back.png') no-repeat; + background-size: 100% 100%; + } +} + +.waterwarningbg { + background: url('/assets/images/homepage/water/waterwarningbg.png') no-repeat; + background-size: 100% 100% !important; + width: 755.35px; + min-height: 78px; + position: absolute; + top: 2%; + left: 30%; + display: flex; + padding-left: 33px; + align-items: center; + z-index: 1111; + + ._alarm_column1 { + width: 220px; + font-size: 16px; + color: #FFF; + text-align: center; - ._icon { + ._state { + color: #D1C800; + background: rgba(255, 247, 0, 0.2); + text-align: center; + width: 50px; + height: 18px; display: inline-block; - width: 15px; - height: 15px; - background: url('/assets/images/homepage/communtity/czicon.png') no-repeat; - background-size: 100% 100%; - margin-right: 4px; + font-size: 14px; } + } - span { - font-family: YouSheBiaoTiHei; + ._alarm_column2 { + width: calc(100% - 230px); + padding-right: 20px; + + ._text_info { font-size: 14px; - background: linear-gradient(180deg, rgba(255, 255, 255, 1) 1%, rgba(1, 140, 255, 1) 100%); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - letter-spacing: 0; + color: #C0E2FF; + letter-spacing: 1px; + line-height: 20px; } } +} + +.emergency_button { + position: absolute; + font-family: YouSheBiaoTiHei; + font-size: 12px; + color: #ECF7FF; + letter-spacing: 0; + width: 76.95px; + text-align: center; + cursor: pointer; + z-index: 999; + + .dotbg { + width: 28px; + height: 28px; + background: url('/assets/images/homePage/water/dotbg.png') no-repeat; + background-size: 100% 100%; + position: absolute; + right: 6%; + top: -14%; + font-family: D-DINExp-Italic; + font-weight: Italic; + font-size: 20px; + color: #003FA6; + text-align: center; + } +} + +.emergency_button1 { + left: 35%; + bottom: -5%; +} + +.emergency_button2 { + left: 41.5%; + bottom: -4%; +} + +.emergency_button3 { + left: 48%; + bottom: -3%; +} + +.emergency_button4 { + left: 54.5%; + bottom: -4%; +} + +.emergency_button5 { + left: 61%; + bottom: -5%; +} + +.icon_left { + width: 36px; + height: 36px; + background: url('/assets/images/homepage/water/left.png') no-repeat; + background-size: 100% 100% !important; + position: absolute; + left: 32%; + bottom: -4%; + cursor: pointer; +} + +.icon_right { + width: 36px; + height: 36px; + background: url('/assets/images/homepage/water/right.png') no-repeat; + background-size: 100% 100% !important; + position: absolute; + right: 32%; + bottom: -4%; + cursor: pointer; +} + +.button_yjjg { + background: url('/assets/images/homePage/water/yjjg.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 76.95px; + height: 64px; +} + +.button_yjjg_select { + background: url('/assets/images/homePage/water/yjjgselect.png'); +} + +.button_yjdw { + background: url('/assets/images/homePage/water/yjdw.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 76.95px; + height: 64px; +} + +.button_yjdw_select { + background: url('/assets/images/homePage/water/yjdwselect.png'); +} + +.button_yjzj { + background: url('/assets/images/homePage/water/yjzj.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 76.95px; + height: 64px; +} + +.button_yjzj_select { + background: url('/assets/images/homePage/water/yjzjselect.png'); +} + +.button_yljg { + background: url('/assets/images/homePage/water/yljg.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 76.95px; + height: 64px; +} + +.button_yljg_select { + background: url('/assets/images/homePage/water/yljgselect.png'); +} + +.button_bncs { + background: url('/assets/images/homePage/water/bncs.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 76.95px; + height: 64px; +} + +.button_bncs_select { + background: url('/assets/images/homePage/water/bncsselect.png'); +} + +._weather_container { + width: 264px; + height: 45px; + position: absolute; + left: 60px; + top: 38px; + display: flex; + + .column1 { + width: 100px; + font-size: 16px; + color: #ECF7FF; + text-align: right; + padding-right: 12px; + } + + ._divider { + width: 1px; + height: 39px; + background-color: rgba(123, 124, 128, 1); + } + + .weather_icon { + width: 44.02px; + height: 40px; + background: url('/assets/images/homePage/water/weather.png') no-repeat; + background-size: 100% 100%; + } + + .column2 { + width: 65px; + text-align: left; + font-size: 16px; + color: #ECF7FF; + } } \ No newline at end of file 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 4c3d26b..4bee23a 100644 --- a/super-screen/client/src/sections/water-prevention/containers/homePage.js +++ b/super-screen/client/src/sections/water-prevention/containers/homePage.js @@ -10,8 +10,9 @@ import EmergencyLeftTop from '../components/emergency-left-top' import EmergencyLeftBottom from '../components/emergency-left-bottom' import EmergencyRightTop from '../components/emergency-right-top' import EmergencyRightBottom from '../components/emergency-right-bottom' - +import Weather from '../components/weather' import Gis from './gis'; +import moment from 'moment'; import './style.less' function homePage(props) { @@ -20,6 +21,8 @@ function homePage(props) { const cardHeight = document.body.clientHeight * 0.896 * 0.32 const cardContentHeight = cardHeight - 42 - 13 const [tab, setTab] = useState('overview');// overview emergency + const [emengencyTab, setEmengencyTab] = useState('yjjg'); + const SCREEN_COMPONENTS = { overview: { leftTop: LeftTop, leftBottom: LeftBottom, rightTop: RightTop, rightBottom: RightBottom }, emergency: { leftTop: EmergencyLeftTop, leftBottom: EmergencyLeftBottom, rightTop: EmergencyRightTop, rightBottom: EmergencyRightBottom } @@ -31,7 +34,8 @@ function homePage(props) {
水务防汛实时监测预警系统
-
{ dispatch(push('/metadataManagement/latestMetadata')) }} className='_exit' >返回平台
+ +
{ dispatch(push('/metadataManagement/homepage')) }} className='_exit' >返回平台
@@ -48,23 +52,23 @@ function homePage(props) { changeTab={(e) => { setTab(e) }} + changeEmengencyTab={(e) => { + setEmengencyTab(e) + }} />
- +
-
- - } function mapStateToProps(state) {