@yqg/permission 1.3.8-bate.1 → 1.3.8-bate.3

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.8-bate.1",
3
+ "version": "1.3.8-bate.3",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "module",
package/src/App.vue CHANGED
@@ -8,11 +8,9 @@ type LocaleType = 'zh-CN' | 'en-US' | 'id-ID' | 'fil-PH';
8
8
  const color = ref<string>('#1677ff');
9
9
  const locale = ref<LocaleType>('id-ID');
10
10
 
11
- const permissions = ref('CALL_CENTER.DATA_BUSINESS.QUERY,CALL_CENTER.ENTER_ADMIN,CALL_CENTER.USER.QUERY,CALL_CENTER.USER.MANAGE,CALL_CENTER.BUSINESS.QUERY,CALL_CENTER.SKILL_GROUP.QUERY');
12
- // const permissions = reactive([
13
- // 'yewei0313.REAQS.DEPAWED_ANQ2.QUERY',
14
- // ]);
15
- //05615
11
+ // const permissions = ref('CALL_CENTER.DATA_BUSINESS.QUERY,CALL_CENTER.ENTER_ADMIN,CALL_CENTER.USER.QUERY,CALL_CENTER.USER.MANAGE,CALL_CENTER.BUSINESS.QUERY,CALL_CENTER.SKILL_GROUP.QUERY');
12
+ const permissions = 'TECH.CONFIG_CENTER.APPLICATION.CREATE,TECH.CONFIG_CENTER.APPLICATION.UPDATE,TECH.CONFIG_CENTER.APPLICATION.DELETE,TECH.CONFIG_CENTER.APPLICATION.CIPHER_ADMIN,TECH.CONFIG_CENTER.PROPERTY.CIPHER_MODIFY,TECH.CONFIG_CENTER.PROPERTY.CIPHER_READ,TECH.CONFIG_CENTER.PROPERTY.MODIFY,TECH.CONFIG_CENTER.PROPERTY.READ';
13
+ // 05615
16
14
  // const permissions = reactive(['CRANE.BUSINESS.QUERY', 'RANE.BUSINESS.CREATE', 'CRANE.BUSINESS.UPDATE', 'CRANE.BUSINESS.DELETE']);
17
15
  const changeColor = () => {
18
16
  color.value = color.value === '#f00' ? '#1677ff' : '#f00';
@@ -34,7 +32,7 @@ const changeLocale = () => {
34
32
  <!-- 02124 -->
35
33
  <!-- 05184 -->
36
34
  <yqg-permission :permissions="permissions" workNumber="03817" :color="color" :locale="locale"
37
- :omitCategoryIds="[143]" @onSuccess="() => {console.log('成功')}">
35
+ :omitCategoryIds="[172, 168, 167, 171, 166, 170, 165, 169]" @onSuccess="() => {console.log('成功')}">
38
36
  </yqg-permission>
39
37
  </div>
40
38
  <data class="case-card">
@@ -19,7 +19,7 @@
19
19
  <span v-else>{{ attributeName }}</span>
20
20
  </template>
21
21
  </TreeSelect>
22
- <span v-if="item.attributeValueIds_view?.includes(-1)" style="color: #ff4d4f; font-size: 12px;">
22
+ <span v-if="item.attributeValueIds_view?.includes(ALL_CATEGORY_ID)" style="color: #ff4d4f; font-size: 12px;">
23
23
  {{ t('categoryChangeTips', { category: item.categoryName }) }}
24
24
  </span>
25
25
  </FormItem>
@@ -36,8 +36,11 @@ import {
36
36
  import { defineProps, PropType, ref, computed, defineExpose } from 'vue';
37
37
  import t from '../utils';
38
38
  import useAttributesCache from '../hooks/useAttributesCache';
39
+
39
40
  const SHOW_PARENT = TreeSelect.SHOW_PARENT;
40
41
 
42
+ const ALL_CATEGORY_ID = -1;
43
+
41
44
  const props = defineProps({
42
45
  categoryList: {
43
46
  type: Array as PropType<CategoryType[]>,
@@ -161,6 +161,7 @@ const allPermissions = computed(() => {
161
161
 
162
162
 
163
163
  const needOmitCategoryIds = computed(() => {
164
+ console.log('needOmitCategoryIds-----1', props.omitCategoryIds);
164
165
  if (Array.isArray(props.omitCategoryIds)) {
165
166
  return props.omitCategoryIds;
166
167
  }
@@ -21,6 +21,7 @@ export default function useFormat(tree: PermissionListType, needOmitCategoryIds:
21
21
  allCount++;
22
22
  if (!node.children || node.children.length === 0) {
23
23
  node.categoryVOS = (node.categoryVOS || []).filter((item: any) => (item.configWay !== Category.AUTO) && !needOmitCategoryIds.includes(item.id));
24
+ console.log('needOmitCategoryIds-----2', node, node.categoryVOS, needOmitCategoryIds);
24
25
 
25
26
  if ([StatusType.NO].includes(node.businessApplyType)) {
26
27
  node.disabled = true;