@yqg/permission 1.0.9-beta.0 → 1.0.9
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-B0Mtpli3.js → apply-modal-CAyKTe_X.js} +471 -471
- package/dist/{checkbox-item-BMkF060v.js → checkbox-item-BlnoVZm5.js} +74 -74
- package/dist/{index-WEDWEtKt.js → index-C8yV-rG_.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/index.umd.cjs +39 -39
- package/dist/{yqg-permission-CBdjaux0.js → yqg-permission-JCO1H4Fv.js} +9 -9
- package/package.json +4 -6
- package/src/App.vue +1 -1
- package/src/axios/index.ts +1 -1
- package/src/components/apply-modal.vue +2 -2
- package/src/components/checkbox-item.vue +5 -3
- package/src/components/success-modal.vue +6 -6
- package/src/components/yqg-permission.vue +1 -0
- package/src/i18n/en-US.ts +2 -2
- package/src/i18n/zh-CH.ts +2 -2
- package/src/typings/index.d.ts +3 -0
- package/src/vite-env.d.ts +1 -1
- package/vite.config.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Qe, i as Kn, C as ug, T as Gs, d as k, r as Xe, o as Pe, a as Vn, b as MA, w as V, g as st, p as fe, c as D, e as pe, f as G, u as K, s as Y, h as Se, j as Ge, t as gg, k as I, l as qt, m as Ws, n as fg, q as qn, v as Ks, x as Zt, y as Fe, z as dg, A as pg, B as Pi, D as Cg, E as Vs, G as RA, H as qs, I as Bg, J as hg, K as Bt, L as Si, M as co, N as ht, O as He, P as En, Q as nt, R as vn, S as Eg, U as vg } from "./index-
|
|
1
|
+
import { F as Qe, i as Kn, C as ug, T as Gs, d as k, r as Xe, o as Pe, a as Vn, b as MA, w as V, g as st, p as fe, c as D, e as pe, f as G, u as K, s as Y, h as Se, j as Ge, t as gg, k as I, l as qt, m as Ws, n as fg, q as qn, v as Ks, x as Zt, y as Fe, z as dg, A as pg, B as Pi, D as Cg, E as Vs, G as RA, H as qs, I as Bg, J as hg, K as Bt, L as Si, M as co, N as ht, O as He, P as En, Q as nt, R as vn, S as Eg, U as vg } from "./index-C8yV-rG_.js";
|
|
2
2
|
function Mn(e) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return Mn = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
@@ -16416,7 +16416,7 @@ ne.interceptors.response.use(
|
|
|
16416
16416
|
return pt.error(t), Promise.reject(e);
|
|
16417
16417
|
}
|
|
16418
16418
|
);
|
|
16419
|
-
const Wr = "/
|
|
16419
|
+
const Wr = "/crane", Gy = {
|
|
16420
16420
|
getPermissions: (e) => ne.get(`${Wr}/permission/apply`, { params: e }),
|
|
16421
16421
|
getFlowPreview: (e) => ne.post(`${Wr}/permission/apply/oa/flow/submit/preview`, e),
|
|
16422
16422
|
submitApply: (e) => ne.post(`${Wr}/permission/apply/oa/flow/submit`, e)
|
|
@@ -16426,7 +16426,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16426
16426
|
applyReason: "申请理由",
|
|
16427
16427
|
approvalProcess: "审批流程",
|
|
16428
16428
|
applyReason1: "新入职员工申请",
|
|
16429
|
-
applyReason2: "
|
|
16429
|
+
applyReason2: "项目需要",
|
|
16430
16430
|
applyReason3: "数据查询与分析",
|
|
16431
16431
|
applyReasonPlaceholder: "请尽可能详细描述申请理由",
|
|
16432
16432
|
cancel: "取消",
|
|
@@ -16442,7 +16442,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16442
16442
|
adaptDepartment: "适用部门",
|
|
16443
16443
|
noApprovalProcess: "无审批流程",
|
|
16444
16444
|
excessTips: "一次最多可申请{number}个权限",
|
|
16445
|
-
unavailableTips: "
|
|
16445
|
+
unavailableTips: "您暂无权限查看/操作该页面,请点击下方按钮进行申请",
|
|
16446
16446
|
appliedTips: "权限已申请,正在{status}...",
|
|
16447
16447
|
unapplyTips: "您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",
|
|
16448
16448
|
callManager: "如有需要请联系系统管理员",
|
|
@@ -16482,7 +16482,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16482
16482
|
applyReason: "申请理由",
|
|
16483
16483
|
approvalProcess: "审批流程",
|
|
16484
16484
|
applyReason1: "新入职员工申请",
|
|
16485
|
-
applyReason2: "
|
|
16485
|
+
applyReason2: "项目需要",
|
|
16486
16486
|
applyReason3: "数据查询与分析",
|
|
16487
16487
|
applyReasonPlaceholder: "请尽可能详细描述申请理由",
|
|
16488
16488
|
cancel: "取消",
|
|
@@ -16498,7 +16498,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16498
16498
|
adaptDepartment: "适用部门",
|
|
16499
16499
|
noApprovalProcess: "无审批流程",
|
|
16500
16500
|
excessTips: "一次最多可申请{number}个权限",
|
|
16501
|
-
unavailableTips: "
|
|
16501
|
+
unavailableTips: "您暂无权限查看/操作该页面,请点击下方按钮进行申请",
|
|
16502
16502
|
appliedTips: "权限已申请,正在{status}...",
|
|
16503
16503
|
unapplyTips: "您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,",
|
|
16504
16504
|
callManager: "如有需要请联系系统管理员",
|
|
@@ -16590,7 +16590,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16590
16590
|
emits: ["onSuccess"],
|
|
16591
16591
|
setup(e, { emit: t }) {
|
|
16592
16592
|
const n = vg(
|
|
16593
|
-
() => import("./apply-modal-
|
|
16593
|
+
() => import("./apply-modal-CAyKTe_X.js").then((h) => h.a)
|
|
16594
16594
|
), o = {
|
|
16595
16595
|
DEFAULT: "DEFAULT",
|
|
16596
16596
|
PENDING: "PENDING",
|
|
@@ -16643,7 +16643,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16643
16643
|
let v = await Gy.getPermissions(h);
|
|
16644
16644
|
s.value = u(v.body || []), l.value = g(s.value);
|
|
16645
16645
|
}, C = () => {
|
|
16646
|
-
i.value = !i.value;
|
|
16646
|
+
p(), i.value = !i.value;
|
|
16647
16647
|
};
|
|
16648
16648
|
return Se(p), V(() => r.locale, (h, v) => {
|
|
16649
16649
|
h !== v && localStorage.setItem("permission_locale", r.locale);
|
|
@@ -16768,7 +16768,7 @@ const Wr = "/admin/crane", Gy = {
|
|
|
16768
16768
|
for (const [o, r] of t)
|
|
16769
16769
|
n[o] = r;
|
|
16770
16770
|
return n;
|
|
16771
|
-
}, sw = /* @__PURE__ */ aw(iw, [["__scopeId", "data-v-
|
|
16771
|
+
}, sw = /* @__PURE__ */ aw(iw, [["__scopeId", "data-v-debef759"]]), xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
16772
16772
|
__proto__: null,
|
|
16773
16773
|
default: sw
|
|
16774
16774
|
}, Symbol.toStringTag, { value: "Module" }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yqg/permission",
|
|
3
|
-
"version": "1.0.9
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,16 +13,14 @@
|
|
|
13
13
|
"dev": "vite",
|
|
14
14
|
"preview": "vite preview"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@ant-design/icons-vue": "^7.0.1",
|
|
18
18
|
"@commitlint/cli": "^19.5.0",
|
|
19
19
|
"@commitlint/config-conventional": "^19.5.0",
|
|
20
20
|
"ant-design-vue": "4.x",
|
|
21
21
|
"axios": "^1.7.7",
|
|
22
22
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
23
|
-
"vue": "^3.5.12"
|
|
24
|
-
},
|
|
25
|
-
"devDependencies": {
|
|
23
|
+
"vue": "^3.5.12",
|
|
26
24
|
"@typescript-eslint/parser": "^8.13.0",
|
|
27
25
|
"@vitejs/plugin-vue": "^5.1.4",
|
|
28
26
|
"eslint": "^9.14.0",
|
package/src/App.vue
CHANGED
package/src/axios/index.ts
CHANGED
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
const onChangeHandler = throttle(async () => {
|
|
175
|
-
if (formState.roleIds.length >
|
|
175
|
+
if (formState.roleIds.length > 5) {
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
|
|
189
189
|
watch(() => formState.roleIds, (val) => {
|
|
190
190
|
// 写到watch里避免闪烁
|
|
191
|
-
if (val.length >
|
|
191
|
+
if (val.length > 5) {
|
|
192
192
|
formState.roleIds.pop();
|
|
193
193
|
message.warning(t('maxCountTips', {count: 5}));
|
|
194
194
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</span>
|
|
18
18
|
<Popover>
|
|
19
19
|
<template #content>
|
|
20
|
-
{{ item.name }}
|
|
20
|
+
<div style="max-width: 400px;">{{ item.name }}</div>
|
|
21
21
|
</template>
|
|
22
22
|
<span class="crane-text-overflow">{{ item.name }}</span>
|
|
23
23
|
</Popover>
|
|
@@ -47,16 +47,18 @@
|
|
|
47
47
|
|
|
48
48
|
<Popover v-if="item.desc">
|
|
49
49
|
<template #content>
|
|
50
|
-
{{ item.desc }}
|
|
50
|
+
<div style="max-width: 400px;">{{ item.desc }}</div>
|
|
51
51
|
</template>
|
|
52
52
|
<QuestionCircleOutlined class=" crane-week-color"/>
|
|
53
53
|
</Popover>
|
|
54
54
|
|
|
55
55
|
<Popover v-if="item.relatedDepartments">
|
|
56
56
|
<template #content>
|
|
57
|
-
|
|
57
|
+
<div style="max-width: 400px;">
|
|
58
|
+
{{t('adaptDepartment')}}:{{ item.relatedDepartments.map((item: any) => {
|
|
58
59
|
return item.name;
|
|
59
60
|
}).join('、') }}
|
|
61
|
+
</div>
|
|
60
62
|
</template>
|
|
61
63
|
<span class="crane-flex-center crane-margin-left-4">
|
|
62
64
|
<img :src="departmentImg" height="14" width="14">
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
onOk: () => {
|
|
22
22
|
window.open(url);
|
|
23
23
|
modal1.destroy();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
callback && callback();
|
|
25
|
+
window.YQG_PERMISSION_CALLBACK && window.YQG_PERMISSION_CALLBACK();
|
|
26
|
+
if (!window.YQG_PERMISSION_CALLBACK && !callback) {
|
|
27
27
|
location.reload();
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
onCancel: () => {
|
|
31
31
|
modal1.destroy();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
callback && callback();
|
|
33
|
+
window.YQG_PERMISSION_CALLBACK && window.YQG_PERMISSION_CALLBACK();
|
|
34
|
+
if (!window.YQG_PERMISSION_CALLBACK && !callback) {
|
|
35
35
|
location.reload();
|
|
36
36
|
}
|
|
37
37
|
},
|
package/src/i18n/en-US.ts
CHANGED
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
applyReason: '申请理由',
|
|
5
5
|
approvalProcess: '审批流程',
|
|
6
6
|
applyReason1: '新入职员工申请',
|
|
7
|
-
applyReason2: '
|
|
7
|
+
applyReason2: '项目需要',
|
|
8
8
|
applyReason3: '数据查询与分析',
|
|
9
9
|
applyReasonPlaceholder: '请尽可能详细描述申请理由',
|
|
10
10
|
cancel: '取消',
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
adaptDepartment: '适用部门',
|
|
21
21
|
noApprovalProcess: '无审批流程',
|
|
22
22
|
excessTips: '一次最多可申请{number}个权限',
|
|
23
|
-
unavailableTips: '
|
|
23
|
+
unavailableTips: '您暂无权限查看/操作该页面,请点击下方按钮进行申请',
|
|
24
24
|
appliedTips: '权限已申请,正在{status}...',
|
|
25
25
|
unapplyTips: '您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,',
|
|
26
26
|
callManager: '如有需要请联系系统管理员',
|
package/src/i18n/zh-CH.ts
CHANGED
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
applyReason: '申请理由',
|
|
5
5
|
approvalProcess: '审批流程',
|
|
6
6
|
applyReason1: '新入职员工申请',
|
|
7
|
-
applyReason2: '
|
|
7
|
+
applyReason2: '项目需要',
|
|
8
8
|
applyReason3: '数据查询与分析',
|
|
9
9
|
applyReasonPlaceholder: '请尽可能详细描述申请理由',
|
|
10
10
|
cancel: '取消',
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
adaptDepartment: '适用部门',
|
|
21
21
|
noApprovalProcess: '无审批流程',
|
|
22
22
|
excessTips: '一次最多可申请{number}个权限',
|
|
23
|
-
unavailableTips: '
|
|
23
|
+
unavailableTips: '您暂无权限查看/操作该页面,请点击下方按钮进行申请',
|
|
24
24
|
appliedTips: '权限已申请,正在{status}...',
|
|
25
25
|
unapplyTips: '您暂无权限查看/操作该页面,且该页面中没有您可以申请的权限,',
|
|
26
26
|
callManager: '如有需要请联系系统管理员',
|
package/src/typings/index.d.ts
CHANGED
package/src/vite-env.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
1
|
+
/// <reference types="vite/client" />
|