From 175778137478488ba346f083ed3d6cdc55256419 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 03 5月 2025 17:49:51 +0800
Subject: [PATCH] 22
---
PipeLineLems/web/src/libs/Permission/Permission.ts | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/PipeLineLems/web/src/libs/Permission/Permission.ts b/PipeLineLems/web/src/libs/Permission/Permission.ts
index 9417df6..6f9068c 100644
--- a/PipeLineLems/web/src/libs/Permission/Permission.ts
+++ b/PipeLineLems/web/src/libs/Permission/Permission.ts
@@ -9,10 +9,11 @@
} from 'vue'
import { ElMessage } from 'element-plus'
import sdk from 'sdk'
-import { Permission, UserInfo, Props } from './Permission.d'
+import { Permission, UserInfo, Props, EditionTypeEnum } from './Permission.d'
import { useGlobalState } from '../Store/Store'
+import { FeatureType } from '../Store/Store.d'
-import { get } from 'lodash'
+import { clone, cloneDeep, get, isBoolean } from 'lodash'
import { editionMap } from '../enum'
import { _t } from '../Language/Language'
@@ -29,7 +30,7 @@
*/
const permissionCodes = ref<string[]>([])
-const featureMap = ref<Record<string, any>>({})
+const featureMap = ref<Record<string, FeatureType>>({})
/**
* 鏍¢獙鏉冮檺锛屽彂鍑鸿鍛�
@@ -81,7 +82,7 @@
}
export const vEditionShow: { [key: string]: Directive } = {
- updated(el: HTMLElement, binding: DirectiveBinding<any>) {
+ updated(el: HTMLElement, binding: DirectiveBinding<EditionTypeEnum>) {
if (el) {
const state: Record<string, any> = useGlobalState()
const l = Object.keys(state.featureMap.state.value)?.length
@@ -127,6 +128,18 @@
}
/**
+ * 鍔熻兘鐗堟湰鎺у埗
+ */
+export const useEditionFeature = async () => {
+ const state = useGlobalState()
+ const { getSystemConfig } = state
+
+ // @ts-ignore
+ await getSystemConfig(true)
+ featureMap.value = state.featureMap.state.value
+}
+
+/**
* 鍒濆鍖栨潈闄�
* @param props
* @param permissionMap
--
Gitblit v1.9.3