fix(测试用例): 用例附件相关缺陷

This commit is contained in:
shiziyuan9527 2021-05-28 16:11:17 +08:00 committed by 刘瑞斌
parent bf8d257d98
commit b562d02fa1
4 changed files with 9 additions and 6 deletions

View File

@ -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"

View File

@ -591,6 +591,8 @@
} else {
this.$emit("caseEdit", param);
}
//
this.$refs.otherInfo.getFileMetaData(this.form.id);
});
}
},

View File

@ -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) {

View File

@ -29,7 +29,6 @@ export default {
},
methods: {
open(file) {
console.log(file)
this.file = file;
this.dialogVisible = true;
},