From 83b484ab08d4c8ba2ed9b659ee76a5c8e5ffcbd7 Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 15 Feb 2023 16:46:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E5=A1=AB=E5=86=99=E8=87=AA=E5=8A=A8=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1022806 --user=宋昌昌 【测试跟踪】新建功能用例,填写步骤后会自动保存,用例模块和责任人会提示不能为空 https://www.tapd.cn/55049933/s/1335754 --- .../src/business/case/components/TestCaseEdit.vue | 10 ++++------ .../src/business/case/components/case/CaseBaseInfo.vue | 2 ++ .../case/components/case/CaseDetailComponent.vue | 1 + .../src/business/case/components/case/CaseStepItem.vue | 7 +++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index 17ddb16c58..8309c68e2c 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -1242,13 +1242,13 @@ export default { "," + this.$t("test_track.case.expected_results") + this.$t("test_track.length_less_than") + - "300" + "300", false ); return false; } } if (param.name === "") { - this.$warning(this.$t("test_track.case.input_name")); + this.$warning(this.$t("test_track.case.input_name"), false); return false; } return true; @@ -1307,7 +1307,7 @@ export default { let curTabId = useStore().curTabId; if (curTabId === this.tabId) { if (event.keyCode === 83 && event.ctrlKey && this.readOnly) { - this.$warning(this.$t("commons.no_operation_permission")); + this.$warning(this.$t("commons.no_operation_permission"), false); return false; } handleCtrlSEvent(event, this.saveCase); @@ -1522,9 +1522,7 @@ export default { } } this.isValidate = true; - this.$warning( - this.currentValidateName + this.$t("commons.cannot_be_null") - ); + this.$warning(this.currentValidateName + this.$t("commons.cannot_be_null"), false); this.currentValidateName = ""; return false; } diff --git a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue index 21fe936719..1fd7279705 100644 --- a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue +++ b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue @@ -466,6 +466,8 @@ export default { this.treeNodes.forEach(node => { if (node.label === '未规划用例') { defaultNodeKey = node.id; + this.form.module = defaultNodeKey; + this.form.nodePath = node.path; } }) return defaultNodeKey; diff --git a/test-track/frontend/src/business/case/components/case/CaseDetailComponent.vue b/test-track/frontend/src/business/case/components/case/CaseDetailComponent.vue index bec3e04dfe..7acceee1ad 100644 --- a/test-track/frontend/src/business/case/components/case/CaseDetailComponent.vue +++ b/test-track/frontend/src/business/case/components/case/CaseDetailComponent.vue @@ -116,6 +116,7 @@ diff --git a/test-track/frontend/src/business/case/components/case/CaseStepItem.vue b/test-track/frontend/src/business/case/components/case/CaseStepItem.vue index 07970ed4d6..d2066e3386 100644 --- a/test-track/frontend/src/business/case/components/case/CaseStepItem.vue +++ b/test-track/frontend/src/business/case/components/case/CaseStepItem.vue @@ -142,6 +142,10 @@ export default { labelWidth: String, form: Object, readOnly: Boolean, + editable: { + type: Boolean, + default: false + } }, data() { return { @@ -172,6 +176,9 @@ export default { this.$EventBus.$emit("handleSaveCaseWithEvent", this.form); }, onInputBlur() { + if (this.editable) { + return; + } clearTimeout(this.TIMER); this.TIMER = setTimeout(() => { this.$emit("saveCase");