From 37ced87b766b8485ce8a340e1cf08c3696b9e053 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 22 Sep 2020 17:23:07 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=94=A8=E4=BE=8B=E8=AF=84=E5=AE=A1):=20?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=8F=96=E6=B6=88=E7=94=A8=E4=BE=8B=E5=85=B3?= =?UTF-8?q?=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/SwitchProject.vue | 2 +- .../plan/view/comonents/TestCaseRelevance.vue | 2 +- .../track/review/commom/ReviewComment.vue | 13 +-- .../view/components/TestReviewRelevance.vue | 2 +- .../components/TestReviewTestCaseEdit.vue | 60 ++++++------- .../components/TestReviewTestCaseList.vue | 85 +++++-------------- frontend/src/i18n/en-US.js | 13 +++ frontend/src/i18n/zh-CN.js | 14 ++- frontend/src/i18n/zh-TW.js | 14 ++- 9 files changed, 95 insertions(+), 110 deletions(-) diff --git a/frontend/src/business/components/track/case/components/SwitchProject.vue b/frontend/src/business/components/track/case/components/SwitchProject.vue index 1e0013393d..461316e23c 100644 --- a/frontend/src/business/components/track/case/components/SwitchProject.vue +++ b/frontend/src/business/components/track/case/components/SwitchProject.vue @@ -4,7 +4,7 @@ :close-on-click-modal="false" class="ms-switch-project" > - + - {{projectName ? projectName : '切换项目' }} + {{projectName ? projectName : $t('test_track.switch_project') }} - 暂无评论 + {{ $t('test_track.comment.no_comment') }} @@ -13,7 +13,7 @@
- 发送 + + {{ $t('test_track.comment.send') }} +
@@ -49,16 +51,15 @@ export default { comment.caseId = this.caseId; comment.description = this.textarea; if (!this.textarea) { - this.$warning("评论内容不能为空!"); + this.$warning(this.$t('test_track.comment.description_is_null')); return; } this.result = this.$post('/test/case/comment/save', comment, () => { - this.$success("评论成功!"); + this.$success(this.$t('test_track.comment.send_success')); this.$emit('getComments'); this.textarea = ''; }); }, - } } diff --git a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue index 56bcca2a68..4d2baa2268 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewRelevance.vue @@ -11,7 +11,7 @@ - {{projectName ? projectName : '切换项目' }} + {{projectName ? projectName : $t('test_track.switch_project') }} - + {{ $t('test_track.plan_view.pre_case') }} : {{ testCases[index - 1] ? testCases[index - 1].name : '' }} - + {{ $t('test_track.plan_view.next_case') }} : {{ testCases[index + 1] ? testCases[index + 1].name : '' }} @@ -50,16 +50,16 @@ - 通过 + {{ $t('test_track.review.pass') }} - 未通过 + {{ $t('test_track.review.un_pass') }} - + {{ testCase.name }} @@ -75,18 +75,20 @@ {{ $t('test_track.case.case_type') }}: - {{ $t('commons.functional') }} + {{ + $t('commons.functional') + }} {{ $t('commons.performance') }} - {{ $t('commons.api') }} + v-if="testCase.type === 'performance'">{{ $t('commons.performance') }} + {{ $t('commons.api') }} {{ $t('test_track.case.method') }}: - {{ $t('test_track.case.manual') }} - {{ $t('test_track.case.auto') }} + {{ $t('test_track.case.manual') }} + {{ $t('test_track.case.auto') }} {{ $t('test_track.case.module') }}: @@ -105,27 +107,21 @@ - + - + - - - - - - - +
{{ $t('test_track.case.steps') }}: @@ -202,7 +198,7 @@
{{ $t('commons.remark') }}: - {{ $t('commons.not_filled') }}
@@ -222,7 +218,7 @@ @@ -232,7 +228,6 @@
- @@ -348,11 +343,10 @@ export default { }, initTest() { this.$nextTick(() => { - if (this.testCase.method == 'auto') { - if (this.$refs.apiTestDetail && this.testCase.type == 'api') { - + if (this.testCase.method === 'auto') { + if (this.$refs.apiTestDetail && this.testCase.type === 'api') { this.$refs.apiTestDetail.init(); - } else if (this.testCase.type == 'performance') { + } else if (this.testCase.type === 'performance') { this.$refs.performanceTestDetail.init(); } } @@ -362,12 +356,6 @@ export default { this.testCase.reportId = reportId; this.saveReport(reportId); }, - testTabChange(data) { - if (this.testCase.type == 'performance' && data.paneName == 'result') { - this.$refs.performanceTestResult.checkReportStatus(); - this.$refs.performanceTestResult.init(); - } - }, saveReport(reportId) { // this.$post('/test/plan/case/edit', {id: this.testCase.id, reportId: reportId}); }, @@ -395,7 +383,7 @@ export default { }); }, getRelatedTest() { - if (this.testCase.method == 'auto' && this.testCase.testId && this.testCase.testId != 'other') { + if (this.testCase.method === 'auto' && this.testCase.testId && this.testCase.testId !== 'other') { this.$get('/' + this.testCase.type + '/get/' + this.testCase.testId, response => { let data = response.data; if (data) { @@ -413,7 +401,7 @@ export default { this.$post('/test/case/review/edit/status/' + reviewId); }, stepResultChange() { - if (this.testCase.method == 'manual') { + if (this.testCase.method === 'manual') { this.isFailure = this.testCase.steptResults.filter(s => { return s.executeResult === 'Failure' || s.executeResult === 'Blocking'; }).length > 0; diff --git a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue index 064a354443..26c349e047 100644 --- a/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue +++ b/frontend/src/business/components/track/review/view/components/TestReviewTestCaseList.vue @@ -38,7 +38,7 @@ type="selection"/> -