fix(测试跟踪): 取消关联二次提示问题

--bug=1023375 --user=宋昌昌 【测试跟踪】功能用例-编辑-关联测试用例-取消关联无二次提示 https://www.tapd.cn/55049933/s/1338092
This commit is contained in:
song-cc-rock 2023-02-20 11:32:11 +08:00 committed by 刘瑞斌
parent 0b01ed8db0
commit e230859fdf
5 changed files with 17 additions and 4 deletions

View File

@ -109,7 +109,7 @@ input.el-input__inner {
border-radius: 4px; border-radius: 4px;
} }
.custom-confirm-delete .el-message-box__btns .el-button--small { .el-message-box__btns .el-button--small {
min-width: 80px; min-width: 80px;
} }

View File

@ -126,6 +126,7 @@ import MsTable from "metersphere-frontend/src/components/new-ui/MsTable";
import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn"; import MsTableColumn from "metersphere-frontend/src/components/table/MsTableColumn";
import TestCaseApiRelate from "@/business/case/components/case/relate/CaseApiRelate"; import TestCaseApiRelate from "@/business/case/components/case/relate/CaseApiRelate";
import { deleteRelateTest, getRelateTest } from "@/api/testCase"; import { deleteRelateTest, getRelateTest } from "@/api/testCase";
import { operationConfirm } from "@/business/utils/sdk-utils";
import TestCaseScenarioRelate from "@/business/case/components/case/relate/CaseScenarioRelate"; import TestCaseScenarioRelate from "@/business/case/components/case/relate/CaseScenarioRelate";
import TestCaseUiScenarioRelate from "@/business/case/components/case/relate/CaseUiScenarioRelate"; import TestCaseUiScenarioRelate from "@/business/case/components/case/relate/CaseUiScenarioRelate";
import TestCaseLoadRelate from "@/business/case/components/case/relate/CaseLoadRelate"; import TestCaseLoadRelate from "@/business/case/components/case/relate/CaseLoadRelate";
@ -201,10 +202,16 @@ export default {
} }
}, },
remove(row) { remove(row) {
this.$confirm(this.$t('case.cancel_relate_case_tips_content'), this.$t('case.cancel_relate_case_tips_title'), {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
}).then(() => {
deleteRelateTest(row.testCaseId, row.testId).then(() => { deleteRelateTest(row.testCaseId, row.testId).then(() => {
this.$success(this.$t("commons.save_success"), false); this.$success(this.$t("commons.save_success"), false);
this.initTable(); this.initTable();
}); });
});
}, },
initTable() { initTable() {
if (this.caseId) { if (this.caseId) {

View File

@ -144,6 +144,8 @@ const message = {
view_the_latest_version: "View the latest version", view_the_latest_version: "View the latest version",
version_id_cannot_be_empty: "Version id cannot be empty", version_id_cannot_be_empty: "Version id cannot be empty",
enter_comments_and_click_send: "Enter comments and click Send", enter_comments_and_click_send: "Enter comments and click Send",
cancel_relate_case_tips_title: "Confirm cancel?",
cancel_relate_case_tips_content: "Cancel it will affect the test plan statistics. Sure?"
}, },
attachment: { attachment: {
preview: "Preview", preview: "Preview",

View File

@ -144,6 +144,8 @@ const message = {
view_the_latest_version: "查看最新版本", view_the_latest_version: "查看最新版本",
version_id_cannot_be_empty: "版本号不能为空", version_id_cannot_be_empty: "版本号不能为空",
enter_comments_and_click_send: "输入评论,点击发送", enter_comments_and_click_send: "输入评论,点击发送",
cancel_relate_case_tips_title: "确定取消关联关系吗?",
cancel_relate_case_tips_content: "取消关联会影响测试计划相关统计, 确定取消吗?"
}, },
attachment: { attachment: {
preview: "预览", preview: "预览",

View File

@ -144,6 +144,8 @@ const message = {
view_the_latest_version: "查看最新版本", view_the_latest_version: "查看最新版本",
version_id_cannot_be_empty: "版本號不能為空", version_id_cannot_be_empty: "版本號不能為空",
enter_comments_and_click_send: "輸入評論,點擊發送", enter_comments_and_click_send: "輸入評論,點擊發送",
cancel_relate_case_tips_title: "確定取消關聯關係嗎?",
cancel_relate_case_tips_content: "取消關聯會影響測試計劃相關統計, 確定取消嗎?"
}, },
attachment: { attachment: {
preview: "預覽", preview: "預覽",