fix(): 水库数据修改

lsf-dev
李神峰 2025-06-12 14:10:02 +08:00
parent 4118661eeb
commit 31a4d43314
7 changed files with 1266 additions and 1237 deletions

View File

@ -174,19 +174,26 @@ function RealSkTip({ record, dispatch,view }) {
const changePic = () => { const changePic = () => {
setpicidx([picidx[0] === 1 ? 2 : 1, picidx[1] === 1 ? 2 : 1]) setpicidx([picidx[0] === 1 ? 2 : 1, picidx[1] === 1 ? 2 : 1])
} }
const openSw = () => {
window.open("http://local.gunshiiot.com:18083/zhtmp/#/mgr/home")
}
return ( return (
<> <>
<div className="boxhead"></div> <div className="boxhead"></div>
<div className="featuretip-title"> <div className="featuretip-title">
<div className="name">{record.stnm} <div className="name">{record.stnm}
{ {record.stnm == '浮桥河水库' ?
record?.setView&&view===200? record?.setView&&view===200?
<span style={{cursor:'pointer',color:'#50b1f9'}} onClick={()=>{ <span style={{cursor:'pointer',color:'#50b1f9',marginLeft:20}} onClick={()=>{
dispatch.map.setView(203) dispatch.map.setView(203)
sessionStorage.setItem('lastCenter',JSON.stringify(record)) sessionStorage.setItem('lastCenter',JSON.stringify(record))
}}> 进入水库模块</span> }}> 进入水库模块</span>
:null : null :
record.stnm == '小玉潭水库' ?
<span style={{ cursor: 'pointer', color: '#50b1f9',marginLeft:20 }} onClick={openSw}>
进入三维模块
</span>:null
} }
</div> </div>
<div className="extra cursor-pointer" onClick={viewInfo}>详细</div> <div className="extra cursor-pointer" onClick={viewInfo}>详细</div>

View File

@ -143,7 +143,7 @@ export default function MapCtrl({ initParams, onLoad }) {
dispatch?.runtime.setInfoDlg({ layerId: 'SyjcLayer', properties: record }) dispatch?.runtime.setInfoDlg({ layerId: 'SyjcLayer', properties: record })
}else if (record.cd_nm == 'WE1') { }else if (record.cd_nm == 'WE1') {
dispatch?.runtime.setInfoDlg({ layerId: 'SljcLayer', properties: record }) dispatch?.runtime.setInfoDlg({ layerId: 'SljcLayer', properties: record })
}else if (record.cd_nm == '0EA5DE') { }else if (record.cd == '0AB3ED') {
dispatch?.runtime.setInfoDlg({ layerId: 'ByjcLayer', properties: record }) dispatch?.runtime.setInfoDlg({ layerId: 'ByjcLayer', properties: record })
}else if (record.stnm == '浮桥河水库') { }else if (record.stnm == '浮桥河水库') {
dispatch?.runtime.setInfoDlg({ layerId: 'RealSkLayer', properties: record }) dispatch?.runtime.setInfoDlg({ layerId: 'RealSkLayer', properties: record })

View File

@ -609,6 +609,38 @@ function DrpReal({ style }) {
}, },
] ]
const data4 = [ const data4 = [
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"cd": '0AB3ED',
"stnm": "0AB3ED",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181107000",
"town_nm": "盐田河镇",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"lgtd": 114.88299 - 0.0019,
"lttd": 31.172700 - 0.0001,
"res_reg_cd": "42118140025-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": [
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"cd": "0AB3ED",
"cd_nm": "麻城坳水库",
"termite_status": "y",
"tm": "2025-05-21 04:27:18",
"is_main_cd": "y"
}
]
},
{ {
"res_cd": "42118140035", "res_cd": "42118140035",
"lgtd": 114.88299 - 0.0019, "lgtd": 114.88299 - 0.0019,
@ -747,36 +779,7 @@ function DrpReal({ style }) {
} }
] ]
}, },
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"province_cd": "420000000000",
"province_nm": "湖北省",
"city_cd": "421100000000",
"city_nm": "黄冈市",
"county_cd": "421181000000",
"county_nm": "麻城市",
"town_cd": "421181107000",
"town_nm": "盐田河镇",
"rv_name": "举水",
"bas_guid": "鄂东五河片区",
"lgtd": 115.22541,
"lttd": 30.98156,
"res_reg_cd": "42118140025-A4",
"eng_scal": "小1型",
"eng_g": "IV",
"children": [
{
"res_cd": "42118140015",
"res_nm": "麻城坳水库",
"cd": "0AB3ED",
"cd_nm": "麻城坳水库",
"termite_status": "y",
"tm": "2025-05-21 04:27:18",
"is_main_cd": "y"
}
]
},
] ]
const skdata = [ const skdata = [
{ {
@ -1222,9 +1225,9 @@ useEffect(() => {
</TableHead> </TableHead>
<TableBody> <TableBody>
{data1.map((row, index) => ( {data1.map((row, index) => (
<DpTableRow key={row.stcd}> <DpTableRow
<DpTableCell align="center"> key={row.stcd}
<div className="table-ellipsis cursor-pointer" onClick={() => { onClick={() => {
const { lgtd, lttd, res_nm: stnm } = row; const { lgtd, lttd, res_nm: stnm } = row;
if (stnm == '浮桥河水库') { if (stnm == '浮桥河水库') {
setShowdbx(1) setShowdbx(1)
@ -1237,7 +1240,11 @@ useEffect(() => {
}); });
} }
} }
}}>{row.dm}</div> }}
>
<DpTableCell align="center">
<div className="table-ellipsis cursor-pointer"
>{row.dm}</div>
</DpTableCell> </DpTableCell>
<DpTableCell align="center">{row.cd_nm}</DpTableCell> <DpTableCell align="center">{row.cd_nm}</DpTableCell>
<DpTableCell align="center">{row.du_value}</DpTableCell> <DpTableCell align="center">{row.du_value}</DpTableCell>
@ -1263,9 +1270,9 @@ useEffect(() => {
</TableHead> </TableHead>
<TableBody> <TableBody>
{data2.map((row, index) => ( {data2.map((row, index) => (
<DpTableRow key={row.stcd}> <DpTableRow
<DpTableCell align="center"> key={row.stcd}
<div className="table-ellipsis cursor-pointer" onClick={() => { onClick={() => {
const { lgtd, lttd, res_nm: stnm } = row; const { lgtd, lttd, res_nm: stnm } = row;
if (stnm == '浮桥河水库') { if (stnm == '浮桥河水库') {
setShowdsy(1) setShowdsy(1)
@ -1278,7 +1285,11 @@ useEffect(() => {
}); });
} }
} }
}}>{row.dm}</div> }}
>
<DpTableCell align="center">
<div className="table-ellipsis cursor-pointer"
>{row.dm}</div>
</DpTableCell> </DpTableCell>
<DpTableCell align="center">{row.cd_nm}</DpTableCell> <DpTableCell align="center">{row.cd_nm}</DpTableCell>
<DpTableCell align="center">{row.value}</DpTableCell> <DpTableCell align="center">{row.value}</DpTableCell>
@ -1300,9 +1311,9 @@ useEffect(() => {
</TableHead> </TableHead>
<TableBody> <TableBody>
{data3.map((row, index) => ( {data3.map((row, index) => (
<DpTableRow key={row.stcd}> <DpTableRow
<DpTableCell align="center"> key={row.stcd}
<div className="table-ellipsis cursor-pointer" onClick={() => { onClick={() => {
const { lgtd, lttd } = row; const { lgtd, lttd } = row;
setShowdsl(1) setShowdsl(1)
if (row.cd == 1) { if (row.cd == 1) {
@ -1316,7 +1327,11 @@ useEffect(() => {
} }
} }
}}>{row.cd_nm}</div> }}
>
<DpTableCell align="center">
<div className="table-ellipsis cursor-pointer"
>{row.cd_nm}</div>
</DpTableCell> </DpTableCell>
{/* <DpTableCell align="center">{row.cd_nm}</DpTableCell> */} {/* <DpTableCell align="center">{row.cd_nm}</DpTableCell> */}
<DpTableCell align="center">{row.value}</DpTableCell> <DpTableCell align="center">{row.value}</DpTableCell>
@ -1338,13 +1353,12 @@ useEffect(() => {
</TableHead> </TableHead>
<TableBody> <TableBody>
{data4.map((row, index) => ( {data4.map((row, index) => (
<DpTableRow key={row.stcd}> <DpTableRow
<DpTableCell align="center"> key={row.stcd}
<div className="table-ellipsis cursor-pointer" onClick={() => { onClick={() => {
const { lgtd, lttd } = row; const { lgtd, lttd } = row;
setShowdby(1) setShowdby(1)
if (row.cd == '0EA5DE') { if (row.cd == '0AB3ED') {
if (lgtd && lttd) { if (lgtd && lttd) {
dispatch.runtime.setCameraTarget({ dispatch.runtime.setCameraTarget({
center: [lgtd, lttd], center: [lgtd, lttd],
@ -1354,7 +1368,11 @@ useEffect(() => {
}); });
} }
} }
}}>{row?.children?.[0]?.cd}</div> }}
>
<DpTableCell align="center">
<div className="table-ellipsis cursor-pointer"
>{row?.children?.[0]?.cd}</div>
</DpTableCell> </DpTableCell>
{/* <DpTableCell align="center">{row?.children?.[0]?.cd}</DpTableCell> */} {/* <DpTableCell align="center">{row?.children?.[0]?.cd}</DpTableCell> */}
<DpTableCell align="center">{row?.children?.[0]?.termite_status === 'y' ? <span style={{ color: '#ff4d4f', display: 'flex', alignItems: 'center' }}><div style={{ width: '10px', height: '10px', borderRadius: '10px', marginRight: '7px', background: '#ff4d4f' }}></div></span> : <span style={{ color: '#3af6cd', display: 'flex', alignItems: 'center' }}><div style={{ width: '10px', height: '10px', borderRadius: '10px', marginRight: '7px', background: '#3af6cd' }}></div></span>}</DpTableCell> <DpTableCell align="center">{row?.children?.[0]?.termite_status === 'y' ? <span style={{ color: '#ff4d4f', display: 'flex', alignItems: 'center' }}><div style={{ width: '10px', height: '10px', borderRadius: '10px', marginRight: '7px', background: '#ff4d4f' }}></div></span> : <span style={{ color: '#3af6cd', display: 'flex', alignItems: 'center' }}><div style={{ width: '10px', height: '10px', borderRadius: '10px', marginRight: '7px', background: '#3af6cd' }}></div></span>}</DpTableCell>

View File

@ -194,12 +194,12 @@ function ARzSk({data}) {
{ {
data.map((tableRow,index)=> data.map((tableRow,index)=>
<TableBody> <TableBody>
<DpTableRow key={tableRow.stcd}> <DpTableRow key={tableRow.stcd} onClick={()=>{
<DpTableCell align="center" >
<div className="table-ellipsis cursor-pointer" onClick={()=>{
flyTo(tableRow) flyTo(tableRow)
setSkLayer([tableRow]) setSkLayer([tableRow])
}}> }}>
<DpTableCell align="center" >
<div className="table-ellipsis cursor-pointer" >
{tableRow.stnm} {tableRow.stnm}
</div> </div>
</DpTableCell> </DpTableCell>

View File

@ -591,7 +591,8 @@ const data3 = [
"lgtd": 112.17597 + 2.9619, "lgtd": 112.17597 + 2.9619,
}, },
{ water:12, {
water: 12,
type: '工业', type: '工业',
stcd: 42000001, stcd: 42000001,
time: '2025-05-26 10:00', time: '2025-05-26 10:00',
@ -1265,10 +1266,9 @@ function DrpReal({ style }) {
</TableHead> </TableHead>
<TableBody> <TableBody>
{drpData.map((row, index) => ( {drpData.map((row, index) => (
<DpTableRow key={row.stcd}> <DpTableRow
{/* <DpTableCell align="center">{index+1}</DpTableCell> */} key={row.stcd}
<DpTableCell component="th" scope="row"> onClick={() => {
<div className="table-ellipsis cursor-pointer" onClick={() => {
const { lgtd, lttd } = row; const { lgtd, lttd } = row;
if (row.stnm == '浮桥河') { if (row.stnm == '浮桥河') {
setShowdDrp(1) setShowdDrp(1)
@ -1282,7 +1282,11 @@ function DrpReal({ style }) {
}); });
} }
} }
}}>{row.stnm}</div> }}
>
{/* <DpTableCell align="center">{index+1}</DpTableCell> */}
<DpTableCell component="th" scope="row">
<div className="table-ellipsis cursor-pointer">{row.stnm}</div>
</DpTableCell> </DpTableCell>
<DpTableCell align="center">{(row.h1).toFixed(2)}</DpTableCell> <DpTableCell align="center">{(row.h1).toFixed(2)}</DpTableCell>
<DpTableCell align="center">{row.tm.slice(0, 10)}</DpTableCell> <DpTableCell align="center">{row.tm.slice(0, 10)}</DpTableCell>

View File

@ -8,7 +8,7 @@ function Page({ type,name,num1,num2,skType,setSkType }) {
<img src={`${process.env.PUBLIC_URL}/assets/icon/大型水库.svg`} width={15} height={15} alt=""/> <img src={`${process.env.PUBLIC_URL}/assets/icon/大型水库.svg`} width={15} height={15} alt=""/>
<div style={{flex:1,paddingLeft:'0.8rem',marginBottom:'-0.1rem'}}>{name}</div> <div style={{flex:1,paddingLeft:'0.8rem',marginBottom:'-0.1rem'}}>{name}</div>
<div style={{marginBottom:'-0.1rem'}}>{num1}</div> <div style={{marginBottom:'-0.1rem'}}>{num1}</div>
<div style={{margin:'0 1rem -0.1rem 1rem'}}>{num2}亿m³</div> <div style={{ margin: '0 1rem -0.1rem 1rem' }}>{num2}{(type !=1 && type != 2) ?"万m³":"亿m³"}</div>
<img src={`${process.env.PUBLIC_URL}/assets/icon/${skType===type?'收起':'展开'}.png`} style={{cursor:'pointer'}} width={20} alt="" /> <img src={`${process.env.PUBLIC_URL}/assets/icon/${skType===type?'收起':'展开'}.png`} style={{cursor:'pointer'}} width={20} alt="" />
</div> </div>
) )

View File

@ -39,10 +39,10 @@ function DrpReal({ style }) {
}, [skData, skType, sort, sort1]) }, [skData, skType, sort, sort1])
const skTypeObj = [ const skTypeObj = [
{ type: '1', name: '大型水库', num1: 3, num2: 7.9316 },//8.735 { type: '1', name: '大型水库', num1: 3, num2: 7.93,num3:8.73 },//8.735
{ type: '2', name: '中型水库', num1: 7, num2: 1.627 }, { type: '2', name: '中型水库', num1: 7, num2: 0.51,num3:1.62 },
{ type: '3', name: '小(1)型水库', num1: 44, num2: 1.627 }, { type: '3', name: '小(1)型水库', num1: 44, num2: 31.54,num3:52.61 },
{ type: '4', name: '小(2)型水库', num1: 207, num2: 8.735 }, { type: '4', name: '小(2)型水库', num1: 207, num2: 10.11,num3:16.91 },
] ]
useEffect(() => { useEffect(() => {
@ -136,7 +136,7 @@ function DrpReal({ style }) {
{ {
skTypeObj.map((item) => skTypeObj.map((item) =>
(<> (<>
<CollapsePage type={item.type} name={item.name} num1={item.num1} num2={item.num2} skType={skType} setSkType={setSkType} /> <CollapsePage type={item.type} name={item.name} num1={item.num1} num2={`${item.num2}/${item.num3}`} skType={skType} setSkType={setSkType} />
<Collapse in={skType === item.type} timeout="auto" unmountOnExit> <Collapse in={skType === item.type} timeout="auto" unmountOnExit>
<TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}> <TableContainer style={{ maxHeight: 'calc( 100vh - 28.2rem )' }}>
<Table size="small" stickyHeader> <Table size="small" stickyHeader>