@yqg/permission 1.3.0-alpha.6 → 1.3.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yqg/permission",
3
- "version": "1.3.0-alpha.6",
3
+ "version": "1.3.0-alpha.8",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
package/src/App.vue CHANGED
@@ -9,14 +9,13 @@ const color = ref<string>('#1677ff');
9
9
  const locale = ref<LocaleType>('zh-CN');
10
10
 
11
11
  const permissions = reactive([
12
- 'CRANE.ROLE.QUERY',
13
- 'CRANE.ROLE.CREATE',
14
- 'CRANE.ROLE.UPDATE',
15
- 'CRANE.ROLE.DELETE',
16
- 'CRANE.ROLE.PERMISSION_ASSIGN',
17
- 'CRANE.ROLE.EMPLOYEE_ASSIGN',
18
- 'CRANE.ROLE.DETAIL_QUERY',
19
- 'CRANE.ROLE.EXPORT',
12
+ 'CRANE.PERMISSION.QUERY',
13
+ 'CRANE.PERMISSION.CREATE',
14
+ 'CRANE.PERMISSION.UPDATE',
15
+ 'CRANE.PERMISSION.DELETE',
16
+ 'CRANE.PERMISSION.DETAIL_QUERY',
17
+ 'CRANE.PERMISSION.ROLE_ASSIGN',
18
+ 'CRANE.PERMISSION.EXPORT',
20
19
  ]);
21
20
  // const permissions = reactive(['CRANE.BUSINESS.QUERY', 'RANE.BUSINESS.CREATE', 'CRANE.BUSINESS.UPDATE', 'CRANE.BUSINESS.DELETE']);
22
21
  const changeColor = () => {
@@ -218,7 +218,7 @@ const onCheck = (checkedIds:any, info:any) => {
218
218
  formState.features = formState.features.filter((item) => item !== info.node.feature);
219
219
  message.warning(t('maxCountTips', { count: MAX_COUNT }));
220
220
  onChangeTime();
221
-
221
+ categoryList.value = useCategory(permissionList.value, formState.features);
222
222
  return;
223
223
  }
224
224
 
@@ -236,7 +236,7 @@ const onCheck = (checkedIds:any, info:any) => {
236
236
  formState.features = formState.features.concat(leafNodes);
237
237
  message.warning(t('maxCountTips', { count: MAX_COUNT }));
238
238
  onChangeTime();
239
-
239
+ categoryList.value = useCategory(permissionList.value, formState.features);
240
240
  return;
241
241
  };
242
242
 
@@ -63,7 +63,7 @@
63
63
  </div>
64
64
 
65
65
  <ApplyModal v-model="open" :permissionList="permissionList" :spining="loading" :workNumber="workNumber"
66
- :businessCode="businessCode" @onSuccess="() => emit('onSuccess')" @onSubmit="getPermissions">
66
+ @onSuccess="() => emit('onSuccess')" @onSubmit="getPermissions">
67
67
  </ApplyModal>
68
68
 
69
69
  </ConfigProvider>
@@ -144,13 +144,6 @@ import useFormat from '../hooks/useFormat';
144
144
  return props.permissions?.split(',')?.filter((item) => item.trim()) || [];
145
145
  });
146
146
 
147
- const businessCode = computed(() => {
148
- const code = allPermissions.value[0] || '';
149
- if (!code) return '';
150
-
151
- return code.split('.')[0];
152
- })
153
-
154
147
  const goViewApproval = () => {
155
148
  const url = curApproving.value?.oaFlowUrl;
156
149
  if (!url) return;