功能:完善门店能力与用户安全配置
This commit is contained in:
@@ -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 || '当前无法进入该模块')
|
||||
|
||||
Reference in New Issue
Block a user