fix(测试用例): 用例附件相关缺陷
This commit is contained in:
parent
bf8d257d98
commit
b562d02fa1
|
@ -29,7 +29,7 @@
|
|||
v-if="isPreview(scope.row)"
|
||||
icon="el-icon-view"
|
||||
size="mini" circle/>
|
||||
<el-button @click="handleDownload(scope.row)" type="primary"
|
||||
<el-button @click="handleDownload(scope.row)" type="primary" :disabled="!scope.row.id"
|
||||
icon="el-icon-download"
|
||||
size="mini" circle/>
|
||||
<el-button :disabled="readOnly || !isDelete" @click="handleDelete(scope.row, scope.$index)" type="danger"
|
||||
|
|
|
@ -591,6 +591,8 @@
|
|||
} else {
|
||||
this.$emit("caseEdit", param);
|
||||
}
|
||||
// 保存用例后刷新附件
|
||||
this.$refs.otherInfo.getFileMetaData(this.form.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -220,15 +220,17 @@ export default {
|
|||
handleExceed() {
|
||||
this.$error(this.$t('load_test.file_size_limit'));
|
||||
},
|
||||
getFileMetaData() {
|
||||
if (this.uploadList && this.uploadList.length > 0) {
|
||||
getFileMetaData(id) {
|
||||
// 保存用例后传入用例id,刷新文件列表,可以预览和下载
|
||||
if (this.uploadList && this.uploadList.length > 0 && !id) {
|
||||
return;
|
||||
}
|
||||
this.fileList = [];
|
||||
this.tableData = [];
|
||||
this.uploadList = [];
|
||||
if (this.caseId) {
|
||||
this.result = this.$get("test/case/file/metadata/" + this.caseId, response => {
|
||||
let testCaseId = id ? id : this.caseId;
|
||||
if (testCaseId) {
|
||||
this.result = this.$get("test/case/file/metadata/" + testCaseId, response => {
|
||||
let files = response.data;
|
||||
|
||||
if (!files) {
|
||||
|
|
|
@ -29,7 +29,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
open(file) {
|
||||
console.log(file)
|
||||
this.file = file;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue