Compare commits

...

4 Commits

Author SHA1 Message Date
秦子超 7688c59037 处理接口返回超长问题 2025-09-24 09:37:45 +08:00
李神峰 e8b2efdb0d feat(): 浸润线数据调整 2025-09-22 17:41:10 +08:00
李神峰 0bbed88301 fix(): 删除水库代码 2025-09-22 09:27:56 +08:00
秦子超 7f18c98b8e 渗压监测修改 2025-09-19 17:26:32 +08:00
4 changed files with 26 additions and 12 deletions

View File

@ -5,12 +5,12 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
type == '1' ? 59 : 70;
const yMax = type == "3" ? 129 : type == "2" ? 117
: type == "1" ? 118 : 150;
const type1 = ["SY01", "SY04", "SY07", "SY16"];
const type2 = ["SY10", "SY13"];
const type3 = ["SY02", "SY05", "SY08", "SY17"];
const type4 = ["SY11", "SY14"];
const type5 = ["SY03", "SY06", "SY09"];
const type6 = ["SY12", "SY15"];
const type1 = ["UPD1", "UPD4", "UPD10", "UPD16"];
const type2 = ["UPD7", "UPD13"];
const type3 = ["UPD2", "UPD5", "UPD8", "UPD17"];
const type4 = ["UPD11", "UPD14"];
const type5 = ["UPD3", "UPD6", "UPD9"];
const type6 = ["UPD12", "UPD15"];
const alltype = typeName == "1" ? type1 :
typeName == "2" ? type2 :
typeName == "3" ? type3 :

View File

@ -56,12 +56,19 @@ const Page = () => {
}, [dmName,trData])
const getTableData = async (params) => {
setLoading(true)
try {
setLoading(true)
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndsytjb.page, params)
setLoading(false)
const { code, data } = res
if(code!==200 || data.length>10000){
setDataSource([])
setLoading(false)
console.log('请求失败或者数组超长,data长度'+data?.length||0);
return
}
console.log('开始计算-------');
let newArr = [];
let newData = res.data?.map((s, i) => {
let newData = data?.map((s, i) => {
newArr.push(s.list?.map(c => ({
[c.stationCode]: c.value || '-',
tm:c.tm
@ -89,7 +96,9 @@ const Page = () => {
}
})
setDataSource(result)
setLoading(false)
} catch (error) {
setLoading(false)
console.log(error);
}
}
@ -110,7 +119,12 @@ const Page = () => {
const getTable2Data = async (params) => {
try {
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndsytjb.list1, params)
setTable2Data(res.data)
const { code, data } = res
if(code!==200){
setTable2Data([])
return
}
setTable2Data(data||[])
} catch (error) {
console.log(error);
}

View File

@ -14,7 +14,7 @@ const Page = () => {
const [searchVal, setSearchVal] = useState(false)
const columns = [
{ title: '序号', key: 'inx', dataIndex: 'inx', width: 60, align:"center" },
{ title: '水库代码', key: 'rscd', dataIndex: 'rscd', width: 200, ellipsis: true, align:"center" },
// { title: '水库代码', key: 'rscd', dataIndex: 'rscd', width: 200, ellipsis: true, align:"center" },
{ title: '水工建筑物编号', key: 'hycncd', dataIndex: 'hycncd', width: 200, align:"center"},
{ title: '测点编号', key: 'mpcd', dataIndex: 'mpcd', width: 200, align:"center"},
{ title: '测量时间', key: 'mstm', dataIndex: 'mstm', width: 200, align:"center"},

View File

@ -159,7 +159,7 @@ const ToolBar = ({ setSearchVal, onSave, storeData,role }) => {
style={{ width: "150px" }}
options={dmList}
onChange={(v)=>{
const dvcd = codeList.filter(o=>dmCode?o.profileCode===dmCode:true)?.[0]?.value
const dvcd = codeList.filter(o=>o.profileCode===v)?.[0]?.value
form.setFieldValue('dvcd',dvcd)
setDmCode(v)
}}