fix(接口测试): 修复CSV内容过大预览卡住问题
--bug=1009420 --user=赵勇 [BUG] 场景公参里上传csv文件,超过20M的文件,直接卡死 #8338 https://www.tapd.cn/55049933/s/1089364
This commit is contained in:
parent
64b5ca9ed9
commit
aaee148858
|
@ -59,6 +59,7 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="$t('schema.preview')" name="preview">
|
<el-tab-pane :label="$t('schema.preview')" name="preview">
|
||||||
|
<div v-if="showMessage">{{ $t('variables.csv_message') }}</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="previewData"
|
:data="previewData"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -97,6 +98,7 @@
|
||||||
previewData: [],
|
previewData: [],
|
||||||
columns: [],
|
columns: [],
|
||||||
allData: [],
|
allData: [],
|
||||||
|
showMessage: false,
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
||||||
|
@ -123,7 +125,11 @@
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
step(results, parser) {
|
step(results, parser) {
|
||||||
this.allData.push(results.data);
|
if(this.allData.length < 2000) {
|
||||||
|
this.allData.push(results.data);
|
||||||
|
}else{
|
||||||
|
this.showMessage = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleClick() {
|
handleClick() {
|
||||||
|
|
|
@ -2508,7 +2508,8 @@ export default {
|
||||||
timeout: "timeout",
|
timeout: "timeout",
|
||||||
},
|
},
|
||||||
variables: {
|
variables: {
|
||||||
cvs_info: "Only CSV files can be uploaded",
|
ƒ: "Only CSV files can be uploaded",
|
||||||
|
csv_message: "2000 items are displayed by default, and the complete content can be downloaded and viewed.",
|
||||||
end: "end",
|
end: "end",
|
||||||
start: "start",
|
start: "start",
|
||||||
increment: "increment",
|
increment: "increment",
|
||||||
|
|
|
@ -2512,6 +2512,7 @@ export default {
|
||||||
},
|
},
|
||||||
variables: {
|
variables: {
|
||||||
cvs_info: "只能上传CSV文件",
|
cvs_info: "只能上传CSV文件",
|
||||||
|
csv_message: "默认展示2000条,完整的内容可点击下载查看。",
|
||||||
end: "结束",
|
end: "结束",
|
||||||
start: "开始",
|
start: "开始",
|
||||||
increment: "增量",
|
increment: "增量",
|
||||||
|
|
|
@ -2512,6 +2512,7 @@ export default {
|
||||||
},
|
},
|
||||||
variables: {
|
variables: {
|
||||||
cvs_info: "只能上傳CSV文件",
|
cvs_info: "只能上傳CSV文件",
|
||||||
|
csv_message: "默認展示2000條,完整的內容可點擊下載查看。",
|
||||||
end: "結束",
|
end: "結束",
|
||||||
start: "開始",
|
start: "開始",
|
||||||
increment: "增量",
|
increment: "增量",
|
||||||
|
|
Loading…
Reference in New Issue