fix(功能用例): 没有选择文件直接点击上传会报错
--bug=1009959 --user=李敏 【没有选择文件直接点击上传会报错】https://www.tapd.cn/55049933/bugtrace/bugs/view?bug_id=1155049933001009959
This commit is contained in:
parent
4aa01fb57c
commit
bccd9fa685
|
@ -71,9 +71,9 @@
|
|||
</el-row>
|
||||
|
||||
<el-row style="text-align: right" >
|
||||
<div v-if="showContinueBtn" style="margin-right: 20px;margin-bottom: 10px;">
|
||||
<el-checkbox :value="true" :disabled="true">{{ $t('test_track.case.import.ignore_error') }}</el-checkbox>
|
||||
</div>
|
||||
<!-- <div v-if="showContinueBtn" style="margin-right: 20px;margin-bottom: 10px;">-->
|
||||
<!-- <el-checkbox :value="true" :disabled="true">{{ $t('test_track.case.import.ignore_error') }}</el-checkbox>-->
|
||||
<!-- </div>-->
|
||||
<el-button v-if="showContinueBtn" type="primary" @click="upload(true)">
|
||||
{{ $t('test_track.case.import.continue_upload') }}
|
||||
</el-button>
|
||||
|
@ -170,6 +170,7 @@ export default {
|
|||
},
|
||||
handleRemove(file, fileList) {
|
||||
this.lastFile = null;
|
||||
this.showContinueBtn = false;
|
||||
},
|
||||
upload(isIgnore) {
|
||||
this.isLoading = false;
|
||||
|
@ -180,6 +181,10 @@ export default {
|
|||
versionId: this.versionId,
|
||||
ignore: isIgnore
|
||||
};
|
||||
if (this.lastFile == null || this.lastFile == undefined) {
|
||||
this.$warning(this.$t('test_track.case.import.import_file_tips'));
|
||||
return;
|
||||
}
|
||||
this.result = this.$fileUpload('/test/case/import',
|
||||
this.lastFile, null, param, response => {
|
||||
let res = response.data;
|
||||
|
|
|
@ -2038,6 +2038,7 @@ export default {
|
|||
import_update: "Import Update",
|
||||
import_tip1: "The ID is required when the \"Test Case Custom ID\" switch is turned on in the project settings",
|
||||
import_tip2: "ID is required when importing and updating",
|
||||
import_file_tips: "Please upload the file first!",
|
||||
},
|
||||
export: {
|
||||
export: "Export cases",
|
||||
|
|
|
@ -2036,6 +2036,7 @@ export default {
|
|||
import_update: "导入更新",
|
||||
import_tip1: "项目设置中“测试用例自定义ID” 开关开启时ID为必填项",
|
||||
import_tip2: "导入更新时ID为必填项",
|
||||
import_file_tips: "请先上传文件!",
|
||||
},
|
||||
export: {
|
||||
export: "导出用例",
|
||||
|
|
|
@ -2036,6 +2036,7 @@ export default {
|
|||
import_update: "導入更新",
|
||||
import_tip1: "項目設置中「測試用例自定義ID」 開關開啟時ID為必填項",
|
||||
import_tip2: "導入更新時ID為必填項",
|
||||
import_file_tips: "請先上傳文件!",
|
||||
},
|
||||
export: {
|
||||
export: "導出用例",
|
||||
|
|
Loading…
Reference in New Issue