From 0dfb89007cfc2d2198251d61cfc9b01118416e1c Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 23 Jun 2022 18:39:46 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E7=BC=96=E8=BE=91=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=97=B6=E6=A8=A1=E7=89=88=E6=95=B0=E6=8D=AE=E6=9C=AA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1014323 --user=李玉号 【系统设置】工作空间-项目管理,打开第一个项目在打开第二个项目,页面显示不正确,刷新后正常 https://www.tapd.cn/55049933/s/1189491 --- .../src/business/components/project/menu/EditProject.vue | 7 +++++-- .../components/project/template/TemplateSelect.vue | 4 ++-- .../business/components/settings/workspace/MsProject.vue | 2 -- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/project/menu/EditProject.vue b/frontend/src/business/components/project/menu/EditProject.vue index a36b4758eb..de73e9c2d1 100644 --- a/frontend/src/business/components/project/menu/EditProject.vue +++ b/frontend/src/business/components/project/menu/EditProject.vue @@ -203,10 +203,10 @@ export default { }, getOptions() { if (this.$refs.issueTemplate) { - this.$refs.issueTemplate.getTemplateOptions(); + this.$refs.issueTemplate.getTemplateOptions(this.form.id); } if (this.$refs.caseTemplate) { - this.$refs.caseTemplate.getTemplateOptions(); + this.$refs.caseTemplate.getTemplateOptions(this.form.id); } }, thirdPartTemplateChange(val) { @@ -214,6 +214,9 @@ export default { this.form.issueTemplateId = ''; }, edit(row) { + if (row) { + this.form.id = row.id; + } this.getOptions(); this.createVisible = true; listenGoBack(this.handleClose); diff --git a/frontend/src/business/components/project/template/TemplateSelect.vue b/frontend/src/business/components/project/template/TemplateSelect.vue index bdaf0124f4..4d02da0c83 100644 --- a/frontend/src/business/components/project/template/TemplateSelect.vue +++ b/frontend/src/business/components/project/template/TemplateSelect.vue @@ -47,12 +47,12 @@ export default { } }, methods: { - getTemplateOptions() { + getTemplateOptions(id) { let url = 'field/template/case/option/'; if (this.scene === 'ISSUE') { url = 'field/template/issue/option/'; } - let projectId = this.projectId || ''; + let projectId = id ? id : (this.projectId || ''); this.$get(url + projectId, (response) => { this.templateOptions = response.data; this.templateFilterOptions = this.templateOptions; diff --git a/frontend/src/business/components/settings/workspace/MsProject.vue b/frontend/src/business/components/settings/workspace/MsProject.vue index 119bd97851..b57016db96 100644 --- a/frontend/src/business/components/settings/workspace/MsProject.vue +++ b/frontend/src/business/components/settings/workspace/MsProject.vue @@ -209,7 +209,6 @@ import MsJarConfig from "@/business/components/settings/workspace/JarConfig"; import MsTableButton from "../../common/components/MsTableButton"; import {_filter, _sort} from "@/common/js/tableUtils"; import MsResourceFiles from "@/business/components/performance/test/components/ResourceFiles"; -import TemplateSelect from "@/business/components/project/template/TemplateSelect"; import {PROJECT_CONFIGS} from "@/business/components/common/components/search/search-components"; import MsRolesTag from "@/business/components/common/components/MsRolesTag"; import AddMember from "@/business/components/settings/common/AddMember"; @@ -221,7 +220,6 @@ export default { components: { EditProject, MsInstructionsIcon, - TemplateSelect, MsResourceFiles, MsTableButton, MsJarConfig,