From 9cdba005b0de732ff9876d93cfd2405a6527f4fe Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Fri, 19 May 2023 14:42:15 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=94=E7=94=A8=E8=AE=BE=E7=BD=AE=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=B1=A0=E6=A0=B9=E6=8D=AE=E9=85=8D=E9=A2=9D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=8F=8D=E6=98=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1026340 --user=赵勇 【项目设置】新建项目-系统配额资源池由node改为无限制-项目设置资源池显示为空 https://www.tapd.cn/55049933/s/1373201 Signed-off-by: fit2-zhao --- .../src/business/menu/appmanage/AppManage.vue | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/project-management/frontend/src/business/menu/appmanage/AppManage.vue b/project-management/frontend/src/business/menu/appmanage/AppManage.vue index 069e81eaf5..917046a532 100644 --- a/project-management/frontend/src/business/menu/appmanage/AppManage.vue +++ b/project-management/frontend/src/business/menu/appmanage/AppManage.vue @@ -725,16 +725,12 @@ export default { getResourcePools() { this.result = getTestResourcePools().then((response) => { this.resourcePools = response.data; - let isDelPool = true; - this.resourcePools.forEach((item) => { - if (item.id === this.config.resourcePoolId) { - isDelPool = false; - } - if (isDelPool) { - this.config.resourcePoolId = undefined; - this.config.poolEnable = false; - } - }); + let delIndex = this.resourcePools.findIndex(item => + item.id === this.config.resourcePoolId); + if (delIndex === -1) { + this.config.resourcePoolId = undefined; + this.config.poolEnable = false; + } }); }, runModeChange(value, other) {