@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.
@@ -1,21 +1,21 @@
1
1
  <template>
2
- <ConfigProvider prefixCls="yqg-permission" :theme="{
3
- token: {
4
- colorPrimary: props.color,
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
- right: RIGHT_DEFAULT,
11
- top: currentTop,
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
- status: `<style>.crane-unapply span {color: orange;}</style><span>${curStatus.tips}</span>`
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
- @click="goViewApproval">{{t('viewApprovalDetail')}}</Button>
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
- @onSuccess="() => emit('onSuccess')" @onSubmit="getPermissions">
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
- import { ref, defineAsyncComponent, computed, watchEffect, watch } from 'vue';
73
- import { Button, ConfigProvider, Popover , message, FloatButton} from 'ant-design-vue';
74
- import applyIconUrl from '@/assets/applyicon.png';
75
- import noauthority from '@/assets/noauthority.png';
76
- import Http from '../axios/index';
77
- import t from '../utils';
78
- import useDraggable from '../hooks/useDragable';
79
- import useStatus from '../hooks/useStatus';
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
- const STATUS_MAP = {
83
- DEFAULT: 'DEFAULT',
84
- PENDING: 'PENDING',
85
- NO: 'NO',
86
- } as const;
87
-
88
- const COM_TYPE = {
89
- FLOATBUTTON: 'floatButton',
90
- DEFAULT: 'default',
91
- TEXT: 'text',
92
- CUSTOM: 'custom',
93
- };
94
- const RIGHT_DEFAULT = '10px';
95
-
96
- // 重置 message 类名,避免被全局样式覆盖
97
- message.config({prefixCls: 'yqg-permission-message'});
98
-
99
- const ApplyModal = defineAsyncComponent(() =>import('./apply-modal.vue'));
100
-
101
- const emit = defineEmits(['onSuccess']);
102
-
103
- const props = defineProps({
104
- workNumber: {
105
- type: String,
106
- default: ''
107
- },
108
- permissions: {
109
- type: [String, Array<String>],
110
- default: []
111
- },
112
- locale: {
113
- type: String,
114
- default: 'zh-CN'
115
- },
116
- color: {
117
- type: String,
118
- default: '#1677ff'
119
- },
120
- type: {
121
- type: String,
122
- default: 'default'
123
- },
124
- top: {
125
- type: String,
126
- default: '100px'
127
- }
128
- });
129
-
130
- const open = ref(false);
131
- const curApproving = ref<PermissionType>();
132
- const loading = ref(false);
133
- let permissionList = ref<PermissionListType>([]);
134
- let curStatus = ref<Record<string, any>>({
135
- imageUrl: noauthority,
136
- status: '',
137
- })
138
-
139
- const allPermissions = computed(() => {
140
- permissionList.value = [];
141
- if (Array.isArray(props.permissions)) {
142
- return props.permissions.filter((item) => item.trim());
143
- }
144
- return props.permissions?.split(',')?.filter((item) => item.trim()) || [];
145
- });
146
-
147
- const goViewApproval = () => {
148
- const url = curApproving.value?.oaFlowUrl;
149
- if (!url) return;
150
-
151
- window.open(url, '_blank');
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
- const getPermissions = async () => {
155
- const { workNumber } = props;
156
- const permissions = allPermissions.value;
157
- if (!permissions?.length || !workNumber) return;
158
-
159
- const params = {
160
- workNumber,
161
- features: permissions.toString(),
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
- const { currentTop, dragElement } = useDraggable(props, showModal);
195
+ const showModal = () => {
196
+ open.value = !open.value;
197
+ getPermissions();
198
+ };
177
199
 
178
- watchEffect(() => {
179
- if (props.type === COM_TYPE.DEFAULT) {
180
- getPermissions();
181
- }
182
- });
183
- watch(() => props.locale, (cur, pre) => {
184
- if (cur === pre) return;
185
- localStorage.setItem('permission_locale', props.locale);
186
- }, {immediate: true});
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
- .crane-wraper {
191
- display: flex;
192
- align-items: center;
193
- flex-direction: column;
194
- font-size: 14px;
195
- white-space: nowrap;
196
- }
197
- .crane-margin10 {
198
- margin: 10px;
199
- }
200
- .crane-margin-right10 {
201
- margin-right: 10px;
202
- }
203
- </style>
204
- ../hooks/useSort../hooks/useFormat
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
  }
@@ -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.forEach((category: any) => {
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
  }
@@ -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, StatusType.PENDING].includes(node.businessApplyType)) {
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 sortTree(tree, sortMap, levelSortMap);
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
- applyReasonPlaceholder: '请尽可能详细说明申请原因和使用场景,不要只填写“工作需要”之类的理由,以免影响你获取权限的审批时间。',
7
- applyReasonTips: '示例:由于XX项目需要,需要查看/操作XXXX场景/问题,涉及到XXX权限的使用,因此提交申请!',
8
- cancel: '取消',
9
- submit: '确定',
10
- close: '关闭',
11
- viewApprovalDetail: '查看审批详情',
12
- applyMore: '继续申请其他权限',
13
- successTips: '已提交申请,审批通过后可拥有相关权限',
14
- resoultTitle: '操作结果反馈',
15
- start: '发起',
16
- end: '结束',
17
- noNeed: '无需审批',
18
- adaptDepartment: '适用部门',
19
- noApprovalProcess: '无审批流程',
20
- excessTips: '一次最多可申请{number}个权限',
21
- unavailableTips: '您暂无权限查看/操作该页面,请点击下方按钮进行申请',
22
- appliedTips: '权限已申请,正在{status}...',
23
- unapplyTips: '您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,',
24
- callManager: '如有需要请联系系统管理员',
25
- manager: '系统管理员',
26
- availableTime: '有效期',
27
- selectPlaceholder: '请选择权限点',
28
- reasonPlaceholder: '请输入申请理由',
29
- maxCountTips: '一次最多只可申请{count}个权限',
30
- maxLengthTips: '最多{length}个字符',
31
- lastDays: '{count}天后到期',
32
- taday: '今天到期',
33
- clickToApply: '点击申请权限',
34
- noPermissionTips: '该菜单下暂无权限点',
35
- availiables: {
36
- SEVEN_DAYS: '7天',
37
- THIRTY_DAYS: '30天',
38
- SIXTY_DAYS: '60天',
39
- NINETY_DAYS: '90天',
40
- FOREVER: '永久有效',
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-CN': zhCH,
8
- 'en-US': enUS,
8
+ 'zh': zhCH,
9
+ 'en': enUS,
10
+ // 'id': inID,
9
11
  };
10
12
 
13
+
11
14
  export default language;