@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,633 @@
|
|
|
1
|
+
import { Drawer as G, Form as ie, FormItem as ue, Input as ce, Select as de, Switch as pe, Textarea as me, Button as H, Tooltip as _e, Space as J, Segmented as fe, Tag as ge } from "ant-design-vue/es";
|
|
2
|
+
import { useAuth as ve, PubinfoIcon as Re } from "pubinfo";
|
|
3
|
+
import { PlusCircleOutlined as xe } from "@ant-design/icons-vue";
|
|
4
|
+
import { defineComponent as L, reactive as be, ref as x, createBlock as T, openBlock as d, unref as o, isRef as M, withCtx as s, createVNode as n, createElementVNode as O, createTextVNode as A, createElementBlock as w, Fragment as z, renderList as he, toDisplayString as C, computed as Ie, createCommentVNode as N, resolveDirective as ke, withDirectives as q } from "vue";
|
|
5
|
+
import { u as V } from "./index-BOEO9CRp.js";
|
|
6
|
+
import { g as we, p as ye, a as Ee, b as Se, c as De, d as Ce } from "./jiaosejiekou-0xZkLzL_.js";
|
|
7
|
+
import { ProTable as K } from "@pubinfo/pro-components";
|
|
8
|
+
import { message as Q, Badge as j, Modal as Oe } from "ant-design-vue";
|
|
9
|
+
import { u as Te } from "./useAppAndResource-BF7jQTCi.js";
|
|
10
|
+
import { _ as $e } from "./index-BChMrCkZ.js";
|
|
11
|
+
import { p as Ue } from "./zuzhijiaosebiaokongzhiqi-DPbRg7Qd.js";
|
|
12
|
+
import { _ as Ae } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
var i = /* @__PURE__ */ ((b) => (b.ADD = "新增", b.EDIT = "修改", b.REMOVE = "删除", b.RESOURCE_RELATION = "分配查看", b))(i || {});
|
|
14
|
+
const X = [
|
|
15
|
+
{
|
|
16
|
+
label: "仅自己",
|
|
17
|
+
value: "1"
|
|
18
|
+
/* OWNER */
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "全部可见",
|
|
22
|
+
value: "2"
|
|
23
|
+
/* ALL */
|
|
24
|
+
}
|
|
25
|
+
], Pe = { class: "pt-10px" }, qe = { class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]" }, Fe = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "inline-block mb-6px mr-6px bg-[#E8F3FF] rounded-2px px-8px py-3px whitespace-nowrap dark:bg-[#141414]"
|
|
28
|
+
}, Me = /* @__PURE__ */ L({
|
|
29
|
+
name: "DrawerRole",
|
|
30
|
+
__name: "drawerRole",
|
|
31
|
+
emits: ["submit"],
|
|
32
|
+
setup(b, { expose: $, emit: y }) {
|
|
33
|
+
const _ = y, {
|
|
34
|
+
resourceModelRef: h,
|
|
35
|
+
selectedResources: U,
|
|
36
|
+
updateTreeDataAndResourceMap: E,
|
|
37
|
+
setSelectedResources: S,
|
|
38
|
+
updateSelectedResources: I,
|
|
39
|
+
clearSelectedResources: c,
|
|
40
|
+
openResourceModel: l
|
|
41
|
+
} = Te(), f = {
|
|
42
|
+
name: [
|
|
43
|
+
{ required: !0, message: "请输入名称", trigger: "change" },
|
|
44
|
+
{ min: 2, max: 32, message: "角色名称长度不能少于2位,不能超过32位", trigger: "change" }
|
|
45
|
+
],
|
|
46
|
+
code: [
|
|
47
|
+
{ required: !0, message: "请输入编号", trigger: "change" },
|
|
48
|
+
{ min: 2, max: 32, message: "角色编码长度不能少于2位,不能超过32位", trigger: "change" }
|
|
49
|
+
],
|
|
50
|
+
viewScope: [{ required: !0, message: "请选择可见范围", trigger: "change" }],
|
|
51
|
+
resourceIds: [{ required: !0, validator: p, trigger: ["blur", "change"] }]
|
|
52
|
+
};
|
|
53
|
+
function p(R, t) {
|
|
54
|
+
return t && t.length > 0 ? Promise.resolve() : Promise.reject(new Error("请选择所属资源"));
|
|
55
|
+
}
|
|
56
|
+
const a = be({
|
|
57
|
+
title: "",
|
|
58
|
+
type: ""
|
|
59
|
+
}), [m, u] = V(!1), v = x(), e = x({ enable: !0 });
|
|
60
|
+
async function g(R, t) {
|
|
61
|
+
if (a.title = R, R === i.EDIT) {
|
|
62
|
+
const D = await we({ id: t == null ? void 0 : t.id });
|
|
63
|
+
D.success && (e.value = D.data ?? {}, await E(""), e.value.resourceIds && I(e.value.resourceIds));
|
|
64
|
+
} else
|
|
65
|
+
e.value = {
|
|
66
|
+
enable: !0
|
|
67
|
+
}, c(), await E("");
|
|
68
|
+
u(!0);
|
|
69
|
+
}
|
|
70
|
+
const [P, W] = V(!1);
|
|
71
|
+
function Y() {
|
|
72
|
+
var t;
|
|
73
|
+
const R = a.title === i.EDIT ? ye : Ee;
|
|
74
|
+
(t = v.value) == null || t.validate().then(() => {
|
|
75
|
+
W(!0);
|
|
76
|
+
const D = { ...e.value };
|
|
77
|
+
R(D).then((k) => {
|
|
78
|
+
k.success && (Q.success(`${a.title}成功!`), u(!1), _("submit"));
|
|
79
|
+
}).finally(() => W(!1));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function B() {
|
|
83
|
+
e.value = {
|
|
84
|
+
enable: !0
|
|
85
|
+
}, u(!1);
|
|
86
|
+
}
|
|
87
|
+
function Z() {
|
|
88
|
+
e.value.resourceIds ? l(e.value.resourceIds) : l([]);
|
|
89
|
+
}
|
|
90
|
+
function ee(R) {
|
|
91
|
+
e.value.resourceIds = R.map((t) => t.id), S(R);
|
|
92
|
+
}
|
|
93
|
+
return $({
|
|
94
|
+
open: g
|
|
95
|
+
}), (R, t) => {
|
|
96
|
+
const D = ce, k = ue, te = de, oe = pe, ne = me, F = H, ae = _e, se = ie, le = J, re = G;
|
|
97
|
+
return d(), T(re, {
|
|
98
|
+
open: o(m),
|
|
99
|
+
"onUpdate:open": t[6] || (t[6] = (r) => M(m) ? m.value = r : null),
|
|
100
|
+
title: `${o(a).title}角色`,
|
|
101
|
+
placement: "right",
|
|
102
|
+
width: 600,
|
|
103
|
+
"destroy-on-close": "",
|
|
104
|
+
"footer-style": { textAlign: "right" },
|
|
105
|
+
onClose: B
|
|
106
|
+
}, {
|
|
107
|
+
footer: s(() => [
|
|
108
|
+
n(le, null, {
|
|
109
|
+
default: s(() => [
|
|
110
|
+
n(F, { onClick: B }, {
|
|
111
|
+
default: s(() => t[8] || (t[8] = [
|
|
112
|
+
A(" 取消 ")
|
|
113
|
+
])),
|
|
114
|
+
_: 1,
|
|
115
|
+
__: [8]
|
|
116
|
+
}),
|
|
117
|
+
n(F, {
|
|
118
|
+
type: "primary",
|
|
119
|
+
loading: o(P),
|
|
120
|
+
onClick: t[5] || (t[5] = (r) => Y())
|
|
121
|
+
}, {
|
|
122
|
+
default: s(() => t[9] || (t[9] = [
|
|
123
|
+
A(" 提交 ")
|
|
124
|
+
])),
|
|
125
|
+
_: 1,
|
|
126
|
+
__: [9]
|
|
127
|
+
}, 8, ["loading"])
|
|
128
|
+
]),
|
|
129
|
+
_: 1
|
|
130
|
+
/* STABLE */
|
|
131
|
+
})
|
|
132
|
+
]),
|
|
133
|
+
default: s(() => [
|
|
134
|
+
n(se, {
|
|
135
|
+
ref_key: "formRef",
|
|
136
|
+
ref: v,
|
|
137
|
+
model: o(e),
|
|
138
|
+
rules: f,
|
|
139
|
+
"label-col": { span: 4 }
|
|
140
|
+
}, {
|
|
141
|
+
default: s(() => [
|
|
142
|
+
n(k, {
|
|
143
|
+
label: "角色名称",
|
|
144
|
+
name: "name"
|
|
145
|
+
}, {
|
|
146
|
+
default: s(() => [
|
|
147
|
+
n(D, {
|
|
148
|
+
value: o(e).name,
|
|
149
|
+
"onUpdate:value": t[0] || (t[0] = (r) => o(e).name = r),
|
|
150
|
+
maxlength: 32
|
|
151
|
+
}, null, 8, ["value"])
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
/* STABLE */
|
|
155
|
+
}),
|
|
156
|
+
n(k, {
|
|
157
|
+
label: "角色编号",
|
|
158
|
+
name: "code"
|
|
159
|
+
}, {
|
|
160
|
+
default: s(() => [
|
|
161
|
+
n(D, {
|
|
162
|
+
value: o(e).code,
|
|
163
|
+
"onUpdate:value": t[1] || (t[1] = (r) => o(e).code = r),
|
|
164
|
+
disabled: o(a).title === o(i).EDIT,
|
|
165
|
+
maxlength: 32
|
|
166
|
+
}, null, 8, ["value", "disabled"])
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
/* STABLE */
|
|
170
|
+
}),
|
|
171
|
+
n(k, {
|
|
172
|
+
label: "可见范围",
|
|
173
|
+
name: "viewScope"
|
|
174
|
+
}, {
|
|
175
|
+
default: s(() => [
|
|
176
|
+
n(te, {
|
|
177
|
+
value: o(e).viewScope,
|
|
178
|
+
"onUpdate:value": t[2] || (t[2] = (r) => o(e).viewScope = r),
|
|
179
|
+
options: o(X)
|
|
180
|
+
}, null, 8, ["value", "options"])
|
|
181
|
+
]),
|
|
182
|
+
_: 1
|
|
183
|
+
/* STABLE */
|
|
184
|
+
}),
|
|
185
|
+
n(k, { label: "是否启用" }, {
|
|
186
|
+
default: s(() => [
|
|
187
|
+
n(oe, {
|
|
188
|
+
checked: o(e).enable,
|
|
189
|
+
"onUpdate:checked": t[3] || (t[3] = (r) => o(e).enable = r)
|
|
190
|
+
}, null, 8, ["checked"])
|
|
191
|
+
]),
|
|
192
|
+
_: 1
|
|
193
|
+
/* STABLE */
|
|
194
|
+
}),
|
|
195
|
+
n(k, { label: "角色描述" }, {
|
|
196
|
+
default: s(() => [
|
|
197
|
+
n(ne, {
|
|
198
|
+
value: o(e).description,
|
|
199
|
+
"onUpdate:value": t[4] || (t[4] = (r) => o(e).description = r),
|
|
200
|
+
maxlength: 250,
|
|
201
|
+
"show-count": ""
|
|
202
|
+
}, null, 8, ["value"])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
/* STABLE */
|
|
206
|
+
}),
|
|
207
|
+
n(k, {
|
|
208
|
+
label: "所属资源",
|
|
209
|
+
name: "resourceIds"
|
|
210
|
+
}, {
|
|
211
|
+
default: s(() => [
|
|
212
|
+
n(F, {
|
|
213
|
+
type: "primary",
|
|
214
|
+
onClick: Z
|
|
215
|
+
}, {
|
|
216
|
+
default: s(() => t[7] || (t[7] = [
|
|
217
|
+
A(" 编辑资源 ")
|
|
218
|
+
])),
|
|
219
|
+
_: 1,
|
|
220
|
+
__: [7]
|
|
221
|
+
}),
|
|
222
|
+
O("div", Pe, [
|
|
223
|
+
(d(!0), w(
|
|
224
|
+
z,
|
|
225
|
+
null,
|
|
226
|
+
he(o(U), (r) => (d(), w(
|
|
227
|
+
z,
|
|
228
|
+
{ key: r },
|
|
229
|
+
[
|
|
230
|
+
r.name.length > 20 ? (d(), T(ae, {
|
|
231
|
+
key: 0,
|
|
232
|
+
title: r.name
|
|
233
|
+
}, {
|
|
234
|
+
default: s(() => [
|
|
235
|
+
O(
|
|
236
|
+
"span",
|
|
237
|
+
qe,
|
|
238
|
+
C(`${r.name.slice(0, 20)}...`),
|
|
239
|
+
1
|
|
240
|
+
/* TEXT */
|
|
241
|
+
)
|
|
242
|
+
]),
|
|
243
|
+
_: 2
|
|
244
|
+
/* DYNAMIC */
|
|
245
|
+
}, 1032, ["title"])) : (d(), w(
|
|
246
|
+
"span",
|
|
247
|
+
Fe,
|
|
248
|
+
C(r.name),
|
|
249
|
+
1
|
|
250
|
+
/* TEXT */
|
|
251
|
+
))
|
|
252
|
+
],
|
|
253
|
+
64
|
|
254
|
+
/* STABLE_FRAGMENT */
|
|
255
|
+
))),
|
|
256
|
+
128
|
|
257
|
+
/* KEYED_FRAGMENT */
|
|
258
|
+
))
|
|
259
|
+
])
|
|
260
|
+
]),
|
|
261
|
+
_: 1
|
|
262
|
+
/* STABLE */
|
|
263
|
+
})
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
/* STABLE */
|
|
267
|
+
}, 8, ["model"]),
|
|
268
|
+
n(
|
|
269
|
+
$e,
|
|
270
|
+
{
|
|
271
|
+
ref_key: "resourceModelRef",
|
|
272
|
+
ref: h,
|
|
273
|
+
onSelect: ee
|
|
274
|
+
},
|
|
275
|
+
null,
|
|
276
|
+
512
|
|
277
|
+
/* NEED_PATCH */
|
|
278
|
+
)
|
|
279
|
+
]),
|
|
280
|
+
_: 1
|
|
281
|
+
/* STABLE */
|
|
282
|
+
}, 8, ["open", "title"]);
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}), Ne = { class: "mb-20px p-x-15px" }, Ve = {
|
|
286
|
+
key: 0,
|
|
287
|
+
class: "flex items-center"
|
|
288
|
+
}, Le = { class: "mr-4px" }, We = /* @__PURE__ */ L({
|
|
289
|
+
name: "ResourceRelation",
|
|
290
|
+
__name: "ResourceRelation",
|
|
291
|
+
setup(b, { expose: $ }) {
|
|
292
|
+
const y = x(["用户自选角色", "组织基础角色"]), _ = x(y.value[0]), [h, U] = V(!1), E = x(""), S = x();
|
|
293
|
+
function I() {
|
|
294
|
+
S.value.fetch();
|
|
295
|
+
}
|
|
296
|
+
async function c(p) {
|
|
297
|
+
var g, P;
|
|
298
|
+
p.pageSize = 15, p.roleId = E.value;
|
|
299
|
+
const { current: a, pageSize: m, ...u } = p, e = await (_.value === "用户自选角色" ? Se : Ue)({
|
|
300
|
+
currentPage: a,
|
|
301
|
+
pageSize: m,
|
|
302
|
+
...u
|
|
303
|
+
});
|
|
304
|
+
return {
|
|
305
|
+
success: e.success,
|
|
306
|
+
data: ((g = e.data) == null ? void 0 : g.records) ?? [],
|
|
307
|
+
total: ((P = e.data) == null ? void 0 : P.total) ?? 0
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
const l = Ie(() => _.value === "用户自选角色" ? [
|
|
311
|
+
{
|
|
312
|
+
title: "用户名称",
|
|
313
|
+
dataIndex: "realName",
|
|
314
|
+
ellipsis: !0
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
title: "组织名称",
|
|
318
|
+
dataIndex: "orgName",
|
|
319
|
+
ellipsis: !0
|
|
320
|
+
}
|
|
321
|
+
] : [
|
|
322
|
+
{
|
|
323
|
+
title: "组织名称",
|
|
324
|
+
dataIndex: "name",
|
|
325
|
+
ellipsis: !0
|
|
326
|
+
}
|
|
327
|
+
]);
|
|
328
|
+
function f(p) {
|
|
329
|
+
E.value = p.id || "", U(!0);
|
|
330
|
+
}
|
|
331
|
+
return $({
|
|
332
|
+
open: f
|
|
333
|
+
}), (p, a) => {
|
|
334
|
+
const m = fe, u = ge, v = G;
|
|
335
|
+
return d(), T(v, {
|
|
336
|
+
open: o(h),
|
|
337
|
+
"onUpdate:open": a[1] || (a[1] = (e) => M(h) ? h.value = e : null),
|
|
338
|
+
title: "分配查看",
|
|
339
|
+
placement: "right",
|
|
340
|
+
width: 720,
|
|
341
|
+
"destroy-on-close": "",
|
|
342
|
+
"footer-style": { textAlign: "right" },
|
|
343
|
+
"body-style": { paddingLeft: 0, paddingRight: 0 }
|
|
344
|
+
}, {
|
|
345
|
+
default: s(() => [
|
|
346
|
+
O("div", Ne, [
|
|
347
|
+
n(m, {
|
|
348
|
+
value: o(_),
|
|
349
|
+
"onUpdate:value": a[0] || (a[0] = (e) => M(_) ? _.value = e : null),
|
|
350
|
+
block: "",
|
|
351
|
+
options: o(y),
|
|
352
|
+
onChange: I
|
|
353
|
+
}, null, 8, ["value", "options"])
|
|
354
|
+
]),
|
|
355
|
+
n(o(K), {
|
|
356
|
+
ref_key: "protable",
|
|
357
|
+
ref: S,
|
|
358
|
+
"row-key": "id",
|
|
359
|
+
request: c,
|
|
360
|
+
columns: o(l),
|
|
361
|
+
search: !1,
|
|
362
|
+
toolbar: !1,
|
|
363
|
+
"auto-height": { offset: 50 }
|
|
364
|
+
}, {
|
|
365
|
+
bodyCell: s(({ column: e, record: g }) => [
|
|
366
|
+
e.dataIndex === "name" ? (d(), w("div", Ve, [
|
|
367
|
+
O(
|
|
368
|
+
"span",
|
|
369
|
+
Le,
|
|
370
|
+
C(g.name),
|
|
371
|
+
1
|
|
372
|
+
/* TEXT */
|
|
373
|
+
),
|
|
374
|
+
g.isInherit === "1" ? (d(), T(u, {
|
|
375
|
+
key: 0,
|
|
376
|
+
color: "processing"
|
|
377
|
+
}, {
|
|
378
|
+
default: s(() => a[2] || (a[2] = [
|
|
379
|
+
A(" 及子组织 ")
|
|
380
|
+
])),
|
|
381
|
+
_: 1,
|
|
382
|
+
__: [2]
|
|
383
|
+
})) : N("v-if", !0)
|
|
384
|
+
])) : N("v-if", !0)
|
|
385
|
+
]),
|
|
386
|
+
_: 1
|
|
387
|
+
/* STABLE */
|
|
388
|
+
}, 8, ["columns"])
|
|
389
|
+
]),
|
|
390
|
+
_: 1
|
|
391
|
+
/* STABLE */
|
|
392
|
+
}, 8, ["open"]);
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
}), Be = /* @__PURE__ */ Ae(We, [["__scopeId", "data-v-11cf8e60"]]), ze = {
|
|
396
|
+
"py-10px": "",
|
|
397
|
+
"px-10px": "",
|
|
398
|
+
"w-full": "",
|
|
399
|
+
"h-full": ""
|
|
400
|
+
}, je = ["onClick"], Ge = ["onClick"], He = {
|
|
401
|
+
class: "ml-4px"
|
|
402
|
+
}, Je = ["onClick"], Ke = {
|
|
403
|
+
class: "ml-4px"
|
|
404
|
+
}, it = /* @__PURE__ */ L({
|
|
405
|
+
name: "Role",
|
|
406
|
+
__name: "index",
|
|
407
|
+
setup(b) {
|
|
408
|
+
const {
|
|
409
|
+
auth: $
|
|
410
|
+
} = ve(), y = x(), _ = x();
|
|
411
|
+
function h() {
|
|
412
|
+
y.value.reload();
|
|
413
|
+
}
|
|
414
|
+
async function U(c) {
|
|
415
|
+
var m, u;
|
|
416
|
+
const {
|
|
417
|
+
current: l,
|
|
418
|
+
pageSize: f,
|
|
419
|
+
...p
|
|
420
|
+
} = c, a = await De({
|
|
421
|
+
currentPage: l,
|
|
422
|
+
pageSize: f,
|
|
423
|
+
...p
|
|
424
|
+
});
|
|
425
|
+
return {
|
|
426
|
+
success: a.success,
|
|
427
|
+
data: ((m = a.data) == null ? void 0 : m.records) ?? [],
|
|
428
|
+
total: ((u = a.data) == null ? void 0 : u.total) ?? 0
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
const E = [{
|
|
432
|
+
valueType: "a-input",
|
|
433
|
+
bind: "value",
|
|
434
|
+
minWidth: 200,
|
|
435
|
+
title: "角色名称",
|
|
436
|
+
dataIndex: "name",
|
|
437
|
+
ellipsis: !0,
|
|
438
|
+
fieldProps: {
|
|
439
|
+
placeholder: "请输入角色名称",
|
|
440
|
+
allowClear: !0
|
|
441
|
+
}
|
|
442
|
+
}, {
|
|
443
|
+
hideInSearch: !0,
|
|
444
|
+
minWidth: 80,
|
|
445
|
+
title: "可见范围",
|
|
446
|
+
dataIndex: "viewScope",
|
|
447
|
+
customRender: ({
|
|
448
|
+
text: c
|
|
449
|
+
}) => {
|
|
450
|
+
var l;
|
|
451
|
+
return (l = X.find((f) => f.value === c)) == null ? void 0 : l.label;
|
|
452
|
+
}
|
|
453
|
+
}, {
|
|
454
|
+
hideInSearch: !0,
|
|
455
|
+
minWidth: 80,
|
|
456
|
+
title: "创建人",
|
|
457
|
+
dataIndex: "createUserName"
|
|
458
|
+
}, {
|
|
459
|
+
hideInSearch: !0,
|
|
460
|
+
minWidth: 100,
|
|
461
|
+
title: "创建部门",
|
|
462
|
+
dataIndex: "createOrgName"
|
|
463
|
+
}, {
|
|
464
|
+
hideInSearch: !0,
|
|
465
|
+
minWidth: 100,
|
|
466
|
+
title: "创建时间",
|
|
467
|
+
dataIndex: "createTime"
|
|
468
|
+
}, {
|
|
469
|
+
hideInSearch: !0,
|
|
470
|
+
minWidth: 100,
|
|
471
|
+
title: "修改时间",
|
|
472
|
+
dataIndex: "updateTime"
|
|
473
|
+
}, {
|
|
474
|
+
hideInSearch: !0,
|
|
475
|
+
minWidth: 80,
|
|
476
|
+
title: "角色状态",
|
|
477
|
+
dataIndex: "enable",
|
|
478
|
+
customRender: ({
|
|
479
|
+
text: c
|
|
480
|
+
}) => c ? n(j, {
|
|
481
|
+
status: "success",
|
|
482
|
+
text: "正常"
|
|
483
|
+
}, null) : n(j, {
|
|
484
|
+
status: "error",
|
|
485
|
+
text: "关闭"
|
|
486
|
+
}, null)
|
|
487
|
+
}, {
|
|
488
|
+
hideInSearch: !0,
|
|
489
|
+
width: 240,
|
|
490
|
+
title: "操作",
|
|
491
|
+
dataIndex: "action",
|
|
492
|
+
fixed: "right",
|
|
493
|
+
hideInTable() {
|
|
494
|
+
return !$(["role_resource_relation", "role_edit", "role_remove"]);
|
|
495
|
+
}
|
|
496
|
+
}], S = x();
|
|
497
|
+
function I(c, l) {
|
|
498
|
+
switch (c) {
|
|
499
|
+
case i.RESOURCE_RELATION:
|
|
500
|
+
S.value.open(l);
|
|
501
|
+
break;
|
|
502
|
+
case i.EDIT:
|
|
503
|
+
_.value.open(c, l);
|
|
504
|
+
break;
|
|
505
|
+
case i.ADD:
|
|
506
|
+
_.value.open(c);
|
|
507
|
+
break;
|
|
508
|
+
case i.REMOVE:
|
|
509
|
+
Oe.confirm({
|
|
510
|
+
title: "删除",
|
|
511
|
+
content: "确定要删除该角色吗?",
|
|
512
|
+
onOk() {
|
|
513
|
+
Ce({
|
|
514
|
+
id: l == null ? void 0 : l.id
|
|
515
|
+
}).then((f) => {
|
|
516
|
+
f.success && (Q.success("删除成功"), h());
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
return (c, l) => {
|
|
524
|
+
const f = xe, p = H, a = Re, m = J, u = ke("auth");
|
|
525
|
+
return d(), w("div", ze, [n(
|
|
526
|
+
o(K),
|
|
527
|
+
{
|
|
528
|
+
ref_key: "tableRef",
|
|
529
|
+
ref: y,
|
|
530
|
+
"row-key": "id",
|
|
531
|
+
request: U,
|
|
532
|
+
columns: E,
|
|
533
|
+
"auto-height": "",
|
|
534
|
+
scroll: {
|
|
535
|
+
x: 1100
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
toolbar: s(() => [q((d(), T(p, {
|
|
540
|
+
type: "primary",
|
|
541
|
+
onClick: l[0] || (l[0] = (v) => I(o(i).ADD))
|
|
542
|
+
}, {
|
|
543
|
+
default: s(() => [n(f), A(
|
|
544
|
+
" " + C(o(i).ADD),
|
|
545
|
+
1
|
|
546
|
+
/* TEXT */
|
|
547
|
+
)]),
|
|
548
|
+
_: 1
|
|
549
|
+
/* STABLE */
|
|
550
|
+
})), [[u, "role_add"]])]),
|
|
551
|
+
bodyCell: s(({
|
|
552
|
+
column: v,
|
|
553
|
+
record: e
|
|
554
|
+
}) => [v.dataIndex === "action" ? (d(), T(
|
|
555
|
+
m,
|
|
556
|
+
{
|
|
557
|
+
key: 0
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
default: s(() => [q((d(), w("a", {
|
|
561
|
+
class: "flex items-center",
|
|
562
|
+
onClick: (g) => I(o(i).RESOURCE_RELATION, e)
|
|
563
|
+
}, [n(a, {
|
|
564
|
+
name: "view",
|
|
565
|
+
class: "mr-1 text-base"
|
|
566
|
+
}), O(
|
|
567
|
+
"span",
|
|
568
|
+
null,
|
|
569
|
+
C(o(i).RESOURCE_RELATION),
|
|
570
|
+
1
|
|
571
|
+
/* TEXT */
|
|
572
|
+
)], 8, je)), [[u, "resource_role_relation"]]), q((d(), w("a", {
|
|
573
|
+
class: "flex items-center",
|
|
574
|
+
onClick: (g) => I(o(i).EDIT, e)
|
|
575
|
+
}, [n(a, {
|
|
576
|
+
name: "edit",
|
|
577
|
+
class: "text-base"
|
|
578
|
+
}), O(
|
|
579
|
+
"span",
|
|
580
|
+
He,
|
|
581
|
+
C(o(i).EDIT),
|
|
582
|
+
1
|
|
583
|
+
/* TEXT */
|
|
584
|
+
)], 8, Ge)), [[u, "role_edit"]]), q((d(), w("span", {
|
|
585
|
+
class: "flex items-center text-red-500 hover:cursor-pointer hover:opacity-80",
|
|
586
|
+
onClick: (g) => I(o(i).REMOVE, e)
|
|
587
|
+
}, [n(a, {
|
|
588
|
+
name: "remove",
|
|
589
|
+
class: "text-base"
|
|
590
|
+
}), O(
|
|
591
|
+
"span",
|
|
592
|
+
Ke,
|
|
593
|
+
C(o(i).REMOVE),
|
|
594
|
+
1
|
|
595
|
+
/* TEXT */
|
|
596
|
+
)], 8, Je)), [[u, "role_remove"]])]),
|
|
597
|
+
_: 2
|
|
598
|
+
/* DYNAMIC */
|
|
599
|
+
},
|
|
600
|
+
1024
|
|
601
|
+
/* DYNAMIC_SLOTS */
|
|
602
|
+
)) : N("v-if", !0)]),
|
|
603
|
+
_: 1
|
|
604
|
+
/* STABLE */
|
|
605
|
+
},
|
|
606
|
+
512
|
|
607
|
+
/* NEED_PATCH */
|
|
608
|
+
), n(
|
|
609
|
+
Me,
|
|
610
|
+
{
|
|
611
|
+
ref_key: "drawerRoleRef",
|
|
612
|
+
ref: _,
|
|
613
|
+
onSubmit: l[1] || (l[1] = (v) => h())
|
|
614
|
+
},
|
|
615
|
+
null,
|
|
616
|
+
512
|
|
617
|
+
/* NEED_PATCH */
|
|
618
|
+
), n(
|
|
619
|
+
Be,
|
|
620
|
+
{
|
|
621
|
+
ref_key: "relationRef",
|
|
622
|
+
ref: S
|
|
623
|
+
},
|
|
624
|
+
null,
|
|
625
|
+
512
|
|
626
|
+
/* NEED_PATCH */
|
|
627
|
+
)]);
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
});
|
|
631
|
+
export {
|
|
632
|
+
it as default
|
|
633
|
+
};
|