mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-03 04:28:51 +08:00
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-tab-pane>
|
||||
<el-tab-pane :label="$t('schema.preview')" name="preview">
|
||||
<div v-if="showMessage">{{ $t('variables.csv_message') }}</div>
|
||||
<el-table
|
||||
:data="previewData"
|
||||
style="width: 100%"
|
||||
@ -97,6 +98,7 @@
|
||||
previewData: [],
|
||||
columns: [],
|
||||
allData: [],
|
||||
showMessage: false,
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: this.$t('test_track.case.input_name'), trigger: 'blur'},
|
||||
@ -123,7 +125,11 @@
|
||||
this.loading = false;
|
||||
},
|
||||
step(results, parser) {
|
||||
this.allData.push(results.data);
|
||||
if(this.allData.length < 2000) {
|
||||
this.allData.push(results.data);
|
||||
}else{
|
||||
this.showMessage = true;
|
||||
}
|
||||
},
|
||||
|
||||
handleClick() {
|
||||
|
@ -2508,7 +2508,8 @@ export default {
|
||||
timeout: "timeout",
|
||||
},
|
||||
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",
|
||||
start: "start",
|
||||
increment: "increment",
|
||||
|
@ -2512,6 +2512,7 @@ export default {
|
||||
},
|
||||
variables: {
|
||||
cvs_info: "只能上传CSV文件",
|
||||
csv_message: "默认展示2000条,完整的内容可点击下载查看。",
|
||||
end: "结束",
|
||||
start: "开始",
|
||||
increment: "增量",
|
||||
|
@ -2512,6 +2512,7 @@ export default {
|
||||
},
|
||||
variables: {
|
||||
cvs_info: "只能上傳CSV文件",
|
||||
csv_message: "默認展示2000條,完整的內容可點擊下載查看。",
|
||||
end: "結束",
|
||||
start: "開始",
|
||||
increment: "增量",
|
||||
|
Loading…
Reference in New Issue
Block a user