@pubinfo/module-rbac 2.1.10-beta.2 → 2.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComponentSelect-A7uGTuHW.js +3498 -0
- package/dist/{DynamicRoutesForm-DP_sq_Uu.js → DynamicRoutesForm-DSzy_bh5.js} +43 -42
- package/dist/HCheckList-ODQHidN8.js +37 -0
- package/dist/HoverCard-CmJCoa2b.js +44 -0
- package/dist/{IconSelect-CiLpc63Z.js → IconSelect-DouEg3xY.js} +89 -88
- package/dist/ImportExport-DisdLoY8.js +342 -0
- package/dist/{LayoutForm-Cp4bBrYl.js → LayoutForm-Bdfs5WeK.js} +35 -34
- package/dist/{MetaForm-CVSgktB_.js → MetaForm-CcDwS8vh.js} +6128 -6143
- package/dist/{OrgAndPosition-ClASobEv.js → OrgAndPosition-jDX7m0HD.js} +61 -60
- package/dist/{ResourceEdit-w8qh1MFO.js → ResourceEdit-0BYZRye_.js} +128 -127
- package/dist/{ResourceRelation-ChEwIbWM.js → ResourceRelation-CU-QpUhP.js} +25 -25
- package/dist/{ResourceRelation-D_j898zp.js → ResourceRelation-roz0a8Td.js} +35 -34
- package/dist/{RoleRelation-DzyVn5dk.js → RoleRelation-BQQFaum0.js} +28 -27
- package/dist/{RoleSelector-Cd6_RUsc.js → RoleSelector-gkar_UGG.js} +89 -89
- package/dist/{TenantEdit-BOvXk7BZ.js → TenantEdit-BsahDUlf.js} +94 -93
- package/dist/{UserAuthorization-DLeivbs7.js → UserAuthorization-2Fl4IGw7.js} +81 -80
- package/dist/{UserEdit-YKS1FVW_.js → UserEdit-CX3Qau8T.js} +102 -101
- package/dist/{animation_item-BU-LInxP.js → animation_item-DBOz2rcX.js} +20 -22
- package/dist/{blackWhiteList-CNQltBqC.js → blackWhiteList-DbG7JH8n.js} +69 -69
- package/dist/blackWhiteList.css +1 -1
- package/dist/breadcrumb_setting-DTR6CPZQ.js +108 -0
- package/dist/{browserType-Dn_hQtAN.js → browserType-B8A1Osvk.js} +11 -10
- package/dist/chunk-DiMWNkAf.js +18 -0
- package/dist/cloneDeep-CSOSavu3.js +6 -0
- package/dist/components/GroupSelector/index.vue.d.ts +7 -1
- package/dist/components/ResourceIcones/Select.vue.d.ts +2 -1
- package/dist/components/ResourceSelector/index.vue.d.ts +7 -1
- package/dist/components/RoleSelector/RoleSearch.vue.d.ts +9 -1
- package/dist/components/RoleSelector/RoleSelector.vue.d.ts +7 -1
- package/dist/{createAndEditDataPermission-CaOBJgoV.js → createAndEditDataPermission-8_KNLzJT.js} +49 -48
- package/dist/createAndEditDataPermission.css +1 -1
- package/dist/{data-permission-ZRQ-Aoib.js → data-permission-LpuDLDm0.js} +41 -41
- package/dist/{dayjs.min-sGDSMYRj.js → dayjs.min-Cb7gQFd4.js} +1 -1
- package/dist/{dictionary-CtGgtPfc.js → dictionary-CEaxjqZe.js} +46 -46
- package/dist/drawerBlackWhiteList-DXLdWurZ.js +120 -0
- package/dist/drawerDictionary-DYJTAZr6.js +126 -0
- package/dist/drawerDictionaryItem-BChXD2-q.js +138 -0
- package/dist/{drawerGroup-DEuiiDPP.js → drawerGroup-CdnZkZxi.js} +67 -66
- package/dist/drawerOrganization-CwtSFUj0.js +247 -0
- package/dist/drawerPosition-CfyfeQCN.js +166 -0
- package/dist/drawerRegion-DAwY_29K.js +183 -0
- package/dist/drawerRole-B7uCfHk-.js +154 -0
- package/dist/{drawerRole-Dv61PBZR.js → drawerRole-DK6DrinO.js} +77 -76
- package/dist/{drawerRole-DNDyOvXw.js → drawerRole-DrzMHL0O.js} +69 -68
- package/dist/{group-BbkZjv5e.js → group-CaOhkh72.js} +48 -48
- package/dist/group.css +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +613 -689
- package/dist/isEmpty-BjEzPyCa.js +12 -0
- package/dist/{itemlist-By-FV6pN.js → itemlist-CFwRUV2Y.js} +44 -44
- package/dist/json-asset-03f0a035.json +1 -0
- package/dist/json-asset-0ee63e7f.json +1 -0
- package/dist/json-asset-10eef4fe.json +1 -0
- package/dist/json-asset-13f452f1.json +1 -0
- package/dist/json-asset-14b7b290.json +1 -0
- package/dist/json-asset-15b8cef1.json +1 -0
- package/dist/json-asset-15f77960.json +1 -0
- package/dist/json-asset-1ae9b726.json +1 -0
- package/dist/json-asset-1b02359f.json +1 -0
- package/dist/json-asset-1ef286cd.json +1 -0
- package/dist/json-asset-23cfd18c.json +1 -0
- package/dist/json-asset-265a0a5d.json +1 -0
- package/dist/json-asset-28d57c49.json +1 -0
- package/dist/json-asset-2b54ed10.json +1 -0
- package/dist/json-asset-2bb6f642.json +1 -0
- package/dist/json-asset-2cdc07bd.json +1 -0
- package/dist/json-asset-31c58607.json +1 -0
- package/dist/json-asset-32884f23.json +1 -0
- package/dist/json-asset-32fca43a.json +1 -0
- package/dist/json-asset-3a75445b.json +1 -0
- package/dist/json-asset-3f27d67c.json +1 -0
- package/dist/json-asset-4189453f.json +1 -0
- package/dist/json-asset-4702b37c.json +1 -0
- package/dist/json-asset-520a5c68.json +1 -0
- package/dist/json-asset-56bea508.json +1 -0
- package/dist/json-asset-57c732a3.json +1 -0
- package/dist/json-asset-5be4a28f.json +1 -0
- package/dist/json-asset-5e6d7cfa.json +1 -0
- package/dist/json-asset-64e176c9.json +1 -0
- package/dist/json-asset-6583dca6.json +1 -0
- package/dist/json-asset-66c640c6.json +1 -0
- package/dist/json-asset-68393156.json +1 -0
- package/dist/json-asset-688465aa.json +1 -0
- package/dist/json-asset-6bf334f4.json +1 -0
- package/dist/json-asset-7b4f72ce.json +1 -0
- package/dist/json-asset-837ec087.json +1 -0
- package/dist/json-asset-838ac1ba.json +1 -0
- package/dist/json-asset-8465c2cf.json +1 -0
- package/dist/json-asset-9e9f04a4.json +1 -0
- package/dist/json-asset-a13964cb.json +1 -0
- package/dist/json-asset-ab93a057.json +1 -0
- package/dist/json-asset-abe308fc.json +1 -0
- package/dist/json-asset-b24f2cd3.json +1 -0
- package/dist/json-asset-bf00eaed.json +1 -0
- package/dist/json-asset-cb22efd7.json +1 -0
- package/dist/json-asset-cb953f20.json +1 -0
- package/dist/json-asset-cc209e34.json +1 -0
- package/dist/json-asset-cfdffceb.json +1 -0
- package/dist/json-asset-d33c0299.json +1 -0
- package/dist/json-asset-d430c8ca.json +1 -0
- package/dist/json-asset-d8cfa560.json +1 -0
- package/dist/json-asset-da91beb6.json +1 -0
- package/dist/json-asset-e2bdf85c.json +1 -0
- package/dist/json-asset-e34ad826.json +1 -0
- package/dist/json-asset-e80720aa.json +1 -0
- package/dist/json-asset-e894bc92.json +1 -0
- package/dist/json-asset-f28020f2.json +1 -0
- package/dist/json-asset-f71ebbf4.json +1 -0
- package/dist/json-asset-fb1f4917.json +1 -0
- package/dist/json-asset-ff2e97c4.json +1 -0
- package/dist/{layout_setting-BUAgQ1Bk.js → layout_setting-79srmFgJ.js} +11 -11
- package/dist/layout_setting.css +1 -1
- package/dist/{log-vjU7aBPR.js → log-BYris9iT.js} +6 -6
- package/dist/{loginHistoryDetail-C7GT2yME.js → loginHistoryDetail-CZnfmbbM.js} +24 -23
- package/dist/{login_history-D08W00Qu.js → login_history-BiwaLpxA.js} +33 -33
- package/dist/login_history.css +1 -1
- package/dist/menu_setting-C2GciMXz.js +155 -0
- package/dist/not-data-Bml86wdH.js +3 -0
- package/dist/{operateHistoryDetail-BaNJRfwy.js → operateHistoryDetail-HId-EZzy.js} +27 -26
- package/dist/{operate_history-kJwIuPg2.js → operate_history-sPd9IHMV.js} +33 -33
- package/dist/operate_history.css +1 -1
- package/dist/{organization-Cmj3DUXl.js → organization-Dv3FbKke.js} +1438 -1444
- package/dist/organization.css +1 -1
- package/dist/other_setting-oVuhA70c.js +213 -0
- package/dist/other_setting.css +1 -1
- package/dist/page_animation_setting-D0CtzyOZ.js +108 -0
- package/dist/page_animation_setting.css +1 -1
- package/dist/{page_w_setting-CD_HtSUv.js → page_w_setting-Q--ct16C.js} +11 -11
- package/dist/page_w_setting.css +1 -1
- package/dist/{position-CLpbgKGj.js → position-CCZ2MSMP.js} +41 -41
- package/dist/{region-Dd9pt_Si.js → region-D3mjqB8H.js} +62 -62
- package/dist/{resource-C7dXB0EE.js → resource-DaQ7CvM_.js} +69 -69
- package/dist/{role-JGtvRObt.js → role-4UgEw3nH.js} +49 -49
- package/dist/{role_group-CKOb_m63.js → role_group-hkRlCnyl.js} +41 -41
- package/dist/{safe_setting-G_ZP-jWQ.js → safe_setting-4fv3qNRZ.js} +85 -85
- package/dist/{setItem-yKhjmUh0.js → setItem-Vkcwkj-O.js} +33 -32
- package/dist/setItem.css +1 -1
- package/dist/tabbar_setting-DhrW4Jj5.js +139 -0
- package/dist/{tenant-BBiCJkU_.js → tenant-lWfGw2u1.js} +48 -48
- package/dist/{theme_setting-vhNDLlkc.js → theme_setting-CEb7UYQO.js} +47 -47
- package/dist/theme_setting.css +1 -1
- package/dist/toolbar_setting-znESrYgi.js +140 -0
- package/dist/useAppAndResource-B7FmNfKG.js +52 -0
- package/dist/{user-DvCyUhZW.js → user-BkUpcQC8.js} +96 -96
- package/dist/{vanilla-picker-DcG96G63.js → vanilla-picker-Byb6q187.js} +239 -239
- package/dist/views/blackWhiteList/components/drawerBlackWhiteList.vue.d.ts +5 -1
- package/dist/views/components/setItem.vue.d.ts +5 -1
- package/dist/views/data-permission/components/createAndEditDataPermission.vue.d.ts +5 -1
- package/dist/views/dictionary/components/drawerDictionary.vue.d.ts +5 -1
- package/dist/views/dictionary/components/drawerDictionaryItem.vue.d.ts +5 -1
- package/dist/views/group/components/drawerGroup.vue.d.ts +5 -1
- package/dist/views/log_center/components/loginHistoryDetail.vue.d.ts +8 -1
- package/dist/views/log_center/components/operateHistoryDetail.vue.d.ts +8 -1
- package/dist/views/organization/components/drawerOrganization.vue.d.ts +5 -1
- package/dist/views/organization/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/other_setting/interface.d.ts +1 -2
- package/dist/views/position/components/drawerPosition.vue.d.ts +5 -1
- package/dist/views/region/components/drawerRegion.vue.d.ts +5 -1
- package/dist/views/resource/components/ImportExport.vue.d.ts +5 -1
- package/dist/views/resource/components/ResourceEdit.vue.d.ts +5 -1
- package/dist/views/role/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/role_group/components/drawerRole.vue.d.ts +5 -1
- package/dist/views/tenant/components/TenantEdit.vue.d.ts +5 -1
- package/dist/views/user/components/UserAuthorization.vue.d.ts +5 -1
- package/dist/views/user/components/UserEdit.vue.d.ts +5 -1
- package/dist/watermark_setting-DYirSIAn.js +191 -0
- package/dist/watermark_setting.css +1 -1
- package/package.json +13 -13
- package/src/views/other_setting/index.vue +2 -2
- package/src/views/other_setting/interface.ts +1 -1
- package/dist/ComponentSelect-D0OCk6H1.js +0 -3572
- package/dist/ComponentSelect-WO-3S5rH.js +0 -2
- package/dist/DynamicRoutesForm-DjZ3eVLW.js +0 -4
- package/dist/HCheckList-B5Qk_HBI.js +0 -2
- package/dist/HCheckList-DLBewmPw.js +0 -36
- package/dist/HoverCard-69ZIOivd.js +0 -2
- package/dist/HoverCard-BDFcxxvk.js +0 -43
- package/dist/IconSelect-C_Gj5G4I.js +0 -3
- package/dist/ImportExport-CL5uPlby.js +0 -342
- package/dist/ImportExport-CPy2rvv7.js +0 -4
- package/dist/LayoutForm-QFjwakyQ.js +0 -4
- package/dist/MetaForm-Bb-um1Zo.js +0 -4
- package/dist/OrgAndPosition-DoiGY5xb.js +0 -2
- package/dist/ResourceEdit-BTaNdwC_.js +0 -10
- package/dist/ResourceRelation-BIOzTOKA.js +0 -2
- package/dist/RoleRelation-CyTcqRfZ.js +0 -2
- package/dist/TenantEdit-BlMmL6q5.js +0 -2
- package/dist/UserAuthorization-qGr1Sdat.js +0 -3
- package/dist/UserEdit-CwfyqNWf.js +0 -3
- package/dist/animation_item-GzGItm3s.js +0 -2
- package/dist/breadcrumb_setting-Ds-XJRR1.js +0 -108
- package/dist/browserType-BXTT4j6i.js +0 -2
- package/dist/chunk-Cpsc_9al.js +0 -18
- package/dist/cloneDeep-DDAtsK42.js +0 -7
- package/dist/createAndEditDataPermission-CChlLDUm.js +0 -5
- package/dist/drawerBlackWhiteList-BqIDyn2Q.js +0 -2
- package/dist/drawerBlackWhiteList-CkbZ_9PZ.js +0 -119
- package/dist/drawerDictionary-D911w7pC.js +0 -2
- package/dist/drawerDictionary-dMHs-6Cw.js +0 -125
- package/dist/drawerDictionaryItem-CbTa_qL-.js +0 -137
- package/dist/drawerDictionaryItem-DLUI5Yuc.js +0 -2
- package/dist/drawerGroup-CEEDMBg9.js +0 -3
- package/dist/drawerOrganization-CqEMD3gE.js +0 -246
- package/dist/drawerOrganization-mks5NMd9.js +0 -2
- package/dist/drawerPosition-Bd0s7qze.js +0 -165
- package/dist/drawerPosition-DwlTrlGA.js +0 -2
- package/dist/drawerRegion-DUbQAZuV.js +0 -182
- package/dist/drawerRegion-DwVzsZfT.js +0 -2
- package/dist/drawerRole-BNrbcSmr.js +0 -3
- package/dist/drawerRole-BxUIekjh.js +0 -3
- package/dist/drawerRole-CyA2oFht.js +0 -4
- package/dist/drawerRole-D5X7oHB_.js +0 -153
- package/dist/isEmpty-BvRqbmpu.js +0 -13
- package/dist/loginHistoryDetail-CkH5UUGU.js +0 -3
- package/dist/menu_setting-5Jet091Q.js +0 -155
- package/dist/not-data-Cx--tk_h.js +0 -2
- package/dist/not-data-tyTawN37.js +0 -2
- package/dist/operateHistoryDetail-CeVPJzD6.js +0 -3
- package/dist/other_setting-DQ70WnZK.js +0 -213
- package/dist/page_animation_setting-Lp6cMuFM.js +0 -108
- package/dist/routeSystem-DXMoWhFo.js +0 -2
- package/dist/setItem-Qa7UapHO.js +0 -4
- package/dist/tabbar_setting-B3kMhRNm.js +0 -139
- package/dist/toolbar_setting-DNBdxeGP.js +0 -140
- package/dist/useAppAndResource-CPL2VpOJ.js +0 -52
- package/dist/watermark_setting-CXp4Og0Y.js +0 -191
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
2
|
+
import { i as defaultMeta, r as useMetaForm, t as MetaForm_default } from "./MetaForm-CcDwS8vh.js";
|
|
3
|
+
import { t as cloneDeep } from "./cloneDeep-CSOSavu3.js";
|
|
3
4
|
import { B as postRbacResourceResourceUpdate, F as getRbacResourceInfo, Lt as useToggle, z as postRbacResourceAddResource } from "./index.js";
|
|
4
5
|
import { n as DATA_PERMISSION_TYPE, r as dataPermissionOptions } from "./enum-3mYayxff.js";
|
|
5
6
|
import { i as resourceOptions, n as RESOURCE_COLOR, r as RESOURCE_TYPE, t as ACTION } from "./enum-3E_sUqRF.js";
|
|
6
|
-
import { t as DynamicRoutesForm_default } from "./DynamicRoutesForm-
|
|
7
|
-
import { t as IconSelect_default } from "./IconSelect-
|
|
8
|
-
import { t as LayoutForm_default } from "./LayoutForm-
|
|
7
|
+
import { t as DynamicRoutesForm_default } from "./DynamicRoutesForm-DSzy_bh5.js";
|
|
8
|
+
import { t as IconSelect_default } from "./IconSelect-DouEg3xY.js";
|
|
9
|
+
import { t as LayoutForm_default } from "./LayoutForm-Bdfs5WeK.js";
|
|
9
10
|
import { PartyLoginModal } from "pubinfo";
|
|
10
11
|
import { computed, createBlock, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, isRef, openBlock, reactive, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
11
12
|
import { DatabaseOutlined } from "@ant-design/icons-vue";
|
|
@@ -14,13 +15,13 @@ import { Button, Col, Drawer, Form as Form$1, FormItem, Input as Input$1, InputN
|
|
|
14
15
|
var _hoisted_1 = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "flex items-center space-x-1"
|
|
17
|
-
},
|
|
18
|
+
}, ResourceEdit_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
18
19
|
name: "ResourceEdit",
|
|
19
20
|
__name: "ResourceEdit",
|
|
20
21
|
props: { dataSource: {} },
|
|
21
22
|
emits: ["submit"],
|
|
22
|
-
setup(
|
|
23
|
-
let
|
|
23
|
+
setup(e, { expose: f, emit: h }) {
|
|
24
|
+
let _ = e, v = h, [y, b] = useToggle(!1), x = ref(), S = ref({}), C = reactive({
|
|
24
25
|
title: "",
|
|
25
26
|
record: {},
|
|
26
27
|
initData: {
|
|
@@ -34,7 +35,7 @@ var _hoisted_1 = {
|
|
|
34
35
|
component: ""
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
}),
|
|
38
|
+
}), w = {
|
|
38
39
|
name: [{
|
|
39
40
|
required: !0,
|
|
40
41
|
message: "请输入资源名称",
|
|
@@ -62,17 +63,17 @@ var _hoisted_1 = {
|
|
|
62
63
|
message: "请选择是否启用",
|
|
63
64
|
trigger: "change"
|
|
64
65
|
}]
|
|
65
|
-
},
|
|
66
|
-
function
|
|
67
|
-
let
|
|
68
|
-
for (let e of
|
|
69
|
-
if (
|
|
70
|
-
e.children &&
|
|
66
|
+
}, T = computed(() => E(_.dataSource, (e) => e.id === S.value.parentId) ?? {});
|
|
67
|
+
function E(e, t) {
|
|
68
|
+
let n = [...e];
|
|
69
|
+
for (let e of n) {
|
|
70
|
+
if (t(e)) return e;
|
|
71
|
+
e.children && n.push(...e.children);
|
|
71
72
|
}
|
|
72
73
|
return null;
|
|
73
74
|
}
|
|
74
|
-
let
|
|
75
|
-
switch (
|
|
75
|
+
let D = computed(() => {
|
|
76
|
+
switch (T.value?.type) {
|
|
76
77
|
case RESOURCE_TYPE.APP:
|
|
77
78
|
case RESOURCE_TYPE.DYNAMIC_APP: return resourceOptions.filter((e) => [
|
|
78
79
|
RESOURCE_TYPE.INDEX,
|
|
@@ -94,103 +95,103 @@ var _hoisted_1 = {
|
|
|
94
95
|
case RESOURCE_TYPE.LINK: return [];
|
|
95
96
|
default: return resourceOptions.filter((e) => [RESOURCE_TYPE.APP, RESOURCE_TYPE.DYNAMIC_APP].includes(e.value));
|
|
96
97
|
}
|
|
97
|
-
}), { show:
|
|
98
|
-
async function
|
|
99
|
-
|
|
98
|
+
}), { show: O, resetIncompatibleOptions: k } = useMetaForm(S), A = computed(() => S.value.meta?.iframe || S.value.meta?.link || ""), [j, M] = useToggle(!1);
|
|
99
|
+
async function N(e, n) {
|
|
100
|
+
C.title = e, S.value = cloneDeep(C.initData), b(!0);
|
|
100
101
|
try {
|
|
101
|
-
if (
|
|
102
|
-
let e = await getRbacResourceInfo({ id:
|
|
103
|
-
e.success && (
|
|
102
|
+
if (M(!0), e === ACTION.ADD_CHILD && (S.value.parentId = n?.id, S.value.type = D.value[0].value, k()), e === ACTION.EDIT) {
|
|
103
|
+
let e = await getRbacResourceInfo({ id: n?.id });
|
|
104
|
+
e.success && (S.value = e.data ?? {}, S.value.meta = {
|
|
104
105
|
...defaultMeta,
|
|
105
106
|
...e.data?.meta
|
|
106
|
-
},
|
|
107
|
+
}, k());
|
|
107
108
|
}
|
|
108
109
|
} finally {
|
|
109
|
-
|
|
110
|
+
M(!1);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
let [
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
let e =
|
|
116
|
-
...
|
|
117
|
-
icon:
|
|
113
|
+
let [P, F] = useToggle(!1);
|
|
114
|
+
function I() {
|
|
115
|
+
x.value?.validate().then(() => {
|
|
116
|
+
let e = cloneDeep({
|
|
117
|
+
...S.value,
|
|
118
|
+
icon: S.value.icon || void 0
|
|
118
119
|
});
|
|
119
|
-
|
|
120
|
-
let
|
|
120
|
+
O.value.dataPermission || (e.enableDataPermission = !1), O.value.devMode && S.value.meta?.isDev && console.warn("开发模式应用的子路由将不会在生产环境中注册到vue-router,请确保这是预期行为。"), e.meta?.cache && e.meta.cacheName && (e.meta.cache = e.meta.cacheName.split(",")), e.meta?.noCache && (e.meta.noCache = e.meta.noCache.split(",")), e.meta?.cache || delete e?.meta?.noCache, delete e?.meta?.cacheName;
|
|
121
|
+
let t = C.title === ACTION.EDIT ? postRbacResourceResourceUpdate(e) : postRbacResourceAddResource({
|
|
121
122
|
parentId: "",
|
|
122
123
|
...e
|
|
123
124
|
});
|
|
124
|
-
|
|
125
|
-
e?.success && (message.success(`${
|
|
126
|
-
}).finally(() =>
|
|
125
|
+
F(!0), t.then((e) => {
|
|
126
|
+
e?.success && (message.success(`${C.title}成功!`), b(!1), v("submit"));
|
|
127
|
+
}).finally(() => F(!1));
|
|
127
128
|
});
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
-
let
|
|
131
|
-
return openBlock(), createBlock(
|
|
132
|
-
open: unref(
|
|
133
|
-
"onUpdate:open":
|
|
134
|
-
title: unref(
|
|
130
|
+
return f({ open: N }), (e, t) => {
|
|
131
|
+
let n = DatabaseOutlined, r = FormItem, i = Col, a = Tag$1, o = RadioGroup, s = Row, c = Input$1, l = InputNumber, u = Textarea, d = Switch, f = Select, p = Form$1, m = Spin$1, h = Button, g = Space$1, _ = Drawer;
|
|
132
|
+
return openBlock(), createBlock(_, {
|
|
133
|
+
open: unref(y),
|
|
134
|
+
"onUpdate:open": t[15] ||= (e) => isRef(y) ? y.value = e : null,
|
|
135
|
+
title: unref(C).title,
|
|
135
136
|
placement: "right",
|
|
136
137
|
width: 800,
|
|
137
138
|
"destroy-on-close": "",
|
|
138
139
|
"footer-style": { textAlign: "right" }
|
|
139
140
|
}, {
|
|
140
|
-
footer: withCtx(() => [createVNode(
|
|
141
|
-
default: withCtx(() => [createVNode(
|
|
142
|
-
default: withCtx(() => [...
|
|
141
|
+
footer: withCtx(() => [createVNode(g, null, {
|
|
142
|
+
default: withCtx(() => [createVNode(h, { onClick: t[13] ||= (e) => unref(b)(!1) }, {
|
|
143
|
+
default: withCtx(() => [...t[17] ||= [createTextVNode(" 取消 ", -1)]]),
|
|
143
144
|
_: 1
|
|
144
|
-
}), createVNode(
|
|
145
|
+
}), createVNode(h, {
|
|
145
146
|
type: "primary",
|
|
146
|
-
loading: unref(
|
|
147
|
-
onClick:
|
|
147
|
+
loading: unref(P),
|
|
148
|
+
onClick: t[14] ||= (e) => I()
|
|
148
149
|
}, {
|
|
149
|
-
default: withCtx(() => [...
|
|
150
|
+
default: withCtx(() => [...t[18] ||= [createTextVNode(" 提交 ", -1)]]),
|
|
150
151
|
_: 1
|
|
151
152
|
}, 8, ["loading"])]),
|
|
152
153
|
_: 1
|
|
153
154
|
})]),
|
|
154
|
-
default: withCtx(() => [createVNode(
|
|
155
|
-
default: withCtx(() => [createVNode(
|
|
155
|
+
default: withCtx(() => [createVNode(m, { spinning: unref(j) }, {
|
|
156
|
+
default: withCtx(() => [createVNode(p, {
|
|
156
157
|
ref_key: "formRef",
|
|
157
|
-
ref:
|
|
158
|
-
model: unref(
|
|
159
|
-
rules:
|
|
158
|
+
ref: x,
|
|
159
|
+
model: unref(S),
|
|
160
|
+
rules: w,
|
|
160
161
|
"label-col": { style: { width: "100px" } }
|
|
161
162
|
}, {
|
|
162
163
|
default: withCtx(() => [
|
|
163
|
-
createVNode(
|
|
164
|
+
createVNode(s, { gutter: 8 }, {
|
|
164
165
|
default: withCtx(() => [
|
|
165
|
-
unref(
|
|
166
|
+
unref(T)?.name ? (openBlock(), createBlock(i, {
|
|
166
167
|
key: 0,
|
|
167
168
|
span: 24
|
|
168
169
|
}, {
|
|
169
|
-
default: withCtx(() => [createVNode(
|
|
170
|
-
label: withCtx(() => [createVNode(
|
|
171
|
-
default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(
|
|
170
|
+
default: withCtx(() => [createVNode(r, { name: "parentId" }, {
|
|
171
|
+
label: withCtx(() => [createVNode(n, { class: "mr-1" }), t[16] ||= createTextVNode(" 父资源 ", -1)]),
|
|
172
|
+
default: withCtx(() => [createTextVNode(" " + toDisplayString(unref(T)?.name), 1)]),
|
|
172
173
|
_: 1
|
|
173
174
|
})]),
|
|
174
175
|
_: 1
|
|
175
176
|
})) : createCommentVNode("", !0),
|
|
176
|
-
createVNode(
|
|
177
|
-
default: withCtx(() => [createVNode(
|
|
177
|
+
createVNode(i, { span: 24 }, {
|
|
178
|
+
default: withCtx(() => [createVNode(r, {
|
|
178
179
|
label: "资源类型",
|
|
179
180
|
name: "type",
|
|
180
|
-
tooltip: unref(
|
|
181
|
+
tooltip: unref(T)?.type ? "" : "动态应用为后端路由,应用为前端路由"
|
|
181
182
|
}, {
|
|
182
|
-
default: withCtx(() => [unref(
|
|
183
|
+
default: withCtx(() => [unref(C).title === unref(ACTION).EDIT ? (openBlock(), createElementBlock("div", _hoisted_1, [unref(S).type ? (openBlock(), createBlock(a, {
|
|
183
184
|
key: 0,
|
|
184
|
-
color: unref(RESOURCE_COLOR)[Number(unref(
|
|
185
|
+
color: unref(RESOURCE_COLOR)[Number(unref(S).type)],
|
|
185
186
|
bordered: !1
|
|
186
187
|
}, {
|
|
187
|
-
default: withCtx(() => [createTextVNode(toDisplayString(unref(
|
|
188
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(D).find((e) => e.value === unref(S).type)?.label), 1)]),
|
|
188
189
|
_: 1
|
|
189
|
-
}, 8, ["color"])) : createCommentVNode("", !0)])) : (openBlock(), createBlock(
|
|
190
|
+
}, 8, ["color"])) : createCommentVNode("", !0)])) : (openBlock(), createBlock(o, {
|
|
190
191
|
key: 1,
|
|
191
|
-
value: unref(
|
|
192
|
-
"onUpdate:value":
|
|
193
|
-
options: unref(
|
|
192
|
+
value: unref(S).type,
|
|
193
|
+
"onUpdate:value": t[0] ||= (e) => unref(S).type = e,
|
|
194
|
+
options: unref(D),
|
|
194
195
|
"option-type": "button",
|
|
195
196
|
"button-style": "solid"
|
|
196
197
|
}, null, 8, ["value", "options"]))]),
|
|
@@ -198,26 +199,26 @@ var _hoisted_1 = {
|
|
|
198
199
|
}, 8, ["tooltip"])]),
|
|
199
200
|
_: 1
|
|
200
201
|
}),
|
|
201
|
-
createVNode(
|
|
202
|
+
createVNode(i, { span: 24 }, {
|
|
202
203
|
default: withCtx(() => [createVNode(IconSelect_default, {
|
|
203
|
-
modelValue: unref(
|
|
204
|
-
"onUpdate:modelValue":
|
|
204
|
+
modelValue: unref(S),
|
|
205
|
+
"onUpdate:modelValue": t[1] ||= (e) => isRef(S) ? S.value = e : null
|
|
205
206
|
}, null, 8, ["modelValue"])]),
|
|
206
207
|
_: 1
|
|
207
208
|
})
|
|
208
209
|
]),
|
|
209
210
|
_: 1
|
|
210
211
|
}),
|
|
211
|
-
createVNode(
|
|
212
|
+
createVNode(s, { gutter: 8 }, {
|
|
212
213
|
default: withCtx(() => [
|
|
213
|
-
createVNode(
|
|
214
|
-
default: withCtx(() => [createVNode(
|
|
214
|
+
createVNode(i, { span: 12 }, {
|
|
215
|
+
default: withCtx(() => [createVNode(r, {
|
|
215
216
|
label: "资源名称",
|
|
216
217
|
name: "name"
|
|
217
218
|
}, {
|
|
218
|
-
default: withCtx(() => [createVNode(
|
|
219
|
-
value: unref(
|
|
220
|
-
"onUpdate:value":
|
|
219
|
+
default: withCtx(() => [createVNode(c, {
|
|
220
|
+
value: unref(S).name,
|
|
221
|
+
"onUpdate:value": t[2] ||= (e) => unref(S).name = e,
|
|
221
222
|
placeholder: "请输入资源名称",
|
|
222
223
|
maxlength: 128
|
|
223
224
|
}, null, 8, ["value"])]),
|
|
@@ -226,18 +227,18 @@ var _hoisted_1 = {
|
|
|
226
227
|
_: 1
|
|
227
228
|
}),
|
|
228
229
|
createVNode(DynamicRoutesForm_default, {
|
|
229
|
-
modelValue: unref(
|
|
230
|
-
"onUpdate:modelValue":
|
|
231
|
-
parent: unref(
|
|
230
|
+
modelValue: unref(S),
|
|
231
|
+
"onUpdate:modelValue": t[3] ||= (e) => isRef(S) ? S.value = e : null,
|
|
232
|
+
parent: unref(T)
|
|
232
233
|
}, null, 8, ["modelValue", "parent"]),
|
|
233
|
-
createVNode(
|
|
234
|
-
default: withCtx(() => [createVNode(
|
|
234
|
+
createVNode(i, { span: 12 }, {
|
|
235
|
+
default: withCtx(() => [createVNode(r, {
|
|
235
236
|
label: "资源编码",
|
|
236
237
|
name: "code"
|
|
237
238
|
}, {
|
|
238
|
-
default: withCtx(() => [createVNode(
|
|
239
|
-
value: unref(
|
|
240
|
-
"onUpdate:value":
|
|
239
|
+
default: withCtx(() => [createVNode(c, {
|
|
240
|
+
value: unref(S).code,
|
|
241
|
+
"onUpdate:value": t[4] ||= (e) => unref(S).code = e,
|
|
241
242
|
placeholder: "请输入资源编码(权限码)",
|
|
242
243
|
maxlength: 50
|
|
243
244
|
}, null, 8, ["value"])]),
|
|
@@ -245,14 +246,14 @@ var _hoisted_1 = {
|
|
|
245
246
|
})]),
|
|
246
247
|
_: 1
|
|
247
248
|
}),
|
|
248
|
-
createVNode(
|
|
249
|
-
default: withCtx(() => [createVNode(
|
|
249
|
+
createVNode(i, { span: 12 }, {
|
|
250
|
+
default: withCtx(() => [createVNode(r, {
|
|
250
251
|
label: "接口权限",
|
|
251
252
|
name: "permissionCode"
|
|
252
253
|
}, {
|
|
253
|
-
default: withCtx(() => [createVNode(
|
|
254
|
-
value: unref(
|
|
255
|
-
"onUpdate:value":
|
|
254
|
+
default: withCtx(() => [createVNode(c, {
|
|
255
|
+
value: unref(S).permissionCode,
|
|
256
|
+
"onUpdate:value": t[5] ||= (e) => unref(S).permissionCode = e,
|
|
256
257
|
placeholder: "请输入接口权限(接口地址,多个使用逗号分隔)",
|
|
257
258
|
maxlength: 256
|
|
258
259
|
}, null, 8, ["value"])]),
|
|
@@ -260,14 +261,14 @@ var _hoisted_1 = {
|
|
|
260
261
|
})]),
|
|
261
262
|
_: 1
|
|
262
263
|
}),
|
|
263
|
-
createVNode(
|
|
264
|
-
default: withCtx(() => [createVNode(
|
|
264
|
+
createVNode(i, { span: 12 }, {
|
|
265
|
+
default: withCtx(() => [createVNode(r, {
|
|
265
266
|
label: "显示顺序",
|
|
266
267
|
name: "sort"
|
|
267
268
|
}, {
|
|
268
|
-
default: withCtx(() => [createVNode(
|
|
269
|
-
value: unref(
|
|
270
|
-
"onUpdate:value":
|
|
269
|
+
default: withCtx(() => [createVNode(l, {
|
|
270
|
+
value: unref(S).sort,
|
|
271
|
+
"onUpdate:value": t[6] ||= (e) => unref(S).sort = e,
|
|
271
272
|
max: 999
|
|
272
273
|
}, null, 8, ["value"])]),
|
|
273
274
|
_: 1
|
|
@@ -277,23 +278,23 @@ var _hoisted_1 = {
|
|
|
277
278
|
]),
|
|
278
279
|
_: 1
|
|
279
280
|
}),
|
|
280
|
-
unref(
|
|
281
|
+
unref(O).dynamic ? (openBlock(), createBlock(s, {
|
|
281
282
|
key: 0,
|
|
282
283
|
gutter: 8
|
|
283
284
|
}, {
|
|
284
|
-
default: withCtx(() => [createVNode(
|
|
285
|
-
default: withCtx(() => [createVNode(
|
|
285
|
+
default: withCtx(() => [createVNode(i, { span: 24 }, {
|
|
286
|
+
default: withCtx(() => [createVNode(r, {
|
|
286
287
|
label: "对接第三方",
|
|
287
288
|
name: "description",
|
|
288
289
|
"label-col": { span: 3 }
|
|
289
290
|
}, {
|
|
290
291
|
default: withCtx(() => [createVNode(unref(PartyLoginModal), {
|
|
291
|
-
modelValue: unref(
|
|
292
|
-
"onUpdate:modelValue":
|
|
293
|
-
"target-url": unref(
|
|
292
|
+
modelValue: unref(S).meta.partyLogin,
|
|
293
|
+
"onUpdate:modelValue": t[7] ||= (e) => unref(S).meta.partyLogin = e,
|
|
294
|
+
"target-url": unref(A)
|
|
294
295
|
}, {
|
|
295
|
-
trigger: withCtx(() => [createVNode(
|
|
296
|
-
value: unref(
|
|
296
|
+
trigger: withCtx(() => [createVNode(c, {
|
|
297
|
+
value: unref(S).meta.partyLogin && unref(S).meta.partyLogin.length > 0 ? "已配置第三方登录流程" : "",
|
|
297
298
|
placeholder: "配置第三方登录流程",
|
|
298
299
|
readonly: ""
|
|
299
300
|
}, null, 8, ["value"])]),
|
|
@@ -305,16 +306,16 @@ var _hoisted_1 = {
|
|
|
305
306
|
})]),
|
|
306
307
|
_: 1
|
|
307
308
|
})) : createCommentVNode("", !0),
|
|
308
|
-
createVNode(
|
|
309
|
-
default: withCtx(() => [createVNode(
|
|
310
|
-
default: withCtx(() => [createVNode(
|
|
309
|
+
createVNode(s, { gutter: 8 }, {
|
|
310
|
+
default: withCtx(() => [createVNode(i, { span: 24 }, {
|
|
311
|
+
default: withCtx(() => [createVNode(r, {
|
|
311
312
|
label: "描述",
|
|
312
313
|
name: "description",
|
|
313
314
|
"label-col": { span: 3 }
|
|
314
315
|
}, {
|
|
315
|
-
default: withCtx(() => [createVNode(
|
|
316
|
-
value: unref(
|
|
317
|
-
"onUpdate:value":
|
|
316
|
+
default: withCtx(() => [createVNode(u, {
|
|
317
|
+
value: unref(S).description,
|
|
318
|
+
"onUpdate:value": t[8] ||= (e) => unref(S).description = e,
|
|
318
319
|
placeholder: "请输入描述",
|
|
319
320
|
maxlength: 255,
|
|
320
321
|
"auto-size": { minRows: 2 },
|
|
@@ -326,31 +327,31 @@ var _hoisted_1 = {
|
|
|
326
327
|
})]),
|
|
327
328
|
_: 1
|
|
328
329
|
}),
|
|
329
|
-
unref(
|
|
330
|
+
unref(O).dataPermission ? (openBlock(), createBlock(s, {
|
|
330
331
|
key: 1,
|
|
331
332
|
gutter: 8
|
|
332
333
|
}, {
|
|
333
|
-
default: withCtx(() => [createVNode(
|
|
334
|
-
default: withCtx(() => [createVNode(
|
|
334
|
+
default: withCtx(() => [createVNode(i, { span: 8 }, {
|
|
335
|
+
default: withCtx(() => [createVNode(r, {
|
|
335
336
|
label: "启用数据权限",
|
|
336
337
|
name: "enableDataPermission"
|
|
337
338
|
}, {
|
|
338
|
-
default: withCtx(() => [createVNode(
|
|
339
|
-
checked: unref(
|
|
340
|
-
"onUpdate:checked":
|
|
339
|
+
default: withCtx(() => [createVNode(d, {
|
|
340
|
+
checked: unref(S).enableDataPermission,
|
|
341
|
+
"onUpdate:checked": t[9] ||= (e) => unref(S).enableDataPermission = e
|
|
341
342
|
}, null, 8, ["checked"])]),
|
|
342
343
|
_: 1
|
|
343
344
|
})]),
|
|
344
345
|
_: 1
|
|
345
|
-
}), createVNode(
|
|
346
|
-
default: withCtx(() => [unref(
|
|
346
|
+
}), createVNode(i, { span: 16 }, {
|
|
347
|
+
default: withCtx(() => [unref(S).enableDataPermission ? (openBlock(), createBlock(r, {
|
|
347
348
|
key: 0,
|
|
348
349
|
label: "数据权限规则",
|
|
349
350
|
name: "dataPermissionType"
|
|
350
351
|
}, {
|
|
351
|
-
default: withCtx(() => [createVNode(
|
|
352
|
-
value: unref(
|
|
353
|
-
"onUpdate:value":
|
|
352
|
+
default: withCtx(() => [createVNode(f, {
|
|
353
|
+
value: unref(S).dataPermissionType,
|
|
354
|
+
"onUpdate:value": t[10] ||= (e) => unref(S).dataPermissionType = e,
|
|
354
355
|
options: unref(dataPermissionOptions)
|
|
355
356
|
}, null, 8, ["value", "options"])]),
|
|
356
357
|
_: 1
|
|
@@ -360,12 +361,12 @@ var _hoisted_1 = {
|
|
|
360
361
|
_: 1
|
|
361
362
|
})) : createCommentVNode("", !0),
|
|
362
363
|
createVNode(MetaForm_default, {
|
|
363
|
-
modelValue: unref(
|
|
364
|
-
"onUpdate:modelValue":
|
|
364
|
+
modelValue: unref(S),
|
|
365
|
+
"onUpdate:modelValue": t[11] ||= (e) => isRef(S) ? S.value = e : null
|
|
365
366
|
}, null, 8, ["modelValue"]),
|
|
366
367
|
createVNode(LayoutForm_default, {
|
|
367
|
-
modelValue: unref(
|
|
368
|
-
"onUpdate:modelValue":
|
|
368
|
+
modelValue: unref(S),
|
|
369
|
+
"onUpdate:modelValue": t[12] ||= (e) => isRef(S) ? S.value = e : null
|
|
369
370
|
}, null, 8, ["modelValue"])
|
|
370
371
|
]),
|
|
371
372
|
_: 1
|
|
@@ -376,5 +377,5 @@ var _hoisted_1 = {
|
|
|
376
377
|
}, 8, ["open", "title"]);
|
|
377
378
|
};
|
|
378
379
|
}
|
|
379
|
-
});
|
|
380
|
-
export { ResourceEdit_default as t };
|
|
380
|
+
}), ResourceEdit_exports = /* @__PURE__ */ __exportAll({ default: () => ResourceEdit_default }), ResourceEdit_default = ResourceEdit_vue_vue_type_script_setup_true_lang_default;
|
|
381
|
+
export { ResourceEdit_exports as n, ResourceEdit_default as t };
|
|
@@ -9,22 +9,22 @@ import './ResourceRelation.css';var _hoisted_1 = {
|
|
|
9
9
|
}, ResourceRelation_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
10
10
|
name: "ResourceRelation",
|
|
11
11
|
__name: "ResourceRelation",
|
|
12
|
-
setup(
|
|
13
|
-
let { token:
|
|
14
|
-
async function
|
|
15
|
-
e.pageSize = 15, e.roleId =
|
|
16
|
-
let { current:
|
|
17
|
-
currentPage:
|
|
18
|
-
pageSize:
|
|
19
|
-
...
|
|
12
|
+
setup(t, { expose: o }) {
|
|
13
|
+
let { token: s } = theme.useToken(), [c, l] = useToggle(!1), u = ref("");
|
|
14
|
+
async function d(e) {
|
|
15
|
+
e.pageSize = 15, e.roleId = u.value;
|
|
16
|
+
let { current: t, pageSize: r, ...i } = e, a = await postRbacRoleRoleUserPage({
|
|
17
|
+
currentPage: t,
|
|
18
|
+
pageSize: r,
|
|
19
|
+
...i
|
|
20
20
|
});
|
|
21
21
|
return {
|
|
22
|
-
success:
|
|
23
|
-
data:
|
|
24
|
-
total:
|
|
22
|
+
success: a.success,
|
|
23
|
+
data: a.data?.records ?? [],
|
|
24
|
+
total: a.data?.total ?? 0
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
let
|
|
27
|
+
let f = [{
|
|
28
28
|
title: "用户名称",
|
|
29
29
|
dataIndex: "realName",
|
|
30
30
|
ellipsis: !0
|
|
@@ -33,14 +33,14 @@ import './ResourceRelation.css';var _hoisted_1 = {
|
|
|
33
33
|
dataIndex: "orgName",
|
|
34
34
|
ellipsis: !0
|
|
35
35
|
}];
|
|
36
|
-
function
|
|
37
|
-
|
|
36
|
+
function p(e) {
|
|
37
|
+
u.value = e.id || "", l(!0);
|
|
38
38
|
}
|
|
39
|
-
return
|
|
40
|
-
let
|
|
41
|
-
return openBlock(), createBlock(
|
|
42
|
-
open: unref(
|
|
43
|
-
"onUpdate:open":
|
|
39
|
+
return o({ open: p }), (e, t) => {
|
|
40
|
+
let n = Avatar, o = Drawer;
|
|
41
|
+
return openBlock(), createBlock(o, {
|
|
42
|
+
open: unref(c),
|
|
43
|
+
"onUpdate:open": t[0] ||= (e) => isRef(c) ? c.value = e : null,
|
|
44
44
|
title: "分配查看",
|
|
45
45
|
placement: "right",
|
|
46
46
|
width: 720,
|
|
@@ -53,19 +53,19 @@ import './ResourceRelation.css';var _hoisted_1 = {
|
|
|
53
53
|
}, {
|
|
54
54
|
default: withCtx(() => [createVNode(unref(ProTable), {
|
|
55
55
|
"row-key": "id",
|
|
56
|
-
request:
|
|
57
|
-
columns:
|
|
56
|
+
request: d,
|
|
57
|
+
columns: f,
|
|
58
58
|
search: !1,
|
|
59
59
|
toolbar: !1,
|
|
60
60
|
"auto-height": ""
|
|
61
61
|
}, {
|
|
62
|
-
bodyCell: withCtx(({ column: e, text:
|
|
62
|
+
bodyCell: withCtx(({ column: e, text: t }) => [e.dataIndex === "realName" ? (openBlock(), createElementBlock("div", _hoisted_1, [createVNode(n, {
|
|
63
63
|
size: "small",
|
|
64
|
-
style: normalizeStyle({ backgroundColor: unref(
|
|
64
|
+
style: normalizeStyle({ backgroundColor: unref(s).colorPrimary })
|
|
65
65
|
}, {
|
|
66
|
-
default: withCtx(() => [createTextVNode(toDisplayString(
|
|
66
|
+
default: withCtx(() => [createTextVNode(toDisplayString(t[0]), 1)]),
|
|
67
67
|
_: 2
|
|
68
|
-
}, 1032, ["style"]), createElementVNode("span", null, toDisplayString(
|
|
68
|
+
}, 1032, ["style"]), createElementVNode("span", null, toDisplayString(t), 1)])) : createCommentVNode("", !0)]),
|
|
69
69
|
_: 1
|
|
70
70
|
})]),
|
|
71
71
|
_: 1
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { r as __exportAll } from "./chunk-DiMWNkAf.js";
|
|
1
2
|
import { Lt as useToggle, T as postRbacOrgRoleRoleOrgPage, h as _plugin_vue_export_helper_default, yt as postRbacRoleRoleUserPage } from "./index.js";
|
|
2
3
|
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, isRef, openBlock, ref, resolveComponent, toDisplayString, unref, withCtx } from "vue";
|
|
3
4
|
import { Drawer, Segmented, Tag } from "ant-design-vue/es";
|
|
@@ -5,28 +6,28 @@ import { ProTable } from "@pubinfo/pro-components";
|
|
|
5
6
|
import './ResourceRelation2.css';var _hoisted_1 = { class: "mb-20px p-x-15px" }, _hoisted_2 = {
|
|
6
7
|
key: 0,
|
|
7
8
|
class: "flex items-center"
|
|
8
|
-
}, _hoisted_3 = { class: "mr-4px" },
|
|
9
|
+
}, _hoisted_3 = { class: "mr-4px" }, ResourceRelation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
9
10
|
name: "ResourceRelation",
|
|
10
11
|
__name: "ResourceRelation",
|
|
11
|
-
setup(
|
|
12
|
-
let
|
|
13
|
-
function
|
|
14
|
-
|
|
12
|
+
setup(e, { expose: r }) {
|
|
13
|
+
let s = ref(["用户自选角色", "组织基础角色"]), c = ref(s.value[0]), [l, u] = useToggle(!1), d = ref(""), f = ref();
|
|
14
|
+
function p() {
|
|
15
|
+
f.value.fetch();
|
|
15
16
|
}
|
|
16
|
-
async function
|
|
17
|
-
e.pageSize = 15, e.roleId =
|
|
18
|
-
let { current:
|
|
19
|
-
currentPage:
|
|
20
|
-
pageSize:
|
|
21
|
-
...
|
|
17
|
+
async function m(e) {
|
|
18
|
+
e.pageSize = 15, e.roleId = d.value;
|
|
19
|
+
let { current: t, pageSize: r, ...a } = e, o = await (c.value === "用户自选角色" ? postRbacRoleRoleUserPage : postRbacOrgRoleRoleOrgPage)({
|
|
20
|
+
currentPage: t,
|
|
21
|
+
pageSize: r,
|
|
22
|
+
...a
|
|
22
23
|
});
|
|
23
24
|
return {
|
|
24
|
-
success:
|
|
25
|
-
data:
|
|
26
|
-
total:
|
|
25
|
+
success: o.success,
|
|
26
|
+
data: o.data?.records ?? [],
|
|
27
|
+
total: o.data?.total ?? 0
|
|
27
28
|
};
|
|
28
29
|
}
|
|
29
|
-
let
|
|
30
|
+
let h = computed(() => c.value === "用户自选角色" ? [{
|
|
30
31
|
title: "用户名称",
|
|
31
32
|
dataIndex: "realName",
|
|
32
33
|
ellipsis: !0
|
|
@@ -39,14 +40,14 @@ import './ResourceRelation2.css';var _hoisted_1 = { class: "mb-20px p-x-15px" },
|
|
|
39
40
|
dataIndex: "name",
|
|
40
41
|
ellipsis: !0
|
|
41
42
|
}]);
|
|
42
|
-
function
|
|
43
|
-
|
|
43
|
+
function g(e) {
|
|
44
|
+
d.value = e.id || "", u(!0);
|
|
44
45
|
}
|
|
45
|
-
return
|
|
46
|
-
let
|
|
47
|
-
return openBlock(), createBlock(
|
|
48
|
-
open: unref(
|
|
49
|
-
"onUpdate:open":
|
|
46
|
+
return r({ open: g }), (e, t) => {
|
|
47
|
+
let n = Segmented, r = Tag, i = Drawer;
|
|
48
|
+
return openBlock(), createBlock(i, {
|
|
49
|
+
open: unref(l),
|
|
50
|
+
"onUpdate:open": t[1] ||= (e) => isRef(l) ? l.value = e : null,
|
|
50
51
|
title: "分配查看",
|
|
51
52
|
placement: "right",
|
|
52
53
|
width: 720,
|
|
@@ -57,27 +58,27 @@ import './ResourceRelation2.css';var _hoisted_1 = { class: "mb-20px p-x-15px" },
|
|
|
57
58
|
paddingRight: 0
|
|
58
59
|
}
|
|
59
60
|
}, {
|
|
60
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(
|
|
61
|
-
value: unref(
|
|
62
|
-
"onUpdate:value":
|
|
61
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1, [createVNode(n, {
|
|
62
|
+
value: unref(c),
|
|
63
|
+
"onUpdate:value": t[0] ||= (e) => isRef(c) ? c.value = e : null,
|
|
63
64
|
block: "",
|
|
64
|
-
options: unref(
|
|
65
|
-
onChange:
|
|
65
|
+
options: unref(s),
|
|
66
|
+
onChange: p
|
|
66
67
|
}, null, 8, ["value", "options"])]), createVNode(unref(ProTable), {
|
|
67
68
|
ref_key: "protable",
|
|
68
|
-
ref:
|
|
69
|
+
ref: f,
|
|
69
70
|
"row-key": "id",
|
|
70
|
-
request:
|
|
71
|
-
columns: unref(
|
|
71
|
+
request: m,
|
|
72
|
+
columns: unref(h),
|
|
72
73
|
search: !1,
|
|
73
74
|
toolbar: !1,
|
|
74
75
|
"auto-height": { offset: 50 }
|
|
75
76
|
}, {
|
|
76
|
-
bodyCell: withCtx(({ column: e, record:
|
|
77
|
+
bodyCell: withCtx(({ column: e, record: n }) => [e.dataIndex === "name" ? (openBlock(), createElementBlock("div", _hoisted_2, [createElementVNode("span", _hoisted_3, toDisplayString(n.name), 1), n.isInherit === "1" ? (openBlock(), createBlock(r, {
|
|
77
78
|
key: 0,
|
|
78
79
|
color: "processing"
|
|
79
80
|
}, {
|
|
80
|
-
default: withCtx(() => [...
|
|
81
|
+
default: withCtx(() => [...t[2] ||= [createTextVNode(" 及子组织 ", -1)]]),
|
|
81
82
|
_: 1
|
|
82
83
|
})) : createCommentVNode("", !0)])) : createCommentVNode("", !0)]),
|
|
83
84
|
_: 1
|
|
@@ -86,5 +87,5 @@ import './ResourceRelation2.css';var _hoisted_1 = { class: "mb-20px p-x-15px" },
|
|
|
86
87
|
}, 8, ["open"]);
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
}), [["__scopeId", "data-v-1167727f"]]);
|
|
90
|
-
export { ResourceRelation_default as t };
|
|
90
|
+
}), ResourceRelation_exports = /* @__PURE__ */ __exportAll({ default: () => ResourceRelation_default }), ResourceRelation_default = /* @__PURE__ */ _plugin_vue_export_helper_default(ResourceRelation_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-1167727f"]]);
|
|
91
|
+
export { ResourceRelation_exports as n, ResourceRelation_default as t };
|