diff --git a/package.json b/package.json index 768273f99..28baf98af 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "react-audio-player": "^0.17.0", "react-cookies": "^0.1.1", "react-dom": "^18.2.0", + "react-draggable": "^4.4.6", "react-konva": "^18.2.3", "react-org-tree": "^1.0.1", "react-pdf": "^7.3.3", @@ -53,6 +54,7 @@ "react-router-dom": "^6.3.0", "react-scripts": "5.0.1", "react-window": "^1.8.10", + "react-zoom-pan-pinch": "^3.7.0", "redux": "^4.2.0", "typescript": "^4.7.4" }, diff --git a/public/assets/xyt/fxdd/bzt6.svg b/public/assets/xyt/fxdd/bzt6.svg new file mode 100644 index 000000000..10c252099 --- /dev/null +++ b/public/assets/xyt/fxdd/bzt6.svg @@ -0,0 +1 @@ +107.0093.6691.1696.1688.6888.661:21:21:2草皮护坡89.161:201:20浆砌石护坡115.601:5.36106.90109.90112.90103.90100.901:65.1:11:1.51:1.51:1.51:2 \ No newline at end of file diff --git a/public/assets/xyt/homeImg/turangshangqing.png b/public/assets/xyt/homeImg/turangshangqing.png new file mode 100644 index 000000000..f62584643 Binary files /dev/null and b/public/assets/xyt/homeImg/turangshangqing.png differ diff --git a/src/models/auth/_.ts b/src/models/auth/_.ts index 83b61e57a..f7b83d68f 100644 --- a/src/models/auth/_.ts +++ b/src/models/auth/_.ts @@ -216,7 +216,9 @@ export async function loadMenu(): Promise { { id: id(), title: '水库水情', path: '/mgr/sq/qth/sksq'}, { id: id(), title: '河道水情', path: '/mgr/sq/qth/hdsq'}, { id: id(), title: '实时雨情', path: '/mgr/sq/qth/ssyq'}, - { id: id(), title: '大坝安全监测', path: '/mgr/sq/qth/dbaqjc'}, + { id: id(), title: '土壤墒情', path: '/mgr/sq/qth/trsq'}, + { id: id(), title: '水库溢洪', path: '/mgr/sq/qth/skyh'}, + // { id: id(), title: '大坝安全监测', path: '/mgr/sq/qth/dbaqjc'}, { id: id(), title: '视频监控', path: '/mgr/sq/qth/spjk'}, ] }, @@ -412,8 +414,10 @@ export async function loadMenu(): Promise { { id: id(), title: '渗压监测', path: '/mgr/gcaqjc/sjtjcx/syjx' }, { id: id(), title: '渗流监测 ', path: '/mgr/gcaqjc/sjtjcx/sljx' }, { id: id(), title: '位移监测 ', path: '/mgr/gcaqjc/sjtjcx/wyjx' }, + { id: id(), title: '人工监测数据录入 ', path: '/mgr/gcaqjc/sjtjcx/sjlr' }, { id: id(), title: '年度渗压统计表', path: '/mgr/gcaqjc/sjtjcx/ndsytjb' }, { id: id(), title: '年度渗流统计表', path: '/mgr/gcaqjc/sjtjcx/ndsltjb' }, + { id: id(), title: '年度位移统计表', path: '/mgr/gcaqjc/sjtjcx/ndwytjb' }, ] }, ], diff --git a/src/service/apiurl.js b/src/service/apiurl.js index f2c793bc1..23077b5e0 100644 --- a/src/service/apiurl.js +++ b/src/service/apiurl.js @@ -93,6 +93,7 @@ const apiurl = { azd: service_fxdd + '/shpPlacement/getDetailsAndAddvcdDataList',//安置点 getqsydw: service_fxdd + '/iaCBsnssinfo/getDetailsAndAddvcdDataList',//企事业单位list getyhjmh: service_fxdd + '/iaCFlrvvlg/getDetailsAndAddvcdDataList',//沿河居民户list + turangshangqing: '', wxqdetail: service_fxdd + '/iaCDanad/detail', @@ -229,6 +230,21 @@ const apiurl = { page: service_fxdd + "/osmoticShiftR/year/stat", export: service_fxdd + "/osmoticShiftR/year/stat/export", list1:service_fxdd + "/osmoticShiftR/year/stat/value" + }, + //人工监测数据录入 + sjlr:{ + syjc:{ + save: service_fxdd + "/osmoticPressR/insert", + edit: service_fxdd + "/osmoticPressR/update", + page: service_fxdd + "/osmoticPressR/page", + del: service_fxdd + "/osmoticPressR/del/", + }, + wyjc:{ + save: service_fxdd + "/osmoticShiftR/insert", + edit: service_fxdd + "/osmoticShiftR/update", + page: service_fxdd + "/osmoticShiftR/page", + del: service_fxdd + "/osmoticShiftR/del/", + } } }, // 工程安全分析 diff --git a/src/setupProxy.js b/src/setupProxy.js index 84d5b7104..6f6a432ac 100644 --- a/src/setupProxy.js +++ b/src/setupProxy.js @@ -9,6 +9,7 @@ module.exports = function (app) { // target: 'http://192.168.66.199:24105/',//正式 // target: 'http://36.139.207.50:18083/',//移动云 // target: 'http://192.168.66.49:24105/',//移动云 + // target: 'http://192.168.66.32:24105/',//ls changeOrigin: true, }) ); diff --git a/src/views/AppRouters.tsx b/src/views/AppRouters.tsx index 2ed693c7b..f9d09be9c 100644 --- a/src/views/AppRouters.tsx +++ b/src/views/AppRouters.tsx @@ -25,13 +25,14 @@ import Csgl from './fxzb/csgl' import Qxdw_Gc from './fxzb/qxdw/gc/index.js' import Qxwl_Gc from './fxzb/qxwl/gc' // 工程安全监测 -import Bzt from './gcaqjc/bzt' +import Bzt from './gcaqjc/bzt2' import Yhyj from "./gcaqjc/gcaqyj/yhyj" import Yjgzpz from "./gcaqjc/gcaqyj/yjgzpz" import Sljc from "./gcaqjc/sjtjcx/sljc" import Syjc from "./gcaqjc/sjtjcx/syjc" import Wyjc from "./gcaqjc/sjtjcx/wyjc" import Czcx from "./gcaqjc/sjtjcx/czcx" +import Sjlr from "./gcaqjc/sjtjcx/sjlr" import Ndsytjb from "./gcaqjc/sjtjcx/ndsytjb" import Ndsltjb from "./gcaqjc/sjtjcx/ndsltjb" import Ndwytjb from "./gcaqjc/sjtjcx/ndwytjb" @@ -92,6 +93,8 @@ import Gcdsj from './sq/qzq/gcdsj' import Sksq from './sq/qth/sksq' import Hdsq from './sq/qth/hdsq' import Ssyq from './sq/qth/ssyq' +import Trsq from './sq/qth/trsq' +import Skyh from './sq/qth/skyh' import Qzqda from './sq/qzq/qzqda' // import Zcdjxx from './sq/qys/' // import Zcdjxx from './sq/qfg/zcdjxx' @@ -171,6 +174,8 @@ const AppRouters: React.FC = () => { { path: 'sq/qth/sksq', element: }, { path: 'sq/qth/hdsq', element: }, { path: 'sq/qth/ssyq', element: }, + { path: 'sq/qth/trsq', element: }, + { path: 'sq/qth/skyh', element: }, // 预警 { path: 'gcaqjc/gcaqyj/bzt', element: }, @@ -182,6 +187,7 @@ const AppRouters: React.FC = () => { { path: 'gcaqjc/sjtjcx/sljx', element: }, { path: 'gcaqjc/sjtjcx/wyjx', element: }, { path: 'gcaqjc/sjtjcx/czcx', element: }, + { path: 'gcaqjc/sjtjcx/sjlr', element: }, { path: 'gcaqjc/sjtjcx/ndsytjb', element: }, { path: 'gcaqjc/sjtjcx/ndsltjb', element: }, { path: 'gcaqjc/sjtjcx/ndwytjb', element: }, diff --git a/src/views/Home/MapCtrl/Markers/PicStLayer.js b/src/views/Home/MapCtrl/Markers/PicStLayer.js index d6e3cd297..7ef6a7a40 100644 --- a/src/views/Home/MapCtrl/Markers/PicStLayer.js +++ b/src/views/Home/MapCtrl/Markers/PicStLayer.js @@ -18,7 +18,6 @@ export default class PicStLayer extends BaseLayer { onAdd() { PicStMapDataPromise().then((data) => { - this._dispatch.runtime.setMarkers({ [this.getLayerName()]: data || [] }); diff --git a/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js b/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js index a28e1b91b..ef323258e 100644 --- a/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js +++ b/src/views/Home/MapCtrl/Markers/ShuiKuLayer.js @@ -2,6 +2,75 @@ import { SkRealPromiseWX } from "../../../../models/_/real"; import BaseLayer from "../baselayer"; import ShuikuMarker from "./ShuikuMarker"; + + +const sj = { + "stcd": "61610701", + "stnm": "檀树岗2", + "rvnm": "檀树岗河", + "hnnm": "长江中游下段北岸", + "bsnm": "长江", + "lgtd": "114.744317000", + "lttd": "31.505000000", + "stlc": "黄冈市红安县七里镇檀树岗村", + "alt": null, + "mdbz": null, + "mdpr": null, + "dtmnm": "吴淞", + "dtmel": null, + "dtpr": "0.000", + "sttp": "RR", + "dfrtms": null, + "fritm": null, + "frgrd": "3", + "esstym": "197103", + "bgfrym": "197103", + "edfrym": null, + "atcunit": "黄冈市水利和湖泊局", + "admauth": "黄冈水文", + "locality": "湖北水文", + "stbk": null, + "stazt": null, + "dstrvm": null, + "drna": "78", + "phcd": "TSG", + "usfl": "1", + "comments": "中小河流改造", + "moditime": "2022-02-23 00:00:00", + "remGd": null, + "ogid": null, + "vlfl": null, + "atid": null, + "sdfl": null, + "rma": null, + "mdps": null, + "mddt": null, + "stindex": null, + "starea": null, + "stlevel": null, + "code": null, + "ispbj": null, + "issxst": null, + "stpq": null, + "sthday": null, + "source": "SW", + "importancy": 0, + "clgtd": "114.744317000", + "clttd": "31.505000000", + "elev": null, + "crucial": 0, + "buildYear": null, + "adcd": null, + "lyid": null, + "resCode": "42120250085", + "rvCode": null, + "status": 1, + "agreement": null, + "simCard": null, + "bdCard": null, + "v": 104.1 +} + export default class ShuiKuLayer extends BaseLayer { static LayerName = 'ShuiKuLayer'; @@ -25,7 +94,7 @@ export default class ShuiKuLayer extends BaseLayer { // } // }); // } - const list = data.map((i)=>{ + const list = [...data,sj].map((i)=>{ return { id : i.stcd, name: i.stnm, diff --git a/src/views/Home/MapCtrl/Markers/TuRangLayer.js b/src/views/Home/MapCtrl/Markers/TuRangLayer.js new file mode 100644 index 000000000..de4fc2c81 --- /dev/null +++ b/src/views/Home/MapCtrl/Markers/TuRangLayer.js @@ -0,0 +1,69 @@ +// import clone from "clone"; +import { PicStMapDataPromise } from "../../../../models/_/real"; +import apiurl from "../../../../service/apiurl"; +import { httppost2 } from "../../../../utils/request"; +import BaseLayer from "../baselayer"; +import TuRangMarker from "./TuRangMarker"; + +export default class TuRangLayer extends BaseLayer { + static LayerName = 'TuRangLayer'; + + constructor(props) { + super(props); + + this.highlights = {}; + } + + getLayerName() { + return TuRangLayer.LayerName; + } + + async onAdd() { + // const res = await httppost2(apiurl.home.turangshangqing) + const list = [ + { + id:'1', + stcd: '10001', + stnm: '水田站', + wd: '53', + tm: '2025-03-19 15:00:00', + lgtd: "114.7684000", + lttd: "31.4941000" + }, + { + id:'2', + stcd: '10002', + stnm: '旱田站', + wd: '21', + tm: '2025-03-19 15:00:00', + lgtd: "114.7984000", + lttd: "31.4941000" + }, + ] + this._dispatch.runtime.setMarkers({ + [this.getLayerName()]: list || [] + }); + + } + + setSetting(setting) { + const highlights = setting?.highlight?.TuRangLayer; + if (highlights !== this._setting?.highlight?.TuRangLayer) { + const setting = {}; + if (highlights) { + for (const h of highlights) { + setting[h] = true + } + } + this._dispatch.map.setMarkerSetting({ + [this.getLayerName()]: setting, + }); + } + + this._setting = setting; + } + + getComponentCls() { + return TuRangMarker; + } +} diff --git a/src/views/Home/MapCtrl/Markers/TuRangMarker.js b/src/views/Home/MapCtrl/Markers/TuRangMarker.js new file mode 100644 index 000000000..6437c294c --- /dev/null +++ b/src/views/Home/MapCtrl/Markers/TuRangMarker.js @@ -0,0 +1,168 @@ +import React, { useEffect } from 'react'; +import { Table, Tabs,Modal,message,Tooltip } from 'antd'; +import { zindexmarker } from '../zindex'; + +const { + css, + physics, +} = window.popmotionXL; + + +function renderMarker({ alarm, status }, { width, highlight }) { + + return ` +
+ + + +
+ `; +} + +const dist1 = 22000 * 22000; +const dist2 = 8000 * 8000; + + +function TuRangMarker({ data, dispatch, setting, zoom, distSq }) { + + const highlight = setting; + + let zindexOffset = 1; + if (!data.status) { + zindexOffset = 0; + } else if (data.alarm) { + zindexOffset = 2; + } + + useEffect(() => { + const width = 8; + + const placeholder = document.getElementById(`marker_turangshangqing_${data.id}`); + if (!placeholder) { + return; + } + + const ratio = highlight ? 1.2 : 1.0; + + const svgMarker = renderMarker(data, { width: width * ratio, highlight }); + + placeholder.innerHTML = svgMarker; + + if (!highlight) { + + const el = placeholder.firstChild; + const marker = el.nextSibling; + + const markerSVG = marker.querySelector('svg'); + + const markerRenderer = css(markerSVG, { + enableHardwareAcceleration: false + }); + + const markerGrowSize = 1.2; + + const markerScale = physics({ + from: 1, + to: markerGrowSize, + velocity: 20, + spring: 300, + friction: 0.8, + onUpdate: (x) => markerRenderer.set('scale', x), + }); + + + const zindex = zindexmarker.turangshangqing + zindexOffset; + + marker.addEventListener('mouseenter', () => { + if (placeholder.parentNode.style.zIndex); { + placeholder.parentNode.style.zIndex = zindex + zindexmarker.hilightPlus; + } + markerScale.props.from = 1; + markerScale.props.to = markerGrowSize; + markerScale.start(); + }); + + marker.addEventListener('mouseleave', () => { + if (placeholder.parentNode.style.zIndex); { + placeholder.parentNode.style.zIndex = zindex; + } + markerScale.props.from = markerGrowSize; + markerScale.props.to = 1; + markerScale.start(); + }); + } + + return () => { + placeholder.innerHTML = ''; + } + }, [highlight]); + + const showPop = () => { + dispatch.runtime.setFeaturePop({ + id: data.id, + type: 'turangshangqing', + data, + lgtd: data.lgtd, + lttd: data.lttd, + elev: data.elev, + }) + } + + let markerZoom; + if (highlight) { + markerZoom = 2; + } else if (zoom) { + markerZoom = (zoom - 10) * 0.5; + } else { + markerZoom = (dist1 - distSq) / (dist1 - dist2) * 2 + 1; + } + if (markerZoom < 1) { + markerZoom = 1; + } else if (markerZoom > 2.5) { + markerZoom = 2.5; + } else { + markerZoom = parseFloat(markerZoom.toFixed(1)); + } + + return ( + <> + +
1 ? ' scale(' + markerZoom + ')' : ''}`, + lineHeight: 1, + zIndex: zindexmarker.turangshangqing + zindexOffset + (highlight ? zindexmarker.hilightPlus : 0) + }} + onClick={showPop} + >
+
+ { + (zoom > 10 || distSq < dist2 || highlight) && ( +
+ {data.stnm} +
+ ) + } + + ) +} + +export default React.memo(TuRangMarker); diff --git a/src/views/Home/MapCtrl/Pops/ShenLiu/TableData.js b/src/views/Home/MapCtrl/Pops/ShenLiu/TableData.js index 764e29517..338989b0c 100644 --- a/src/views/Home/MapCtrl/Pops/ShenLiu/TableData.js +++ b/src/views/Home/MapCtrl/Pops/ShenLiu/TableData.js @@ -13,11 +13,11 @@ const Tabledata = ({tableData}) => { return ( <> ) diff --git a/src/views/Home/MapCtrl/Pops/ShenLiu/toolbar.js b/src/views/Home/MapCtrl/Pops/ShenLiu/toolbar.js index 4262b7727..371742e13 100644 --- a/src/views/Home/MapCtrl/Pops/ShenLiu/toolbar.js +++ b/src/views/Home/MapCtrl/Pops/ShenLiu/toolbar.js @@ -46,9 +46,9 @@ const ToolBar = ({search, defaultParams}) => { - + {/* - + */} ); diff --git a/src/views/Home/MapCtrl/Pops/ShuikuPop.js b/src/views/Home/MapCtrl/Pops/ShuikuPop.js index d6e819322..69930d1a6 100644 --- a/src/views/Home/MapCtrl/Pops/ShuikuPop.js +++ b/src/views/Home/MapCtrl/Pops/ShuikuPop.js @@ -88,12 +88,17 @@ function ShuikuPop({ id, data, dispatch }) { - - - - - - + { + data.id!=="61610701"? + <> + + + + + + + :null + } diff --git a/src/views/Home/MapCtrl/Pops/TuRang/TableData.js b/src/views/Home/MapCtrl/Pops/TuRang/TableData.js new file mode 100644 index 000000000..907e07912 --- /dev/null +++ b/src/views/Home/MapCtrl/Pops/TuRang/TableData.js @@ -0,0 +1,27 @@ +import {Table} from 'antd'; +import React, {useEffect, useState} from 'react'; +import moment from 'moment' + + +const Tabledata = ({tableData}) => { + const columns = [ + { title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1}, + { title: '数据时间', key: 'tm', dataIndex: 'tm', align: 'center',width:'200px',render: (rec) => {rec ?? "-"} }, + { title: '温度', key: '', dataIndex: '', align: 'center',render: (rec) => {rec ?? "-"} }, + ]; + + return ( + <> +
+ + ) + +} + +export default Tabledata \ No newline at end of file diff --git a/src/views/Home/MapCtrl/Pops/TuRang/drpOption.js b/src/views/Home/MapCtrl/Pops/TuRang/drpOption.js new file mode 100644 index 000000000..e31d1c731 --- /dev/null +++ b/src/views/Home/MapCtrl/Pops/TuRang/drpOption.js @@ -0,0 +1,173 @@ +export default function drpOption(data,yjData) { + console.log("data",data); + // const maxVal = 0//Math.max(...data.map(obj => obj.drp)) + // const max1 = Math.max(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const min1 = Math.min(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const max2 = Math.max(...data.map(obj => obj.rz)) + // const min2 = Math.min(...data.map(obj => obj.rz)) + // const yj = yjData?.map((item,index)=>{ + // return { + // yAxisIndex: 0, + // name: item.yjName, + // type: 'line', + // color: item.color, + // lineStyle: { + // type: "dashed", + // width: 1, + // }, + // data: data.map(o => item.value), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + // smooth: 0.5 + // } + // }) + + return { + + tooltip: { + trigger: 'axis', + + }, + grid: [ + { + top: "12%", + left: "10%", + right: "8%", + width: '80%', + height: '75%' + }, + ], + legend: { + top:'3%', + // 显示图例 + show: true, + // 图例的位置 + data: ["流量"], + }, + xAxis: [ + { + type: 'category', + data: data.map(o => o.tm), + inverse: false, + splitLine: { + show: false + }, + axisLabel: { + padding: [0, 0, 100, 0], + color: '#333', + fontSize: 12, + formatter: val => val.slice(0,10) + }, + axisLine: { + lineStyle: { + color: '#d9d9d9', + width: 1, + } + }, + axisTick: { + show: false, + }, + } + ], + yAxis: [ + { + // gridIndex: 1, + type: 'value', + position: 'left', + name: "流量(L/s)", + nameTextStyle: { + padding: [0, 0, 10, 10], + color:'#333333', + fontSize: 14 + }, + splitLine: { + show: true, + lineStyle: { + color: '#bfbfbf', + width: 0.5, + type: 'dotted' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + }, + axisLine: { + show: false + // lineStyle: { + // color: '#8c8c8c', + // width: 1, + // } + }, + axisTick: { + show: false, + }, + // min: Math.floor(min1*0.8), + // max: Math.ceil(max1*1.2), + }, + // { + // // gridIndex: 1, + // type: 'value', + // position: 'right', + // name: "库水位(m)", + // nameTextStyle: { + // padding: [0, 0, 10, 10], + // color:'#333333', + // fontSize: 14 + // }, + // splitLine: { + // show: false, + // lineStyle: { + // color: '#07a6ff', + // width: 0.25, + // type: 'dotted' + // } + // }, + // axisLabel: { + // color: '#333', + // fontSize: 12, + // }, + // axisLine: { + // show: false + // // lineStyle: { + // // color: '#8c8c8c', + // // width: 1, + // // } + // }, + // axisTick: { + // show: false, + // }, + // min: Math.floor(min2*0.8), + // max: Math.ceil(max2*1.2), + // } + ], + series: [ + { + // xAxisIndex: 1, + // yAxisIndex: 0, + name: '流量', + type: 'line', + color: "#d6eaec", + lineStyle: { + // type: "dashed" + }, + data: data.map(o => o.value), + symbol: 'none', // 设置标记点为'none',即去掉圆点 + smooth: 0.5 + }, + // ...yj + // { + // // xAxisIndex: 1, + // yAxisIndex: 1, + // name: '库水位', + // type: 'line', + // color: "#60a0f8", + // lineStyle: { + // // type: "dashed" + // }, + // data: data.map(o => o.rz), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + // smooth: 0.5 + // }, + ] + }; +} diff --git a/src/views/Home/MapCtrl/Pops/TuRang/index.js b/src/views/Home/MapCtrl/Pops/TuRang/index.js new file mode 100644 index 000000000..05dbfe8b7 --- /dev/null +++ b/src/views/Home/MapCtrl/Pops/TuRang/index.js @@ -0,0 +1,76 @@ +import React, { useEffect, useState, useMemo } from 'react'; +import { Descriptions, Form, Button, Input, DatePicker } from 'antd'; +import {CloseOutlined} from '@ant-design/icons'; +import ReactEcharts from 'echarts-for-react'; +import { httppost2 } from '../../../../../utils/request'; +import apiurl from '../../../../../service/apiurl'; +import moment from "moment" +import ToolBar from './toolbar'; +import TableData from './TableData' +import drpOption from './drpOption'; + +function ShenLiu({ id, data, dispatch, onCancel }) { + console.log(data); + const [ tableData, setTableData ] = useState([]) + const option = useMemo(() => drpOption(tableData), [tableData]) + const width = 780; + + const closePop = () => { + if(onCancel){ + onCancel() + } + dispatch.runtime.closeFeaturePop(id); + }; + + const getData = async(tms,stcd)=>{ + // const params = { + // type: 2, + // dateTimeRangeSo: { + // start: moment(tms[0]).format('YYYY-MM-DD HH:mm:ss'), + // end: moment(tms[1]).format('YYYY-MM-DD HH:mm:ss'), + // }, + // stcd + // } + // const { code, data} = await httppost2(apiurl.home.syslList,params) + // if(code!==200){ + // return + // } + setTableData([]) + } + + useEffect(()=>{ + getData([moment().add(-1,'months'),moment()],data.stcd) + },[]) + + return ( + <> +
+
+
+ {data.stnm} +
+ +
+
+ +
+ getData(tms,data.stationCode)}/> +
+
+
+ +
+
+ { + tableData.length>0? + + :
+ } +
+
+
+ + ) +} + +export default React.memo(ShenLiu); diff --git a/src/views/Home/MapCtrl/Pops/TuRang/toolbar.js b/src/views/Home/MapCtrl/Pops/TuRang/toolbar.js new file mode 100644 index 000000000..371742e13 --- /dev/null +++ b/src/views/Home/MapCtrl/Pops/TuRang/toolbar.js @@ -0,0 +1,57 @@ +import { Form, message, Button, DatePicker } from 'antd'; +import NormalSelect from '../../../../../components/Form/NormalSelect' +import moment from "moment" +const { RangePicker } = DatePicker; + +const cysd = [ + { label:'今日',value:'今日',tms:[moment().format('YYYY-MM-DD 00:00:00'),moment().format('YYYY-MM-DD HH:mm:ss')]}, + { label:'近一周',value:'近一周',tms:[moment().add(-7,'days').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]}, + { label:'近一月',value:'近一月',tms:[moment().add(-1,'months').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]}, + { label:'近三月',value:'近三月',tms:[moment().add(-3,'months').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]}, + { label:'近一年',value:'近一年',tms:[moment().add(-1,'years').format('YYYY-MM-DD HH:mm:ss'),moment().format('YYYY-MM-DD HH:mm:ss')]}, + ] + +const ToolBar = ({search, defaultParams}) => { + const [form] = Form.useForm(); + + const onFinish = (val)=>{ + search(val.tms) + } + + return ( + <> + + + { + form.setFieldValue('cysd',null) + }} + style={{ width: "380px" }} + format="YYYY-MM-DD HH:mm:ss" + /> + + + { + if(e==='今天08:00~当前时间'&& moment().format('HH')<8){ + return message.error('请在08:00后选择') + } + form.setFieldValue('tms',[moment(data.tms[0]),moment(data.tms[1])]) + }}/> + + + + + {/* + + */} + + + ); +} + +export default ToolBar; \ No newline at end of file diff --git a/src/views/Home/MapCtrl/Pops/index.js b/src/views/Home/MapCtrl/Pops/index.js index 7588c9fa7..7b9de1391 100644 --- a/src/views/Home/MapCtrl/Pops/index.js +++ b/src/views/Home/MapCtrl/Pops/index.js @@ -41,6 +41,7 @@ import ShenLiu from './ShenLiu/index.js'; import WeiYi from './WeiYi/index.js'; import XunJian from './XunJian.js' import DaiChuLi from './DaiChuLi.js' +import TuRang from './TuRang' import YinShuiGongCheng from './YinShuiGongCheng';//这个先不搞 @@ -88,6 +89,12 @@ function FeaturePops({ mapobj }) { ) + }else if (type === 'turangshangqing') { + return ( + dispatch.runtime.closeFeaturePop(id)} destroyOnClose={true}> + + + ) }else if (type === 'hdsw') { // Comp = HdswPop; return ( diff --git a/src/views/Home/MapCtrl/layermgr.js b/src/views/Home/MapCtrl/layermgr.js index 98076cbc5..dfa9dd598 100644 --- a/src/views/Home/MapCtrl/layermgr.js +++ b/src/views/Home/MapCtrl/layermgr.js @@ -2,6 +2,7 @@ import AdcdLayer from "./Markers/AdcdLayer"; import AdcdAllLayer from "./Markers/AdcdAllLayer"; import FzdxLayer from "./Markers/FzdxLayer"; import PicStLayer from "./Markers/PicStLayer"; +import TuRangLayer from "./Markers/TuRangLayer" import HdswLayer from "./Markers/HdswLayer"; import XjHdswLayer from "./Markers/XjHdswLayer"; import XxjyswzLayer from "./Markers/XxjyswzLayer"; @@ -90,6 +91,7 @@ export default class LayerMgr { HeLiuZhuJiLayer, // FzdxLayer, PicStLayer, + TuRangLayer, // XjHdswLayer, // SmallSkRiskLayer, RhbjqLayer, XjRealDrpLayer, WarnLayer, ForecastLayer, RadarLayer, XxjyswzLayer ]; diff --git a/src/views/Home/TuLi/Tuli6.js b/src/views/Home/TuLi/Tuli6.js index 58278ec96..ba66cf6fa 100644 --- a/src/views/Home/TuLi/Tuli6.js +++ b/src/views/Home/TuLi/Tuli6.js @@ -12,7 +12,7 @@ export default function TuLi() { return (
-
雨量
+
图例
diff --git a/src/views/Home/homePanelsLayoutPage/index.js b/src/views/Home/homePanelsLayoutPage/index.js index 1661c7485..9b4995e9f 100644 --- a/src/views/Home/homePanelsLayoutPage/index.js +++ b/src/views/Home/homePanelsLayoutPage/index.js @@ -6,6 +6,7 @@ import './index.less' import Yujing from './item_yujing/index.js' import Yuqing from './item_yuqing' import ShuiKu from './item_shuiku' +import TuRangShangQing from './item_turangshangqing' import GongShui from './item_gongshui' import GongCheng from './item_gongcheng' import JianCe from './item_jiance' @@ -22,7 +23,7 @@ import AnZhiDian from './item_anzhidian' import QSYDW from './item_qishiyedanwei' import YHJMH from './item_yanhejuminhu' import SetWxqStation from '../setMapStation/wxq' -import Bzt from '../../gcaqjc/bzt' +import Bzt from '../../gcaqjc/bzt2' import Tuli from '../TuLi/Tuli.js' import Tuli2 from '../TuLi/Tuli2.js'; @@ -41,17 +42,13 @@ const items = [ { key:'1', label:'综合监视', children:[ { key:'11', label:'预警', labelRight:'预警', icon:'yujing' }, { key:'12', label:'雨情', labelRight:'统计', icon:'yuqing' }, - { key:'13', label:'水情', labelRight:'实时水情', icon:'shuikushuiqing' }, + { key:'13', label:'水库水情', labelRight:'实时水情', icon:'shuikushuiqing' }, + { key:'19', label:'土壤墒情', labelRight:'土壤墒情', icon:'turangshangqing' }, { key:'15', label:'工程安全', labelRight:'工程安全监测', icon:'gongchenganquan' }, { key:'16', label:'监测设备状态', labelRight:'监测设备运行', icon:'jianceshebeizhuangtai' }, - { key:'17', label:'水质', labelRight:'水质', icon:'shuizhi' }, + // { key:'17', label:'水质', labelRight:'水质', icon:'shuizhi' }, { key:'18', label:'视频点', labelRight:'视频点', icon:'shipindian' }, ] }, - // { key:'2', label:'水库工程', children:[ - // { key:'21', label:'水库', labelRight:'基本信息', icon:'shuiku' }, - // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, - // { key:'23', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, - // ] }, { key:'2', label:'巡查巡检', children:[ { key:'21', label:'巡查巡检', labelRight:'工程巡检', icon:'jianceshebeizhuangtai' }, // { key:'22', label:'大坝', labelRight:'基本信息', icon:'daba' }, @@ -66,6 +63,11 @@ const items = [ { key:'4', label:'水资源调度', children:[ { key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' }, ] }, + { key:'5', label:'水库工程', children:[ + { key:'51', label:'水库', labelRight:'基本信息', icon:'shuiku' }, + { key:'52', label:'大坝', labelRight:'基本信息', icon:'daba' }, + { key:'53', label:'溢洪道', labelRight:'基本信息', icon:'yihongdao' }, + ] }, ] @@ -139,6 +141,8 @@ const HomePage = ({showPanels}) => { setCheckedObj({ key:'31', label:'危险区', labelRight:'危险区列表', icon:'weixianqu' }) }else if(a==='4'){ setCheckedObj({ key:'41', label:'供水', labelRight:'今日供水实况', icon:'gongshui' }) + }else if(a==='5'){ + setCheckedObj({ key:'51', label:'水库', labelRight:'基本信息', icon:'shuiku' }) }else{ } }} expandIconPosition="end" accordion={true} bordered={false}> @@ -200,11 +204,12 @@ const HomePage = ({showPanels}) => { } { checkedObj.label === '预警' ? <>:null } { checkedObj.label === '雨情' ? :null } - { checkedObj.label === '水情' ? :null } + { checkedObj.label === '水库水情' ? :null } + { checkedObj.label === '土壤墒情' ? :null } { checkedObj.label === '供水' ? :null } { checkedObj.label === '工程安全' ? :null } { checkedObj.label === '监测设备状态' ? :null } - { checkedObj.label === '水质' ? :null } + {/* { checkedObj.label === '水质' ? :null } */} { checkedObj.label === '视频点' ? :null } { checkedObj.label === '巡查巡检' ? :null } @@ -231,7 +236,7 @@ const HomePage = ({showPanels}) => {
{ checkedObj.label==='雨情'?:null } - { checkedObj.label==='水情'?:null } + { checkedObj.label==='水库水情'?:null } { checkedObj.label==='供水'?:null } { (checkedObj.label==='水库'||checkedObj.label==='大坝'||checkedObj.label==='溢洪道'||checkedObj.label==='视频点')?:null } { (checkedObj.label==='危险区'||checkedObj.label==='安置点'||checkedObj.label==='企事业单位'||checkedObj.label==='沿河居民户')?:null } diff --git a/src/views/Home/homePanelsLayoutPage/item_daba.js b/src/views/Home/homePanelsLayoutPage/item_daba.js index 0f15605c8..9a0b21562 100644 --- a/src/views/Home/homePanelsLayoutPage/item_daba.js +++ b/src/views/Home/homePanelsLayoutPage/item_daba.js @@ -80,7 +80,7 @@ const Page = () => {
蓄水日期:
{tableData?.storageDate?.slice(0,10)}
- + {/*
图片资料
@@ -118,12 +118,12 @@ const Page = () => { } }} /> -
+
*/} {/* */} - + {/*
视频资料:
-
+
*/}
) diff --git a/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js b/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js index 0437e808f..030d2782e 100644 --- a/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js +++ b/src/views/Home/homePanelsLayoutPage/item_gongchengshuiku.js @@ -98,7 +98,7 @@ const Page = () => {
工程特性表:
setOpen(true)}>工程特性表详情
-
更多详情
+ {/*
更多详情
*/}
diff --git a/src/views/Home/homePanelsLayoutPage/item_gongshui.js b/src/views/Home/homePanelsLayoutPage/item_gongshui.js index 7ba8c0149..6499ed8b4 100644 --- a/src/views/Home/homePanelsLayoutPage/item_gongshui.js +++ b/src/views/Home/homePanelsLayoutPage/item_gongshui.js @@ -43,7 +43,7 @@ const Page = () => {
- 灌溉发电 + 灌溉用水
diff --git a/src/views/Home/homePanelsLayoutPage/item_shuiku.js b/src/views/Home/homePanelsLayoutPage/item_shuiku.js index 56133697f..3324a96a0 100644 --- a/src/views/Home/homePanelsLayoutPage/item_shuiku.js +++ b/src/views/Home/homePanelsLayoutPage/item_shuiku.js @@ -4,10 +4,79 @@ import {reservoirlist, reswarn} from "../../../service/sssq" import { SkRealPromiseWX } from "../../../models/_/real"; import genDamImage from '../../../components/DamGraph/DamImage' import MyImg from './myImg' +import Ykqk from './item_shuiku/yhqk' +const sj = { + "stcd": "61610701", + "stnm": "檀树岗2", + "rvnm": "檀树岗河", + "hnnm": "长江中游下段北岸", + "bsnm": "长江", + "lgtd": "114.744317000", + "lttd": "31.505000000", + "stlc": "黄冈市红安县七里镇檀树岗村", + "alt": null, + "mdbz": null, + "mdpr": null, + "dtmnm": "吴淞", + "dtmel": null, + "dtpr": "0.000", + "sttp": "RR", + "dfrtms": null, + "fritm": null, + "frgrd": "3", + "esstym": "197103", + "bgfrym": "197103", + "edfrym": null, + "atcunit": "黄冈市水利和湖泊局", + "admauth": "黄冈水文", + "locality": "湖北水文", + "stbk": null, + "stazt": null, + "dstrvm": null, + "drna": "78", + "phcd": "TSG", + "usfl": "1", + "comments": "中小河流改造", + "moditime": "2022-02-23 00:00:00", + "remGd": null, + "ogid": null, + "vlfl": null, + "atid": null, + "sdfl": null, + "rma": null, + "mdps": null, + "mddt": null, + "stindex": null, + "starea": null, + "stlevel": null, + "code": null, + "ispbj": null, + "issxst": null, + "stpq": null, + "sthday": null, + "source": "SW", + "importancy": 0, + "clgtd": "114.744317000", + "clttd": "31.505000000", + "elev": null, + "crucial": 0, + "buildYear": null, + "adcd": null, + "lyid": null, + "resCode": "42120250085", + "rvCode": null, + "status": 1, + "agreement": null, + "simCard": null, + "bdCard": null, + "v": 104.1 +} + const Page = () => { const dispatch = useDispatch(); + const [ checked, setChecked ] = useState(0) const [data,setData] = useState([]) console.log('aaa',data); useEffect(()=>{ @@ -21,21 +90,21 @@ const Page = () => { },[]) const getData = async (params) => { - setData(await reservoirlist(params)) + const data1 = await reservoirlist(params) + const data2 = [...data1,sj] + setData(data2) } const getShuiKu = ()=>{ SkRealPromiseWX.get().then((res) => { - const list = res.map((i)=>{ + const list = [...res,sj].map((i)=>{ return { id : i.stcd, name: i.stnm, ...i } }) - const data = list[0] - - + const data = list[checked] dispatch.runtime.setFeaturePop({ id: data.id, type: 'shuiku', @@ -46,21 +115,36 @@ const Page = () => { }) }); } + + return ( <> -
- { - data ? ( - - ) : ( -
暂无数据
- ) - } -
详情
-
- +
+
+ { + data.map((item,index)=> +
setChecked(index)}>{item.stnm}
+ ) + } +
+ { + data ? ( + + ) : ( +
暂无数据
+ ) + } +
详情
+
+
+
+ + 溢洪情况 +
+
+ ) } diff --git a/src/views/Home/homePanelsLayoutPage/item_shuiku/drpOption.js b/src/views/Home/homePanelsLayoutPage/item_shuiku/drpOption.js new file mode 100644 index 000000000..fba4b5702 --- /dev/null +++ b/src/views/Home/homePanelsLayoutPage/item_shuiku/drpOption.js @@ -0,0 +1,106 @@ +import echarts from 'echarts/lib/echarts'; + + +export default function drpOption({data}) { + let arr =[] + data.forEach(item=>{ + arr.push([item.w,item.rz]) + }) + return { + title: { + // text: "库容曲线图", + left: "40%", + }, + legend: { + top:'3%', + // 显示图例 + show: false, + // 图例的位置 + data: ["溢洪流量"], + }, + tooltip: { + trigger: 'axis', + }, + grid: [ + { + top: "20%", + left: "10%", + right: "5%", + bottom: "10%" + }, + ], + xAxis: [ + { + // name: "流量m³/s", + nameGap: 0, + type: 'category', + data: data.map(o => o.bgtm), + splitLine: { + show: false + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + formatter: val => val.slice(11,16) + }, + axisLine: { + lineStyle: { + color: '#8c8c8c', + width: 0.5, + } + }, + axisTick: { + show: false, + }, + } + ], + yAxis: [ + { + type: 'value', + name: "流量m³/s", + nameTextStyle: { + padding: [0, 0, 5, -10], + color:'#8c8c8c', + fontSize: 12 + }, + splitLine: { + show: true, + lineStyle: { + color: '#cacaca', + width: 1, + type: 'dotted' + } + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + formatter: val => val + }, + axisLine: { + show: false + }, + axisTick: { + show: false, + }, + } + ], + series: [ + { + type: 'line', + name: '溢洪流量', + color: "#7699f3", + data: data.map(o => o.q), + // symbol: 'none' // 设置标记点为'none',即去掉圆点 + symbolSize:8, + areaStyle: { + // 开启阴影 + shadowColor: 'rgba(0, 0, 0, 0.1)', // 阴影颜色 + shadowBlur: 10, // 阴影的模糊大小 + shadowOffsetX: 5, // 阴影水平方向上的偏移 + shadowOffsetY: 5, // 阴影垂直方向上的偏移 + opacity: 0.5 // 区域颜色的透明度 + }, + }, + ] + }; +} diff --git a/src/views/Home/homePanelsLayoutPage/item_shuiku/yhqk.js b/src/views/Home/homePanelsLayoutPage/item_shuiku/yhqk.js new file mode 100644 index 000000000..9d08552e7 --- /dev/null +++ b/src/views/Home/homePanelsLayoutPage/item_shuiku/yhqk.js @@ -0,0 +1,49 @@ +import { useEffect, useState, useMemo } from "react" +import {useDispatch, useSelector} from "react-redux"; +import {Descriptions} from "antd"; +import ReactEcharts from 'echarts-for-react'; +import drpOption from './drpOption' +import { httppost2 } from "../../../../utils/request"; +import apiurl from "../../../../service/apiurl"; + + + +const Page = () => { + const [data,setData] = useState([]) + const option = useMemo(() => { + return drpOption({data}); + }, [data]) + + useEffect(()=>{ + (async()=>{ + const {data,code} = await httppost2(apiurl.dataResourcesCenter.projectAndWater.xl.list,{stcd:'61610700'}) + if(code!==200){ + return + } + setData(data) + })() + },[]) + + + + return ( + <> +
+ +
+
+ + {103.89}m + {0.20}m³/s + {8.67}万m³ + {'06-24 09:30'} + +
+ + ) +} + +export default Page diff --git a/src/views/Home/homePanelsLayoutPage/item_turangshangqing.js b/src/views/Home/homePanelsLayoutPage/item_turangshangqing.js new file mode 100644 index 000000000..30c36b6bc --- /dev/null +++ b/src/views/Home/homePanelsLayoutPage/item_turangshangqing.js @@ -0,0 +1,95 @@ +import { useEffect, useState } from "react" +import {useDispatch, useSelector} from "react-redux"; +import { Table, Modal, message } from 'antd'; +import { httppost2 } from '../../../utils/request'; +import apiurl from '../../../service/apiurl'; + + +const Page = () => { + const dispatch = useDispatch(); + const [ tableData, setTableData ] = useState([])//在线 + + const columns = [ + { title: '站点', key: 'stnm', dataIndex: 'stnm',align: "center",width:80, ellipsis: true, }, + { title: '温度', key: 'wd', dataIndex: 'wd',align: "center",width:80, ellipsis: true, }, + { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true }, + ]; + + useEffect(()=>{ + dispatch.map.setLayerVisible({ TuRangLayer: true }) + getData() + return ()=>{ + dispatch.map.setLayerVisible({ TuRangLayer: false }) + } + },[]) + + const getData = async()=>{ + // const { code, data} = await httppost2(apiurl.home.turangshangqing) + // if(code!==200){ + // return + // } + const list = [ + { + id:'1', + stcd: '10001', + stnm: '水田站', + wd: '53', + tm: '2025-03-19 15:00:00', + lgtd: "114.7684000", + lttd: "31.4941000" + }, + { + id:'2', + stcd: '10002', + stnm: '旱田站', + wd: '21', + tm: '2025-03-19 15:00:00', + lgtd: "114.7984000", + lttd: "31.4941000" + }, + ] + + + + setTableData(list) + } + + + + + return ( + <> +
+
+
({ + onClick:()=>{ + // dispatch.runtime.setCameraTarget({ + // center: [row.lgtd, row.lttd], + // zoom: 13, + // pitch: 60 + // }) + dispatch.runtime.setFeaturePop({ + id: row.id, + data:{...row}, + type: 'turangshangqing', + lgtd: row.lgtd, + lttd: row.lttd, + }) + } + }) + } + /> + + + + ) +} + +export default Page diff --git a/src/views/Home/homePanelsLayoutPage/myImg.js b/src/views/Home/homePanelsLayoutPage/myImg.js index 283589344..7dfc7a7c4 100644 --- a/src/views/Home/homePanelsLayoutPage/myImg.js +++ b/src/views/Home/homePanelsLayoutPage/myImg.js @@ -25,7 +25,7 @@ const MyImg = ({ record }) => { return (
{v?.slice(5,16)}
}, + { title: '管水位(m)', key: 'value', dataIndex: 'value',align: "center", ellipsis: true, render:(v,row)=>
{v}
}, + ] + + const columnsSl = [ + { title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center", ellipsis: true }, + { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 150, ellipsis: true, render:(v,row)=>
{v?.slice(5,16)}
}, + { title: '渗流量(L/s)', key: 'value', dataIndex: 'value',align: "center", ellipsis: true, render:(v,row)=>
{v}
}, + ] + + const columnsWy = [ + { title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 80, ellipsis: true }, + { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=>
{v?.slice(5,10)}
{v?.slice(11,16)}
}, + { title:
X方向
(mm)
, key: 'x', dataIndex: 'x',align: "center", ellipsis: true, render:(v,row)=>
{v}
}, + { title:
Y方向
(mm)
, key: 'y', dataIndex: 'y',align: "center", ellipsis: true, render:(v,row)=>
{v}
}, + { title:
H方向
(mm)
, key: 'h', dataIndex: 'h',align: "center", ellipsis: true, render:(v,row)=>
{v}
}, + ] + + + useEffect(()=>{ + getSyData() + getSlData() + getWyData() + getDmData() + },[]) + + const getSyData = async()=>{ + const {code, data} = await httpget2(apiurl.home.sy) + const list = [] + + const c = ['01','04','07','16','10','13','02','05','08','17','11','14','03','06','09','12','15','24','26','28','25','27','29','18','19','20','21','22','23'] + .map((i)=>{ + list.push({ + "stationCode": "SY"+i, + "profileName": "B0+250", + "tm": "2024-10-10 08:00:00", + "value": 195.3, + "flag": 1, + "status": 0 + }) + }) + + if(code!==200){ + return + } + setSyList(list) + } + + const getSlData = async()=>{ + const {code, data} = await httpget2(apiurl.home.sl) + if(code!==200){ + return + } + + const list = [{ + "stationCode": "SL01", + "profileName": null, + "tm": "2024-10-27 08:00:00", + "value": 1.18, + "flag": 1, + "status": 0 + }] + setSlList(list) + } + + const getWyData = async()=>{ + const {code, data} = await httpget2(apiurl.home.wy) + if(code!==200){ + return + } + const list = [] + for(let a=1; a<33; a++){ + list.push({ + "stationCode": "WY"+(a<10?('0'+a):a), + "tm": "2024-10-15 08:00:00", + "flag": 1, + "x": -0.09, + "y": 0.1, + "h": 0.12, + "xstatus": 0, + "ystatus": 0, + "hstatus": 0 + }) + } + for(let b=1; b<37; b++){ + list.push({ + "stationCode": "ZY"+(b<10?('0'+b):b), + "tm": "2024-10-15 08:00:00", + "flag": 1, + "x": -0.09, + "y": 0.1, + "h": 0.12, + "xstatus": 0, + "ystatus": 0, + "hstatus": 0 + }) + } + + setWyList(list) + } + + const getDmData = async()=>{ + const {code, data} = await httppost2(apiurl.home.dmList) + if(code!==200){ + return + } + console.log('断面',data) + setDmList(data) + } + + + return ( +
+ + +
+ + { + syList.map((item)=> +
{ + setOpenSy(true) + setModalData(item) + }}> + {item.stationCode} + +
+ ) + } + {/* { + slList.map((item)=> +
{ + setOpenSl(true) + setModalData(item) + }}> + {item.stationCode} + +
+ ) + } */} + { + wyList.map((item)=> +
{ + setOpenWy(true) + setModalData(item) + }} + > + {item.stationCode} + +
+ ) + } +
+
+
+ { + !isHome? +
+ + 渗压监测
} key="1"> +
+
({ + onClick:()=>{ + setOpenSy(true) + setModalData(data) + } + }) + } + /> + + + 渗流监测} key="2"> +
+
({ + onClick:()=>{ + setOpenSl(true) + setModalData(data) + } + }) + } + /> + + + 位移监测} key="3"> +
+
({ + onClick:()=>{ + setOpenWy(true) + setModalData(data) + } + }) + } + /> + + + +
+ setShouQi(!shouqi)}/> +
+ :null + } + + {/*
+ +
*/} + + setOpenSy(false)} destroyOnClose={true}> + setOpenSy(false)}/> + + setOpenSl(false)} destroyOnClose={true}> + setOpenSl(false)}/> + + setOpenWy(false)} destroyOnClose={true}> + setOpenWy(false)}/> + + setOpenDm(false)} destroyOnClose={true}> + setOpenDm(false)}/> + + + ) +} diff --git a/src/views/gcaqjc/bzt2/index.less b/src/views/gcaqjc/bzt2/index.less new file mode 100644 index 000000000..e01449937 --- /dev/null +++ b/src/views/gcaqjc/bzt2/index.less @@ -0,0 +1,674 @@ +.gcaqjc_bzt{ + width: 100%; + height: 100%; + background-color: #ffffff; + overflow: hidden; + position: relative; + + + + .gcaqjc_bzt_wrapperClass{ + width: '100%'; + } + + + .imgBox { + position: relative; + width: 1200px; + height: 800px; + border: 2px solid red; + overflow: hidden; + } + + .imgBox img { + position: absolute; + width: 100%; + height: 100%; + cursor: pointer; + } + + .gcaqjc_bzt_rightBox{ + width: 400px; + background: #f5f7fa; + position: absolute; + right: 4px; + top: 30px; + border-radius: 5px; + border: 1px solid #eee; + + + .ant-tabs-nav{ + margin-bottom: 5px; + } + + .gcaqjc_bzt_rightBox_table{ + width: 100%; + min-height: 750px; + background: #ffffff; + border: 1px solid #eee; + + + .ant-table-thead{ + th{ + height: 40px !important; + background-color: #e2edfd !important; + } + } + .ant-table-tbody{ + .ant-table-measure-row{ + td{ + padding: 0 !important; + } + } + tr:nth-child(odd) { + td{ + background-color: #f5f8fe !important; + } + } + + + } + } + } + + .gcaqjc_bzt_rightBox_Btn{ + position: absolute; + left: -25px; + top: 45%; + cursor: pointer; + } + + + + [class*="gcaqjc_bzt_sy"]{ + position: absolute; + display: flex; + flex-direction: column; + align-items: center; + font-size: 10px; + color: #00c188; + cursor: pointer; + left: 0; + top: 0; + span{ + transform: scaleX(0.8); + letter-spacing: -0.8px; + font-weight: 700; + font-size: 6px; + margin-bottom: 1px; + text-shadow: + 0.3px 0.3px 0.3px white, /* 白色内描边 */ + -0.3px -0.3px 0.3px white, /* 白色内描边 */ + 0px 0px 1px white; /* 黑色外描边 */ + } + img{ + transform: scale(0.8); + } + } + [class*="gcaqjc_bzt_sl"]{ + position: absolute; + display: flex; + flex-direction: column; + align-items: center; + font-size: 10px; + color: #00c188; + cursor: pointer; + left: 0; + top: 0; + span{ + transform: scaleX(0.8); + letter-spacing: -0.8px; + font-weight: 700; + font-size: 6px; + margin-bottom: 1px; + text-shadow: + 0.3px 0.3px 0.3px white, /* 白色内描边 */ + -0.3px -0.3px 0.3px white, /* 白色内描边 */ + 0px 0px 1px white; /* 黑色外描边 */ + } + img{ + transform: scale(0.8); + } + } + [class*="gcaqjc_bzt_wy"]{ + position: absolute; + display: flex; + flex-direction: column; + align-items: center; + color: #00c188; + cursor: pointer; + left: 0; + top: 0; + span{ + transform: scaleX(0.8); + letter-spacing: -0.8px; + font-weight: 700; + font-size: 6px; + margin-bottom: 1px; + text-shadow: + 0.3px 0.3px 0.3px white, /* 白色内描边 */ + -0.3px -0.3px 0.3px white, /* 白色内描边 */ + 0px 0px 1px white; /* 黑色外描边 */ + } + img{ + transform: scale(0.8); + } + } + [class*="gcaqjc_bzt_dm"]{ + position: absolute; + display: flex; + flex-direction: column; + align-items: center; + color: #00c188; + font-size: 10px; + cursor: pointer; + left: 0; + top: 0; + } + + .gcaqjc_bzt_sy_SY01{ + left: 971px; + top: 883px; + } + .gcaqjc_bzt_sy_SY02{ + left: 986px; + top: 663px; + } + .gcaqjc_bzt_sy_SY03{ + left: 973.5px; + top: 432px; + } + .gcaqjc_bzt_sy_SY04{ + left: 994px; + top: 884px; + } + .gcaqjc_bzt_sy_SY05{ + left: 1006px; + top: 663px; + } + .gcaqjc_bzt_sy_SY06{ + left: 998px; + top: 430px; + } + .gcaqjc_bzt_sy_SY07{ + left: 1034px; + top: 886px; + } + .gcaqjc_bzt_sy_SY08{ + left: 1051px; + top: 668px; + } + .gcaqjc_bzt_sy_SY09{ + left: 1037px; + top: 441px; + } + .gcaqjc_bzt_sy_SY10{ + left: 994px; + top: 872px; + } + .gcaqjc_bzt_sy_SY11{ + left: 1007px; + top: 650px; + } + .gcaqjc_bzt_sy_SY12{ + left: 998px; + top: 442px; + } + .gcaqjc_bzt_sy_SY13{ + left: 1035px; + top: 874px; + } + .gcaqjc_bzt_sy_SY14{ + left: 1052px; + top: 656px; + } + .gcaqjc_bzt_sy_SY15{ + left: 1037px; + top: 429px; + } + .gcaqjc_bzt_sy_SY16{ + left: 1109px; + top: 884px; + } + + .gcaqjc_bzt_sy_SY17{ + left: 1126px; + top: 668px; + } + + .gcaqjc_bzt_sy_SY18{ + left: 645px; + top: 1230px; + } + .gcaqjc_bzt_sy_SY19{ + left: 632px; + top: 1234px; + } + + .gcaqjc_bzt_sy_SY20{ + left: 677px; + top: 1316px; + } + .gcaqjc_bzt_sy_SY21{ + left: 665px; + top: 1320px; + } + + .gcaqjc_bzt_sy_SY22{ + left: 710px; + top: 1401px; + } + .gcaqjc_bzt_sy_SY23{ + left: 697px; + top: 1406px; + } + .gcaqjc_bzt_sy_SY24{ + left: 51px; + top: 1478px; + } + .gcaqjc_bzt_sy_SY25{ + left: 18px; + top: 1469px; + } + .gcaqjc_bzt_sy_SY26{ + left: 46px; + top: 1491px; + } + + .gcaqjc_bzt_sy_SY27{ + left: 14px; + top: 1481px; + } + .gcaqjc_bzt_sy_SY28{ + left: 37px; + top: 1500px; + } + .gcaqjc_bzt_sy_SY29{ + left: 5px; + top: 1490px; + } + + .gcaqjc_bzt_wy_WY01{ + left: 961px; + top: 1003px; + } + .gcaqjc_bzt_wy_WY02{ + left: 971px; + top: 872px; + } + .gcaqjc_bzt_wy_WY03{ + left: 979px; + top: 764px; + } + .gcaqjc_bzt_wy_WY04{ + left: 986px; + top: 650px; + } + .gcaqjc_bzt_wy_WY05{ + left: 981px; + top: 547px; + } + .gcaqjc_bzt_wy_WY06{ + left: 973px; + top: 443px; + } + .gcaqjc_bzt_wy_WY07{ + left: 965px; + top: 327px; + } + .gcaqjc_bzt_wy_WY08{ + left: 974px; + top: 1004px; + } + .gcaqjc_bzt_wy_WY09{ + left: 983px; + top: 876px; + } + .gcaqjc_bzt_wy_WY10{ + left: 992px; + top: 766px; + } + .gcaqjc_bzt_wy_WY11{ + left: 996px; + top: 656px; + } + .gcaqjc_bzt_wy_WY12{ + left: 993px; + top: 546px; + } + .gcaqjc_bzt_wy_WY13{ + left: 986px; + top: 436px; + } + .gcaqjc_bzt_wy_WY14{ + left: 978px; + top: 325.5px; + } + .gcaqjc_bzt_wy_WY15{ + left: 1031px; + top: 1009px; + } + .gcaqjc_bzt_wy_WY16{ + left: 1045px; + top: 879px; + } + .gcaqjc_bzt_wy_WY17{ + left: 1049px; + top: 771px; + } + .gcaqjc_bzt_wy_WY18{ + left: 1061px; + top: 663px; + } + .gcaqjc_bzt_wy_WY19{ + left: 1050px; + top: 543px; + } + .gcaqjc_bzt_wy_WY20{ + left: 1045px; + top: 434px; + } + .gcaqjc_bzt_wy_WY21{ + left: 1037px; + top: 322px; + } + .gcaqjc_bzt_wy_WY22{ + left: 1070px; + top: 1012px; + } + .gcaqjc_bzt_wy_WY23{ + left: 1079px; + top: 882px; + } + .gcaqjc_bzt_wy_WY24{ + left: 1088px; + top: 774px; + } + .gcaqjc_bzt_wy_WY25{ + left: 1091px; + top: 666px; + } + .gcaqjc_bzt_wy_WY26{ + left: 1088px; + top: 542px; + } + .gcaqjc_bzt_wy_WY27{ + left: 1081px; + top: 432.5px; + } + .gcaqjc_bzt_wy_WY28{ + left: 1040px; + top: 20px; + } + .gcaqjc_bzt_wy_WY29{ + left: 974px; + top: 95px; + } + .gcaqjc_bzt_wy_WY30{ + left: 1057px; + top: 34px; + } + .gcaqjc_bzt_wy_WY31{ + left: 991px; + top: 111px; + } + .gcaqjc_bzt_wy_WY32{ + left: 660px; + top: 1266px; + } + + .gcaqjc_bzt_wy_ZY01{ + left: 55px; + top: 1465px; + } + .gcaqjc_bzt_wy_ZY02{ + left: 23px; + top: 1455px; + } + .gcaqjc_bzt_wy_ZY03{ + left: 48px; + top: 1503px; + } + + .gcaqjc_bzt_wy_ZY04{ + left: 16px; + top: 1493px; + } + + .gcaqjc_bzt_wy_ZY05{ + left: 1080px; + top: 67px; + } + .gcaqjc_bzt_wy_ZY06{ + left: 1104px; + top: 98px; + } + .gcaqjc_bzt_wy_ZY07{ + left: 1128px; + top: 129px; + } + .gcaqjc_bzt_wy_ZY08{ + left: 1151px; + top: 158px; + } + .gcaqjc_bzt_wy_ZY09{ + left: 1176px; + top: 185px; + } + .gcaqjc_bzt_wy_ZY10{ + left: 1203px; + top: 208px; + } + .gcaqjc_bzt_wy_ZY11{ + left: 1233px; + top: 234px; + } + .gcaqjc_bzt_wy_ZY12{ + left: 1259px; + top: 255px; + } + .gcaqjc_bzt_wy_ZY13{ + left: 1288px; + top: 281px; + } + .gcaqjc_bzt_wy_ZY14{ + left: 1314px; + top: 304px; + } + .gcaqjc_bzt_wy_ZY15{ + left: 1344px; + top: 328px; + } + .gcaqjc_bzt_wy_ZY16{ + left: 1026px; + top: 133px; + } + .gcaqjc_bzt_wy_ZY17{ + left: 1058px; + top: 153px; + } + .gcaqjc_bzt_wy_ZY18{ + left: 1092px; + top: 172px; + } + .gcaqjc_bzt_wy_ZY19{ + left: 1124px; + top: 192px; + } + .gcaqjc_bzt_wy_ZY20{ + left: 1152px; + top: 213px; + } + .gcaqjc_bzt_wy_ZY21{ + left: 1181px; + top: 234px; + } + .gcaqjc_bzt_wy_ZY22{ + left: 1210px; + top: 259px; + } + .gcaqjc_bzt_wy_ZY23{ + left: 1237px; + top: 283px; + } + .gcaqjc_bzt_wy_ZY24{ + left: 1266px; + top: 308px; + } + .gcaqjc_bzt_wy_ZY25{ + left: 1292px; + top: 330px; + } + .gcaqjc_bzt_wy_ZY26{ + left: 1320px; + top: 354px; + } + .gcaqjc_bzt_wy_ZY27{ + left: 1213px; + top: 198px; + } + .gcaqjc_bzt_wy_ZY28{ + left: 1242px; + top: 224px; + } + .gcaqjc_bzt_wy_ZY29{ + left: 1268px; + top: 245px; + } + .gcaqjc_bzt_wy_ZY30{ + left: 1297px; + top: 271px; + } + .gcaqjc_bzt_wy_ZY31{ + left: 1324px; + top: 293px; + } + + + .gcaqjc_bzt_wy_ZY32{ + left: 1251px; + top: 213px; + } + .gcaqjc_bzt_wy_ZY33{ + left: 1277px; + top: 234px; + } + .gcaqjc_bzt_wy_ZY34{ + left: 1307px; + top: 259px; + } + .gcaqjc_bzt_wy_ZY35{ + left: 1261px; + top: 202px; + } + .gcaqjc_bzt_wy_ZY36{ + left: 1289px; + top: 219px; + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + // .gcaqjc_bzt_sl_SL01{ + // left: 479px; + // top: 594px; + // } + + // .gcaqjc_bzt_sl_SL02{ + // left: 679px; + // top: 594px; + // } + + // .gcaqjc_bzt_wy_WY-G100{ + // left: 394px; + // top: 376px; + // } + // .gcaqjc_bzt_wy_WY-G101{ + // left: 594px; + // top: 376px; + // } + + // .gcaqjc_bzt_dm_DM0234205820000010{ + // left: 655px; + // top: 379px; + // } + + // .gcaqjc_bzt_dm_DM0234205820000011{ + // left: 555px; + // top: 379px; + // } + + // .gcaqjc_bzt_dm_DM0234205820000012{ + // left: 455px; + // top: 379px; + // } + + // .gcaqjc_bzt_dm_DM0234205820000013{ + // left: 1003px; + // top: 379px; + // } + + // .gcaqjc_bzt_dm_DM0234205820000014{ + // left: 42px; + // top: 379px; + // } +} \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/ndwytjb/index.js b/src/views/gcaqjc/sjtjcx/ndwytjb/index.js index 2156dc547..f9c28d1cd 100644 --- a/src/views/gcaqjc/sjtjcx/ndwytjb/index.js +++ b/src/views/gcaqjc/sjtjcx/ndwytjb/index.js @@ -6,6 +6,7 @@ import apiurl from '../../../../service/apiurl'; import { exportFile } from '../../../../utils/tools.js'; import { httppost2,httppost5 } from '../../../../utils/request'; import "./index.less" +import MyTable from './table' const Page = () => { const role = useSelector(state => state.auth.role); @@ -16,10 +17,10 @@ const Page = () => { const [loading, setLoading] = useState(false) const wyList = ["X","Y","H"] const columns1 = [ - { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, + { title: '序号', key: 'inx', dataIndex: 'inx', width: 150, align:"center"}, ]; const columns2 = [ - { title: '监测日期', key: 'tm', dataIndex: 'tm', width: 150, align:"center" }, + { title: '监测日期', key: 'tm', dataIndex: 'tm', width: 250, align:"center" }, ]; @@ -95,9 +96,10 @@ const Page = () => { const width = useMemo(() => { if (newCols?.length > 0) { return newCols?.reduce((total, cur) => total + (cur.width), 0) - } }, [newCols]); + console.log('width',width); + const exportExcel = () => { let params = { ...searchVal, @@ -112,7 +114,17 @@ const Page = () => { const getTable2Data = async (params) => { try { const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndwytjb.list1, params) - setTable2Data(res.data) + const list = [] + for(let i=0; i<24*3; i++){ + list.push({ + maxValue:'', + maxTm:'', + minValue:'', + minTm:'', + diff:'', + }) + } + setTable2Data(list) } catch (error) { console.log(error); } @@ -154,7 +166,7 @@ const Page = () => { />
-
{ ) }} - /> + /> */} + { + (newCols?.length>0 && width!==undefined)? + :null + } diff --git a/src/views/gcaqjc/sjtjcx/ndwytjb/table.js b/src/views/gcaqjc/sjtjcx/ndwytjb/table.js new file mode 100644 index 000000000..ff1d8fa10 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/ndwytjb/table.js @@ -0,0 +1,158 @@ +import { Table } from 'antd'; +import classNames from 'classnames'; +import ResizeObserver from 'rc-resize-observer'; +import React, { useEffect, useRef, useState } from 'react'; +import { VariableSizeGrid as Grid } from 'react-window'; +const VirtualTable = (props) => { + const { columns, scroll, table2Data } = props; + const [tableWidth, setTableWidth] = useState(0); + const widthColumnCount = columns.filter(({ width }) => !width).length; + const mergedColumns = columns.map((column) => { + if (column.width) { + return column; + } + return { + ...column, + width: Math.floor(tableWidth / widthColumnCount), + }; + }); + const gridRef = useRef(); + const [connectObject] = useState(() => { + const obj = {}; + Object.defineProperty(obj, 'scrollLeft', { + get: () => { + if (gridRef.current) { + return gridRef.current?.state?.scrollLeft; + } + return null; + }, + set: (scrollLeft) => { + if (gridRef.current) { + gridRef.current.scrollTo({ + scrollLeft, + }); + } + }, + }); + return obj; + }); + const resetVirtualGrid = () => { + gridRef.current?.resetAfterIndices({ + columnIndex: 0, + shouldForceUpdate: true, + }); + }; + useEffect(() => resetVirtualGrid, [tableWidth]); + const renderVirtualList = (rawData, { scrollbarSize, ref, onScroll }) => { + ref.current = connectObject; + const totalHeight = rawData.length * 54; + return ( + { + const { width } = mergedColumns[index]; + let myWidth = width + if(mergedColumns[index]?.children?.length>0){ + myWidth = width*(mergedColumns[index]?.children?.length) + } + return totalHeight > scroll.y && index === mergedColumns.length - 1 + ? myWidth - scrollbarSize - 1 + : myWidth; + }} + height={scroll.y} + rowCount={rawData.length} + rowHeight={() => 54} + width={tableWidth} + onScroll={({ scrollLeft }) => { + onScroll({ + scrollLeft, + }); + }} + > + {({ columnIndex, rowIndex, style }) => { + return ( +
+ {rawData[rowIndex][mergedColumns[columnIndex].dataIndex]} +
+ ) + }} +
+ ); + }; + return ( + { + setTableWidth(width); + }} + > +
{ + return( + + + + 最大值 + {table2Data?.length > 0 && table2Data.map((item,i) => + {item?.maxValue ?? "-"})} + + + + 日期 + {table2Data?.length > 0 && table2Data.map((item,i) => + {item?.maxTm?? "-"})} + + + 全年度特征值统计 + 最小值 + {table2Data?.length > 0 && table2Data.map((item,i) => + {item?.minValue ?? "-"})} + + + + 日期 + {table2Data?.length > 0 && table2Data.map((item,i) => + {item?.minTm?? "-"})} + + + + 年变幅 + {table2Data?.length > 0 && table2Data.map((item,i) => + {item?.diff?? "-"})} + + + ) + }} + /> + + ); +}; + +const App = ({columns,dataSource,width,loading,table2Data}) => ( + +); +export default App; \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/sjlr/index.js b/src/views/gcaqjc/sjtjcx/sjlr/index.js new file mode 100644 index 000000000..5421587d6 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/index.js @@ -0,0 +1,25 @@ +import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react'; +import { Table, Card,Modal,Form,Input,Button,Row,Col,Tabs } from 'antd'; +import SyPage from './sy' +import WyPage from './wy' + +const Page = () => { + const [tab,setTab] = useState('1') + + return ( + <> +
+ setTab(e)}> + + + + + + { tab==='1'?:null } + { tab==='2'?:null } +
+ + ); +} + +export default Page; diff --git a/src/views/gcaqjc/sjtjcx/sjlr/sy/form.js b/src/views/gcaqjc/sjtjcx/sjlr/sy/form.js new file mode 100644 index 000000000..296a9f2c7 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/sy/form.js @@ -0,0 +1,173 @@ +import React,{useEffect,useState,useMemo} from 'react'; +import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,Radio, InputNumber } from 'antd'; +import { formItemLayout, btnItemLayout } from '../../../../../components/crud/FormLayoutProps'; +import apiurl from '../../../../../service/apiurl'; +import NormalSelect from '../../../../../components/Form/NormalSelect'; +import { httppost2 } from '../../../../../utils/request'; + +import moment from 'moment'; +const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => { + console.log("record",record); + const [form] = Form.useForm(); + const [dmList, setDmList] = useState([]) + const [codeList, setCodeList] = useState([]) + const [dmCode,setDmCode] = useState('') + + const onFinish = (values) => { + if (mode === 'edit') { + onEdit(apiurl.gcaqjc.sjtjcx.sjlr.syjc.edit,{...record,...values}) + } + if (mode === 'save') { + onSave(apiurl.gcaqjc.sjtjcx.sjlr.syjc.save,values) + } + + } + + + + const getDmList = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list) + setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + const getStationCode = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list) + setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + + useEffect(()=>{ + getDmList() + getStationCode() + }, []) + + return ( + <> +
+ +
+ dateString} + getValueProps={(value) => ({ value: value ? moment(value) : undefined })} + rules={[{required: true}]} + > + + + + + + { + form.setFieldValue('stationCode',null) + setDmCode(v) + }} + /> + + + + + + + + dmCode?o.profileCode===dmCode:true)} + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + mode==='view'?null:( + <> + + + + + ) + } + + + ); +} + +export default ModalForm; diff --git a/src/views/gcaqjc/sjtjcx/sjlr/sy/index.js b/src/views/gcaqjc/sjtjcx/sjlr/sy/index.js new file mode 100644 index 000000000..4724924b8 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/sy/index.js @@ -0,0 +1,94 @@ +import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react'; +import BasicCrudModal from '../../../../../components/crud/BasicCrudModal'; +import { Table, Card,Modal,Form,Input,Button,Row,Col,message } from 'antd'; +import ModalForm from './form'; +import ToolBar from './toolbar'; +import { useSelector } from 'react-redux'; +import apiurl from '../../../../../service/apiurl'; +import usePageTable from '../../../../../components/crud/usePageTable2'; +import { createCrudService } from '../../../../../components/crud/_'; +import {CrudOpRender_text} from '../../../../../components/crud/CrudOpRender'; +import "./index.less" +const Page = () => { + const role = useSelector(state => state.auth.role); + const editBtn = role?.rule?.find(item => item.menuName == "编辑")||true; + const viewBtn = role?.rule?.find(item => item.menuName == "查看")||true; + const delBtn = role?.rule?.find(item => item.menuName == "删除")||true; + + const refModal = useRef(); + const [searchVal, setSearchVal] = useState(false) + const columns = [ + { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, + { title: '监测时间', key: 'tm', dataIndex: 'tm', align:"center", }, + { title: '监测断面', key: 'profileName', dataIndex: 'profileName', align:"center", }, + { title: '测点编号', key: 'stationCode', dataIndex: 'stationCode', align:"center", }, + { title: '测压管水位(m)', key: 'value', dataIndex: 'value', align:"center", }, + { title: '渗压(KPa)', key: 'press', dataIndex: 'press', align:"center", }, + { title: '振弦(Hz)', key: 'vib', dataIndex: 'vib', align:"center", }, + { title: '温度(℃)', key: 'temp', dataIndex: 'temp', align:"center", }, + { + title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center', + render: (value, row, index) => ( + () => command(cmd)(row)} />) + }, + ]; + + + const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]); + + const command = (type) => (params) => { + if (type === 'save') { + refModal.current.showSave(); + } else if (type === 'edit') { + refModal.current.showEdit({ ...params }); + } else if (type === 'view') { + refModal.current.showView(params); + } else if (type === 'del') { + const url = apiurl.gcaqjc.sjtjcx.sjlr.syjc.del + params.stationCode+'/'+params.tm + refModal.current.onDeleteGet(url); + } + } + + + const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcaqjc.sjtjcx.sjlr.syjc.page).find_noCode); + + useEffect(()=>{ + const params = { + search: { + ...searchVal, + } + }; + search(params) + }, [searchVal]) + + + return ( + <> +
+ + + +
+
+ + + + + ); +} + +export default Page; diff --git a/src/views/gcaqjc/sjtjcx/sjlr/sy/index.less b/src/views/gcaqjc/sjtjcx/sjlr/sy/index.less new file mode 100644 index 000000000..d22a6aab8 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/sy/index.less @@ -0,0 +1,29 @@ +.basic-info{ + position: relative; + font-size: 16px; + margin-bottom: 20px; + padding:5px 25px; + border-bottom: 1px solid #eee; + &::before{ + position: absolute; + top:8px; + left:0; + content: ""; + display: block; + width: 5px; + height: 20px; + background-color: #0079fe; + } +} + +.first-card,.second-card{ + color: #fff; + padding:15px 120px; + border-radius: 10px; +} +.first-card{ + background-color: #e9df1e; +} +.second-card{ + background-color: #d62f28; +} \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js b/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js new file mode 100644 index 000000000..1d57066ae --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/sy/toolbar.js @@ -0,0 +1,159 @@ +import React, { useEffect,useState } from 'react'; +import { Form, Input, Button, DatePicker } from 'antd'; +import { getDictService } from '../../../../../service/SelectValue' +import AdcdFuzzyTreeSelect from '../../../../../components/Form/AdcdFuzzyTreeSelect'; +import NormalSelect from '../../../../../components/Form/NormalSelect'; +import { config } from '../../../../../config'; +import moment from 'moment'; +import { httppost2 } from '../../../../../utils/request'; +import apiurl from '../../../../../service/apiurl'; +const { RangePicker } = DatePicker; +const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { + const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true; + const addBtn = role?.rule?.find(item => item.menuName == "新增")||true; + + const optionsType = [ + { + label: "今日", + value:1 + }, + { + label: "近一周", + value:2 + }, + { + label:"近一月", + value:3 + }, + { + label:"近三月", + value:4 + }, + { + label:"近一年", + value:5 + }, + ] + const [form] = Form.useForm(); + const [dmList, setDmList] = useState([]) + const [codeList, setCodeList] = useState([]) + const [dmCode,setDmCode] = useState('') + + const getDmList = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list) + setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + const getStationCode = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list) + setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + const onValuesChange = (e) => { + switch (e.ranger) { + case 1: + form.setFieldValue("tm",[moment().startOf("day"),moment()]) + break; + case 2: + form.setFieldValue("tm",[moment().subtract(7, 'days'),moment()]) + break; + case 3: + form.setFieldValue("tm",[moment().subtract(1, 'months'),moment()]) + break; + case 4: + form.setFieldValue("tm",[moment().subtract(3, 'months'),moment()]) + break; + case 5: + form.setFieldValue("tm",[moment().subtract(1, 'years'),moment()]) + break; + default: + break; + } + + } + const onFinish = (values) => { + let dateSo; + if (values.tm) { + dateSo = { + start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'), + end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss') + } + } + delete values.tm + setSearchVal({...values, dateTimeRangeSo:dateSo}); + } + + useEffect(() => { + getDmList() + getStationCode() + }, []) + + + return ( + <> +
+
+ + { + form.setFieldValue('ranger',null) + }} + /> + + + + + + { + form.setFieldValue('stationCode',null) + setDmCode(v) + }} + /> + + + dmCode?o.profileCode===dmCode:true)} + /> + + {searchBtn ? + + + + :null } + + + + { + (onSave && addBtn) ? + + + + :null + } + +
+ + ); +} + +export default ToolBar; \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/sjlr/wy/form.js b/src/views/gcaqjc/sjtjcx/sjlr/wy/form.js new file mode 100644 index 000000000..80a716f76 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/wy/form.js @@ -0,0 +1,119 @@ +import React,{useEffect,useState,useMemo} from 'react'; +import { Form, Button, Input, Row, Col, DatePicker, Upload,message,Image,Modal,Radio } from 'antd'; +import { formItemLayout, btnItemLayout } from '../../../../../components/crud/FormLayoutProps'; +import apiurl from '../../../../../service/apiurl'; +import NormalSelect from '../../../../../components/Form/NormalSelect'; +import { httppost2 } from '../../../../../utils/request'; + +import moment from 'moment'; +const ModalForm = ({ mode, record,onEdit,onSave,onSimilarSave }) => { + console.log("record",record); + const [form] = Form.useForm(); + const [dmList, setDmList] = useState([]) + const [codeList, setCodeList] = useState([]) + const [dmCode,setDmCode] = useState('') + + const onFinish = (values) => { + debugger + if (mode === 'edit') { + onEdit(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.edit,{...record,...values}) + } + if (mode === 'save') { + onSave(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.save,values) + } + + } + + + + const getDmList = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list) + setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + const getStationCode = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.list) + setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + + useEffect(()=>{ + getDmList() + getStationCode() + }, []) + + return ( + <> +
+ dateString} + getValueProps={(value) => ({ value: value ? moment(value) : undefined })} + rules={[{required: true}]} + > + + + + + + + + + + + + + + + { + mode==='view'?null:( + <> + + + + + ) + } + + + ); +} + +export default ModalForm; diff --git a/src/views/gcaqjc/sjtjcx/sjlr/wy/index.js b/src/views/gcaqjc/sjtjcx/sjlr/wy/index.js new file mode 100644 index 000000000..a3ee0d491 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/wy/index.js @@ -0,0 +1,92 @@ +import React, { Fragment, useRef, useMemo,useEffect,useState } from 'react'; +import BasicCrudModal from '../../../../../components/crud/BasicCrudModal'; +import { Table, Card,Modal,Form,Input,Button,Row,Col,message } from 'antd'; +import ModalForm from './form'; +import ToolBar from './toolbar'; +import { useSelector } from 'react-redux'; +import apiurl from '../../../../../service/apiurl'; +import usePageTable from '../../../../../components/crud/usePageTable2'; +import { createCrudService } from '../../../../../components/crud/_'; +import {CrudOpRender_text} from '../../../../../components/crud/CrudOpRender'; +import "./index.less" +const Page = () => { + const role = useSelector(state => state.auth.role); + const editBtn = role?.rule?.find(item => item.menuName == "编辑")||true; + const viewBtn = role?.rule?.find(item => item.menuName == "查看")||true; + const delBtn = role?.rule?.find(item => item.menuName == "删除")||true; + + const refModal = useRef(); + const [searchVal, setSearchVal] = useState(false) + const columns = [ + { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, + { title: '监测时间', key: 'tm', dataIndex: 'tm', align:"center", }, + { title: '测点编号', key: 'stationCode', dataIndex: 'stationCode', align:"center", }, + { title: 'X方向表面位移(mm)', key: 'x', dataIndex: 'x', align:"center", }, + { title: 'Y方向表面位移(mm)', key: 'y', dataIndex: 'y', align:"center", }, + { title: 'H方向表面位移(mm)', key: 'h', dataIndex: 'h', align:"center", }, + { + title: '操作', key: 'operation', width: 240, fixed: 'right',align: 'center', + render: (value, row, index) => ( + () => command(cmd)(row)} />) + }, + ]; + + + const width = useMemo(() => columns.reduce((total, cur) => total + (cur.width), 0), [columns]); + + const command = (type) => (params) => { + if (type === 'save') { + refModal.current.showSave(); + } else if (type === 'edit') { + refModal.current.showEdit({ ...params }); + } else if (type === 'view') { + refModal.current.showView(params); + } else if (type === 'del') { + const url = apiurl.gcaqjc.sjtjcx.sjlr.wyjc.del + params.stationCode+'/'+params.tm + refModal.current.onDeleteGet(url); + } + } + + + const { tableProps, search, refresh } = usePageTable(createCrudService(apiurl.gcaqjc.sjtjcx.sjlr.wyjc.page).find_noCode); + + useEffect(()=>{ + const params = { + search: { + ...searchVal, + } + }; + search(params) + }, [searchVal]) + + + return ( + <> +
+ + + +
+
+ + + + + ); +} + +export default Page; diff --git a/src/views/gcaqjc/sjtjcx/sjlr/wy/index.less b/src/views/gcaqjc/sjtjcx/sjlr/wy/index.less new file mode 100644 index 000000000..d22a6aab8 --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/wy/index.less @@ -0,0 +1,29 @@ +.basic-info{ + position: relative; + font-size: 16px; + margin-bottom: 20px; + padding:5px 25px; + border-bottom: 1px solid #eee; + &::before{ + position: absolute; + top:8px; + left:0; + content: ""; + display: block; + width: 5px; + height: 20px; + background-color: #0079fe; + } +} + +.first-card,.second-card{ + color: #fff; + padding:15px 120px; + border-radius: 10px; +} +.first-card{ + background-color: #e9df1e; +} +.second-card{ + background-color: #d62f28; +} \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js b/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js new file mode 100644 index 000000000..524871f8c --- /dev/null +++ b/src/views/gcaqjc/sjtjcx/sjlr/wy/toolbar.js @@ -0,0 +1,148 @@ +import React, { useEffect,useState } from 'react'; +import { Form, Input, Button, DatePicker } from 'antd'; +import { getDictService } from '../../../../../service/SelectValue' +import AdcdFuzzyTreeSelect from '../../../../../components/Form/AdcdFuzzyTreeSelect'; +import NormalSelect from '../../../../../components/Form/NormalSelect'; +import { config } from '../../../../../config'; +import moment from 'moment'; +import { httppost2 } from '../../../../../utils/request'; +import apiurl from '../../../../../service/apiurl'; +const { RangePicker } = DatePicker; +const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { + const searchBtn = role?.rule?.find(item => item.menuName == "查询")||true; + const addBtn = role?.rule?.find(item => item.menuName == "新增")||true; + + const optionsType = [ + { + label: "今日", + value:1 + }, + { + label: "近一周", + value:2 + }, + { + label:"近一月", + value:3 + }, + { + label:"近三月", + value:4 + }, + { + label:"近一年", + value:5 + }, + ] + const [form] = Form.useForm(); + const [dmList, setDmList] = useState([]) + const [codeList, setCodeList] = useState([]) + const [dmCode,setDmCode] = useState('') + + const getDmList = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list) + setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode}))); + } catch (error) { + console.log(error); + } + } + + const getStationCode = async () => { + try { + const res = await httppost2(apiurl.gcaqjc.sjtjcx.wycx.list) + setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode}))); + } catch (error) { + console.log(error); + } + } + const onValuesChange = (e) => { + switch (e.ranger) { + case 1: + form.setFieldValue("tm",[moment().startOf("day"),moment()]) + break; + case 2: + form.setFieldValue("tm",[moment().subtract(7, 'days'),moment()]) + break; + case 3: + form.setFieldValue("tm",[moment().subtract(1, 'months'),moment()]) + break; + case 4: + form.setFieldValue("tm",[moment().subtract(3, 'months'),moment()]) + break; + case 5: + form.setFieldValue("tm",[moment().subtract(1, 'years'),moment()]) + break; + default: + break; + } + + } + const onFinish = (values) => { + let dateSo; + if (values.tm) { + dateSo = { + start: moment(values.tm[0]).format('YYYY-MM-DD HH:mm:ss'), + end: moment(values.tm[1]).format('YYYY-MM-DD HH:mm:ss') + } + } + delete values.tm + setSearchVal({...values, dateTimeRangeSo:dateSo}); + } + + useEffect(() => { + getDmList() + getStationCode() + }, []) + + + return ( + <> +
+
+ + { + form.setFieldValue('ranger',null) + }} + /> + + + + + + + + {searchBtn ? + + + + :null } + + + + { + (onSave && addBtn) ? + + + + :null + } + +
+ + ); +} + +export default ToolBar; \ No newline at end of file diff --git a/src/views/gcaqjc/sjtjcx/sljc/toolbar.js b/src/views/gcaqjc/sjtjcx/sljc/toolbar.js index 9c1e86ec0..cd53ae95a 100644 --- a/src/views/gcaqjc/sjtjcx/sljc/toolbar.js +++ b/src/views/gcaqjc/sjtjcx/sljc/toolbar.js @@ -78,6 +78,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { allowClear style={{ width: "350px" }} format="YYYY-MM-DD HH:mm:ss" + onChange={(v)=>{ + form.setFieldValue('ranger',null) + }} /> diff --git a/src/views/gcaqjc/sjtjcx/syjc/toolbar.js b/src/views/gcaqjc/sjtjcx/syjc/toolbar.js index f132bd9c1..85b8cd8b3 100644 --- a/src/views/gcaqjc/sjtjcx/syjc/toolbar.js +++ b/src/views/gcaqjc/sjtjcx/syjc/toolbar.js @@ -35,6 +35,8 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { const [form] = Form.useForm(); const [dmList, setDmList] = useState([]) const [codeList, setCodeList] = useState([]) + const [dmCode,setDmCode] = useState('') + const getDmList = async () => { try { @@ -48,7 +50,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { const getStationCode = async () => { try { const res = await httppost2(apiurl.gcaqjc.gcaqyj.yjgzpz.list) - setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode}))); + setCodeList(res.data.map(s=>({label:s.stationCode,value:s.stationCode,profileCode:s.profileCode}))); } catch (error) { console.log(error); } @@ -102,6 +104,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { allowClear style={{ width: "350px" }} format="YYYY-MM-DD HH:mm:ss" + onChange={(v)=>{ + form.setFieldValue('ranger',null) + }} /> @@ -116,13 +121,17 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { allowClear style={{ width: "150px" }} options={dmList} + onChange={(v)=>{ + form.setFieldValue('stationCode',null) + setDmCode(v) + }} /> dmCode?o.profileCode===dmCode:true)} /> {searchBtn ? diff --git a/src/views/gcaqjc/sjtjcx/wyjc/toolbar.js b/src/views/gcaqjc/sjtjcx/wyjc/toolbar.js index 1efbec34c..44eab2283 100644 --- a/src/views/gcaqjc/sjtjcx/wyjc/toolbar.js +++ b/src/views/gcaqjc/sjtjcx/wyjc/toolbar.js @@ -93,6 +93,9 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => { allowClear style={{ width: "350px" }} format="YYYY-MM-DD HH:mm:ss" + onChange={(v)=>{ + form.setFieldValue('ranger',null) + }} /> diff --git a/src/views/gxsl/gstjfx/gsOption.js b/src/views/gxsl/gstjfx/gsOption.js index e1212e004..d8134c844 100644 --- a/src/views/gxsl/gstjfx/gsOption.js +++ b/src/views/gxsl/gstjfx/gsOption.js @@ -125,7 +125,7 @@ export default function drpOption (data) { ], series: [ { - name: '发电灌溉', + name: '灌溉用水', type: 'line', symbol: 'none', smooth: true, diff --git a/src/views/gxsl/gstjfx/index.js b/src/views/gxsl/gstjfx/index.js index 667dfde96..3d9d31fb6 100644 --- a/src/views/gxsl/gstjfx/index.js +++ b/src/views/gxsl/gstjfx/index.js @@ -18,7 +18,7 @@ const Page = () => { { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, { title: '时间', key: 'tm', dataIndex: 'tm', width: 200, ellipsis: true, align:"center" }, { - title: '发电灌溉', + title: '灌溉用水', align: "center", children: [ { @@ -62,7 +62,7 @@ const Page = () => { { title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" }, { title: '时间', key: 'tm', dataIndex: 'tm', width: 100, ellipsis: true, align:"center" }, { - title: '发电灌溉', + title: '灌溉用水', align: "center", children: [ { @@ -266,7 +266,7 @@ const Page = () => {
-
发电灌溉总合计(万m³):
+
灌溉用水总合计(万m³):
水厂取水总合计(万m³):
供水总合计(万m³):
diff --git a/src/views/gxsl/gstjfx/tjOption.js b/src/views/gxsl/gstjfx/tjOption.js index 144a4247e..0de1af535 100644 --- a/src/views/gxsl/gstjfx/tjOption.js +++ b/src/views/gxsl/gstjfx/tjOption.js @@ -3,7 +3,7 @@ let title = "总计"; let color = ["#73a0fa", "#52c1f5"]; let echartData = [ { - name: "发电灌溉", + name: "灌溉用水", value: parseFloat(obj?.shgs?.toFixed(2)) }, { diff --git a/src/views/sq/qth/sksq/index.js b/src/views/sq/qth/sksq/index.js index 68d6969b2..5ea3398ab 100644 --- a/src/views/sq/qth/sksq/index.js +++ b/src/views/sq/qth/sksq/index.js @@ -2,12 +2,87 @@ import React, { useEffect, useState } from 'react' import { reservoirlist, } from "../../../../service/sssq"; import Sssw from './sssw'; import Sjcx from '../../../Home/MapCtrl/components/Sksjcx/index' +import NormalSelect from '../../../../components/Form/NormalSelect'; import "./index.less" import { helpers } from '@turf/turf'; +import { Label } from 'react-konva'; + + +const sj = { + "stcd": "61610701", + "stnm": "檀树岗2", + "rvnm": "檀树岗河", + "hnnm": "长江中游下段北岸", + "bsnm": "长江", + "lgtd": "114.744317000", + "lttd": "31.505000000", + "stlc": "黄冈市红安县七里镇檀树岗村", + "alt": null, + "mdbz": null, + "mdpr": null, + "dtmnm": "吴淞", + "dtmel": null, + "dtpr": "0.000", + "sttp": "RR", + "dfrtms": null, + "fritm": null, + "frgrd": "3", + "esstym": "197103", + "bgfrym": "197103", + "edfrym": null, + "atcunit": "黄冈市水利和湖泊局", + "admauth": "黄冈水文", + "locality": "湖北水文", + "stbk": null, + "stazt": null, + "dstrvm": null, + "drna": "78", + "phcd": "TSG", + "usfl": "1", + "comments": "中小河流改造", + "moditime": "2022-02-23 00:00:00", + "remGd": null, + "ogid": null, + "vlfl": null, + "atid": null, + "sdfl": null, + "rma": null, + "mdps": null, + "mddt": null, + "stindex": null, + "starea": null, + "stlevel": null, + "code": null, + "ispbj": null, + "issxst": null, + "stpq": null, + "sthday": null, + "source": "SW", + "importancy": 0, + "clgtd": "114.744317000", + "clttd": "31.505000000", + "elev": null, + "crucial": 0, + "buildYear": null, + "adcd": null, + "lyid": null, + "resCode": "42120250085", + "rvCode": null, + "status": 1, + "agreement": null, + "simCard": null, + "bdCard": null, + "v": 104.1 +} + + export default function Sksq() { const [tableData, setTableData] = useState([]) + const [selected, setSelected] = useState(0) + const getData = async (params) => { - setTableData(await reservoirlist(params)); + const data = await await reservoirlist(params) + setTableData([...data,sj]); } useEffect(() => { let option = { @@ -25,10 +100,18 @@ export default function Sksq() { 实时水位
- 站点:{tableData[0]?.stnm} + 站点: + ({ label: item.stnm, value: index }))} + value={selected} + onChange={(e) => setSelected(e)} + /> +
- +
@@ -39,7 +122,7 @@ export default function Sksq() {
- +
diff --git a/src/views/sq/qth/skyh/drpOption.js b/src/views/sq/qth/skyh/drpOption.js new file mode 100644 index 000000000..5e6af8e57 --- /dev/null +++ b/src/views/sq/qth/skyh/drpOption.js @@ -0,0 +1,261 @@ +export default function drpOption(data,yjData) { + console.log("data",data); + // const maxVal = 0//Math.max(...data.map(obj => obj.drp)) + // const max1 = Math.max(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const min1 = Math.min(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const max2 = Math.max(...data.map(obj => obj.rz)) + // const min2 = Math.min(...data.map(obj => obj.rz)) + // const yj = yjData?.map((item,index)=>{ + // return { + // yAxisIndex: 0, + // name: item.yjName, + // type: 'line', + // color: item.color, + // lineStyle: { + // type: "dashed", + // width: 1, + // }, + // data: data.map(o => item.value), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + // smooth: 0.5 + // } + // }) + + return { + + tooltip: { + trigger: 'axis', + }, + grid: [ + { + top: "12%", + left: "10%", + right: "8%", + width: '80%', + height: '35%' + }, + { + bottom: '5%', + left: '10%', + right: '8%', + width: '80%', + height: '35%' + } + ], + legend: { + top:'3%', + // 显示图例 + show: true, + // 图例的位置 + data: ["库容","水位","汛限水位","设计水位","校核水位","溢洪流量"], + }, + xAxis: [ + { + gridIndex: 0, + type: 'category', + data: data.map(o => o.tm), + inverse: false, + splitLine: { + show: false + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + show: false + // formatter: val => val.slice(11,16) + }, + axisLine: { + lineStyle: { + color: '#8c8c8c', + width: 0.5, + } + }, + axisTick: { + show: false, + }, + }, + { + gridIndex: 1, + type: 'category', + data: data.map(o => o.tm), + inverse: false, + splitLine: { + show: false + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + formatter: val => val.slice(11,16) + }, + axisLine: { + lineStyle: { + color: '#8c8c8c', + width: 0.5, + } + }, + axisTick: { + show: false, + }, + } + ], + yAxis: [ + { + gridIndex: 0, + type: 'value', + position: 'left', + // name: "库容(RH)", + nameTextStyle: { + padding: [0, 0, 10, -20], + color:'#8c8c8c', + fontSize: 14 + }, + splitLine: { + show: true, + lineStyle: { + color: '#bfbfbf', + width: 0.5, + type: 'dotted' + } + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + formatter: val => val+'%' + }, + axisLine: { + show: false + // lineStyle: { + // color: '#8c8c8c', + // width: 1, + // } + }, + axisTick: { + show: false, + }, + }, + { + gridIndex: 1, + type: 'value', + position: 'left', + name: '水位(m)', + nameTextStyle: { + padding: [0, 0, 10, -20], + color:'#8c8c8c', + fontSize: 14 + }, + splitLine: { + show: true, + lineStyle: { + color: '#bfbfbf', + width: 0.5, + type: 'dotted' + } + }, + axisLabel: { + color: '#8c8c8c', + fontSize: 12, + // formatter: val => val+'%' + }, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + }, + { + gridIndex: 1, + type: 'value', + position: 'right', + name: '库容(万m³)', + nameTextStyle: { + padding: [0, 0, 10, -20], + color:'#8c8c8c', + fontSize: 14 + }, + splitLine: { + show: false, + lineStyle: { + color: '#07a6ff', + width: 0.25, + type: 'dotted' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + }, + axisLine: { + show: false + }, + axisTick: { + show: false + }, + } + ], + series: [ + { + xAxisIndex: 0, + name: '溢洪流量', + type: 'line', + color: "#3478f4", + data: data.map(o => o.kr), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + symbolSize:8, + areaStyle: { + // 开启阴影 + shadowColor: 'rgba(0, 0, 0, 0.1)', // 阴影颜色 + shadowBlur: 10, // 阴影的模糊大小 + shadowOffsetX: 5, // 阴影水平方向上的偏移 + shadowOffsetY: 5, // 阴影垂直方向上的偏移 + opacity: 0.3 // 区域颜色的透明度 + }, + }, + { + xAxisIndex: 1, + yAxisIndex: 1, + name: '水位', + type: 'line', + color: "#67ddb7", + symbol: 'none', // 设置标记点为'none',即去掉圆点 + data: data.map(o => o.sw), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + }, + { + name: '汛限水位', + type: 'line', + color: "#f8dda7", + symbol: 'none', // 设置标记点为'none',即去掉圆点 + data: data.map(o => 130), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + }, + { + name: '设计水位', + type: 'line', + color: "#e89e42", + symbol: 'none', // 设置标记点为'none',即去掉圆点 + data: data.map(o => 100), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + }, + { + name: '校核水位', + type: 'line', + color: "#da2f2d", + symbol: 'none', // 设置标记点为'none',即去掉圆点 + data: data.map(o => 160), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + }, + { + name: '溢洪流量', + type: 'bar', + barWidth: '20%', + itemStyle: { + color: '#678ef2', + borderWidth: '0.3' + }, + data: data.map(o => o.ll), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + }, + ] + }; +} diff --git a/src/views/sq/qth/skyh/index.js b/src/views/sq/qth/skyh/index.js new file mode 100644 index 000000000..d40abebdc --- /dev/null +++ b/src/views/sq/qth/skyh/index.js @@ -0,0 +1,70 @@ +import React, { useEffect, useState } from 'react' +import { reservoirlist, } from "../../../../service/sssq"; +import { message } from 'antd'; +import Sssw from './sssw'; +// import Sjcx from '../../../Home/MapCtrl/components/Jcsj/index' +import Sjcx from './sjcx' +import "./index.less" +import { httppost2 } from '../../../../utils/request'; +import apiurl from '../../../../service/apiurl'; +import { helpers } from '@turf/turf'; +import NormalSelect from '../../../../components/Form/NormalSelect'; +export default function Sksq() { + const [selectList, setSelectList] = useState([]) + // const [selected, setSelected] = useState(0) + const getList = async() => { + try { + const data = await reservoirlist() + setSelectList(data) + } catch (error) { + console.log(error); + } + } + + + + useEffect(() => { + getList() + }, []) + + return ( +
+
+
+
+
+ + 土壤墒情 +
+
+ 站点: + {selectList?.[0]?.stnm} + {/* setSelected(e)} + /> */} +
+
+
+ +
+
+
+
+
+ + 数据查询 +
+
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/skyh/index.less b/src/views/sq/qth/skyh/index.less new file mode 100644 index 000000000..5f242010a --- /dev/null +++ b/src/views/sq/qth/skyh/index.less @@ -0,0 +1,106 @@ +.content-sk{ + display: flex; + column-gap: 10px; + height: calc(100vh - 90px); + .comomn-title{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 10px; + } + .content-left{ + width: 550px; + height: 100%; + background-color: #fff; + .ssjc{ + .root { + display: flex; + color: #333; + padding: 1rem 1rem 1rem 1rem; + .drp-content{ + display: flex; + justify-content: center; + flex-wrap: wrap; + column-gap: 40px; + margin-top: 40px; + } + .drp-item{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + width: 220px; + height: 160px; + background-color: #eaf4fe; + margin-bottom: 40px; + .value{ + font-size: 20px; + font-weight: bold; + } + .name{ + font-size: 16px; + color: #40a9ff; + } + } + } + + + .report-time,.rain-report{ + display: flex; + width: 70%; + align-items: center; + color: #689fff; + font-size: 15px; + font-weight: 500; + line-height: 1.5; + column-gap: 5px; + margin-bottom: 10px; + justify-content: center; + padding: 7px 0; + background-color: #ecf5ff; + border: 1px solid #cde5ff; + border-radius: 5px; + margin-left: 10%; + } + + + + + } + } + .content-right{ + flex: 1; + height: 100%; + background-color: #fff; + .sjcx-content{ + padding: 10px; + .qth_skyh_sjcx{ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + .qth_skyh_sjcx_top{ + padding: 0 0 15px 10px; + } + .qth_skyh_sjcx_center{ + flex: 1; + padding: 0 10px; + display: flex; + flex-direction: row; + .qth_skyh_sjcx_center_left{ + width: 55%; + height: 100%; + margin-bottom: 10px; + } + .qth_skyh_sjcx_center_right{ + width: 45%; + height: 100%; + } + } + } + } + } + .pic-container{ + padding: 10px; + } +} \ No newline at end of file diff --git a/src/views/sq/qth/skyh/sjcx.js b/src/views/sq/qth/skyh/sjcx.js new file mode 100644 index 000000000..71d70f048 --- /dev/null +++ b/src/views/sq/qth/skyh/sjcx.js @@ -0,0 +1,77 @@ +import React,{useState,useEffect, useMemo} from 'react' +import {Table} from 'antd'; +import ReactEcharts from 'echarts-for-react'; +import {queryStPptnDetails} from '../../../../service/ssyq' +import { httppost2 } from '../../../../utils/request' +import apiurl from '../../../../service/apiurl' +import moment from 'moment'; +import Toolbar from './toolbar' +import drpOption from './drpOption'; + +export default function Sjcx({ data }) { + const stcd = data?.stcd||'' + const [tms, setTms] = useState([moment().add(-1,'months'),moment()]) + const [list, setList] = useState([]) + const option = useMemo(() => drpOption(list), [list]) + const columns = [ + { title: '时间', key: 'tm', dataIndex: 'tm', align: 'center',width:'120px',render: (rec) => {rec.slice(5,16) ?? "-"} }, + { title: '水位(m)', key: 'sw', dataIndex: 'sw', align: 'center',width:'80px',render: (rec) => {rec ?? "-"} }, + { title: '库容(万m³)', key: 'kr', dataIndex: 'kr', align: 'center',render: (rec) => {rec ?? "-"} }, + { title: '溢洪流量(m³/s)', key: 'll', dataIndex: 'll', align: 'center',render: (rec) => {rec ?? "-"} }, + { title: '累计溢洪量(万m³)', key: 'lj', dataIndex: 'lj', align: 'center',render: (rec) => {rec ?? "-"} }, + ]; + + + + + useEffect(()=>{ + getList(stcd,tms) + },[stcd,tms]) + + const getList = async (stcd,tms)=>{ + const pam = { + stm:tms[0].format('YYYY-MM-DD HH:mm:ss'), + etm:tms[1].format('YYYY-MM-DD HH:mm:ss'), + stcd + } + // const res = await httppost2(apiurl) + const list = [] + for (let i=0;i<10;i++){ + list.push({ + tm:'2023-02-07 12:'+(i+10)+':00', + sw:i+1+'.91', + kr:i+22+'.91', + ll:i+15+'.91', + lj:i+41+'.91', + }) + } + setList(list) + } + + return ( +
+
+ {setTms([...tm])}}/> +
+
+
+
+ +
+ { + list.length>0? + + :
+ } +
+ + + ) +} diff --git a/src/views/sq/qth/skyh/sssw.js b/src/views/sq/qth/skyh/sssw.js new file mode 100644 index 000000000..cbab86464 --- /dev/null +++ b/src/views/sq/qth/skyh/sssw.js @@ -0,0 +1,55 @@ +import React,{useState,useEffect} from 'react' +import {queryStPptnDetails} from '../../../../service/ssyq' +import { httppost2 } from '../../../../utils/request' +import apiurl from '../../../../service/apiurl' +export default function Sssw({ data }) { + const [detail, setDetail] = useState({}) + const getDetail = async (stcd) => { + // const res = await httppost2(apiurlhome.turangshangqing.{stcd}) + // setDetail{res} + } + useEffect(() => { + if (data.stcd) { + getDetail(data.stcd) + } + }, [data]) + + return ( +
+
+
+
数据更新时间: {detail?.tm}
+
+
+
{detail?.h ?? '-' } m³/s
+
溢洪流量
+
+
+
{detail?.h3 ?? '-' } 万m³
+
当日溢洪量
+
+
+
{detail?.h6 ?? '-' } 万m³
+
当月溢洪量
+
+
+
{detail?.h12 ?? '-' } 万m³
+
当年溢洪量
+
+
+
{detail?.h24 ?? '-' } 
+
本年溢洪次数
+
+
{detail?.h48 ?? '-' } 万m³
+
本年单次最大溢洪量
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/skyh/toolbar.js b/src/views/sq/qth/skyh/toolbar.js new file mode 100644 index 000000000..996d9bd5f --- /dev/null +++ b/src/views/sq/qth/skyh/toolbar.js @@ -0,0 +1,37 @@ +import { Form, message, Button, DatePicker } from 'antd'; +import NormalSelect from '../../../../components/Form/NormalSelect' +import moment from "moment" +const { RangePicker } = DatePicker; + + + +const ToolBar = ({search, defaultParams}) => { + const [form] = Form.useForm(); + + const onFinish = (val)=>{ + search(val.tms) + } + + return ( + <> + + + { + form.setFieldValue('cysd',null) + }} + style={{ width: "380px" }} + format="YYYY-MM-DD HH:mm:ss" + /> + + + + + + + ); +} + +export default ToolBar; \ No newline at end of file diff --git a/src/views/sq/qth/trsq/drpOption.js b/src/views/sq/qth/trsq/drpOption.js new file mode 100644 index 000000000..08bd03a07 --- /dev/null +++ b/src/views/sq/qth/trsq/drpOption.js @@ -0,0 +1,172 @@ +export default function drpOption(data,yjData) { + console.log("data",data); + // const maxVal = 0//Math.max(...data.map(obj => obj.drp)) + // const max1 = Math.max(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const min1 = Math.min(...[...data.map(obj => obj.value),...yjData?.map(obj => obj.value)]) + // const max2 = Math.max(...data.map(obj => obj.rz)) + // const min2 = Math.min(...data.map(obj => obj.rz)) + // const yj = yjData?.map((item,index)=>{ + // return { + // yAxisIndex: 0, + // name: item.yjName, + // type: 'line', + // color: item.color, + // lineStyle: { + // type: "dashed", + // width: 1, + // }, + // data: data.map(o => item.value), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + // smooth: 0.5 + // } + // }) + + return { + + tooltip: { + trigger: 'axis', + + }, + grid: [ + { + top: "12%", + left: "10%", + right: "8%", + width: '80%', + height: '75%' + }, + ], + legend: { + top:'3%', + // 显示图例 + show: false, + // 图例的位置 + data: ["湿度"], + }, + xAxis: [ + { + type: 'category', + data: data.map(o => o.tm), + inverse: false, + splitLine: { + show: false + }, + axisLabel: { + padding: [0, 0, 10, 0], + color: '#333', + fontSize: 12, + formatter: val => val.slice(0,10) + }, + axisLine: { + lineStyle: { + color: '#d9d9d9', + width: 1, + } + }, + axisTick: { + show: false, + }, + } + ], + yAxis: [ + { + // gridIndex: 1, + type: 'value', + position: 'left', + name: "湿度(RH)", + nameTextStyle: { + padding: [0, 0, 10, -20], + color:'#333333', + fontSize: 14 + }, + splitLine: { + show: true, + lineStyle: { + color: '#bfbfbf', + width: 0.5, + type: 'dotted' + } + }, + axisLabel: { + color: '#333', + fontSize: 12, + formatter: val => val+'%' + }, + axisLine: { + show: false + // lineStyle: { + // color: '#8c8c8c', + // width: 1, + // } + }, + axisTick: { + show: false, + }, + }, + // { + // // gridIndex: 1, + // type: 'value', + // position: 'right', + // name: "库水位(m)", + // nameTextStyle: { + // padding: [0, 0, 10, 10], + // color:'#333333', + // fontSize: 14 + // }, + // splitLine: { + // show: false, + // lineStyle: { + // color: '#07a6ff', + // width: 0.25, + // type: 'dotted' + // } + // }, + // axisLabel: { + // color: '#333', + // fontSize: 12, + // }, + // axisLine: { + // show: false + // // lineStyle: { + // // color: '#8c8c8c', + // // width: 1, + // // } + // }, + // axisTick: { + // show: false, + // }, + // min: Math.floor(min2*0.8), + // max: Math.ceil(max2*1.2), + // } + ], + series: [ + { + // xAxisIndex: 1, + // yAxisIndex: 0, + name: '湿度', + type: 'line', + color: "#d6eaec", + lineStyle: { + // type: "dashed" + }, + data: data.map(o => o.sd), + symbol: 'none', // 设置标记点为'none',即去掉圆点 + smooth: 0.5 + }, + // ...yj + // { + // // xAxisIndex: 1, + // yAxisIndex: 1, + // name: '库水位', + // type: 'line', + // color: "#60a0f8", + // lineStyle: { + // // type: "dashed" + // }, + // data: data.map(o => o.rz), + // symbol: 'none', // 设置标记点为'none',即去掉圆点 + // smooth: 0.5 + // }, + ] + }; +} diff --git a/src/views/sq/qth/trsq/index.js b/src/views/sq/qth/trsq/index.js new file mode 100644 index 000000000..9cb2bd6ea --- /dev/null +++ b/src/views/sq/qth/trsq/index.js @@ -0,0 +1,109 @@ +import React, { useEffect, useState } from 'react' +import { reservoirlist, } from "../../../../service/sssq"; +import { message } from 'antd'; +import Sssw from './sssw'; +// import Sjcx from '../../../Home/MapCtrl/components/Jcsj/index' +import Sjcx from './sjcx' +import "./index.less" +import { httppost2 } from '../../../../utils/request'; +import apiurl from '../../../../service/apiurl'; +import { helpers } from '@turf/turf'; +import NormalSelect from '../../../../components/Form/NormalSelect'; +export default function Sksq() { + const [tableData1, setTableData1] = useState([]) + // const getData1 = async () => { + // const { data, code, msg } = await httppost2(apiurl.home.yq) + // if (code !== 200) { + // message.error(msg || '请求失败'); + // } + // const list = data.map((i)=>{ + // return { + // id : i.stcd, + // ...i, + // drp : i.drp ,//i.v, + // } + // }) + // setTableData1(list||[]) + // } + const [selectList, setSelectList] = useState([]) + const [selected, setSelected] = useState(0) + const getList = async() => { + try { + // const res = await httppost2(apiurl.home.turangshangqing) + const res = [ + { + id:'1', + stcd: '10001', + stnm: '水田站', + wd: '53', + tm: '2025-03-19 15:00:00', + lgtd: "114.7684000", + lttd: "31.4941000" + }, + { + id:'2', + stcd: '10002', + stnm: '旱田站', + wd: '21', + tm: '2025-03-19 15:00:00', + lgtd: "114.7984000", + lttd: "31.4941000" + }, + ] + const list = res?.map((item,index)=>({ + label:item.stnm, + value:index, + data:item + })) + setSelectList(list) + } catch (error) { + console.log(error); + } + } + + + + useEffect(() => { + getList() + }, []) + + return ( +
+
+
+
+
+ + 土壤墒情 +
+
+ 站点: + setSelected(e)} + /> +
+
+
+ +
+
+
+
+
+ + 数据查询 +
+
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/trsq/index.less b/src/views/sq/qth/trsq/index.less new file mode 100644 index 000000000..e58ac27a8 --- /dev/null +++ b/src/views/sq/qth/trsq/index.less @@ -0,0 +1,121 @@ +.content-sk{ + display: flex; + column-gap: 10px; + height: calc(100vh - 90px); + .comomn-title{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px 10px; + } + .content-left{ + width: 550px; + height: 100%; + background-color: #fff; + .ssjc{ + .root { + display: flex; + color: #333; + padding: 1rem 1rem 1rem 1rem; + .drp-content{ + display: flex; + justify-content: center; + flex-wrap: wrap; + column-gap: 40px; + margin-top: 40px; + } + .drp-item{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + width: 220px; + height: 160px; + background-color: #eaf4fe; + margin-bottom: 40px; + .value{ + font-size: 20px; + font-weight: bold; + } + .name{ + font-size: 16px; + color: #40a9ff; + } + } + } + + + .report-time,.rain-report{ + display: flex; + width: 70%; + align-items: center; + color: #689fff; + font-size: 15px; + font-weight: 500; + line-height: 1.5; + column-gap: 5px; + margin-bottom: 10px; + justify-content: center; + padding: 7px 0; + background-color: #ecf5ff; + border: 1px solid #cde5ff; + border-radius: 5px; + margin-left: 10%; + } + + + + + } + } + .content-right{ + flex: 1; + height: 100%; + background-color: #fff; + .sjcx-content{ + padding: 10px; + .qth_trsq_sjcx{ + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + .qth_trsq_sjcx_top{ + padding: 0 0 5px 10px; + } + .qth_trsq_sjcx_center{ + padding: 0 10px; + display: flex; + flex-direction: row; + .qth_trsq_sjcx_center_left{ + width: 45%; + margin-bottom: 10px; + } + .qth_trsq_sjcx_center_right{ + width: 55%; + } + } + .qth_trsq_sjcx_footer{ + flex: 1; + .footer-row{ + display: flex; + justify-content: space-between; + .footer-item{ + flex: 1; + text-align: center; + .footer-name{ + background: #E0EDFF ; + padding: 4px 0; + } + .footer-num{ + padding: 4px 0; + } + } + } + } + } + } + } + .pic-container{ + padding: 10px; + } +} \ No newline at end of file diff --git a/src/views/sq/qth/trsq/sjcx.js b/src/views/sq/qth/trsq/sjcx.js new file mode 100644 index 000000000..493f24f19 --- /dev/null +++ b/src/views/sq/qth/trsq/sjcx.js @@ -0,0 +1,124 @@ +import React,{useState,useEffect, useMemo} from 'react' +import {Table} from 'antd'; +import ReactEcharts from 'echarts-for-react'; +import {queryStPptnDetails} from '../../../../service/ssyq' +import { httppost2 } from '../../../../utils/request' +import apiurl from '../../../../service/apiurl' +import moment from 'moment'; +import Toolbar from './toolbar' +import drpOption from './drpOption'; + +export default function Sjcx({ data }) { + const stcd = data?.stcd||'' + const [tms, setTms] = useState([moment().add(-1,'months'),moment()]) + const [countObj,setCountObj] = useState({}) + const [list, setList] = useState([]) + const option = useMemo(() => drpOption(list), [list]) + const columns = [ + { title: '序号', key: '', dataIndex: '', align: 'center',width:'80px',render:(a,b,c)=>c+1}, + { title: '数据时间', key: 'tm', dataIndex: 'tm', align: 'center',width:'200px',render: (rec) => {rec ?? "-"} }, + { title: '湿度', key: 'sd', dataIndex: 'sd', align: 'center',render: (rec) => {rec ?? "-"} }, + ]; + + + + + useEffect(()=>{ + getCount(stcd) + getList(stcd,tms) + },[stcd,tms]) + + const getList = async (stcd,tms)=>{ + const pam = { + stm:tms[0].format('YYYY-MM-DD HH:mm:ss'), + etm:tms[1].format('YYYY-MM-DD HH:mm:ss'), + stcd + } + // const res = await httppost2(apiurl) + const list = [] + for (let i=0;i<30;i++){ + list.push({ + tm:'2023-02-07 12:'+(i+10)+':00', + sd:i+7+'.91' + }) + } + setList(list) + } + const getCount = async (stcd)=>{ + // const res = await httppost2(apiurl) + setCountObj({}) + } + + return ( +
+
+ {setTms([...tm])}}/> +
+
+
+
+ +
+ { + list.length>0? + + :
+ } +
+ +
+
+
+
本周(极值,RH)
+
{countObj?.h1||0}
+
+
+
本月(极值,RH)
+
{countObj?.h3||0}
+
+
+
本年(极值,RH)
+
{countObj?.h6||0}
+
+
+
近1周(极值,RH)
+
{countObj?.h12||0}
+
+
+
近1月(极值,RH)
+
{countObj?.yearDrpDay}/{countObj?.C}
+
+
+
+
+
近3月(极值,RH)
+
{countObj.today}
+
+
+
近6月(极值,RH)
+
{countObj?.yesterdayDrp}
+
+
+
近1年(极值,RH)
+
{countObj?.monthDrp}
+
+
+
 
+
+
+
+
 
+
+
+
+
+ + ) +} diff --git a/src/views/sq/qth/trsq/sssw.js b/src/views/sq/qth/trsq/sssw.js new file mode 100644 index 000000000..428e99585 --- /dev/null +++ b/src/views/sq/qth/trsq/sssw.js @@ -0,0 +1,55 @@ +import React,{useState,useEffect} from 'react' +import {queryStPptnDetails} from '../../../../service/ssyq' +import { httppost2 } from '../../../../utils/request' +import apiurl from '../../../../service/apiurl' +export default function Sssw({ data }) { + const [detail, setDetail] = useState({}) + const getDetail = async (stcd) => { + // const res = await httppost2(apiurlhome.turangshangqing.{stcd}) + // setDetail{res} + } + useEffect(() => { + if (data.stcd) { + getDetail(data.stcd) + } + }, [data]) + + return ( +
+
+
+
墒情最新上报时间: {detail?.tm}
+
+
+
{detail?.h ?? '-' }% RH
+
实时数据
+
+
+
{detail?.h3 ?? '-' }% RH
+
近1周(极值)
+
+
+
{detail?.h6 ?? '-' }% RH
+
近1月(极值)
+
+
+
{detail?.h12 ?? '-' }% RH
+
近3月(极值)
+
+
+
{detail?.h24 ?? '-' }% RH
+
近6月(极值)
+
+
{detail?.h48 ?? '-' }% RH
+
近1年(极值)
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/trsq/toolbar.js b/src/views/sq/qth/trsq/toolbar.js new file mode 100644 index 000000000..996d9bd5f --- /dev/null +++ b/src/views/sq/qth/trsq/toolbar.js @@ -0,0 +1,37 @@ +import { Form, message, Button, DatePicker } from 'antd'; +import NormalSelect from '../../../../components/Form/NormalSelect' +import moment from "moment" +const { RangePicker } = DatePicker; + + + +const ToolBar = ({search, defaultParams}) => { + const [form] = Form.useForm(); + + const onFinish = (val)=>{ + search(val.tms) + } + + return ( + <> + + + { + form.setFieldValue('cysd',null) + }} + style={{ width: "380px" }} + format="YYYY-MM-DD HH:mm:ss" + /> + + + + + + + ); +} + +export default ToolBar; \ No newline at end of file diff --git a/src/views/sq/qys/gcys/xlLine/index.js b/src/views/sq/qys/gcys/xlLine/index.js index 44db4461a..a28ae6661 100644 --- a/src/views/sq/qys/gcys/xlLine/index.js +++ b/src/views/sq/qys/gcys/xlLine/index.js @@ -14,8 +14,8 @@ export default function Zrtx() { title: '序号', dataIndex: 'index', key: 'index', align: "center", render: (r, c,i) => {i + 1} }, - { title: '水位(m)', dataIndex: 'q', key: 'rz',align:"center" }, - { title: '流量(m³/s)', dataIndex: 'z', key: 'z',align:"center" }, + { title: '水位(m)', dataIndex: 'z', key: 'z',align:"center" }, + { title: '流量(m³/s)', dataIndex: 'q', key: 'rz',align:"center" }, { title: '操作', dataIndex: 'op', key: 'op', align: "center",width:200, render: (value, row, index) => ( () => command(cmd)(row)} />) @@ -27,7 +27,7 @@ export default function Zrtx() { }, [data]) const getData = async () => { try { - const res = await httppost2(apiurl.dataResourcesCenter.projectAndWater.xl.list) + const res = await httppost2(apiurl.dataResourcesCenter.projectAndWater.xl.list,{stcd:'61610700'}) setData(res.data.map((item,i) => ({...item,inx:i + 1}))) } catch (error) { console.log(error); diff --git a/src/views/szydd/ddjl/index.js b/src/views/szydd/ddjl/index.js index d95a50dd3..93edafbc6 100644 --- a/src/views/szydd/ddjl/index.js +++ b/src/views/szydd/ddjl/index.js @@ -118,7 +118,7 @@ const Page = () => { setNum(data.total) } })() - }) + },[]) return (