From 3bd398debfb237c6fea384f8f988134d3e3a1ac3 Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Wed, 16 Sep 2020 16:25:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AF=BC=E5=87=BA=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/TestCaseList.vue | 19 ++++++++++++++++--- frontend/src/i18n/en-US.js | 1 + frontend/src/i18n/zh-CN.js | 1 + frontend/src/i18n/zh-TW.js | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 5b71cd9c34..7eb79d0494 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -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); diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index be7fe4de3a..d61da6cf22 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -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--', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index baefcf56d3..69adc6e079 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -599,6 +599,7 @@ export default { actual_result: ": 实际结果为空", case: { + export_all_cases: '确定要导出全部用例吗?', input_test_case: '请输入关联用例名称', test_name: '测试名称', other: "--其他--", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index b581509fba..b89c035c81 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -594,6 +594,7 @@ export default { execution_result: ": 請選擇執行結果", actual_result: ": 實際結果為空", case: { + export_all_cases: '確定要匯出全部用例嗎?', input_test_case: '請輸入關聯用例名稱', test_name: '測試名稱', other: '--其他--',