杂务:整理文档并收口 YumiNail 修复

This commit is contained in:
xiaowang
2026-05-21 18:43:59 +08:00
parent 3797938616
commit 9227ec6175
362 changed files with 8358 additions and 19928 deletions
@@ -7,7 +7,7 @@
<span class="admin-page-chip">权限 {{ permissionCount }}</span>
<span class="admin-page-chip">门店 {{ shopOptions.length || 0 }}</span>
<span class="admin-page-chip">{{ roleLabel }}</span>
<span v-if="currentShopName === '游客模式'" class="admin-page-chip">游客模式</span>
<span v-if="isPlatformOverview" class="admin-page-chip">平台总览</span>
</div>
</section>
@@ -45,9 +45,12 @@
</section>
<section class="admin-mobile-section-card">
<div class="admin-mobile-section-card__title">门店切换</div>
<div class="admin-mobile-section-card__title">{{ isPlatformOverview ? '管理范围' : '门店切换' }}</div>
<div v-if="isPlatformOverview" class="profile-static-shop">
平台总览模式,店铺业务仅可查看
</div>
<a-select
v-if="shopOptions.length > 1"
v-else-if="shopOptions.length > 1"
v-model:value="selectedShopId"
class="profile-shop-select"
:options="shopSelectOptions"
@@ -89,6 +92,7 @@ import {
getAdminCurrentShopName,
getAdminRoleLabel,
getAdminShopOptions,
isBootstrapAdminUser,
loadCachedAdminUserInfo
} from './admin-helpers'
@@ -104,18 +108,22 @@ const shopSwitchLoading = ref(false)
/** currentShopName is a reactive state variable used by the template and event handlers. */
const currentShopName = computed(() => getAdminCurrentShopName(userInfo.value))
const isPlatformOverview = computed(() => isBootstrapAdminUser(userInfo.value))
/** roleLabel is a reactive state variable used by the template and event handlers. */
const roleLabel = computed(() => getAdminRoleLabel(userInfo.value?.type))
/** shopOptions is a reactive state variable used by the template and event handlers. */
const shopOptions = computed(() => getAdminShopOptions(userInfo.value))
/** shopSelectOptions is a reactive state variable used by the template and event handlers. */
const shopSelectOptions = computed(() => shopOptions.value.map(shop => ({ label: shop.name, value: shop.id })))
const shopSelectOptions = computed(() => {
const options = shopOptions.value.map(shop => ({ label: shop.name, value: shop.id }))
return options
})
/** permissionCount is a reactive state variable used by the template and event handlers. */
const permissionCount = computed(() => userPermissions.value.length)
/** shopScopeText is a reactive state variable used by the template and event handlers. */
const shopScopeText = computed(() => {
if (!shopOptions.value.length) {
return '游客模式'
return isPlatformOverview.value ? '平台总览模式' : '游客模式'
}
return shopOptions.value.map(item => item.name).join(' / ')
})