qzc修改

qzc-dev-demo
秦子超 2025-04-08 15:40:03 +08:00
parent 1326912f2f
commit 29393746a3
9 changed files with 39 additions and 97 deletions

Binary file not shown.

View File

@ -66,7 +66,7 @@ function ShuikuPop({ id, data, dispatch }) {
<div className="normalModalStyle_title" style={{marginBottom:0}}> <div className="normalModalStyle_title" style={{marginBottom:0}}>
<div className="normalModalStyle_title_icon"></div> <div className="normalModalStyle_title_icon"></div>
<span>{data?.name}&emsp;</span> <span>{data?.name}&emsp;</span>
{data?.sttp && {(data?.sttp && data?.stnm==='檀树岗') &&
<span style={ <span style={
{ {
display:"inline-block", display:"inline-block",
@ -88,17 +88,12 @@ function ShuikuPop({ id, data, dispatch }) {
<Tabs.TabPane tab="数据查询" key="2"> <Tabs.TabPane tab="数据查询" key="2">
<Sksjcx record={data}/> <Sksjcx record={data}/>
</Tabs.TabPane> </Tabs.TabPane>
{ {/* <Tabs.TabPane tab="" key="3">
data.id!=="61610701"? <Txjc record={data}/>
<> </Tabs.TabPane>
<Tabs.TabPane tab="图像监测" key="3"> <Tabs.TabPane tab="视频监测" key="4">
<Txjc record={data}/> <Spjc record={data}/>
</Tabs.TabPane> </Tabs.TabPane> */}
<Tabs.TabPane tab="视频监测" key="4">
<Spjc record={data}/>
</Tabs.TabPane>
</>:null
}
</Tabs> </Tabs>
</div> </div>
</div> </div>

View File

@ -7,8 +7,16 @@ const Tabledata = ({tableData}) => {
const columns = [ const columns = [
{ title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1}, { title: '序号', key: '', dataIndex: '', align: 'center',width:'40px',render:(a,b,c)=>c+1},
{ title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> }, { title: '数据时间', key: 'createTime', dataIndex: 'createTime', align: 'center',width:'200px',render: (rec) => <span>{rec ?? "-"}</span> },
{ title: '湿度', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{rec ?? "-"}</span> }, { title: '湿度', key: 'val', dataIndex: 'val', align: 'center',render: (rec) => <span>{getVal(rec)}</span> },
]; ];
const getVal = (v)=>{
if(typeof v === 'number'){
return v.toFixed(2)
}else{
return '-'
}
}
return ( return (
<> <>

View File

@ -41,13 +41,13 @@ export default function drpOption(data,yjData) {
// 显示图例 // 显示图例
show: true, show: true,
// 图例的位置 // 图例的位置
data: ["流量"], data: ["湿度"],
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
data: data.map(o => o.createTime), data: data.map(o => o.createTime),
inverse: false, inverse: true,
splitLine: { splitLine: {
show: false show: false
}, },
@ -73,7 +73,7 @@ export default function drpOption(data,yjData) {
// gridIndex: 1, // gridIndex: 1,
type: 'value', type: 'value',
position: 'left', position: 'left',
name: "流量(L/s)", name: "湿度(RH)",
nameTextStyle: { nameTextStyle: {
padding: [0, 0, 10, 10], padding: [0, 0, 10, 10],
color:'#333333', color:'#333333',
@ -89,7 +89,8 @@ export default function drpOption(data,yjData) {
}, },
axisLabel: { axisLabel: {
color: '#333', color: '#333',
fontSize: 12, fontSize: 12,
formatter: val => val+'%'
}, },
axisLine: { axisLine: {
show: false show: false
@ -144,13 +145,13 @@ export default function drpOption(data,yjData) {
{ {
// xAxisIndex: 1, // xAxisIndex: 1,
// yAxisIndex: 0, // yAxisIndex: 0,
name: '流量', name: '湿度',
type: 'line', type: 'line',
color: "#d6eaec", color: "#d6eaec",
lineStyle: { lineStyle: {
// type: "dashed" // type: "dashed"
}, },
data: data.map(o => o.val), data: data.map(o => o.val?.toFixed(2)),
symbol: 'none', // 设置标记点为'none',即去掉圆点 symbol: 'none', // 设置标记点为'none',即去掉圆点
smooth: 0.5 smooth: 0.5
}, },

View File

@ -57,7 +57,7 @@ function ShenLiu({ id, data, dispatch, onCancel }) {
</div> </div>
<div style={{padding:'0 20px'}}> <div style={{padding:'0 20px'}}>
<ToolBar search={(tms)=>getData(tms,data.stationCode)}/> <ToolBar search={(tms)=>getData(tms,data.stcd)}/>
</div> </div>
<div className='homeModal1_content'> <div className='homeModal1_content'>
<div className='homeModal1_content_lf'> <div className='homeModal1_content_lf'>

View File

@ -183,11 +183,11 @@ const HomePage = ({showPanels}) => {
} }
</Collapse> </Collapse>
</div> </div>
{ {/* {
(checkedObj.label === '预警'||checkedObj.label === '雨情')? (checkedObj.label === '预警'||checkedObj.label === '雨情')?
<div className='homePage_centerBox'><RangePicker showTime value={tms} disabled/></div> <div className='homePage_centerBox'><RangePicker showTime value={tms} disabled/></div>
:null :null
} } */}
{ {
checkedObj.labelRight? checkedObj.labelRight?
<div className='homePage_rightBox' style={{display:!showPanels?'none':'block',padding:showTable?'10px':'0px'}}> <div className='homePage_rightBox' style={{display:!showPanels?'none':'block',padding:showTable?'10px':'0px'}}>

View File

@ -64,7 +64,7 @@ const Page = () => {
<div>坝顶宽度(m):</div> <div>坝顶宽度(m):</div>
<div>{tableData.damTopWid}</div> <div>{tableData.damTopWid}</div>
</dit> </dit>
<dit className='home_shuizhi_item2'> {/* <dit className='home_shuizhi_item2'>
<div>防浪墙顶高程(m):</div> <div>防浪墙顶高程(m):</div>
<div>{tableData.damWaveWall}</div> <div>{tableData.damWaveWall}</div>
</dit> </dit>
@ -79,7 +79,7 @@ const Page = () => {
<dit className='home_shuizhi_item2'> <dit className='home_shuizhi_item2'>
<div>蓄水日期:</div> <div>蓄水日期:</div>
<div>{tableData?.storageDate?.slice(0,10)}</div> <div>{tableData?.storageDate?.slice(0,10)}</div>
</dit> </dit> */}
{/* <dit className='home_shuizhi_item2'> {/* <dit className='home_shuizhi_item2'>
<div>图片资料</div> <div>图片资料</div>
<div></div> <div></div>

View File

@ -7,78 +7,13 @@ import MyImg from './myImg'
import Ykqk from './item_shuiku/yhqk' 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": "42112230001",
"rvCode": null,
"status": 1,
"agreement": null,
"simCard": null,
"bdCard": null,
"v": 104.1
}
const Page = () => { const Page = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
const [ checked, setChecked ] = useState(0) const [ checked, setChecked ] = useState(0)
const [data,setData] = useState([]) const [data,setData] = useState([])
console.log('aaa',data); console.log('data',data);
useEffect(()=>{ useEffect(()=>{
dispatch.map.setLayerVisible({ ShuiKuLayer: true }) dispatch.map.setLayerVisible({ ShuiKuLayer: true })
dispatch.map.setLayerVisible({ HdswLayer: true }) dispatch.map.setLayerVisible({ HdswLayer: true })
@ -90,20 +25,23 @@ const Page = () => {
},[]) },[])
const getData = async (params) => { const getData = async (params) => {
const data1 = await reservoirlist(params) const data = await reservoirlist(params) || []
setData(data1) const list = [...data.filter(o=>o.stnm==='檀树岗(新)'),...data.filter(o=>o.stnm!=='檀树岗(新)')]
setData(list)
} }
const getShuiKu = ()=>{ const getShuiKu = ()=>{
SkRealPromiseWX.get().then((res) => { SkRealPromiseWX.get().then((res) => {
const list = [...res,sj].map((i)=>{ const list = [...res].map((i)=>{
return { return {
id : i.stcd, id : i.stcd,
name: i.stnm, name: i.stnm,
...i ...i
} }
}) })
const data = list[checked] const list2 = [...list.filter(o=>o.stnm==='檀树岗(新)'),...list.filter(o=>o.stnm!=='檀树岗(新)')]
console.log('res',list2);
const data = list2[checked]
dispatch.runtime.setFeaturePop({ dispatch.runtime.setFeaturePop({
id: data.id, id: data.id,
type: 'shuiku', type: 'shuiku',
@ -143,7 +81,7 @@ const Page = () => {
溢洪情况 溢洪情况
</div> </div>
</div> </div>
<Ykqk record={data[checked]}/> <Ykqk record={{...data[checked]}}/>
</> </>
) )
} }

View File

@ -20,7 +20,7 @@ const Page = ({mySetTms,show}) => {
]) ])
const columns = [ const columns = [
{ title: '站名', key: 'stnm', dataIndex: 'stnm',align: "center", ellipsis: true }, { title: '站名', key: 'stnm', dataIndex: 'stnm',align: "center", ellipsis: true },
{ title: '时段雨量', key: 'drp', dataIndex: 'drp',align: "center", render:(v)=>v===null?'-':v }, { title: '时段雨量(mm)', key: 'drp', dataIndex: 'drp',align: "center", render:(v)=>v===null?'-':v },
]; ];