diff --git a/public/assets/pie.png b/public/assets/pie.png new file mode 100644 index 0000000..7cbb996 Binary files /dev/null and b/public/assets/pie.png differ diff --git a/public/assets/shuiz.png b/public/assets/shuiz.png new file mode 100644 index 0000000..50ec308 Binary files /dev/null and b/public/assets/shuiz.png differ diff --git a/public/assets/sl.jpg b/public/assets/sl.jpg new file mode 100644 index 0000000..c5cb75a Binary files /dev/null and b/public/assets/sl.jpg differ diff --git a/public/assets/yy.png b/public/assets/yy.png new file mode 100644 index 0000000..16e90f2 Binary files /dev/null and b/public/assets/yy.png differ diff --git a/public/assets/yytc.png b/public/assets/yytc.png new file mode 100644 index 0000000..ed8aa97 Binary files /dev/null and b/public/assets/yytc.png differ diff --git a/src/assets/yy.png b/src/assets/yy.png new file mode 100644 index 0000000..16e90f2 Binary files /dev/null and b/src/assets/yy.png differ diff --git a/src/models/map/index.js b/src/models/map/index.js index bf3060a..125e14d 100644 --- a/src/models/map/index.js +++ b/src/models/map/index.js @@ -345,6 +345,12 @@ const map = { // dispatch.map.setLayerSetting({dom: true}); map.setLayoutProperty('热力图', 'visibility', 'none'); } + + if (id != 504) { + dispatch.runtime.setYyfa({}) + } + + } }) }; diff --git a/src/models/map/layout.js b/src/models/map/layout.js index d6309b0..4e5d3b3 100644 --- a/src/models/map/layout.js +++ b/src/models/map/layout.js @@ -107,20 +107,6 @@ export default function calcLayout(view, rightStack, hidePanels) { { key: '预警信息管理', style: { height: '40%', flexGrow: 1 } }, ]; leftFullHeight = true; - } else if (view === 507) { - left = [ - { key: '工程巡查', style: { height: '20%', flexGrow: 1 } }, - { key: '本月巡查记录', style: { height: '40%', flexGrow: 1 } }, - { key: '待处理巡查问题清单', style: { height: '40%', flexGrow: 1 } }, - ] - leftFullHeight = true; - }else if (view === 506) { - left = [ - { key: '水政统计', style: { height: '30%', flexGrow: 1 } }, - { key: '区域统计', style: { height: '35%', flexGrow: 1 } }, - { key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } }, - ] - leftFullHeight = true; }else if (view === 505) { left = [ { key: '灌区统计', style: { height: '30%', flexGrow: 1 } }, @@ -238,9 +224,9 @@ export default function calcLayout(view, rightStack, hidePanels) { // rightFullHeight = true; } else if (view === 507) { right = [ - { key: '维护统计', style: { height: '20%', flexGrow: 1 } }, - { key: '本月工程维护', style: { height: '40%', flexGrow: 1 } }, - { key: '待处理维护问题清单', style: { height: '40%', flexGrow: 1 } }, + { key: '维护统计', style: { height: '30%', flexGrow: 1 } }, + { key: '本月工程维护', style: { height: '35%', flexGrow: 1 } }, + { key: '待处理维护问题清单', style: { height: '35%', flexGrow: 1 } }, ]; rightFullHeight = true; }else if (view === 505) { @@ -257,6 +243,13 @@ export default function calcLayout(view, rightStack, hidePanels) { // { key: '渠道分配比例', style: { height: '35%', flexGrow: 1 } }, ] rightFullHeight = true; + }else if (view === 506) { + right = [ + { key: '水政统计', style: { height: '30%', flexGrow: 1 } }, + { key: '区域统计', style: { height: '35%', flexGrow: 1 } }, + { key: '本月水政巡查问题统计', style: { height: '35%', flexGrow: 1 } }, + ] + rightFullHeight = true; } } } diff --git a/src/views/Home/InfoDlg/LayersDlg/index.js b/src/views/Home/InfoDlg/LayersDlg/index.js index f5ca1a0..be82f16 100644 --- a/src/views/Home/InfoDlg/LayersDlg/index.js +++ b/src/views/Home/InfoDlg/LayersDlg/index.js @@ -76,7 +76,7 @@ function LayersDlg({ onClose }) { >
- 图层显示设置 + 图层显示设置 diff --git a/src/views/Home/index.js b/src/views/Home/index.js index 18935f9..3b2331b 100644 --- a/src/views/Home/index.js +++ b/src/views/Home/index.js @@ -17,12 +17,22 @@ export default function Demo1() { const layout = useSelector(getLayout); const hp = useSelector(hidePanels); console.log("hp",hp); - + const yyRes = useSelector(s => s.runtime.yyObj); return (
-
+
-
+
+ + { + yyRes.yy && + <> + + + + } + +
diff --git a/src/views/Home/panels/GqWatch/constatData.js b/src/views/Home/panels/GqWatch/constatData.js index 9affbf5..306aaa8 100644 --- a/src/views/Home/panels/GqWatch/constatData.js +++ b/src/views/Home/panels/GqWatch/constatData.js @@ -12,7 +12,7 @@ "wagaCode": "HP0074208020000170", "adCode": "420802102000000", "adCode_dictText": "漳河镇", - "lgtd": 112.075597 -2.9619, + "lgtd": 112.075597 +2.9619, "updserInvst": null, "engGrad": null, "runStat": "1", @@ -38,7 +38,7 @@ "engManCode": "ENG100051", "chidCount": null, "whthInWat_dictText": "是", - "lttd": 30.961122 - 0.2002, + "lttd": 30.961122 +0.2002, "whthInWat": "1", "hasImg": false, "stfl": 131, @@ -73,7 +73,7 @@ "wagaCode": "HP0074208020000185", "adCode": "420802102000000", "adCode_dictText": "漳河镇", - "lgtd": 112.078158 -2.9619, + "lgtd": 112.078158 +2.9619, "updserInvst": null, "engGrad": null, "runStat": "1", @@ -135,7 +135,7 @@ "wagaCode": "HP007420804000188X", "adCode": "420804004213000", "adCode_dictText": "车桥村", - "lgtd": 112.118889 -2.9619, + "lgtd": 112.118889 +2.9619, "updserInvst": 20, "engGrad": "2", "runStat": "1", @@ -161,7 +161,7 @@ "engManCode": "ENG100037", "chidCount": null, "whthInWat_dictText": "否", - "lttd": 30.974167 - 0.2002, + "lttd": 30.974167 +0.2002, "whthInWat": "2", "hasImg": false, "stfl": 5, @@ -195,7 +195,7 @@ const bzData = [ "engManCode": "ENG200038", "wasuRang": "生态用水", "wainWasoType": null, - "lttd": 30.97131 - 0.2002, + "lttd": 30.97131 +0.2002, "updserRsn": null, "updDate": "2023-03-21", "pustCode": "HP0104208040001543", @@ -206,7 +206,7 @@ const bzData = [ "stfl": 0.1, "adCode": "420804004000000", "adCode_dictText": "双喜街道办事处", - "lgtd": 112.18575 -2.9619, + "lgtd": 112.18575 +2.9619, "actIrrA": null, "updserInvst": null, "engGrad": null, @@ -252,7 +252,7 @@ const bzData = [ "stfl": 0.1, "adCode": "420804001003000", "adCode_dictText": "白石坡社区", - "lgtd": 112.19441 -2.9619, + "lgtd": 112.19441 +2.9619, "actIrrA": null, "updserInvst": null, "engGrad": null, diff --git a/src/views/Home/panels/GqWatch/index.js b/src/views/Home/panels/GqWatch/index.js index 3baede6..0447427 100644 --- a/src/views/Home/panels/GqWatch/index.js +++ b/src/views/Home/panels/GqWatch/index.js @@ -35,7 +35,8 @@ function HDReal({ style }) { // let { data } = useRequest(HDRealPromise.get, t); const [setting, showSetting] = useState(false); - const flyTo = (record,type) => { + const flyTo = (record, type) => { + toggleStType(type) const { lgtd, lttd } = record; if (lgtd && lttd) { dispatch.runtime.setFeaturePop({ type, properties: record, coordinates: [lgtd, lttd] }); @@ -49,6 +50,13 @@ function HDReal({ style }) { const [type, setType] = useState('sz') const toggleStType = (type) => { + if (type == 'sz') { + dispatch.map.setLayerVisible({'ShuiZhaLayer':true}) + dispatch.map.setLayerVisible({'BzLayer':false}) + } else { + dispatch.map.setLayerVisible({'ShuiZhaLayer':false}) + dispatch.map.setLayerVisible({'BzLayer':true}) + } setType(type) } diff --git a/src/views/Home/panels/GqWeatherForcast/WF.js b/src/views/Home/panels/GqWeatherForcast/WF.js index af7c48b..e2e07cc 100644 --- a/src/views/Home/panels/GqWeatherForcast/WF.js +++ b/src/views/Home/panels/GqWeatherForcast/WF.js @@ -49,10 +49,14 @@ function WF() { }, [contourSetting]); const genWeatherContour24H = () => { + dispatch.runtime.setYyfa({}) + dispatch.shyjview.showWeather24h(); } const genWeatherContourRadar = () => { + dispatch.runtime.setYyfa({}) + dispatch.shyjview.showWeatherRadar(); } diff --git a/src/views/Home/panels/GqWeatherForcast/index.js b/src/views/Home/panels/GqWeatherForcast/index.js index 4a31cfb..65fe21e 100644 --- a/src/views/Home/panels/GqWeatherForcast/index.js +++ b/src/views/Home/panels/GqWeatherForcast/index.js @@ -15,7 +15,7 @@ export default function WeatherForcast({ style }) { return ( diff --git a/src/views/Home/panels/Gqdd/index.js b/src/views/Home/panels/Gqdd/index.js index 32f4956..5bcce32 100644 --- a/src/views/Home/panels/Gqdd/index.js +++ b/src/views/Home/panels/Gqdd/index.js @@ -17,21 +17,15 @@ import { renderHDRz } from '../../../../utils/renutils'; import Setting from './Setting'; import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; - - -function rzRender(rz, base) { - return ( - = base ? 'red' : '#fff' }}> - {typeof base === 'number' ? base.toFixed(2) : ''} - - ); -} +import { Switch, FormControlLabel,InputLabel, Select, MenuItem,FormControl } from '@material-ui/core/index' +import { styled } from '@material-ui/styles'; function HDReal({ style }) { const dispatch = useDispatch(); const tableRzFilter = useSelector(s => s.realview.tableRzFilter); const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh); - const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0); + const [checked, setChecked] = React.useState(false); + // let { data } = useRequest(HDRealPromise.get, t); const [setting, showSetting] = useState(false); @@ -54,15 +48,15 @@ function HDReal({ style }) { const obj = { 0: '东干渠', 1: '西干渠', - 2:'邓家河干渠' + 2: '邓家河干渠' } - const showData = Array(10).fill(0).map((o,i) => ({ + const showData = Array(10).fill(0).map((o, i) => ({ id: `#${i + 1}`, - type:obj[i % 2], + type: obj[i % 2], status: '--', kd: (Math.random() * 100).toFixed(2), - ll:(Math.random() * 100).toFixed(1) + ll: (Math.random() * 100).toFixed(1) })) const flyTo = (record) => { @@ -86,29 +80,29 @@ function HDReal({ style }) { dispatch.realview.setHdAutoRefresh(!hdAutoRefresh); } - const renderStatus = (row) => { - let bz = '运行' - switch (row.status) { - case 0: - bz = '停止' - break; - case 1: - bz = '运行' - break; - case 2: - bz = '故障' - break; - case 3: - bz = '维护中' - break; - case 4: - bz = '待机' - break; - default: - break; - } - return bz + const CustomSwitch = styled(Switch)({ + '& .MuiSwitch-switchBase': { + color: '#fff', + '&.Mui-checked': { + color: '#1890ff', + '& + .MuiSwitch-track': { + backgroundColor: '#1890ff', + opacity: 0.5, + }, + }, + }, + '& .MuiSwitch-track': { + backgroundColor: 'rgba(255, 255, 255, 0.3)', + }, +}); + +const StyledFormControlLabel = styled(FormControlLabel)({ + '& .MuiFormControlLabel-label': { + color: '#fff' } +}); + const [dimension, setDimension] =useState('fqh'); + return ( } > - + @@ -142,13 +136,13 @@ function HDReal({ style }) { {showData.map((row) => ( - +
{row.type}
- {row.kd} + {row.kd} {row.ll} {row.status} @@ -158,10 +152,54 @@ function HDReal({ style }) { ))}
+
{ setting && showSetting(false)} /> } +
+ + setChecked(e.target.checked)} + /> + } + label="多灌区模式" + /> + {checked &&
+ + + + +
} +
) } diff --git a/src/views/Home/panels/LlWatch/constant.js b/src/views/Home/panels/LlWatch/constant.js index 04cf792..ac021a1 100644 --- a/src/views/Home/panels/LlWatch/constant.js +++ b/src/views/Home/panels/LlWatch/constant.js @@ -18,7 +18,7 @@ const data =[ "chan": "1", "accq": 120057496 }, - "lttd": 31.240848 -0.2002, + "lttd": 31.240848 +0.2002, "sttp": "QQ", "irrCode": "D00001300", "sort": 6001, @@ -28,7 +28,7 @@ const data =[ "stcd": "4211221029", "stnm": "口泉测流站", "addvcd_dictText": "荆门市", - "lgtd": 111.826413 - 2.9619, + "lgtd": 111.826413 +2.9619, "irrCode_dictText": "水库枢纽", "bsnm": "漳河流域" }, @@ -60,7 +60,7 @@ const data =[ "stcd": "4211221030", "stnm": "苍坪测流站", "addvcd_dictText": "荆门市", - "lgtd": 111.866217 -2.9619, + "lgtd": 111.866217 +2.9619, "irrCode_dictText": "水库枢纽", "bsnm": "漳河流域" }, @@ -82,7 +82,7 @@ const data =[ "chan": "1", "accq": 377902272 }, - "lttd": 30.959561 - 0.2002, + "lttd": 30.959561 +0.2002, "sttp": "QQ", "irrCode": "D00000290", "sort": 6030, @@ -92,7 +92,7 @@ const data =[ "stcd": "4208820100", "stnm": "渠首时差法流量站", "addvcd_dictText": "荆门市", - "lgtd": 112.077549 -2.9619, + "lgtd": 112.077549 +2.9619, "irrCode_dictText": "总干渠", "bsnm": "漳河流域" }, @@ -114,7 +114,7 @@ const data =[ "chan": "0", "accq": null }, - "lttd": 30.946457 -0.2002, + "lttd": 30.946457 +0.2002, "sttp": "QQ", "irrCode": "D00000300", "sort": 6031, @@ -124,7 +124,7 @@ const data =[ "stcd": "4211223302", "stnm": "二干进口流量", "addvcd_dictText": "荆门市", - "lgtd": 112.07475 -2.9619, + "lgtd": 112.07475 +2.9619, "irrCode_dictText": "二干渠", "bsnm": "漳河流域" }, @@ -147,7 +147,7 @@ const data =[ "chan": "1", "accq": 151531776 }, - "lttd": 30.964597 - 0.2002, + "lttd": 30.964597 +0.2002, "sttp": "QQ", "irrCode": "D00000020,D00000290", "sort": 6032, @@ -157,7 +157,7 @@ const data =[ "stcd": "4208820200", "stnm": "三干渠进口时差法", "addvcd_dictText": "荆门市", - "lgtd": 112.190279 -2.9619, + "lgtd": 112.190279 +2.9619, "irrCode_dictText": "三干渠,总干渠", "bsnm": "漳河流域" }] diff --git a/src/views/Home/panels/LlWatch/index.js b/src/views/Home/panels/LlWatch/index.js index fda33a7..50f86b9 100644 --- a/src/views/Home/panels/LlWatch/index.js +++ b/src/views/Home/panels/LlWatch/index.js @@ -66,34 +66,35 @@ function HDReal({ style }) { type: '工业', time: '2025-05-26 10:00', stcd: 42000002, - stnm: '热电厂', + stnm: '汉通闸流量站', water:30, flow: 0.222, - "lttd": 30.959561, - "lgtd": 112.077549, + "lttd": 30.973775 + 0.2002, + "lgtd": 112.17597 +2.9619, }, { water:12, type: '工业', stcd: 42000001, time: '2025-05-26 10:00', - stnm: '福繕泪耀玻璃', + stnm: '福耀玻璃', flow: 0.355, - "lttd": 30.959561, - "lgtd": 112.077549, + "lttd": 30.93926+0.2002, + "lgtd": 112.191703+ 2.9619, }, { water:21, type: '工业', time: '2025-05-26 10:00', stnm: '格林美', flow: 0.09, - "lttd": 30.959561, - "lgtd": 112.077549, + "lttd": 30.953887 + 0.2002, + "lgtd": 112.190551 + 2.9619, stcd: 42000005 } ] - const flyTo = (record,type) => { + const flyTo = (record, type) => { + toggleStType(type == '渠道流量站' ?'qd':'sb') const { lgtd, lttd } = record; if (lgtd && lttd) { dispatch.runtime.setFeaturePop({ type, properties: record, coordinates: [lgtd, lttd] }); @@ -107,9 +108,15 @@ function HDReal({ style }) { const [type, setType] = useState('sb') - const toggleStType = (type) => { + const toggleStType = (type) => { + if (type == 'sb') { + dispatch.map.setLayerVisible({'SbLayer':true}) + dispatch.map.setLayerVisible({'QdLayer':false}) + } else { + dispatch.map.setLayerVisible({'SbLayer':false}) + dispatch.map.setLayerVisible({'QdLayer':true}) + } setType(type) - } const toggleAutoRefresh = () => { diff --git a/src/views/Home/panels/SzSta/index.js b/src/views/Home/panels/SzSta/index.js index 5ee445f..b3209c7 100644 --- a/src/views/Home/panels/SzSta/index.js +++ b/src/views/Home/panels/SzSta/index.js @@ -11,7 +11,7 @@ export default function Overall({ style }) { return ( diff --git a/src/views/Home/panels/SzWatch/index.js b/src/views/Home/panels/SzWatch/index.js index 3a34a54..d4dda06 100644 --- a/src/views/Home/panels/SzWatch/index.js +++ b/src/views/Home/panels/SzWatch/index.js @@ -53,14 +53,15 @@ function HDReal({ style }) { // }, [data, tableRzFilter]); const showData = Array(1).fill(0).map((o, i) => ({ - "lgtd": 112.071, - "lttd": 30.9641, + "lgtd": 112.071 +2.9619, + "lttd": 30.9641 +0.2002, "tm": "2025-03-21 08", "doxLevelStr": "Ⅰ类", stnm:'水质站' })) const flyTo = (record) => { + dispatch.map.setLayerVisible({'ShuizhiLayer':true}) const { lgtd, lttd } = record; if (lgtd && lttd) { dispatch.runtime.setFeaturePop({ type: '水质站', properties: record, coordinates: [lgtd, lttd] }); diff --git a/src/views/Home/panels/Szqytj/index.js b/src/views/Home/panels/Szqytj/index.js index 8e71589..9f346b8 100644 --- a/src/views/Home/panels/Szqytj/index.js +++ b/src/views/Home/panels/Szqytj/index.js @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react'; +import React, { useMemo, useState,useEffect } from 'react'; import useRequest from '../../../../utils/useRequest'; import PanelBox from '../../components/PanelBox'; @@ -17,7 +17,10 @@ import { renderHDRz } from '../../../../utils/renutils'; import Setting from './Setting'; import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; - +import { DatePicker } from 'antd'; +import moment from 'moment'; +import './index.less' +const { RangePicker } = DatePicker; function rzRender(rz, base) { return ( @@ -52,11 +55,12 @@ function HDReal({ style }) { // return ret; // }, [data, tableRzFilter]); - const showData = Array(10).fill(0).map((o,i) => ({ - id:`#${i + 1}`, - cl: (Math.random() * 100).toFixed(0), - kd: (Math.random() * 100).toFixed(0), - ll:(Math.random() * 100).toFixed(0) + const showData = Array(1).fill(0).map((o,i) => ({ + date: '2025-05-26', + event: '侵占河道', + type: '侵占河道', + status: '待处理', + place:'浮桥河灌区' })) const flyTo = (record) => { @@ -75,39 +79,37 @@ function HDReal({ style }) { const visible = !tableRzFilter[type]; dispatch.realview.setTableRzFilter({ [type]: visible }); } - + const [params, setParams] = useState({ tm: [] }) const toggleAutoRefresh = () => { dispatch.realview.setHdAutoRefresh(!hdAutoRefresh); } - const renderStatus = (row) => { - let bz = '运行' - switch (row.status) { - case 0: - bz = '停止' - break; - case 1: - bz = '运行' - break; - case 2: - bz = '故障' - break; - case 3: - bz = '维护中' - break; - case 4: - bz = '待机' - break; - default: - break; - } - return bz - } - + const searchTm = (e) => { + setParams({ + ...params, + stm: e[0].format("YYYY-MM-DD HH:mm"), + etm: e[1].format("YYYY-MM-DD HH:mm"), + tm:e, + }) + }; + useEffect(() => { + let options = ""; + options = { + etm: moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), + stm: moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), + tm: [ + moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }), + moment().add(1, 'hour').set({ minute: 0, second: 0 }), + ], + } + + setParams(options) + + }, []) return ( @@ -122,33 +124,50 @@ function HDReal({ style }) { } > - +
+ trigger.parentElement} + /> +
+ + - - 区域 - 巡查次数 - 事件数量 - 处理中 - {/* 警戒水位 */} + + 日期 + 事件名称 + 事件类型 + 所在灌区 + 待处理 {showData.map((row) => ( - - + flyTo(row)}> +
{row.id}
+ >{row.date}
- -
flyTo(row)} - >{row.kd}
-
- {row.ll} - {row.cl} + {row.event} + {row.type} + {row.place} + {row.status} {/* {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} */}
diff --git a/src/views/Home/panels/Szqytj/index.less b/src/views/Home/panels/Szqytj/index.less new file mode 100644 index 0000000..a91a889 --- /dev/null +++ b/src/views/Home/panels/Szqytj/index.less @@ -0,0 +1,90 @@ + + .tm{ + width: 40%; + display: flex; + justify-content: center; + font-size: 14px; + font-weight: 400; + border-radius: 2px; + color: #fff; + background: linear-gradient(270deg,rgba(65,76,217,.4),rgba(58,85,218,.2) 14%,rgba(54,90,218,0) 49%,rgba(51,94,218,.2) 86%,rgba(44,102,219,.4)); + border: 1px solid #0e4e93; + + .MuiInput-underline:before{ + border: 0px; + } + .time-picker{ + .ant-picker-input > input{ + color: #fff; + } + .ant-picker-separator{ + color: #fff; + } + + } + } + .time-type { + margin-left: 10rem; + display: flex; + cursor: pointer; + background-color: #393e45; + border-radius: 5%; + padding: 0.01% !important; + border: 1px solid #585e64; + div { + width: 80px; + border-radius: 5%; + text-align: center; + border: 1px solid #585e64; + padding: 4px 0; + } + + .active { + color: #5FB7FF; + // background: #F0F7FF; + border: 1px solid #5FB7FF; + } + } + + + +.ant-picker-panel-container{ + background-color: rgba(36, 46, 92,1) !important; + +} +.ant-picker-header,.ant-picker-body{ + color: #fff !important; + border-color: #242e5c; +} +.ant-picker-content th{ + color: #fff !important; +} +.ant-picker-cell, +.ant-picker-header-super-prev-btn, +.ant-picker-header-prev-btn, +.ant-picker-header-next-btn, +.ant-picker-header-super-next-btn +{ + color: #fff !important; +} +.ant-picker-cell:hover:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end) .ant-picker-cell-inner{ + // background: transparent !important; + color: #000; +} +.ant-picker-cell-in-view.ant-picker-cell-in-range::before, +.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before, +.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before +{ + background-color:transparent !important; +} +.ant-picker-time-panel-column > li.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{ + background-color: #1890ff !important; +} +.ant-picker-time-panel-column > li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner:hover{ + // background-color:transparent !important; + color: #000 !important; +} +.ant-picker-header-super-next-btn,.ant-picker-time-panel-cell-inner +{ + color: #fff !important; +} \ No newline at end of file diff --git a/src/views/Home/panels/Szwtqytj/index.js b/src/views/Home/panels/Szwtqytj/index.js index b5c4f30..18d29f5 100644 --- a/src/views/Home/panels/Szwtqytj/index.js +++ b/src/views/Home/panels/Szwtqytj/index.js @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react'; +import React, { useMemo, useState,useEffect } from 'react'; import useRequest from '../../../../utils/useRequest'; import PanelBox from '../../components/PanelBox'; @@ -18,6 +18,8 @@ import Setting from './Setting'; import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; import moment from 'moment'; +import { DatePicker } from 'antd'; +const { RangePicker } = DatePicker; function rzRender(rz, base) { return ( @@ -53,14 +55,12 @@ function HDReal({ style }) { // }, [data, tableRzFilter]); const randomMinutes = Math.floor(Math.random() * 60) + 1; const format = 'YYYY-MM-DD HH:mm'; - const showData = Array(10).fill(0).map((o,i) => ({ - id: `#${i + 1}`, - time: moment() - .subtract(i * 60 + randomMinutes, 'minutes') - .format(format), - cl: "--", - kd: (Math.random() * 100).toFixed(0), - ll:(Math.random() * 100).toFixed(0) + const showData = Array(1).fill(0).map((o,i) => ({ + date: '2025-05-26', + event: '东干渠巡查', + type: '2', + status: '已完成', + place:'1' })) const flyTo = (record) => { @@ -83,11 +83,35 @@ function HDReal({ style }) { const toggleAutoRefresh = () => { dispatch.realview.setHdAutoRefresh(!hdAutoRefresh); } + const [params, setParams] = useState({ tm: [] }) + + const searchTm = (e) => { + setParams({ + ...params, + stm: e[0].format("YYYY-MM-DD HH:mm"), + etm: e[1].format("YYYY-MM-DD HH:mm"), + tm:e, + }) + }; + useEffect(() => { + let options = ""; + options = { + etm: moment().add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), + stm: moment().subtract(7, 'days').add(1, 'hour').set({minute: 0, second: 0}).format("YYYY-MM-DD HH:mm"), + tm: [ + moment().subtract(7, 'days').add(1, 'hour').set({ minute: 0, second: 0 }), + moment().add(1, 'hour').set({ minute: 0, second: 0 }), + ], + } + + setParams(options) + + }, []) return ( @@ -102,37 +126,50 @@ function HDReal({ style }) { } > - +
+ trigger.parentElement} + /> +
+ +
- - 日期 - 管理单位 - 问题类型 - 处理状态 - 问题描述 - 操作 - {/* 警戒水位 */} + + 日期 + 巡检名称 + 发现问题数 + 未处理问题数 + 执行状态 {showData.map((row) => ( - - + flyTo(row)}> +
{row.time}
+ >{row.date}
- -
flyTo(row)} - >{row.cl}
-
- {row.cl} - {row.cl} - {row.cl} - {row.cl} + {row.event} + {row.type} + {row.place} + {row.status} {/* {rzRender(row.rz, row.grz)} {rzRender(row.rz, row.wrz)} */}
diff --git a/src/views/Home/panels/TrWatch/constant.js b/src/views/Home/panels/TrWatch/constant.js index ddf44c3..a6f9200 100644 --- a/src/views/Home/panels/TrWatch/constant.js +++ b/src/views/Home/panels/TrWatch/constant.js @@ -24,7 +24,7 @@ const data = [ "vtavslm": null, "slmAvg": 24.5 }, - "lttd": 30.8456 -0.2002, + "lttd": 30.8456 +0.2002, "sttp": "SS", "irrCode": "D00000010", "sort": 9999, @@ -34,7 +34,7 @@ const data = [ "stcd": "ZH201417", "stnm": "马山二组(墒情)", "addvcd_dictText": "荆门市", - "lgtd": 112.2321 -2.9619, + "lgtd": 112.2321 +2.9619, "irrCode_dictText": "漳河实验站", "bsnm": "漳河流域" }, @@ -63,7 +63,7 @@ const data = [ "vtavslm": null, "slmAvg": 13.7 }, - "lttd": 30.8446 -0.2002, + "lttd": 30.8446 +0.2002, "sttp": "SS", "irrCode": "D00000010", "sort": 9999, @@ -73,7 +73,7 @@ const data = [ "stcd": "ZH201421", "stnm": "槐桥四组(墒情)", "addvcd_dictText": "荆门市", - "lgtd": 112.203 -2.9619, + "lgtd": 112.203 +2.9619, "irrCode_dictText": "漳河实验站", "bsnm": "漳河流域" }, @@ -101,7 +101,7 @@ const data = [ "vtavslm": null, "slmAvg": 14.5 }, - "lttd": 30.8866 -0.2002, + "lttd": 30.8866 +0.2002, "sttp": "SS", "irrCode": "D00000010", "sort": 9999, @@ -111,7 +111,7 @@ const data = [ "stcd": "ZH201418", "stnm": "双碑一组(墒情)", "addvcd_dictText": "荆门市", - "lgtd": 112.2006 -2.9619, + "lgtd": 112.2006 +2.9619, "irrCode_dictText": "漳河实验站", "bsnm": "漳河流域" }, @@ -140,7 +140,7 @@ const data = [ "vtavslm": null, "slmAvg": 33.4 }, - "lttd": 30.904191 -0.2002, + "lttd": 30.904191 +0.2002, "sttp": "SS", "irrCode": "D00000010", "sort": 9999, @@ -149,7 +149,7 @@ const data = [ "stcd": "4211221031", "stnm": "试验站墒情", "addvcd_dictText": "荆门市", - "lgtd": 112.087806 -2.9619, + "lgtd": 112.087806 +2.9619, "irrCode_dictText": "漳河实验站", "bsnm": "漳河流域" } diff --git a/src/views/Home/panels/TrWatch/index.js b/src/views/Home/panels/TrWatch/index.js index 208bd63..2663dc6 100644 --- a/src/views/Home/panels/TrWatch/index.js +++ b/src/views/Home/panels/TrWatch/index.js @@ -105,6 +105,7 @@ function HDReal({ style }) { // })) const flyTo = (record) => { + dispatch.map.setLayerVisible({'TrsqLayer':true}) const { lgtd, lttd } = record; if (lgtd && lttd) { dispatch.runtime.setFeaturePop({ type: '墒情站', properties: record, coordinates: [lgtd, lttd] }); diff --git a/src/views/Home/panels/WhSta/OverallContent.js b/src/views/Home/panels/WhSta/OverallContent.js index 3fb9c4b..3d63a1f 100644 --- a/src/views/Home/panels/WhSta/OverallContent.js +++ b/src/views/Home/panels/WhSta/OverallContent.js @@ -116,24 +116,35 @@ export default function OverallContent({ data }) { return (
-
-
-
2
-
本月维护
+
+
+
35
+
累计巡查次数
-
-
5
-
本年维护
+
+
35
+
累计维护次数
-
+
+
35
+
累计问题次数
+
+
showRecord(h24?.max)} + style={{ cursor: 'pointer',color:'#5ecd45' }} > - 1 + 15
-
未处理异常
+
本月巡查次数
+
+
+
15
+
本月维护次数
+
+
+
15
+
本月问题次数
diff --git a/src/views/Home/panels/WhSta/index.js b/src/views/Home/panels/WhSta/index.js index 5507ba4..2d3495b 100644 --- a/src/views/Home/panels/WhSta/index.js +++ b/src/views/Home/panels/WhSta/index.js @@ -11,7 +11,7 @@ export default function Overall({ style }) { return ( diff --git a/src/views/Home/panels/Whjl/index.js b/src/views/Home/panels/Whjl/index.js index 73218f7..3ff3124 100644 --- a/src/views/Home/panels/Whjl/index.js +++ b/src/views/Home/panels/Whjl/index.js @@ -46,10 +46,9 @@ function HDReal({ style }) { }); } } - + const [type, setType] = useState('xc') const toggleStType = (type) => { - const visible = !tableRzFilter[type]; - dispatch.realview.setTableRzFilter({ [type]: visible }); + setType(type) } const randomMinutes = Math.floor(Math.random() * 60) + 1; const format = 'YYYY-MM-DD HH:mm'; @@ -69,13 +68,23 @@ const givenNames = [ const givenName = givenNames[Math.floor(Math.random() * givenNames.length)]; return familyName + givenName; }; -const showData = Array(2).fill(0).map((o, i) => ({ +const showData = Array(1).fill(0).map((o, i) => ({ id:i + 1, - time: moment() - .subtract(i * 60 + randomMinutes, 'minutes') - .format(format), - status:0, - name:generateRandomName() + time: '2025-5-26', + name: '渠首闸巡查', + fxwt:1, + wfxwt: 1, + status:'未完成', +})) + + const wData = Array(1).fill(0).map((o, i) => ({ + id:i + 1, + time: '2025-5-26', + name: '渠首闸维护', + obj:'渠首闸', + fxwt:1, + wfxwt: 1, + status:'未完成', })) const toggleAutoRefresh = () => { @@ -87,14 +96,14 @@ const showData = Array(2).fill(0).map((o, i) => ({ return ( - // toggleStType('sh')}>山洪 - // toggleStType('sw')}>水文 - // - // } + tabs={ + + toggleStType('xc')}>巡查 + toggleStType('wh')}>维护 + + } extra={ <> @@ -102,13 +111,16 @@ const showData = Array(2).fill(0).map((o, i) => ({ } > - + { + type == 'xc' ?
- 维护完成日期 - 维护人 - 异常项次 + 日期 + 巡查名称 + 发现问题数 + 未发现问题数 + 执行状态 {/* 监测时间 */} {/* 警戒水位 */} @@ -127,6 +139,47 @@ const showData = Array(2).fill(0).map((o, i) => ({ // onClick={() => flyTo(row)} >{row.name} + {row.fxwt} + {row.wfxwt} + {row.status} + {/* {row.time} */} + {/* {rzRender(row.rz, row.grz)} + {rzRender(row.rz, row.wrz)} */} + + ))} + +
+
: + + + + + 日期 + 维护名称 + 维护对象 + 执行状态 + {/* 执行状态 */} + {/* 监测时间 */} + {/* 警戒水位 */} + + + + {wData.map((row) => ( + + +
{row.time}
+
+ +
flyTo(row)} + >{row.name}
+
+ {/* {row.fxwt} + {row.wfxwt} */} + {row.obj} {row.status} {/* {row.time} */} {/* {rzRender(row.rz, row.grz)} @@ -136,6 +189,7 @@ const showData = Array(2).fill(0).map((o, i) => ({
+ } { setting && showSetting(false)} /> } diff --git a/src/views/Home/panels/Whwtqd/index.js b/src/views/Home/panels/Whwtqd/index.js index 9a23c40..03ddcd3 100644 --- a/src/views/Home/panels/Whwtqd/index.js +++ b/src/views/Home/panels/Whwtqd/index.js @@ -88,7 +88,7 @@ const showData = Array(30).fill(0).map((o, i) => ({ return ( diff --git a/src/views/Home/panels/YaRes/index.js b/src/views/Home/panels/YaRes/index.js index cc6ef4d..1f33d5a 100644 --- a/src/views/Home/panels/YaRes/index.js +++ b/src/views/Home/panels/YaRes/index.js @@ -18,6 +18,7 @@ import Setting from './Setting'; import { InfoPopNames } from '../../InfoPops'; import config from '../../../../config'; import moment from 'moment'; +import {Empty} from 'antd' // import showData from './constant' function rzRender(rz, base) { return ( @@ -31,6 +32,7 @@ function HDReal({ style }) { const dispatch = useDispatch(); const tableRzFilter = useSelector(s => s.realview.tableRzFilter); const hdAutoRefresh = useSelector(s => s.realview.hdAutoRefresh); + const yyRes = useSelector(s => s.runtime.yyObj); const t = useRefresh(hdAutoRefresh ? 60 * 1000 : 0); // let { data } = useRequest(HDRealPromise.get, t); const [setting, showSetting] = useState(false); @@ -128,7 +130,9 @@ function HDReal({ style }) { } > - + { + yyRes.yy ? <> + @@ -212,6 +216,9 @@ function HDReal({ style }) {
+ : + 暂无数据}/> + } { setting && showSetting(false)} /> } diff --git a/src/views/Home/panels/Yyfa/index.js b/src/views/Home/panels/Yyfa/index.js index 04646c3..649c8b1 100644 --- a/src/views/Home/panels/Yyfa/index.js +++ b/src/views/Home/panels/Yyfa/index.js @@ -1,5 +1,5 @@ import clsx from 'clsx'; -import React,{useState} from 'react'; +import React,{useState,useEffect} from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { hdyjUnclose } from '../../../../models/_/hdyj'; import { OverallPromise } from '../../../../models/_/real'; @@ -16,12 +16,15 @@ import ShYj from './ShYj'; import { styled } from '@material-ui/styles'; import { RadioGroup, FormControlLabel, Radio, FormControl, FormLabel } from '@material-ui/core/index'; +import { backgroundColor } from 'echarts/lib/theme/dark'; +import { Description } from '@material-ui/icons'; +import DescriptionItem from '../../components/DescrptionItem'; +import { log } from '@craco/craco/lib/logger'; export default function Warn({ style }) { -const [value, setValue] = React.useState(''); - - const handleChange = (event) => { - setValue(event.target.value); - }; + const dispatch = useDispatch(); + const res = useSelector(s=>s.runtime.yyObj) + const [value, setValue] = React.useState(res.yy ?? ''); +const [yyValue, setYyValue] = React.useState(false); const StyledFormControlLabel = styled(FormControlLabel)({ display: 'flex', // justifyContent: 'space-around', @@ -36,14 +39,25 @@ const [value, setValue] = React.useState(''); color: '#fff', padding: '4px' } -}); + }); + + const fayy = () => { + setYyValue(true) + if (value) { + dispatch.runtime.setYyfa({yy:value}) + } + } + useEffect(() => { + setValue(res.yy) + }, [res]) + return ( 方案预演 + 方案预演 } >
@@ -57,7 +71,20 @@ const [value, setValue] = React.useState(''); } label="2025003预案" style={{color:"#fff"}}/> -
+ {res.yy &&
+
+
最大淹没范围
+
+ 淹没耕地:1824.8(公顷) + 淹没面积:48.9(平方公里) +
+ 淹没人口:3.211(万人) +
+
+ +
+
} +
) }