Commit b75fd8a3 authored by 皮倩雯's avatar 皮倩雯

fix: '修改管网配置起始级别编辑回显有默认值bug'

parent 9394822b
Pipeline #83349 passed with stages
...@@ -219,7 +219,7 @@ const AddModal = props => { ...@@ -219,7 +219,7 @@ const AddModal = props => {
getGetGridSetList(e, result); getGetGridSetList(e, result);
}; };
const getGetGridSetList = (a, bb) => { const getGetGridSetList = (a, bb, flag) => {
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
let aa = form.getFieldsValue().layer; let aa = form.getFieldsValue().layer;
let result; let result;
...@@ -242,11 +242,11 @@ const AddModal = props => { ...@@ -242,11 +242,11 @@ const AddModal = props => {
}); });
setAreaData(data); setAreaData(data);
form.setFieldsValue({ coordinate: data[0] }); form.setFieldsValue({ coordinate: data[0] });
getGetCustomBaseMapByName(a, bb, data[0]); getGetCustomBaseMapByName(a, bb, data[0], flag);
}); });
}; };
const getGetCustomBaseMapByName = (a, bb, cc) => { const getGetCustomBaseMapByName = (a, bb, cc, flag) => {
let obj = form.getFieldsValue(); let obj = form.getFieldsValue();
GetCustomBaseMapByName({ GetCustomBaseMapByName({
m_Port: obj.Port || '18088', m_Port: obj.Port || '18088',
...@@ -261,12 +261,14 @@ const AddModal = props => { ...@@ -261,12 +261,14 @@ const AddModal = props => {
let aa = res.results.coords; let aa = res.results.coords;
setO(`-${JSON.parse(aa)[2]},${JSON.parse(aa)[3]}`); setO(`-${JSON.parse(aa)[2]},${JSON.parse(aa)[3]}`);
setR(res.results.resolutions); setR(res.results.resolutions);
form.setFieldsValue({ if (!flag) {
range: JSON.parse(aa).toString(), form.setFieldsValue({
resolution: res.results.resolutions, range: JSON.parse(aa).toString(),
origin: `-${JSON.parse(aa)[2]},${JSON.parse(aa)[3]}`, resolution: res.results.resolutions,
levelStart: '3', origin: `-${JSON.parse(aa)[2]},${JSON.parse(aa)[3]}`,
}); levelStart: '3',
});
}
}); });
}; };
const change = (e, event) => { const change = (e, event) => {
...@@ -296,7 +298,7 @@ const AddModal = props => { ...@@ -296,7 +298,7 @@ const AddModal = props => {
let bb = res.results[aa]; let bb = res.results[aa];
let index = bb[0].indexOf(':'); let index = bb[0].indexOf(':');
let result = bb[0].substr(index + 1, bb[0].length); let result = bb[0].substr(index + 1, bb[0].length);
getGetGridSetList(aa, result); getGetGridSetList(aa, result, '1');
} else { } else {
setSpaceData(res.results); setSpaceData(res.results);
setKeyData(Object.keys(res.results)); setKeyData(Object.keys(res.results));
......
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