fix(系统设置):导出环境时只删除模块启用条件,其他启用条件保留

This commit is contained in:
黎龙鑫 2021-04-28 14:37:42 +08:00 committed by jianxing
parent 23749780d9
commit be0f0855cc
1 changed files with 6 additions and 4 deletions

View File

@ -294,11 +294,13 @@
}
//idprojectId
const envs = JSON.parse(JSON.stringify(this.selectRows));
envs.map(env => { //idprojectId
envs.map(env => { //idprojectId
if (env.config){ //config
let tempConfig = JSON.parse(env.config);
if (tempConfig.httpConfig.conditions) {
delete tempConfig.httpConfig.conditions; //
if (tempConfig.httpConfig.conditions && tempConfig.httpConfig.conditions.length > 0) {
tempConfig.httpConfig.conditions = tempConfig.httpConfig.conditions.filter(condition => { //
return condition.type !== 'MODULE';
});
env.config = JSON.stringify(tempConfig);
}
}
@ -306,8 +308,8 @@
delete env.projectId;
})
downloadFile('MS_' + envs.length + '_Environments.json', JSON.stringify(envs));
},
handleProjectChange() { //,
this.currentEnvironment.config.httpConfig.conditions = [];
},