@pubinfo/module-rbac 2.0.4 → 2.0.6
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/ComponentSelect-HWE3OTC2.js +2 -0
- package/dist/{ComponentSelect-Bhl9ciUm.js → ComponentSelect-lvLZA7v3.js} +866 -866
- package/dist/DynamicRoutesForm--yCRC-TS.js +4 -0
- package/dist/{DynamicRoutesForm-CE2RPs7y.js → DynamicRoutesForm-CjrPnJvX.js} +28 -28
- package/dist/{IconSelect-BeZfjsl0.js → IconSelect-B0CeuV_a.js} +1 -1
- package/dist/{IconSelect-BMlRIxBx.js → IconSelect-BRVj6gBy.js} +18 -18
- package/dist/{ImportExport-D8uzaOMz.js → ImportExport-BNLVq0fU.js} +1 -1
- package/dist/{ImportExport-ByRTssxP.js → ImportExport-HsLm0AJH.js} +63 -63
- package/dist/{ResourceEdit-BSaHxlbT.js → ResourceEdit-DGiYedP0.js} +100 -100
- package/dist/{ResourceEdit-Beu0QLBf.js → ResourceEdit-DZP72kyb.js} +4 -4
- package/dist/{ResourceRelation-CKolCnHC.js → ResourceRelation-BxGFnyVc.js} +1 -1
- package/dist/{ResourceRelation-BRseTUw2.js → ResourceRelation-DCjMjLpg.js} +1 -1
- package/dist/{ResourceRelation-B_4woLmP.js → ResourceRelation-DhML3AFe.js} +5 -5
- package/dist/ResourceRelation.css +1 -1
- package/dist/ResourceRelation2.css +1 -1
- package/dist/{ResourceSelector-ConJ30Jd.js → ResourceSelector-BAZ-oIRV.js} +46 -46
- package/dist/ResourceSelector.css +1 -1
- package/dist/RoleRelation-Bxyd5aMn.js +2 -0
- package/dist/{RoleRelation-DXZxscPY.js → RoleRelation-CcgE6TEG.js} +1 -1
- package/dist/RoleSelector-QpcO4KoV.js +279 -0
- package/dist/{TenantEdit-B5_v0C8I.js → TenantEdit-CRhsWhhw.js} +19 -19
- package/dist/{TenantEdit-C28473_2.js → TenantEdit-egH6GbbS.js} +2 -2
- package/dist/UserAuthorization-B0lHeayD.js +4 -0
- package/dist/{UserAuthorization-DTgmWH5Q.js → UserAuthorization-D-LcHhsj.js} +5 -5
- package/dist/UserAuthorization.css +1 -1
- package/dist/{UserEdit-EOTBOUZu.js → UserEdit-6MPOr7VK.js} +23 -23
- package/dist/{UserEdit-CyCXz7g3.js → UserEdit-DGefh7mk.js} +1 -1
- package/dist/{blackWhiteList-DQALdBZf.js → blackWhiteList-CFnWvnIK.js} +8 -8
- package/dist/blackWhiteList.css +1 -1
- package/dist/{breadcrumb_setting-D3UjJYhA.js → breadcrumb_setting-BbdvbC4M.js} +27 -27
- package/dist/breadcrumb_setting.css +1 -1
- package/dist/components/ResourceSelector/hooks/useAppAndResource.d.ts +6 -15
- package/dist/components/RoleSelector/useRole.d.ts +4 -68
- package/dist/{createAndEditDataPermission-DnAcKvaE.js → createAndEditDataPermission-39GKHtzB.js} +50 -50
- package/dist/{createAndEditDataPermission-CAaxueTy.js → createAndEditDataPermission-BBSBwjG4.js} +2 -2
- package/dist/createAndEditDataPermission.css +1 -1
- package/dist/{data-permission-CLnnLoPt.js → data-permission-35wTSMh2.js} +3 -3
- package/dist/data-permission.css +1 -1
- package/dist/{dictionary-BFM0Mx0P.js → dictionary-BOuYUlfU.js} +1 -1
- package/dist/{drawerBlackWhiteList-BYACpO3D.js → drawerBlackWhiteList-BZccd_CZ.js} +8 -8
- package/dist/drawerBlackWhiteList-Bz2trn-w.js +3 -0
- package/dist/{drawerDictionary-BUBLrbTi.js → drawerDictionary-C2tWu1lt.js} +11 -11
- package/dist/{drawerDictionary-Bk0BgL7i.js → drawerDictionary-Cx-QoHn4.js} +1 -1
- package/dist/{drawerDictionaryItem-CfOPleN6.js → drawerDictionaryItem-C4mPbQEA.js} +12 -12
- package/dist/{drawerDictionaryItem-Dy2T56AH.js → drawerDictionaryItem-DhwinX1a.js} +1 -1
- package/dist/{drawerGroup-ZyzAWXOl.js → drawerGroup-BUx0cx6i.js} +1 -1
- package/dist/{drawerGroup-Bly3CWfM.js → drawerGroup-DFeiJOBA.js} +9 -9
- package/dist/{drawerOrganization-BhO5-PP5.js → drawerOrganization-BEdhq7Z2.js} +26 -26
- package/dist/{drawerOrganization-HSVB8JzO.js → drawerOrganization-ijhmuc8a.js} +1 -1
- package/dist/{drawerPosition-vsuG4JYe.js → drawerPosition-shL7hfwJ.js} +1 -1
- package/dist/{drawerPosition-CM0NBfoR.js → drawerPosition-xI2PyE2x.js} +14 -14
- package/dist/{drawerRegion-CGySAL6D.js → drawerRegion-BwWGUHaY.js} +16 -16
- package/dist/{drawerRegion-BXZ751ge.js → drawerRegion-Dl1qXPXz.js} +1 -1
- package/dist/{drawerRole-BE0utb7R.js → drawerRole-C1I6-hhT.js} +8 -8
- package/dist/{drawerRole-CwilBmOE.js → drawerRole-CZpTYFS3.js} +10 -10
- package/dist/drawerRole-CgTIHRCA.js +3 -0
- package/dist/{drawerRole-BVeaz3Yb.js → drawerRole-Cmrob1UJ.js} +2 -2
- package/dist/drawerRole-D2UxgYXQ.js +215 -0
- package/dist/{drawerRole-tan379DU.js → drawerRole-DynkfVMp.js} +2 -2
- package/dist/{group-B1gGoTD5.js → group-DOmpCW1J.js} +8 -8
- package/dist/group.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +78 -78
- package/dist/{itemlist-uCHnA_We.js → itemlist-QBWRLjTd.js} +1 -1
- package/dist/{layout_setting-DMvxwL31.js → layout_setting-BZt_X9vU.js} +17 -17
- package/dist/layout_setting.css +1 -1
- package/dist/{login_history-BexfCN-1.js → login_history-NTSjr6e5.js} +3 -3
- package/dist/login_history.css +1 -1
- package/dist/{menu_setting-BXR3EAXD.js → menu_setting-CkoDAYJD.js} +38 -38
- package/dist/menu_setting.css +1 -1
- package/dist/{operate_history-hXxS3atI.js → operate_history-CXoZlYaT.js} +3 -3
- package/dist/operate_history.css +1 -1
- package/dist/{organization-cvYm9P9w.js → organization-DmGbwqHI.js} +2642 -2642
- package/dist/organization.css +1 -1
- package/dist/{other_setting-DjVQevBW.js → other_setting-BqWwlJ2u.js} +64 -64
- package/dist/other_setting.css +1 -1
- package/dist/{page_animation_setting-DgHHmFEc.js → page_animation_setting-g3bkn7vf.js} +48 -48
- package/dist/page_animation_setting.css +1 -1
- package/dist/{page_w_setting-B_im6vBo.js → page_w_setting-Db9pP86g.js} +17 -17
- package/dist/page_w_setting.css +1 -1
- package/dist/{position-BkpbHXYP.js → position-Bq4B3_PK.js} +1 -1
- package/dist/{region-DVkbjI9t.js → region-DfxAE8eK.js} +4 -4
- package/dist/{resource-UmUb9yZa.js → resource-rP8m6eP_.js} +8 -8
- package/dist/{role-B2tKqUvP.js → role-DfWw95NS.js} +3 -3
- package/dist/{role_group-DqzFHwKx.js → role_group-B4J4RWQt.js} +2 -2
- package/dist/{setItem-9ZBl0BlF.js → setItem-C_jx_5fd.js} +1 -1
- package/dist/{setItem-BenNySNl.js → setItem-DnJuD3C0.js} +32 -32
- package/dist/setItem.css +1 -1
- package/dist/stores/view.d.ts +21 -126
- package/dist/{tabbar_setting-HFHrLVgt.js → tabbar_setting-DBPggZ6Q.js} +33 -33
- package/dist/tabbar_setting.css +1 -1
- package/dist/{tenant-C8kVbfgt.js → tenant-Dbydqvrz.js} +2 -2
- package/dist/{theme_setting-QgpSGXxq.js → theme_setting-3l5L7tXt.js} +5 -5
- package/dist/theme_setting.css +1 -1
- package/dist/{toolbar_setting-Dc_h2Mfe.js → toolbar_setting-rv8EGChc.js} +30 -30
- package/dist/toolbar_setting.css +1 -1
- package/dist/{user-Dub4HhCZ.js → user-DQE6N5EP.js} +9 -9
- package/dist/user.css +1 -1
- package/dist/utils/routeSystem.d.ts +21 -126
- package/dist/views/blackWhiteList/index.vue.d.ts +40 -40
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +4 -4
- package/dist/views/data-permission/index.vue.d.ts +44 -44
- package/dist/views/dictionary/index.vue.d.ts +40 -40
- package/dist/views/dictionary/itemlist.vue.d.ts +40 -40
- package/dist/views/group/index.vue.d.ts +40 -40
- package/dist/views/log_center/components/browserType.vue.d.ts +2 -2
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +2 -2
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +2 -2
- package/dist/views/log_center/login_history.vue.d.ts +40 -40
- package/dist/views/log_center/operate_history.vue.d.ts +40 -40
- package/dist/views/position/index.vue.d.ts +40 -40
- package/dist/views/region/index.vue.d.ts +40 -40
- package/dist/views/resource/hooks/useMetaForm.d.ts +1 -8
- package/dist/views/resource/index.vue.d.ts +40 -40
- package/dist/views/role/components/ResourceRelation.vue.d.ts +40 -40
- package/dist/views/role/index.vue.d.ts +80 -80
- package/dist/views/role_group/index.vue.d.ts +40 -40
- package/dist/views/tenant/index.vue.d.ts +40 -40
- package/dist/views/user/index.vue.d.ts +40 -40
- package/dist/{watermark_setting-BcWy6p2_.js → watermark_setting-B_jC4rjv.js} +106 -106
- package/dist/watermark_setting.css +1 -1
- package/package.json +3 -3
- package/src/assets/styles/vxe-table.css +4 -4
- package/dist/ComponentSelect-Bhwuc86o.js +0 -2
- package/dist/DynamicRoutesForm-D35jFnxF.js +0 -4
- package/dist/RoleRelation-YaSQQxQ2.js +0 -2
- package/dist/RoleSelector-DOt30OLy.js +0 -279
- package/dist/UserAuthorization-C4SLMNmh.js +0 -4
- package/dist/drawerBlackWhiteList-C3xS7Kxx.js +0 -3
- package/dist/drawerRole-CzTW_I2H.js +0 -3
- package/dist/drawerRole-E1jHM3v-.js +0 -215
|
@@ -1 +1 @@
|
|
|
1
|
-
.item_ani[data-v-
|
|
1
|
+
.item_ani[data-v-0ecfa3a5]{background-color:var(--g-bg);border:1px solid var(--g-tabbar-tab-hover-bg);border-radius:.5rem;flex-direction:column;place-items:center;padding-top:26px;display:flex}.item_ani .jb[data-v-0ecfa3a5]{background:linear-gradient(180deg,var(--g-container-bg)0%,#fff0 100%)}.bar-header[data-v-0ecfa3a5]{background:var(--g-bg)}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/module-rbac",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.6",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@pubinfo/pro-components": "^1.7.3",
|
|
25
25
|
"alova": "^3.3.4",
|
|
26
26
|
"ant-design-vue": "^4.2.6",
|
|
27
|
-
"pubinfo": "2.0.
|
|
27
|
+
"pubinfo": "2.0.6"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@destyler/color-picker": "^0.1.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"alova": "^3.3.4",
|
|
49
49
|
"ant-design-vue": "^4.2.6",
|
|
50
50
|
"type-fest": "^4.41.0",
|
|
51
|
-
"pubinfo": "2.0.
|
|
51
|
+
"pubinfo": "2.0.6"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "pubinfo build -w --sourcemap",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@import "vxe-table/lib/style.css";
|
|
2
2
|
|
|
3
|
-
html.dark
|
|
4
|
-
html.dark
|
|
5
|
-
html.dark
|
|
6
|
-
html.dark
|
|
3
|
+
html.dark,
|
|
4
|
+
html.dark *,
|
|
5
|
+
html.dark::before,
|
|
6
|
+
html.dark::after {
|
|
7
7
|
--vxe-table-header-background-color: #1d1d1d;
|
|
8
8
|
--vxe-table-body-background-color: #141414;
|
|
9
9
|
--vxe-table-border-color: rgb(253 253 253 / 12%);
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { $ as e, U as t, V as n, am as r } from "./index.js";
|
|
2
|
-
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, mergeModels as m, mergeProps as h, normalizeProps as g, normalizeStyle as _, onMounted as v, openBlock as y, reactive as b, ref as x, renderList as S, resolveComponent as C, toDisplayString as w, unref as T, useModel as E, vShow as D, withCtx as O, withDirectives as k } from "vue";
|
|
3
|
-
import { CloseOutlined as A, SearchOutlined as j } from "@ant-design/icons-vue";
|
|
4
|
-
import { Card as M, Checkbox as N, CheckboxGroup as P, Modal as F, Spin as I, Tooltip as L, theme as R } from "ant-design-vue";
|
|
5
|
-
import { Input as z, Select as B, SelectOption as V, Tooltip as H } from "ant-design-vue/es";
|
|
6
|
-
const U = { key: 1 };
|
|
7
|
-
var W = /* @__PURE__ */ f({
|
|
8
|
-
name: "RoleSearch",
|
|
9
|
-
__name: "RoleSearch",
|
|
10
|
-
props: /* @__PURE__ */ m({ group: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: !1
|
|
13
|
-
} }, {
|
|
14
|
-
modelValue: {},
|
|
15
|
-
modelModifiers: {},
|
|
16
|
-
groupId: {},
|
|
17
|
-
groupIdModifiers: {}
|
|
18
|
-
}),
|
|
19
|
-
emits: /* @__PURE__ */ m(["select"], ["update:modelValue", "update:groupId"]),
|
|
20
|
-
setup(e, { emit: n }) {
|
|
21
|
-
let r = e, a = n, s = E(e, "modelValue"), l = E(e, "groupId"), f = x([]);
|
|
22
|
-
async function p() {
|
|
23
|
-
let e = await t({ name: "" });
|
|
24
|
-
e.success && (f.value = e.data ?? []);
|
|
25
|
-
}
|
|
26
|
-
return v(() => {
|
|
27
|
-
r.group && p();
|
|
28
|
-
}), (e, t) => {
|
|
29
|
-
let n = V, r = H, p = B, m = z;
|
|
30
|
-
return y(), o(m, {
|
|
31
|
-
value: s.value,
|
|
32
|
-
"onUpdate:value": t[2] ||= (e) => s.value = e,
|
|
33
|
-
placeholder: "请输入",
|
|
34
|
-
"allow-clear": ""
|
|
35
|
-
}, {
|
|
36
|
-
addonBefore: O(() => [e.group ? (y(), o(p, {
|
|
37
|
-
key: 0,
|
|
38
|
-
value: l.value,
|
|
39
|
-
"onUpdate:value": t[0] ||= (e) => l.value = e,
|
|
40
|
-
style: { width: "90px" },
|
|
41
|
-
onChange: t[1] ||= (e) => a("select", e)
|
|
42
|
-
}, {
|
|
43
|
-
default: O(() => [d(n, { value: "" }, {
|
|
44
|
-
default: O(() => t[3] ||= [u(" 全部 ")]),
|
|
45
|
-
_: 1,
|
|
46
|
-
__: [3]
|
|
47
|
-
}), (y(!0), c(i, null, S(f.value, (e) => (y(), o(n, {
|
|
48
|
-
key: e.id,
|
|
49
|
-
value: e.id
|
|
50
|
-
}, {
|
|
51
|
-
default: O(() => [d(r, { title: e.name }, {
|
|
52
|
-
default: O(() => [u(w(e.name), 1)]),
|
|
53
|
-
_: 2
|
|
54
|
-
}, 1032, ["title"])]),
|
|
55
|
-
_: 2
|
|
56
|
-
}, 1032, ["value"]))), 128))]),
|
|
57
|
-
_: 1
|
|
58
|
-
}, 8, ["value"])) : (y(), c("div", U, " 全部 "))]),
|
|
59
|
-
suffix: O(() => [d(T(j))]),
|
|
60
|
-
_: 1
|
|
61
|
-
}, 8, ["value"]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}), G = W, K = /* @__PURE__ */ f({
|
|
65
|
-
name: "TooltipLabel",
|
|
66
|
-
inheritAttrs: !1,
|
|
67
|
-
__name: "TooltipLabel",
|
|
68
|
-
props: {
|
|
69
|
-
name: {},
|
|
70
|
-
size: { default: 21 }
|
|
71
|
-
},
|
|
72
|
-
setup(e) {
|
|
73
|
-
return (e, t) => (e.name || "").length > e.size ? (y(), o(T(L), {
|
|
74
|
-
key: 0,
|
|
75
|
-
title: e.name
|
|
76
|
-
}, {
|
|
77
|
-
default: O(() => [l("span", g(p(e.$attrs)), w(`${e.name?.slice(0, e.size)}...`), 17)]),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 8, ["title"])) : (y(), c("span", g(h({ key: 1 }, e.$attrs)), w(e.name), 17));
|
|
80
|
-
}
|
|
81
|
-
}), q = K;
|
|
82
|
-
function J() {
|
|
83
|
-
let [t, n] = r(!1), i = x([]);
|
|
84
|
-
async function a() {
|
|
85
|
-
try {
|
|
86
|
-
n(!0);
|
|
87
|
-
let t = await e();
|
|
88
|
-
t.success && (i.value = t.data ?? []);
|
|
89
|
-
} finally {
|
|
90
|
-
n(!1);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
loading: t,
|
|
95
|
-
setLoading: n,
|
|
96
|
-
roles: i,
|
|
97
|
-
getData: a
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function Y() {
|
|
101
|
-
let [e, t] = r(!1), i = x([]);
|
|
102
|
-
async function a(e) {
|
|
103
|
-
try {
|
|
104
|
-
t(!0);
|
|
105
|
-
let r = await n({ id: e });
|
|
106
|
-
r.success && (i.value = r.data?.roles ?? []);
|
|
107
|
-
} finally {
|
|
108
|
-
t(!1);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
return {
|
|
112
|
-
loading: e,
|
|
113
|
-
setLoading: t,
|
|
114
|
-
roles: i,
|
|
115
|
-
getData: a
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
const X = { class: "h-full flex" }, Z = { class: "p-2 flex flex-col h-full gap-2" }, Q = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, $ = {
|
|
119
|
-
key: 0,
|
|
120
|
-
class: "flex items-center justify-center size-full"
|
|
121
|
-
}, ee = { class: "gap-1 p-2 h-full overflow-y-auto" };
|
|
122
|
-
var te = /* @__PURE__ */ f({
|
|
123
|
-
name: "RoleSelector",
|
|
124
|
-
__name: "RoleSelector",
|
|
125
|
-
props: /* @__PURE__ */ m({ group: {
|
|
126
|
-
type: Boolean,
|
|
127
|
-
default: !1
|
|
128
|
-
} }, {
|
|
129
|
-
open: { type: Boolean },
|
|
130
|
-
openModifiers: {}
|
|
131
|
-
}),
|
|
132
|
-
emits: /* @__PURE__ */ m(["select"], ["update:open"]),
|
|
133
|
-
setup(e, { expose: t, emit: n }) {
|
|
134
|
-
let u = n, { token: f } = R.useToken(), p = E(e, "open"), m = r(p), h = x([]), g = b(J()), v = b(Y()), C = x(""), w = x("");
|
|
135
|
-
async function j(e) {
|
|
136
|
-
await v.getData(e);
|
|
137
|
-
}
|
|
138
|
-
async function L(e = []) {
|
|
139
|
-
h.value = e, C.value = "", w.value = "", await g.getData(), m(!0);
|
|
140
|
-
}
|
|
141
|
-
let z = a(() => w.value === "" ? g.roles : v.roles);
|
|
142
|
-
function B(e) {
|
|
143
|
-
return z.value.findIndex((t) => t.id === e.id) > -1 && e.name?.includes(C.value);
|
|
144
|
-
}
|
|
145
|
-
function V(e, t) {
|
|
146
|
-
e.target.checked ? h.value.push({
|
|
147
|
-
value: t.id,
|
|
148
|
-
label: t.name
|
|
149
|
-
}) : h.value = h.value.filter((e) => e.value !== t.id);
|
|
150
|
-
}
|
|
151
|
-
function H(e) {
|
|
152
|
-
h.value = h.value.filter((t) => t.value !== e);
|
|
153
|
-
}
|
|
154
|
-
function U() {
|
|
155
|
-
u("select", h.value), m(!1);
|
|
156
|
-
}
|
|
157
|
-
function W() {
|
|
158
|
-
let e = h.value.filter((e) => !g.roles.some((t) => t.id === e.value));
|
|
159
|
-
h.value = e;
|
|
160
|
-
}
|
|
161
|
-
return t({ open: L }), (e, t) => (y(), o(T(F), {
|
|
162
|
-
open: p.value,
|
|
163
|
-
"onUpdate:open": t[3] ||= (e) => p.value = e,
|
|
164
|
-
title: "角色选择",
|
|
165
|
-
"mask-closable": !1,
|
|
166
|
-
width: 750,
|
|
167
|
-
"z-index": 1001,
|
|
168
|
-
"ok-text": "确认",
|
|
169
|
-
"cancel-text": "取消",
|
|
170
|
-
"destroy-on-close": "",
|
|
171
|
-
onOk: t[4] ||= (e) => U()
|
|
172
|
-
}, {
|
|
173
|
-
default: O(() => [l("div", {
|
|
174
|
-
class: "border border-solid h-[400px]",
|
|
175
|
-
style: _({ borderColor: T(f).colorBorder })
|
|
176
|
-
}, [l("div", X, [
|
|
177
|
-
d(T(M), {
|
|
178
|
-
bordered: !1,
|
|
179
|
-
size: "small",
|
|
180
|
-
"head-style": {
|
|
181
|
-
backgroundColor: T(f).colorBgLayout,
|
|
182
|
-
borderRadius: 0,
|
|
183
|
-
borderWidth: 0,
|
|
184
|
-
borderBottomWidth: "1px",
|
|
185
|
-
padding: 0
|
|
186
|
-
},
|
|
187
|
-
"body-style": {
|
|
188
|
-
flex: 1,
|
|
189
|
-
padding: 0,
|
|
190
|
-
height: "calc(100% - 38px)"
|
|
191
|
-
},
|
|
192
|
-
style: _({
|
|
193
|
-
boxShadow: "none",
|
|
194
|
-
borderRadius: 0,
|
|
195
|
-
borderColor: T(f).colorBorder
|
|
196
|
-
}),
|
|
197
|
-
class: "flex h-full flex-col w-1/2"
|
|
198
|
-
}, {
|
|
199
|
-
default: O(() => [l("div", Z, [d(G, {
|
|
200
|
-
modelValue: C.value,
|
|
201
|
-
"onUpdate:modelValue": t[0] ||= (e) => C.value = e,
|
|
202
|
-
"group-id": w.value,
|
|
203
|
-
"onUpdate:groupId": t[1] ||= (e) => w.value = e,
|
|
204
|
-
group: e.group,
|
|
205
|
-
onSelect: j
|
|
206
|
-
}, null, 8, [
|
|
207
|
-
"modelValue",
|
|
208
|
-
"group-id",
|
|
209
|
-
"group"
|
|
210
|
-
]), l("div", Q, [g.loading || v.loading ? (y(), c("div", $, [d(T(I))])) : (y(), o(T(P), {
|
|
211
|
-
key: 1,
|
|
212
|
-
value: h.value.map((e) => e.value),
|
|
213
|
-
class: "w-full overflow-x-hidden"
|
|
214
|
-
}, {
|
|
215
|
-
default: O(() => [(y(!0), c(i, null, S(z.value, (e) => k((y(), c("div", {
|
|
216
|
-
key: e.id,
|
|
217
|
-
class: "w-full py-2 border-0 border-b border-solid truncate",
|
|
218
|
-
style: _({ borderColor: T(f).colorBorder })
|
|
219
|
-
}, [d(T(N), {
|
|
220
|
-
value: e.id,
|
|
221
|
-
onChange: (t) => V(t, e)
|
|
222
|
-
}, {
|
|
223
|
-
default: O(() => [d(q, { name: e.name }, null, 8, ["name"])]),
|
|
224
|
-
_: 2
|
|
225
|
-
}, 1032, ["value", "onChange"])], 4)), [[D, B(e)]])), 128))]),
|
|
226
|
-
_: 1
|
|
227
|
-
}, 8, ["value"]))])])]),
|
|
228
|
-
_: 1
|
|
229
|
-
}, 8, ["head-style", "style"]),
|
|
230
|
-
l("div", {
|
|
231
|
-
style: _({ borderColor: T(f).colorBorder }),
|
|
232
|
-
class: "h-full border-0 border-r border-solid"
|
|
233
|
-
}, null, 4),
|
|
234
|
-
d(T(M), {
|
|
235
|
-
bordered: !1,
|
|
236
|
-
size: "small",
|
|
237
|
-
"head-style": {
|
|
238
|
-
backgroundColor: T(f).colorBgLayout,
|
|
239
|
-
borderRadius: 0,
|
|
240
|
-
borderWidth: 0,
|
|
241
|
-
borderBottomWidth: "1px"
|
|
242
|
-
},
|
|
243
|
-
"body-style": {
|
|
244
|
-
flex: 1,
|
|
245
|
-
padding: 0,
|
|
246
|
-
overflow: "hidden"
|
|
247
|
-
},
|
|
248
|
-
style: {
|
|
249
|
-
boxShadow: "none",
|
|
250
|
-
borderRadius: 0
|
|
251
|
-
},
|
|
252
|
-
class: "flex h-full flex-col flex-1"
|
|
253
|
-
}, {
|
|
254
|
-
title: O(() => t[5] ||= [l("span", { class: "font-normal" }, " 已选角色 ", -1)]),
|
|
255
|
-
extra: O(() => [l("a", {
|
|
256
|
-
style: _({ color: T(f).colorPrimary }),
|
|
257
|
-
onClick: t[2] ||= (e) => W()
|
|
258
|
-
}, " 清空 ", 4)]),
|
|
259
|
-
default: O(() => [l("div", ee, [(y(!0), c(i, null, S(h.value, (e) => (y(), c("div", {
|
|
260
|
-
key: e.value,
|
|
261
|
-
class: "inline-block mb-1 py-1 px-2 mx-0.5 max-w-full rounded",
|
|
262
|
-
style: _({ backgroundColor: T(f).colorPrimaryBg })
|
|
263
|
-
}, [d(q, {
|
|
264
|
-
name: e.label,
|
|
265
|
-
size: 20
|
|
266
|
-
}, null, 8, ["name"]), g.roles.some((t) => t.id === e.value) ? (y(), o(T(A), {
|
|
267
|
-
key: 0,
|
|
268
|
-
class: "ml-1 cursor-pointer text-xs",
|
|
269
|
-
style: _({ color: T(f).colorPrimary }),
|
|
270
|
-
onClick: (t) => H(e.value)
|
|
271
|
-
}, null, 8, ["style", "onClick"])) : s("v-if", !0)], 4))), 128))])]),
|
|
272
|
-
_: 1
|
|
273
|
-
}, 8, ["head-style"])
|
|
274
|
-
])], 4)]),
|
|
275
|
-
_: 1
|
|
276
|
-
}, 8, ["open"]));
|
|
277
|
-
}
|
|
278
|
-
}), ne = te;
|
|
279
|
-
export { ne as b };
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import { Z as e, a1 as t, a3 as n, am as r } from "./index.js";
|
|
2
|
-
import { b as i } from "./useAppAndResource-CeMCjg2v.js";
|
|
3
|
-
import { b as a } from "./ResourceSelector-ConJ30Jd.js";
|
|
4
|
-
import { Fragment as o, createBlock as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, isRef as ee, openBlock as p, reactive as m, ref as h, renderList as g, resolveComponent as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
5
|
-
import { message as x } from "ant-design-vue";
|
|
6
|
-
import { Button as te, Drawer as S, Form as C, FormItem as w, Input as T, Select as E, Space as D, Switch as O, Textarea as k, Tooltip as A } from "ant-design-vue/es";
|
|
7
|
-
let j = /* @__PURE__ */ function(e) {
|
|
8
|
-
return e.ADD = "新增", e.EDIT = "修改", e.REMOVE = "删除", e.RESOURCE_RELATION = "分配查看", e;
|
|
9
|
-
}({}), M = /* @__PURE__ */ function(e) {
|
|
10
|
-
return e.OWNER = "1", e.ALL = "2", e;
|
|
11
|
-
}({}), N = /* @__PURE__ */ function(e) {
|
|
12
|
-
return e[e.ON = 1] = "ON", e[e.OFF = 0] = "OFF", e;
|
|
13
|
-
}({});
|
|
14
|
-
const P = [{
|
|
15
|
-
label: "仅自己",
|
|
16
|
-
value: M.OWNER
|
|
17
|
-
}, {
|
|
18
|
-
label: "全部可见",
|
|
19
|
-
value: M.ALL
|
|
20
|
-
}];
|
|
21
|
-
N.ON, N.OFF;
|
|
22
|
-
const F = { class: "pt-10px" }, I = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, L = {
|
|
23
|
-
key: 1,
|
|
24
|
-
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
25
|
-
};
|
|
26
|
-
var R = /* @__PURE__ */ f({
|
|
27
|
-
name: "DrawerRole",
|
|
28
|
-
__name: "drawerRole",
|
|
29
|
-
emits: ["submit"],
|
|
30
|
-
setup(f, { expose: _, emit: M }) {
|
|
31
|
-
let N = M, { resourceModelRef: R, selectedResources: z, updateTreeDataAndResourceMap: B, setSelectedResources: V, updateSelectedResources: H, clearSelectedResources: U, openResourceModel: W } = i(), G = {
|
|
32
|
-
name: [{
|
|
33
|
-
required: !0,
|
|
34
|
-
message: "请输入名称",
|
|
35
|
-
trigger: "change"
|
|
36
|
-
}, {
|
|
37
|
-
min: 2,
|
|
38
|
-
max: 32,
|
|
39
|
-
message: "角色名称长度不能少于2位,不能超过32位",
|
|
40
|
-
trigger: "change"
|
|
41
|
-
}],
|
|
42
|
-
code: [{
|
|
43
|
-
required: !0,
|
|
44
|
-
message: "请输入编号",
|
|
45
|
-
trigger: "change"
|
|
46
|
-
}, {
|
|
47
|
-
min: 2,
|
|
48
|
-
max: 32,
|
|
49
|
-
message: "角色编码长度不能少于2位,不能超过32位",
|
|
50
|
-
trigger: "change"
|
|
51
|
-
}],
|
|
52
|
-
viewScope: [{
|
|
53
|
-
required: !0,
|
|
54
|
-
message: "请选择可见范围",
|
|
55
|
-
trigger: "change"
|
|
56
|
-
}],
|
|
57
|
-
resourceIds: [{
|
|
58
|
-
required: !0,
|
|
59
|
-
validator: K,
|
|
60
|
-
trigger: ["blur", "change"]
|
|
61
|
-
}]
|
|
62
|
-
};
|
|
63
|
-
function K(e, t) {
|
|
64
|
-
return t && t.length > 0 ? Promise.resolve() : Promise.reject(/* @__PURE__ */ Error("请选择所属资源"));
|
|
65
|
-
}
|
|
66
|
-
let q = m({
|
|
67
|
-
title: "",
|
|
68
|
-
type: ""
|
|
69
|
-
}), [J, Y] = r(!1), X = h(), Z = h({ enable: !0 });
|
|
70
|
-
async function ne(t, n) {
|
|
71
|
-
if (q.title = t, t === j.EDIT) {
|
|
72
|
-
let t = await e({ id: n?.id });
|
|
73
|
-
t.success && (Z.value = t.data ?? {}, await B(""), Z.value.resourceIds && H(Z.value.resourceIds));
|
|
74
|
-
} else Z.value = { enable: !0 }, U(), await B("");
|
|
75
|
-
Y(!0);
|
|
76
|
-
}
|
|
77
|
-
let [re, Q] = r(!1);
|
|
78
|
-
function ie() {
|
|
79
|
-
let e = q.title === j.EDIT ? n : t;
|
|
80
|
-
X.value?.validate().then(() => {
|
|
81
|
-
Q(!0);
|
|
82
|
-
let t = { ...Z.value };
|
|
83
|
-
e(t).then((e) => {
|
|
84
|
-
e.success && (x.success(`${q.title}成功!`), Y(!1), N("submit"));
|
|
85
|
-
}).finally(() => Q(!1));
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
function $() {
|
|
89
|
-
Z.value = { enable: !0 }, Y(!1);
|
|
90
|
-
}
|
|
91
|
-
function ae() {
|
|
92
|
-
Z.value.resourceIds ? W(Z.value.resourceIds) : W([]);
|
|
93
|
-
}
|
|
94
|
-
function oe(e) {
|
|
95
|
-
Z.value.resourceIds = e.map((e) => e.id), V(e);
|
|
96
|
-
}
|
|
97
|
-
return _({ open: ne }), (e, t) => {
|
|
98
|
-
let n = T, r = w, i = E, f = O, m = k, h = te, _ = A, x = C, M = D, N = S;
|
|
99
|
-
return p(), s(N, {
|
|
100
|
-
open: y(J),
|
|
101
|
-
"onUpdate:open": t[6] ||= (e) => ee(J) ? J.value = e : null,
|
|
102
|
-
title: `${q.title}角色`,
|
|
103
|
-
placement: "right",
|
|
104
|
-
width: 600,
|
|
105
|
-
"destroy-on-close": "",
|
|
106
|
-
"footer-style": { textAlign: "right" },
|
|
107
|
-
onClose: $
|
|
108
|
-
}, {
|
|
109
|
-
footer: b(() => [d(M, null, {
|
|
110
|
-
default: b(() => [d(h, { onClick: $ }, {
|
|
111
|
-
default: b(() => t[8] ||= [u(" 取消 ")]),
|
|
112
|
-
_: 1,
|
|
113
|
-
__: [8]
|
|
114
|
-
}), d(h, {
|
|
115
|
-
type: "primary",
|
|
116
|
-
loading: y(re),
|
|
117
|
-
onClick: t[5] ||= (e) => ie()
|
|
118
|
-
}, {
|
|
119
|
-
default: b(() => t[9] ||= [u(" 提交 ")]),
|
|
120
|
-
_: 1,
|
|
121
|
-
__: [9]
|
|
122
|
-
}, 8, ["loading"])]),
|
|
123
|
-
_: 1
|
|
124
|
-
})]),
|
|
125
|
-
default: b(() => [d(x, {
|
|
126
|
-
ref_key: "formRef",
|
|
127
|
-
ref: X,
|
|
128
|
-
model: Z.value,
|
|
129
|
-
rules: G,
|
|
130
|
-
"label-col": { span: 4 }
|
|
131
|
-
}, {
|
|
132
|
-
default: b(() => [
|
|
133
|
-
d(r, {
|
|
134
|
-
label: "角色名称",
|
|
135
|
-
name: "name"
|
|
136
|
-
}, {
|
|
137
|
-
default: b(() => [d(n, {
|
|
138
|
-
value: Z.value.name,
|
|
139
|
-
"onUpdate:value": t[0] ||= (e) => Z.value.name = e,
|
|
140
|
-
maxlength: 32
|
|
141
|
-
}, null, 8, ["value"])]),
|
|
142
|
-
_: 1
|
|
143
|
-
}),
|
|
144
|
-
d(r, {
|
|
145
|
-
label: "角色编号",
|
|
146
|
-
name: "code"
|
|
147
|
-
}, {
|
|
148
|
-
default: b(() => [d(n, {
|
|
149
|
-
value: Z.value.code,
|
|
150
|
-
"onUpdate:value": t[1] ||= (e) => Z.value.code = e,
|
|
151
|
-
disabled: q.title === y(j).EDIT,
|
|
152
|
-
maxlength: 32
|
|
153
|
-
}, null, 8, ["value", "disabled"])]),
|
|
154
|
-
_: 1
|
|
155
|
-
}),
|
|
156
|
-
d(r, {
|
|
157
|
-
label: "可见范围",
|
|
158
|
-
name: "viewScope"
|
|
159
|
-
}, {
|
|
160
|
-
default: b(() => [d(i, {
|
|
161
|
-
value: Z.value.viewScope,
|
|
162
|
-
"onUpdate:value": t[2] ||= (e) => Z.value.viewScope = e,
|
|
163
|
-
options: y(P)
|
|
164
|
-
}, null, 8, ["value", "options"])]),
|
|
165
|
-
_: 1
|
|
166
|
-
}),
|
|
167
|
-
d(r, { label: "是否启用" }, {
|
|
168
|
-
default: b(() => [d(f, {
|
|
169
|
-
checked: Z.value.enable,
|
|
170
|
-
"onUpdate:checked": t[3] ||= (e) => Z.value.enable = e
|
|
171
|
-
}, null, 8, ["checked"])]),
|
|
172
|
-
_: 1
|
|
173
|
-
}),
|
|
174
|
-
d(r, { label: "角色描述" }, {
|
|
175
|
-
default: b(() => [d(m, {
|
|
176
|
-
value: Z.value.description,
|
|
177
|
-
"onUpdate:value": t[4] ||= (e) => Z.value.description = e,
|
|
178
|
-
maxlength: 250,
|
|
179
|
-
"show-count": ""
|
|
180
|
-
}, null, 8, ["value"])]),
|
|
181
|
-
_: 1
|
|
182
|
-
}),
|
|
183
|
-
d(r, {
|
|
184
|
-
label: "所属资源",
|
|
185
|
-
name: "resourceIds"
|
|
186
|
-
}, {
|
|
187
|
-
default: b(() => [d(h, {
|
|
188
|
-
type: "primary",
|
|
189
|
-
onClick: ae
|
|
190
|
-
}, {
|
|
191
|
-
default: b(() => t[7] ||= [u(" 编辑资源 ")]),
|
|
192
|
-
_: 1,
|
|
193
|
-
__: [7]
|
|
194
|
-
}), l("div", F, [(p(!0), c(o, null, g(y(z), (e) => (p(), c(o, { key: e }, [e.name.length > 20 ? (p(), s(_, {
|
|
195
|
-
key: 0,
|
|
196
|
-
title: e.name
|
|
197
|
-
}, {
|
|
198
|
-
default: b(() => [l("span", I, v(`${e.name.slice(0, 20)}...`), 1)]),
|
|
199
|
-
_: 2
|
|
200
|
-
}, 1032, ["title"])) : (p(), c("span", L, v(e.name), 1))], 64))), 128))])]),
|
|
201
|
-
_: 1
|
|
202
|
-
})
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
}, 8, ["model"]), d(a, {
|
|
206
|
-
ref_key: "resourceModelRef",
|
|
207
|
-
ref: R,
|
|
208
|
-
onSelect: oe
|
|
209
|
-
}, null, 512)]),
|
|
210
|
-
_: 1
|
|
211
|
-
}, 8, ["open", "title"]);
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
}), z = R;
|
|
215
|
-
export { z as b, j as c, P as d };
|