Commit c2a5c88e authored by 罗超's avatar 罗超
parents e159daa8 18f5f06e
...@@ -157,15 +157,14 @@ export const useSystemConfigStore = defineStore('systemConfig', { ...@@ -157,15 +157,14 @@ export const useSystemConfigStore = defineStore('systemConfig', {
}, },
}, },
actions: { actions: {
async getTenantAsync(tenantId: string) { /**
const data = await SystemConfigService.getTenantAsync(tenantId) * 获取分组信息
this.groupId = data.erpGroupId || 0 */
return async getGroupInfoAsync(groupId:number) {
const groupInfo = await ErpUserService.GetGroupInfoAsync(this.groupId) // const groupInfo = await ErpUserService.GetGroupInfoAsync(groupId)
if(groupInfo.data.resultCode === ApiResult.SUCCESS) { // if(groupInfo.data.resultCode === ApiResult.SUCCESS) {
this.erpAdminUserId = groupInfo.data.data.pageData[0].EmployeeId || 0 // this.erpAdminUserId = groupInfo.data.data.pageData[0].EmployeeId || 0
// }
}
}, },
/** /**
...@@ -194,13 +193,15 @@ export const useSystemConfigStore = defineStore('systemConfig', { ...@@ -194,13 +193,15 @@ export const useSystemConfigStore = defineStore('systemConfig', {
this.platformConfig = data.platform || null this.platformConfig = data.platform || null
this.config = data.config this.config = data.config
this.groupId = data.erpGroupId || 2
// 如果有租户ID,加载代理商配置 // 如果有租户ID,加载代理商配置
if (this.tenantId) { if (this.tenantId) {
await this.getTenantAsync(this.tenantId) await this.getGroupInfoAsync(this.groupId)
try { try {
const partnerConfig = await PartnerCenterConfigService.getConfigByTenantIdAsync(this.tenantId) const partnerConfig = await PartnerCenterConfigService.getConfigByTenantIdAsync(this.tenantId)
this.partnerCenterConfig = partnerConfig this.partnerCenterConfig = partnerConfig || {
isEnabled: false
}
} catch (error) { } catch (error) {
console.warn('Failed to load partner center config:', error) console.warn('Failed to load partner center config:', error)
// 代理商配置加载失败不影响整体初始化,设置默认值 // 代理商配置加载失败不影响整体初始化,设置默认值
...@@ -209,15 +210,6 @@ export const useSystemConfigStore = defineStore('systemConfig', { ...@@ -209,15 +210,6 @@ export const useSystemConfigStore = defineStore('systemConfig', {
} }
} }
} }
// if(this.tenantId) {
// this.partnerCenterConfig = data.config || null
// }else{
// this.partnerCenterConfig = {
// isEnabled: false
// }
// }
// 如果有默认语言,应用到 i18n // 如果有默认语言,应用到 i18n
if (this.platformConfig?.defaultLanguage) { if (this.platformConfig?.defaultLanguage) {
const savedLocale = localStorage.getItem('locale') const savedLocale = localStorage.getItem('locale')
......
...@@ -136,4 +136,5 @@ export interface TenantInfoByDomainDto { ...@@ -136,4 +136,5 @@ export interface TenantInfoByDomainDto {
config: WebSiteConfigDto config: WebSiteConfigDto
navList: NavItemDto[] navList: NavItemDto[]
platform: PlatformConfigDto platform: PlatformConfigDto
erpGroupId: number
} }
\ No newline at end of file
<template> <template>
<div class="w-full h-full overflow-hidden" > <div class="w-full h-full overflow-hidden" >
<a-scrollbar class="overflow-auto h-[100%]"> <a-scrollbar class="overflow-auto h-[100%]">
<div class="accountCenter rounded-[14px] border-[1px] mb-[28px] flex items-center py-[30px] pl-[43px] pr-[35px]"> <div class="accountCenter rounded-[14px] border-[1px] mb-[28px] flex items-center py-[30px] pl-[43px] pr-[35px]">
<div class="w-[102px] mr-[43px]"> <div class="w-[102px] mr-[43px]">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment