@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/dist/{apply-modal-N4GHHoip.js → apply-modal-ClKGZHQv.js} +4 -4
- package/dist/{category-selector-CUQM_UkK.js → category-selector-MxBLpU27.js} +63 -63
- package/dist/{index-BG_UX-xg.js → index-CHqAkxqj.js} +3 -3
- package/dist/{index-CK0baIJ8.js → index-DEVsfnu7.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{permission-item-DoRp9bUn.js → permission-item-mmAr8FTH.js} +4 -4
- package/dist/{yqg-permission-DnNXofuh.js → yqg-permission-n86ntTPS.js} +5 -5
- package/dist/yqg-permission.umd.js +7 -7
- package/package.json +1 -1
- package/src/App.vue +4 -6
- package/src/components/category-selector.vue +4 -1
- package/src/components/yqg-permission.vue +1 -0
- package/src/hooks/useFormat.ts +1 -0
package/package.json
CHANGED
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
|
-
|
|
13
|
-
//
|
|
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="[
|
|
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(
|
|
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[]>,
|
package/src/hooks/useFormat.ts
CHANGED
|
@@ -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;
|