fix:导出全部用例

This commit is contained in:
wenyann 2020-09-16 16:25:39 +08:00
parent b6e9f7867f
commit 3bd398debf
4 changed files with 19 additions and 3 deletions

View File

@ -382,7 +382,7 @@ export default {
method: 'post',
responseType: 'blob',
// data: {ids: [...this.selectIds]}
data: {ids: ids}
data: {ids: ids, projectId: this.currentProject.id}
};
this.result = this.$request(config).then(response => {
const filename = this.$t('test_track.case.test_case') + ".xlsx";
@ -399,9 +399,22 @@ export default {
});
},
handleBatch(type) {
if (this.selectRows.size < 1) {
this.$warning(this.$t('test_track.plan_view.select_manipulate'));
return;
if (type === 'export') {
this.$alert(this.$t('test_track.case.export_all_cases'), '', {
confirmButtonText: this.$t('commons.confirm'),
callback: (action) => {
if (action === 'confirm') {
this.exportTestCase();
}
}
})
return;
} else {
this.$warning(this.$t('test_track.plan_view.select_manipulate'));
return;
}
}
if (type === 'move') {
let ids = Array.from(this.selectRows).map(row => row.id);

View File

@ -596,6 +596,7 @@ export default {
execution_result: ": Please select the execution result",
actual_result: ": The actual result is empty",
case: {
export_all_cases: 'Are you sure you want to export all use cases?',
input_test_case: 'Please enter the associated case name',
test_name: 'TestName',
other: '--Other--',

View File

@ -599,6 +599,7 @@ export default {
actual_result: ": 实际结果为空",
case: {
export_all_cases: '确定要导出全部用例吗?',
input_test_case: '请输入关联用例名称',
test_name: '测试名称',
other: "--其他--",

View File

@ -594,6 +594,7 @@ export default {
execution_result: ": 請選擇執行結果",
actual_result: ": 實際結果為空",
case: {
export_all_cases: '確定要匯出全部用例嗎?',
input_test_case: '請輸入關聯用例名稱',
test_name: '測試名稱',
other: '--其他--',