Commit 14e12b93 authored by 皮倩雯's avatar 皮倩雯

fix: '升级地图版本,切片管网范围配置'

parent 856e5a81
Pipeline #82957 passed with stages
......@@ -97,7 +97,7 @@
"@wisdom-utils/components": "0.1.337",
"@wisdom-utils/utils": "0.1.377",
"@wisdom-map/amap": "1.1.0-beta.56",
"@wisdom-map/arcgismap": "1.4.0-225",
"@wisdom-map/arcgismap": "1.4.0-227",
"@wisdom-map/basemap": "1.1.0-37",
"ace-builds": "^1.4.12",
"antd-img-crop": "^3.13.2",
......
......@@ -195,6 +195,8 @@ const Map = props => {
const [keepDataDraw, setKeepDataDraw] = useState([]);
const [areaFlag, setAreaFlag] = useState(0); // 地区改变标识
const [keepNameArea, setKeepNameArea] = useState(''); // 保存方案初始地区
const [hide, setHide] = useState(false);
const [hideChange, setHideChange] = useState(null);
const [keepNameCustomPointExtent, setKeepNameCustomPointExtent] = useState(''); // 保存方案初始自定义区域
useEffect(() => {
......@@ -210,6 +212,11 @@ const Map = props => {
setSetttingsSave(res.data);
res.data.forEach(item => {
if (item.layerType === 'PipenetLayer') {
if (item?.tileMaps.length > 0) {
setHide(true);
} else {
setHide(false);
}
setttings = item;
}
});
......@@ -558,6 +565,15 @@ const Map = props => {
// setFirstList({ ...aa });
break;
case 'schemename':
// let asd = mapInfo.current?.map.layers;
// console.log(asd);
// debugger;
const filterLyrs = mapInfo.current?.map.layers.filter(item => {
return item.pipenetImark;
});
if (filterLyrs.length) {
mapInfo.current.map.removeMany(filterLyrs);
}
setKeepDataDraw([]);
setRadio1('');
......@@ -582,6 +598,11 @@ const Map = props => {
}
if (item.schemename == changedFields[0].value) {
item.layerType = 'PipenetLayer';
if (item?.tileMaps.length > 0) {
setHide(true);
} else {
setHide(false);
}
}
});
let list = {};
......@@ -711,6 +732,14 @@ const Map = props => {
}, 0);
};
useEffect(() => {
if (name && !hide) {
setHideChange(false);
} else {
setHideChange(true);
}
}, [name, hide]);
const saveCallBack = e => {
setSaveFlag(1);
if (e.geometry && e.geometry.rings) {
......@@ -745,7 +774,6 @@ const Map = props => {
setButState(false);
let aa = JSON.parse(form.getFieldsValue().customPointExtent);
form.setFieldsValue({ customPointExtent: aa.geometry });
console.log(form.getFieldsValue().customPointExtent.geometry);
}
Drawtool.deactivate(false);
};
......@@ -983,7 +1011,7 @@ const Map = props => {
>
<Form.Item label="切换方案" name="schemename" style={{ marginBottom: '19px' }}>
<Select placeholder="请选择方案" showSearch>
{schemeList.map((item, index) => (
{schemeList?.map((item, index) => (
<Option value={item.schemename} key={index}>
{item.schemename}
</Option>
......@@ -1133,7 +1161,7 @@ const Map = props => {
<Divider orientation="left" style={{ borderTopColor: '#99bbe8', color: '#0079c1' }}>
<strong>高级设置</strong>
</Divider>
{name ? (
{hideChange === false ? (
<Form.Item label="管网方案" name="exportScheme" style={{ marginBottom: '19px' }}>
<Radio.Group onChange={onChange} value={radio}>
<Radio value="pandagis">整图绘制</Radio>
......
......@@ -94,7 +94,7 @@ const VectorData = props => {
];
const columns1 = [
{
title: '查询方案',
title: '默认方案',
align: 'center',
key: 'url',
render: (text, record, index) => (
......@@ -373,14 +373,14 @@ const VectorData = props => {
notification.warning({
message: '提示',
duration: 3,
description: '请先配置方案',
description: '暂无可用方案,请先配置方案',
});
}
} else {
notification.warning({
message: '提示',
duration: 3,
description: '请先配置方案',
description: '暂无可用方案,请先配置方案',
});
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment