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

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

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