CzRger 1 week ago
parent
commit
661a58e539

+ 5 - 1
.env.development

@@ -11,4 +11,8 @@ VITE_BASE = big-model-web
 # 基础代理
 VITE_BASE_API_PROXY = /bmw-api
 # 工作流代理
-VITE_WORKFLOW_API_PROXY = /bmw-workflow-api
+VITE_WORKFLOW_API_PROXY = /bmw-workflow-api
+# 平台管理租户ID
+VITE_TENANT_ID_PTGL = 1
+# 公共空间租户ID
+VITE_TENANT_ID_GGKJ = 0

+ 5 - 1
.env.production

@@ -11,4 +11,8 @@ VITE_BASE = big-model-web
 # 基础代理
 VITE_BASE_API_PROXY = /bmw-api
 # 工作流代理
-VITE_WORKFLOW_API_PROXY = /bmw-workflow-api
+VITE_WORKFLOW_API_PROXY = /bmw-workflow-api
+# 平台管理租户ID
+VITE_TENANT_ID_PTGL = 1
+# 公共空间租户ID
+VITE_TENANT_ID_GGKJ = 0

+ 1 - 1
src/layout/top-left/head/index.vue

@@ -24,7 +24,7 @@
         >临时字典</el-button
       >
     </div>
-    <el-dropdown :disabled="DictionaryStore.tenants.list.length < 2">
+    <el-dropdown :disabled="AppStore.tenants.length < 2">
       <div class="__hover flex items-center gap-2 text-[#303133]">
         {{ AppStore.tenantInfo?.name }}
         <SvgIcon name="czr_arrow" :rotate="90" size="10" color="#303133" />

+ 1 - 1
src/views/global/login/index.vue

@@ -92,7 +92,7 @@ const { proxy }: any = getCurrentInstance()
 const state: any = reactive({
   form: {
     username: 'super-admin',
-    password: 'Ai@2025',
+    password: 'df@123456',
     // captcha: '',
   },
   loading: false,

+ 10 - 1
src/views/manage/center/user/index.vue

@@ -11,6 +11,7 @@
       <div class="flex items-center gap-2.5">
         <CzrForm class="bm-filter" label-width="0px" @handleEnter="onSearch">
           <CzrFormColumn
+            v-if="isPTGLCpt"
             width="6.68rem"
             class="__czr-table-form-column"
             :span="24"
@@ -71,7 +72,12 @@
             :prefix-icon="Search"
           />
           <CzrButton type="add" @click="onInvite" title="新增用户" />
-          <CzrButton type="add" @click="onAdd" title="新增账号" />
+          <CzrButton
+            type="add"
+            @click="onAdd"
+            title="新增账号"
+            v-if="isPTGLCpt"
+          />
         </CzrForm>
       </div>
     </template>
@@ -245,6 +251,9 @@ watch(
   },
   { deep: true },
 )
+const isPTGLCpt = computed(() => {
+  return AppStore.tenantInfo?.id == (import.meta as any).env.VITE_TENANT_ID_PTGL
+})
 const onSort = ({ key, value }) => {
   state.query.sort[key] = value
   onSearch()