Skip to content

Commit 2aa14b3

Browse files
Merge pull request #8469 from TencentBlueKing/v3.14.x
3.14.x合入feature-tenant分支
2 parents 54ac885 + 69bef91 commit 2aa14b3

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/ui/src/components/modal/permission-resource-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const IAM_VIEWS_INST_NAME = {
9494
return business.bk_biz_name
9595
},
9696
async [IAM_VIEWS.BIZ_SET](vm, id) {
97-
const { info: list = [] } = await businessSetService.getAll(requestConfigBase('biz_set'))
97+
const { info: list = [] } = await businessSetService.getAll(requestConfigBase(`biz_set_${id}`))
9898
const MODEL_ID_KEY = BUILTIN_MODEL_PROPERTY_KEYS[BUILTIN_MODELS.BUSINESS_SET].ID
9999
const MODEL_NAME_KEY = BUILTIN_MODEL_PROPERTY_KEYS[BUILTIN_MODELS.BUSINESS_SET].NAME
100100
const businessSet = list.find(item => item[MODEL_ID_KEY] === Number(id))

src/ui/src/router/business-interceptor.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,16 @@ export const before = async function (to, from, next) {
5454
}
5555
}
5656

57+
58+
// 业务逻辑中依赖bizSet中的相关ID值,这里只要完成了上面的检查即设置
59+
store.commit('bizSet/setBizSetId', from.params.bizSetId || to.params.bizSetId)
60+
store.commit('bizSet/setBizId', from.query.bizId || to.query.bizId)
61+
5762
// 记录上一次是否使用的是业务集视图并且保存id值
5863
const isMatchedBusinessSetView = fromTopRoute?.name === MENU_BUSINESS_SET || toTopRoute?.name === MENU_BUSINESS_SET
5964
const availableBusinessSetView = isMatchedBusinessSetView && fromTopRoute?.meta?.view !== 'permission'
60-
6165
if (availableBusinessSetView) {
6266
setBizSetIdToStorage(from.params.bizSetId || to.params.bizSetId)
63-
store.commit('bizSet/setBizSetId', from.params.bizSetId || to.params.bizSetId)
64-
store.commit('bizSet/setBizId', from.query.bizId || to.query.bizId)
6567
setBizSetRecentlyUsed(true)
6668
}
6769

0 commit comments

Comments
 (0)