fix(接口测试): 解决场景变量里上传csv文件,上传一个之后,再上传一个 就不行了

--bug=1010094--user=郭雨琦【ID1010094】【接口测试】场景变量里上传csv文件,上传一个之后,再上传一个 就不行了
This commit is contained in:
guoyuqi 2022-01-28 14:32:14 +08:00 committed by CountryBuilder
parent 976e4cae5f
commit a511362258
1 changed files with 5 additions and 4 deletions

View File

@ -307,7 +307,7 @@
},
updateParameters(v) {
this.editData = JSON.parse(JSON.stringify(v));
this.upDateFiles();
this.updateFiles();
let datas = [];
this.variables.forEach(item => {
if(item.id === v.id){
@ -347,7 +347,7 @@
this.$emit('setVariables', saveVariables, this.headers);
},
addVariable() {
this.editData = {delimiter: ",", quotedData: 'false'};
this.editData = {delimiter: ",", quotedData: 'false',files:[]};
this.editData.type = this.selectType;
this.showDelete = false;
this.$refs.variableTable.cancelCurrentRow();
@ -366,6 +366,7 @@
this.addVariable();
this.$refs.variableTable.cancelCurrentRow();
}
this.$success(this.$t('commons.save_success'));
},
cancelVariable() {
this.$refs.variableTable.cancelCurrentRow();
@ -468,10 +469,10 @@
handleRowClick(row) {
//
this.editData = JSON.parse(JSON.stringify(row));
this.upDateFiles();
this.updateFiles();
this.showDelete = true;
},
upDateFiles(){
updateFiles(){
this.variables.forEach(item => {
if(item.id === this.editData.id){
this.editData.files = item.files