fix(场景自动化): 修复场景描述不能编辑问题,修复CSV 预览问题
This commit is contained in:
parent
b01c6930cb
commit
1157a1c422
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.api.dto.automation;
|
package io.metersphere.api.dto.automation;
|
||||||
|
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class ApiScenarioDTO extends ApiScenario {
|
public class ApiScenarioDTO extends ApiScenarioWithBLOBs {
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
|
@ -84,6 +84,7 @@
|
||||||
editFlag: false,
|
editFlag: false,
|
||||||
previewData: [],
|
previewData: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
|
allDatas: [],
|
||||||
rule: {
|
rule: {
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: this.$t('api_test.variable_name'), trigger: 'blur'},
|
{required: true, message: this.$t('api_test.variable_name'), trigger: 'blur'},
|
||||||
|
@ -97,14 +98,20 @@
|
||||||
this.$error(results.errors);
|
this.$error(results.errors);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (results.data) {
|
if (this.allDatas) {
|
||||||
this.columns = results.data[0];
|
this.columns = this.allDatas[0];
|
||||||
this.previewData = results.data;
|
this.allDatas.splice(0, 1);
|
||||||
|
this.previewData = this.allDatas;
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
|
step(results, parser) {
|
||||||
|
this.allDatas.push(results.data);
|
||||||
|
},
|
||||||
|
|
||||||
handleClick() {
|
handleClick() {
|
||||||
let config = {complete: this.complete};
|
let config = {complete: this.complete, step: this.step};
|
||||||
|
this.allDatas = [];
|
||||||
// 本地文件
|
// 本地文件
|
||||||
if (this.editData.files && this.editData.files.length > 0 && this.editData.files[0].file) {
|
if (this.editData.files && this.editData.files.length > 0 && this.editData.files[0].file) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
Loading…
Reference in New Issue