From e821436d550bba82a9171892ca337719da68d444 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 23 Nov 2022 19:51:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE=E5=90=8E=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1019781 --user=李玉号 【测试跟踪】新建项目-点击功能用例-跳转到了个人信息 https://www.tapd.cn/55049933/s/1303357 --- .../src/components/head/ProjectSearchList.vue | 3 ++- .../workspace/project/EditProject.vue | 21 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/framework/sdk-parent/frontend/src/components/head/ProjectSearchList.vue b/framework/sdk-parent/frontend/src/components/head/ProjectSearchList.vue index eb77e963bb..6181e5154c 100644 --- a/framework/sdk-parent/frontend/src/components/head/ProjectSearchList.vue +++ b/framework/sdk-parent/frontend/src/components/head/ProjectSearchList.vue @@ -44,6 +44,7 @@ export default { this.userStore = useUserStore(); }, inject: [ + 'reload', 'reloadTopMenus' ], data() { @@ -96,7 +97,7 @@ export default { return (item.name.toLowerCase().indexOf(queryString.toLowerCase()) !== -1); }; }, - reloadPage: function () { + reloadPage() { // todo refactor permission check let redirectUrl = sessionStorage.getItem('redirectUrl'); let copyRedirectUrl = redirectUrl; diff --git a/system-setting/frontend/src/business/workspace/project/EditProject.vue b/system-setting/frontend/src/business/workspace/project/EditProject.vue index 695c5d8a60..167d3aa4f5 100644 --- a/system-setting/frontend/src/business/workspace/project/EditProject.vue +++ b/system-setting/frontend/src/business/workspace/project/EditProject.vue @@ -311,12 +311,21 @@ export default { localStorage.removeItem("ISSUE_LIST"); } - let promise = this.form.id ? modifyProject(this.form) : saveProject(this.form); - this.loading = promise.then(() => { - this.createVisible = false; - this.$success(this.$t('commons.save_success')); - this.reload(); - }); + if (this.form.id) { + this.loading = modifyProject(this.form).then(() => { + this.createVisible = false; + this.$success(this.$t('commons.save_success')); + this.reload(); + }); + } else { + this.loading = saveProject(this.form).then(() => { + this.createVisible = false; + this.$success(this.$t('commons.save_success')); + setTimeout(() => { + location.reload(); + }, 1000); + }); + } }, handleDelete(project) { this.$refs.deleteConfirm.open(project);