2024-09-23 18:04:37 +08:00
|
|
|
|
import React, { useEffect, useState } from 'react'
|
2024-09-24 16:52:53 +08:00
|
|
|
|
import { zqrl, list} from "../../../../service/sssq";
|
2024-09-23 18:04:37 +08:00
|
|
|
|
import Sssw from './sssw';
|
|
|
|
|
|
import Sjcx from '../../../Home/MapCtrl/components/Sqjcsj/index'
|
|
|
|
|
|
import "./index.less"
|
2024-09-24 16:52:53 +08:00
|
|
|
|
import { Table } from 'antd';
|
2024-09-23 18:04:37 +08:00
|
|
|
|
export default function Sksq() {
|
2024-09-24 16:52:53 +08:00
|
|
|
|
|
|
|
|
|
|
const columns = [
|
|
|
|
|
|
{title: '水位(m)', key: 'z', dataIndex: 'z', align: 'center'},
|
|
|
|
|
|
{title: '流量(m³/s)', key: 'q', dataIndex: 'q', align: 'center'},
|
|
|
|
|
|
]
|
2024-09-23 18:04:37 +08:00
|
|
|
|
const [tableData, setTableData] = useState([])
|
2024-09-24 16:52:53 +08:00
|
|
|
|
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));
|
|
|
|
|
|
};
|
2024-09-23 18:04:37 +08:00
|
|
|
|
useEffect(() => {
|
2024-09-24 16:52:53 +08:00
|
|
|
|
getData({args: "",sources: ["SH", "SW"],})
|
2024-09-23 18:04:37 +08:00
|
|
|
|
}, [])
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className='lf' style={{ height: 'calc(100vh - 168px)', width: "100%" }}>
|
|
|
|
|
|
<div className='content-sk'>
|
|
|
|
|
|
<div className='content-left'>
|
|
|
|
|
|
<div className='comomn-title'>
|
2024-09-24 16:52:53 +08:00
|
|
|
|
<div style={{display:"flex",alignItems:"center"}}>
|
2024-09-23 18:04:37 +08:00
|
|
|
|
<img alt='' src={`${process.env.PUBLIC_URL}/assets/panelTitle.png`} />
|
|
|
|
|
|
<span style={{marginLeft:10}}>实时水位</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span>站点:{tableData[0]?.stnm}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className='sssw-content'>
|
|
|
|
|
|
<Sssw data={tableData[0] || {}}/>
|
2024-09-24 16:52:53 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div className='comomn-title'>
|
|
|
|
|
|
<div style={{display:"flex",alignItems:"center"}}>
|
|
|
|
|
|
<img alt='' src={`${process.env.PUBLIC_URL}/assets/panelTitle.png`} />
|
|
|
|
|
|
<span style={{marginLeft:10}}>水位流量关系表</span>
|
2024-09-23 18:04:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-09-24 16:52:53 +08:00
|
|
|
|
<div className='sssw-content' style={{padding:10}}>
|
|
|
|
|
|
<Table
|
|
|
|
|
|
dataSource={swtableData}
|
|
|
|
|
|
rowKey="adcd"
|
|
|
|
|
|
columns={columns}
|
|
|
|
|
|
pagination={false}
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-09-23 18:04:37 +08:00
|
|
|
|
<div className='content-right'>
|
|
|
|
|
|
<div className='comomn-title'>
|
|
|
|
|
|
<div style={{display:"flex",alignItems:"center",columnGap:10}}>
|
|
|
|
|
|
<img alt='' src={`${process.env.PUBLIC_URL}/assets/panelTitle.png`} />
|
|
|
|
|
|
<span>数据查询</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div className='sjcx-content'>
|
2024-09-24 16:52:53 +08:00
|
|
|
|
<Sjcx record={{...tableData[0],height:true} || {}}/>
|
2024-09-23 18:04:37 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)
|
|
|
|
|
|
}
|