|
@@ -95,6 +95,24 @@
|
|
|
const { tableData } = storeToRefs(sceneInfos);
|
|
const { tableData } = storeToRefs(sceneInfos);
|
|
|
const { getSceneDetail } = sceneInfos;
|
|
const { getSceneDetail } = sceneInfos;
|
|
|
|
|
|
|
|
|
|
+ const workshopFuncPermissionMap = computed(() => {
|
|
|
|
|
+ const tempMap = {};
|
|
|
|
|
+ tableData.value.forEach((company) => {
|
|
|
|
|
+ const shops = company.children;
|
|
|
|
|
+ if (shops && shops.length) {
|
|
|
|
|
+ shops.forEach((shop) => {
|
|
|
|
|
+ let permList = [] as number[];
|
|
|
|
|
+ const perms = shop.workshopFuncPermissions;
|
|
|
|
|
+ if (perms && perms.length) {
|
|
|
|
|
+ permList = permList.concat(perms);
|
|
|
|
|
+ }
|
|
|
|
|
+ tempMap[shop.code!] = permList;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return tempMap;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
// 默认功能权限全部勾选,有未勾选的添加至excludeFeaturePermissionMap中:[workdshopCode]: [permission数组]
|
|
// 默认功能权限全部勾选,有未勾选的添加至excludeFeaturePermissionMap中:[workdshopCode]: [permission数组]
|
|
|
const featurePermissionMap = {};
|
|
const featurePermissionMap = {};
|
|
|
|
|
|
|
@@ -196,7 +214,14 @@
|
|
|
const treeRef = ref();
|
|
const treeRef = ref();
|
|
|
const expandedKeys = ref();
|
|
const expandedKeys = ref();
|
|
|
const selectedNodeKey = ref<string>('');
|
|
const selectedNodeKey = ref<string>('');
|
|
|
- const modeTreeData = computed(() => (selectedNodeKey.value ? modeList.value : []));
|
|
|
|
|
|
|
+ const modeTreeData = computed(() => {
|
|
|
|
|
+ const perms = workshopFuncPermissionMap.value[selectedNodeKey.value];
|
|
|
|
|
+ if (selectedNodeKey.value && perms && perms.length) {
|
|
|
|
|
+ return modeList.value.filter((item) => perms.includes(item.key));
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return [];
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
const formParams = ref<userFormParamsType>(defaultTreeValueRef());
|
|
const formParams = ref<userFormParamsType>(defaultTreeValueRef());
|
|
|
|
|
|