From 581e8e01411f1c4217dda94f4f6963ddcbb7933f Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 15 Mar 2023 15:10:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E4=BE=8B=E5=85=B3=E8=81=94=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E7=9B=B8=E5=85=B3=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1023292 --user=王孝刚 【测试跟踪】功能用例-编辑-关联缺陷-文案问题汇总 https://www.tapd.cn/55049933/s/1350528 --- .../frontend/src/i18n/lang/track/zh-CN.js | 2 +- .../frontend/src/i18n/lang/track/zh-TW.js | 2 +- .../components/case/CaseIssueEditDetail.vue | 1 + .../case/components/case/CaseIssueRelate.vue | 61 ++++++++++++------- test-track/frontend/src/i18n/lang/en-US.js | 3 +- test-track/frontend/src/i18n/lang/zh-CN.js | 3 +- test-track/frontend/src/i18n/lang/zh-TW.js | 3 +- 7 files changed, 47 insertions(+), 28 deletions(-) diff --git a/framework/sdk-parent/frontend/src/i18n/lang/track/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/track/zh-CN.js index 8d7a886871..327e6f5ed5 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/track/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/track/zh-CN.js @@ -523,7 +523,7 @@ export default { delete: "删除缺陷", title_description_required: "标题和描述必填", close_success: "关闭成功", - delete_warning: "解除会影响测试计划相关统计,是否确认", + delete_warning: "解除会影响测试计划相关统计,确定取消吗?", preview: "预览", status_new: "新建", status_resolved: "已解决", diff --git a/framework/sdk-parent/frontend/src/i18n/lang/track/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/track/zh-TW.js index 2e2ba6f40d..16b59625ea 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/track/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/track/zh-TW.js @@ -522,7 +522,7 @@ export default { delete: "刪除缺陷", title_description_required: "標題和描述必填", close_success: "關閉成功", - delete_warning: "解除會影響測試計劃相關統計,是否確認", + delete_warning: "解除會影響測試計劃相關統計,確認取消嗎?", preview: "預覽", status_new: "新建", status_resolved: "已解決", diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue b/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue index 66b7164aa1..4f99c4e073 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueEditDetail.vue @@ -112,6 +112,7 @@ :slotTitleRequired="$t('custom_field.issue_content')" :data="form" :default-open="richTextDefaultOpen" + :placeholder="$t('case.enter_issues_content')" prop="description" /> diff --git a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue index 67592a1c41..36d080d962 100644 --- a/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue +++ b/test-track/frontend/src/business/case/components/case/CaseIssueRelate.vue @@ -18,17 +18,20 @@ @click="addIssue" > {{ $t("case.create_defect") }} - +
+
{{ $t("case.associate_existing_defects") }} -
+ @@ -149,7 +152,7 @@ > - +
@@ -178,7 +181,7 @@ import MsTable from "metersphere-frontend/src/components/new-ui/MsTable"; import HomePagination from "@/business/home/components/pagination/HomePagination"; import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn"; import IssueDescriptionTableItem from "@/business/issue/IssueDescriptionTableItem"; -import { ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP } from "metersphere-frontend/src/utils/table-constants"; +import {ISSUE_STATUS_MAP, TAPD_ISSUE_STATUS_MAP} from "metersphere-frontend/src/utils/table-constants"; import IssueRelateList from "./CaseIssueRelateList"; import { closeIssue, @@ -192,12 +195,12 @@ import { getCustomFieldValue, getTableHeaderWithCustomFields, } from "metersphere-frontend/src/utils/tableUtils"; -import { LOCAL } from "metersphere-frontend/src/utils/constants"; +import {LOCAL} from "metersphere-frontend/src/utils/constants"; import { getCurrentProjectID, getCurrentWorkspaceId, } from "metersphere-frontend/src/utils/token"; -import { operationConfirm } from "@/business/utils/sdk-utils"; +import {operationConfirm} from "@/business/utils/sdk-utils"; import MsNewUiSearch from "metersphere-frontend/src/components/new-ui/MsSearch"; export default { @@ -369,20 +372,27 @@ export default { } }, deleteIssue(row) { - operationConfirm(this, this.$t("test_track.issue.delete_warning"), () => { - this.page.result.loading = true; - deleteIssueRelate({ - id: row.id, - caseResourceId: this.getCaseResourceId(), - isPlanEdit: this.planId ? true : false, - projectId: this.projectId, - workspaceId: getCurrentWorkspaceId(), - }).then(() => { - this.page.result.loading = false; - this.getIssues(); - this.$success(this.$t("test_track.cancel_relevance_success"), false); - }); - }); + this.$confirm(this.$t("test_track.issue.delete_warning"), this.$t("case.cancel_relate_case_tips_title"), { + cancelButtonText: this.$t("commons.cancel"), + confirmButtonText: this.$t("commons.confirm"), + callback: action => { + if (action === "confirm") { + this.page.result.loading = true; + deleteIssueRelate({ + id: row.id, + caseResourceId: this.getCaseResourceId(), + isPlanEdit: this.planId ? true : false, + projectId: this.projectId, + workspaceId: getCurrentWorkspaceId(), + }).then(() => { + this.page.result.loading = false; + this.getIssues(); + this.$success(this.$t("test_track.cancel_relevance_success"), false); + }); + } + } + } + ); }, }, }; @@ -390,6 +400,7 @@ export default { diff --git a/test-track/frontend/src/i18n/lang/en-US.js b/test-track/frontend/src/i18n/lang/en-US.js index 0b2b3dee21..0b346a9fda 100644 --- a/test-track/frontend/src/i18n/lang/en-US.js +++ b/test-track/frontend/src/i18n/lang/en-US.js @@ -154,7 +154,8 @@ const message = { public: { remove: 'Whether to remove the use case ', batch_remove_confirm: "Confirm remove {0} item use case?", - } + }, + enter_issues_content: "Please enter the defect content...", }, attachment: { preview: "Preview", diff --git a/test-track/frontend/src/i18n/lang/zh-CN.js b/test-track/frontend/src/i18n/lang/zh-CN.js index f1cf7329c5..e421151c2a 100644 --- a/test-track/frontend/src/i18n/lang/zh-CN.js +++ b/test-track/frontend/src/i18n/lang/zh-CN.js @@ -154,7 +154,8 @@ const message = { public: { remove: '是否移除用例', batch_remove_confirm: "确定移除{0}项用例?", - } + }, + enter_issues_content: "请输入缺陷内容...", }, attachment: { preview: "预览", diff --git a/test-track/frontend/src/i18n/lang/zh-TW.js b/test-track/frontend/src/i18n/lang/zh-TW.js index eed2aee19e..32e6108c5e 100644 --- a/test-track/frontend/src/i18n/lang/zh-TW.js +++ b/test-track/frontend/src/i18n/lang/zh-TW.js @@ -154,7 +154,8 @@ const message = { public: { remove: '是否移除用例', batch_remove_confirm: "確定移除{0}項用例?", - } + }, + enter_issues_content: "輸入缺陷內容...", }, attachment: { preview: "預覽",