Commit 20a592b0 by zhaochengxiang

修改数据源管理问题

parent 2d515b4f
...@@ -116,10 +116,7 @@ const UpdateDatasourceModal = (props) => { ...@@ -116,10 +116,7 @@ const UpdateDatasourceModal = (props) => {
const datasourceRow = await datasourceForm.validateFields(); const datasourceRow = await datasourceForm.validateFields();
const credentialRow = await credentialForm.validateFields(); const credentialRow = await credentialForm.validateFields();
//深拷贝 let newDatasource = {...currentSupportedDatasourceTypies, ...{
let newDatasource = JSON.parse(JSON.stringify(currentSupportedDatasourceTypies));
newDatasource = {...newDatasource, ...{
namespace: ((scope||[]).length>0?scope[0]:''), namespace: ((scope||[]).length>0?scope[0]:''),
scope: ((scope||[]).length>2?scope[2]:'') scope: ((scope||[]).length>2?scope[2]:'')
}}; }};
...@@ -128,6 +125,8 @@ const UpdateDatasourceModal = (props) => { ...@@ -128,6 +125,8 @@ const UpdateDatasourceModal = (props) => {
newDatasource = {...newDatasource, ...currentDatasource}; newDatasource = {...newDatasource, ...currentDatasource};
} }
//深拷贝
newDatasource = JSON.parse(JSON.stringify(newDatasource));
newDatasource && (newDatasource.targetParameters||[]).forEach(item => { newDatasource && (newDatasource.targetParameters||[]).forEach(item => {
if (item.selectMode === null && item.required) { if (item.selectMode === null && item.required) {
item.needEnc = true; item.needEnc = true;
......
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