From c201ec94ab8fdf9233e4c44b171d51bf531b298c Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 1 Apr 2021 19:11:50 +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=E5=88=9B=E5=BB=BA=E7=94=A8=E4=BE=8B=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=B2=A1=E6=9C=89=E9=80=89=E6=8B=A9=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/TestCaseEdit.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index aea39df948..9d0d1d0dce 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -416,8 +416,12 @@ export default { }); }, 1000); if(this.selectNode && this.selectNode.data && !this.form.id){ - this.form.module = this.selectNode.data.id; - this.form.nodePath = this.selectNode.data.path; + this.form.module = this.selectNode.data.id; + this.form.nodePath = this.selectNode.data.path; + } + if((!this.form.module || this.form.module==="default-module" || this.form.module ==="root") && this.treeNodes.length > 0){ + this.form.module = this.treeNodes[0].id; + this.form.nodePath = this.treeNodes[0].path; } }, // watch: { @@ -441,6 +445,10 @@ export default { this.form.module = this.currentTestCaseInfo.nodeId; this.form.nodePath = this.currentTestCaseInfo.nodePath; } + if((!this.form.module || this.form.module==="default-module" || this.form.module ==="root") && this.treeNodes.length > 0){ + this.form.module = this.treeNodes[0].id; + this.form.nodePath = this.treeNodes[0].path; + } }, methods: { setModule(id,data) {