From e6649ef7b411d7c2e035e977246bd67fb0a9c3db Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Mon, 20 Feb 2023 10:55:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=85=AC=E5=85=B1=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=BA=93=E6=8F=90=E7=A4=BA=E6=96=87=E6=A1=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1023376 --user=宋昌昌 【测试跟踪】功能用例-编辑-添加到公共用例库-提示信息和原型不符 https://www.tapd.cn/55049933/s/1337997 --- .../sdk-parent/frontend/src/i18n/lang/en-US.js | 2 ++ .../sdk-parent/frontend/src/i18n/lang/zh-CN.js | 2 ++ .../sdk-parent/frontend/src/i18n/lang/zh-TW.js | 2 ++ .../business/case/components/TestCaseEdit.vue | 16 ++++++++++------ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js index 495d8bfeca..9fb215579b 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/en-US.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/en-US.js @@ -80,6 +80,8 @@ const message = { save_as: 'Save as', update: 'Update', save_success: 'Saved successfully', + add_success: 'Add successfully', + cancel_add_success: 'Cancel successfully', recover_success: 'Recover successfully', warning_module_add: "Tree modules are up to 8 levels deep", send_success: 'Send successfully', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js index 83ea12f848..7fd4ade797 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-CN.js @@ -79,6 +79,8 @@ const message = { save_as: '另存为', update: '更新', save_success: '保存成功', + add_success: '添加成功', + cancel_add_success: '取消添加成功', recover_success: '恢复成功', warning_module_add: "模块树深度最大为8层", send_success: '发送成功', diff --git a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js index 31799831a5..c2ee4f71a8 100644 --- a/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js +++ b/framework/sdk-parent/frontend/src/i18n/lang/zh-TW.js @@ -79,6 +79,8 @@ const message = { save_as: '另存為', update: '更新', save_success: '保存成功', + add_success: '添加成功', + cancel_add_success: '取消添加成功', recover_success: '恢復成功', send_success: '發送成功', delete_success: '刪除成功', diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index f27598fd1e..c61a009018 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -877,11 +877,11 @@ export default { }, addPublic() { this.casePublic = true; - this.saveCase(); + this.saveCase(true); }, removePublic() { this.casePublic = false; - this.saveCase(); + this.saveCase(true); }, handleCommand(e) { this.saveType = e; @@ -1091,9 +1091,9 @@ export default { removeGoBackListener(this.close); this.dialogFormVisible = false; }, - saveCase() { + saveCase(isAddPublic) { if (this.validateForm()) { - this._saveCase(); + this._saveCase(isAddPublic); } else { if (this.$refs.versionHistory) { this.$refs.versionHistory.loading = false; @@ -1103,7 +1103,7 @@ export default { } } }, - _saveCase() { + _saveCase(isAddPublic) { let param = this.buildParam(); if (this.validate(param)) { let option = this.getOption(param); @@ -1117,7 +1117,11 @@ export default { this.$refs.otherInfo.getFileMetaData(response.data.id); } this.loading = false; - this.$success(this.$t("commons.save_success"), false); + if (isAddPublic) { + this.$success(this.casePublic ? this.$t("commons.add_success") : this.$t("commons.cancel_add_success"), false); + } else { + this.$success(this.$t("commons.save_success"), false); + } this.operationType = "edit"; this.$emit("refreshTestCase"); store.testCaseMap.set(this.form.id, 0);