Compare commits
4 Commits
77a3dd1b50
...
7688c59037
| Author | SHA1 | Date |
|---|---|---|
|
|
7688c59037 | |
|
|
e8b2efdb0d | |
|
|
0bbed88301 | |
|
|
7f18c98b8e |
|
|
@ -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 :
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"},
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue