fix: 保存环境报错
This commit is contained in:
parent
8c25d9c2d5
commit
8984d391db
|
@ -101,7 +101,7 @@
|
||||||
if (param.id) {
|
if (param.id) {
|
||||||
url = '/api/environment/update';
|
url = '/api/environment/update';
|
||||||
}
|
}
|
||||||
this.result = this.$post(url, param, response => {
|
this.result = this.$fileUpload(url, null, [], param, response => {
|
||||||
if (!param.id) {
|
if (!param.id) {
|
||||||
environment.id = response.data;
|
environment.id = response.data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ export default {
|
||||||
JSON.parse(fileString).map(env => {
|
JSON.parse(fileString).map(env => {
|
||||||
//projectId为空字符串要转换为null,空字符串会被认为有projectId
|
//projectId为空字符串要转换为null,空字符串会被认为有projectId
|
||||||
env.projectId = this.currentProjectId === '' ? null : this.currentProjectId;
|
env.projectId = this.currentProjectId === '' ? null : this.currentProjectId;
|
||||||
this.$post('/api/environment/add', env, response => {
|
this.$fileUpload('/api/environment/add', null,[], env, response => {
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.save_success'));
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue