@yqg/permission 1.3.0 → 1.3.1-1.beta.0
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-Ct9rKeUf.js → apply-modal-B4niAWln.js} +3882 -4161
- package/dist/{category-selector-BnUMBDty.js → category-selector-CJ2VLSr7.js} +81 -81
- package/dist/{index-XvlOgi6s.js → index-CJ_Ktj6t.js} +1828 -1836
- package/dist/{index-CAVNFmBo.js → index-CZ6UV6_X.js} +4 -4
- package/dist/index.js +2 -2
- package/dist/permission-item-Bm9OiOSx.js +1252 -0
- package/dist/{yqg-permission-BrOMv4sA.js → yqg-permission-Cb-_sywm.js} +3738 -3696
- package/dist/yqg-permission.umd.js +65 -65
- package/package.json +9 -10
- package/src/App.vue +10 -13
- package/src/axios/index.ts +1 -1
- package/src/components/apply-modal.vue +162 -75
- package/src/components/approval-steps.vue +39 -40
- package/src/components/category-selector.vue +27 -12
- package/src/components/permission-item.vue +49 -37
- package/src/components/success-modal.vue +45 -45
- package/src/components/yqg-permission.vue +169 -144
- package/src/hooks/useAttributesCache.ts +23 -1
- package/src/hooks/useCategory.ts +2 -1
- package/src/hooks/useFormat.ts +20 -7
- package/src/i18n/en-US.ts +50 -50
- package/src/i18n/in-ID.ts +57 -0
- package/src/i18n/index.ts +5 -2
- package/src/i18n/zh-CH.ts +4 -10
- package/src/style/reset.css +3 -0
- package/src/typings/index.d.ts +8 -0
- package/src/utils/index.ts +16 -2
- package/src/yqg-permission/react.js +0 -0
- package/tsconfig.app.json +8 -8
- package/dist/permission-item-2JurQrn-.js +0 -1250
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ConfigProvider prefixCls="yqg-permission" :theme="{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="crane-wraper">
|
|
2
|
+
<ConfigProvider prefixCls="yqg-permission" :key="locale" :theme="{
|
|
3
|
+
token: {
|
|
4
|
+
colorPrimary: color,
|
|
5
|
+
}
|
|
6
|
+
}">
|
|
7
|
+
<div class="crane-wraper" :key="locale">
|
|
8
8
|
<template v-if="[COM_TYPE.FLOATBUTTON, COM_TYPE.TEXT].includes(type)">
|
|
9
9
|
<FloatButton ref="dragElement" type="primary" :tooltip="t('clickToApply')" :style="{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
right: RIGHT_DEFAULT,
|
|
11
|
+
top: currentTop,
|
|
12
|
+
}">
|
|
13
13
|
<template #icon>
|
|
14
14
|
<img :src="applyIconUrl" height="20" width="20" />
|
|
15
15
|
</template>
|
|
16
16
|
</FloatButton>
|
|
17
17
|
</template>
|
|
18
|
-
<template v-else-if="type===COM_TYPE.CUSTOM">
|
|
18
|
+
<template v-else-if="type === COM_TYPE.CUSTOM">
|
|
19
19
|
<div @click="showModal">
|
|
20
20
|
<slot name="custom" />
|
|
21
21
|
</div>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{{ t('unavailableTips') }}
|
|
29
29
|
</div>
|
|
30
30
|
<div>
|
|
31
|
-
<Button type="primary" @click="showModal">+ {{t('applyPermission')}}</Button>
|
|
31
|
+
<Button type="primary" @click="showModal">+ {{ t('applyPermission') }}</Button>
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<!-- 审批中 -->
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
<img :src="curStatus.imageUrl" height="200" width="200" style="margin-top: calc(50vh - 273px)" />
|
|
37
37
|
<div class="crane-margin10">
|
|
38
38
|
<span class="crane-unapply" v-html="t('appliedTips', {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
status: `<style>.crane-unapply span {color: orange;}</style><span>${curStatus.tips}</span>`
|
|
40
|
+
})">
|
|
41
41
|
</span>
|
|
42
42
|
</div>
|
|
43
43
|
<div>
|
|
44
|
-
<Button class="crane-margin-right10"
|
|
45
|
-
|
|
46
|
-
<Button type="primary" @click="showModal">+ {{t('applyMore')}}</Button>
|
|
44
|
+
<Button class="crane-margin-right10" @click="goViewApproval">{{ t('viewApprovalDetail')
|
|
45
|
+
}}</Button>
|
|
46
|
+
<Button type="primary" @click="showModal">+ {{ t('applyMore') }}</Button>
|
|
47
47
|
</div>
|
|
48
48
|
</template>
|
|
49
49
|
<!-- 不可申请 -->
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
{{ t('unapplyTips') }}
|
|
54
54
|
<Popover>
|
|
55
55
|
<template #content>
|
|
56
|
-
<div style="max-width: 400px;">{{t('manager')}}: {{ curStatus.tips }}</div>
|
|
56
|
+
<div style="max-width: 400px;">{{ t('manager') }}: {{ curStatus.tips }}</div>
|
|
57
57
|
</template>
|
|
58
|
-
<span style="color: #1677ff;">{{t('callManager') }}</span>
|
|
58
|
+
<span style="color: #1677ff;">{{ t('callManager') }}</span>
|
|
59
59
|
</Popover>
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
@@ -63,142 +63,167 @@
|
|
|
63
63
|
</div>
|
|
64
64
|
|
|
65
65
|
<ApplyModal v-model="open" :permissionList="permissionList" :spining="loading" :workNumber="workNumber"
|
|
66
|
-
|
|
66
|
+
:zIndex="zIndex" :defaultCheckedIds="defaultCheckedIds" :isAllChecked="isAllChecked"
|
|
67
|
+
@onSuccess="() => emit('onSuccess')" @onSubmit="getPermissions" :color="color">
|
|
67
68
|
</ApplyModal>
|
|
68
|
-
|
|
69
69
|
</ConfigProvider>
|
|
70
|
+
|
|
70
71
|
</template>
|
|
71
72
|
<script lang="ts" setup>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
import { ref, defineAsyncComponent, computed, watchEffect, watch } from 'vue';
|
|
74
|
+
import { Button, ConfigProvider, Popover, message, FloatButton } from 'ant-design-vue';
|
|
75
|
+
import applyIconUrl from '@/assets/applyicon.png';
|
|
76
|
+
import noauthority from '@/assets/noauthority.png';
|
|
77
|
+
import Http from '../axios/index';
|
|
78
|
+
import t, { setLocale } from '../utils';
|
|
79
|
+
import useDraggable from '../hooks/useDragable';
|
|
80
|
+
import useStatus from '../hooks/useStatus';
|
|
80
81
|
import useFormat from '../hooks/useFormat';
|
|
82
|
+
import '../style/reset.css';
|
|
81
83
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
84
|
+
const STATUS_MAP = {
|
|
85
|
+
DEFAULT: 'DEFAULT',
|
|
86
|
+
PENDING: 'PENDING',
|
|
87
|
+
NO: 'NO',
|
|
88
|
+
} as const;
|
|
89
|
+
|
|
90
|
+
const COM_TYPE = {
|
|
91
|
+
FLOATBUTTON: 'floatButton',
|
|
92
|
+
DEFAULT: 'default',
|
|
93
|
+
TEXT: 'text',
|
|
94
|
+
CUSTOM: 'custom',
|
|
95
|
+
};
|
|
96
|
+
const RIGHT_DEFAULT = '10px';
|
|
97
|
+
|
|
98
|
+
// 重置 message 类名,避免被全局样式覆盖
|
|
99
|
+
message.config({ prefixCls : 'yqg-permission-message'});
|
|
100
|
+
|
|
101
|
+
const ApplyModal = defineAsyncComponent(() => import('./apply-modal.vue'));
|
|
102
|
+
|
|
103
|
+
const emit = defineEmits(['onSuccess']);
|
|
104
|
+
|
|
105
|
+
const props = defineProps({
|
|
106
|
+
workNumber: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: ''
|
|
109
|
+
},
|
|
110
|
+
permissions: {
|
|
111
|
+
type: [String, Array<String>],
|
|
112
|
+
default: []
|
|
113
|
+
},
|
|
114
|
+
locale: {
|
|
115
|
+
type: String,
|
|
116
|
+
default: 'zh'
|
|
117
|
+
},
|
|
118
|
+
color: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: '#1677ff'
|
|
121
|
+
},
|
|
122
|
+
type: {
|
|
123
|
+
type: String,
|
|
124
|
+
default: 'default'
|
|
125
|
+
},
|
|
126
|
+
top: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: '100px'
|
|
129
|
+
},
|
|
130
|
+
zIndex: {
|
|
131
|
+
type: Number,
|
|
132
|
+
default: 10000
|
|
133
|
+
},
|
|
134
|
+
// 某些业务场景需要在特定页面隐藏某些数据维度
|
|
135
|
+
omitCategoryIds: {
|
|
136
|
+
type: [String, Array<number>],
|
|
137
|
+
required: false,
|
|
138
|
+
default: () => []
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
const open = ref(false);
|
|
143
|
+
const curApproving = ref<PermissionType>();
|
|
144
|
+
const loading = ref(false);
|
|
145
|
+
const defaultCheckedIds = ref<string[]>([]);
|
|
146
|
+
const isAllChecked = ref(false);
|
|
147
|
+
let permissionList = ref<PermissionListType>([]);
|
|
148
|
+
let curStatus = ref<Record<string, any>>({
|
|
149
|
+
imageUrl: noauthority,
|
|
150
|
+
status: '',
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
const needOmitCategoryIds = computed(() => {
|
|
154
|
+
if (Array.isArray(props.omitCategoryIds)) {
|
|
155
|
+
return props.omitCategoryIds;
|
|
156
|
+
}
|
|
157
|
+
return props.omitCategoryIds?.split(',')?.map((item) => Number(item)) || [];
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
const allPermissions = computed(() => {
|
|
161
|
+
permissionList.value = [];
|
|
162
|
+
if (Array.isArray(props.permissions)) {
|
|
163
|
+
return props.permissions.filter((item) => item.trim());
|
|
164
|
+
}
|
|
165
|
+
return props.permissions?.split(',')?.filter((item) => item.trim()) || [];
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
const goViewApproval = () => {
|
|
169
|
+
const url = curApproving.value?.oaFlowUrl;
|
|
170
|
+
if (!url) return;
|
|
171
|
+
|
|
172
|
+
window.open(url, '_blank');
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const getPermissions = async () => {
|
|
176
|
+
const { workNumber } = props;
|
|
177
|
+
const permissions = allPermissions.value;
|
|
178
|
+
if (!permissions?.length || !workNumber) return;
|
|
179
|
+
|
|
180
|
+
const params = {
|
|
181
|
+
workNumber,
|
|
182
|
+
features: permissions.toString(),
|
|
152
183
|
};
|
|
153
184
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
loading.value = true;
|
|
165
|
-
const res = await Http.getPermissions(params);
|
|
166
|
-
permissionList.value = useFormat(res.body || []);
|
|
167
|
-
curStatus.value = useStatus(permissionList.value, curApproving);
|
|
168
|
-
loading.value = false;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
const showModal = () => {
|
|
172
|
-
open.value = !open.value;
|
|
173
|
-
getPermissions();
|
|
174
|
-
};
|
|
185
|
+
loading.value = true;
|
|
186
|
+
const res = await Http.getPermissions(params);
|
|
187
|
+
const datalist = useFormat(res.body || [], needOmitCategoryIds.value);
|
|
188
|
+
permissionList.value = datalist.data;
|
|
189
|
+
defaultCheckedIds.value = datalist.checkList;
|
|
190
|
+
isAllChecked.value = datalist.isAllChecked;
|
|
191
|
+
curStatus.value = useStatus(permissionList.value, curApproving);
|
|
192
|
+
loading.value = false;
|
|
193
|
+
};
|
|
175
194
|
|
|
176
|
-
|
|
195
|
+
const showModal = () => {
|
|
196
|
+
open.value = !open.value;
|
|
197
|
+
getPermissions();
|
|
198
|
+
};
|
|
177
199
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
const { currentTop, dragElement } = useDraggable(props, showModal);
|
|
201
|
+
|
|
202
|
+
watchEffect(() => {
|
|
203
|
+
if (props.type === COM_TYPE.DEFAULT) {
|
|
204
|
+
getPermissions();
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
watch(() => props.locale, (cur, pre) => {
|
|
208
|
+
if (cur === pre) return;
|
|
209
|
+
setLocale(cur);
|
|
210
|
+
}, { immediate: true });
|
|
187
211
|
</script>
|
|
188
212
|
|
|
189
213
|
<style scoped>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
214
|
+
.crane-wraper {
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
flex-direction: column;
|
|
218
|
+
font-size: 14px;
|
|
219
|
+
white-space: nowrap;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.crane-margin10 {
|
|
223
|
+
margin: 10px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.crane-margin-right10 {
|
|
227
|
+
margin-right: 10px;
|
|
228
|
+
}
|
|
229
|
+
</style>
|
|
@@ -15,7 +15,29 @@ export default function useAttributesCache(props: any) {
|
|
|
15
15
|
|
|
16
16
|
}, { immediate: true, deep: true });
|
|
17
17
|
|
|
18
|
+
|
|
19
|
+
const getCategoryName = (id: number, list: AttributeValueType[]): string => {
|
|
20
|
+
// 换成for 语句
|
|
21
|
+
for (let i = 0; i < list.length; i++) {
|
|
22
|
+
const item = list[i];
|
|
23
|
+
if (item.id === id) {
|
|
24
|
+
return item.attributeName;
|
|
25
|
+
}
|
|
26
|
+
if (item.children && item.children.length) {
|
|
27
|
+
return getCategoryName(id, item.children);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return '';
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const getDeleteAttributesNames = (item: CategoryType) => {
|
|
34
|
+
return item.defaultValueIds?.filter(id => !item.attributeValueIds_view.includes(id))?.map(id => {
|
|
35
|
+
return getCategoryName(id, categoryValuesMap[item.id]);
|
|
36
|
+
}).join('、');
|
|
37
|
+
};
|
|
38
|
+
|
|
18
39
|
return {
|
|
19
|
-
categoryValuesMap
|
|
40
|
+
categoryValuesMap,
|
|
41
|
+
getDeleteAttributesNames
|
|
20
42
|
}
|
|
21
43
|
}
|
package/src/hooks/useCategory.ts
CHANGED
|
@@ -5,8 +5,9 @@ export default function useCategory(tree: PermissionType[], checkedIds: string[]
|
|
|
5
5
|
const categoryList: CategoryType[] = [];
|
|
6
6
|
deepTree(tree, (item) => {
|
|
7
7
|
if (!item.children && checkedIds.includes(item.feature)) {
|
|
8
|
-
item.categoryVOS
|
|
8
|
+
item.categoryVOS?.forEach((category: CategoryType) => {
|
|
9
9
|
category.attributeValueIds_view = category?.attributeValueIds || [];
|
|
10
|
+
category.defaultValueIds = category?.attributeValueIds || [];
|
|
10
11
|
categoryList.push(category);
|
|
11
12
|
});
|
|
12
13
|
}
|
package/src/hooks/useFormat.ts
CHANGED
|
@@ -8,7 +8,9 @@ const StatusType = {
|
|
|
8
8
|
OWNER: 'OWNER',
|
|
9
9
|
TEMP_OWNER: 'TEMP_OWNER'
|
|
10
10
|
}
|
|
11
|
-
export default function useFormat(tree: PermissionListType) {
|
|
11
|
+
export default function useFormat(tree: PermissionListType, needOmitCategoryIds: number[] = []) {
|
|
12
|
+
const checkList: string[] = [];
|
|
13
|
+
let allCount: number = 0;
|
|
12
14
|
function sortTree(
|
|
13
15
|
tree: PermissionListType,
|
|
14
16
|
sortMap: Map<string | null, number>,
|
|
@@ -16,26 +18,33 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
16
18
|
) {
|
|
17
19
|
return tree.map((node) => {
|
|
18
20
|
node.key = node.feature;
|
|
19
|
-
|
|
21
|
+
allCount++;
|
|
20
22
|
if (!node.children || node.children.length === 0) {
|
|
21
|
-
node.categoryVOS = (node.categoryVOS || []).filter((item: any) => item.configWay !== Category.AUTO);
|
|
23
|
+
node.categoryVOS = (node.categoryVOS || []).filter((item: any) => (item.configWay !== Category.AUTO) && !needOmitCategoryIds.includes(item.id));
|
|
22
24
|
|
|
23
|
-
if ([StatusType.NO
|
|
25
|
+
if ([StatusType.NO].includes(node.businessApplyType)) {
|
|
24
26
|
node.disabled = true;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
if ([StatusType.OWNER].includes(node.businessApplyType) && !node.categoryVOS.length) {
|
|
29
|
+
if (([StatusType.OWNER].includes(node.businessApplyType) && !node.categoryVOS.length) || [StatusType.PENDING].includes(node.businessApplyType)) {
|
|
28
30
|
node.disabled = true;
|
|
31
|
+
checkList.push(node.feature);
|
|
29
32
|
}
|
|
30
33
|
} else {
|
|
31
34
|
// 递归对子节点进行排序
|
|
32
35
|
node.children = sortTree(node.children, sortMap, levelSortMap);
|
|
33
36
|
|
|
37
|
+
// 如果所有子节点都在 checkList 中,那么当前节点也加入 checkList
|
|
38
|
+
if (node.children.every((child) => checkList.includes(child.feature))) {
|
|
39
|
+
checkList.push(node.feature);
|
|
40
|
+
}
|
|
41
|
+
|
|
34
42
|
// 检查所有子节点是否 `disabled === true`
|
|
35
43
|
if (node.children.every((child) => child.disabled)) {
|
|
36
44
|
node.disabled = true;
|
|
37
45
|
}
|
|
38
|
-
}
|
|
46
|
+
};
|
|
47
|
+
|
|
39
48
|
|
|
40
49
|
return node;
|
|
41
50
|
}).sort((a, b) => {
|
|
@@ -51,6 +60,10 @@ export default function useFormat(tree: PermissionListType) {
|
|
|
51
60
|
const sortMap = new Map(sort.map((value, index) => [value, index]));
|
|
52
61
|
const levelSortMap = new Map(levelSort.map((value, index) => [value, index]));
|
|
53
62
|
|
|
54
|
-
return
|
|
63
|
+
return {
|
|
64
|
+
data: sortTree(tree, sortMap, levelSortMap),
|
|
65
|
+
checkList,
|
|
66
|
+
isAllChecked: allCount === checkList.length
|
|
67
|
+
};
|
|
55
68
|
}
|
|
56
69
|
|
package/src/i18n/en-US.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
permissionApply: '
|
|
3
|
-
applyPermission: '
|
|
4
|
-
applyReason: '
|
|
5
|
-
approvalProcess: '
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
},
|
|
2
|
+
permissionApply: 'Permission Application',
|
|
3
|
+
applyPermission: 'Apply for Permission',
|
|
4
|
+
applyReason: 'Application Reason',
|
|
5
|
+
approvalProcess: 'Approval Process',
|
|
6
|
+
isAllOwnTips: 'The current page already has permission or is under approval, no need to apply',
|
|
7
|
+
applyReasonPlaceholder: 'Please describe your reason and usage scenario in detail. Avoid vague explanations like "work needs" to prevent delays in approval.',
|
|
8
|
+
applyReasonTips: 'Template:Because of the 【project/work】, I need to view 【data】, and therefore require 【relevant permissions】. Other details that need to be noted: 【】',
|
|
9
|
+
cancel: 'Cancel',
|
|
10
|
+
submit: 'Confirm',
|
|
11
|
+
close: 'Close',
|
|
12
|
+
viewApprovalDetail: 'View Approval Details',
|
|
13
|
+
applyMore: 'Continue applying for other permissions',
|
|
14
|
+
successTips: 'Application submitted. Relevant permissions will be granted upon approval.',
|
|
15
|
+
resoultTitle: 'Operation Result Feedback',
|
|
16
|
+
start: 'Start',
|
|
17
|
+
end: 'End',
|
|
18
|
+
noNeed: 'No Approval Required',
|
|
19
|
+
adaptDepartment: 'Applicable Department',
|
|
20
|
+
noApprovalProcess: 'No approval process required',
|
|
21
|
+
excessTips: 'You can apply for up to {number} permissions at a time',
|
|
22
|
+
unavailableTips: 'You currently don\'t have permission to view/operate this page. Please click the button below to apply.',
|
|
23
|
+
appliedTips: 'Permission request submitted, currently {status}...',
|
|
24
|
+
unapplyTips: 'You don’t have permission to view or operate this page. There are no available permissions to apply for.',
|
|
25
|
+
callManager: 'If needed, please contact the system administrator',
|
|
26
|
+
manager: 'System Administrator',
|
|
27
|
+
availableTime: 'Validity Period',
|
|
28
|
+
selectPlaceholder: 'Please select permission points',
|
|
29
|
+
reasonPlaceholder: 'Please enter your reason for applying',
|
|
30
|
+
pleaseChoose: 'Please select',
|
|
31
|
+
maxCountTips: 'You can apply for up to {count} permissions at a time',
|
|
32
|
+
maxLengthTips: 'Up to {length} characters',
|
|
33
|
+
today: 'Expires today',
|
|
34
|
+
clickToApply: 'Click to apply for permission',
|
|
35
|
+
noPermissionTips: 'There are no permission points under this menu, no need to apply',
|
|
36
|
+
lastDays: '{count} days',
|
|
37
|
+
categoryTips: 'Your current data scope:',
|
|
38
|
+
empty: 'None',
|
|
39
|
+
category: 'Data Permission',
|
|
40
|
+
categotySelectTips: 'The selected permissions include data scope settings. Please apply for or update the scope based on your actual needs.',
|
|
41
|
+
categoryChangeTips: 'Please verify whether full access to "{category}" is necessary for your role. Be sure to explain the use case clearly in your application to avoid rejection.',
|
|
42
42
|
levels: {
|
|
43
|
-
L1: '
|
|
44
|
-
L2: '
|
|
45
|
-
L3: '
|
|
43
|
+
L1: 'Low',
|
|
44
|
+
L2: 'Medium',
|
|
45
|
+
L3: 'High',
|
|
46
46
|
},
|
|
47
47
|
status: {
|
|
48
|
-
PENDING: '
|
|
49
|
-
NO: '
|
|
50
|
-
OWNER: '
|
|
51
|
-
TEMP_OWNER: '
|
|
48
|
+
PENDING: 'Under review',
|
|
49
|
+
NO: 'Not applicable for application',
|
|
50
|
+
OWNER: 'Permanent permission',
|
|
51
|
+
TEMP_OWNER: 'Temporary permission',
|
|
52
52
|
},
|
|
53
53
|
operationType: {
|
|
54
|
-
QUERY: '
|
|
55
|
-
MANAGE: '
|
|
54
|
+
QUERY: 'Query',
|
|
55
|
+
MANAGE: 'Action',
|
|
56
56
|
}
|
|
57
|
-
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
permissionApply: 'Aplikasi Izin',
|
|
3
|
+
applyPermission: 'Ajukan Permohonan Izin',
|
|
4
|
+
applyReason: 'Alasan Permohonan',
|
|
5
|
+
approvalProcess: 'Proses Persetujuan',
|
|
6
|
+
isAllOwnTips: 'Halaman ini sudah memiliki izin atau sedang dalam proses persetujuan, tidak perlu mengajukan permohonan',
|
|
7
|
+
applyReasonPlaceholder: 'Harap jelaskan alasan dan skenario penggunaan secara detail. Hindari penjelasan yang tidak jelas seperti "kebutuhan kerja" untuk mencegah penundaan persetujuan.',
|
|
8
|
+
applyReasonTips: 'Templat:Karena 【proyek/pekerjaan】, saya perlu melihat 【data】, dan oleh karena itu memerlukan 【izin yang relevan】. Hal lain yang perlu dicatat: 【】',
|
|
9
|
+
cancel: 'Batal',
|
|
10
|
+
submit: 'Konfirmasi',
|
|
11
|
+
close: 'Tutup',
|
|
12
|
+
viewApprovalDetail: 'Lihat Detail Persetujuan',
|
|
13
|
+
applyMore: 'Lanjutkan mengajukan izin lainnya',
|
|
14
|
+
successTips: 'Permohonan telah diajukan. Izin terkait akan diberikan setelah disetujui.',
|
|
15
|
+
resoultTitle: 'Umpan Balik Hasil Operasi',
|
|
16
|
+
start: 'Mulai',
|
|
17
|
+
end: 'Selesai',
|
|
18
|
+
noNeed: 'Tidak Perlu Persetujuan',
|
|
19
|
+
adaptDepartment: 'Departemen yang Berlaku',
|
|
20
|
+
noApprovalProcess: 'Tidak perlu proses persetujuan',
|
|
21
|
+
excessTips: 'Anda dapat mengajukan hingga {number} izin sekaligus',
|
|
22
|
+
unavailableTips: 'Anda saat ini tidak memiliki izin untuk melihat/mengoperasikan halaman ini. Silakan klik tombol di bawah untuk mengajukan permohonan.',
|
|
23
|
+
appliedTips: 'Permohonan izin telah diajukan, saat ini {status}...',
|
|
24
|
+
unapplyTips: 'Anda tidak memiliki izin untuk melihat atau mengoperasikan halaman ini. Tidak ada izin yang tersedia untuk diajukan.',
|
|
25
|
+
callManager: 'Jika diperlukan, silakan hubungi administrator sistem',
|
|
26
|
+
manager: 'Administrator Sistem',
|
|
27
|
+
availableTime: 'Masa Berlaku',
|
|
28
|
+
selectPlaceholder: 'Silakan pilih titik izin',
|
|
29
|
+
reasonPlaceholder: 'Silakan masukkan alasan permohonan Anda',
|
|
30
|
+
pleaseChoose: 'Silakan pilih',
|
|
31
|
+
maxCountTips: 'Anda dapat mengajukan hingga {count} izin sekaligus',
|
|
32
|
+
maxLengthTips: 'Maksimal {length} karakter',
|
|
33
|
+
today: 'Kadaluarsa hari ini',
|
|
34
|
+
clickToApply: 'Klik untuk mengajukan izin',
|
|
35
|
+
noPermissionTips: 'Tidak ada titik izin di bawah menu ini, tidak perlu mengajukan permohonan',
|
|
36
|
+
lastDays: '{count} hari',
|
|
37
|
+
categoryTips: 'Cakupan data Anda saat ini:',
|
|
38
|
+
empty: 'Tidak ada',
|
|
39
|
+
category: 'Izin Data',
|
|
40
|
+
categotySelectTips: 'Izin yang dipilih termasuk pengaturan cakupan data. Silakan ajukan atau perbarui cakupan berdasarkan kebutuhan aktual Anda.',
|
|
41
|
+
categoryChangeTips: 'Harap verifikasi apakah akses penuh ke "{category}" diperlukan untuk peran Anda. Pastikan untuk menjelaskan kasus penggunaan secara jelas dalam permohonan Anda untuk menghindari penolakan.',
|
|
42
|
+
levels: {
|
|
43
|
+
L1: 'Rendah',
|
|
44
|
+
L2: 'Sedang',
|
|
45
|
+
L3: 'Tinggi',
|
|
46
|
+
},
|
|
47
|
+
status: {
|
|
48
|
+
PENDING: 'Dalam tinjauan',
|
|
49
|
+
NO: 'Tidak berlaku untuk aplikasi',
|
|
50
|
+
OWNER: 'Izin permanen',
|
|
51
|
+
TEMP_OWNER: 'Izin sementara',
|
|
52
|
+
},
|
|
53
|
+
operationType: {
|
|
54
|
+
QUERY: 'Kueri',
|
|
55
|
+
MANAGE: 'Aksi',
|
|
56
|
+
}
|
|
57
|
+
};
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import enUS from './en-US';
|
|
2
2
|
import zhCH from './zh-CH';
|
|
3
|
+
// import inID from './in-ID';
|
|
3
4
|
|
|
4
5
|
const language: {
|
|
5
6
|
[key: string]: any;
|
|
6
7
|
} = {
|
|
7
|
-
'zh
|
|
8
|
-
'en
|
|
8
|
+
'zh': zhCH,
|
|
9
|
+
'en': enUS,
|
|
10
|
+
// 'id': inID,
|
|
9
11
|
};
|
|
10
12
|
|
|
13
|
+
|
|
11
14
|
export default language;
|