@yqg/permission 1.3.0-alpha.3 → 1.3.0-alpha.4
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-DJ-rohnO.js → apply-modal-D9_2FmCa.js} +1873 -1867
- package/dist/{category-selector-iOHRBhRt.js → category-selector-D1G2Jo59.js} +4 -4
- package/dist/{index-BNldYMQw.js → index-BeojUeOt.js} +1 -1
- package/dist/{index-arXtw86e.js → index-Du2KvF0g.js} +3 -3
- package/dist/index.js +2 -2
- package/dist/{permission-item-DQA5sauU.js → permission-item-C5rPuclI.js} +4 -4
- package/dist/{yqg-permission-C7I2t23j.js → yqg-permission-CFRz6J1H.js} +2 -2
- package/dist/yqg-permission.umd.js +31 -31
- package/package.json +1 -1
- package/src/App.vue +6 -2
- package/src/components/apply-modal.vue +12 -2
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -9,7 +9,11 @@ const color = ref<string>('#1677ff');
|
|
|
9
9
|
const locale = ref<LocaleType>('zh-CN');
|
|
10
10
|
|
|
11
11
|
const permissions = reactive([
|
|
12
|
-
'
|
|
12
|
+
'CRANE.EMPLOYEE.QUERY',
|
|
13
|
+
'CRANE.EMPLOYEE.DETAIL_QUERY',
|
|
14
|
+
'CRANE.EMPLOYEE.ATTRIBUTE_CREATE',
|
|
15
|
+
'CRANE.EMPLOYEE.ROLE_ASSIGN',
|
|
16
|
+
'CRANE.EMPLOYEE.DEPARTMENT_ROLE.ATTRIBUTE_ROLE_CREATE',
|
|
13
17
|
]);
|
|
14
18
|
// const permissions = reactive(['CRANE.BUSINESS.QUERY', 'RANE.BUSINESS.CREATE', 'CRANE.BUSINESS.UPDATE', 'CRANE.BUSINESS.DELETE']);
|
|
15
19
|
const changeColor = () => {
|
|
@@ -33,7 +37,7 @@ const changeLocale = () => {
|
|
|
33
37
|
<!-- 05184 -->
|
|
34
38
|
<yqg-permission
|
|
35
39
|
:permissions="permissions"
|
|
36
|
-
workNumber="
|
|
40
|
+
workNumber="04701"
|
|
37
41
|
:color="color"
|
|
38
42
|
:locale="locale"
|
|
39
43
|
@onSuccess="() => {console.log('成功')}"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
{{t('noPermissionTips')}}
|
|
10
10
|
</span>
|
|
11
11
|
|
|
12
|
-
<Tree checkable :default-expand-all="true" :tree-data="permissionList" :height="200"
|
|
13
|
-
:checkedKeys="formState.features" class="crane-permission-tree" @check="onCheck">
|
|
12
|
+
<Tree checkable :default-expand-all="true" :tree-data="permissionList" :height="200" :expandedKeys="expandedKeys"
|
|
13
|
+
:checkedKeys="formState.features" class="crane-permission-tree" @check="onCheck" @expand="expandedKeys = $event">
|
|
14
14
|
<template #title="item: PermissionType">
|
|
15
15
|
<div v-if="item.children && item.children.length">
|
|
16
16
|
{{ item.shortName }}
|
|
@@ -107,6 +107,7 @@ const categoryRef = ref();
|
|
|
107
107
|
let stepNodes = ref([]);
|
|
108
108
|
const categoryList = ref<CategoryType[]>([]);
|
|
109
109
|
const validTimeOptions = ref([]);
|
|
110
|
+
const expandedKeys = ref<any[]>([]);
|
|
110
111
|
const formState = reactive<formStateType>({
|
|
111
112
|
features: [],
|
|
112
113
|
roleVoList: [],
|
|
@@ -236,6 +237,15 @@ const onCheck = (checkedIds:any, info:any) => {
|
|
|
236
237
|
// 预览审批流程
|
|
237
238
|
}
|
|
238
239
|
|
|
240
|
+
watch(() => props.permissionList, (cur) => {
|
|
241
|
+
expandedKeys.value = [];
|
|
242
|
+
deepTree(cur, (item: any) => {
|
|
243
|
+
if (item.children && item.children.length) {
|
|
244
|
+
expandedKeys.value.push(item.feature);
|
|
245
|
+
}
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
|
|
239
249
|
watch(() => open.value, (cur) => {
|
|
240
250
|
if (cur) {
|
|
241
251
|
formRef.value?.resetFields();
|