@pubinfo/module-rbac 2.0.0-beta.3 → 2.0.0-beta.30
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/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/animation_item.vue_vue_type_script_setup_true_lang-efL_vjfY.js +4864 -0
- package/dist/api/modules/assist/gonggaofuwu.d.ts +43 -0
- package/dist/api/modules/assist/index.d.ts +3 -0
- package/dist/api/modules/assist/qunzujiekou.d.ts +36 -0
- package/dist/api/modules/assist/quyujiekou.d.ts +36 -0
- package/dist/api/modules/configData/heibaimingdanfuwu.d.ts +36 -0
- package/dist/api/modules/configData/index.d.ts +3 -0
- package/dist/api/modules/configData/xitongpeizhifuwu.d.ts +99 -0
- package/dist/api/modules/configData/zidianfuwu.d.ts +57 -0
- package/dist/api/modules/log/caozuorizhifuwu.d.ts +15 -0
- package/dist/api/modules/log/denglurizhifuwu.d.ts +15 -0
- package/dist/api/modules/log/index.d.ts +2 -0
- package/dist/api/modules/rbac/gangweijiekou.d.ts +36 -0
- package/dist/api/modules/rbac/index.d.ts +11 -0
- package/dist/api/modules/rbac/jiaosejiekou.d.ts +50 -0
- package/dist/api/modules/rbac/pubJiaosezukongzhiqi.d.ts +43 -0
- package/dist/api/modules/rbac/shujuquanxianzhubiaokongzhiqi.d.ts +64 -0
- package/dist/api/modules/rbac/yonghujiekou.d.ts +85 -0
- package/dist/api/modules/rbac/yonghushoucangbiaojiekou.d.ts +36 -0
- package/dist/api/modules/rbac/yonghuzuijinchangyongbiaojiekou.d.ts +29 -0
- package/dist/api/modules/rbac/ziyuanjiekou.d.ts +85 -0
- package/dist/api/modules/rbac/zuhuguanlijiekou.d.ts +36 -0
- package/dist/api/modules/rbac/zuzhijiaosebiaokongzhiqi.d.ts +29 -0
- package/dist/api/modules/rbac/zuzhijiekou.d.ts +64 -0
- package/dist/api/request.d.ts +1 -0
- package/dist/browserType.vue_vue_type_script_setup_true_lang-Cv8wph6G.js +38 -0
- package/dist/cloneDeep-B4Rj61s4.js +8 -0
- package/dist/components/GroupSelector/index.vue.d.ts +15 -0
- package/dist/components/GroupSelector/interface.d.ts +6 -0
- package/dist/components/OrgTree/index.vue.d.ts +5 -0
- package/dist/components/OrgUserSelector/OrgSelector.vue.d.ts +68 -0
- package/dist/components/OrgUserSelector/UserSelector.vue.d.ts +72 -0
- package/dist/components/OrgUserSelector/index.d.ts +9 -0
- package/dist/components/OrgUserSelector/provider.d.ts +24 -0
- package/dist/components/ResourceSelector/enum.d.ts +5 -0
- package/dist/components/ResourceSelector/hooks/useAppAndResource.d.ts +29 -0
- package/dist/components/ResourceSelector/index.vue.d.ts +24 -0
- package/dist/composables/useLottie.d.ts +11 -0
- package/dist/enum-BEHz_Q18.js +74 -0
- package/dist/enum-C9ihxJe7.js +4 -0
- package/dist/enum-CTUzwCYG.js +4 -0
- package/dist/enum-DDKThkSw.js +24 -0
- package/dist/gangweijiekou-CV7cIo_W.js +46 -0
- package/dist/index-B6A3qFeU.js +18585 -0
- package/dist/index-BChMrCkZ.js +399 -0
- package/dist/index-BIUkDwk2.js +465 -0
- package/dist/index-BOEO9CRp.js +7084 -0
- package/dist/index-BgdW__IO.js +125 -0
- package/dist/index-Bi0fucZj.js +871 -0
- package/dist/index-Bj3Ee1l-.js +177 -0
- package/dist/index-Bzjxdd-F.js +702 -0
- package/dist/index-CF4XGkrK.js +454 -0
- package/dist/index-CGAa6YPO.js +273 -0
- package/dist/index-CK582XAz.js +317 -0
- package/dist/index-Ce9x4LEV.js +633 -0
- package/dist/index-CkVgkVvC.js +461 -0
- package/dist/index-D4uw6wJ9.js +181 -0
- package/dist/index-DFrT08M4.js +388 -0
- package/dist/index-Dju21Cnm.js +140 -0
- package/dist/index-Dmg39liA.js +168 -0
- package/dist/index-DvE43Xkt.js +408 -0
- package/dist/index-Dx3ZDeWT.js +684 -0
- package/dist/index-MmfEJgmm.js +860 -0
- package/dist/index-RBHLCaQ9.js +1626 -0
- package/dist/index-Y2jyqjVz.js +303 -0
- package/dist/index-b_92Syzh.js +131 -0
- package/dist/index-g5Fyla0r.js +164 -0
- package/dist/index-qdAiA-PA.js +286 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -0
- package/dist/interface.d.ts +49 -0
- package/dist/itemlist-Og2t8W5R.js +368 -0
- package/dist/jiaosejiekou-0xZkLzL_.js +58 -0
- package/dist/login_history-BJWFChQ3.js +430 -0
- package/dist/operate_history-C1NKnoB5.js +468 -0
- package/dist/pubJiaosezukongzhiqi-BlLcThHi.js +57 -0
- package/dist/routes/index.d.ts +14 -0
- package/dist/routes/modules/authority.manage.menu.d.ts +3 -0
- package/dist/routes/modules/log.manage.menu.d.ts +3 -0
- package/dist/routes/modules/safe.manage.menu.d.ts +3 -0
- package/dist/routes/modules/stylesetting.manage.menu.d.ts +3 -0
- package/dist/routes/modules/system.manage.menu.d.ts +3 -0
- package/dist/setItem-BRseSui6.js +152 -0
- package/dist/shujuquanxianzhubiaokongzhiqi-3CpYi1Zo.js +65 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/useAppAndResource-BF7jQTCi.js +55 -0
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +14 -0
- package/dist/views/blackWhiteList/enum.d.ts +7 -0
- package/dist/views/blackWhiteList/index.vue.d.ts +1535 -0
- package/dist/views/blackWhiteList/types.d.ts +4 -0
- package/dist/views/breadcrumb_setting/animationData.d.ts +7 -0
- package/dist/views/breadcrumb_setting/index.vue.d.ts +2 -0
- package/dist/views/components/HCheckList.vue.d.ts +20 -0
- package/dist/views/components/animation_item.vue.d.ts +14 -0
- package/dist/views/components/setItem.vue.d.ts +61 -0
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +172 -0
- package/dist/views/data-permission/enum.d.ts +34 -0
- package/dist/views/data-permission/index.vue.d.ts +1691 -0
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +12 -0
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +12 -0
- package/dist/views/dictionary/enum.d.ts +8 -0
- package/dist/views/dictionary/index.vue.d.ts +1532 -0
- package/dist/views/dictionary/itemlist.vue.d.ts +1532 -0
- package/dist/views/group/components/drawerGroup.vue.d.ts +12 -0
- package/dist/views/group/enum.d.ts +21 -0
- package/dist/views/group/index.vue.d.ts +1532 -0
- package/dist/views/layout_setting/index.vue.d.ts +2 -0
- package/dist/views/log_center/components/browserType.vue.d.ts +12 -0
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +14 -0
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +14 -0
- package/dist/views/log_center/login_history.vue.d.ts +1511 -0
- package/dist/views/log_center/operate_history.vue.d.ts +1511 -0
- package/dist/views/menu_setting/animationData.d.ts +13 -0
- package/dist/views/menu_setting/index.vue.d.ts +2 -0
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +12 -0
- package/dist/views/organization/components/drawerRole.vue.d.ts +36 -0
- package/dist/views/organization/components/roleSelect.vue.d.ts +14 -0
- package/dist/views/organization/enum.d.ts +25 -0
- package/dist/views/organization/index.vue.d.ts +73 -0
- package/dist/views/other_setting/animationData.d.ts +7 -0
- package/dist/views/other_setting/index.vue.d.ts +2 -0
- package/dist/views/other_setting/interface.d.ts +23 -0
- package/dist/views/page_animation_setting/animationData.d.ts +11 -0
- package/dist/views/page_animation_setting/index.vue.d.ts +2 -0
- package/dist/views/page_w_setting/index.vue.d.ts +2 -0
- package/dist/views/position/components/drawerPosition.vue.d.ts +12 -0
- package/dist/views/position/enum.d.ts +8 -0
- package/dist/views/position/index.vue.d.ts +1532 -0
- package/dist/views/region/components/drawerRegion.vue.d.ts +12 -0
- package/dist/views/region/enum.d.ts +22 -0
- package/dist/views/region/index.vue.d.ts +1533 -0
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +16 -0
- package/dist/views/resource/components/RoleRelation.vue.d.ts +6 -0
- package/dist/views/resource/enum.d.ts +30 -0
- package/dist/views/resource/index.vue.d.ts +1549 -0
- package/dist/views/resource/interface.d.ts +6 -0
- package/dist/views/role/components/ResourceRelation.vue.d.ts +1515 -0
- package/dist/views/role/components/drawerRole.vue.d.ts +49 -0
- package/dist/views/role/enum.d.ts +25 -0
- package/dist/views/role/index.vue.d.ts +3090 -0
- package/dist/views/role/interface.d.ts +6 -0
- package/dist/views/role_group/components/drawerRole.vue.d.ts +37 -0
- package/dist/views/role_group/components/roleSelect.vue.d.ts +14 -0
- package/dist/views/role_group/enum.d.ts +21 -0
- package/dist/views/role_group/index.vue.d.ts +1557 -0
- package/dist/views/role_group/interface.d.ts +6 -0
- package/dist/views/safe_setting/index.vue.d.ts +4 -0
- package/dist/views/tabbar_setting/animationData.d.ts +11 -0
- package/dist/views/tabbar_setting/index.vue.d.ts +2 -0
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +50 -0
- package/dist/views/tenant/enum.d.ts +7 -0
- package/dist/views/tenant/index.vue.d.ts +1570 -0
- package/dist/views/tenant/interface.d.ts +6 -0
- package/dist/views/theme_setting/index.vue.d.ts +2 -0
- package/dist/views/toolbar_setting/animationData.d.ts +17 -0
- package/dist/views/toolbar_setting/index.vue.d.ts +2 -0
- package/dist/views/user/components/OrgAndPosition.vue.d.ts +14 -0
- package/dist/views/user/components/UserAuthorization.vue.d.ts +39 -0
- package/dist/views/user/components/UserEdit.vue.d.ts +16 -0
- package/dist/views/user/components/roleSelect.vue.d.ts +14 -0
- package/dist/views/user/enum.d.ts +13 -0
- package/dist/views/user/index.vue.d.ts +1586 -0
- package/dist/views/user/interface.d.ts +39 -0
- package/dist/views/watermark_setting/animationData.d.ts +3 -0
- package/dist/views/watermark_setting/index.vue.d.ts +31 -0
- package/dist/xitongpeizhifuwu-BIR2CVXp.js +23 -0
- package/dist/zidianfuwu-B137v_q7.js +65 -0
- package/dist/ziyuanjiekou-j9nd-oaF.js +69 -0
- package/dist/zuzhijiaosebiaokongzhiqi-DPbRg7Qd.js +28 -0
- package/package.json +18 -20
- package/src/components/GroupSelector/index.vue +1 -7
- package/src/components/GroupSelector/interface.ts +6 -0
- package/src/components/OrgUserSelector/index.ts +5 -0
- package/src/components/ResourceSelector/index.vue +1 -2
- package/src/index.ts +8 -14
- package/src/interface.ts +3 -0
- package/src/routes/index.ts +1 -1
- package/src/views/tenant/components/TenantEdit.vue +1 -8
- package/src/views/tenant/enum.ts +7 -0
- package/src/views/tenant/index.vue +1 -8
- package/src/views/theme_setting/index.vue +2 -1
- package/src/views/user/interface.ts +1 -1
- package/src/assets/icons/403.svg +0 -1
- package/src/assets/icons/403_dark.svg +0 -1
- package/src/assets/icons/404.svg +0 -1
- package/src/assets/icons/404_dark.svg +0 -1
- package/src/assets/icons/browser-360.svg +0 -1
- package/src/assets/icons/browser-chrome.svg +0 -1
- package/src/assets/icons/browser-edge.svg +0 -1
- package/src/assets/icons/browser-ie.svg +0 -1
- package/src/assets/icons/browser-other.svg +0 -1
- package/src/assets/icons/browser-qq.svg +0 -1
- package/src/assets/icons/browser-safari.svg +0 -1
- package/src/assets/icons/browser-uc.svg +0 -1
- package/src/assets/icons/change-org.svg +0 -1
- package/src/assets/icons/empty-data.svg +0 -1
- package/src/assets/icons/favorites.svg +0 -1
- package/src/assets/icons/image-load-fail.svg +0 -1
- package/src/assets/icons/logo-sig.svg +0 -1
- package/src/assets/icons/logo.svg +0 -1
- package/src/assets/icons/mima.svg +0 -1
- package/src/assets/icons/process-management.svg +0 -1
- package/src/assets/icons/project-management.svg +0 -1
- package/src/assets/icons/rbac.svg +0 -1
- package/src/assets/icons/test.svg +0 -1
- package/src/assets/icons/toolbar-collapse.svg +0 -1
- package/src/assets/icons/tree_icon.svg +0 -1
- package/src/assets/icons/tree_icon_checked.svg +0 -1
- package/src/assets/icons/workbench.svg +0 -1
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
import { Modal as ne, Input as H, Spin as le, CheckboxGroup as ae, Checkbox as se, Tooltip as J, Tag as re, Button as L, Drawer as ue, Form as ie, FormItem as ce, Switch as de, Textarea as pe, Space as X } from "ant-design-vue/es";
|
|
2
|
+
import { useAuth as fe, PubinfoIcon as _e } from "pubinfo";
|
|
3
|
+
import { SearchOutlined as me, PlusCircleOutlined as ve } from "@ant-design/icons-vue";
|
|
4
|
+
import { defineComponent as z, mergeModels as xe, ref as k, useModel as be, watch as ge, createBlock as E, openBlock as r, withCtx as l, createElementVNode as p, toDisplayString as h, unref as a, createVNode as n, isRef as q, createCommentVNode as Y, createElementBlock as y, Fragment as G, renderList as N, createTextVNode as $, reactive as he, resolveDirective as ke, withDirectives as W } from "vue";
|
|
5
|
+
import { u as j } from "./index-BOEO9CRp.js";
|
|
6
|
+
import { g as ye, p as we, a as Re, b as Ie, d as Ce } from "./pubJiaosezukongzhiqi-BlLcThHi.js";
|
|
7
|
+
import { ProTable as De } from "@pubinfo/pro-components";
|
|
8
|
+
import { message as Z, Badge as Q, Modal as Ee } from "ant-design-vue";
|
|
9
|
+
import { e as $e } from "./jiaosejiekou-0xZkLzL_.js";
|
|
10
|
+
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
var x = /* @__PURE__ */ ((I) => (I.ADD = "新增", I.EDIT = "修改", I.REMOVE = "删除", I.RESOURCE_RELATION = "分配查看", I))(x || {});
|
|
12
|
+
const Se = { class: "h-340px border-1px border-solid flex flex-row border_color" }, Pe = { class: "w-360px flex flex-col" }, Te = { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, Me = { class: "flex-1 overflow-hidden py-10px px-10px" }, Oe = { class: "overflow-y-auto overflow-x-hidden h-[calc(100%-30px)] mt-10px" }, Ue = { key: 1 }, Ve = { class: "flex-1 flex flex-col border-solid border-0px border-l-1px border_color" }, Be = { class: "flex-1 p-10px overflow-auto" }, Ge = /* @__PURE__ */ z({
|
|
13
|
+
name: "RoleSelect",
|
|
14
|
+
__name: "roleSelect",
|
|
15
|
+
props: {
|
|
16
|
+
open: { type: Boolean },
|
|
17
|
+
openModifiers: {}
|
|
18
|
+
},
|
|
19
|
+
emits: /* @__PURE__ */ xe(["select"], ["update:open"]),
|
|
20
|
+
setup(I, { expose: U, emit: O }) {
|
|
21
|
+
const T = O, F = k(!1), _ = k([]), w = k([]), v = k([]), c = k(""), u = be(I, "open"), s = j(u);
|
|
22
|
+
ge(() => _.value, (f) => {
|
|
23
|
+
w.value = f.reduce((e, M) => {
|
|
24
|
+
const V = v.value.find((d) => d.id === M) || {};
|
|
25
|
+
return e.push(V), e;
|
|
26
|
+
}, []);
|
|
27
|
+
}, { deep: !0 });
|
|
28
|
+
async function b(f) {
|
|
29
|
+
F.value = !0;
|
|
30
|
+
const e = await $e();
|
|
31
|
+
F.value = !1, v.value = e.data || [], _.value = [...f], s(!0);
|
|
32
|
+
}
|
|
33
|
+
function R() {
|
|
34
|
+
_.value = [];
|
|
35
|
+
}
|
|
36
|
+
function C(f) {
|
|
37
|
+
const e = _.value.findIndex((M) => M === f);
|
|
38
|
+
e >= 0 && _.value.splice(e, 1);
|
|
39
|
+
}
|
|
40
|
+
function g() {
|
|
41
|
+
T("select", w.value), s(!1);
|
|
42
|
+
}
|
|
43
|
+
function S() {
|
|
44
|
+
return v.value.filter((f) => {
|
|
45
|
+
var e;
|
|
46
|
+
return (e = f.name) == null ? void 0 : e.includes(c.value);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return U({
|
|
50
|
+
open: b
|
|
51
|
+
}), (f, e) => {
|
|
52
|
+
const M = H, V = le, d = J, t = se, P = ae, m = re, B = L, A = ne;
|
|
53
|
+
return r(), E(A, {
|
|
54
|
+
open: u.value,
|
|
55
|
+
"onUpdate:open": e[3] || (e[3] = (o) => u.value = o),
|
|
56
|
+
class: "custom_modal",
|
|
57
|
+
title: "角色选择",
|
|
58
|
+
"mask-closable": !1,
|
|
59
|
+
width: 750
|
|
60
|
+
}, {
|
|
61
|
+
footer: l(() => [
|
|
62
|
+
n(B, {
|
|
63
|
+
onClick: e[2] || (e[2] = (o) => a(s)(!1))
|
|
64
|
+
}, {
|
|
65
|
+
default: l(() => e[6] || (e[6] = [
|
|
66
|
+
$(" 取消 ")
|
|
67
|
+
])),
|
|
68
|
+
_: 1,
|
|
69
|
+
__: [6]
|
|
70
|
+
}),
|
|
71
|
+
n(B, {
|
|
72
|
+
type: "primary",
|
|
73
|
+
onClick: g
|
|
74
|
+
}, {
|
|
75
|
+
default: l(() => e[7] || (e[7] = [
|
|
76
|
+
$(" 确定 ")
|
|
77
|
+
])),
|
|
78
|
+
_: 1,
|
|
79
|
+
__: [7]
|
|
80
|
+
})
|
|
81
|
+
]),
|
|
82
|
+
default: l(() => [
|
|
83
|
+
p("div", Se, [
|
|
84
|
+
p("div", Pe, [
|
|
85
|
+
p("div", Te, [
|
|
86
|
+
e[4] || (e[4] = p(
|
|
87
|
+
"div",
|
|
88
|
+
{ class: "" },
|
|
89
|
+
" 全部角色 ",
|
|
90
|
+
-1
|
|
91
|
+
/* HOISTED */
|
|
92
|
+
)),
|
|
93
|
+
p(
|
|
94
|
+
"div",
|
|
95
|
+
null,
|
|
96
|
+
h(a(_).length) + "/" + h(a(v).length),
|
|
97
|
+
1
|
|
98
|
+
/* TEXT */
|
|
99
|
+
)
|
|
100
|
+
]),
|
|
101
|
+
p("div", Me, [
|
|
102
|
+
n(M, {
|
|
103
|
+
value: a(c),
|
|
104
|
+
"onUpdate:value": e[0] || (e[0] = (o) => q(c) ? c.value = o : null),
|
|
105
|
+
placeholder: "请输入",
|
|
106
|
+
"allow-clear": "",
|
|
107
|
+
onChange: S
|
|
108
|
+
}, {
|
|
109
|
+
prefix: l(() => [
|
|
110
|
+
n(a(me))
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
/* STABLE */
|
|
114
|
+
}, 8, ["value"]),
|
|
115
|
+
p("div", Oe, [
|
|
116
|
+
a(F) ? (r(), E(V, { key: 0 })) : Y("v-if", !0),
|
|
117
|
+
n(P, {
|
|
118
|
+
value: a(_),
|
|
119
|
+
"onUpdate:value": e[1] || (e[1] = (o) => q(_) ? _.value = o : null)
|
|
120
|
+
}, {
|
|
121
|
+
default: l(() => [
|
|
122
|
+
(r(!0), y(
|
|
123
|
+
G,
|
|
124
|
+
null,
|
|
125
|
+
N(S(), (o) => (r(), y("div", {
|
|
126
|
+
key: o.id,
|
|
127
|
+
class: "w-full py-10px bodb"
|
|
128
|
+
}, [
|
|
129
|
+
n(t, {
|
|
130
|
+
value: o.id
|
|
131
|
+
}, {
|
|
132
|
+
default: l(() => [
|
|
133
|
+
(o.name || "").length > 22 ? (r(), E(d, {
|
|
134
|
+
key: 0,
|
|
135
|
+
title: o.name
|
|
136
|
+
}, {
|
|
137
|
+
default: l(() => {
|
|
138
|
+
var D;
|
|
139
|
+
return [
|
|
140
|
+
$(
|
|
141
|
+
h(`${(D = o == null ? void 0 : o.name) == null ? void 0 : D.slice(0, 22)}...`),
|
|
142
|
+
1
|
|
143
|
+
/* TEXT */
|
|
144
|
+
)
|
|
145
|
+
];
|
|
146
|
+
}),
|
|
147
|
+
_: 2
|
|
148
|
+
/* DYNAMIC */
|
|
149
|
+
}, 1032, ["title"])) : (r(), y(
|
|
150
|
+
"span",
|
|
151
|
+
Ue,
|
|
152
|
+
h(o.name),
|
|
153
|
+
1
|
|
154
|
+
/* TEXT */
|
|
155
|
+
))
|
|
156
|
+
]),
|
|
157
|
+
_: 2
|
|
158
|
+
/* DYNAMIC */
|
|
159
|
+
}, 1032, ["value"])
|
|
160
|
+
]))),
|
|
161
|
+
128
|
|
162
|
+
/* KEYED_FRAGMENT */
|
|
163
|
+
))
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
/* STABLE */
|
|
167
|
+
}, 8, ["value"])
|
|
168
|
+
])
|
|
169
|
+
])
|
|
170
|
+
]),
|
|
171
|
+
p("div", Ve, [
|
|
172
|
+
p("div", { class: "w-full h-34px bg-[#F2F3F5] flex px-15px items-center justify-between text-[#1D2129] dark:bg-[#1D2129] dark:text-[#F2F3F5]" }, [
|
|
173
|
+
e[5] || (e[5] = p(
|
|
174
|
+
"div",
|
|
175
|
+
{ class: "" },
|
|
176
|
+
" 已选角色 ",
|
|
177
|
+
-1
|
|
178
|
+
/* HOISTED */
|
|
179
|
+
)),
|
|
180
|
+
p("div", {
|
|
181
|
+
class: "cursor-pointer text-[#165DFF]",
|
|
182
|
+
onClick: R
|
|
183
|
+
}, " 清空 ")
|
|
184
|
+
]),
|
|
185
|
+
p("div", Be, [
|
|
186
|
+
(r(!0), y(
|
|
187
|
+
G,
|
|
188
|
+
null,
|
|
189
|
+
N(a(w), (o) => (r(), y("div", {
|
|
190
|
+
key: o.id,
|
|
191
|
+
class: "inline-block mb-6px max-w-300px"
|
|
192
|
+
}, [
|
|
193
|
+
(o.name || "").length > 20 ? (r(), E(d, {
|
|
194
|
+
key: 0,
|
|
195
|
+
title: o.name
|
|
196
|
+
}, {
|
|
197
|
+
default: l(() => [
|
|
198
|
+
n(m, {
|
|
199
|
+
class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
|
|
200
|
+
closable: "",
|
|
201
|
+
onClose: (D) => C(o.id || "")
|
|
202
|
+
}, {
|
|
203
|
+
default: l(() => {
|
|
204
|
+
var D;
|
|
205
|
+
return [
|
|
206
|
+
$(
|
|
207
|
+
h(`${(D = o == null ? void 0 : o.name) == null ? void 0 : D.slice(0, 20)}...`),
|
|
208
|
+
1
|
|
209
|
+
/* TEXT */
|
|
210
|
+
)
|
|
211
|
+
];
|
|
212
|
+
}),
|
|
213
|
+
_: 2
|
|
214
|
+
/* DYNAMIC */
|
|
215
|
+
}, 1032, ["onClose"])
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
/* DYNAMIC */
|
|
219
|
+
}, 1032, ["title"])) : (r(), E(m, {
|
|
220
|
+
key: 1,
|
|
221
|
+
class: "custom_tag bg-[#e8f3ff] dark:bg-[#141414]",
|
|
222
|
+
closable: "",
|
|
223
|
+
onClose: (D) => C(o.id || "")
|
|
224
|
+
}, {
|
|
225
|
+
default: l(() => [
|
|
226
|
+
$(
|
|
227
|
+
h(o.name),
|
|
228
|
+
1
|
|
229
|
+
/* TEXT */
|
|
230
|
+
)
|
|
231
|
+
]),
|
|
232
|
+
_: 2
|
|
233
|
+
/* DYNAMIC */
|
|
234
|
+
}, 1032, ["onClose"]))
|
|
235
|
+
]))),
|
|
236
|
+
128
|
|
237
|
+
/* KEYED_FRAGMENT */
|
|
238
|
+
))
|
|
239
|
+
])
|
|
240
|
+
])
|
|
241
|
+
])
|
|
242
|
+
]),
|
|
243
|
+
_: 1
|
|
244
|
+
/* STABLE */
|
|
245
|
+
}, 8, ["open"]);
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}), Ae = /* @__PURE__ */ Fe(Ge, [["__scopeId", "data-v-3273a107"]]), We = { class: "pt-10px" }, qe = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, Ne = {
|
|
249
|
+
key: 1,
|
|
250
|
+
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
251
|
+
}, je = /* @__PURE__ */ z({
|
|
252
|
+
name: "DrawerRoleGroup",
|
|
253
|
+
__name: "drawerRole",
|
|
254
|
+
emits: ["submit"],
|
|
255
|
+
setup(I, { expose: U, emit: O }) {
|
|
256
|
+
const T = O, F = {
|
|
257
|
+
name: [
|
|
258
|
+
{ required: !0, message: "请输入名称", trigger: "blur" },
|
|
259
|
+
{ min: 2, max: 32, message: "角色组名称长度不能少于2位,不能超过32位", trigger: "change" }
|
|
260
|
+
],
|
|
261
|
+
roleIds: [{ required: !0, validator: _, trigger: ["blur", "change"] }]
|
|
262
|
+
};
|
|
263
|
+
function _(d, t) {
|
|
264
|
+
return t && t.length > 0 ? Promise.resolve() : Promise.reject(new Error("请选择角色"));
|
|
265
|
+
}
|
|
266
|
+
const w = he({
|
|
267
|
+
title: ""
|
|
268
|
+
}), [v, c] = j(!1), u = k(), s = k({ enable: !0 }), b = k([]);
|
|
269
|
+
async function R(d, t) {
|
|
270
|
+
var P;
|
|
271
|
+
if (w.title = d, d === x.EDIT) {
|
|
272
|
+
const m = await ye({ id: t == null ? void 0 : t.id });
|
|
273
|
+
m.success && (s.value = m.data ?? {}, b.value = ((P = m.data) == null ? void 0 : P.roles) || []);
|
|
274
|
+
} else
|
|
275
|
+
s.value = {
|
|
276
|
+
enable: !0
|
|
277
|
+
}, b.value = [];
|
|
278
|
+
c(!0);
|
|
279
|
+
}
|
|
280
|
+
const [C, g] = j(!1);
|
|
281
|
+
function S() {
|
|
282
|
+
var t;
|
|
283
|
+
const d = w.title === x.EDIT ? we : Re;
|
|
284
|
+
(t = u.value) == null || t.validate().then(() => {
|
|
285
|
+
g(!0);
|
|
286
|
+
const P = { ...s.value };
|
|
287
|
+
d(P).then((m) => {
|
|
288
|
+
m.success && (Z.success(`${w.title}成功!`), c(!1), T("submit"));
|
|
289
|
+
}).finally(() => g(!1));
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
function f() {
|
|
293
|
+
s.value = {
|
|
294
|
+
enable: !0
|
|
295
|
+
}, c(!1);
|
|
296
|
+
}
|
|
297
|
+
const e = k();
|
|
298
|
+
function M() {
|
|
299
|
+
e.value.open(b.value.map((d) => d.id));
|
|
300
|
+
}
|
|
301
|
+
function V(d) {
|
|
302
|
+
s.value.roleIds = d.map((t) => t.id).join(","), b.value = d;
|
|
303
|
+
}
|
|
304
|
+
return U({
|
|
305
|
+
open: R
|
|
306
|
+
}), (d, t) => {
|
|
307
|
+
const P = H, m = ce, B = de, A = pe, o = L, D = J, ee = ie, te = X, oe = ue;
|
|
308
|
+
return r(), E(oe, {
|
|
309
|
+
open: a(v),
|
|
310
|
+
"onUpdate:open": t[4] || (t[4] = (i) => q(v) ? v.value = i : null),
|
|
311
|
+
title: `${a(w).title}角色组`,
|
|
312
|
+
placement: "right",
|
|
313
|
+
width: 600,
|
|
314
|
+
"destroy-on-close": "",
|
|
315
|
+
"footer-style": { textAlign: "right" },
|
|
316
|
+
onClose: f
|
|
317
|
+
}, {
|
|
318
|
+
footer: l(() => [
|
|
319
|
+
n(te, null, {
|
|
320
|
+
default: l(() => [
|
|
321
|
+
n(o, { onClick: f }, {
|
|
322
|
+
default: l(() => t[6] || (t[6] = [
|
|
323
|
+
$(" 取消 ")
|
|
324
|
+
])),
|
|
325
|
+
_: 1,
|
|
326
|
+
__: [6]
|
|
327
|
+
}),
|
|
328
|
+
n(o, {
|
|
329
|
+
type: "primary",
|
|
330
|
+
loading: a(C),
|
|
331
|
+
onClick: t[3] || (t[3] = (i) => S())
|
|
332
|
+
}, {
|
|
333
|
+
default: l(() => t[7] || (t[7] = [
|
|
334
|
+
$(" 提交 ")
|
|
335
|
+
])),
|
|
336
|
+
_: 1,
|
|
337
|
+
__: [7]
|
|
338
|
+
}, 8, ["loading"])
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
/* STABLE */
|
|
342
|
+
})
|
|
343
|
+
]),
|
|
344
|
+
default: l(() => [
|
|
345
|
+
n(ee, {
|
|
346
|
+
ref_key: "formRef",
|
|
347
|
+
ref: u,
|
|
348
|
+
model: a(s),
|
|
349
|
+
rules: F,
|
|
350
|
+
"label-col": { span: 4 }
|
|
351
|
+
}, {
|
|
352
|
+
default: l(() => [
|
|
353
|
+
n(m, {
|
|
354
|
+
label: "角色组名称",
|
|
355
|
+
name: "name"
|
|
356
|
+
}, {
|
|
357
|
+
default: l(() => [
|
|
358
|
+
n(P, {
|
|
359
|
+
value: a(s).name,
|
|
360
|
+
"onUpdate:value": t[0] || (t[0] = (i) => a(s).name = i),
|
|
361
|
+
maxlength: 32
|
|
362
|
+
}, null, 8, ["value"])
|
|
363
|
+
]),
|
|
364
|
+
_: 1
|
|
365
|
+
/* STABLE */
|
|
366
|
+
}),
|
|
367
|
+
n(m, { label: "是否启用" }, {
|
|
368
|
+
default: l(() => [
|
|
369
|
+
n(B, {
|
|
370
|
+
checked: a(s).enable,
|
|
371
|
+
"onUpdate:checked": t[1] || (t[1] = (i) => a(s).enable = i)
|
|
372
|
+
}, null, 8, ["checked"])
|
|
373
|
+
]),
|
|
374
|
+
_: 1
|
|
375
|
+
/* STABLE */
|
|
376
|
+
}),
|
|
377
|
+
n(m, { label: "角色组描述" }, {
|
|
378
|
+
default: l(() => [
|
|
379
|
+
n(A, {
|
|
380
|
+
value: a(s).description,
|
|
381
|
+
"onUpdate:value": t[2] || (t[2] = (i) => a(s).description = i),
|
|
382
|
+
maxlength: 250,
|
|
383
|
+
"show-count": ""
|
|
384
|
+
}, null, 8, ["value"])
|
|
385
|
+
]),
|
|
386
|
+
_: 1
|
|
387
|
+
/* STABLE */
|
|
388
|
+
}),
|
|
389
|
+
n(m, {
|
|
390
|
+
label: "所属角色",
|
|
391
|
+
name: "roleIds"
|
|
392
|
+
}, {
|
|
393
|
+
default: l(() => [
|
|
394
|
+
n(o, {
|
|
395
|
+
type: "primary",
|
|
396
|
+
onClick: M
|
|
397
|
+
}, {
|
|
398
|
+
default: l(() => t[5] || (t[5] = [
|
|
399
|
+
$(" 编辑角色 ")
|
|
400
|
+
])),
|
|
401
|
+
_: 1,
|
|
402
|
+
__: [5]
|
|
403
|
+
}),
|
|
404
|
+
p("div", We, [
|
|
405
|
+
(r(!0), y(
|
|
406
|
+
G,
|
|
407
|
+
null,
|
|
408
|
+
N(a(b), (i) => (r(), y(
|
|
409
|
+
G,
|
|
410
|
+
{ key: i },
|
|
411
|
+
[
|
|
412
|
+
((i == null ? void 0 : i.name) || "").length > 20 ? (r(), E(D, {
|
|
413
|
+
key: 0,
|
|
414
|
+
title: i.name
|
|
415
|
+
}, {
|
|
416
|
+
default: l(() => {
|
|
417
|
+
var K;
|
|
418
|
+
return [
|
|
419
|
+
p(
|
|
420
|
+
"span",
|
|
421
|
+
qe,
|
|
422
|
+
h(`${(K = i == null ? void 0 : i.name) == null ? void 0 : K.slice(0, 20)}...`),
|
|
423
|
+
1
|
|
424
|
+
/* TEXT */
|
|
425
|
+
)
|
|
426
|
+
];
|
|
427
|
+
}),
|
|
428
|
+
_: 2
|
|
429
|
+
/* DYNAMIC */
|
|
430
|
+
}, 1032, ["title"])) : (r(), y(
|
|
431
|
+
"span",
|
|
432
|
+
Ne,
|
|
433
|
+
h(i.name),
|
|
434
|
+
1
|
|
435
|
+
/* TEXT */
|
|
436
|
+
))
|
|
437
|
+
],
|
|
438
|
+
64
|
|
439
|
+
/* STABLE_FRAGMENT */
|
|
440
|
+
))),
|
|
441
|
+
128
|
|
442
|
+
/* KEYED_FRAGMENT */
|
|
443
|
+
))
|
|
444
|
+
])
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
/* STABLE */
|
|
448
|
+
})
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
/* STABLE */
|
|
452
|
+
}, 8, ["model"]),
|
|
453
|
+
n(
|
|
454
|
+
Ae,
|
|
455
|
+
{
|
|
456
|
+
ref_key: "roleModelRef",
|
|
457
|
+
ref: e,
|
|
458
|
+
onSelect: V
|
|
459
|
+
},
|
|
460
|
+
null,
|
|
461
|
+
512
|
|
462
|
+
/* NEED_PATCH */
|
|
463
|
+
)
|
|
464
|
+
]),
|
|
465
|
+
_: 1
|
|
466
|
+
/* STABLE */
|
|
467
|
+
}, 8, ["open", "title"]);
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
}), Le = {
|
|
471
|
+
"py-10px": "",
|
|
472
|
+
"px-10px": "",
|
|
473
|
+
"w-full": "",
|
|
474
|
+
"h-full": ""
|
|
475
|
+
}, ze = ["onClick"], Ke = {
|
|
476
|
+
class: "ml-4px"
|
|
477
|
+
}, Qe = ["onClick"], He = {
|
|
478
|
+
class: "ml-4px"
|
|
479
|
+
}, st = /* @__PURE__ */ z({
|
|
480
|
+
name: "Role",
|
|
481
|
+
__name: "index",
|
|
482
|
+
setup(I) {
|
|
483
|
+
const {
|
|
484
|
+
auth: U
|
|
485
|
+
} = fe(), O = k(), T = k();
|
|
486
|
+
function F() {
|
|
487
|
+
O.value.reload();
|
|
488
|
+
}
|
|
489
|
+
async function _(c) {
|
|
490
|
+
var C, g;
|
|
491
|
+
const {
|
|
492
|
+
current: u,
|
|
493
|
+
pageSize: s,
|
|
494
|
+
...b
|
|
495
|
+
} = c, R = await Ie({
|
|
496
|
+
currentPage: u,
|
|
497
|
+
pageSize: s,
|
|
498
|
+
...b
|
|
499
|
+
});
|
|
500
|
+
return {
|
|
501
|
+
success: R.success,
|
|
502
|
+
data: ((C = R.data) == null ? void 0 : C.records) ?? [],
|
|
503
|
+
total: ((g = R.data) == null ? void 0 : g.total) ?? 0
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
const w = [{
|
|
507
|
+
valueType: "a-input",
|
|
508
|
+
bind: "value",
|
|
509
|
+
minWidth: 200,
|
|
510
|
+
title: "角色组名称",
|
|
511
|
+
dataIndex: "name",
|
|
512
|
+
ellipsis: !0,
|
|
513
|
+
fieldProps: {
|
|
514
|
+
placeholder: "请输入角色组名称",
|
|
515
|
+
allowClear: !0
|
|
516
|
+
}
|
|
517
|
+
}, {
|
|
518
|
+
hideInSearch: !0,
|
|
519
|
+
minWidth: 80,
|
|
520
|
+
title: "创建人",
|
|
521
|
+
dataIndex: "createUserName"
|
|
522
|
+
}, {
|
|
523
|
+
hideInSearch: !0,
|
|
524
|
+
minWidth: 100,
|
|
525
|
+
title: "创建部门",
|
|
526
|
+
dataIndex: "createOrgName"
|
|
527
|
+
}, {
|
|
528
|
+
hideInSearch: !0,
|
|
529
|
+
minWidth: 100,
|
|
530
|
+
title: "创建时间",
|
|
531
|
+
dataIndex: "createTime"
|
|
532
|
+
}, {
|
|
533
|
+
hideInSearch: !0,
|
|
534
|
+
minWidth: 100,
|
|
535
|
+
title: "修改时间",
|
|
536
|
+
dataIndex: "updateTime"
|
|
537
|
+
}, {
|
|
538
|
+
valueType: "a-select",
|
|
539
|
+
minWidth: 80,
|
|
540
|
+
title: "角色组状态",
|
|
541
|
+
dataIndex: "enable",
|
|
542
|
+
customRender: ({
|
|
543
|
+
text: c
|
|
544
|
+
}) => c ? n(Q, {
|
|
545
|
+
status: "success",
|
|
546
|
+
text: "正常"
|
|
547
|
+
}, null) : n(Q, {
|
|
548
|
+
status: "error",
|
|
549
|
+
text: "关闭"
|
|
550
|
+
}, null),
|
|
551
|
+
fieldProps: {
|
|
552
|
+
placeholder: "请选择是否启用",
|
|
553
|
+
allowClear: !0,
|
|
554
|
+
options: [{
|
|
555
|
+
value: 1,
|
|
556
|
+
label: "正常"
|
|
557
|
+
}, {
|
|
558
|
+
value: 0,
|
|
559
|
+
label: "关闭"
|
|
560
|
+
}]
|
|
561
|
+
}
|
|
562
|
+
}, {
|
|
563
|
+
hideInSearch: !0,
|
|
564
|
+
width: 140,
|
|
565
|
+
title: "操作",
|
|
566
|
+
dataIndex: "action",
|
|
567
|
+
fixed: "right",
|
|
568
|
+
hideInTable() {
|
|
569
|
+
return !U(["role_group_edit", "role_group_remove"]);
|
|
570
|
+
}
|
|
571
|
+
}];
|
|
572
|
+
function v(c, u) {
|
|
573
|
+
switch (c) {
|
|
574
|
+
case x.EDIT:
|
|
575
|
+
T.value.open(c, u);
|
|
576
|
+
break;
|
|
577
|
+
case x.ADD:
|
|
578
|
+
T.value.open(c);
|
|
579
|
+
break;
|
|
580
|
+
case x.REMOVE:
|
|
581
|
+
Ee.confirm({
|
|
582
|
+
title: "删除",
|
|
583
|
+
content: "确定要删除该角色组吗?",
|
|
584
|
+
onOk() {
|
|
585
|
+
Ce({
|
|
586
|
+
id: u == null ? void 0 : u.id
|
|
587
|
+
}).then((s) => {
|
|
588
|
+
s.success && (Z.success("删除成功"), F());
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
break;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return (c, u) => {
|
|
596
|
+
const s = ve, b = L, R = _e, C = X, g = ke("auth");
|
|
597
|
+
return r(), y("div", Le, [n(
|
|
598
|
+
a(De),
|
|
599
|
+
{
|
|
600
|
+
ref_key: "tableRef",
|
|
601
|
+
ref: O,
|
|
602
|
+
"row-key": "id",
|
|
603
|
+
request: _,
|
|
604
|
+
columns: w,
|
|
605
|
+
"auto-height": "",
|
|
606
|
+
scroll: {
|
|
607
|
+
x: 1100
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
toolbar: l(() => [W((r(), E(b, {
|
|
612
|
+
type: "primary",
|
|
613
|
+
onClick: u[0] || (u[0] = (S) => v(a(x).ADD))
|
|
614
|
+
}, {
|
|
615
|
+
default: l(() => [n(s), $(
|
|
616
|
+
" " + h(a(x).ADD),
|
|
617
|
+
1
|
|
618
|
+
/* TEXT */
|
|
619
|
+
)]),
|
|
620
|
+
_: 1
|
|
621
|
+
/* STABLE */
|
|
622
|
+
})), [[g, "role_group_add"]])]),
|
|
623
|
+
bodyCell: l(({
|
|
624
|
+
column: S,
|
|
625
|
+
record: f
|
|
626
|
+
}) => [S.dataIndex === "action" ? (r(), E(
|
|
627
|
+
C,
|
|
628
|
+
{
|
|
629
|
+
key: 0
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
default: l(() => [W((r(), y("a", {
|
|
633
|
+
class: "flex items-center",
|
|
634
|
+
onClick: (e) => v(a(x).EDIT, f)
|
|
635
|
+
}, [n(R, {
|
|
636
|
+
name: "edit",
|
|
637
|
+
class: "text-base"
|
|
638
|
+
}), p(
|
|
639
|
+
"span",
|
|
640
|
+
Ke,
|
|
641
|
+
h(a(x).EDIT),
|
|
642
|
+
1
|
|
643
|
+
/* TEXT */
|
|
644
|
+
)], 8, ze)), [[g, "role_edit"]]), W((r(), y("span", {
|
|
645
|
+
class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
|
|
646
|
+
onClick: (e) => v(a(x).REMOVE, f)
|
|
647
|
+
}, [n(R, {
|
|
648
|
+
name: "remove",
|
|
649
|
+
class: "text-base"
|
|
650
|
+
}), p(
|
|
651
|
+
"span",
|
|
652
|
+
He,
|
|
653
|
+
h(a(x).REMOVE),
|
|
654
|
+
1
|
|
655
|
+
/* TEXT */
|
|
656
|
+
)], 8, Qe)), [[g, "role_remove"]])]),
|
|
657
|
+
_: 2
|
|
658
|
+
/* DYNAMIC */
|
|
659
|
+
},
|
|
660
|
+
1024
|
|
661
|
+
/* DYNAMIC_SLOTS */
|
|
662
|
+
)) : Y("v-if", !0)]),
|
|
663
|
+
_: 1
|
|
664
|
+
/* STABLE */
|
|
665
|
+
},
|
|
666
|
+
512
|
|
667
|
+
/* NEED_PATCH */
|
|
668
|
+
), n(
|
|
669
|
+
je,
|
|
670
|
+
{
|
|
671
|
+
ref_key: "drawerRoleRef",
|
|
672
|
+
ref: T,
|
|
673
|
+
onSubmit: u[1] || (u[1] = (S) => F())
|
|
674
|
+
},
|
|
675
|
+
null,
|
|
676
|
+
512
|
|
677
|
+
/* NEED_PATCH */
|
|
678
|
+
)]);
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
export {
|
|
683
|
+
st as default
|
|
684
|
+
};
|