diff --git a/public/assets/images/qishu.jpg b/public/assets/images/qishu.jpg new file mode 100644 index 000000000..5aa46fba4 Binary files /dev/null and b/public/assets/images/qishu.jpg differ diff --git a/public/assets/images/renchi.jpg b/public/assets/images/renchi.jpg new file mode 100644 index 000000000..0ceb71220 Binary files /dev/null and b/public/assets/images/renchi.jpg differ diff --git a/src/components/DashboardLayout/index.tsx b/src/components/DashboardLayout/index.tsx index 17fc92513..2b62b91ba 100644 --- a/src/components/DashboardLayout/index.tsx +++ b/src/components/DashboardLayout/index.tsx @@ -88,7 +88,7 @@ const DashboardLayout: React.FC = () => { navigate('/login') }else{ dispatch.auth.loadMenu(); - document.title = "小玉潭水库综合管理系统"; + document.title = "檀树岗水库现代化运行管理矩阵平台"; } },[]) @@ -148,7 +148,7 @@ const DashboardLayout: React.FC = () => { {/*{TITLE}{SUBTITLE}*/} - 小玉潭水库综合管理系统 + 檀树岗水库现代化运行管理矩阵平台
diff --git a/src/components/crud/CrudOpRender.js b/src/components/crud/CrudOpRender.js index 41dddf830..494a00323 100644 --- a/src/components/crud/CrudOpRender.js +++ b/src/components/crud/CrudOpRender.js @@ -38,9 +38,14 @@ export function CrudOpRender_icon({ command, edit, del, restore, add, view }) { ) } -export function CrudOpRender_text({ command,picReview, edit,detail, dispatch,del, restore, add,similarAdd, view,zg, cjxgl,review,download }) { +export function CrudOpRender_text({ command,picReview, edit,detail, dispatch,del, restore, add,similarAdd, view,zg, cjxgl,review,download,record }) { return (
+ { + record ? ( + + ) : null + } { add ? ( @@ -113,6 +118,7 @@ export function CrudOpRender_text({ command,picReview, edit,detail, dispatch,del ) : null } +
) } diff --git a/src/models/auth/_.ts b/src/models/auth/_.ts index 7b1fd9ce1..cb7511087 100644 --- a/src/models/auth/_.ts +++ b/src/models/auth/_.ts @@ -380,11 +380,19 @@ export async function loadMenu(): Promise { ] }, - { - id: id(), title: '全周期', redirect: '/mgr/sq/qzq/gcdsj', + { id: id(), title: '全周期', redirect: '/mgr/sq/qzq/gcdsj', children: [ - { id: id(), title: '工程大事记', path: '/mgr/sq/qzq/gcdsj' }, - { id: id(), title: '全周期档案', path: '/mgr/sq/qys/qzqda' }, + { id: id(), title: '工程大事记', path: '/mgr/sq/qzq/gcdsj'}, + { id: id(), title: '全周期档案', path: '/mgr/sq/qys/qzqda'}, + ] + }, + { id: id(), title: '全天候', redirect: '/mgr/sq/qth/sksq', + children: [ + { 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/spjk'}, ] }, ] diff --git a/src/service/apiurl.js b/src/service/apiurl.js index 734a5d188..828072064 100644 --- a/src/service/apiurl.js +++ b/src/service/apiurl.js @@ -5,7 +5,7 @@ const pubapi_old = 'https://owrsvr.cloudowr.cn/svr' const pubapi = 'https://owrsvr.cloudowr.cn/pubapi' const zdkapi = 'https://slt-sh.chutianyun.gov.cn:8002' //中电科的市级平台 const service_fxdd = '/gunshiApp/tsg' -const service_xyt = '/gunshiApp/xyt'//登陆先用小玉潭 +const service_xyt = '/gunshiApp/tsg'//登陆先用小玉潭 const service_shzh = '/shzh' const apiurl = { fxya: { @@ -853,6 +853,7 @@ const apiurl = { //实时水情 sssq: { + selectList:service_fxdd + "/real/rain/list", list: service_fxdd + '/river/water/list', //实时水情-河道水情列表 warn: service_fxdd + '/current/situation/rv/warn', //实时水情-河道水情统计 summaryInfo: service_fxdd + '/river/water/summaryInfo', //实时水情-河道水情汇总 @@ -861,7 +862,7 @@ const apiurl = { reservoirsummaryInfo: service_fxdd + '/reservoir/water/summaryInfo', //实时水情-水库水情汇总 //河道弹框详情 monitor: service_fxdd + '/river/water/monitor/data', //监测数据 - detail: service_fxdd + '/reservoir/water/detail', //监测数据-下方表格 + detail: service_fxdd + '/river/water/detail', //监测数据-下方表格 zqrl: service_fxdd + '/river/water/zqrl', //水位流量关系 channel: service_fxdd + '/reservoir/water/image/channel', //图像监测-视角 imageinfo: service_fxdd + '/reservoir/water/image/info', //图像监测-列表 diff --git a/src/views/AppRouters.tsx b/src/views/AppRouters.tsx index 0b99e53b6..637da7a11 100644 --- a/src/views/AppRouters.tsx +++ b/src/views/AppRouters.tsx @@ -86,6 +86,9 @@ import Kqys from './sq/qys/kqys/index.js' import Xyys from './sq/qys/xyys/index.js' import Gcys from './sq/qys/gcys/index.js' 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 Qzqda from './sq/qzq/qzqda' // import Zcdjxx from './sq/qys/' // import Zcdjxx from './sq/qfg/zcdjxx' @@ -94,6 +97,9 @@ import Qzqda from './sq/qzq/qzqda' // 四制 - 组织机构查看 import Zzjgck from './sz/zzjgck' +import Zrrgl from './sz/zrrgl' +import Pxjhgl from './sz/pxjhgl' +import Pxjlgl from './sz/pxjlgl' import Flfg from './sz/flfg' import Zdgl from './sz/zdgl' import Ajdj from './sz/szzf/ajdj' @@ -153,6 +159,11 @@ const AppRouters: React.FC = () => { // 工程安全监测 + { path: 'sq/qth/dbaqjc', element: }, + { path: 'sq/qth/sksq', element: }, + { path: 'sq/qth/hdsq', element: }, + { path: 'sq/qth/ssyq', element: }, + // 预警 { path: 'gcaqjc/gcaqyj/bzt', element: }, { path: 'gcaqjc/gcaqyj/yhyj', element: }, @@ -209,7 +220,7 @@ const AppRouters: React.FC = () => { { path: 'fxzb/jczw/yqz', element: }, { path: 'fxzb/jczw/sqz', element: }, // 视频监控 - { path: 'spjk/spjk', element: }, + { path: 'sq/qth/spjk', element: }, { path: 'sg/gjgl/aigj', element: }, // { path: 'fxzb/zbb', element: }, @@ -242,6 +253,9 @@ const AppRouters: React.FC = () => { // 四制-组织机构查看 { path: 'sz/gltx/zzjgck', element: }, + { path: 'sz/gltx/zrrgl', element: }, + { path: 'sz/pxgl/pxjhgl', element: }, + { path: 'sz/pxgl/pxjlgl', element: }, { path: 'sz/flfg', element: }, { path: 'sz/zdgl', element: }, { path: 'sz/szzf/ajdj', element: }, diff --git a/src/views/Home/MapCtrl/components/Jcsj/index.js b/src/views/Home/MapCtrl/components/Jcsj/index.js index 511b80be2..2a568168c 100644 --- a/src/views/Home/MapCtrl/components/Jcsj/index.js +++ b/src/views/Home/MapCtrl/components/Jcsj/index.js @@ -77,10 +77,12 @@ function DrpSearch({record}) { ], } - setParams(option) + if (record.stcd) { + setParams(option) getData(option) + } - }, [current]) + }, [current,record]) return ( @@ -104,16 +106,16 @@ function DrpSearch({record}) {
{ ['小时', '日'].map((item, index) => ( -
setCurrent(index)}>{item}
+
setCurrent(index)}>{item}
)) }
-
-
+
+
-
+
{ data?.length > 0 ?
-
+
近1h雨量(mm)
diff --git a/src/views/Home/MapCtrl/components/Jcsj/index.less b/src/views/Home/MapCtrl/components/Jcsj/index.less index caa4e2dfe..107e9d9bf 100644 --- a/src/views/Home/MapCtrl/components/Jcsj/index.less +++ b/src/views/Home/MapCtrl/components/Jcsj/index.less @@ -13,7 +13,7 @@ padding: 8px 0; } - .active { + .sqActive { color: #5FB7FF; background: #F0F7FF; border: 1px solid #5FB7FF; diff --git a/src/views/Home/MapCtrl/components/Sksjcx/index.js b/src/views/Home/MapCtrl/components/Sksjcx/index.js index 96739fdfc..92a7f5dbb 100644 --- a/src/views/Home/MapCtrl/components/Sksjcx/index.js +++ b/src/views/Home/MapCtrl/components/Sksjcx/index.js @@ -40,31 +40,9 @@ function DrpSearch({ record }) { useEffect(() => { + let option = ""; - // 比较当前时间和早上八点 - // if (currentTime.isBefore(eightAM)) { - // option = { - // stcd: record.stcd, - // source: record.source, - // stm: moment().subtract(8, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // etm: moment().subtract(1, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // tm: [moment().subtract(8, 'days').startOf('day').set({ - // hour: 8, - // minute: 0 - // }), moment().subtract(1, 'days').startOf('day').set({hour: 8, minute: 0})], - // } - // } else { - // option = { - // stcd: record.stcd, - // source: record.source, - // stm: moment().subtract(7, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // etm: moment().startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // tm: [moment().subtract(7, 'days').startOf('day').set({ - // hour: 8, - // minute: 0 - // }), moment().startOf('day').set({hour: 8, minute: 0})], - // } - // } + option = { stcd: record.stcd, source: record.source, @@ -75,15 +53,18 @@ function DrpSearch({ record }) { moment().add(1, 'hour').set({ minute: 0, second: 0 }), ], } - setParams(option) - getData(option) + if (record?.stcd && record.source) { + setParams(option) + getData(option) + + } }, [record]) return (
-
+
-
+
-
+
{ data.length > 0 ?
-
+
近1h雨量(mm)
diff --git a/src/views/Home/MapCtrl/components/Sqjcsj/index.js b/src/views/Home/MapCtrl/components/Sqjcsj/index.js index 63b37ef83..4232aace7 100644 --- a/src/views/Home/MapCtrl/components/Sqjcsj/index.js +++ b/src/views/Home/MapCtrl/components/Sqjcsj/index.js @@ -20,7 +20,6 @@ function DrpSearch({record}) { const option = useMemo(() => { if (data && data.length) { return drpOption({data,wrz:record.wrz,grz:record.grz}); - } }, [data]) @@ -50,30 +49,6 @@ function DrpSearch({record}) { useEffect(() => { let option = ""; - // 比较当前时间和早上八点 - // if (currentTime.isBefore(eightAM)) { - // option = { - // stcd: record.stcd, - // source: record.source, - // stm: moment().subtract(8, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // etm: moment().subtract(1, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // tm: [moment().subtract(8, 'days').startOf('day').set({ - // hour: 8, - // minute: 0 - // }), moment().subtract(1, 'days').startOf('day').set({hour: 8, minute: 0})], - // } - // } else { - // option = { - // stcd: record.stcd, - // source: record.source, - // stm: moment().subtract(7, 'days').startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // etm: moment().startOf('day').set({hour: 8, minute: 0}).format("YYYY-MM-DD HH:mm"), - // tm: [moment().subtract(7, 'days').startOf('day').set({ - // hour: 8, - // minute: 0 - // }), moment().startOf('day').set({hour: 8, minute: 0})], - // } - // } option = { stcd: record.stcd, source: record.source, @@ -84,15 +59,18 @@ function DrpSearch({record}) { moment().add(1, 'hour').set({ minute: 0, second: 0 }), ], } - setParams(option) - setInitialDateRange(option) - getData(option) + if (record.stcd) { + setParams(option) + setInitialDateRange(option) + getData(option) + + } }, [record]) return (
-
+
查询
-
+
-
+
{ data.length > 0 ?
-
+
近1h雨量(mm)
diff --git a/src/views/sq/qth/hdsq/index.js b/src/views/sq/qth/hdsq/index.js new file mode 100644 index 000000000..34d4e0623 --- /dev/null +++ b/src/views/sq/qth/hdsq/index.js @@ -0,0 +1,71 @@ +import React, { useEffect, useState } from 'react' +import { zqrl, list} from "../../../../service/sssq"; +import Sssw from './sssw'; +import Sjcx from '../../../Home/MapCtrl/components/Sqjcsj/index' +import "./index.less" +import { Table } from 'antd'; +export default function Sksq() { + + const columns = [ + {title: '水位(m)', key: 'z', dataIndex: 'z', align: 'center'}, + {title: '流量(m³/s)', key: 'q', dataIndex: 'q', align: 'center'}, + ] + const [tableData, setTableData] = useState([]) + const [swtableData, setSwTableData] = useState([]) + const getData = async (params) => { + let res = await list(params) + setTableData(res); + getSwTableData(res[0]?.stcd) + } + + const getSwTableData = async (stcd) => { + setSwTableData(await zqrl(stcd)); + }; + useEffect(() => { + getData({args: "",sources: ["SH", "SW"],}) + }, []) + return ( +
+
+
+
+
+ + 实时水位 +
+ 站点:{tableData[0]?.stnm} +
+
+ +
+
+
+ + 水位流量关系表 +
+
+
+ + + +
+
+
+ + 数据查询 +
+
+
+ +
+
+ + + + ) +} diff --git a/src/views/sq/qth/hdsq/index.less b/src/views/sq/qth/hdsq/index.less new file mode 100644 index 000000000..e1f623d93 --- /dev/null +++ b/src/views/sq/qth/hdsq/index.less @@ -0,0 +1,108 @@ +.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; + } + + .realinfo { + width: 100%; + margin-right: 1rem + } + + .dataTm { + padding: 0.4rem 1rem; + border-radius: 0.4rem; + margin-bottom: 0.5rem; + font-size: 0.8rem; + } + + .online, .offline{ + color:#fff; + line-height:22px; + font-size:14px; + letter-spacing: 1px; + } + + .online { + border: 1px solid #9ccc65; + background-color: #33691e; + } + .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%; + } + + .offline { + border: 1px solid #ef5350; + background-color: #b71c1c; + } + + .infoItem { + border-bottom: 1px dashed #aaa; + display: flex; + font-size: 14px; + line-height: 1.8; + margin-bottom: 0.5rem; + + & > .row-key{ + width: 9rem; + line-height:30px; + } + + & > .row-value{ + width: 50%; + text-align: right; + font-weight: bold; + margin-right: 0.5rem; + flex-grow: 1; + } + + & > .row-unit{ + width: 3rem; + flex-shrink: 0; + } + } + + + } + } + .content-right{ + flex: 1; + height: 100%; + background-color: #fff; + .sjcx-content{ + padding: 10px; + } + } + .pic-container{ + padding: 10px; + } +} \ No newline at end of file diff --git a/src/views/sq/qth/hdsq/sssw.js b/src/views/sq/qth/hdsq/sssw.js new file mode 100644 index 000000000..69b3a30ae --- /dev/null +++ b/src/views/sq/qth/hdsq/sssw.js @@ -0,0 +1,37 @@ +import React from 'react' +import {Divider} from "antd" +export default function Sssw({data}) { + return ( +
+
+
+
水位上报时间: {data?.tm}
+ +
+
监测水位:
+
{data?.z ? data?.z.toFixed(2):'-'}
+
m
+
+ +
+
警戒水位:
+
{data?.wrz ? data?.wrz.toFixed(2) : '-'}
+ +
{(data.wrz && data?.z) ? (data.wrz - data?.z).toFixed(2):'-'}
+
m
+
+ +
+
危险水位:
+
{data.grz ? data.grz.toFixed(2) : '-'}
+ +
{(data.grz && data?.z) ? (data.grz - data?.z).toFixed(2):'-'}
+
m
+
+
+
+
+ ) +} diff --git a/src/views/sq/qth/sksq/index.js b/src/views/sq/qth/sksq/index.js new file mode 100644 index 000000000..68d6969b2 --- /dev/null +++ b/src/views/sq/qth/sksq/index.js @@ -0,0 +1,49 @@ +import React, { useEffect, useState } from 'react' +import { reservoirlist, } from "../../../../service/sssq"; +import Sssw from './sssw'; +import Sjcx from '../../../Home/MapCtrl/components/Sksjcx/index' +import "./index.less" +import { helpers } from '@turf/turf'; +export default function Sksq() { + const [tableData, setTableData] = useState([]) + const getData = async (params) => { + setTableData(await reservoirlist(params)); + } + useEffect(() => { + let option = { + sources: ["SW", "SK"], + args: "", + }; + getData(option) + }, []) + return ( +
+
+
+
+
+ + 实时水位 +
+ 站点:{tableData[0]?.stnm} +
+
+ +
+
+
+
+
+ + 数据查询 +
+
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/sksq/index.less b/src/views/sq/qth/sksq/index.less new file mode 100644 index 000000000..e1f623d93 --- /dev/null +++ b/src/views/sq/qth/sksq/index.less @@ -0,0 +1,108 @@ +.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; + } + + .realinfo { + width: 100%; + margin-right: 1rem + } + + .dataTm { + padding: 0.4rem 1rem; + border-radius: 0.4rem; + margin-bottom: 0.5rem; + font-size: 0.8rem; + } + + .online, .offline{ + color:#fff; + line-height:22px; + font-size:14px; + letter-spacing: 1px; + } + + .online { + border: 1px solid #9ccc65; + background-color: #33691e; + } + .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%; + } + + .offline { + border: 1px solid #ef5350; + background-color: #b71c1c; + } + + .infoItem { + border-bottom: 1px dashed #aaa; + display: flex; + font-size: 14px; + line-height: 1.8; + margin-bottom: 0.5rem; + + & > .row-key{ + width: 9rem; + line-height:30px; + } + + & > .row-value{ + width: 50%; + text-align: right; + font-weight: bold; + margin-right: 0.5rem; + flex-grow: 1; + } + + & > .row-unit{ + width: 3rem; + flex-shrink: 0; + } + } + + + } + } + .content-right{ + flex: 1; + height: 100%; + background-color: #fff; + .sjcx-content{ + padding: 10px; + } + } + .pic-container{ + padding: 10px; + } +} \ No newline at end of file diff --git a/src/views/sq/qth/sksq/sssw.js b/src/views/sq/qth/sksq/sssw.js new file mode 100644 index 000000000..b45a46ae9 --- /dev/null +++ b/src/views/sq/qth/sksq/sssw.js @@ -0,0 +1,66 @@ +import React from 'react' +import moment from 'moment' +import MyImg from '../../../Home/MapCtrl/components/Skssjc/myImg' +export default function Sssw({data}) { + return ( +
+
+
+
水位上报时间: {data?.tm}
+ +
+
监测水位:
+
{data?.rz ? data?.rz.toFixed(2):'-'}
+
m
+
+ +
+
设计洪水位:
+
{data?.desFloodLev ? data?.desFloodLev.toFixed(2):'-'}
+
m
+
+ +
+
正常蓄水位:
+
{data.normWatLev ? data.normWatLev.toFixed(2):'-'}
+
m
+
+ +
+
汛限水位:
+
{data.flLowLimLev ? data.flLowLimLev.toFixed(2):'-'}
+
m
+
+ +
+
死水位:
+
{data.deadLev ? data.deadLev.toFixed(2):'-'}
+
m
+
+
+
坝顶高程:
+
{data.crestElev}
+
{ data.crestElev ? "m" : "-"}
+
+ +
+
水库当前库容:
+
{data.nowCap}
+
万m³
+
+ +
+
兴利库容:
+
{data.benResCap}
+
万m³
+
+
+
+
+ +
+
+ ) +} diff --git a/src/views/sq/qth/ssyq/index.js b/src/views/sq/qth/ssyq/index.js new file mode 100644 index 000000000..c4e5a87d9 --- /dev/null +++ b/src/views/sq/qth/ssyq/index.js @@ -0,0 +1,93 @@ +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 "./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('') + const [stcdItem, setStcdItem] = useState({}) + const getList = async() => { + try { + const res = await httppost2(apiurl.sssq.selectList) + setSelectList(res.data.map(item => ({ label: item.stnm, value: item.stcd,...item}))) + setSelected(res.data[0].stcd) + setStcdItem(res.data[0]) + } catch (error) { + console.log(error); + } + } + + const handleChange = (e) =>{ + setSelected(e); + setStcdItem(selectList.find(item => item.stcd === e)) + } + + useEffect(() => { + getList() + }, []) + + useEffect(() => { + getData1() + }, []) + return ( +
+
+
+
+
+ + 实时雨情 +
+
+ 站点: + { handleChange(e)}} + /> +
+
+
+ +
+
+
+
+
+ + 数据查询 +
+
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sq/qth/ssyq/index.less b/src/views/sq/qth/ssyq/index.less new file mode 100644 index 000000000..9159b4b8b --- /dev/null +++ b/src/views/sq/qth/ssyq/index.less @@ -0,0 +1,82 @@ +.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; + } + } + .pic-container{ + padding: 10px; + } +} \ No newline at end of file diff --git a/src/views/sq/qth/ssyq/sssw.js b/src/views/sq/qth/ssyq/sssw.js new file mode 100644 index 000000000..152e7d5ab --- /dev/null +++ b/src/views/sq/qth/ssyq/sssw.js @@ -0,0 +1,52 @@ +import React,{useState,useEffect} from 'react' +import {queryStPptnDetails} from '../../../../service/ssyq' +export default function Sssw({ data }) { + const [detail, setDetail] = useState({}) + const getDetail = async (data) => { + setDetail(await queryStPptnDetails(data)) + } + useEffect(() => { + if (data.stcd) { + getDetail(data.stcd) + } + }, [data]) + + return ( +
+
+
+
雨情最新上报时间: {detail?.tm}
+
+
+
{detail?.h1 ?? '-' } mm
+
近1小时
+
+
+
{detail?.h3 ?? '-' } mm
+
近3小时
+
+
+
{detail?.h6 ?? '-' } mm
+
近6小时
+
+
+
{detail?.h12 ?? '-' } mm
+
近12小时
+
+
+
{detail?.h24 ?? '-' } mm
+
近24小时
+
+
{detail?.h48 ?? '-' } mm
+
近48小时
+
+ +
+
+
+ +
+ ) +} diff --git a/src/views/sz/pxjhgl/RecordForm.js b/src/views/sz/pxjhgl/RecordForm.js new file mode 100644 index 000000000..6ca5d0738 --- /dev/null +++ b/src/views/sz/pxjhgl/RecordForm.js @@ -0,0 +1,392 @@ +import React,{useEffect,useState,useMemo,useRef} from 'react'; +import { Form, Button, Input, Row,Upload, Col, Table, DatePicker, InputNumber,message,Image,Modal,Typography ,Popconfirm } from 'antd'; +import { DeleteOutlined,FileWordOutlined,FilePdfOutlined,FileZipOutlined,FileExcelOutlined } from '@ant-design/icons'; +import { formItemLayout, btnItemLayout } from '../../../components/crud/FormLayoutProps'; +import apiurl from '../../../service/apiurl'; +import NormalSelect from '../../../components/Form/NormalSelect'; +import "./index.less" +import moment from 'moment'; +import { createCrudService } from '../../../components/crud/_'; +const { RangePicker } = DatePicker +const { Dragger } = Upload; +const url = "http://223.75.53.141:9102/test.by-lyf.tmp" + +const ModalForm = ({ mode, record, onEdit, onSave, onSimilarSave }) => { + + const types = [ + { + label: "水利", + value:1 + }, + { + label: "岗前培训", + value:2 + },{ + label: "在岗培训", + value:3 + },{ + label: "政治学习教育", + value:4 + },{ + label: "其他", + value:5 + }, + ] + const [details, setDetails] = useState([]) + const [form] = Form.useForm(); + const [fileList, setFileList] = useState([]) //上传文件列表 + const [iframeSrc, setIframeSrc] = useState('') + const [pdfViewOPen, setPdfViewOPen] = useState(false) + + const [loading, setLoading] = useState(false) + /** + * @description 获取查看时文件 + * @param {*} type + * @returns + */ + const getFileInfo = (params) => { + createCrudService(apiurl.fxzb.qsdw.zq.getFile).delGet({ teamId: params.teamId }).then(res => { + if (res.code === 200) { + let fileArr = res.data?.files.map(item => { + return { + name: item.fileName, + response: { + data: { + filePath: item.filePath, + fileId:item.fileId + } + }, + } + }) + setFileList(fileArr) + const result = res.data?.details.map(item => ({ ...item, key: item.detailId })) + console.log("resss",result); + + setDetails(result) + } + }) + } + /** + * @description 文件下载 + * @param {String} params 文件fileId + */ + const download = (params) => { + let downloadLink = document.createElement("a"); + downloadLink.href = `http://local.gunshiiot.com:18083/gunshiApp/xyt/rescue/team/file/download/${params}`; + downloadLink.download = `${params.fileName}`; + downloadLink.style.display = "none"; + // 将链接添加到页面中 + document.body.appendChild(downloadLink); + + // 模拟点击事件,开始下载 + downloadLink.click(); + } + + /** + * @description pdf文件预览 + * @param {String} params 文件预览url + */ + const viewPdf = (params) => { + setIframeSrc(params) + setPdfViewOPen(true) + } + + + + + + useEffect(()=>{ + if (record.teamId ) { + getFileInfo(record) + } + }, [record]) + + useEffect(() => { + if (mode !== "save") { + let dataSo = [ + record.validStartDate? moment(record.validStartDate):'', + record.validEndDate? moment(record.validEndDate): '' + ] + + form.setFieldsValue({...record,dateRangeSo:dataSo}) + + } + + }, [record,mode]) + + return ( +
+
基本信息
+ {/* */} +
+ +
+ + + + + + + + + + + + + dateString} + getValueProps={(value) => ({ value: value ? moment(value) : undefined })} + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + dateString} + getValueProps={(value) => ({ value: value ? moment(value) : undefined })} + + > + + + + + + + + + + + +
+ 其他信息 +
+ + + + + { + fileList.length > 0 && fileList.map(file => { + return ( + +
+
+ {file.name.indexOf('.docx') > -1 ? +
{ download(file.response?.data?.fileId) }} + style={{ cursor: 'pointer' }} + > + +
+ : + file.name.indexOf('.pdf') > -1 ? +
{ viewPdf(file.response?.data?.fileId) }} + style={{ cursor: 'pointer' }} + > + +
+ : + file.name.indexOf('.zip') > -1 ? +
{ download(file.response?.data?.fileId) }} + style={{ cursor: 'pointer' }} + > + +
+ : + file.name.indexOf('.xlsx') > -1 ? +
{ download(file.response?.data?.fileId) }} + style={{ cursor: 'pointer' }} + > + +
+ : + + } + {file.name} +
+
+ +
+
+ + ) + }) + } + + + + + { + mode==='view'?null:( + <> + + + + + ) + } + + + { + setPdfViewOPen(false) + }} + > +