功能:完善门店能力与用户安全配置

This commit is contained in:
xiaowang
2026-05-18 10:04:57 +08:00
parent 4563dd2538
commit 3797938616
356 changed files with 24983 additions and 1858 deletions
@@ -40,6 +40,10 @@
</template>
<script setup lang="ts">
/**
* ManageView page script.
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
*/
import { computed, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import {
@@ -64,11 +68,16 @@ import {
const router = useRouter()
const { hasPermission, loadUserPermissions } = usePermission()
/** userInfo is a reactive state variable used by the template and event handlers. */
const userInfo = computed(() => loadCachedAdminUserInfo())
/** currentShopName is a reactive state variable used by the template and event handlers. */
const currentShopName = computed(() => getAdminCurrentShopName(userInfo.value))
/** roleLabel is a reactive state variable used by the template and event handlers. */
const roleLabel = computed(() => getAdminRoleLabel(userInfo.value?.type))
/** isBootstrapAdmin is a reactive state variable used by the template and event handlers. */
const isBootstrapAdmin = computed(() => isBootstrapAdminUser(userInfo.value))
/** visibleModules is a reactive state variable used by the template and event handlers. */
const visibleModules = computed(() => {
const definitions = [
{
@@ -160,6 +169,7 @@ const visibleModules = computed(() => {
})
})
/** openModule is a local helper used by this page script. */
const openModule = (module: any) => {
if (!module.allowed) {
message.warning(module.disabledReason || '当前无法进入该模块')