feat(role): 根据role判断用户的权限
This commit is contained in:
1 parent
80d78130f8
commit
a24bd94d43
93 files changed
+4472
-387
No files matched your search
@@ -58,7 +58,11 @@ const records = computed(() => payload.value?.records || []);
|
||||
const queryMode = computed(() => payload.value?.queryMode === 'records' ? 'records' : 'device');
|
||||
const hasResult = computed(() => Boolean(device.value || records.value.length));
|
||||
const ledgerMatched = computed(() => payload.value?.summary?.ledgerMatched !== false);
|
||||
const canManageMaintenance = computed(() => ['admin', 'maintenance_manager'].includes(String(authStore.user?.role || '')));
|
||||
/**
|
||||
* 结果卡上的新增/编辑维修入口。
|
||||
* 核心逻辑:读登录态 maintenance.ledger_write,不再认 role 字符串。
|
||||
*/
|
||||
const canManageMaintenance = computed(() => authStore.hasFeaturePermission('maintenance.ledger_write'));
|
||||
const selectedRecord = ref<MaintenanceRecord | null>(null);
|
||||
|
||||
const deviceStatusLabel = (status?: string | null) => {
|
||||
|
||||
Reference in new issue
Block a user