Compare commits
No commits in common. "c5f6edd9eaee5787f194aed09b043055303ffe1c" and "74062c8022ae39e4cfdd5434b012aea6095fdacf" have entirely different histories.
c5f6edd9ea
...
74062c8022
|
|
@ -13,12 +13,12 @@ import { Rnd } from "react-rnd"
|
||||||
|
|
||||||
export default function Xmzlmb() {
|
export default function Xmzlmb() {
|
||||||
const typeName = {
|
const typeName = {
|
||||||
'ZB0+130': '1',
|
'大坝B0+130': '1',
|
||||||
'ZB0+132': '2',
|
'大坝B0+132': '2',
|
||||||
'ZB0+250': '3',
|
'大坝B0+250': '3',
|
||||||
'ZB0+252': '4',
|
'大坝B0+252': '4',
|
||||||
'ZB0+370': '5',
|
'大坝B0+370': '5',
|
||||||
'ZB0+372': '6',
|
'大坝B0+372': '6',
|
||||||
}
|
}
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const [code, setCode] = useState([])
|
const [code, setCode] = useState([])
|
||||||
|
|
@ -125,9 +125,7 @@ export default function Xmzlmb() {
|
||||||
const getDmList = async () => {
|
const getDmList = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.sycx.list)
|
||||||
const newData = res.data.map(s => ({ projNm: s.profileName, id: s.profileCode }))
|
setDmList(res.data.map(s => ({ projNm: s.profileName, id: s.profileCode })));
|
||||||
const filterData = newData.filter(item => item?.projNm?.split('+')[0] == 'ZB0')
|
|
||||||
setDmList(filterData);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -188,9 +186,9 @@ export default function Xmzlmb() {
|
||||||
}
|
}
|
||||||
if (dmList.length > 0 && code.length) {
|
if (dmList.length > 0 && code.length) {
|
||||||
let name = dmList.find(s => s.id == code)?.projNm
|
let name = dmList.find(s => s.id == code)?.projNm
|
||||||
let type = (name == "ZB0+130" || name == "ZB0+132") ? "1" :
|
let type = (name == "大坝B0+130" || name == "大坝B0+132") ? "1" :
|
||||||
(name == "ZB0+250" || name == "ZB0+252") ? "2" :
|
(name == "大坝B0+250" || name == "大坝B0+252") ? "2" :
|
||||||
(name == "ZB0+370" || name == "ZB0+372") ? "3" : '';
|
(name == "大坝B0+370" || name == "大坝B0+372") ? "3" : '';
|
||||||
let type1 = typeName[name];
|
let type1 = typeName[name];
|
||||||
setDbType(type)
|
setDbType(type)
|
||||||
setDbType1(type1)
|
setDbType1(type1)
|
||||||
|
|
|
||||||
|
|
@ -84,9 +84,9 @@ const Page = () => {
|
||||||
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.stationCode]: c.value || '-',
|
[c.stationCode]: c.value || '-',
|
||||||
[`X_${c.stationCode}`]:c.x ,
|
[`X_${c.stationCode}`]:c.x || '-',
|
||||||
[`Y_${c.stationCode}`]:c.y ,
|
[`Y_${c.stationCode}`]:c.y || '-',
|
||||||
[`H_${c.stationCode}`]:c.h ,
|
[`H_${c.stationCode}`]:c.h || '-',
|
||||||
tm: c.tm,
|
tm: c.tm,
|
||||||
})))
|
})))
|
||||||
return {
|
return {
|
||||||
|
|
@ -136,18 +136,17 @@ const Page = () => {
|
||||||
const getTable2Data = async (params) => {
|
const getTable2Data = async (params) => {
|
||||||
try {
|
try {
|
||||||
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndwytjb.list1, params)
|
const res = await httppost2(apiurl.gcaqjc.sjtjcx.ndwytjb.list1, params)
|
||||||
setTable2Data(res.data)
|
const list = []
|
||||||
// const list = []
|
for(let i=0; i<24*3; i++){
|
||||||
// for(let i=0; i<24*3; i++){
|
list.push({
|
||||||
// list.push({
|
maxValue:'',
|
||||||
// maxValue:'',
|
maxTm:'',
|
||||||
// maxTm:'',
|
minValue:'',
|
||||||
// minValue:'',
|
minTm:'',
|
||||||
// minTm:'',
|
diff:'',
|
||||||
// diff:'',
|
})
|
||||||
// })
|
}
|
||||||
// }
|
setTable2Data(list)
|
||||||
// setTable2Data(list)
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -167,11 +166,11 @@ const Page = () => {
|
||||||
if (trData && trData?.length > 0) {
|
if (trData && trData?.length > 0) {
|
||||||
let params = {
|
let params = {
|
||||||
...searchVal,
|
...searchVal,
|
||||||
stationCodes:[trData.find(s => s.stationCode == wyObj.wy)?.stationCode],
|
stationCodes:trData.map(s => s.stationCode),
|
||||||
}
|
}
|
||||||
getTable2Data(params)
|
getTable2Data(params)
|
||||||
}
|
}
|
||||||
}, [trData,wyObj])
|
}, [trData])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDmTree()
|
getDmTree()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue