Compare commits
7 Commits
c4e0facb8a
...
1bb1ead94a
| Author | SHA1 | Date |
|---|---|---|
|
|
1bb1ead94a | |
|
|
30a0006e9f | |
|
|
7e1dbd444c | |
|
|
b8c0f01cfb | |
|
|
a9cde38875 | |
|
|
94999d0e80 | |
|
|
a4e130cf4e |
Binary file not shown.
|
After Width: | Height: | Size: 181 KiB |
|
|
@ -96,7 +96,7 @@ export default class ShuiKuLayer extends BaseLayer {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
const list = data.filter(o=>o.stcd==="61610700" || o.stcd==="10818")
|
const list = data.filter(o=>o.stcd==="61610700" || o.stcd==="10852")
|
||||||
.map((i) => {
|
.map((i) => {
|
||||||
return {
|
return {
|
||||||
id : i.stcd,
|
id : i.stcd,
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,6 @@ const HomePage = ({ showPanels, mode }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const clickItem = (item) => {
|
const clickItem = (item) => {
|
||||||
debugger
|
|
||||||
// 业务规则库
|
// 业务规则库
|
||||||
if (item.type == '业务规则库' || item.type == '调度方案库' || item.type == '工程安全知识库') {
|
if (item.type == '业务规则库' || item.type == '调度方案库' || item.type == '工程安全知识库') {
|
||||||
regularOpen(item)
|
regularOpen(item)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const Page = () => {
|
||||||
const getData = async (params) => {
|
const getData = async (params) => {
|
||||||
const data = await reservoirlist(params) || []
|
const data = await reservoirlist(params) || []
|
||||||
// const list = [...data.filter(o=>o.stnm==='檀树岗(新)'),...data.filter(o=>o.stnm!=='檀树岗(新)')]
|
// const list = [...data.filter(o=>o.stnm==='檀树岗(新)'),...data.filter(o=>o.stnm!=='檀树岗(新)')]
|
||||||
const list = [...data.filter(o=>o.stcd==="61610700"),...data.filter(o=>o.stcd==="10818")]
|
const list = [...data.filter(o=>o.stcd==="61610700"),...data.filter(o=>o.stcd==="10852")]
|
||||||
setData(list)
|
setData(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// const list2 = [...list.filter(o=>o.stnm==='檀树岗(新)'),...list.filter(o=>o.stnm!=='檀树岗(新)')]
|
// const list2 = [...list.filter(o=>o.stnm==='檀树岗(新)'),...list.filter(o=>o.stnm!=='檀树岗(新)')]
|
||||||
const list2 = [...list.filter(o=>o.stcd==="61610700"),...list.filter(o=>o.stcd==="10818")]
|
const list2 = [...list.filter(o=>o.stcd==="61610700"),...list.filter(o=>o.stcd==="10852")]
|
||||||
console.log('res',list2);
|
console.log('res',list2);
|
||||||
const data = list2[checked]
|
const data = list2[checked]
|
||||||
dispatch.runtime.setFeaturePop({
|
dispatch.runtime.setFeaturePop({
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 618 KiB After Width: | Height: | Size: 618 KiB |
|
|
@ -19,6 +19,8 @@ export default function Xmzlmb() {
|
||||||
'ZB0+252': '4',
|
'ZB0+252': '4',
|
||||||
'ZB0+370': '5',
|
'ZB0+370': '5',
|
||||||
'ZB0+372': '6',
|
'ZB0+372': '6',
|
||||||
|
'FB0+010': '7',
|
||||||
|
'FB0+030': '8',
|
||||||
}
|
}
|
||||||
const role = useSelector(state => state.auth.role);
|
const role = useSelector(state => state.auth.role);
|
||||||
const [code, setCode] = useState([])
|
const [code, setCode] = useState([])
|
||||||
|
|
@ -126,8 +128,18 @@ export default function Xmzlmb() {
|
||||||
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 }))
|
const newData = res.data.map(s => ({ projNm: s.profileName, id: s.profileCode }))
|
||||||
const filterData = newData.filter(item => item?.projNm?.split('+')[0] == 'ZB0')
|
const filterData = newData.filter(item => (item?.projNm?.split('+')[0] == 'ZB0' || item?.projNm?.split('+')[0] == 'FB0'));
|
||||||
setDmList(filterData);
|
const sortedData = filterData.sort((a, b) => {
|
||||||
|
// 判断a、b是否为ZB0开头
|
||||||
|
const isAZB0 = a.projNm.startsWith('ZB0');
|
||||||
|
const isBZB0 = b.projNm.startsWith('ZB0');
|
||||||
|
|
||||||
|
// 规则:ZB0开头的排前面;同类型(都ZB0/都非ZB0)保持原顺序
|
||||||
|
if (isAZB0 && !isBZB0) return -1; // a是ZB0,b不是 → a在前
|
||||||
|
if (!isAZB0 && isBZB0) return 1; // a不是ZB0,b是 → b在前
|
||||||
|
return 0; // 同类型,保持原始相对顺序
|
||||||
|
});
|
||||||
|
setDmList(sortedData);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
@ -190,7 +202,8 @@ export default function Xmzlmb() {
|
||||||
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 == "ZB0+130" || name == "ZB0+132") ? "1" :
|
||||||
(name == "ZB0+250" || name == "ZB0+252") ? "2" :
|
(name == "ZB0+250" || name == "ZB0+252") ? "2" :
|
||||||
(name == "ZB0+370" || name == "ZB0+372") ? "3" : '';
|
(name == "ZB0+370" || name == "ZB0+372") ? "3" :
|
||||||
|
(name == "FB0+010" || name == "FB0+030") ? '4' : '';
|
||||||
let type1 = typeName[name];
|
let type1 = typeName[name];
|
||||||
setDbType(type)
|
setDbType(type)
|
||||||
setDbType1(type1)
|
setDbType1(type1)
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,44 @@
|
||||||
|
|
||||||
export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
// debugger
|
// debugger
|
||||||
|
console.log("data",data);
|
||||||
|
// data.rz = 112
|
||||||
|
// 根据断面类型确定y轴刻度以及最大和最小
|
||||||
const yMin = type == "3" ? 70 : type == "2" ? 67 :
|
const yMin = type == "3" ? 70 : type == "2" ? 67 :
|
||||||
type == '1' ? 59 : 70;
|
type == '1' ? 59 : 99;
|
||||||
const yMax = type == "3" ? 129 : type == "2" ? 117
|
const yMax = type == "3" ? 129 : type == "2" ? 117
|
||||||
: type == "1" ? 118 : 150;
|
: type == "1" ? 118 : 116;
|
||||||
const type1 = ["UPD1", "UPD4", "UPD10", "UPD16"];
|
|
||||||
const type2 = ["UPD7", "UPD13"];
|
// 断面上的渗压管
|
||||||
|
const type1 = ["UPD1", "UPD4", "UPD7", "UPD16"];
|
||||||
|
const type2 = ["UPD10", "UPD13"];
|
||||||
const type3 = ["UPD2", "UPD5", "UPD8", "UPD17"];
|
const type3 = ["UPD2", "UPD5", "UPD8", "UPD17"];
|
||||||
const type4 = ["UPD11", "UPD14"];
|
const type4 = ["UPD11", "UPD14"];
|
||||||
const type5 = ["UPD3", "UPD6", "UPD9"];
|
const type5 = ["UPD3", "UPD6", "UPD9"];
|
||||||
const type6 = ["UPD12", "UPD15"];
|
const type6 = ["UPD12", "UPD15"];
|
||||||
|
const type7 = ["UPD24", "UPD26","UPD28"]; //UPD24:109.87,UPD26:109.75,UPD28:109.43
|
||||||
|
const type8 = ["UPD25", "UPD27","UPD29"]; //UPD25:109.87,UPD27:109.75,UPD29:109.43
|
||||||
|
|
||||||
// 管底高程
|
// 管底高程
|
||||||
|
|
||||||
const alltype = typeName == "1" ? type1 :
|
const alltype = typeName == "1" ? type1 :
|
||||||
typeName == "2" ? type2 :
|
typeName == "2" ? type2 :
|
||||||
typeName == "3" ? type3 :
|
typeName == "3" ? type3 :
|
||||||
typeName == "4" ? type4 :
|
typeName == "4" ? type4 :
|
||||||
typeName == "5" ? type5 :
|
typeName == "5" ? type5 :
|
||||||
typeName == "6" ? type6 :[]
|
typeName == "6" ? type6 :
|
||||||
;
|
typeName == "7" ? type7 :
|
||||||
|
typeName == "8" ? type8 :
|
||||||
|
[];
|
||||||
|
|
||||||
// 字体颜色
|
// 字体颜色
|
||||||
const textColor = '#666'
|
const textColor = '#666'
|
||||||
const imageUrl370 = `${process.env.PUBLIC_URL}/assets/images/zb370.png `
|
const imageUrl370 = `${process.env.PUBLIC_URL}/assets/images/zb370.png `
|
||||||
const imageUrl250 = `${process.env.PUBLIC_URL}/assets/images/zb250.png `
|
const imageUrl250 = `${process.env.PUBLIC_URL}/assets/images/zb250.png `
|
||||||
const imageUrl130 = `${process.env.PUBLIC_URL}/assets/images/zb130.png `
|
const imageUrl130 = `${process.env.PUBLIC_URL}/assets/images/zb130.png `
|
||||||
|
const imageUrl010 = `${process.env.PUBLIC_URL}/assets/images/fb010.png `
|
||||||
const imageUrl = type == "1" ? imageUrl130 :
|
const imageUrl = type == "1" ? imageUrl130 :
|
||||||
type == "2" ? imageUrl250 :
|
type == "2" ? imageUrl250 :
|
||||||
type == "3" ? imageUrl370 : imageUrl370
|
type == "3" ? imageUrl370 : imageUrl010
|
||||||
;
|
;
|
||||||
const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
|
const rule = `${process.env.PUBLIC_URL}/assets/images/ruler.png `
|
||||||
|
|
||||||
|
|
@ -37,9 +46,9 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
const xValue = type == "3" ? (((data?.rz - 86) + 0.6 * 5) / 0.6) :
|
const xValue = type == "3" ? (((data?.rz - 86) + 0.6 * 5) / 0.6) :
|
||||||
type == "2" ? (((data?.rz - 87) + 0.63 * 7) / 0.63) :
|
type == "2" ? (((data?.rz - 87) + 0.63 * 7) / 0.63) :
|
||||||
type == "1" ? (((data?.rz - 88) + 0.7 * 10) / 0.7) :
|
type == "1" ? (((data?.rz - 88) + 0.7 * 10) / 0.7) :
|
||||||
(((data?.rz - 99) + 1 * 14) / 1)
|
(((data?.rz - 102) + 0.25 * 4) / 0.25)
|
||||||
const rz = data?.rz ?
|
const rz = data?.rz ?
|
||||||
[[xValue, data?.rz], [0, data?.rz],] :
|
[[xValue, data?.rz], [0, data?.rz]] :
|
||||||
[]
|
[]
|
||||||
const rz1 = data?.rz ?
|
const rz1 = data?.rz ?
|
||||||
type == "3" ?
|
type == "3" ?
|
||||||
|
|
@ -50,34 +59,34 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
type == "1" ?
|
type == "1" ?
|
||||||
[[0, 88], [10, 88], [xValue, data?.rz]]
|
[[0, 88], [10, 88], [xValue, data?.rz]]
|
||||||
:
|
:
|
||||||
[[0, 99], [14, 99], [xValue, data?.rz]]
|
[[0, 102], [4, 102], [xValue, data?.rz]]
|
||||||
:
|
: [];
|
||||||
[]
|
|
||||||
// gz1、gz2、gz3、gz4分别为渗压管
|
// gz1、gz2、gz3、gz4分别为渗压管
|
||||||
const gz1 = data[alltype[0]] ?
|
const gz1 = data[alltype[0]] ?
|
||||||
type == "3" ? [[47, typeName =='5' ?76.56:92.18], [47, data[alltype[0]]]] :
|
type == "3" ? [[typeName =='5' ?47:51, typeName =='5' ?76.56:92.18], [typeName =='5' ?47:51, data[alltype[0]]]] :
|
||||||
type == "2" ? [[45.5, typeName =='3' ?76.16:77.18], [45.5, data[alltype[0]]]] :
|
type == "2" ? [[typeName =='3' ? 45.5:50, typeName =='3' ?76.16:77.18], [typeName =='3' ? 45.5:50, data[alltype[0]]]] :
|
||||||
type == "1" ? [[44, typeName =='1' ?79.16:77.18], [44, data[alltype[0]]]] :
|
type == "1" ? [[44, typeName =='1' ?79.16:77.18], [44, data[alltype[0]]]] :
|
||||||
[[47.5, 158], [85, data[alltype[0]]]]
|
[[55, 109.87], [55, data[alltype[0]]]]
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
|
|
||||||
const gz2 = data[alltype[1]] ?
|
const gz2 = data[alltype[1]] ?
|
||||||
type == "3" ? [[51, typeName =='5' ?77.18:83.50], [51, data[alltype[1]]]] :
|
type == "3" ? [[typeName =='5' ?51:62, typeName =='5' ?77.18:83.50], [typeName =='5' ?51:62, data[alltype[1]]]] :
|
||||||
type == "2" ? [[50, typeName =='3' ?77.18:77.50], [50, data[alltype[1]]]] :
|
type == "2" ? [[typeName =='3' ?50:61, typeName =='3' ?77.18:77.50], [typeName =='3' ?50:61, data[alltype[1]]]] :
|
||||||
type == "1" ? [[51.5, typeName =='1' ?77.18:74.5], [51.5, data[alltype[1]]]] :
|
type == "1" ? [[51.5, typeName =='1' ?77.18:74.5], [51.5, data[alltype[1]]]] :
|
||||||
[[53.6, 158], [53.6, data[alltype[1]]]] :
|
[[65, 109.75], [65, data[alltype[1]]]] :
|
||||||
[];
|
[];
|
||||||
|
|
||||||
const gz3 = data[alltype[2]] ?
|
const gz3 = data[alltype[2]] ?
|
||||||
type == "3" ? [[58.5, 81.50], [58.5, data[alltype[2]]]] :
|
type == "3" ? [[62, 81.50], [62, data[alltype[2]]]] :
|
||||||
type == "2" ? [[58, 80.50], [58, data[alltype[2]]]] :
|
type == "2" ? [[61, 80.50], [61, data[alltype[2]]]] :
|
||||||
type == "1" ? [[58, 66.50], [58, data[alltype[2]]]] :
|
type == "1" ? [[58, 66.50], [58, data[alltype[2]]]] :
|
||||||
[[73, 161], [73, data[alltype[2]]]] : [];
|
[[77, 109.43], [77, data[alltype[2]]]] : [];
|
||||||
|
|
||||||
|
|
||||||
const gz4 = data[alltype[3]] ?
|
const gz4 = data[alltype[3]] ?
|
||||||
type == "3" ? [] :
|
type == "3" ? [] :
|
||||||
type == "2" ? [[77, 73.50], [77, data[alltype[3]]]] :
|
type == "2" ? [[79, 73.50], [79, data[alltype[3]]]] :
|
||||||
type == "1" ? [[79, 72.50], [79, data[alltype[3]]]] :
|
type == "1" ? [[79, 72.50], [79, data[alltype[3]]]] :
|
||||||
[[85, 166], [85, data[alltype[3]]]] : [];
|
[[85, 166], [85, data[alltype[3]]]] : [];
|
||||||
|
|
||||||
|
|
@ -86,18 +95,18 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
type == "3" ?
|
type == "3" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[47, data[alltype[0]]],
|
[typeName =='5' ?47:51, data[alltype[0]]],
|
||||||
[51, data[alltype[1]]],
|
[typeName =='5' ?51:62, data[alltype[1]]],
|
||||||
[58.5, data[alltype[2]]],
|
[62, data[alltype[2]]],
|
||||||
|
|
||||||
] :
|
] :
|
||||||
type == "2" ?
|
type == "2" ?
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[45.5, data[alltype[0]]],
|
[typeName =='3' ? 45.5:50, data[alltype[0]]],
|
||||||
[50, data[alltype[1]]],
|
[typeName =='3' ?50:61, data[alltype[1]]],
|
||||||
[58, data[alltype[2]]],
|
[61, data[alltype[2]]],
|
||||||
[77, data[alltype[3]]]
|
[79, data[alltype[3]]]
|
||||||
] :
|
] :
|
||||||
type == "1"?
|
type == "1"?
|
||||||
[
|
[
|
||||||
|
|
@ -109,9 +118,9 @@ export default function jrxOptions(data = {}, type = "1",typeName='1') {
|
||||||
]:
|
]:
|
||||||
[
|
[
|
||||||
[xValue, data?.rz],
|
[xValue, data?.rz],
|
||||||
[51.6, data[alltype[0]]],
|
[55, data[alltype[0]]],
|
||||||
[53.6, data[alltype[1]]],
|
[65, data[alltype[1]]],
|
||||||
[73, data[alltype[2]]],
|
[77, data[alltype[2]]],
|
||||||
[85, data[alltype[3]]]
|
[85, data[alltype[3]]]
|
||||||
]
|
]
|
||||||
: []
|
: []
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,17 @@ const ToolBar = ({ setSearchVal, setDmName, setTrData, exportFile,role }) => {
|
||||||
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)
|
||||||
setDmList(res.data.map(s=>({label:s.profileName,value:s.profileCode})));
|
const sortedData = res.data.sort((a, b) => {
|
||||||
|
// 判断a、b是否为ZB0开头
|
||||||
|
const isAZB0 = a.profileCode.startsWith('ZB0');
|
||||||
|
const isBZB0 = b.profileCode.startsWith('ZB0');
|
||||||
|
|
||||||
|
// 规则:ZB0开头的排前面;同类型(都ZB0/都非ZB0)保持原顺序
|
||||||
|
if (isAZB0 && !isBZB0) return -1; // a是ZB0,b不是 → a在前
|
||||||
|
if (!isAZB0 && isBZB0) return 1; // a不是ZB0,b是 → b在前
|
||||||
|
return 0; // 同类型,保持原始相对顺序
|
||||||
|
});
|
||||||
|
setDmList(sortedData.map(s=>({label:s.profileName,value:s.profileCode})));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,9 +55,10 @@ const Page = () => {
|
||||||
if (trData.length > 0 && wyObj) {
|
if (trData.length > 0 && wyObj) {
|
||||||
let dm = trData?.map(item => (
|
let dm = trData?.map(item => (
|
||||||
{
|
{
|
||||||
title: item.cd,
|
title: item.cdNm,
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
align: "center",
|
||||||
|
cd:item.cd,
|
||||||
children: wyList?.map(s => ({
|
children: wyList?.map(s => ({
|
||||||
title: s,
|
title: s,
|
||||||
key: `${s}_${item.cd}`,
|
key: `${s}_${item.cd}`,
|
||||||
|
|
@ -69,7 +70,7 @@ const Page = () => {
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
const newDm = dm.filter(item => item.title == wyObj.wy)
|
const newDm = dm.filter(item => item.cd == wyObj.wy)
|
||||||
return [...columns1,...columns2, ...newDm]
|
return [...columns1,...columns2, ...newDm]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ const ToolBar = ({ setSearchVal, setDmName, exportFile, role,list,setWyObj }) =>
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
const newList = list.map(item => ({
|
const newList = list.map(item => ({
|
||||||
label: item.cd,
|
label: item.cdNm,
|
||||||
value:item.cd
|
value:item.cd
|
||||||
}))
|
}))
|
||||||
setSource(newList)
|
setSource(newList)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue