@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.11
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-A7uGTuHW.js +3498 -0
- package/dist/{DynamicRoutesForm-DP_sq_Uu.js → DynamicRoutesForm-DSzy_bh5.js} +43 -42
- package/dist/HCheckList-ODQHidN8.js +37 -0
- package/dist/HoverCard-CmJCoa2b.js +44 -0
- package/dist/{IconSelect-CiLpc63Z.js → IconSelect-DouEg3xY.js} +89 -88
- package/dist/ImportExport-DisdLoY8.js +342 -0
- package/dist/{LayoutForm-Cp4bBrYl.js → LayoutForm-Bdfs5WeK.js} +35 -34
- package/dist/{MetaForm-CVSgktB_.js → MetaForm-CcDwS8vh.js} +6128 -6143
- package/dist/{OrgAndPosition-ClASobEv.js → OrgAndPosition-jDX7m0HD.js} +61 -60
- package/dist/{ResourceEdit-w8qh1MFO.js → ResourceEdit-0BYZRye_.js} +128 -127
- package/dist/{ResourceRelation-ChEwIbWM.js → ResourceRelation-CU-QpUhP.js} +25 -25
- package/dist/{ResourceRelation-D_j898zp.js → ResourceRelation-roz0a8Td.js} +35 -34
- package/dist/{RoleRelation-DzyVn5dk.js → RoleRelation-BQQFaum0.js} +28 -27
- package/dist/{RoleSelector-Cd6_RUsc.js → RoleSelector-gkar_UGG.js} +89 -89
- package/dist/{TenantEdit-BOvXk7BZ.js → TenantEdit-BsahDUlf.js} +94 -93
- package/dist/{UserAuthorization-DLeivbs7.js → UserAuthorization-2Fl4IGw7.js} +81 -80
- package/dist/{UserEdit-YKS1FVW_.js → UserEdit-CX3Qau8T.js} +102 -101
- package/dist/{animation_item-BU-LInxP.js → animation_item-DBOz2rcX.js} +20 -22
- package/dist/{blackWhiteList-CNQltBqC.js → blackWhiteList-DbG7JH8n.js} +69 -69
- package/dist/blackWhiteList.css +1 -1
- package/dist/breadcrumb_setting-DTR6CPZQ.js +108 -0
- package/dist/{browserType-Dn_hQtAN.js → browserType-B8A1Osvk.js} +11 -10
- package/dist/chunk-DiMWNkAf.js +18 -0
- package/dist/cloneDeep-CSOSavu3.js +6 -0
- package/dist/components/GroupSelector/index.vue.d.ts +7 -1
- package/dist/components/ResourceIcones/Select.vue.d.ts +2 -1
- package/dist/components/ResourceSelector/index.vue.d.ts +7 -1
- package/dist/components/RoleSelector/RoleSearch.vue.d.ts +9 -1
- package/dist/components/RoleSelector/RoleSelector.vue.d.ts +7 -1
- package/dist/{createAndEditDataPermission-CaOBJgoV.js → createAndEditDataPermission-8_KNLzJT.js} +49 -48
- package/dist/createAndEditDataPermission.css +1 -1
- package/dist/{data-permission-ZRQ-Aoib.js → data-permission-LpuDLDm0.js} +41 -41
- package/dist/{dayjs.min-sGDSMYRj.js → dayjs.min-Cb7gQFd4.js} +1 -1
- package/dist/{dictionary-CtGgtPfc.js → dictionary-CEaxjqZe.js} +46 -46
- package/dist/drawerBlackWhiteList-DXLdWurZ.js +120 -0
- package/dist/drawerDictionary-DYJTAZr6.js +126 -0
- package/dist/drawerDictionaryItem-BChXD2-q.js +138 -0
- package/dist/{drawerGroup-DEuiiDPP.js → drawerGroup-CdnZkZxi.js} +67 -66
- package/dist/drawerOrganization-CwtSFUj0.js +247 -0
- package/dist/drawerPosition-CfyfeQCN.js +166 -0
- package/dist/drawerRegion-DAwY_29K.js +183 -0
- package/dist/drawerRole-B7uCfHk-.js +154 -0
- package/dist/{drawerRole-Dv61PBZR.js → drawerRole-DK6DrinO.js} +77 -76
- package/dist/{drawerRole-DNDyOvXw.js → drawerRole-DrzMHL0O.js} +69 -68
- package/dist/{group-BbkZjv5e.js → group-CaOhkh72.js} +48 -48
- package/dist/group.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +613 -689
- package/dist/isEmpty-BjEzPyCa.js +12 -0
- package/dist/{itemlist-By-FV6pN.js → itemlist-CFwRUV2Y.js} +44 -44
- package/dist/json-asset-03f0a035.json +1 -0
- package/dist/json-asset-0ee63e7f.json +1 -0
- package/dist/json-asset-10eef4fe.json +1 -0
- package/dist/json-asset-13f452f1.json +1 -0
- package/dist/json-asset-14b7b290.json +1 -0
- package/dist/json-asset-15b8cef1.json +1 -0
- package/dist/json-asset-15f77960.json +1 -0
- package/dist/json-asset-1ae9b726.json +1 -0
- package/dist/json-asset-1b02359f.json +1 -0
- package/dist/json-asset-1ef286cd.json +1 -0
- package/dist/json-asset-23cfd18c.json +1 -0
- package/dist/json-asset-265a0a5d.json +1 -0
- package/dist/json-asset-28d57c49.json +1 -0
- package/dist/json-asset-2b54ed10.json +1 -0
- package/dist/json-asset-2bb6f642.json +1 -0
- package/dist/json-asset-2cdc07bd.json +1 -0
- package/dist/json-asset-31c58607.json +1 -0
- package/dist/json-asset-32884f23.json +1 -0
- package/dist/json-asset-32fca43a.json +1 -0
- package/dist/json-asset-3a75445b.json +1 -0
- package/dist/json-asset-3f27d67c.json +1 -0
- package/dist/json-asset-4189453f.json +1 -0
- package/dist/json-asset-4702b37c.json +1 -0
- package/dist/json-asset-520a5c68.json +1 -0
- package/dist/json-asset-56bea508.json +1 -0
- package/dist/json-asset-57c732a3.json +1 -0
- package/dist/json-asset-5be4a28f.json +1 -0
- package/dist/json-asset-5e6d7cfa.json +1 -0
- package/dist/json-asset-64e176c9.json +1 -0
- package/dist/json-asset-6583dca6.json +1 -0
- package/dist/json-asset-66c640c6.json +1 -0
- package/dist/json-asset-68393156.json +1 -0
- package/dist/json-asset-688465aa.json +1 -0
- package/dist/json-asset-6bf334f4.json +1 -0
- package/dist/json-asset-7b4f72ce.json +1 -0
- package/dist/json-asset-837ec087.json +1 -0
- package/dist/json-asset-838ac1ba.json +1 -0
- package/dist/json-asset-8465c2cf.json +1 -0
- package/dist/json-asset-9e9f04a4.json +1 -0
- package/dist/json-asset-a13964cb.json +1 -0
- package/dist/json-asset-ab93a057.json +1 -0
- package/dist/json-asset-abe308fc.json +1 -0
- package/dist/json-asset-b24f2cd3.json +1 -0
- package/dist/json-asset-bf00eaed.json +1 -0
- package/dist/json-asset-cb22efd7.json +1 -0
- package/dist/json-asset-cb953f20.json +1 -0
- package/dist/json-asset-cc209e34.json +1 -0
- package/dist/json-asset-cfdffceb.json +1 -0
- package/dist/json-asset-d33c0299.json +1 -0
- package/dist/json-asset-d430c8ca.json +1 -0
- package/dist/json-asset-d8cfa560.json +1 -0
- package/dist/json-asset-da91beb6.json +1 -0
- package/dist/json-asset-e2bdf85c.json +1 -0
- package/dist/json-asset-e34ad826.json +1 -0
- package/dist/json-asset-e80720aa.json +1 -0
- package/dist/json-asset-e894bc92.json +1 -0
- package/dist/json-asset-f28020f2.json +1 -0
- package/dist/json-asset-f71ebbf4.json +1 -0
- package/dist/json-asset-fb1f4917.json +1 -0
- package/dist/json-asset-ff2e97c4.json +1 -0
- package/dist/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
- package/dist/layout_setting.css +1 -1
- package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
- package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
- package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
- package/dist/login_history.css +1 -1
- package/dist/menu_setting-C2GciMXz.js +155 -0
- package/dist/not-data-Bml86wdH.js +3 -0
- package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
- package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
- package/dist/operate_history.css +1 -1
- package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
- package/dist/organization.css +1 -1
- package/dist/other_setting-oVuhA70c.js +213 -0
- package/dist/other_setting.css +1 -1
- package/dist/page_animation_setting-D0CtzyOZ.js +108 -0
- package/dist/page_animation_setting.css +1 -1
- package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
- package/dist/page_w_setting.css +1 -1
- package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
- package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
- package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
- package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
- package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
- package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
- package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
- package/dist/setItem.css +1 -1
- package/dist/tabbar_setting-DhrW4Jj5.js +139 -0
- package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
- package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
- package/dist/theme_setting.css +1 -1
- package/dist/toolbar_setting-znESrYgi.js +140 -0
- package/dist/useAppAndResource-B7FmNfKG.js +52 -0
- package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
- package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
- package/dist/views/components/setItem.vue.d.ts +5 -1
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
- package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
- package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/other_setting/interface.d.ts +1 -2
- package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
- package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
- package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
- package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
- package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
- package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
- package/dist/watermark_setting-DYirSIAn.js +191 -0
- package/dist/watermark_setting.css +1 -1
- package/package.json +13 -13
- package/src/views/other_setting/index.vue +2 -2
- package/src/views/other_setting/interface.ts +1 -1
- package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
- package/dist/ComponentSelect-WO-3S5rH.js +0 -2
- package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
- package/dist/HCheckList-B5Qk_HBI.js +0 -2
- package/dist/HCheckList-DLBewmPw.js +0 -36
- package/dist/HoverCard-69ZIOivd.js +0 -2
- package/dist/HoverCard-BDFcxxvk.js +0 -43
- package/dist/IconSelect-C_Gj5G4I.js +0 -3
- package/dist/ImportExport-CL5uPlby.js +0 -342
- package/dist/ImportExport-CPy2rvv7.js +0 -4
- package/dist/LayoutForm-QFjwakyQ.js +0 -4
- package/dist/MetaForm-Bb-um1Zo.js +0 -4
- package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
- package/dist/ResourceEdit-BTaNdwC_.js +0 -10
- package/dist/ResourceRelation-BIOzTOKA.js +0 -2
- package/dist/RoleRelation-CyTcqRfZ.js +0 -2
- package/dist/TenantEdit-BlMmL6q5.js +0 -2
- package/dist/UserAuthorization-qGr1Sdat.js +0 -3
- package/dist/UserEdit-CwfyqNWf.js +0 -3
- package/dist/animation_item-GzGItm3s.js +0 -2
- package/dist/breadcrumb_setting-Ds-XJRR1.js +0 -108
- package/dist/browserType-BXTT4j6i.js +0 -2
- package/dist/chunk-Cpsc_9al.js +0 -18
- package/dist/cloneDeep-DDAtsK42.js +0 -7
- package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
- package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
- package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
- package/dist/drawerDictionary-D911w7pC.js +0 -2
- package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
- package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
- package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
- package/dist/drawerGroup-CEEDMBg9.js +0 -3
- package/dist/drawerOrganization-CqEMD3gE.js +0 -246
- package/dist/drawerOrganization-mks5NMd9.js +0 -2
- package/dist/drawerPosition-Bd0s7qze.js +0 -165
- package/dist/drawerPosition-DwlTrlGA.js +0 -2
- package/dist/drawerRegion-DUbQAZuV.js +0 -182
- package/dist/drawerRegion-DwVzsZfT.js +0 -2
- package/dist/drawerRole-BNrbcSmr.js +0 -3
- package/dist/drawerRole-BxUIekjh.js +0 -3
- package/dist/drawerRole-CyA2oFht.js +0 -4
- package/dist/drawerRole-D5X7oHB_.js +0 -153
- package/dist/isEmpty-BvRqbmpu.js +0 -13
- package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
- package/dist/menu_setting-5Jet091Q.js +0 -155
- package/dist/not-data-Cx--tk_h.js +0 -2
- package/dist/not-data-tyTawN37.js +0 -2
- package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
- package/dist/other_setting-DQ70WnZK.js +0 -213
- package/dist/page_animation_setting-Lp6cMuFM.js +0 -108
- package/dist/routeSystem-DXMoWhFo.js +0 -2
- package/dist/setItem-Qa7UapHO.js +0 -4
- package/dist/tabbar_setting-B3kMhRNm.js +0 -139
- package/dist/toolbar_setting-DNBdxeGP.js +0 -140
- package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
- package/dist/watermark_setting-CXp4Og0Y.js +0 -191
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
1
2
|
import { Lt as useToggle, N as getRbacResourceGetRoleListByResourceId } from "./index.js";
|
|
2
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, nextTick, normalizeStyle, openBlock, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
3
4
|
import { theme } from "ant-design-vue";
|
|
@@ -6,13 +7,13 @@ import { useRequest } from "alova/client";
|
|
|
6
7
|
var _hoisted_1 = {
|
|
7
8
|
key: 0,
|
|
8
9
|
class: "w-full truncate space-x-2"
|
|
9
|
-
},
|
|
10
|
+
}, RoleRelation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10
11
|
name: "RoleRelation",
|
|
11
12
|
__name: "RoleRelation",
|
|
12
|
-
setup(
|
|
13
|
-
let { token:
|
|
13
|
+
setup(e, { expose: i }) {
|
|
14
|
+
let { token: a } = theme.useToken(), [o, s] = useToggle(!1), { loading: c, data: l, send: u } = useRequest((e) => getRbacResourceGetRoleListByResourceId(e, { transform(e) {
|
|
14
15
|
return e.data ?? [];
|
|
15
|
-
} }), { immediate: !1 }),
|
|
16
|
+
} }), { immediate: !1 }), d = [{
|
|
16
17
|
title: "角色名称",
|
|
17
18
|
dataIndex: "name",
|
|
18
19
|
ellipsis: !0
|
|
@@ -22,48 +23,48 @@ var _hoisted_1 = {
|
|
|
22
23
|
width: 180,
|
|
23
24
|
ellipsis: !0
|
|
24
25
|
}];
|
|
25
|
-
function
|
|
26
|
-
|
|
26
|
+
function f(e) {
|
|
27
|
+
s(!0), u({ id: e.id }), h();
|
|
27
28
|
}
|
|
28
|
-
let
|
|
29
|
-
function
|
|
29
|
+
let p = computed(() => window.innerHeight - 57 - 48 - 55 - 64);
|
|
30
|
+
function m() {
|
|
30
31
|
nextTick(() => {
|
|
31
32
|
let e = document.querySelector(".role-relation")?.querySelector(".ant-table-body");
|
|
32
|
-
e && (e.style.height = `${
|
|
33
|
+
e && (e.style.height = `${p.value}px`);
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
nextTick(
|
|
36
|
+
function h() {
|
|
37
|
+
nextTick(m);
|
|
37
38
|
}
|
|
38
|
-
return
|
|
39
|
-
let
|
|
40
|
-
return openBlock(), createBlock(
|
|
41
|
-
open: unref(
|
|
42
|
-
"onUpdate:open":
|
|
39
|
+
return i({ open: f }), (e, t) => {
|
|
40
|
+
let n = Avatar, r = Table, i = Drawer;
|
|
41
|
+
return openBlock(), createBlock(i, {
|
|
42
|
+
open: unref(o),
|
|
43
|
+
"onUpdate:open": t[0] ||= (e) => isRef(o) ? o.value = e : null,
|
|
43
44
|
title: "分配查看",
|
|
44
45
|
placement: "right",
|
|
45
46
|
width: 520,
|
|
46
47
|
"footer-style": { textAlign: "right" }
|
|
47
48
|
}, {
|
|
48
|
-
default: withCtx(() => [createVNode(
|
|
49
|
+
default: withCtx(() => [createVNode(r, {
|
|
49
50
|
"row-key": "id",
|
|
50
|
-
loading: unref(
|
|
51
|
-
columns:
|
|
52
|
-
"data-source": unref(
|
|
53
|
-
scroll: { y: `${unref(
|
|
51
|
+
loading: unref(c),
|
|
52
|
+
columns: d,
|
|
53
|
+
"data-source": unref(l),
|
|
54
|
+
scroll: { y: `${unref(p)}px` },
|
|
54
55
|
pagination: {
|
|
55
56
|
defaultPageSize: 20,
|
|
56
57
|
showSizeChanger: !0
|
|
57
58
|
},
|
|
58
59
|
class: "role-relation"
|
|
59
60
|
}, {
|
|
60
|
-
bodyCell: withCtx(({ column: e, text:
|
|
61
|
+
bodyCell: withCtx(({ column: e, text: t }) => [e.dataIndex === "name" ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(n, {
|
|
61
62
|
size: "small",
|
|
62
|
-
style: normalizeStyle({ backgroundColor: unref(
|
|
63
|
+
style: normalizeStyle({ backgroundColor: unref(a).colorPrimary })
|
|
63
64
|
}, {
|
|
64
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
65
|
+
default: withCtx(() => [createTextVNode(toDisplayString(t[0]), 1)]),
|
|
65
66
|
_: 2
|
|
66
|
-
}, 1032, ["style"]), createElementVNode("span", null, toDisplayString(
|
|
67
|
+
}, 1032, ["style"]), createElementVNode("span", null, toDisplayString(t), 1)])) : createCommentVNode("", !0)]),
|
|
67
68
|
_: 1
|
|
68
69
|
}, 8, [
|
|
69
70
|
"loading",
|
|
@@ -74,5 +75,5 @@ var _hoisted_1 = {
|
|
|
74
75
|
}, 8, ["open"]);
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
|
-
});
|
|
78
|
-
export { RoleRelation_default as t };
|
|
78
|
+
}), RoleRelation_exports = /* @__PURE__ */ __exportAll({ default: () => RoleRelation_default }), RoleRelation_default = RoleRelation_vue_vue_type_script_setup_true_lang_default;
|
|
79
|
+
export { RoleRelation_exports as n, RoleRelation_default as t };
|
|
@@ -16,37 +16,37 @@ var _hoisted_1$1 = { key: 1 }, RoleSearch_default = /* @__PURE__ */ defineCompon
|
|
|
16
16
|
groupIdModifiers: {}
|
|
17
17
|
}),
|
|
18
18
|
emits: /* @__PURE__ */ mergeModels(["select"], ["update:modelValue", "update:groupId"]),
|
|
19
|
-
setup(e, { emit:
|
|
20
|
-
let
|
|
21
|
-
async function
|
|
19
|
+
setup(e, { emit: n }) {
|
|
20
|
+
let r = e, a = n, o = useModel(e, "modelValue"), s = useModel(e, "groupId"), l = ref([]);
|
|
21
|
+
async function u() {
|
|
22
22
|
let e = await getRbacPubRoleGroupGetAll({ name: "" });
|
|
23
|
-
e.success && (
|
|
23
|
+
e.success && (l.value = e.data ?? []);
|
|
24
24
|
}
|
|
25
25
|
return onMounted(() => {
|
|
26
|
-
|
|
27
|
-
}), (
|
|
28
|
-
let
|
|
29
|
-
return openBlock(), createBlock(
|
|
30
|
-
value:
|
|
31
|
-
"onUpdate:value":
|
|
26
|
+
r.group && u();
|
|
27
|
+
}), (t, n) => {
|
|
28
|
+
let r = SelectOption, u = Tooltip$1, d = Select, f = Input$1;
|
|
29
|
+
return openBlock(), createBlock(f, {
|
|
30
|
+
value: o.value,
|
|
31
|
+
"onUpdate:value": n[2] ||= (e) => o.value = e,
|
|
32
32
|
placeholder: "请输入",
|
|
33
33
|
"allow-clear": ""
|
|
34
34
|
}, {
|
|
35
|
-
addonBefore: withCtx(() => [e.group ? (openBlock(), createBlock(
|
|
35
|
+
addonBefore: withCtx(() => [e.group ? (openBlock(), createBlock(d, {
|
|
36
36
|
key: 0,
|
|
37
|
-
value:
|
|
38
|
-
"onUpdate:value":
|
|
37
|
+
value: s.value,
|
|
38
|
+
"onUpdate:value": n[0] ||= (e) => s.value = e,
|
|
39
39
|
style: { width: "90px" },
|
|
40
|
-
onChange:
|
|
40
|
+
onChange: n[1] ||= (e) => a("select", e)
|
|
41
41
|
}, {
|
|
42
|
-
default: withCtx(() => [createVNode(
|
|
43
|
-
default: withCtx(() => [...
|
|
42
|
+
default: withCtx(() => [createVNode(r, { value: "" }, {
|
|
43
|
+
default: withCtx(() => [...n[3] ||= [createTextVNode(" 全部 ", -1)]]),
|
|
44
44
|
_: 1
|
|
45
|
-
}), (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
45
|
+
}), (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(l), (e) => (openBlock(), createBlock(r, {
|
|
46
46
|
key: e.id,
|
|
47
47
|
value: e.id
|
|
48
48
|
}, {
|
|
49
|
-
default: withCtx(() => [createVNode(
|
|
49
|
+
default: withCtx(() => [createVNode(u, { title: e.name }, {
|
|
50
50
|
default: withCtx(() => [createTextVNode(toDisplayString(e.name), 1)]),
|
|
51
51
|
_: 2
|
|
52
52
|
}, 1032, ["title"])]),
|
|
@@ -68,49 +68,49 @@ var _hoisted_1$1 = { key: 1 }, RoleSearch_default = /* @__PURE__ */ defineCompon
|
|
|
68
68
|
size: { default: 21 }
|
|
69
69
|
},
|
|
70
70
|
setup(e) {
|
|
71
|
-
return (
|
|
71
|
+
return (t, n) => (e.name || "").length > e.size ? (openBlock(), createBlock(unref(Tooltip), {
|
|
72
72
|
key: 0,
|
|
73
73
|
title: e.name
|
|
74
74
|
}, {
|
|
75
|
-
default: withCtx(() => [createElementVNode("span", normalizeProps(guardReactiveProps(
|
|
75
|
+
default: withCtx(() => [createElementVNode("span", normalizeProps(guardReactiveProps(t.$attrs)), toDisplayString(`${e.name?.slice(0, e.size)}...`), 17)]),
|
|
76
76
|
_: 1
|
|
77
|
-
}, 8, ["title"])) : (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 },
|
|
77
|
+
}, 8, ["title"])) : (openBlock(), createElementBlock("span", normalizeProps(mergeProps({ key: 1 }, t.$attrs)), toDisplayString(e.name), 17));
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
function useRole() {
|
|
81
|
-
let [
|
|
82
|
-
async function
|
|
81
|
+
let [t, r] = useToggle(!1), i = ref([]);
|
|
82
|
+
async function a() {
|
|
83
83
|
try {
|
|
84
|
-
|
|
84
|
+
r(!0);
|
|
85
85
|
let e = await getRbacRoleRoleList();
|
|
86
|
-
e.success && (
|
|
86
|
+
e.success && (i.value = e.data ?? []);
|
|
87
87
|
} finally {
|
|
88
|
-
|
|
88
|
+
r(!1);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
92
|
-
loading:
|
|
93
|
-
setLoading:
|
|
94
|
-
roles:
|
|
95
|
-
getData:
|
|
92
|
+
loading: t,
|
|
93
|
+
setLoading: r,
|
|
94
|
+
roles: i,
|
|
95
|
+
getData: a
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
function useRoleGroup() {
|
|
99
|
-
let [
|
|
100
|
-
async function
|
|
99
|
+
let [t, n] = useToggle(!1), i = ref([]);
|
|
100
|
+
async function a(e) {
|
|
101
101
|
try {
|
|
102
|
-
|
|
103
|
-
let
|
|
104
|
-
|
|
102
|
+
n(!0);
|
|
103
|
+
let t = await getRbacPubRoleGroupGetById({ id: e });
|
|
104
|
+
t.success && (i.value = t.data?.roles ?? []);
|
|
105
105
|
} finally {
|
|
106
|
-
|
|
106
|
+
n(!1);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
return {
|
|
110
|
-
loading:
|
|
111
|
-
setLoading:
|
|
112
|
-
roles:
|
|
113
|
-
getData:
|
|
110
|
+
loading: t,
|
|
111
|
+
setLoading: n,
|
|
112
|
+
roles: i,
|
|
113
|
+
getData: a
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
var _hoisted_1 = { class: "h-full flex" }, _hoisted_2 = { class: "p-2 flex flex-col h-full gap-2" }, _hoisted_3 = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, _hoisted_4 = {
|
|
@@ -127,36 +127,36 @@ var _hoisted_1 = { class: "h-full flex" }, _hoisted_2 = { class: "p-2 flex flex-
|
|
|
127
127
|
openModifiers: {}
|
|
128
128
|
}),
|
|
129
129
|
emits: /* @__PURE__ */ mergeModels(["select"], ["update:open"]),
|
|
130
|
-
setup(
|
|
131
|
-
let
|
|
132
|
-
async function
|
|
133
|
-
await
|
|
130
|
+
setup(t, { expose: n, emit: r }) {
|
|
131
|
+
let c = r, { token: l } = theme.useToken(), u = useModel(t, "open"), f = useToggle(u), p = ref([]), m = reactive(useRole()), h = reactive(useRoleGroup()), g = ref(""), _ = ref("");
|
|
132
|
+
async function v(e) {
|
|
133
|
+
await h.getData(e);
|
|
134
134
|
}
|
|
135
|
-
async function
|
|
136
|
-
|
|
135
|
+
async function y(e = []) {
|
|
136
|
+
p.value = e, g.value = "", _.value = "", await m.getData(), f(!0);
|
|
137
137
|
}
|
|
138
|
-
let
|
|
139
|
-
function
|
|
140
|
-
return
|
|
138
|
+
let b = computed(() => _.value === "" ? m.roles : h.roles);
|
|
139
|
+
function x(e) {
|
|
140
|
+
return b.value.findIndex((t) => t.id === e.id) > -1 && e.name?.includes(g.value);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
e.target.checked ?
|
|
144
|
-
value:
|
|
145
|
-
label:
|
|
146
|
-
}) :
|
|
142
|
+
function S(e, t) {
|
|
143
|
+
e.target.checked ? p.value.push({
|
|
144
|
+
value: t.id,
|
|
145
|
+
label: t.name
|
|
146
|
+
}) : p.value = p.value.filter((e) => e.value !== t.id);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
|
|
148
|
+
function C(e) {
|
|
149
|
+
p.value = p.value.filter((t) => t.value !== e);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
151
|
+
function w() {
|
|
152
|
+
c("select", p.value), f(!1);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
154
|
+
function T() {
|
|
155
|
+
p.value = p.value.filter((e) => !m.roles.some((t) => t.id === e.value));
|
|
156
156
|
}
|
|
157
|
-
return
|
|
158
|
-
open:
|
|
159
|
-
"onUpdate:open":
|
|
157
|
+
return n({ open: y }), (e, n) => (openBlock(), createBlock(unref(Modal), {
|
|
158
|
+
open: u.value,
|
|
159
|
+
"onUpdate:open": n[3] ||= (e) => u.value = e,
|
|
160
160
|
title: "角色选择",
|
|
161
161
|
"mask-closable": !1,
|
|
162
162
|
width: 750,
|
|
@@ -164,17 +164,17 @@ var _hoisted_1 = { class: "h-full flex" }, _hoisted_2 = { class: "p-2 flex flex-
|
|
|
164
164
|
"ok-text": "确认",
|
|
165
165
|
"cancel-text": "取消",
|
|
166
166
|
"destroy-on-close": "",
|
|
167
|
-
onOk:
|
|
167
|
+
onOk: n[4] ||= (e) => w()
|
|
168
168
|
}, {
|
|
169
169
|
default: withCtx(() => [createElementVNode("div", {
|
|
170
170
|
class: "border border-solid h-[400px]",
|
|
171
|
-
style: normalizeStyle({ borderColor: unref(
|
|
171
|
+
style: normalizeStyle({ borderColor: unref(l).colorBorder })
|
|
172
172
|
}, [createElementVNode("div", _hoisted_1, [
|
|
173
173
|
createVNode(unref(Card), {
|
|
174
174
|
bordered: !1,
|
|
175
175
|
size: "small",
|
|
176
176
|
"head-style": {
|
|
177
|
-
backgroundColor: unref(
|
|
177
|
+
backgroundColor: unref(l).colorBgLayout,
|
|
178
178
|
borderRadius: 0,
|
|
179
179
|
borderWidth: 0,
|
|
180
180
|
borderBottomWidth: "1px",
|
|
@@ -188,50 +188,50 @@ var _hoisted_1 = { class: "h-full flex" }, _hoisted_2 = { class: "p-2 flex flex-
|
|
|
188
188
|
style: normalizeStyle({
|
|
189
189
|
boxShadow: "none",
|
|
190
190
|
borderRadius: 0,
|
|
191
|
-
borderColor: unref(
|
|
191
|
+
borderColor: unref(l).colorBorder
|
|
192
192
|
}),
|
|
193
193
|
class: "flex h-full flex-col w-1/2"
|
|
194
194
|
}, {
|
|
195
195
|
default: withCtx(() => [createElementVNode("div", _hoisted_2, [createVNode(RoleSearch_default, {
|
|
196
|
-
modelValue: unref(
|
|
197
|
-
"onUpdate:modelValue":
|
|
198
|
-
"group-id": unref(
|
|
199
|
-
"onUpdate:groupId":
|
|
200
|
-
group:
|
|
201
|
-
onSelect:
|
|
196
|
+
modelValue: unref(g),
|
|
197
|
+
"onUpdate:modelValue": n[0] ||= (e) => isRef(g) ? g.value = e : null,
|
|
198
|
+
"group-id": unref(_),
|
|
199
|
+
"onUpdate:groupId": n[1] ||= (e) => isRef(_) ? _.value = e : null,
|
|
200
|
+
group: t.group,
|
|
201
|
+
onSelect: v
|
|
202
202
|
}, null, 8, [
|
|
203
203
|
"modelValue",
|
|
204
204
|
"group-id",
|
|
205
205
|
"group"
|
|
206
|
-
]), createElementVNode("div", _hoisted_3, [unref(
|
|
206
|
+
]), createElementVNode("div", _hoisted_3, [unref(m).loading || unref(h).loading ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(unref(Spin))])) : (openBlock(), createBlock(unref(CheckboxGroup), {
|
|
207
207
|
key: 1,
|
|
208
|
-
value: unref(
|
|
208
|
+
value: unref(p).map((e) => e.value),
|
|
209
209
|
class: "w-full overflow-x-hidden"
|
|
210
210
|
}, {
|
|
211
|
-
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
211
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(b), (e) => withDirectives((openBlock(), createElementBlock("div", {
|
|
212
212
|
key: e.id,
|
|
213
213
|
class: "w-full py-2 border-0 border-b border-solid truncate",
|
|
214
|
-
style: normalizeStyle({ borderColor: unref(
|
|
214
|
+
style: normalizeStyle({ borderColor: unref(l).colorBorder })
|
|
215
215
|
}, [createVNode(unref(Checkbox), {
|
|
216
216
|
value: e.id,
|
|
217
|
-
onChange: (
|
|
217
|
+
onChange: (t) => S(t, e)
|
|
218
218
|
}, {
|
|
219
219
|
default: withCtx(() => [createVNode(TooltipLabel_default, { name: e.name }, null, 8, ["name"])]),
|
|
220
220
|
_: 2
|
|
221
|
-
}, 1032, ["value", "onChange"])], 4)), [[vShow,
|
|
221
|
+
}, 1032, ["value", "onChange"])], 4)), [[vShow, x(e)]])), 128))]),
|
|
222
222
|
_: 1
|
|
223
223
|
}, 8, ["value"]))])])]),
|
|
224
224
|
_: 1
|
|
225
225
|
}, 8, ["head-style", "style"]),
|
|
226
226
|
createElementVNode("div", {
|
|
227
|
-
style: normalizeStyle({ borderColor: unref(
|
|
227
|
+
style: normalizeStyle({ borderColor: unref(l).colorBorder }),
|
|
228
228
|
class: "h-full border-0 border-r border-solid"
|
|
229
229
|
}, null, 4),
|
|
230
230
|
createVNode(unref(Card), {
|
|
231
231
|
bordered: !1,
|
|
232
232
|
size: "small",
|
|
233
233
|
"head-style": {
|
|
234
|
-
backgroundColor: unref(
|
|
234
|
+
backgroundColor: unref(l).colorBgLayout,
|
|
235
235
|
borderRadius: 0,
|
|
236
236
|
borderWidth: 0,
|
|
237
237
|
borderBottomWidth: "1px"
|
|
@@ -247,23 +247,23 @@ var _hoisted_1 = { class: "h-full flex" }, _hoisted_2 = { class: "p-2 flex flex-
|
|
|
247
247
|
},
|
|
248
248
|
class: "flex h-full flex-col flex-1"
|
|
249
249
|
}, {
|
|
250
|
-
title: withCtx(() => [...
|
|
250
|
+
title: withCtx(() => [...n[5] ||= [createElementVNode("span", { class: "font-normal" }, " 已选角色 ", -1)]]),
|
|
251
251
|
extra: withCtx(() => [createElementVNode("a", {
|
|
252
|
-
style: normalizeStyle({ color: unref(
|
|
253
|
-
onClick:
|
|
252
|
+
style: normalizeStyle({ color: unref(l).colorPrimary }),
|
|
253
|
+
onClick: n[2] ||= (e) => T()
|
|
254
254
|
}, " 清空 ", 4)]),
|
|
255
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
255
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (e) => (openBlock(), createElementBlock("div", {
|
|
256
256
|
key: e.value,
|
|
257
257
|
class: "inline-block mb-1 py-1 px-2 mx-0.5 max-w-full rounded",
|
|
258
|
-
style: normalizeStyle({ backgroundColor: unref(
|
|
258
|
+
style: normalizeStyle({ backgroundColor: unref(l).colorPrimaryBg })
|
|
259
259
|
}, [createVNode(TooltipLabel_default, {
|
|
260
260
|
name: e.label,
|
|
261
261
|
size: 20
|
|
262
|
-
}, null, 8, ["name"]), unref(
|
|
262
|
+
}, null, 8, ["name"]), unref(m).roles.some((t) => t.id === e.value) ? (openBlock(), createBlock(unref(CloseOutlined), {
|
|
263
263
|
key: 0,
|
|
264
264
|
class: "ml-1 cursor-pointer text-xs",
|
|
265
|
-
style: normalizeStyle({ color: unref(
|
|
266
|
-
onClick: (
|
|
265
|
+
style: normalizeStyle({ color: unref(l).colorPrimary }),
|
|
266
|
+
onClick: (t) => C(e.value)
|
|
267
267
|
}, null, 8, ["style", "onClick"])) : createCommentVNode("", !0)], 4))), 128))])]),
|
|
268
268
|
_: 1
|
|
269
269
|
}, 8, ["head-style"])
|