feat(): 渗压、渗流和位移数据对接

qzc-dev
李神峰 2025-09-02 17:27:53 +08:00
parent 46df02e1c5
commit 3a4153f941
6 changed files with 24 additions and 16 deletions

View File

@ -29,11 +29,11 @@ const Page = () => {
] ]
}else{ }else{
return [ return [
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 80, ellipsis: true }, { title: '监测点', key: 'cd', dataIndex: 'cd',align: "center",width: 80, ellipsis: true },
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> }, { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> },
{ title: <div><div>X方向</div><div>(mm)</div></div>, key: 'x', dataIndex: 'x',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>e方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> },
{ title: <div><div>Y方向</div><div>(mm)</div></div>, key: 'y', dataIndex: 'y',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>n方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> },
{ title: <div><div>H方向</div><div>(mm)</div></div>, key: 'h', dataIndex: 'h',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>u方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> },
] ]
} }
}, [checked]); }, [checked]);
@ -89,7 +89,10 @@ const Page = () => {
<Table rowKey="stationCode" <Table rowKey="stationCode"
sticky sticky
columns={columns} columns={columns}
pagination={false} pagination={checked == '位移监测' ?{
pageSize: 100,
showSizeChanger: true,
pageSizeOptions: [ '100', '200']}:false}
dataSource={tableData} dataSource={tableData}
scroll={{ y: "300px"}} scroll={{ y: "300px"}}
onRow={ onRow={

View File

@ -44,11 +44,11 @@ export default function Page({isHome}) {
] ]
const columnsWy = [ const columnsWy = [
{ title: '监测点', key: 'stationCode', dataIndex: 'stationCode',align: "center",width: 80, ellipsis: true }, { title: '监测点', key: 'cd', dataIndex: 'cd',align: "center",width: 80, ellipsis: true },
{ title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> }, { title: '监测时间', key: 'tm', dataIndex: 'tm',align: "center",width: 80, ellipsis: true, render:(v,row)=><div style={{color:row.flag===1?'red':'#3B4859'}}><div>{v?.slice(5,10)}</div><div>{v?.slice(11,16)}</div></div> },
{ title: <div><div>X方向</div><div>(mm)</div></div>, key: 'x', dataIndex: 'x',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>e方向</div><div>(mm)</div></div>, key: 'de', dataIndex: 'de',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.xstatus===1?'red':'#3B4859'}}>{v}</div> },
{ title: <div><div>Y方向</div><div>(mm)</div></div>, key: 'y', dataIndex: 'y',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>n方向</div><div>(mm)</div></div>, key: 'dn', dataIndex: 'dn',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.ystatus===1?'red':'#3B4859'}}>{v}</div> },
{ title: <div><div>H方向</div><div>(mm)</div></div>, key: 'h', dataIndex: 'h',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> }, { title: <div><div>u方向</div><div>(mm)</div></div>, key: 'du', dataIndex: 'du',align: "center", ellipsis: true, render:(v,row)=><div style={{color:row.hstatus===1?'red':'#3B4859'}}>{v}</div> },
] ]
@ -194,8 +194,13 @@ export default function Page({isHome}) {
<Table rowKey="stationCode" <Table rowKey="stationCode"
sticky sticky
columns={columnsWy} columns={columnsWy}
pagination={false} // pagination={false}
dataSource={wyList} dataSource={wyList}
pagination={{
pageSize: 100,
showSizeChanger: true,
pageSizeOptions: [ '100', '200'],
}}
scroll={{ y: "650px"}} scroll={{ y: "650px"}}
onRow={ onRow={
(data)=>({ (data)=>({

View File

@ -70,7 +70,7 @@ const Page = () => {
let newArr = []; let newArr = [];
let newData = res.data?.map((s, i) => { let newData = res.data?.map((s, i) => {
newArr.push(s.list?.map(c => ({ newArr.push(s.list?.map(c => ({
[c.stationCode]: c.value || '-', [c.stationCode]: (c.value || c.value == 0) ? c.value : '-',
tm:c.tm tm:c.tm
}))) })))
return { return {

View File

@ -83,7 +83,7 @@ const Page = () => {
let newArr = []; let newArr = [];
let newData = res.data?.map((s, i) => { let newData = res.data?.map((s, i) => {
newArr.push(s.list?.map((c, i) => ({ newArr.push(s.list?.map((c, i) => ({
[c.cd]: c.value || '-', [c.cd]: (c.value || c.value == 0) ? c.value : '-',
[`e_${c.cd}`]:c.de , [`e_${c.cd}`]:c.de ,
[`n_${c.cd}`]:c.dn , [`n_${c.cd}`]:c.dn ,
[`u_${c.cd}`]:c.du , [`u_${c.cd}`]:c.du ,
@ -171,7 +171,7 @@ const Page = () => {
} }
getTable2Data(params) getTable2Data(params)
} }
}, [trData,wyObj]) }, [trData,wyObj,searchVal])
useEffect(() => { useEffect(() => {
getDmTree() getDmTree()

View File

@ -83,8 +83,8 @@ const Page = () => {
}, },
{ {
title: '测点编号', title: '测点编号',
dataIndex: 'mnNo', dataIndex: 'order',
key: 'mnNo', key: 'order',
width: 120, width: 120,
align:'center' align:'center'
}, },

View File

@ -37,7 +37,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData, role }) => {
style={{ width: "240px" }} style={{ width: "240px" }}
/> />
</Form.Item> </Form.Item>
<Form.Item label="测点编号" name="mnNo"> <Form.Item label="测点编号" name="order">
<Input <Input
allowClear allowClear
style={{ width: "240px" }} style={{ width: "240px" }}