fix: 修复删除的时候开源版报错的问题

This commit is contained in:
CaptainB 2022-01-25 19:25:15 +08:00 committed by 刘瑞斌
parent e2c0155cbc
commit e099aefa22
4 changed files with 24 additions and 7 deletions

View File

@ -218,7 +218,8 @@
<el-link type="danger" @click="showReport(row)" v-else-if="row.lastResult === 'Fail'">
{{ $t('api_test.automation.fail') }}
</el-link>
<el-link type="danger" style="color: #F6972A" @click="showReport(row)" v-else-if="row.lastResult === 'errorReportResult'">
<el-link type="danger" style="color: #F6972A" @click="showReport(row)"
v-else-if="row.lastResult === 'errorReportResult'">
{{ $t('error_report_library.option.name') }}
</el-link>
</template>
@ -1146,8 +1147,12 @@ export default {
}
}
//
//
this.$refs.apiDeleteConfirm.open(row, alertMsg);
if (hasLicense()) {
//
this.$refs.apiDeleteConfirm.open(row, alertMsg);
} else {
this._handleDelete(row, false);
}
});
}
},

View File

@ -814,8 +814,12 @@ export default {
});
return;
}
//
this.$refs.apiDeleteConfirm.open(api, this.$t('api_test.definition.request.delete_confirm'));
if (hasLicense()) {
//
this.$refs.apiDeleteConfirm.open(api, this.$t('api_test.definition.request.delete_confirm'));
} else {
this._handleDelete(api, false);
}
},
_handleDelete(api, deleteCurrentVersion) {
//

View File

@ -256,8 +256,12 @@ export default {
});
},
handleDelete(test) {
//
this.$refs.apiDeleteConfirm.open(test, this.$t('load_test.delete_confirm'));
if (hasLicense()) {
//
this.$refs.apiDeleteConfirm.open(test, this.$t('load_test.delete_confirm'));
} else {
this._handleDelete(test, false);
}
},
_handleDelete(test, deleteCurrentVersion) {
if (deleteCurrentVersion) {

View File

@ -897,8 +897,12 @@ export default {
});
},
handleDeleteToGc(testCase) {
if (hasLicense()) {
//
this.$refs.apiDeleteConfirm.open(testCase, this.$t('test_track.case.delete_confirm'));
} else {
this._handleDeleteVersion(testCase, false);
}
},
batchReduction() {
let param = buildBatchParam(this, this.$refs.table.selectIds);