feat(): 水库总览修改

lsf-dev
李神峰 2025-06-12 11:45:21 +08:00
parent d4a3f222a2
commit 455f63f122
11 changed files with 198 additions and 125 deletions

View File

@ -44,6 +44,52 @@
],
"layer": "RealSkLayer",
"layerPop": "RealSkPop"
},
{
"stcd": "716115401",
"type": "sk",
"hasRz": true,
"stnm": "小玉潭水库",
"adcd": "421181110000",
"wscd": null,
"importancy": 0,
"lgtd": 114.96946270525194,
"lttd": 31.469026638957608,
"elev": 0,
"damel": 21.6,
"dsflz": 20.15,
"fsltdz": 130.8,
"ddz": 0,
"zcxsw": 130.8,
"drpTm": "2024-05-17T08:00:00.000Z",
"today": 0,
"h1": 0,
"h3": 0,
"h6": 0,
"h12": 0,
"h24": 0,
"h48": 0,
"drpState": 2,
"rz": 126.41,
"w": 4.971,
"a_fsltdz": -4.390000000000015,
"rzTm": "2024-05-17T06:00:00.000Z",
"rzWarning": 0,
"rzState": 2,
"pic": [
{
"stcd": "716115401",
"tm": "2024-05-17T08:05:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2024/0517/716115401/20240517160500.jpg"
},
{
"stcd": "716115401",
"tm": "2024-05-17T08:20:00.000Z",
"url": "http://223.75.53.106:8891/skjgimages/2024/0517/716115402/20240517162000.jpg"
}
],
"layer": "RealSkLayer",
"layerPop": "RealSkPop"
},
{
"stcd": "716115301",
@ -669,6 +715,7 @@
"h48": 15,
"drpState": 1,
"rz": 84.67,
"xs":10432,
"w": 16900,
"a_fsltdz": -8.329999999999998,
"rzTm": "2025-06-06T22:00:00.000Z",
@ -704,6 +751,7 @@
"drpState": 2,
"rz": 83,
"w": 1026,
"xs":375,
"a_fsltdz": -15.299999999999997,
"rzTm": "2025-06-06T00:00:00.000Z",
"rzWarning": 0,
@ -737,6 +785,7 @@
"h48": 0,
"drpState": 2,
"rz": 203.4,
"xs":1164,
"w": 2797,
"a_fsltdz": -5.079999999999984,
"rzTm": "2025-06-06T00:00:00.000Z",
@ -1876,6 +1925,7 @@
"drpState": 1,
"rz": 60.7,
"w": 45490,
"xs":32133,
"a_fsltdz": -4.189999999999998,
"rzTm": "2025-06-06T22:00:00.000Z",
"rzWarning": 0,
@ -5451,6 +5501,7 @@
"h48": 43.5,
"drpState": 1,
"rz": 141.56,
"xs":12744,
"w": 16926,
"a_fsltdz": -7.439999999999998,
"rzTm": "2025-06-06T22:00:00.000Z",
@ -5486,6 +5537,7 @@
"drpState": 1,
"rz": 120,
"w": 6015,
"xs":1676,
"a_fsltdz": -17,
"rzTm": "2025-06-06T00:00:00.000Z",
"rzWarning": 0,
@ -5888,6 +5940,7 @@
"drpState": 2,
"rz": 224.31,
"w": 1415,
"xs":750,
"a_fsltdz": -6.689999999999998,
"rzTm": "2025-04-11T05:00:00.000Z",
"rzWarning": 0,
@ -7486,6 +7539,7 @@
"drpState": 2,
"rz": 156.8,
"w": 1834,
"xs":448,
"a_fsltdz": -10.599999999999994,
"rzTm": "2025-06-06T00:00:00.000Z",
"rzWarning": 0,
@ -8256,6 +8310,7 @@
"drpState": 1,
"rz": 117.78,
"w": 1577,
"xs":628,
"a_fsltdz": -4.659999999999997,
"rzTm": "2025-06-06T22:00:00.000Z",
"rzWarning": 0,
@ -9072,6 +9127,7 @@
"drpState": 1,
"rz": 144.5,
"w": 1574,
"xs":"--",
"a_fsltdz": -14.5,
"rzTm": "2025-06-06T00:00:00.000Z",
"rzWarning": 0,

BIN
src/assets/yybg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

View File

@ -136,8 +136,8 @@ const enterpriseData = [
const statistics = {
floodArea: 3.57,
affectedVillages: 2,
affectedHouseholds: 310,
affectedPopulation: 940,
affectedHouseholds: 75,
affectedPopulation: 224,
};
const FloodImpactMonitor = () => {
@ -162,7 +162,7 @@ const FloodImpactMonitor = () => {
<Typography variant="h6" className={classes.title}>
城镇集镇村庄
</Typography>
<Paper>
<Paper style={{background:"transparent"}}>
<Table className={classes.table} >
<thead>
<tr>
@ -196,7 +196,7 @@ const FloodImpactMonitor = () => {
<Typography variant="h6" className={classes.title}>
企事业单位影响情况
</Typography>
<Paper>
<Paper style={{background:"transparent"}}>
<Table className={classes.table}>
<thead>
<tr>

View File

@ -40,7 +40,7 @@ function HDStDlg({ record, onClose }) {
</DpTabs>
<DpCloseButton onClick={onClose} />
</DpAppBar>
<div style={{ display: 'flex' }}>
<div className='yy-contents'>
<div className='yy-left'>
<WarningCard
key={warnObj.id}
@ -53,10 +53,10 @@ function HDStDlg({ record, onClose }) {
/>
</div>
<div className='yy-middle'>
<VideoPlayer
{/* <VideoPlayer
videoUrl={`${process.env.PUBLIC_URL}/assets/yyVideo.mp4`}
date=""
/>
/> */}
{/* <video src={`${process.env.PUBLIC_URL}/assets/yyVideo.mp4`} style={{width:'100%',height:'100%'}}></video> */}
</div>
<div className='yy-right'>

View File

@ -1,6 +1,12 @@
.yy-left,.yy-right{
width:450px
width:450px;
background: rgba(6, 34, 56, .8);
}
.yy-middle{
width: 1000px;
}
.yy-contents{
display: flex;
background:url(../../../../assets/yybg.png) no-repeat;
background-size: 100% 100%;
}

View File

@ -213,10 +213,6 @@ const RainfallMonitor = () => {
</Box>
</> : <Fxyb />
}
</Box>
);
};

View File

@ -24,7 +24,7 @@ function SkSmtp({ record, onClose }) {
<div className="boxhead"></div>
<DialogContent style={{ padding: 0, width: '30rem', overflowX: 'hidden' }}>
<DpAppBar position="sticky">
<Typography variant="h6" style={{ alignSelf: 'center', marginLeft: '0.5rem', flexGrow: 1 }}>{record.stnm}</Typography>
<Typography variant="h6" style={{ alignSelf: 'center', marginLeft: '0.5rem', flexGrow: 1,color:"#fff" }}>{record.stnm}</Typography>
<DpCloseButton onClick={onClose} />
</DpAppBar>
<SkSmtpPanel personels={record.personels || []} txt={record.txt} />

View File

@ -50,7 +50,7 @@ function HDReal({ style }) {
return (
<PanelBox
style={style}
title="监测2告警"
title="监测告警"
color="green"
extra={
<div>

View File

@ -12,17 +12,17 @@ function Page({ style }) {
<div style={{width:'24%',display:'flex',flexDirection:'column',alignItems:'center',border:'1px solid rgba(36, 136, 223, 0.4)',paddingTop:'0.2rem',background:'#132a4b'}}>
<img src={`${process.env.PUBLIC_URL}/assets/icon/大型水库.svg`} width={20} alt=""/>
<div style={{color:'#ffffff',fontSize:'0.8rem',marginTop:'0.1rem'}}>中型水库</div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>3</span> </div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>7</span> </div>
</div>
<div style={{width:'24%',display:'flex',flexDirection:'column',alignItems:'center',border:'1px solid rgba(36, 136, 223, 0.4)',paddingTop:'0.2rem',background:'#132a4b'}}>
<img src={`${process.env.PUBLIC_URL}/assets/icon/大型水库.svg`} width={20} alt=""/>
<div style={{color:'#ffffff',fontSize:'0.8rem',marginTop:'0.1rem'}}>(1)型水库</div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>3</span> </div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>44</span> </div>
</div>
<div style={{width:'24%',display:'flex',flexDirection:'column',alignItems:'center',border:'1px solid rgba(36, 136, 223, 0.4)',paddingTop:'0.2rem',background:'#132a4b'}}>
<img src={`${process.env.PUBLIC_URL}/assets/icon/大型水库.svg`} width={20} alt=""/>
<div style={{color:'#ffffff',fontSize:'0.8rem',marginTop:'0.1rem'}}>(2)型水库</div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>3</span> </div>
<div style={{color:'#ffffff',fontSize:'0.8rem',lineHeight:'1rem'}}><span style={{color:'#7dd188',fontSize:'1.2rem'}}>207</span> </div>
</div>
</div>
</div>

View File

@ -16,6 +16,7 @@ function DrpReal({ style }) {
const [skData, setSkData] = useState([])
const [skType, setSkType] = useState('')
const [sort, setSort] = useState(true)
const [sort1, setSort1] = useState(true)
const dispatch = useDispatch();
const tableData = useMemo(() => {
if (skType === '1') {
@ -25,18 +26,22 @@ function DrpReal({ style }) {
return (skData.filter(o => o.w > 100 && o.w <= 10000) || []).sort((a, b) => sort ? (b.w - a.w) : (a.w - b.w))
}
if (skType === '3') {
return (skData.filter(o=>o.w>0.375 && o.w<=100)||[]).sort((a,b)=>sort?(b.w-a.w):(a.w-b.w))
const filterSkData = skData.filter(o => o.w > 0.375 && o.w <= 100) || [];
const newFilterData = filterSkData.map(item => ({ ...item, xs: (item.w * 0.6).toFixed(2) }))
return newFilterData.sort((a, b) => sort ? (b.w - a.w) : (a.w - b.w))
}
if (skType === '4') {
return (skData.filter(o=>o.w>=0 && o.w<=0.375)||[]).sort((a,b)=>sort?(b.w-a.w):(a.w-b.w))
const filterSkData = skData.filter(o => o.w >= 0 && o.w <= 0.375) || [];
const newFilterData = filterSkData.map(item => ({ ...item, xs: (item.w * 0.6).toFixed(2) }))
return newFilterData.sort((a, b) => sort ? (b.w - a.w) : (a.w - b.w))
}
return []
},[skData,skType,sort])
}, [skData, skType, sort, sort1])
const skTypeObj = [
{ type: '1', name: '大型水库', num1: 3, num2: 7.9316 },//8.735
{ type: '2', name: '中型水库', num1: 7, num2: 1.627 },
{type:'3',name:'小(1)型水库',num1:43,num2:1.627},
{ type: '3', name: '小(1)型水库', num1: 44, num2: 1.627 },
{ type: '4', name: '小(2)型水库', num1: 207, num2: 8.735 },
]
@ -137,9 +142,18 @@ function DrpReal({ style }) {
<Table size="small" stickyHeader>
<TableHead>
<TableRow>
<DpTableCell style={{ minWidth: '1rem' }} align="left">序号</DpTableCell>
<DpTableCell style={{ minWidth: '5rem' }} align="center">水库名称</DpTableCell>
<DpTableCell style={{ minWidth: '3rem' }} align="left">序号</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">水库名称</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">类型</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">
{/* <TableSortLabel
onClick={() => setSort1(!sort1)}
active={true}
direction={sort1?'desc':'asc'}>
{'蓄水量(万m³)'}
</TableSortLabel> */}
蓄水量(万m³)
</DpTableCell>
<DpTableCell style={{ minWidth: '8rem' }} align="center">
<TableSortLabel
onClick={() => setSort(!sort)}
@ -164,6 +178,7 @@ function DrpReal({ style }) {
</div>
</DpTableCell>
<DpTableCell align="center" >{item.name}</DpTableCell>
<DpTableCell align="center" >{tableRow.xs}</DpTableCell>
<DpTableCell align="center" >{tableRow.w}</DpTableCell>
</DpTableRow>
</TableBody>

View File

@ -104,7 +104,7 @@ function DrpReal({ style }) {
},
'paint': {
'line-color': 'red',
'line-width': 10
'line-width': 6
// [
// 'case',
// ['==', ['get', 'LEVEL'], 1], 2.2,