@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.10
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
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
2
|
+
import { E as postRbacOrgRoleSaveOrgRole, Lt as useToggle, w as getRbacOrgRoleGetByOrgId } from "./index.js";
|
|
3
|
+
import { t as useAppAndResource } from "./useAppAndResource-B7FmNfKG.js";
|
|
4
|
+
import { t as RoleSelector_default } from "./RoleSelector-gkar_UGG.js";
|
|
5
|
+
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, vShow, withCtx, withDirectives } from "vue";
|
|
6
|
+
import { message } from "ant-design-vue";
|
|
7
|
+
import { Button, Drawer, Form as Form$1, FormItem, Space as Space$1, Switch, Tooltip as Tooltip$1 } from "ant-design-vue/es";
|
|
8
|
+
var _hoisted_1 = { class: "mt-2px" }, _hoisted_2 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_3 = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
11
|
+
}, _hoisted_4 = { class: "mt-2px" }, _hoisted_5 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_6 = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
14
|
+
}, drawerRole_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
15
|
+
name: "DrawerRole",
|
|
16
|
+
__name: "drawerRole",
|
|
17
|
+
emits: ["submit"],
|
|
18
|
+
setup(e, { expose: a, emit: c }) {
|
|
19
|
+
let l = c, { resourceModelRef: u, selectedResources: d, setSelectedResources: f, openResourceModel: p } = useAppAndResource(), m = { isInherit: [{
|
|
20
|
+
required: !0,
|
|
21
|
+
message: "请选择是否可继承",
|
|
22
|
+
trigger: "change"
|
|
23
|
+
}] };
|
|
24
|
+
reactive({
|
|
25
|
+
title: "",
|
|
26
|
+
type: ""
|
|
27
|
+
});
|
|
28
|
+
let [h, g] = useToggle(!1), _ = ref(), v = ref({ isInherit: "0" }), y = ref("");
|
|
29
|
+
async function b(e) {
|
|
30
|
+
y.value = e?.id || "", v.value = (await getRbacOrgRoleGetByOrgId({ orgId: y.value })).data || {}, g(!0);
|
|
31
|
+
}
|
|
32
|
+
let [x, S] = useToggle(!1), C = ref();
|
|
33
|
+
function w() {
|
|
34
|
+
let e = (v.value.roleList || []).map((e) => ({
|
|
35
|
+
value: e.id,
|
|
36
|
+
label: e.name
|
|
37
|
+
}));
|
|
38
|
+
C.value.open(e);
|
|
39
|
+
}
|
|
40
|
+
function T(e) {
|
|
41
|
+
v.value.roleList = e.map((e) => ({
|
|
42
|
+
id: e.value,
|
|
43
|
+
name: e.label
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
function E() {
|
|
47
|
+
_.value?.validate().then(() => {
|
|
48
|
+
S(!0);
|
|
49
|
+
let e = (v.value.roleList || []).map((e) => typeof e == "object" && e.id ? e.id : "");
|
|
50
|
+
postRbacOrgRoleSaveOrgRole({
|
|
51
|
+
orgId: y.value,
|
|
52
|
+
roleIds: e.join(","),
|
|
53
|
+
isInherit: v.value.isInherit || "0"
|
|
54
|
+
}).then((e) => {
|
|
55
|
+
e.success && (message.success("授权成功!"), g(!1), l("submit"));
|
|
56
|
+
}).finally(() => S(!1));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function D() {
|
|
60
|
+
v.value = { isInherit: "0" }, g(!1);
|
|
61
|
+
}
|
|
62
|
+
return a({ open: b }), (e, t) => {
|
|
63
|
+
let n = Switch, r = FormItem, i = Button, a = Tooltip$1, o = Form$1, s = Space$1, c = Drawer;
|
|
64
|
+
return openBlock(), createBlock(c, {
|
|
65
|
+
open: unref(h),
|
|
66
|
+
"onUpdate:open": t[2] ||= (e) => isRef(h) ? h.value = e : null,
|
|
67
|
+
title: "组织角色授权",
|
|
68
|
+
placement: "right",
|
|
69
|
+
width: 600,
|
|
70
|
+
"destroy-on-close": "",
|
|
71
|
+
"footer-style": { textAlign: "right" },
|
|
72
|
+
onClose: D
|
|
73
|
+
}, {
|
|
74
|
+
footer: withCtx(() => [createVNode(s, null, {
|
|
75
|
+
default: withCtx(() => [createVNode(i, { onClick: D }, {
|
|
76
|
+
default: withCtx(() => [...t[4] ||= [createTextVNode(" 取消 ", -1)]]),
|
|
77
|
+
_: 1
|
|
78
|
+
}), createVNode(i, {
|
|
79
|
+
type: "primary",
|
|
80
|
+
loading: unref(x),
|
|
81
|
+
onClick: t[1] ||= (e) => E()
|
|
82
|
+
}, {
|
|
83
|
+
default: withCtx(() => [...t[5] ||= [createTextVNode(" 提交 ", -1)]]),
|
|
84
|
+
_: 1
|
|
85
|
+
}, 8, ["loading"])]),
|
|
86
|
+
_: 1
|
|
87
|
+
})]),
|
|
88
|
+
default: withCtx(() => [createVNode(o, {
|
|
89
|
+
ref_key: "formRef",
|
|
90
|
+
ref: _,
|
|
91
|
+
model: unref(v),
|
|
92
|
+
rules: m,
|
|
93
|
+
"label-align": "left",
|
|
94
|
+
"label-col": { span: 4 }
|
|
95
|
+
}, {
|
|
96
|
+
default: withCtx(() => [
|
|
97
|
+
createVNode(r, {
|
|
98
|
+
label: "是否可继承",
|
|
99
|
+
name: "name"
|
|
100
|
+
}, {
|
|
101
|
+
default: withCtx(() => [createVNode(n, {
|
|
102
|
+
checked: unref(v).isInherit,
|
|
103
|
+
"onUpdate:checked": t[0] ||= (e) => unref(v).isInherit = e,
|
|
104
|
+
"checked-value": "1",
|
|
105
|
+
"un-checked-value": "0"
|
|
106
|
+
}, null, 8, ["checked"])]),
|
|
107
|
+
_: 1
|
|
108
|
+
}),
|
|
109
|
+
createVNode(r, {
|
|
110
|
+
label: "基础角色权限",
|
|
111
|
+
name: "roleList"
|
|
112
|
+
}, {
|
|
113
|
+
default: withCtx(() => [createVNode(i, {
|
|
114
|
+
type: "primary",
|
|
115
|
+
onClick: w
|
|
116
|
+
}, {
|
|
117
|
+
default: withCtx(() => [...t[3] ||= [createTextVNode(" 选择角色 ", -1)]]),
|
|
118
|
+
_: 1
|
|
119
|
+
})]),
|
|
120
|
+
_: 1
|
|
121
|
+
}),
|
|
122
|
+
withDirectives(createVNode(r, { label: "已选角色" }, {
|
|
123
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(v).roleList, (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [(e?.name || "").length > 20 ? (openBlock(), createBlock(a, {
|
|
124
|
+
key: 0,
|
|
125
|
+
title: e.name
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_2, toDisplayString(`${e?.name?.slice(0, 20)}...`), 1)]),
|
|
128
|
+
_: 2
|
|
129
|
+
}, 1032, ["title"])) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(e.name), 1))], 64))), 128))])]),
|
|
130
|
+
_: 1
|
|
131
|
+
}, 512), [[vShow, unref(v).roleList && unref(v).roleList.length > 0]]),
|
|
132
|
+
withDirectives(createVNode(r, { label: "继承角色" }, {
|
|
133
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_4, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(v).inheritRoleList, (e) => (openBlock(), createElementBlock(Fragment, { key: e.id }, [(e?.name || "").length > 20 ? (openBlock(), createBlock(a, {
|
|
134
|
+
key: 0,
|
|
135
|
+
title: e.name
|
|
136
|
+
}, {
|
|
137
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_5, toDisplayString(`${e?.name?.slice(0, 20)}...`), 1)]),
|
|
138
|
+
_: 2
|
|
139
|
+
}, 1032, ["title"])) : (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(e.name), 1))], 64))), 128))])]),
|
|
140
|
+
_: 1
|
|
141
|
+
}, 512), [[vShow, unref(v).inheritRoleList && unref(v).inheritRoleList.length > 0]])
|
|
142
|
+
]),
|
|
143
|
+
_: 1
|
|
144
|
+
}, 8, ["model"]), createVNode(unref(RoleSelector_default), {
|
|
145
|
+
ref_key: "roleModelRef",
|
|
146
|
+
ref: C,
|
|
147
|
+
onSelect: T
|
|
148
|
+
}, null, 512)]),
|
|
149
|
+
_: 1
|
|
150
|
+
}, 8, ["open"]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}), drawerRole_exports = /* @__PURE__ */ __exportAll({ default: () => drawerRole_default }), drawerRole_default = drawerRole_vue_vue_type_script_setup_true_lang_default;
|
|
154
|
+
export { drawerRole_exports as n, drawerRole_default as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
1
2
|
import { Lt as useToggle, ResourceSelector as ResourceSelector_default, gt as postRbacRoleAddRole, pt as getRbacRoleInfo, vt as postRbacRoleRoleUpdate } from "./index.js";
|
|
2
|
-
import { t as useAppAndResource } from "./useAppAndResource-
|
|
3
|
+
import { t as useAppAndResource } from "./useAppAndResource-B7FmNfKG.js";
|
|
3
4
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
4
5
|
import { message } from "ant-design-vue";
|
|
5
6
|
import { Button, Drawer, Form as Form$1, FormItem, Input as Input$1, Select, Space as Space$1, Switch, Textarea, Tooltip as Tooltip$1 } from "ant-design-vue/es";
|
|
@@ -21,12 +22,12 @@ ENABLE_TYPE.ON, ENABLE_TYPE.OFF;
|
|
|
21
22
|
var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_3 = {
|
|
22
23
|
key: 1,
|
|
23
24
|
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
24
|
-
},
|
|
25
|
+
}, drawerRole_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
25
26
|
name: "DrawerRole",
|
|
26
27
|
__name: "drawerRole",
|
|
27
28
|
emits: ["submit"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
29
|
+
setup(e, { expose: o, emit: l }) {
|
|
30
|
+
let d = l, { resourceModelRef: f, selectedResources: p, updateTreeDataAndResourceMap: m, setSelectedResources: h, updateSelectedResources: g, clearSelectedResources: _, openResourceModel: v } = useAppAndResource(), y = {
|
|
30
31
|
name: [{
|
|
31
32
|
required: !0,
|
|
32
33
|
message: "请输入名称",
|
|
@@ -54,137 +55,137 @@ var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6p
|
|
|
54
55
|
}],
|
|
55
56
|
resourceIds: [{
|
|
56
57
|
required: !0,
|
|
57
|
-
validator:
|
|
58
|
+
validator: b,
|
|
58
59
|
trigger: ["blur", "change"]
|
|
59
60
|
}]
|
|
60
61
|
};
|
|
61
|
-
function
|
|
62
|
-
return
|
|
62
|
+
function b(e, t) {
|
|
63
|
+
return t && t.length > 0 ? Promise.resolve() : Promise.reject(/* @__PURE__ */ Error("请选择所属资源"));
|
|
63
64
|
}
|
|
64
|
-
let
|
|
65
|
+
let x = reactive({
|
|
65
66
|
title: "",
|
|
66
67
|
type: ""
|
|
67
|
-
}), [
|
|
68
|
-
async function
|
|
69
|
-
if (
|
|
70
|
-
let e = await getRbacRoleInfo({ id:
|
|
71
|
-
e.success && (
|
|
72
|
-
} else
|
|
73
|
-
|
|
68
|
+
}), [S, C] = useToggle(!1), w = ref(), T = ref({ enable: !0 });
|
|
69
|
+
async function E(e, t) {
|
|
70
|
+
if (x.title = e, e === ACTION.EDIT) {
|
|
71
|
+
let e = await getRbacRoleInfo({ id: t?.id });
|
|
72
|
+
e.success && (T.value = e.data ?? {}, await m(""), T.value.resourceIds && g(T.value.resourceIds));
|
|
73
|
+
} else T.value = { enable: !0 }, _(), await m("");
|
|
74
|
+
C(!0);
|
|
74
75
|
}
|
|
75
|
-
let [
|
|
76
|
-
function
|
|
77
|
-
let e =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
e.success && (message.success(`${
|
|
81
|
-
}).finally(() =>
|
|
76
|
+
let [D, O] = useToggle(!1);
|
|
77
|
+
function k() {
|
|
78
|
+
let e = x.title === ACTION.EDIT ? postRbacRoleRoleUpdate : postRbacRoleAddRole;
|
|
79
|
+
w.value?.validate().then(() => {
|
|
80
|
+
O(!0), e({ ...T.value }).then((e) => {
|
|
81
|
+
e.success && (message.success(`${x.title}成功!`), C(!1), d("submit"));
|
|
82
|
+
}).finally(() => O(!1));
|
|
82
83
|
});
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
|
|
85
|
+
function A() {
|
|
86
|
+
T.value = { enable: !0 }, C(!1);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
|
|
88
|
+
function j() {
|
|
89
|
+
T.value.resourceIds ? v(T.value.resourceIds) : v([]);
|
|
89
90
|
}
|
|
90
|
-
function
|
|
91
|
-
|
|
91
|
+
function M(e) {
|
|
92
|
+
T.value.resourceIds = e.map((e) => e.id), h(e);
|
|
92
93
|
}
|
|
93
|
-
return
|
|
94
|
-
let
|
|
95
|
-
return openBlock(), createBlock(
|
|
96
|
-
open: unref(
|
|
97
|
-
"onUpdate:open":
|
|
98
|
-
title: `${unref(
|
|
94
|
+
return o({ open: E }), (e, t) => {
|
|
95
|
+
let n = Input$1, r = FormItem, i = Select, a = Switch, o = Textarea, s = Button, c = Tooltip$1, l = Form$1, u = Space$1, d = Drawer;
|
|
96
|
+
return openBlock(), createBlock(d, {
|
|
97
|
+
open: unref(S),
|
|
98
|
+
"onUpdate:open": t[6] ||= (e) => isRef(S) ? S.value = e : null,
|
|
99
|
+
title: `${unref(x).title}角色`,
|
|
99
100
|
placement: "right",
|
|
100
101
|
width: 600,
|
|
101
102
|
"destroy-on-close": "",
|
|
102
103
|
"footer-style": { textAlign: "right" },
|
|
103
|
-
onClose:
|
|
104
|
+
onClose: A
|
|
104
105
|
}, {
|
|
105
|
-
footer: withCtx(() => [createVNode(
|
|
106
|
-
default: withCtx(() => [createVNode(
|
|
107
|
-
default: withCtx(() => [...
|
|
106
|
+
footer: withCtx(() => [createVNode(u, null, {
|
|
107
|
+
default: withCtx(() => [createVNode(s, { onClick: A }, {
|
|
108
|
+
default: withCtx(() => [...t[8] ||= [createTextVNode(" 取消 ", -1)]]),
|
|
108
109
|
_: 1
|
|
109
|
-
}), createVNode(
|
|
110
|
+
}), createVNode(s, {
|
|
110
111
|
type: "primary",
|
|
111
|
-
loading: unref(
|
|
112
|
-
onClick:
|
|
112
|
+
loading: unref(D),
|
|
113
|
+
onClick: t[5] ||= (e) => k()
|
|
113
114
|
}, {
|
|
114
|
-
default: withCtx(() => [...
|
|
115
|
+
default: withCtx(() => [...t[9] ||= [createTextVNode(" 提交 ", -1)]]),
|
|
115
116
|
_: 1
|
|
116
117
|
}, 8, ["loading"])]),
|
|
117
118
|
_: 1
|
|
118
119
|
})]),
|
|
119
|
-
default: withCtx(() => [createVNode(
|
|
120
|
+
default: withCtx(() => [createVNode(l, {
|
|
120
121
|
ref_key: "formRef",
|
|
121
|
-
ref:
|
|
122
|
-
model: unref(
|
|
123
|
-
rules:
|
|
122
|
+
ref: w,
|
|
123
|
+
model: unref(T),
|
|
124
|
+
rules: y,
|
|
124
125
|
"label-col": { span: 4 }
|
|
125
126
|
}, {
|
|
126
127
|
default: withCtx(() => [
|
|
127
|
-
createVNode(
|
|
128
|
+
createVNode(r, {
|
|
128
129
|
label: "角色名称",
|
|
129
130
|
name: "name"
|
|
130
131
|
}, {
|
|
131
|
-
default: withCtx(() => [createVNode(
|
|
132
|
-
value: unref(
|
|
133
|
-
"onUpdate:value":
|
|
132
|
+
default: withCtx(() => [createVNode(n, {
|
|
133
|
+
value: unref(T).name,
|
|
134
|
+
"onUpdate:value": t[0] ||= (e) => unref(T).name = e,
|
|
134
135
|
maxlength: 32
|
|
135
136
|
}, null, 8, ["value"])]),
|
|
136
137
|
_: 1
|
|
137
138
|
}),
|
|
138
|
-
createVNode(
|
|
139
|
+
createVNode(r, {
|
|
139
140
|
label: "角色编号",
|
|
140
141
|
name: "code"
|
|
141
142
|
}, {
|
|
142
|
-
default: withCtx(() => [createVNode(
|
|
143
|
-
value: unref(
|
|
144
|
-
"onUpdate:value":
|
|
145
|
-
disabled: unref(
|
|
143
|
+
default: withCtx(() => [createVNode(n, {
|
|
144
|
+
value: unref(T).code,
|
|
145
|
+
"onUpdate:value": t[1] ||= (e) => unref(T).code = e,
|
|
146
|
+
disabled: unref(x).title === unref(ACTION).EDIT,
|
|
146
147
|
maxlength: 32
|
|
147
148
|
}, null, 8, ["value", "disabled"])]),
|
|
148
149
|
_: 1
|
|
149
150
|
}),
|
|
150
|
-
createVNode(
|
|
151
|
+
createVNode(r, {
|
|
151
152
|
label: "可见范围",
|
|
152
153
|
name: "viewScope"
|
|
153
154
|
}, {
|
|
154
|
-
default: withCtx(() => [createVNode(
|
|
155
|
-
value: unref(
|
|
156
|
-
"onUpdate:value":
|
|
155
|
+
default: withCtx(() => [createVNode(i, {
|
|
156
|
+
value: unref(T).viewScope,
|
|
157
|
+
"onUpdate:value": t[2] ||= (e) => unref(T).viewScope = e,
|
|
157
158
|
options: unref(kjOptions)
|
|
158
159
|
}, null, 8, ["value", "options"])]),
|
|
159
160
|
_: 1
|
|
160
161
|
}),
|
|
161
|
-
createVNode(
|
|
162
|
-
default: withCtx(() => [createVNode(
|
|
163
|
-
checked: unref(
|
|
164
|
-
"onUpdate:checked":
|
|
162
|
+
createVNode(r, { label: "是否启用" }, {
|
|
163
|
+
default: withCtx(() => [createVNode(a, {
|
|
164
|
+
checked: unref(T).enable,
|
|
165
|
+
"onUpdate:checked": t[3] ||= (e) => unref(T).enable = e
|
|
165
166
|
}, null, 8, ["checked"])]),
|
|
166
167
|
_: 1
|
|
167
168
|
}),
|
|
168
|
-
createVNode(
|
|
169
|
-
default: withCtx(() => [createVNode(
|
|
170
|
-
value: unref(
|
|
171
|
-
"onUpdate:value":
|
|
169
|
+
createVNode(r, { label: "角色描述" }, {
|
|
170
|
+
default: withCtx(() => [createVNode(o, {
|
|
171
|
+
value: unref(T).description,
|
|
172
|
+
"onUpdate:value": t[4] ||= (e) => unref(T).description = e,
|
|
172
173
|
maxlength: 250,
|
|
173
174
|
"show-count": ""
|
|
174
175
|
}, null, 8, ["value"])]),
|
|
175
176
|
_: 1
|
|
176
177
|
}),
|
|
177
|
-
createVNode(
|
|
178
|
+
createVNode(r, {
|
|
178
179
|
label: "所属资源",
|
|
179
180
|
name: "resourceIds"
|
|
180
181
|
}, {
|
|
181
|
-
default: withCtx(() => [createVNode(
|
|
182
|
+
default: withCtx(() => [createVNode(s, {
|
|
182
183
|
type: "primary",
|
|
183
|
-
onClick:
|
|
184
|
+
onClick: j
|
|
184
185
|
}, {
|
|
185
|
-
default: withCtx(() => [...
|
|
186
|
+
default: withCtx(() => [...t[7] ||= [createTextVNode(" 编辑资源 ", -1)]]),
|
|
186
187
|
_: 1
|
|
187
|
-
}), createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
188
|
+
}), createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(p), (e) => (openBlock(), createElementBlock(Fragment, { key: e }, [e.name.length > 20 ? (openBlock(), createBlock(c, {
|
|
188
189
|
key: 0,
|
|
189
190
|
title: e.name
|
|
190
191
|
}, {
|
|
@@ -197,12 +198,12 @@ var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6p
|
|
|
197
198
|
_: 1
|
|
198
199
|
}, 8, ["model"]), createVNode(ResourceSelector_default, {
|
|
199
200
|
ref_key: "resourceModelRef",
|
|
200
|
-
ref:
|
|
201
|
-
onSelect:
|
|
201
|
+
ref: f,
|
|
202
|
+
onSelect: M
|
|
202
203
|
}, null, 512)]),
|
|
203
204
|
_: 1
|
|
204
205
|
}, 8, ["open", "title"]);
|
|
205
206
|
};
|
|
206
207
|
}
|
|
207
|
-
});
|
|
208
|
-
export {
|
|
208
|
+
}), drawerRole_exports = /* @__PURE__ */ __exportAll({ default: () => drawerRole_default }), drawerRole_default = drawerRole_vue_vue_type_script_setup_true_lang_default;
|
|
209
|
+
export { kjOptions as i, drawerRole_exports as n, ACTION as r, drawerRole_default as t };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
1
2
|
import { Lt as useToggle, dt as postRbacPubRoleGroupSave, ft as postRbacPubRoleGroupUpdate, lt as getRbacPubRoleGroupGetById } from "./index.js";
|
|
2
|
-
import { t as RoleSelector_default } from "./RoleSelector-
|
|
3
|
+
import { t as RoleSelector_default } from "./RoleSelector-gkar_UGG.js";
|
|
3
4
|
import { Fragment, createBlock, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, openBlock, reactive, ref, renderList, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
4
5
|
import { message } from "ant-design-vue";
|
|
5
6
|
import { Button, Drawer, Form as Form$1, FormItem, Input as Input$1, Space as Space$1, Switch, Textarea, Tooltip as Tooltip$1 } from "ant-design-vue/es";
|
|
@@ -12,12 +13,12 @@ ENABLE_TYPE.ON, ENABLE_TYPE.OFF;
|
|
|
12
13
|
var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, _hoisted_3 = {
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
15
|
-
},
|
|
16
|
+
}, drawerRole_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
16
17
|
name: "DrawerRoleGroup",
|
|
17
18
|
__name: "drawerRole",
|
|
18
19
|
emits: ["submit"],
|
|
19
|
-
setup(
|
|
20
|
-
let
|
|
20
|
+
setup(e, { expose: a, emit: c }) {
|
|
21
|
+
let d = c, f = {
|
|
21
22
|
name: [{
|
|
22
23
|
required: !0,
|
|
23
24
|
message: "请输入名称",
|
|
@@ -30,119 +31,119 @@ var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6p
|
|
|
30
31
|
}],
|
|
31
32
|
roleIds: [{
|
|
32
33
|
required: !0,
|
|
33
|
-
validator:
|
|
34
|
+
validator: p,
|
|
34
35
|
trigger: ["blur", "change"]
|
|
35
36
|
}]
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
return
|
|
38
|
+
function p(e, t) {
|
|
39
|
+
return t && t.length > 0 ? Promise.resolve() : Promise.reject(/* @__PURE__ */ Error("请选择角色"));
|
|
39
40
|
}
|
|
40
|
-
let
|
|
41
|
-
async function
|
|
42
|
-
if (
|
|
43
|
-
let e = await getRbacPubRoleGroupGetById({ id:
|
|
44
|
-
e.success && (
|
|
45
|
-
} else
|
|
46
|
-
|
|
41
|
+
let m = reactive({ title: "" }), [h, g] = useToggle(!1), _ = ref(), v = ref({ enable: !0 }), y = ref([]);
|
|
42
|
+
async function b(e, t) {
|
|
43
|
+
if (m.title = e, e === ACTION.EDIT) {
|
|
44
|
+
let e = await getRbacPubRoleGroupGetById({ id: t?.id });
|
|
45
|
+
e.success && (v.value = e.data ?? {}, y.value = e.data?.roles || []);
|
|
46
|
+
} else v.value = { enable: !0 }, y.value = [];
|
|
47
|
+
g(!0);
|
|
47
48
|
}
|
|
48
|
-
let [
|
|
49
|
-
function
|
|
50
|
-
let e =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
e.success && (message.success(`${
|
|
54
|
-
}).finally(() =>
|
|
49
|
+
let [x, S] = useToggle(!1);
|
|
50
|
+
function C() {
|
|
51
|
+
let e = m.title === ACTION.EDIT ? postRbacPubRoleGroupUpdate : postRbacPubRoleGroupSave;
|
|
52
|
+
_.value?.validate().then(() => {
|
|
53
|
+
S(!0), e({ ...v.value }).then((e) => {
|
|
54
|
+
e.success && (message.success(`${m.title}成功!`), g(!1), d("submit"));
|
|
55
|
+
}).finally(() => S(!1));
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
58
|
+
function w() {
|
|
59
|
+
v.value = { enable: !0 }, g(!1);
|
|
59
60
|
}
|
|
60
|
-
let
|
|
61
|
-
function
|
|
62
|
-
let e =
|
|
61
|
+
let T = ref();
|
|
62
|
+
function E() {
|
|
63
|
+
let e = y.value.map((e) => ({
|
|
63
64
|
value: e.id,
|
|
64
65
|
label: e.name
|
|
65
66
|
}));
|
|
66
|
-
|
|
67
|
+
T.value.open(e);
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
69
|
+
function D(e) {
|
|
70
|
+
v.value.roleIds = e.map((e) => e.value).join(","), y.value = e.map((e) => ({
|
|
70
71
|
id: e.value,
|
|
71
72
|
name: e.label
|
|
72
73
|
}));
|
|
73
74
|
}
|
|
74
|
-
return
|
|
75
|
-
let
|
|
76
|
-
return openBlock(), createBlock(
|
|
77
|
-
open: unref(
|
|
78
|
-
"onUpdate:open":
|
|
79
|
-
title: `${unref(
|
|
75
|
+
return a({ open: b }), (e, t) => {
|
|
76
|
+
let n = Input$1, r = FormItem, i = Switch, a = Textarea, o = Button, s = Tooltip$1, c = Form$1, l = Space$1, u = Drawer;
|
|
77
|
+
return openBlock(), createBlock(u, {
|
|
78
|
+
open: unref(h),
|
|
79
|
+
"onUpdate:open": t[4] ||= (e) => isRef(h) ? h.value = e : null,
|
|
80
|
+
title: `${unref(m).title}角色组`,
|
|
80
81
|
placement: "right",
|
|
81
82
|
width: 600,
|
|
82
83
|
"destroy-on-close": "",
|
|
83
84
|
"footer-style": { textAlign: "right" },
|
|
84
|
-
onClose:
|
|
85
|
+
onClose: w
|
|
85
86
|
}, {
|
|
86
|
-
footer: withCtx(() => [createVNode(
|
|
87
|
-
default: withCtx(() => [createVNode(
|
|
88
|
-
default: withCtx(() => [...
|
|
87
|
+
footer: withCtx(() => [createVNode(l, null, {
|
|
88
|
+
default: withCtx(() => [createVNode(o, { onClick: w }, {
|
|
89
|
+
default: withCtx(() => [...t[6] ||= [createTextVNode(" 取消 ", -1)]]),
|
|
89
90
|
_: 1
|
|
90
|
-
}), createVNode(
|
|
91
|
+
}), createVNode(o, {
|
|
91
92
|
type: "primary",
|
|
92
|
-
loading: unref(
|
|
93
|
-
onClick:
|
|
93
|
+
loading: unref(x),
|
|
94
|
+
onClick: t[3] ||= (e) => C()
|
|
94
95
|
}, {
|
|
95
|
-
default: withCtx(() => [...
|
|
96
|
+
default: withCtx(() => [...t[7] ||= [createTextVNode(" 提交 ", -1)]]),
|
|
96
97
|
_: 1
|
|
97
98
|
}, 8, ["loading"])]),
|
|
98
99
|
_: 1
|
|
99
100
|
})]),
|
|
100
|
-
default: withCtx(() => [createVNode(
|
|
101
|
+
default: withCtx(() => [createVNode(c, {
|
|
101
102
|
ref_key: "formRef",
|
|
102
|
-
ref:
|
|
103
|
-
model: unref(
|
|
104
|
-
rules:
|
|
103
|
+
ref: _,
|
|
104
|
+
model: unref(v),
|
|
105
|
+
rules: f,
|
|
105
106
|
"label-col": { span: 4 }
|
|
106
107
|
}, {
|
|
107
108
|
default: withCtx(() => [
|
|
108
|
-
createVNode(
|
|
109
|
+
createVNode(r, {
|
|
109
110
|
label: "角色组名称",
|
|
110
111
|
name: "name"
|
|
111
112
|
}, {
|
|
112
|
-
default: withCtx(() => [createVNode(
|
|
113
|
-
value: unref(
|
|
114
|
-
"onUpdate:value":
|
|
113
|
+
default: withCtx(() => [createVNode(n, {
|
|
114
|
+
value: unref(v).name,
|
|
115
|
+
"onUpdate:value": t[0] ||= (e) => unref(v).name = e,
|
|
115
116
|
maxlength: 32
|
|
116
117
|
}, null, 8, ["value"])]),
|
|
117
118
|
_: 1
|
|
118
119
|
}),
|
|
119
|
-
createVNode(
|
|
120
|
-
default: withCtx(() => [createVNode(
|
|
121
|
-
checked: unref(
|
|
122
|
-
"onUpdate:checked":
|
|
120
|
+
createVNode(r, { label: "是否启用" }, {
|
|
121
|
+
default: withCtx(() => [createVNode(i, {
|
|
122
|
+
checked: unref(v).enable,
|
|
123
|
+
"onUpdate:checked": t[1] ||= (e) => unref(v).enable = e
|
|
123
124
|
}, null, 8, ["checked"])]),
|
|
124
125
|
_: 1
|
|
125
126
|
}),
|
|
126
|
-
createVNode(
|
|
127
|
-
default: withCtx(() => [createVNode(
|
|
128
|
-
value: unref(
|
|
129
|
-
"onUpdate:value":
|
|
127
|
+
createVNode(r, { label: "角色组描述" }, {
|
|
128
|
+
default: withCtx(() => [createVNode(a, {
|
|
129
|
+
value: unref(v).description,
|
|
130
|
+
"onUpdate:value": t[2] ||= (e) => unref(v).description = e,
|
|
130
131
|
maxlength: 250,
|
|
131
132
|
"show-count": ""
|
|
132
133
|
}, null, 8, ["value"])]),
|
|
133
134
|
_: 1
|
|
134
135
|
}),
|
|
135
|
-
createVNode(
|
|
136
|
+
createVNode(r, {
|
|
136
137
|
label: "所属角色",
|
|
137
138
|
name: "roleIds"
|
|
138
139
|
}, {
|
|
139
|
-
default: withCtx(() => [createVNode(
|
|
140
|
+
default: withCtx(() => [createVNode(o, {
|
|
140
141
|
type: "primary",
|
|
141
|
-
onClick:
|
|
142
|
+
onClick: E
|
|
142
143
|
}, {
|
|
143
|
-
default: withCtx(() => [...
|
|
144
|
+
default: withCtx(() => [...t[5] ||= [createTextVNode(" 编辑角色 ", -1)]]),
|
|
144
145
|
_: 1
|
|
145
|
-
}), createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(
|
|
146
|
+
}), createElementVNode("div", _hoisted_1, [(openBlock(!0), createElementBlock(Fragment, null, renderList(unref(y), (e) => (openBlock(), createElementBlock(Fragment, { key: e }, [(e?.name || "").length > 20 ? (openBlock(), createBlock(s, {
|
|
146
147
|
key: 0,
|
|
147
148
|
title: e.name
|
|
148
149
|
}, {
|
|
@@ -155,12 +156,12 @@ var _hoisted_1 = { class: "pt-10px" }, _hoisted_2 = { class: "inline-block mb-6p
|
|
|
155
156
|
_: 1
|
|
156
157
|
}, 8, ["model"]), createVNode(unref(RoleSelector_default), {
|
|
157
158
|
ref_key: "roleModelRef",
|
|
158
|
-
ref:
|
|
159
|
-
onSelect:
|
|
159
|
+
ref: T,
|
|
160
|
+
onSelect: D
|
|
160
161
|
}, null, 512)]),
|
|
161
162
|
_: 1
|
|
162
163
|
}, 8, ["open", "title"]);
|
|
163
164
|
};
|
|
164
165
|
}
|
|
165
|
-
});
|
|
166
|
-
export {
|
|
166
|
+
}), drawerRole_exports = /* @__PURE__ */ __exportAll({ default: () => drawerRole_default }), drawerRole_default = drawerRole_vue_vue_type_script_setup_true_lang_default;
|
|
167
|
+
export { drawerRole_exports as n, ACTION as r, drawerRole_default as t };
|