mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(接口测试): 修复场景编辑时上传文件表格不回显的问题
--bug=1025081 --user=宋天阳 [接口测试]接口自动化-编辑场景-请求体中添加本地文件后不回显文件名,保存重新查看正常 https://www.tapd.cn/55049933/s/1358826
This commit is contained in:
parent
760cfae44f
commit
d223d69743
@ -525,6 +525,7 @@ export default {
|
||||
this.storageKey = 'API_RESPONSE_PARAMS_SHOW_FIELD';
|
||||
}
|
||||
if (this.parameters.length === 0 || this.parameters[this.parameters.length - 1].name) {
|
||||
//如果参数最后没有空白行,需要加入一个空白行
|
||||
this.parameters.push(
|
||||
new KeyValue({
|
||||
contentType: 'text/plain',
|
||||
@ -543,6 +544,24 @@ export default {
|
||||
value: null,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
//检查最后一个空白行是否缺少参数,缺少参数会影响数据反显.(多存在于旧数据)
|
||||
if (!this.parameters[this.parameters.length - 1].max) {
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'max', 0);
|
||||
}
|
||||
if (!this.parameters[this.parameters.length - 1].min) {
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'min', 0);
|
||||
}
|
||||
if (!this.parameters[this.parameters.length - 1].value) {
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'value', null);
|
||||
}
|
||||
if (!this.parameters[this.parameters.length - 1].uuid) {
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'uuid', this.uuid());
|
||||
}
|
||||
if (!this.parameters[this.parameters.length - 1].description) {
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'description', null);
|
||||
}
|
||||
this.$set(this.parameters[this.parameters.length - 1], 'files', null);
|
||||
}
|
||||
let savedApiParamsShowFields = getShowFields(this.storageKey);
|
||||
if (savedApiParamsShowFields) {
|
||||
|
Loading…
Reference in New Issue
Block a user