From c77631de58346e8add2599cf069fb84ff9b205ad Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Thu, 22 Apr 2021 18:01:24 +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=20=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=97=B6=E6=A8=A1=E5=9D=97=E4=B8=8D=E5=8F=8D=E6=98=BE=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/TestCaseEdit.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index 4de27c24b1..4421e6236f 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -275,6 +275,20 @@ export default { this.testCaseTemplate = template; initAddFuc(); }); + if(this.selectNode && this.selectNode.data && !this.form.id){ + this.form.module = this.selectNode.data.id; + this.form.nodePath = this.selectNode.data.path; + }else{ + this.form.module =this.treeNodes && this.length>0? this.treeNodes[0].id:""; + } + if (this.type === 'edit' || this.type === 'copy') { + 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) {