@yqg/permission 1.0.1-beta.1 → 1.0.3-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-BGEJ1VGl.js → apply-modal-b8StV_Lh.js} +1212 -1210
- package/dist/{checkbox-item-UGMn0mJf.js → checkbox-item-Wsr7vID_.js} +3 -3
- package/dist/{index-9R-US_u5.js → index-khliDWXN.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +54 -54
- package/dist/{yqg-permission-D4E6aSVe.js → yqg-permission-CUARetDe.js} +1613 -1604
- package/package.json +1 -1
- package/src/App.vue +2 -1
- package/src/components/apply-modal.vue +4 -0
- package/src/components/yqg-permission.vue +13 -5
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -28,9 +28,10 @@ const changeLocale = () => {
|
|
|
28
28
|
<div>1:默认组件</div>
|
|
29
29
|
<!-- 03541 -->
|
|
30
30
|
<!-- 02124 -->
|
|
31
|
+
<!-- 05184 -->
|
|
31
32
|
<yqg-permission
|
|
32
33
|
:permissions="permissions"
|
|
33
|
-
workNumber="
|
|
34
|
+
workNumber="05184"
|
|
34
35
|
businessCode="PPDL"
|
|
35
36
|
:color="color"
|
|
36
37
|
:locale="locale"
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
width="800px"
|
|
6
6
|
@ok="handleOk"
|
|
7
7
|
:okText="t('submit')"
|
|
8
|
+
:ok-button-props="{ loading: loading }"
|
|
8
9
|
:cancelText="t('cancel')">
|
|
9
10
|
<Form
|
|
10
11
|
ref="formRef"
|
|
@@ -110,6 +111,7 @@
|
|
|
110
111
|
required: true,
|
|
111
112
|
default: false,
|
|
112
113
|
});
|
|
114
|
+
const loading = ref(false);
|
|
113
115
|
const permissionList = toRef(props, 'permissionList');
|
|
114
116
|
const businessCode = toRef(props, 'businessCode');
|
|
115
117
|
const submitWorkNumber = toRef(props, 'workNumber');
|
|
@@ -137,10 +139,12 @@
|
|
|
137
139
|
|
|
138
140
|
const handleOk = async() => {
|
|
139
141
|
formRef.value.validate().then(async() => {
|
|
142
|
+
loading.value = true;
|
|
140
143
|
const params = getParams();
|
|
141
144
|
let res = await Http.submitApply(params);
|
|
142
145
|
const url = res?.body?.oaFlowUrl;
|
|
143
146
|
open.value = false;
|
|
147
|
+
loading.value = false;
|
|
144
148
|
emit('onSuccess');
|
|
145
149
|
successModal.value?.countDown(url);
|
|
146
150
|
})
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</div>
|
|
32
32
|
</template>
|
|
33
33
|
<!-- 审批中 -->
|
|
34
|
-
<template v-
|
|
34
|
+
<template v-if="curStatus.status === statusMap.PENDING">
|
|
35
35
|
<div style="margin: 10px">
|
|
36
36
|
<span
|
|
37
37
|
class="crane-unapply"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
</div>
|
|
47
47
|
</template>
|
|
48
48
|
<!-- 不可申请 -->
|
|
49
|
-
<div v-
|
|
49
|
+
<div v-if="curStatus.status === statusMap.NO" style="margin: 10px">
|
|
50
50
|
{{ t('unapplyTips') }}
|
|
51
51
|
<Popover>
|
|
52
52
|
<template #content>
|
|
53
|
-
{{t('manager')}}: {{ curStatus.tips }}
|
|
53
|
+
<div style="max-width: 400px;">{{t('manager')}}: {{ curStatus.tips }}</div>
|
|
54
54
|
</template>
|
|
55
55
|
<span style="color: #1677ff;">{{t('callManager') }}</span>
|
|
56
56
|
</Popover>
|
|
@@ -149,7 +149,12 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
const getStatus = (data: PermissionListType) => {
|
|
152
|
-
if (!data.length)
|
|
152
|
+
if (!data.length) {
|
|
153
|
+
return {
|
|
154
|
+
imageUrl: noauthority,
|
|
155
|
+
status: '',
|
|
156
|
+
};
|
|
157
|
+
}
|
|
153
158
|
const current = data.find((per) => per.businessApplyType === statusMap.PENDING);
|
|
154
159
|
const cannotApply = data.every((per) => per.businessApplyType === statusMap.NO);
|
|
155
160
|
if (current) {
|
|
@@ -168,7 +173,10 @@
|
|
|
168
173
|
tips: data[0].admin?.map((item) => item.name)?.join('、'),
|
|
169
174
|
};
|
|
170
175
|
};
|
|
171
|
-
return
|
|
176
|
+
return {
|
|
177
|
+
imageUrl: noauthority,
|
|
178
|
+
status: statusMap.DEFAULT,
|
|
179
|
+
}
|
|
172
180
|
};
|
|
173
181
|
|
|
174
182
|
const getPermissions = async () => {
|