ss-component-new 1.3.438 → 1.3.440
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/{MTLLoader-CvrQ4EwO.cjs → MTLLoader-BwkFVqL-.cjs} +1 -1
- package/dist/{MTLLoader-B_6MsRvs.js → MTLLoader-DNSv6X0i.js} +1 -1
- package/dist/{OrbitControls-DKFae7WL.js → OrbitControls-BYUrBNWv.js} +1 -1
- package/dist/{OrbitControls-BmTRTxOn.cjs → OrbitControls-DaZRnXU6.cjs} +1 -1
- package/dist/{URDFLoader-C3aCob6G.js → URDFLoader-BZBVqZws.js} +2 -2
- package/dist/{URDFLoader-B345qOec.cjs → URDFLoader-DYKZA4lN.cjs} +1 -1
- package/dist/{animationData-DeIFGQyE.cjs → animationData-BJRWi-LU.cjs} +1 -1
- package/dist/{animationData-sgKNBYrq.js → animationData-Zq5cH5C8.js} +12 -12
- package/dist/{array-n24QbcFB.cjs → array-CXkBrDAz.cjs} +1 -1
- package/dist/{array-aWbn8qBa.js → array-Q3XGsUSs.js} +2 -2
- package/dist/{iconfont-DJcVGYZj.cjs → iconfont-Bt2wRD-G.cjs} +1 -1
- package/dist/{iconfont-CvGxeps_.js → iconfont-CY4Fa9KU.js} +2 -2
- package/dist/{index-CRPMOd9M.js → index--pSIRGrA.js} +5 -5
- package/dist/{index-TYU0HY-n.cjs → index--tdZ_yDs.cjs} +1 -1
- package/dist/{index-BrQme5Gx.js → index-0FpZWIIY.js} +1 -1
- package/dist/{index-BF5SUWUn.js → index-5zBx2xab.js} +89 -83
- package/dist/{index-C9Pn4hQC.cjs → index-B3xqfizn.cjs} +1 -1
- package/dist/{index-DI41201t.cjs → index-B5oXMF5a.cjs} +1 -1
- package/dist/{index-CuuYyKIw.js → index-B6T-kHUJ.js} +5 -5
- package/dist/{index-tuui_o56.js → index-BMbjyksn.js} +1 -1
- package/dist/{index-B9MP9Z_h.cjs → index-BMofVGXk.cjs} +20 -20
- package/dist/{index-B_b-9RDj.js → index-BRUxCmkT.js} +1 -1
- package/dist/{index-CuNPiHbH.cjs → index-BXZq_sqI.cjs} +1 -1
- package/dist/{index-Btrphi_S.cjs → index-BiwYTq-N.cjs} +1 -1
- package/dist/{index-DJQ7yrfE.js → index-BngLkn1F.js} +3 -3
- package/dist/{index-CzELqSBx.cjs → index-C4qnDJ7y.cjs} +2 -2
- package/dist/{index-CFiyfU1X.js → index-CCUIg0kG.js} +27 -27
- package/dist/{index-DSbBB3gM.js → index-CDGUQzvl.js} +3226 -3226
- package/dist/{index-JEFalyAE.cjs → index-CGdHW3ql.cjs} +1 -1
- package/dist/{index-BE5v43Vt.js → index-CL9NLBg4.js} +1 -1
- package/dist/{index-C5mNmuca.js → index-CUL-lmb5.js} +8113 -8096
- package/dist/{index-Dsye36Ki.js → index-CnuQRzui.js} +1 -1
- package/dist/{index-BFLioZ06.js → index-Cw0_-C_T.js} +6 -6
- package/dist/{index-jGhvBNbM.js → index-Cy1kw0Nt.js} +4 -4
- package/dist/index-Cy8mMwpW.cjs +2 -0
- package/dist/{index-C6_Tsvgw.js → index-D-pcZs4P.js} +1 -1
- package/dist/{index-BZnGHA40.cjs → index-D4qChNi3.cjs} +1 -1
- package/dist/{index-Qj4hyEcC.cjs → index-D5c-glVN.cjs} +1 -1
- package/dist/{index-CljHDtk8.cjs → index-D7aAxcbI.cjs} +1 -1
- package/dist/{index-Cwihd-8T.cjs → index-D8DyFGA3.cjs} +1 -1
- package/dist/{index-BYR89prk.js → index-DCm5o7Nl.js} +1 -1
- package/dist/{index-CP7omV5G.js → index-DDynMbhm.js} +3 -3
- package/dist/{index-D-HQbgK4.cjs → index-DZ3bTPbQ.cjs} +1 -1
- package/dist/index-D_9JR2Ks.cjs +26 -0
- package/dist/{index-rVSu3pgq.cjs → index-FcjQa2OL.cjs} +1 -1
- package/dist/{index-CRSa6_kF.cjs → index-Tco6PJIR.cjs} +1 -1
- package/dist/{index-BTgKT-Kp.js → index-aaiRLVcp.js} +7 -7
- package/dist/{index-CZuPznao.cjs → index-dAoOU6TR.cjs} +1 -1
- package/dist/{index-fh5hS-5q.cjs → index-pTiemqvw.cjs} +1 -1
- package/dist/{index-Ca_pqbsS.js → index-sVk4LM6C.js} +27 -27
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-87Te47Zq.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BzLhfrPk.cjs} +59 -59
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-MobFDuC8.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-PnEFT3X7.js} +1648 -1643
- package/dist/{main-B_eTLx6e.js → main-BFSFTa5H.js} +3 -3
- package/dist/{main-CwbgYYBB.cjs → main-C89I_j8J.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-ltaREaW0.cjs → threeModel-3tt2Brip.cjs} +1 -1
- package/dist/{threeModel-CBeqHs8p.js → threeModel-j3rd3jta.js} +3 -3
- package/dist/{threePreview-BRskpQt7.cjs → threePreview-9qfx_J15.cjs} +1 -1
- package/dist/{threePreview-BdB2Ejgl.js → threePreview-Djh17gcq.js} +3 -3
- package/dist/{threeSceneView-CEDRWk44.cjs → threeSceneView-CiVN4gbh.cjs} +1 -1
- package/dist/{threeSceneView-lqhX2anf.js → threeSceneView-rYnHYo2_.js} +10 -10
- package/dist/{threeSceneViewForCPMPIP-BXlkmvHH.cjs → threeSceneViewForCPMPIP-BX3tSRdC.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DQsrKX6y.js → threeSceneViewForCPMPIP-C4SwId__.js} +7 -7
- package/dist/{threeTrackPathView-efq9aI4q.cjs → threeTrackPathView-C8S1xa9M.cjs} +1 -1
- package/dist/{threeTrackPathView-Duq7EuCG.js → threeTrackPathView-CewpNc2B.js} +3 -3
- package/dist/{threeViewerHost-5zPVIi_B.cjs → threeViewerHost-CWrX4pzc.cjs} +1 -1
- package/dist/{threeViewerHost-CVoY1tN8.js → threeViewerHost-oZOwIdFN.js} +2 -2
- package/dist/{urdfTree-DjV7m96c.js → urdfTree-BWSOyDd8.js} +1 -1
- package/dist/{urdfTree-D0GKaMy-.cjs → urdfTree-tWRZTeGx.cjs} +1 -1
- package/dist/{workpieceTreePanel-DIM7QK-1.js → workpieceTreePanel-C_zbYiB6.js} +4 -4
- package/dist/{workpieceTreePanel-BNOW7Npy.cjs → workpieceTreePanel-cotaSjga.cjs} +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-B3MCUfK8.cjs +0 -26
- package/dist/index-xNgkAqH0.cjs +0 -2
|
@@ -98,7 +98,12 @@ const ST = (e, a) => {
|
|
|
98
98
|
for (let n = 0; n < e.length; n += a)
|
|
99
99
|
r.push(e.slice(n, n + a));
|
|
100
100
|
return r;
|
|
101
|
-
}, MT =
|
|
101
|
+
}, MT = (e) => {
|
|
102
|
+
var r;
|
|
103
|
+
if (!e && e !== "") return 0;
|
|
104
|
+
let a;
|
|
105
|
+
return e === "" ? a = 15 : a = (r = new TextEncoder().encode(e)) == null ? void 0 : r.length, a = Math.ceil(a * 12), a;
|
|
106
|
+
}, BT = [
|
|
102
107
|
{
|
|
103
108
|
key: "FormName",
|
|
104
109
|
value: "Form"
|
|
@@ -119,7 +124,7 @@ const ST = (e, a) => {
|
|
|
119
124
|
key: "SystemKey",
|
|
120
125
|
value: "System"
|
|
121
126
|
}
|
|
122
|
-
],
|
|
127
|
+
], LT = [
|
|
123
128
|
{
|
|
124
129
|
key: "FormDirect",
|
|
125
130
|
value: "formFlex"
|
|
@@ -308,11 +313,11 @@ const ST = (e, a) => {
|
|
|
308
313
|
return c[a[l]] = f, c;
|
|
309
314
|
})) == null ? void 0 : s.filter((f) => f), i;
|
|
310
315
|
}), n;
|
|
311
|
-
},
|
|
316
|
+
}, UT = (e, a) => {
|
|
312
317
|
var s, f;
|
|
313
318
|
const r = ae(e), n = (s = r == null ? void 0 : r.find((l) => (l == null ? void 0 : l.key) === "header")) == null ? void 0 : s.contents, t = (f = r == null ? void 0 : r.find((l) => (l == null ? void 0 : l.key) === "tableContents")) == null ? void 0 : f.contents;
|
|
314
319
|
return Wh(t, yf(n).slice(0, yf(n).length - 1), a);
|
|
315
|
-
},
|
|
320
|
+
}, WT = (e) => {
|
|
316
321
|
let a = {};
|
|
317
322
|
return e == null || e.forEach((r) => {
|
|
318
323
|
a[r.key] = r.value;
|
|
@@ -345,7 +350,7 @@ const ST = (e, a) => {
|
|
|
345
350
|
};
|
|
346
351
|
})) == null ? void 0 : i.filter((s) => s.key !== "操作"), n;
|
|
347
352
|
});
|
|
348
|
-
},
|
|
353
|
+
}, HT = async (e) => {
|
|
349
354
|
var r, n, t, i;
|
|
350
355
|
let a = "";
|
|
351
356
|
if ((n = (r = ae(e)) == null ? void 0 : r.split("/")) == null || n.forEach((s, f) => {
|
|
@@ -662,7 +667,7 @@ const ST = (e, a) => {
|
|
|
662
667
|
this.routerPageStructures = e;
|
|
663
668
|
}
|
|
664
669
|
}
|
|
665
|
-
}), r1 = D0(Mr), { activeMenuPath:
|
|
670
|
+
}), r1 = D0(Mr), { activeMenuPath: XT } = Gr(r1), a1 = I0(Mr), { structureData: t1, loginUserInfo: GT } = Gr(a1), n1 = co(Mr), { routerPageStructures: i1 } = Gr(n1);
|
|
666
671
|
fi(Mr);
|
|
667
672
|
Oa([
|
|
668
673
|
{
|
|
@@ -882,7 +887,7 @@ is(() => {
|
|
|
882
887
|
});
|
|
883
888
|
const m1 = Oa([]);
|
|
884
889
|
s1.value;
|
|
885
|
-
const oo = I0(Mr), { superAdminInfo:
|
|
890
|
+
const oo = I0(Mr), { superAdminInfo: $T, cryptoInfo: KT, loginUserInfo: zT } = Gr(oo), g1 = D0(Mr), { activeMenuPath: v1 } = Gr(g1), Lc = fi(Mr), VT = "123456", _1 = co(Mr), { routerPageStructures: y1 } = Gr(_1);
|
|
886
891
|
Oa(0);
|
|
887
892
|
Oa([
|
|
888
893
|
{
|
|
@@ -923,7 +928,7 @@ const k1 = is(() => {
|
|
|
923
928
|
})) : [];
|
|
924
929
|
});
|
|
925
930
|
Oa();
|
|
926
|
-
const
|
|
931
|
+
const jT = async (e, a, r) => {
|
|
927
932
|
var n, t;
|
|
928
933
|
try {
|
|
929
934
|
const i = await e(a);
|
|
@@ -945,7 +950,7 @@ const b0 = Bf("originalState", {
|
|
|
945
950
|
actions: {}
|
|
946
951
|
}), S1 = fi(Mr), {
|
|
947
952
|
routeToChildPath: Uc
|
|
948
|
-
} = Gr(S1), A1 = I0(Mr), { loginUserInfo: Wc, cryptoInfo:
|
|
953
|
+
} = Gr(S1), A1 = I0(Mr), { loginUserInfo: Wc, cryptoInfo: YT } = Gr(A1), F1 = b0(Mr), { originalPath: Hc } = Gr(F1), I1 = async (e, a) => {
|
|
949
954
|
const r = sessionStorage.getItem("authority"), n = JSON.parse(r || "");
|
|
950
955
|
if (Array.isArray(n)) {
|
|
951
956
|
let t;
|
|
@@ -1157,13 +1162,13 @@ const uo = (e, a, r) => {
|
|
|
1157
1162
|
return c;
|
|
1158
1163
|
}), a;
|
|
1159
1164
|
}
|
|
1160
|
-
},
|
|
1165
|
+
}, JT = async (e) => {
|
|
1161
1166
|
let a = e;
|
|
1162
1167
|
return a = a == null ? void 0 : a.filter((r) => r), a = P1(a), a != null && a.every((r) => {
|
|
1163
1168
|
var n, t;
|
|
1164
1169
|
return ((t = (n = Object.keys(r)) == null ? void 0 : n.filter((i) => i == null ? void 0 : i.includes("name"))) == null ? void 0 : t.length) === 1;
|
|
1165
1170
|
}) ? a : R1(a);
|
|
1166
|
-
},
|
|
1171
|
+
}, qT = async () => {
|
|
1167
1172
|
var i, s, f, l, c, o, u, x, h, d, p, m, g, y, v, E, T, S, w, L, D, U, B, W, M, se, ne, he, ce, be, K, we, Ae, _, A, I, b, X, ee, Q, Z, J, Te, P, Pe, De, je, Be, ie, ur, ir, ka, Ia, St, Za, Ea, za, Se, Ne, Le, wa, Qe, br, me, Fr, Cr, hr;
|
|
1168
1173
|
In.setImportLoading(!0);
|
|
1169
1174
|
let e = "";
|
|
@@ -1353,7 +1358,7 @@ const uo = (e, a, r) => {
|
|
|
1353
1358
|
}
|
|
1354
1359
|
}
|
|
1355
1360
|
In.setImportLoading(!1);
|
|
1356
|
-
},
|
|
1361
|
+
}, ZT = (e, a) => {
|
|
1357
1362
|
let r = e;
|
|
1358
1363
|
const n = [];
|
|
1359
1364
|
let t = "", i = 0;
|
|
@@ -1380,7 +1385,7 @@ const uo = (e, a, r) => {
|
|
|
1380
1385
|
for (const s of r)
|
|
1381
1386
|
i++, s.includes("{") || t.includes("{") || s.includes("[") || t.includes("[") || s.includes("【") || t.includes("【") || s.includes("(") || t.includes("(") || s.includes("(") || t.includes("(") || s.includes("/*") || t.includes("/*") ? (t += s.trim(), ae(t).split("{").length - 1 === ae(t).split("}").length - 1 && ae(t).split("【").length - 1 === ae(t).split("】").length - 1 && ae(t).split("[").length - 1 === ae(t).split("]").length - 1 && ae(t).split("(").length - 1 === ae(t).split(")").length - 1 && ae(t).split("(").length - 1 === ae(t).split(")").length - 1 && ae(t).split("/*").length - 1 === ae(t).split("*/").length - 1 && t[t.length - 1] === a && Gc(t, "'") ? (n.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = "") : i === (e == null ? void 0 : e.length) && (n.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = "")) : (t += s.trim(), (t == null ? void 0 : t[(t == null ? void 0 : t.length) - 1]) === a && Gc(t, "'") && (n.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = ""));
|
|
1382
1387
|
return (t == null ? void 0 : t.length) !== 0 && n.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), n;
|
|
1383
|
-
}, M1 = b0(Mr), { originalPath:
|
|
1388
|
+
}, M1 = b0(Mr), { originalPath: QT } = Gr(M1), B1 = (e) => {
|
|
1384
1389
|
var r, n;
|
|
1385
1390
|
let a = (n = (r = e == null ? void 0 : e.slice(1, (e == null ? void 0 : e.length) - 1)) == null ? void 0 : r.split(",")) == null ? void 0 : n.map((t) => {
|
|
1386
1391
|
var i, s, f, l, c;
|
|
@@ -1427,7 +1432,7 @@ const uo = (e, a, r) => {
|
|
|
1427
1432
|
};
|
|
1428
1433
|
}, Ef = D0(Mr), { activeMenuPath: gs } = Gr(Ef), L1 = Lf(Mr), { chooseTitle: Oi } = Gr(L1);
|
|
1429
1434
|
let Dr = "$R";
|
|
1430
|
-
const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUserInfo:
|
|
1435
|
+
const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUserInfo: eS, systemInfo: Kc } = Gr(W1), ho = fi(Mr), H1 = b0(Mr), { originalPath: X1 } = Gr(H1), { payloadTypes: rS } = Gr(ho), vn = (e, a) => (a == null ? void 0 : a.split(",")).some((n) => Object.keys(e).some((t) => t.startsWith("name") && e[t] === n)), tf = {
|
|
1431
1436
|
onNumSlice: qh,
|
|
1432
1437
|
onRandomContents: e1,
|
|
1433
1438
|
onConditionContents: Jh,
|
|
@@ -2331,7 +2336,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2331
2336
|
name: "",
|
|
2332
2337
|
compData: (L = o == null ? void 0 : o.map((D) => D.value.pageData)) == null ? void 0 : L.filter((D) => Object.values(D).length > 0)
|
|
2333
2338
|
}), g = g.sort((D, U) => D.orderId - U.orderId), g = await N1(g), i ? g : await I1(e, g);
|
|
2334
|
-
},
|
|
2339
|
+
}, aS = async () => {
|
|
2335
2340
|
var e, a;
|
|
2336
2341
|
try {
|
|
2337
2342
|
let r = ((e = Kc.value) == null ? void 0 : e.platform) || "browser";
|
|
@@ -2387,7 +2392,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2387
2392
|
isReadonly: f
|
|
2388
2393
|
};
|
|
2389
2394
|
}
|
|
2390
|
-
}),
|
|
2395
|
+
}), tS = (e) => {
|
|
2391
2396
|
const a = [];
|
|
2392
2397
|
function r(n) {
|
|
2393
2398
|
if (Array.isArray(n))
|
|
@@ -2395,7 +2400,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2395
2400
|
!t.children || t.children.length === 0 ? a.push(t) : r(t.children);
|
|
2396
2401
|
}
|
|
2397
2402
|
return r(e), a;
|
|
2398
|
-
},
|
|
2403
|
+
}, nS = (e, a, r) => ae(e).map((t) => (Array.isArray(t) && (t = t.map((i) => {
|
|
2399
2404
|
var f, l, c, o;
|
|
2400
2405
|
(l = (f = Y1.value) == null ? void 0 : f.split("/")) == null || l.forEach((u) => {
|
|
2401
2406
|
var x, h, d;
|
|
@@ -2456,7 +2461,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2456
2461
|
})), i;
|
|
2457
2462
|
}
|
|
2458
2463
|
return a(e);
|
|
2459
|
-
},
|
|
2464
|
+
}, iS = (e) => {
|
|
2460
2465
|
function a(r, n = [], t = "") {
|
|
2461
2466
|
if (!r || r.length === 0) return [];
|
|
2462
2467
|
let i = n;
|
|
@@ -2471,7 +2476,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2471
2476
|
})), i;
|
|
2472
2477
|
}
|
|
2473
2478
|
return a(e);
|
|
2474
|
-
},
|
|
2479
|
+
}, sS = (e) => {
|
|
2475
2480
|
let a = ae(e);
|
|
2476
2481
|
return a = a == null ? void 0 : a.map((r) => ((r == null ? void 0 : r.type) === "Select" ? r = {
|
|
2477
2482
|
label: r == null ? void 0 : r.label,
|
|
@@ -2693,7 +2698,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
2693
2698
|
}), (d == null ? void 0 : d.length) > 0 && await ti({
|
|
2694
2699
|
dataList: d
|
|
2695
2700
|
});
|
|
2696
|
-
},
|
|
2701
|
+
}, fS = async (e, a, r, n, t) => {
|
|
2697
2702
|
var p, m, g, y, v, E, T, S, w, L, D, U, B, W, M, se, ne, he, ce, be, K, we, Ae;
|
|
2698
2703
|
let i = e;
|
|
2699
2704
|
(i == null ? void 0 : i[(i == null ? void 0 : i.length) - 1]) !== G0 && (i = "", (m = (p = ae(e)) == null ? void 0 : p.split(G0)) == null || m.forEach((_, A) => {
|
|
@@ -3270,12 +3275,12 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
3270
3275
|
}), (r == null ? void 0 : r[(r == null ? void 0 : r.length) - 1]) === "/" && (r = r + ((x = (u = Hn == null ? void 0 : Hn.value) == null ? void 0 : u[0]) == null ? void 0 : x.value));
|
|
3271
3276
|
const t = await Rn(r, sessionStorage.getItem("systemKey"), "", !1, [], !1, void 0);
|
|
3272
3277
|
return t || await Rn(n, sessionStorage.getItem("systemKey"), "", !1, [], !1, void 0);
|
|
3273
|
-
},
|
|
3278
|
+
}, cS = (e) => e.entries().next().done, lS = async (e) => {
|
|
3274
3279
|
var n, t, i;
|
|
3275
3280
|
const a = await ix(e);
|
|
3276
3281
|
let r = [];
|
|
3277
3282
|
return ((n = a == null ? void 0 : a.data) == null ? void 0 : n.type) === "success" && (r = (i = (t = a.data.result) == null ? void 0 : t.map((s) => s.value.pageData)) == null ? void 0 : i.filter((s) => (s == null ? void 0 : s.comp) === "Table"), r = r == null ? void 0 : r.map((s) => nx(s))), r;
|
|
3278
|
-
},
|
|
3283
|
+
}, oS = [
|
|
3279
3284
|
{
|
|
3280
3285
|
key: "单选",
|
|
3281
3286
|
value: "Select"
|
|
@@ -3564,7 +3569,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
3564
3569
|
type: "Select",
|
|
3565
3570
|
options: O0
|
|
3566
3571
|
}
|
|
3567
|
-
],
|
|
3572
|
+
], uS = [
|
|
3568
3573
|
{
|
|
3569
3574
|
key: "Input",
|
|
3570
3575
|
value: sx
|
|
@@ -3618,7 +3623,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
3618
3623
|
value: "delete",
|
|
3619
3624
|
label: "删除"
|
|
3620
3625
|
}
|
|
3621
|
-
],
|
|
3626
|
+
], hS = [
|
|
3622
3627
|
{
|
|
3623
3628
|
key: "label",
|
|
3624
3629
|
label: "按钮名",
|
|
@@ -3635,7 +3640,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
3635
3640
|
label: "颜色",
|
|
3636
3641
|
type: "Color"
|
|
3637
3642
|
}
|
|
3638
|
-
],
|
|
3643
|
+
], xS = (e) => {
|
|
3639
3644
|
var r, n, t, i, s, f, l, c;
|
|
3640
3645
|
let a = ae(e);
|
|
3641
3646
|
if (((r = a == null ? void 0 : a.find((o) => (o == null ? void 0 : o.name) === "类型")) == null ? void 0 : r.type) === "Select" && ((i = (t = (n = ae(a)) == null ? void 0 : n.find((o) => (o == null ? void 0 : o.name) === "选项值")) == null ? void 0 : t.value) == null ? void 0 : i.length) > 0) {
|
|
@@ -3646,7 +3651,7 @@ const U1 = Uf(Mr), { multipleTableConst: $c } = Gr(U1), W1 = I0(Mr), { loginUser
|
|
|
3646
3651
|
a = a == null ? void 0 : a.map((u) => ((u == null ? void 0 : u.name) === "初始值" && (u.contents = o, u.value = (u == null ? void 0 : u.value) ?? ""), u));
|
|
3647
3652
|
}
|
|
3648
3653
|
return a;
|
|
3649
|
-
},
|
|
3654
|
+
}, dS = async (e) => {
|
|
3650
3655
|
var i, s, f, l;
|
|
3651
3656
|
let a = ae(e);
|
|
3652
3657
|
const r = (i = e == null ? void 0 : e.find((c) => (c == null ? void 0 : c.name) === "下拉绑定类型")) == null ? void 0 : i.value, n = (s = e == null ? void 0 : e.find((c) => (c == null ? void 0 : c.name) === "类型")) == null ? void 0 : s.value, t = await cx();
|
|
@@ -27964,7 +27969,7 @@ function sT(e) {
|
|
|
27964
27969
|
r.match(/^\.[a-z]+$/) && (e.bookType = r.slice(1)), e.bookType = a[e.bookType] || e.bookType;
|
|
27965
27970
|
}
|
|
27966
27971
|
}
|
|
27967
|
-
function
|
|
27972
|
+
function pS(e, a, r) {
|
|
27968
27973
|
var n = {};
|
|
27969
27974
|
return n.type = "file", n.file = a, sT(n), Ih(e, n);
|
|
27970
27975
|
}
|
|
@@ -28218,7 +28223,7 @@ function mT(e, a, r, n) {
|
|
|
28218
28223
|
}
|
|
28219
28224
|
return e;
|
|
28220
28225
|
}
|
|
28221
|
-
var
|
|
28226
|
+
var mS = {
|
|
28222
28227
|
encode_col: _a,
|
|
28223
28228
|
encode_row: ba,
|
|
28224
28229
|
encode_cell: tr,
|
|
@@ -28257,20 +28262,20 @@ var pS = {
|
|
|
28257
28262
|
SHEET_VERY_HIDDEN: 2
|
|
28258
28263
|
}
|
|
28259
28264
|
};
|
|
28260
|
-
const gT = b0(Mr), { originalPath: vT } = gT,
|
|
28265
|
+
const gT = b0(Mr), { originalPath: vT } = gT, gS = (e) => {
|
|
28261
28266
|
var f, l;
|
|
28262
28267
|
const a = e == null ? void 0 : e.compData, r = (f = a == null ? void 0 : a.find((c) => (c == null ? void 0 : c.key) === "header")) == null ? void 0 : f.contents, n = r == null ? void 0 : r.findIndex((c, o) => {
|
|
28263
28268
|
const { isMainKey: u } = c;
|
|
28264
28269
|
return u;
|
|
28265
28270
|
}), t = (l = a == null ? void 0 : a.find((c) => (c == null ? void 0 : c.key) === "tableContents")) == null ? void 0 : l.contents, i = t == null ? void 0 : t.map((c) => (c = c == null ? void 0 : c.filter((o) => !(o != null && o.id)), c));
|
|
28266
28271
|
return i == null ? void 0 : i.map((c) => c == null ? void 0 : c[n]);
|
|
28267
|
-
},
|
|
28272
|
+
}, vS = async (e, a) => {
|
|
28268
28273
|
const r = e.join("/"), n = sessionStorage.getItem("systemKey");
|
|
28269
28274
|
return await Rn(`${r}${vT}${a}`, n, "");
|
|
28270
|
-
},
|
|
28275
|
+
}, _S = {
|
|
28271
28276
|
TABLE: "Table",
|
|
28272
28277
|
FORM: "Form"
|
|
28273
|
-
},
|
|
28278
|
+
}, yS = (e, a) => a == null ? void 0 : a.find((n) => {
|
|
28274
28279
|
const { name: t } = n;
|
|
28275
28280
|
return t === e;
|
|
28276
28281
|
}), _T = (e, a = "") => {
|
|
@@ -28287,67 +28292,68 @@ const gT = b0(Mr), { originalPath: vT } = gT, mS = (e) => {
|
|
|
28287
28292
|
r.push(...s);
|
|
28288
28293
|
}
|
|
28289
28294
|
return r;
|
|
28290
|
-
},
|
|
28295
|
+
}, kS = (e, a) => !e || !e.length ? [] : e.filter((n) => {
|
|
28291
28296
|
const { comp: t } = n;
|
|
28292
28297
|
return t === a;
|
|
28293
28298
|
});
|
|
28294
28299
|
export {
|
|
28295
|
-
|
|
28296
|
-
|
|
28297
|
-
|
|
28298
|
-
|
|
28299
|
-
|
|
28300
|
-
|
|
28301
|
-
|
|
28302
|
-
|
|
28303
|
-
|
|
28304
|
-
|
|
28305
|
-
|
|
28306
|
-
|
|
28307
|
-
|
|
28308
|
-
|
|
28309
|
-
|
|
28310
|
-
|
|
28311
|
-
|
|
28300
|
+
hS as $,
|
|
28301
|
+
vS as A,
|
|
28302
|
+
NT as B,
|
|
28303
|
+
AT as C,
|
|
28304
|
+
PT as D,
|
|
28305
|
+
DT as E,
|
|
28306
|
+
Pc as F,
|
|
28307
|
+
bT as G,
|
|
28308
|
+
CT as H,
|
|
28309
|
+
RT as I,
|
|
28310
|
+
yf as J,
|
|
28311
|
+
ix as K,
|
|
28312
|
+
OT as L,
|
|
28313
|
+
tS as M,
|
|
28314
|
+
Uf as N,
|
|
28315
|
+
nS as O,
|
|
28316
|
+
X0 as P,
|
|
28312
28317
|
iS as Q,
|
|
28313
|
-
|
|
28314
|
-
|
|
28315
|
-
|
|
28316
|
-
|
|
28317
|
-
|
|
28318
|
-
|
|
28319
|
-
|
|
28320
|
-
|
|
28321
|
-
|
|
28322
|
-
|
|
28323
|
-
|
|
28324
|
-
|
|
28325
|
-
|
|
28326
|
-
|
|
28327
|
-
|
|
28328
|
-
|
|
28329
|
-
|
|
28330
|
-
|
|
28331
|
-
|
|
28332
|
-
|
|
28318
|
+
sS as R,
|
|
28319
|
+
cS as S,
|
|
28320
|
+
WT as T,
|
|
28321
|
+
oS as U,
|
|
28322
|
+
tn as V,
|
|
28323
|
+
mx as W,
|
|
28324
|
+
uS as X,
|
|
28325
|
+
lS as Y,
|
|
28326
|
+
dS as Z,
|
|
28327
|
+
xS as _,
|
|
28328
|
+
LT as a,
|
|
28329
|
+
UT as a0,
|
|
28330
|
+
ZT as a1,
|
|
28331
|
+
HT as a2,
|
|
28332
|
+
Eo as a3,
|
|
28333
|
+
VT as a4,
|
|
28334
|
+
MT as b,
|
|
28335
|
+
JT as c,
|
|
28336
|
+
Rn as d,
|
|
28337
|
+
V0 as e,
|
|
28338
|
+
ST as f,
|
|
28333
28339
|
On as g,
|
|
28334
|
-
|
|
28335
|
-
|
|
28336
|
-
|
|
28337
|
-
|
|
28340
|
+
FT as h,
|
|
28341
|
+
aS as i,
|
|
28342
|
+
jT as j,
|
|
28343
|
+
mS as k,
|
|
28338
28344
|
go as l,
|
|
28339
|
-
|
|
28340
|
-
|
|
28341
|
-
|
|
28342
|
-
|
|
28343
|
-
|
|
28345
|
+
Mh as m,
|
|
28346
|
+
fS as n,
|
|
28347
|
+
qT as o,
|
|
28348
|
+
_S as p,
|
|
28349
|
+
_T as q,
|
|
28344
28350
|
ao as r,
|
|
28345
28351
|
IT as s,
|
|
28346
28352
|
Rc as t,
|
|
28347
28353
|
b0 as u,
|
|
28348
|
-
|
|
28349
|
-
|
|
28350
|
-
|
|
28351
|
-
|
|
28354
|
+
BT as v,
|
|
28355
|
+
pS as w,
|
|
28356
|
+
kS as x,
|
|
28357
|
+
yS as y,
|
|
28352
28358
|
gS as z
|
|
28353
28359
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./request-Dl8yi2iS.cjs"),N=require("./index-CZuPznao.cjs"),L=require("./index-xN3pvlzo.cjs"),oe=require("./index-B-pflqKE.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-87Te47Zq.cjs");require("./index-B3MCUfK8.cjs");require("./index-BpPyaNFa.cjs");const b=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-B9MP9Z_h.cjs");require("./index-JEFalyAE.cjs");const z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=require("./clone-D92QCGo2.cjs"),je={class:"param-auth"},Ge={class:"body"},Qe={class:"node-content-wrapper"},He={class:"node-label-wrapper"},Je={class:"node-label"},We=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},setup($,{expose:E}){const c=$,y={value:"uniqueKey",label:"label",children:"children",class:f=>{}},{buildParamAuthTree:g}=N.useRole(),p=e.ref(),w=e.computed(()=>g(c.params)),i=e.computed(()=>c.checkedParams.map(f=>`${f.id}_${f.prop}`));return E({getCheckedParams:()=>{var d;return((d=p.value)==null?void 0:d.getCheckedNodes())||[]}}),(f,d)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",je,[d[0]||(d[0]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ge,[e.createVNode(v,{ref_key:"paramTreeRef",ref:p,class:"param-tree",data:w.value,props:y,"node-key":"uniqueKey","show-checkbox":"","default-expanded-keys":i.value,"default-checked-keys":i.value,height:"100%"},{default:e.withCtx(({node:u,data:P})=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",He,[e.createElementVNode("div",Je,e.toDisplayString(u.label),1)])])]),_:1},8,["data","default-expanded-keys","default-checked-keys"])]),d[1]||(d[1]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))])}}}),Xe=z._export_sfc(We,[["__scopeId","data-v-b7ce5c18"]]),Ye={class:"param-wrapper"},Ze={class:"param-body"},et={class:"role-form-wrapper"},tt={class:"edit-footer"},ot={class:"footer-right"},at=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},emits:["updateParams"],setup($,{expose:E,emit:c}){const y=c,g=e.ref(),p=e.ref(!1),w=()=>{p.value=!0},i=()=>{p.value=!1},_=()=>{i()},f=()=>{const v=d();y("updateParams",v),i()},d=()=>{var u;return((u=g.value)==null?void 0:u.getCheckedParams())||[]};return E({openEditDialog:w}),(v,u)=>(e.openBlock(),e.createBlock(oe.ssDialog,{class:"param-edit-dialog",visible:p.value,title:"参数权限",onBeforeDestroy:i,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[u[0]||(u[0]=e.createElementVNode("div",{class:"param-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createVNode(Xe,{ref_key:"paramAuthTree",ref:g,params:v.params,"checked-params":v.checkedParams},null,8,["params","checked-params"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",tt,[u[1]||(u[1]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ot,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:_,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:f,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]))}}),lt=z._export_sfc(at,[["__scopeId","data-v-875ed466"]]),rt={class:"scope-management-wrapper"},nt={class:"scope-management-body"},st={class:"scope-form-wrapper"},it={class:"edit-footer"},ct={class:"footer-right"},dt=e.defineComponent({__name:"index",emits:["confirm"],setup($,{expose:E,emit:c}){const y=c,{initDepartmentScope:g}=L.useDataPermission(),p=e.ref(),w=e.reactive({departmentScope:[{required:!0,message:"请输入角色名称",trigger:"change"}]}),i=e.ref(g()),_=e.ref(!1),f=()=>{_.value=!0},d=()=>{_.value=!1},v=async h=>{i.value=te.clone(h),f()},u=()=>{i.value=g(),d()},P=async()=>{var h,m;await((m=(h=p.value)==null?void 0:h.validate)==null?void 0:m.call(h)),y("confirm",te.clone(i.value)),u()};return E({handleEdit:v}),(h,m)=>{const U=e.resolveComponent("el-radio"),M=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-form-item"),j=e.resolveComponent("el-col"),G=e.resolveComponent("el-row"),Q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(oe.ssDialog,{class:"scope-edit-dialog",visible:_.value,title:"数据权限",onBeforeDestroy:d,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"scope-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",rt,[m[1]||(m[1]=e.createElementVNode("div",{class:"scope-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.createVNode(Q,{class:"scope-edit-form",ref_key:"scopeFormRef",ref:p,model:i.value,rules:w},{default:e.withCtx(()=>[e.createVNode(G,{gutter:20},{default:e.withCtx(()=>[e.createVNode(j,{span:24},{default:e.withCtx(()=>[e.createVNode(K,{prop:"departmentScope",label:"部门权限范围","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:i.value.departmentScope,"onUpdate:modelValue":m[0]||(m[0]=C=>i.value.departmentScope=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L.departmentScopeOptions),C=>(e.openBlock(),e.createBlock(U,{key:C.value,value:C.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",it,[m[2]||(m[2]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ct,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:u,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:P,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"])}}}),ut=z._export_sfc(dt,[["__scopeId","data-v-40d37c72"]]),pt={class:"role-management"},mt={class:"header"},_t={class:"header-left"},ft={class:"query-wrapper"},vt={class:"header-right"},Vt={class:"body"},gt={class:"role-table-wrapper"},ht={class:"operate-list"},Ct=["onClick"],Nt={class:"pagination-wrapper"},yt={class:"role-management-wrapper"},wt={class:"role-management-body"},kt={class:"role-form-wrapper"},Et={class:"auth-tree-wrapper"},xt={class:"node-content-wrapper"},bt={class:"node-label-wrapper"},Tt={class:"node-label"},Pt={key:0,class:"status-tag"},Bt={key:1,class:"status-tag"},Dt={key:2,class:"status-tag"},St={key:3,class:"status-tag"},Lt={class:"edit-footer"},$t={class:"footer-right"},It=e.defineComponent({__name:"index",setup($){const E={value:"id",label:"label",children:"children"},c=L.useMenuState(L.pinia),{initDepartmentScope:y,recAndInitNodeDataPermission:g}=L.useDataPermission(),{initRoleItem:p,queryInfo:w,resetQuery:i,pageInfo:_,setPageNum:f,setPageSize:d,initGetByPage:v,initCreate:u,initUpdate:P,initDelete:h,propertyAuthTree:m,initPropertyAuthTree:U,getStatusLabelByValue:M,getStatusTagByValue:K,getFeatureStatusLabelByValue:j,getFeatureStatusTagByValue:G,initRoleConfig:Q,hasRoleEditAuth:C,isTableFeature:fe,initImport:ve,initExport:Ve,exportTemplate:ge}=N.useRole(),ae=e.ref([]),he=async()=>{const o=await v(),{roleData:t=[]}=o;return t},B=async()=>{ae.value=await he()},Ce=o=>{f(o),B()},Ne=o=>{d(o),B()},ye=async()=>{i(),c.setImportLoading(!0),await B().finally(()=>{c.setImportLoading(!1)})},T=async()=>{await B(),await Q()};e.onMounted(()=>{T()});const le=e.ref(),we=e.reactive({name:[{required:!0,message:"请输入角色名称",trigger:"blur"}]}),I=e.ref(),q=e.ref(""),n=e.ref(p());e.watch(q,o=>{I.value.filter(o)});const ke=(o,t)=>o?t.label.includes(o):!0,re=e.ref([]),R=e.ref(),Ee=(o,t)=>{var a;o.stopPropagation(),re.value=t.params||[],(a=R==null?void 0:R.value)==null||a.openEditDialog()},xe=o=>{var s;const t=(s=o==null?void 0:o[0])==null?void 0:s.id,a=n.value.params.filter(V=>V.id!==t);n.value.params=[...a,...o]},H=e.ref(!1),be=()=>{H.value=!0},ne=()=>{q.value="",H.value=!1},se=async o=>{if(!C.value)return;const t=[];o&&t.push(o.role_id),await U(t);let a={};o!=null&&o.role_id||(a={checkAll:!0,tree:m.value}),n.value=p(o,a),be()},ie=()=>{n.value=p(),ne()},Te=async()=>{var a,s,V;await((s=(a=le.value)==null?void 0:a.validate)==null?void 0:s.call(a));let o=((V=I.value)==null?void 0:V.getCheckedNodes())||[];o=o.filter(k=>k.isPropertyLeaf),o=o.map(k=>{const{departmentScope:X}=k.dataPermission||{};return{...k,department_scope:X}}),n.value.main_ids=o;const{role_id:t}=n.value;t?await De():await Be(),ie()},Pe=async o=>{if(!C.value)return;const{status:t}=o;N.statusConstants.ENABLE.value===t?o.status=N.statusConstants.DISABLED.value:o.status=N.statusConstants.ENABLE.value,await P(o),await T()},Be=async()=>{await u(n.value),await T()},De=async()=>{await P(n.value),await T()},Se=async o=>{await h(o),await T()},Le=async(o,t)=>{if(!C.value)return;const{value:a}=o,s=t.row;if(a==="edit"){se(s);return}if(a==="delete"){await Se(s);return}},$e=async(o,t)=>{o.stopPropagation();const{status:a}=t;N.featureStatusConstants.EDITABLE.value===a?t.status=N.featureStatusConstants.DISABLED.value:t.status=N.featureStatusConstants.EDITABLE.value},J=o=>{var a;return(((a=I.value)==null?void 0:a.getCheckedKeys(!0))||[]).includes(o.id)},ce=e.ref(),A=e.ref(),W=e.ref(y()),de=(o,t)=>{var a;o.stopPropagation(),A.value=t,t.isPropertyLeaf&&(W.value=te.clone(t.dataPermission)),t.isProperty||(W.value=y("")),(a=ce.value)==null||a.handleEdit(W.value)},Ie=o=>{const{isProperty:t,isPropertyLeaf:a}=A.value;if(a){A.value.dataPermission=o;return}if(!t){g(A.value,o);return}},qe=async()=>{await Re()},Re=async()=>{const o=document.createElement("input");o.type="file",o.accept=".xlsx",o.onchange=async t=>{var V;const s=(V=t.target.files)==null?void 0:V[0];if(s)try{c.setImportLoading(!0),await ve(s),await T(),c.setImportLoading(!1)}catch{c.setImportLoading(!1)}},o.click()},Ae=async()=>{c.setImportLoading(!0),await Ve().finally(()=>{c.setImportLoading(!1)})},Fe=async()=>{ge()};return(o,t)=>{var ue,pe,me,_e;const a=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),V=e.resolveComponent("el-icon"),k=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),Oe=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-tag"),ze=e.resolveComponent("el-table"),Ue=e.resolveComponent("el-pagination"),F=e.resolveComponent("el-form-item"),O=e.resolveComponent("el-col"),Y=e.resolveComponent("el-row"),Me=e.resolveComponent("el-tree"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createElementVNode("div",ft,[e.createVNode(a,{modelValue:e.unref(w).name,"onUpdate:modelValue":t[0]||(t[0]=l=>e.unref(w).name=l),style:{width:"240px"},placeholder:"请输入名称"},null,8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:B},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode("查询")])),_:1,__:[6]}),e.createVNode(s,{type:"primary",plain:"",onClick:ye},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode("重置")])),_:1,__:[7]})])]),e.createElementVNode("div",vt,[e.createVNode(s,{type:"primary",onClick:qe},{default:e.withCtx(()=>[t[8]||(t[8]=e.createTextVNode(" 导入 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.upload_default))]),_:1})]),_:1,__:[8]}),e.createVNode(Oe,null,{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(k,{onClick:Fe},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode("导出模板")])),_:1,__:[10]}),e.createVNode(k,{onClick:Ae},{default:e.withCtx(()=>t[11]||(t[11]=[e.createTextVNode("导出数据")])),_:1,__:[11]})]),_:1})]),default:e.withCtx(()=>[e.createVNode(s,{type:"primary"},{default:e.withCtx(()=>[t[9]||(t[9]=e.createTextVNode(" 导出 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.arrow_down_default))]),_:1})]),_:1,__:[9]})]),_:1}),e.createVNode(b._sfc_main,{emptyColor:!0,onClickTrigger:t[1]||(t[1]=l=>se()),modelValue:"创建角色",buttonType:"primary"})])]),e.createElementVNode("div",Vt,[e.createElementVNode("div",gt,[e.createVNode(ze,{class:"role-table",data:ae.value,"empty-text":""},{default:e.withCtx(()=>[e.createVNode(D,{prop:"name",label:"名称",align:"center"}),e.createVNode(D,{prop:"code",label:"编码",align:"center"}),e.createVNode(D,{prop:"remark",label:"备注",align:"center"}),e.createVNode(D,{prop:"status",label:"状态",align:"center"},{default:e.withCtx(l=>[e.createVNode(S,{class:"status-tag",type:e.unref(K)(l.row.status),title:"点击切换",onClick:r=>Pe(l.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)(l.row.status)),1)]),_:2},1032,["type","onClick"])]),_:1}),e.createVNode(D,{label:"操作",align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N.operateList),r=>(e.openBlock(),e.createElementBlock("div",{class:"operate-item",key:r.value,onClick:e.withModifiers(Z=>Le(r,l),["stop"])},e.toDisplayString(r.label),9,Ct))),128))])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Nt,[t[12]||(t[12]=e.createElementVNode("div",null,null,-1)),e.createVNode(Ue,{onSizeChange:Ne,onCurrentChange:Ce,"current-page":(ue=e.unref(_))==null?void 0:ue.pageNum,"page-sizes":(pe=e.unref(_))==null?void 0:pe.pageSizes,"page-size":((me=e.unref(_))==null?void 0:me.pageSize)??10,layout:"total, sizes, prev, pager, next, jumper",total:((_e=e.unref(_))==null?void 0:_e.total)??0},null,8,["current-page","page-sizes","page-size","total"])])]),t[13]||(t[13]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))]),e.createVNode(oe.ssDialog,{class:"role-edit-dialog",visible:H.value,title:"角色信息",onBeforeDestroy:ne,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[t[17]||(t[17]=e.createElementVNode("div",{class:"role-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",wt,[e.createElementVNode("div",kt,[e.createVNode(Ke,{class:"role-edit-form",ref_key:"roleFormRef",ref:le,model:n.value,rules:we},{default:e.withCtx(()=>[e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{prop:"name",label:"角色名称","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.name,"onUpdate:modelValue":t[2]||(t[2]=l=>n.value.name=l),"aria-label":"角色名称",placeholder:"角色名称"},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"角色编码","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.code,"onUpdate:modelValue":t[3]||(t[3]=l=>n.value.code=l),"aria-label":"角色编码",placeholder:"角色编码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"备注","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.remark,"onUpdate:modelValue":t[4]||(t[4]=l=>n.value.remark=l),"aria-label":"备注",placeholder:"备注"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{class:"auth-tree-row",gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:24},{default:e.withCtx(()=>[e.createVNode(F,{label:"特性权限","label-position":"top"},{default:e.withCtx(()=>[e.createElementVNode("div",Et,[e.createVNode(a,{modelValue:q.value,"onUpdate:modelValue":t[5]||(t[5]=l=>q.value=l)},{prefix:e.withCtx(()=>[e.createVNode(V,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.search_default))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(Me,{ref_key:"propertyTreeRef",ref:I,class:"auth-tree",data:e.unref(m),props:E,"node-key":"id","show-checkbox":"","default-expanded-keys":n.value.checked_ids,"default-checked-keys":n.value.checked_ids,"filter-node-method":ke},{default:e.withCtx(({node:l,data:r})=>{var Z;return[e.createElementVNode("div",xt,[e.createElementVNode("div",bt,[e.createElementVNode("div",Tt,e.toDisplayString(l.label),1)]),r.isPropertyLeaf&&J(r)?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(S,{class:"status-tag",type:e.unref(G)(r.status),title:"点击切换",onClick:x=>$e(x,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(j)(r.status)),1)]),_:2},1032,["type","onClick"])])):e.createCommentVNode("",!0),r.isProperty&&J(r)&&((Z=r.params)==null?void 0:Z.length)>0?(e.openBlock(),e.createElementBlock("div",Bt,[e.createVNode(S,{class:"status-tag",type:"success",onClick:x=>Ee(x,r)},{default:e.withCtx(()=>t[14]||(t[14]=[e.createTextVNode(" 参数设置 ")])),_:2,__:[14]},1032,["onClick"])])):e.createCommentVNode("",!0),r.isPropertyLeaf&&J(r)&&e.unref(fe)(r)?(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[15]||(t[15]=[e.createTextVNode(" 数据权限 ")])),_:2,__:[15]},1032,["onClick"])])):e.createCommentVNode("",!0),l.level==1&&l.checked&&!r.isProperty?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[16]||(t[16]=[e.createTextVNode(" 数据权限重置 ")])),_:2,__:[16]},1032,["onClick"])])):e.createCommentVNode("",!0)])]}),_:1},8,["data","default-expanded-keys","default-checked-keys"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lt,[t[18]||(t[18]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",$t,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:ie,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:Te,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]),e.createVNode(lt,{ref_key:"paramAuthDialog",ref:R,params:re.value,"checked-params":n.value.params,onUpdateParams:xe},null,8,["params","checked-params"]),e.createVNode(ut,{ref_key:"scopeDialog",ref:ce,onConfirm:Ie},null,512)],64)}}}),qt=z._export_sfc(It,[["__scopeId","data-v-5da1e93d"]]);exports.default=qt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./request-Dl8yi2iS.cjs"),N=require("./index-dAoOU6TR.cjs"),L=require("./index-xN3pvlzo.cjs"),oe=require("./index-B-pflqKE.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BzLhfrPk.cjs");require("./index-D_9JR2Ks.cjs");require("./index-BpPyaNFa.cjs");const b=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-BMofVGXk.cjs");require("./index-CGdHW3ql.cjs");const z=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),te=require("./clone-D92QCGo2.cjs"),je={class:"param-auth"},Ge={class:"body"},Qe={class:"node-content-wrapper"},He={class:"node-label-wrapper"},Je={class:"node-label"},We=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},setup($,{expose:E}){const c=$,y={value:"uniqueKey",label:"label",children:"children",class:f=>{}},{buildParamAuthTree:g}=N.useRole(),p=e.ref(),w=e.computed(()=>g(c.params)),i=e.computed(()=>c.checkedParams.map(f=>`${f.id}_${f.prop}`));return E({getCheckedParams:()=>{var d;return((d=p.value)==null?void 0:d.getCheckedNodes())||[]}}),(f,d)=>{const v=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",je,[d[0]||(d[0]=e.createElementVNode("div",{class:"header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ge,[e.createVNode(v,{ref_key:"paramTreeRef",ref:p,class:"param-tree",data:w.value,props:y,"node-key":"uniqueKey","show-checkbox":"","default-expanded-keys":i.value,"default-checked-keys":i.value,height:"100%"},{default:e.withCtx(({node:u,data:P})=>[e.createElementVNode("div",Qe,[e.createElementVNode("div",He,[e.createElementVNode("div",Je,e.toDisplayString(u.label),1)])])]),_:1},8,["data","default-expanded-keys","default-checked-keys"])]),d[1]||(d[1]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))])}}}),Xe=z._export_sfc(We,[["__scopeId","data-v-b7ce5c18"]]),Ye={class:"param-wrapper"},Ze={class:"param-body"},et={class:"role-form-wrapper"},tt={class:"edit-footer"},ot={class:"footer-right"},at=e.defineComponent({__name:"index",props:{params:{},checkedParams:{}},emits:["updateParams"],setup($,{expose:E,emit:c}){const y=c,g=e.ref(),p=e.ref(!1),w=()=>{p.value=!0},i=()=>{p.value=!1},_=()=>{i()},f=()=>{const v=d();y("updateParams",v),i()},d=()=>{var u;return((u=g.value)==null?void 0:u.getCheckedParams())||[]};return E({openEditDialog:w}),(v,u)=>(e.openBlock(),e.createBlock(oe.ssDialog,{class:"param-edit-dialog",visible:p.value,title:"参数权限",onBeforeDestroy:i,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",Ye,[u[0]||(u[0]=e.createElementVNode("div",{class:"param-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Ze,[e.createElementVNode("div",et,[e.createVNode(Xe,{ref_key:"paramAuthTree",ref:g,params:v.params,"checked-params":v.checkedParams},null,8,["params","checked-params"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",tt,[u[1]||(u[1]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ot,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:_,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:f,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]))}}),lt=z._export_sfc(at,[["__scopeId","data-v-875ed466"]]),rt={class:"scope-management-wrapper"},nt={class:"scope-management-body"},st={class:"scope-form-wrapper"},it={class:"edit-footer"},ct={class:"footer-right"},dt=e.defineComponent({__name:"index",emits:["confirm"],setup($,{expose:E,emit:c}){const y=c,{initDepartmentScope:g}=L.useDataPermission(),p=e.ref(),w=e.reactive({departmentScope:[{required:!0,message:"请输入角色名称",trigger:"change"}]}),i=e.ref(g()),_=e.ref(!1),f=()=>{_.value=!0},d=()=>{_.value=!1},v=async h=>{i.value=te.clone(h),f()},u=()=>{i.value=g(),d()},P=async()=>{var h,m;await((m=(h=p.value)==null?void 0:h.validate)==null?void 0:m.call(h)),y("confirm",te.clone(i.value)),u()};return E({handleEdit:v}),(h,m)=>{const U=e.resolveComponent("el-radio"),M=e.resolveComponent("el-radio-group"),K=e.resolveComponent("el-form-item"),j=e.resolveComponent("el-col"),G=e.resolveComponent("el-row"),Q=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(oe.ssDialog,{class:"scope-edit-dialog",visible:_.value,title:"数据权限",onBeforeDestroy:d,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"scope-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",rt,[m[1]||(m[1]=e.createElementVNode("div",{class:"scope-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",nt,[e.createElementVNode("div",st,[e.createVNode(Q,{class:"scope-edit-form",ref_key:"scopeFormRef",ref:p,model:i.value,rules:w},{default:e.withCtx(()=>[e.createVNode(G,{gutter:20},{default:e.withCtx(()=>[e.createVNode(j,{span:24},{default:e.withCtx(()=>[e.createVNode(K,{prop:"departmentScope",label:"部门权限范围","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(M,{modelValue:i.value.departmentScope,"onUpdate:modelValue":m[0]||(m[0]=C=>i.value.departmentScope=C)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(L.departmentScopeOptions),C=>(e.openBlock(),e.createBlock(U,{key:C.value,value:C.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",it,[m[2]||(m[2]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",ct,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:u,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:P,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"])}}}),ut=z._export_sfc(dt,[["__scopeId","data-v-40d37c72"]]),pt={class:"role-management"},mt={class:"header"},_t={class:"header-left"},ft={class:"query-wrapper"},vt={class:"header-right"},Vt={class:"body"},gt={class:"role-table-wrapper"},ht={class:"operate-list"},Ct=["onClick"],Nt={class:"pagination-wrapper"},yt={class:"role-management-wrapper"},wt={class:"role-management-body"},kt={class:"role-form-wrapper"},Et={class:"auth-tree-wrapper"},xt={class:"node-content-wrapper"},bt={class:"node-label-wrapper"},Tt={class:"node-label"},Pt={key:0,class:"status-tag"},Bt={key:1,class:"status-tag"},Dt={key:2,class:"status-tag"},St={key:3,class:"status-tag"},Lt={class:"edit-footer"},$t={class:"footer-right"},It=e.defineComponent({__name:"index",setup($){const E={value:"id",label:"label",children:"children"},c=L.useMenuState(L.pinia),{initDepartmentScope:y,recAndInitNodeDataPermission:g}=L.useDataPermission(),{initRoleItem:p,queryInfo:w,resetQuery:i,pageInfo:_,setPageNum:f,setPageSize:d,initGetByPage:v,initCreate:u,initUpdate:P,initDelete:h,propertyAuthTree:m,initPropertyAuthTree:U,getStatusLabelByValue:M,getStatusTagByValue:K,getFeatureStatusLabelByValue:j,getFeatureStatusTagByValue:G,initRoleConfig:Q,hasRoleEditAuth:C,isTableFeature:fe,initImport:ve,initExport:Ve,exportTemplate:ge}=N.useRole(),ae=e.ref([]),he=async()=>{const o=await v(),{roleData:t=[]}=o;return t},B=async()=>{ae.value=await he()},Ce=o=>{f(o),B()},Ne=o=>{d(o),B()},ye=async()=>{i(),c.setImportLoading(!0),await B().finally(()=>{c.setImportLoading(!1)})},T=async()=>{await B(),await Q()};e.onMounted(()=>{T()});const le=e.ref(),we=e.reactive({name:[{required:!0,message:"请输入角色名称",trigger:"blur"}]}),I=e.ref(),q=e.ref(""),n=e.ref(p());e.watch(q,o=>{I.value.filter(o)});const ke=(o,t)=>o?t.label.includes(o):!0,re=e.ref([]),R=e.ref(),Ee=(o,t)=>{var a;o.stopPropagation(),re.value=t.params||[],(a=R==null?void 0:R.value)==null||a.openEditDialog()},xe=o=>{var s;const t=(s=o==null?void 0:o[0])==null?void 0:s.id,a=n.value.params.filter(V=>V.id!==t);n.value.params=[...a,...o]},H=e.ref(!1),be=()=>{H.value=!0},ne=()=>{q.value="",H.value=!1},se=async o=>{if(!C.value)return;const t=[];o&&t.push(o.role_id),await U(t);let a={};o!=null&&o.role_id||(a={checkAll:!0,tree:m.value}),n.value=p(o,a),be()},ie=()=>{n.value=p(),ne()},Te=async()=>{var a,s,V;await((s=(a=le.value)==null?void 0:a.validate)==null?void 0:s.call(a));let o=((V=I.value)==null?void 0:V.getCheckedNodes())||[];o=o.filter(k=>k.isPropertyLeaf),o=o.map(k=>{const{departmentScope:X}=k.dataPermission||{};return{...k,department_scope:X}}),n.value.main_ids=o;const{role_id:t}=n.value;t?await De():await Be(),ie()},Pe=async o=>{if(!C.value)return;const{status:t}=o;N.statusConstants.ENABLE.value===t?o.status=N.statusConstants.DISABLED.value:o.status=N.statusConstants.ENABLE.value,await P(o),await T()},Be=async()=>{await u(n.value),await T()},De=async()=>{await P(n.value),await T()},Se=async o=>{await h(o),await T()},Le=async(o,t)=>{if(!C.value)return;const{value:a}=o,s=t.row;if(a==="edit"){se(s);return}if(a==="delete"){await Se(s);return}},$e=async(o,t)=>{o.stopPropagation();const{status:a}=t;N.featureStatusConstants.EDITABLE.value===a?t.status=N.featureStatusConstants.DISABLED.value:t.status=N.featureStatusConstants.EDITABLE.value},J=o=>{var a;return(((a=I.value)==null?void 0:a.getCheckedKeys(!0))||[]).includes(o.id)},ce=e.ref(),A=e.ref(),W=e.ref(y()),de=(o,t)=>{var a;o.stopPropagation(),A.value=t,t.isPropertyLeaf&&(W.value=te.clone(t.dataPermission)),t.isProperty||(W.value=y("")),(a=ce.value)==null||a.handleEdit(W.value)},Ie=o=>{const{isProperty:t,isPropertyLeaf:a}=A.value;if(a){A.value.dataPermission=o;return}if(!t){g(A.value,o);return}},qe=async()=>{await Re()},Re=async()=>{const o=document.createElement("input");o.type="file",o.accept=".xlsx",o.onchange=async t=>{var V;const s=(V=t.target.files)==null?void 0:V[0];if(s)try{c.setImportLoading(!0),await ve(s),await T(),c.setImportLoading(!1)}catch{c.setImportLoading(!1)}},o.click()},Ae=async()=>{c.setImportLoading(!0),await Ve().finally(()=>{c.setImportLoading(!1)})},Fe=async()=>{ge()};return(o,t)=>{var ue,pe,me,_e;const a=e.resolveComponent("el-input"),s=e.resolveComponent("el-button"),V=e.resolveComponent("el-icon"),k=e.resolveComponent("el-dropdown-item"),X=e.resolveComponent("el-dropdown-menu"),Oe=e.resolveComponent("el-dropdown"),D=e.resolveComponent("el-table-column"),S=e.resolveComponent("el-tag"),ze=e.resolveComponent("el-table"),Ue=e.resolveComponent("el-pagination"),F=e.resolveComponent("el-form-item"),O=e.resolveComponent("el-col"),Y=e.resolveComponent("el-row"),Me=e.resolveComponent("el-tree"),Ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("div",_t,[e.createElementVNode("div",ft,[e.createVNode(a,{modelValue:e.unref(w).name,"onUpdate:modelValue":t[0]||(t[0]=l=>e.unref(w).name=l),style:{width:"240px"},placeholder:"请输入名称"},null,8,["modelValue"]),e.createVNode(s,{type:"primary",onClick:B},{default:e.withCtx(()=>t[6]||(t[6]=[e.createTextVNode("查询")])),_:1,__:[6]}),e.createVNode(s,{type:"primary",plain:"",onClick:ye},{default:e.withCtx(()=>t[7]||(t[7]=[e.createTextVNode("重置")])),_:1,__:[7]})])]),e.createElementVNode("div",vt,[e.createVNode(s,{type:"primary",onClick:qe},{default:e.withCtx(()=>[t[8]||(t[8]=e.createTextVNode(" 导入 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.upload_default))]),_:1})]),_:1,__:[8]}),e.createVNode(Oe,null,{dropdown:e.withCtx(()=>[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(k,{onClick:Fe},{default:e.withCtx(()=>t[10]||(t[10]=[e.createTextVNode("导出模板")])),_:1,__:[10]}),e.createVNode(k,{onClick:Ae},{default:e.withCtx(()=>t[11]||(t[11]=[e.createTextVNode("导出数据")])),_:1,__:[11]})]),_:1})]),default:e.withCtx(()=>[e.createVNode(s,{type:"primary"},{default:e.withCtx(()=>[t[9]||(t[9]=e.createTextVNode(" 导出 ")),e.createVNode(V,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.arrow_down_default))]),_:1})]),_:1,__:[9]})]),_:1}),e.createVNode(b._sfc_main,{emptyColor:!0,onClickTrigger:t[1]||(t[1]=l=>se()),modelValue:"创建角色",buttonType:"primary"})])]),e.createElementVNode("div",Vt,[e.createElementVNode("div",gt,[e.createVNode(ze,{class:"role-table",data:ae.value,"empty-text":""},{default:e.withCtx(()=>[e.createVNode(D,{prop:"name",label:"名称",align:"center"}),e.createVNode(D,{prop:"code",label:"编码",align:"center"}),e.createVNode(D,{prop:"remark",label:"备注",align:"center"}),e.createVNode(D,{prop:"status",label:"状态",align:"center"},{default:e.withCtx(l=>[e.createVNode(S,{class:"status-tag",type:e.unref(K)(l.row.status),title:"点击切换",onClick:r=>Pe(l.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(M)(l.row.status)),1)]),_:2},1032,["type","onClick"])]),_:1}),e.createVNode(D,{label:"操作",align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(N.operateList),r=>(e.openBlock(),e.createElementBlock("div",{class:"operate-item",key:r.value,onClick:e.withModifiers(Z=>Le(r,l),["stop"])},e.toDisplayString(r.label),9,Ct))),128))])]),_:1})]),_:1},8,["data"])]),e.createElementVNode("div",Nt,[t[12]||(t[12]=e.createElementVNode("div",null,null,-1)),e.createVNode(Ue,{onSizeChange:Ne,onCurrentChange:Ce,"current-page":(ue=e.unref(_))==null?void 0:ue.pageNum,"page-sizes":(pe=e.unref(_))==null?void 0:pe.pageSizes,"page-size":((me=e.unref(_))==null?void 0:me.pageSize)??10,layout:"total, sizes, prev, pager, next, jumper",total:((_e=e.unref(_))==null?void 0:_e.total)??0},null,8,["current-page","page-sizes","page-size","total"])])]),t[13]||(t[13]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1))]),e.createVNode(oe.ssDialog,{class:"role-edit-dialog",visible:H.value,title:"角色信息",onBeforeDestroy:ne,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"role-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",yt,[t[17]||(t[17]=e.createElementVNode("div",{class:"role-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",wt,[e.createElementVNode("div",kt,[e.createVNode(Ke,{class:"role-edit-form",ref_key:"roleFormRef",ref:le,model:n.value,rules:we},{default:e.withCtx(()=>[e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{prop:"name",label:"角色名称","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.name,"onUpdate:modelValue":t[2]||(t[2]=l=>n.value.name=l),"aria-label":"角色名称",placeholder:"角色名称"},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"角色编码","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.code,"onUpdate:modelValue":t[3]||(t[3]=l=>n.value.code=l),"aria-label":"角色编码",placeholder:"角色编码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:12},{default:e.withCtx(()=>[e.createVNode(F,{label:"备注","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:n.value.remark,"onUpdate:modelValue":t[4]||(t[4]=l=>n.value.remark=l),"aria-label":"备注",placeholder:"备注"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(Y,{class:"auth-tree-row",gutter:20},{default:e.withCtx(()=>[e.createVNode(O,{span:24},{default:e.withCtx(()=>[e.createVNode(F,{label:"特性权限","label-position":"top"},{default:e.withCtx(()=>[e.createElementVNode("div",Et,[e.createVNode(a,{modelValue:q.value,"onUpdate:modelValue":t[5]||(t[5]=l=>q.value=l)},{prefix:e.withCtx(()=>[e.createVNode(V,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.search_default))]),_:1})]),_:1},8,["modelValue"]),e.createVNode(Me,{ref_key:"propertyTreeRef",ref:I,class:"auth-tree",data:e.unref(m),props:E,"node-key":"id","show-checkbox":"","default-expanded-keys":n.value.checked_ids,"default-checked-keys":n.value.checked_ids,"filter-node-method":ke},{default:e.withCtx(({node:l,data:r})=>{var Z;return[e.createElementVNode("div",xt,[e.createElementVNode("div",bt,[e.createElementVNode("div",Tt,e.toDisplayString(l.label),1)]),r.isPropertyLeaf&&J(r)?(e.openBlock(),e.createElementBlock("div",Pt,[e.createVNode(S,{class:"status-tag",type:e.unref(G)(r.status),title:"点击切换",onClick:x=>$e(x,r)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(j)(r.status)),1)]),_:2},1032,["type","onClick"])])):e.createCommentVNode("",!0),r.isProperty&&J(r)&&((Z=r.params)==null?void 0:Z.length)>0?(e.openBlock(),e.createElementBlock("div",Bt,[e.createVNode(S,{class:"status-tag",type:"success",onClick:x=>Ee(x,r)},{default:e.withCtx(()=>t[14]||(t[14]=[e.createTextVNode(" 参数设置 ")])),_:2,__:[14]},1032,["onClick"])])):e.createCommentVNode("",!0),r.isPropertyLeaf&&J(r)&&e.unref(fe)(r)?(e.openBlock(),e.createElementBlock("div",Dt,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[15]||(t[15]=[e.createTextVNode(" 数据权限 ")])),_:2,__:[15]},1032,["onClick"])])):e.createCommentVNode("",!0),l.level==1&&l.checked&&!r.isProperty?(e.openBlock(),e.createElementBlock("div",St,[e.createVNode(S,{class:"status-tag",type:"warning",onClick:x=>de(x,r)},{default:e.withCtx(()=>t[16]||(t[16]=[e.createTextVNode(" 数据权限重置 ")])),_:2,__:[16]},1032,["onClick"])])):e.createCommentVNode("",!0)])]}),_:1},8,["data","default-expanded-keys","default-checked-keys"])])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",Lt,[t[18]||(t[18]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",$t,[e.createVNode(b._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:ie,modelValue:"取消",buttonType:"info"}),e.createVNode(b._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:Te,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"]),e.createVNode(lt,{ref_key:"paramAuthDialog",ref:R,params:re.value,"checked-params":n.value.params,onUpdateParams:xe},null,8,["params","checked-params"]),e.createVNode(ut,{ref_key:"scopeDialog",ref:ce,onConfirm:Ie},null,512)],64)}}}),qt=z._export_sfc(It,[["__scopeId","data-v-5da1e93d"]]);exports.default=qt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),w=require("./index-xN3pvlzo.cjs"),Ze=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-87Te47Zq.cjs");const He=require("./request-Dl8yi2iS.cjs"),me=require("./index-B-pflqKE.cjs"),et=require("./index-CzELqSBx.cjs"),tt=require("vue-router"),ge=require("./index-DKh4EyHV.cjs"),K=require("./index-DmwxzDGW.cjs"),ot=require("./index-B3MCUfK8.cjs"),lt=require("./menuIndex-8KYc1zS9.cjs"),ke=require("./index-B9MP9Z_h.cjs"),st=require("./index-CZuPznao.cjs"),it=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CzELqSBx.cjs")).then(r=>r.index));Se.install=r=>{r.component("ssMenu",Se)};const Me={__name:"index",props:{name:String},setup(r){const c=r,S=t.computed(()=>He.Icons[c.name]);return t.onMounted(()=>{}),(h,a)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.value)))]),_:1})}}},Ee=(r,c,S=0)=>{let h=r;return h!=null&&h.every(a=>Array.isArray(a))&&(h!=null&&h.every(a=>Array.isArray(a)&&a.length===1)?h=h==null?void 0:h.filter(a=>(a==null?void 0:a[0])!==(c==null?void 0:c[S])):h=h==null?void 0:h.map(a=>{if(a!=null&&a.find(l=>l===(c==null?void 0:c[S]))&&(c==null?void 0:c.length)!==1){let l=w.cloneDeep(c),n=a==null?void 0:a.filter(C=>C!==(l==null?void 0:l[S])),I=S+1,M=Ee(n,l,I),b=[];b.push(a==null?void 0:a[0]),M==null||M.forEach(C=>{b.push(C)}),a=b}return a})),h},xe=(r,c,S,h=0)=>{let a=r;return a!=null&&a.every(l=>Array.isArray(l))&&(a!=null&&a.every(l=>Array.isArray(l)&&l.length===1)?a.push([S]):a=a==null?void 0:a.map(l=>{if(l!=null&&l.find(n=>n===(c==null?void 0:c[h]))&&(c==null?void 0:c.length)!==1){let n=w.cloneDeep(c),I=l==null?void 0:l.filter(E=>E!==(n==null?void 0:n[h])),M=h+1,b=xe(I,n,S,M),C=[];C.push(l==null?void 0:l[0]),b==null||b.forEach(E=>{C.push(E)}),l=C}return l})),a},be=(r,c,S,h,a=0)=>{let l=r;return l!=null&&l.every(n=>Array.isArray(n))&&(l!=null&&l.every(n=>Array.isArray(n)&&n.length===1)?l=l==null?void 0:l.map(n=>((n==null?void 0:n[0])===S&&(n=[h]),n)):l=l==null?void 0:l.map(n=>{if(n!=null&&n.find(I=>I===(c==null?void 0:c[a]))&&(c==null?void 0:c.length)!==1){let I=w.cloneDeep(c),M=n==null?void 0:n.filter(L=>L!==(I==null?void 0:I[a])),b=a+1,C=be(M,I,S,h,b),E=[];E.push(n==null?void 0:n[0]),C==null||C.forEach(L=>{E.push(L)}),n=E}return n})),l};function qe(r="menu"){return{name:r,components:{SvgIcon:Ze.SvgIcon,ssMenu:Se,DynamicIcon:Me,ssDialog:me.ssDialog,ssInput:et.ssInput},setup(c,{emit:S}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),a=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=w.useMenuState(),n=w.useModelComp(w.pinia),I=w.useLoginState(w.pinia),{loginUserInfo:M}=w.storeToRefs(I),b=t.ref(0),C=tt.useRouter(),E=t.ref(),{asideMenus:L,menuTriggerType:i,platform:ue}=w.storeToRefs(l),{fixMenuStatus:De}=w.storeToRefs(n),{isSuperAdmin:_e}=st.useRole(),Ie=t.computed(()=>h==null?void 0:h.mode),x=o=>o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=x(e.children)),e}),Be=t.computed(()=>{let o=[...L.value];if((o==null?void 0:o.length)===0)return C.push("/"),[];const s=Le(o,$e.value);return s.isFlag||(o=s==null?void 0:s.data),o=o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=x(e.children)),e}),o}),Ae=async(o,s)=>{n.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?C.push(o.path):C.push("/"),S("node-click",o,s)},Fe=async o=>{const s=lt.findNodeByPropInTree(Be.value,"path",o);l.setActiveAsideMenu(s),n.setRouteToChildPath(""),De.value?n.setFixMenuStatus(!1):(W.value&&(i.value="open"),i.value==="click"?l.setActiveMenuPath(o):W.value||(l.setMenuTriggerType("click"),l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?C.push(o):C.push("/"),b.value++},Ne=o=>{W.value||l.setActiveMenuPath(o)},z=o=>{const s=document.documentElement;o==null||o.forEach(e=>{s.style.setProperty(e.name,e.value)})};t.onMounted(()=>{b.value=1});const $e=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>ue.value,o=>{o==="browser"?z(ge.browserVerticalMenuClasses):o==="client"?(z(ge.clientHorizontalMenuClasses),z(ge.clientVerticalMenuClasses)):o==="three"&&(z(ge.threeHorizontalMenuClasses),z(ge.threeVerticalMenuClasses))},{immediate:!0});const Le=(o,s)=>({isFlag:!0}),U=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ue=o=>ot.getComponent(o),je=t.ref({}),Re=t.ref([]),Y=t.ref({}),J=t.ref({}),Pe=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},we=t.ref({}),Oe=o=>{l.setCacheInputMenu({type:U.type,data:o}),l.setIsRefreshMenus(!0)},Ke=async(o,s,e)=>{var p,v,k,R,B,G,A,Z,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce;if(s==="create"){let F=(e==null?void 0:e.title)+"(1)",$=(v=(p=e==null?void 0:e.path)==null?void 0:p.split("/"))==null?void 0:v.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}),N=await ke.getItemData((B=(R=(k=e==null?void 0:e.path)==null?void 0:k.split("/"))==null?void 0:R.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:B.join("/"),sessionStorage.getItem("systemKey"),"");if($.push(F),$=$==null?void 0:$.join("/"),(N==null?void 0:N.length)>0){let D=N==null?void 0:N[0],y=(A=(G=D==null?void 0:D.compData)==null?void 0:G.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:A.contents;if(((Z=y==null?void 0:y[0])==null?void 0:Z.directiveLabel)==="#isMain"){let u=(H=y==null?void 0:y[0])==null?void 0:H.prop,T=(ee=(m=D==null?void 0:D.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:ee.contents,P;T==null||T.forEach(_=>{var O,j;if(_.length===1)((O=_==null?void 0:_[0])==null?void 0:O[u])===(e==null?void 0:e.title)&&(P=_==null?void 0:_[0],P[u]=F);else{let d=(j=y==null?void 0:y.filter(f=>f!=="操作"))==null?void 0:j.map(f=>f==null?void 0:f.prop),V=_==null?void 0:_.filter(f=>!(f!=null&&f.id)),q=ke.getValueToObjectValue(V,d);q[u]=F,P=q}}),await K.createInsofDataApi({key:{type:"data",pageKey:(le=(oe=(te=e==null?void 0:e.path)==null?void 0:te.split("/"))==null?void 0:oe.filter((_,O)=>{var j,d;return O!==((d=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:d.length)-1}))==null?void 0:le.join("/"),tableId:D==null?void 0:D.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(se=M.value)==null?void 0:se.id,createUserLayer:((ie=M.value)==null?void 0:ie.dept)||((ae=M.value)==null?void 0:ae.部门名称)},value:{tableData:P}})}}await ke.newLoadingConstruct(e==null?void 0:e.path,$),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ce=(ne=(re=e==null?void 0:e.path)==null?void 0:re.split("/"))==null?void 0:ne.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:ce.join("/")),l.setActiveTopMenuPath((de=(pe=e==null?void 0:e.path)==null?void 0:pe.split("/"))==null?void 0:de[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(s==="update")E.value=e;else if(s==="delete"){let F=[];(F==null?void 0:F.length)>0&&await K.batchDeleteInsofDataApi({ids:F}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ve=(fe=(he=e==null?void 0:e.path)==null?void 0:he.split("/"))==null?void 0:fe.filter(($,N)=>{var D,y;return N!==((y=(D=e==null?void 0:e.path)==null?void 0:D.split("/"))==null?void 0:y.length)-1}))==null?void 0:ve.join("/")),l.setActiveTopMenuPath((Ce=(ye=e==null?void 0:e.path)==null?void 0:ye.split("/"))==null?void 0:Ce[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},ze=async(o,s)=>{var Z,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,F,$,N,D,y,u,T,P,_,O,j;let e=await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(H=(Z=e==null?void 0:e.data)==null?void 0:Z.result)==null?void 0:H[0],v=(m=p==null?void 0:p.value)==null?void 0:m.pageData;v.compData=(ee=v.compData)==null?void 0:ee.map(d=>{var V,q;return(d==null?void 0:d.key)==="menuContents"&&(d.contents=be(d.contents,(V=s==null?void 0:s.path)==null?void 0:V.split("/"),s==null?void 0:s.title,(q=o==null?void 0:o.target)==null?void 0:q.value)),d}),p!=null&&p.id&&await K.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:v}});let k=(oe=(te=s==null?void 0:s.path)==null?void 0:te.split("/"))==null?void 0:oe.filter((d,V)=>{var q,f;return V!==((f=(q=s==null?void 0:s.path)==null?void 0:q.split("/"))==null?void 0:f.length)-1}),R=k==null?void 0:k.join("/");k.push((le=o==null?void 0:o.target)==null?void 0:le.value),k=k==null?void 0:k.join("/");let B=await ke.getItemData(R,sessionStorage.getItem("systemKey"),"");if(((ne=(re=(ae=(ie=(se=B==null?void 0:B[0])==null?void 0:se.compData)==null?void 0:ie.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ae.contents)==null?void 0:re[0])==null?void 0:ne.directiveLabel)==="#isMain"){let d=(fe=(he=(de=(pe=(ce=B==null?void 0:B[0])==null?void 0:ce.compData)==null?void 0:pe.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:de.contents)==null?void 0:he[0])==null?void 0:fe.prop,V=(Ce=(ye=(ve=B==null?void 0:B[0])==null?void 0:ve.compData)==null?void 0:ye.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:Ce.contents,q=(D=(N=($=(F=B==null?void 0:B[0])==null?void 0:F.compData)==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:N.contents)==null?void 0:D.map(g=>g==null?void 0:g.prop),f;if(V==null||V.forEach(g=>{var X;let Q=ke.getValueToObjectValue(g,q);(Q==null?void 0:Q[d])===s.title&&(f=Q,f[d]=(X=o==null?void 0:o.target)==null?void 0:X.value)}),f){let g={};for(let X in f)X!=="id"&&(g[X]=f==null?void 0:f[X]);let Q=[{id:f==null?void 0:f.id,value:{tableData:g}}];await K.batchUpdateInsofDataApi({dataList:Q})}}let G=await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s==null?void 0:s.path}}),A=(u=(y=G==null?void 0:G.data)==null?void 0:y.result)==null?void 0:u.map(d=>({id:d==null?void 0:d.id,key:d==null?void 0:d.key}));A=A==null?void 0:A.map(d=>(d.key.pageKey=k,d)),(A==null?void 0:A.length)>0&&await K.batchUpdateInsofDataApi({dataList:A}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((_=(P=(T=s==null?void 0:s.path)==null?void 0:T.split("/"))==null?void 0:P.filter((d,V)=>{var q,f;return V!==((f=(q=s==null?void 0:s.path)==null?void 0:q.split("/"))==null?void 0:f.length)-1}))==null?void 0:_.join("/")),l.setActiveTopMenuPath((j=(O=s==null?void 0:s.path)==null?void 0:O.split("/"))==null?void 0:j[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),E.value=void 0},Je=async(o,s)=>{U.type=Pe(s==null?void 0:s.operateType),await Ke(s,U.type,o),J.value=o,we.value=s},We=()=>{U.show=!1},Ge=o=>o==null?void 0:o.filter(s=>s.allowInherit),Qe=()=>{var e,p,v,k,R;let o;U.type==="create"&&(o=((e=J.value)==null?void 0:e.path)+"/"+Y.value[(p=Y.value)==null?void 0:p.prop]),U.type==="update"&&(o=(v=J.value)==null?void 0:v.path);const s={...J.value,config:Ge((k=J.value)==null?void 0:k.config),children:[],childMenus:[],title:Y.value[(R=Y.value)==null?void 0:R.prop],path:o};console.log("clickSubmitForm",we.value,J.value,s),Oe(s),U.show=!1},Xe=o=>{var e,p;const s=(e=o==null?void 0:o.contents)==null?void 0:e.find(v=>v.key==="formContent");s&&(Y.value=(p=s==null?void 0:s.contents)==null?void 0:p.reduce((v,k)=>(v[k.key]=k.value,v.prop=k.key,v),{}))},W=t.ref(!1),Ye=()=>{W.value=!W.value},Te=t.ref(null);return t.watch(()=>L.value,async o=>{var s,e;if(o){await t.nextTick();const p=o==null?void 0:o[0];if(((s=p==null?void 0:p.children)==null?void 0:s.length)>0){const v=p==null?void 0:p.path;Te.value&&((e=Te.value)==null||e.openMenuRefByIndex(v))}else l.setActiveMenuPath((p==null?void 0:p.path)??"")}},{immediate:!0}),{menuRef:Te,isCollapse:W,handleMenuCollapse:Ye,handleCompChange:Xe,dialogForm:je,dialogRenderComps:Re,getComponents:Ue,clickSubmitForm:Qe,dialogInfo:U,beforeDialogDestroy:We,clickMenuIcon:Je,mode:Ie,renderMenuList:Be,clickMenu:Ae,openMenu:Fe,closeMenu:Ne,changeMenuStyle:z,fixElement:E,onBlur:ze,isSuperAdmin:_e}}}}const at=t.defineComponent(qe()),rt=["title"],nt={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},ct={key:2,class:"menu-operate-icon"},pt={class:"menu-config-wrap"},dt=["onClick"],ht={class:"module-dialog-content"};function ft(r,c,S,h,a,l){var L;const n=t.resolveComponent("ss-input"),I=t.resolveComponent("svg-icon"),M=t.resolveComponent("el-popover"),b=t.resolveComponent("ss-menu"),C=t.resolveComponent("el-button"),E=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(b,{ref:"menuRef",class:"vertical-menu",mode:r.mode,menuList:r.renderMenuList,isCollapse:r.isCollapse,uniqueOpened:!0,onClickMenu:r.clickMenu,onOpenMenu:r.openMenu,onCloseMenu:r.closeMenu},{title:t.withCtx(({menu:i})=>{var ue,De,_e,Ie;return[!r.fixElement||(i==null?void 0:i.path)!==((ue=r.fixElement)==null?void 0:ue.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:i.title,class:"menu-title",style:t.normalizeStyle({marginRight:i!=null&&i.config&&((De=i==null?void 0:i.config)==null?void 0:De.length)>0?"25px":"1px"})},t.toDisplayString(i.title??""),13,rt)):t.createCommentVNode("",!0),r.fixElement&&(i==null?void 0:i.path)===((_e=r.fixElement)==null?void 0:_e.path)?(t.openBlock(),t.createElementBlock("span",nt,[t.createVNode(n,{value:i.title,onBlur:x=>r.onBlur(x,i)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),i!=null&&i.config&&((Ie=i==null?void 0:i.config)==null?void 0:Ie.length)>0&&r.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",ct,[t.createVNode(M,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(I,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",pt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i==null?void 0:i.config,x=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:x.id,onClick:Be=>r.clickMenuIcon(i,x)},[t.createVNode(I,{name:x==null?void 0:x.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(x==null?void 0:x.operateType),1)],8,dt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((L=r.renderMenuList)==null?void 0:L.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:c[0]||(c[0]=(...i)=>r.handleMenuCollapse&&r.handleMenuCollapse(...i))},[t.createVNode(I,{name:r.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(E,{class:"module-dialog",title:r.dialogInfo.title,visible:r.dialogInfo.show,width:r.dialogInfo.width,onBeforeDestroy:r.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",ht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dialogRenderComps,i=>(t.openBlock(),t.createElementBlock("div",{key:i.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getComponents((i==null?void 0:i.comp)??"Input")),{itemData:i==null?void 0:i.compData,key:i==null?void 0:i.id,content:(i==null?void 0:i.contents)??[],config:i==null?void 0:i.config,onContentChange:r.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(C,{id:"themeBorderButton",onClick:r.beforeDialogDestroy},{default:t.withCtx(()=>c[1]||(c[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(C,{id:"themeButton",onClick:r.clickSubmitForm},{default:t.withCtx(()=>c[2]||(c[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Ve=it._export_sfc(at,[["render",ft],["__scopeId","data-v-a385ba2f"]]),vt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:xe,default:Ve,deleteSelectMenu:Ee,fixSelectMenu:be,setComponent:qe},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Me;exports.index=vt;exports.ssMenu=Se;exports.ssVMenu=Ve;
|
|
1
|
+
"use strict";const t=require("vue"),w=require("./index-xN3pvlzo.cjs"),Ze=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BzLhfrPk.cjs");const He=require("./request-Dl8yi2iS.cjs"),me=require("./index-B-pflqKE.cjs"),et=require("./index-C4qnDJ7y.cjs"),tt=require("vue-router"),ge=require("./index-DKh4EyHV.cjs"),K=require("./index-DmwxzDGW.cjs"),ot=require("./index-D_9JR2Ks.cjs"),lt=require("./menuIndex-8KYc1zS9.cjs"),ke=require("./index-BMofVGXk.cjs"),st=require("./index-dAoOU6TR.cjs"),it=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C4qnDJ7y.cjs")).then(r=>r.index));Se.install=r=>{r.component("ssMenu",Se)};const Me={__name:"index",props:{name:String},setup(r){const c=r,S=t.computed(()=>He.Icons[c.name]);return t.onMounted(()=>{}),(h,a)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.value)))]),_:1})}}},Ee=(r,c,S=0)=>{let h=r;return h!=null&&h.every(a=>Array.isArray(a))&&(h!=null&&h.every(a=>Array.isArray(a)&&a.length===1)?h=h==null?void 0:h.filter(a=>(a==null?void 0:a[0])!==(c==null?void 0:c[S])):h=h==null?void 0:h.map(a=>{if(a!=null&&a.find(l=>l===(c==null?void 0:c[S]))&&(c==null?void 0:c.length)!==1){let l=w.cloneDeep(c),n=a==null?void 0:a.filter(C=>C!==(l==null?void 0:l[S])),I=S+1,M=Ee(n,l,I),b=[];b.push(a==null?void 0:a[0]),M==null||M.forEach(C=>{b.push(C)}),a=b}return a})),h},xe=(r,c,S,h=0)=>{let a=r;return a!=null&&a.every(l=>Array.isArray(l))&&(a!=null&&a.every(l=>Array.isArray(l)&&l.length===1)?a.push([S]):a=a==null?void 0:a.map(l=>{if(l!=null&&l.find(n=>n===(c==null?void 0:c[h]))&&(c==null?void 0:c.length)!==1){let n=w.cloneDeep(c),I=l==null?void 0:l.filter(E=>E!==(n==null?void 0:n[h])),M=h+1,b=xe(I,n,S,M),C=[];C.push(l==null?void 0:l[0]),b==null||b.forEach(E=>{C.push(E)}),l=C}return l})),a},be=(r,c,S,h,a=0)=>{let l=r;return l!=null&&l.every(n=>Array.isArray(n))&&(l!=null&&l.every(n=>Array.isArray(n)&&n.length===1)?l=l==null?void 0:l.map(n=>((n==null?void 0:n[0])===S&&(n=[h]),n)):l=l==null?void 0:l.map(n=>{if(n!=null&&n.find(I=>I===(c==null?void 0:c[a]))&&(c==null?void 0:c.length)!==1){let I=w.cloneDeep(c),M=n==null?void 0:n.filter(L=>L!==(I==null?void 0:I[a])),b=a+1,C=be(M,I,S,h,b),E=[];E.push(n==null?void 0:n[0]),C==null||C.forEach(L=>{E.push(L)}),n=E}return n})),l};function qe(r="menu"){return{name:r,components:{SvgIcon:Ze.SvgIcon,ssMenu:Se,DynamicIcon:Me,ssDialog:me.ssDialog,ssInput:et.ssInput},setup(c,{emit:S}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),a=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=w.useMenuState(),n=w.useModelComp(w.pinia),I=w.useLoginState(w.pinia),{loginUserInfo:M}=w.storeToRefs(I),b=t.ref(0),C=tt.useRouter(),E=t.ref(),{asideMenus:L,menuTriggerType:i,platform:ue}=w.storeToRefs(l),{fixMenuStatus:De}=w.storeToRefs(n),{isSuperAdmin:_e}=st.useRole(),Ie=t.computed(()=>h==null?void 0:h.mode),x=o=>o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=x(e.children)),e}),Be=t.computed(()=>{let o=[...L.value];if((o==null?void 0:o.length)===0)return C.push("/"),[];const s=Le(o,$e.value);return s.isFlag||(o=s==null?void 0:s.data),o=o==null?void 0:o.map(e=>{var p,v;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=a.value:e!=null&&e.children&&((v=e==null?void 0:e.children)==null?void 0:v.length)>0&&(e.children=x(e.children)),e}),o}),Ae=async(o,s)=>{n.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?C.push(o.path):C.push("/"),S("node-click",o,s)},Fe=async o=>{const s=lt.findNodeByPropInTree(Be.value,"path",o);l.setActiveAsideMenu(s),n.setRouteToChildPath(""),De.value?n.setFixMenuStatus(!1):(W.value&&(i.value="open"),i.value==="click"?l.setActiveMenuPath(o):W.value||(l.setMenuTriggerType("click"),l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?C.push(o):C.push("/"),b.value++},Ne=o=>{W.value||l.setActiveMenuPath(o)},z=o=>{const s=document.documentElement;o==null||o.forEach(e=>{s.style.setProperty(e.name,e.value)})};t.onMounted(()=>{b.value=1});const $e=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>ue.value,o=>{o==="browser"?z(ge.browserVerticalMenuClasses):o==="client"?(z(ge.clientHorizontalMenuClasses),z(ge.clientVerticalMenuClasses)):o==="three"&&(z(ge.threeHorizontalMenuClasses),z(ge.threeVerticalMenuClasses))},{immediate:!0});const Le=(o,s)=>({isFlag:!0}),U=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ue=o=>ot.getComponent(o),je=t.ref({}),Re=t.ref([]),Y=t.ref({}),J=t.ref({}),Pe=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},we=t.ref({}),Oe=o=>{l.setCacheInputMenu({type:U.type,data:o}),l.setIsRefreshMenus(!0)},Ke=async(o,s,e)=>{var p,v,k,R,B,G,A,Z,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce;if(s==="create"){let F=(e==null?void 0:e.title)+"(1)",$=(v=(p=e==null?void 0:e.path)==null?void 0:p.split("/"))==null?void 0:v.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}),N=await ke.getItemData((B=(R=(k=e==null?void 0:e.path)==null?void 0:k.split("/"))==null?void 0:R.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:B.join("/"),sessionStorage.getItem("systemKey"),"");if($.push(F),$=$==null?void 0:$.join("/"),(N==null?void 0:N.length)>0){let D=N==null?void 0:N[0],y=(A=(G=D==null?void 0:D.compData)==null?void 0:G.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:A.contents;if(((Z=y==null?void 0:y[0])==null?void 0:Z.directiveLabel)==="#isMain"){let u=(H=y==null?void 0:y[0])==null?void 0:H.prop,T=(ee=(m=D==null?void 0:D.compData)==null?void 0:m.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:ee.contents,P;T==null||T.forEach(_=>{var O,j;if(_.length===1)((O=_==null?void 0:_[0])==null?void 0:O[u])===(e==null?void 0:e.title)&&(P=_==null?void 0:_[0],P[u]=F);else{let d=(j=y==null?void 0:y.filter(f=>f!=="操作"))==null?void 0:j.map(f=>f==null?void 0:f.prop),V=_==null?void 0:_.filter(f=>!(f!=null&&f.id)),q=ke.getValueToObjectValue(V,d);q[u]=F,P=q}}),await K.createInsofDataApi({key:{type:"data",pageKey:(le=(oe=(te=e==null?void 0:e.path)==null?void 0:te.split("/"))==null?void 0:oe.filter((_,O)=>{var j,d;return O!==((d=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:d.length)-1}))==null?void 0:le.join("/"),tableId:D==null?void 0:D.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(se=M.value)==null?void 0:se.id,createUserLayer:((ie=M.value)==null?void 0:ie.dept)||((ae=M.value)==null?void 0:ae.部门名称)},value:{tableData:P}})}}await ke.newLoadingConstruct(e==null?void 0:e.path,$),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ce=(ne=(re=e==null?void 0:e.path)==null?void 0:re.split("/"))==null?void 0:ne.filter((D,y)=>{var u,T;return y!==((T=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:T.length)-1}))==null?void 0:ce.join("/")),l.setActiveTopMenuPath((de=(pe=e==null?void 0:e.path)==null?void 0:pe.split("/"))==null?void 0:de[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(s==="update")E.value=e;else if(s==="delete"){let F=[];(F==null?void 0:F.length)>0&&await K.batchDeleteInsofDataApi({ids:F}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((ve=(fe=(he=e==null?void 0:e.path)==null?void 0:he.split("/"))==null?void 0:fe.filter(($,N)=>{var D,y;return N!==((y=(D=e==null?void 0:e.path)==null?void 0:D.split("/"))==null?void 0:y.length)-1}))==null?void 0:ve.join("/")),l.setActiveTopMenuPath((Ce=(ye=e==null?void 0:e.path)==null?void 0:ye.split("/"))==null?void 0:Ce[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},ze=async(o,s)=>{var Z,H,m,ee,te,oe,le,se,ie,ae,re,ne,ce,pe,de,he,fe,ve,ye,Ce,F,$,N,D,y,u,T,P,_,O,j;let e=await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(H=(Z=e==null?void 0:e.data)==null?void 0:Z.result)==null?void 0:H[0],v=(m=p==null?void 0:p.value)==null?void 0:m.pageData;v.compData=(ee=v.compData)==null?void 0:ee.map(d=>{var V,q;return(d==null?void 0:d.key)==="menuContents"&&(d.contents=be(d.contents,(V=s==null?void 0:s.path)==null?void 0:V.split("/"),s==null?void 0:s.title,(q=o==null?void 0:o.target)==null?void 0:q.value)),d}),p!=null&&p.id&&await K.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:v}});let k=(oe=(te=s==null?void 0:s.path)==null?void 0:te.split("/"))==null?void 0:oe.filter((d,V)=>{var q,f;return V!==((f=(q=s==null?void 0:s.path)==null?void 0:q.split("/"))==null?void 0:f.length)-1}),R=k==null?void 0:k.join("/");k.push((le=o==null?void 0:o.target)==null?void 0:le.value),k=k==null?void 0:k.join("/");let B=await ke.getItemData(R,sessionStorage.getItem("systemKey"),"");if(((ne=(re=(ae=(ie=(se=B==null?void 0:B[0])==null?void 0:se.compData)==null?void 0:ie.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ae.contents)==null?void 0:re[0])==null?void 0:ne.directiveLabel)==="#isMain"){let d=(fe=(he=(de=(pe=(ce=B==null?void 0:B[0])==null?void 0:ce.compData)==null?void 0:pe.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:de.contents)==null?void 0:he[0])==null?void 0:fe.prop,V=(Ce=(ye=(ve=B==null?void 0:B[0])==null?void 0:ve.compData)==null?void 0:ye.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:Ce.contents,q=(D=(N=($=(F=B==null?void 0:B[0])==null?void 0:F.compData)==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:N.contents)==null?void 0:D.map(g=>g==null?void 0:g.prop),f;if(V==null||V.forEach(g=>{var X;let Q=ke.getValueToObjectValue(g,q);(Q==null?void 0:Q[d])===s.title&&(f=Q,f[d]=(X=o==null?void 0:o.target)==null?void 0:X.value)}),f){let g={};for(let X in f)X!=="id"&&(g[X]=f==null?void 0:f[X]);let Q=[{id:f==null?void 0:f.id,value:{tableData:g}}];await K.batchUpdateInsofDataApi({dataList:Q})}}let G=await K.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s==null?void 0:s.path}}),A=(u=(y=G==null?void 0:G.data)==null?void 0:y.result)==null?void 0:u.map(d=>({id:d==null?void 0:d.id,key:d==null?void 0:d.key}));A=A==null?void 0:A.map(d=>(d.key.pageKey=k,d)),(A==null?void 0:A.length)>0&&await K.batchUpdateInsofDataApi({dataList:A}),l.setUpdateMenuStatus(!1),await w.verifyStructureDataToStore(),l.setActiveMenuPath((_=(P=(T=s==null?void 0:s.path)==null?void 0:T.split("/"))==null?void 0:P.filter((d,V)=>{var q,f;return V!==((f=(q=s==null?void 0:s.path)==null?void 0:q.split("/"))==null?void 0:f.length)-1}))==null?void 0:_.join("/")),l.setActiveTopMenuPath((j=(O=s==null?void 0:s.path)==null?void 0:O.split("/"))==null?void 0:j[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),E.value=void 0},Je=async(o,s)=>{U.type=Pe(s==null?void 0:s.operateType),await Ke(s,U.type,o),J.value=o,we.value=s},We=()=>{U.show=!1},Ge=o=>o==null?void 0:o.filter(s=>s.allowInherit),Qe=()=>{var e,p,v,k,R;let o;U.type==="create"&&(o=((e=J.value)==null?void 0:e.path)+"/"+Y.value[(p=Y.value)==null?void 0:p.prop]),U.type==="update"&&(o=(v=J.value)==null?void 0:v.path);const s={...J.value,config:Ge((k=J.value)==null?void 0:k.config),children:[],childMenus:[],title:Y.value[(R=Y.value)==null?void 0:R.prop],path:o};console.log("clickSubmitForm",we.value,J.value,s),Oe(s),U.show=!1},Xe=o=>{var e,p;const s=(e=o==null?void 0:o.contents)==null?void 0:e.find(v=>v.key==="formContent");s&&(Y.value=(p=s==null?void 0:s.contents)==null?void 0:p.reduce((v,k)=>(v[k.key]=k.value,v.prop=k.key,v),{}))},W=t.ref(!1),Ye=()=>{W.value=!W.value},Te=t.ref(null);return t.watch(()=>L.value,async o=>{var s,e;if(o){await t.nextTick();const p=o==null?void 0:o[0];if(((s=p==null?void 0:p.children)==null?void 0:s.length)>0){const v=p==null?void 0:p.path;Te.value&&((e=Te.value)==null||e.openMenuRefByIndex(v))}else l.setActiveMenuPath((p==null?void 0:p.path)??"")}},{immediate:!0}),{menuRef:Te,isCollapse:W,handleMenuCollapse:Ye,handleCompChange:Xe,dialogForm:je,dialogRenderComps:Re,getComponents:Ue,clickSubmitForm:Qe,dialogInfo:U,beforeDialogDestroy:We,clickMenuIcon:Je,mode:Ie,renderMenuList:Be,clickMenu:Ae,openMenu:Fe,closeMenu:Ne,changeMenuStyle:z,fixElement:E,onBlur:ze,isSuperAdmin:_e}}}}const at=t.defineComponent(qe()),rt=["title"],nt={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},ct={key:2,class:"menu-operate-icon"},pt={class:"menu-config-wrap"},dt=["onClick"],ht={class:"module-dialog-content"};function ft(r,c,S,h,a,l){var L;const n=t.resolveComponent("ss-input"),I=t.resolveComponent("svg-icon"),M=t.resolveComponent("el-popover"),b=t.resolveComponent("ss-menu"),C=t.resolveComponent("el-button"),E=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(b,{ref:"menuRef",class:"vertical-menu",mode:r.mode,menuList:r.renderMenuList,isCollapse:r.isCollapse,uniqueOpened:!0,onClickMenu:r.clickMenu,onOpenMenu:r.openMenu,onCloseMenu:r.closeMenu},{title:t.withCtx(({menu:i})=>{var ue,De,_e,Ie;return[!r.fixElement||(i==null?void 0:i.path)!==((ue=r.fixElement)==null?void 0:ue.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:i.title,class:"menu-title",style:t.normalizeStyle({marginRight:i!=null&&i.config&&((De=i==null?void 0:i.config)==null?void 0:De.length)>0?"25px":"1px"})},t.toDisplayString(i.title??""),13,rt)):t.createCommentVNode("",!0),r.fixElement&&(i==null?void 0:i.path)===((_e=r.fixElement)==null?void 0:_e.path)?(t.openBlock(),t.createElementBlock("span",nt,[t.createVNode(n,{value:i.title,onBlur:x=>r.onBlur(x,i)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),i!=null&&i.config&&((Ie=i==null?void 0:i.config)==null?void 0:Ie.length)>0&&r.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",ct,[t.createVNode(M,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(I,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",pt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i==null?void 0:i.config,x=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:x.id,onClick:Be=>r.clickMenuIcon(i,x)},[t.createVNode(I,{name:x==null?void 0:x.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(x==null?void 0:x.operateType),1)],8,dt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((L=r.renderMenuList)==null?void 0:L.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:c[0]||(c[0]=(...i)=>r.handleMenuCollapse&&r.handleMenuCollapse(...i))},[t.createVNode(I,{name:r.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(E,{class:"module-dialog",title:r.dialogInfo.title,visible:r.dialogInfo.show,width:r.dialogInfo.width,onBeforeDestroy:r.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",ht,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dialogRenderComps,i=>(t.openBlock(),t.createElementBlock("div",{key:i.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.getComponents((i==null?void 0:i.comp)??"Input")),{itemData:i==null?void 0:i.compData,key:i==null?void 0:i.id,content:(i==null?void 0:i.contents)??[],config:i==null?void 0:i.config,onContentChange:r.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(C,{id:"themeBorderButton",onClick:r.beforeDialogDestroy},{default:t.withCtx(()=>c[1]||(c[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(C,{id:"themeButton",onClick:r.clickSubmitForm},{default:t.withCtx(()=>c[2]||(c[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Ve=it._export_sfc(at,[["render",ft],["__scopeId","data-v-a385ba2f"]]),vt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:xe,default:Ve,deleteSelectMenu:Ee,fixSelectMenu:be,setComponent:qe},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Me;exports.index=vt;exports.ssMenu=Se;exports.ssVMenu=Ve;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as N, resolveComponent as Q, createBlock as q, openBlock as x, defineComponent as t0, computed as r2, watch as Y2, createElementBlock as z, createVNode as Z, withCtx as H, createElementVNode as a2, Fragment as k2, renderList as M2, withModifiers as Ge, normalizeClass as Ce, toDisplayString as B2, createSlots as ce, renderSlot as D2, nextTick as G0, onMounted as Ve, createTextVNode as T0, isRef as g9, isReactive as v9, toRaw as m9, createCommentVNode as J, onBeforeUnmount as F4, normalizeStyle as c0, resolveDynamicComponent as Et, normalizeProps as w9, guardReactiveProps as x9, unref as F0, mergeProps as L1, reactive as n6, inject as m6, withDirectives as p3, vShow as w6, watchEffect as et, onUnmounted as Jt, resolveDirective as b9, h as Ui, toRefs as _9 } from "vue";
|
|
2
|
-
import { a3 as y9, a4 as S9, I as i8, g as C9, a5 as k9, a6 as D9, a7 as O9, a0 as Ii, a8 as M9, a9 as T9, aa as z9, ab as P9, ac as qi, ad as Yi } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-
|
|
2
|
+
import { a3 as y9, a4 as S9, I as i8, g as C9, a5 as k9, a6 as D9, a7 as O9, a0 as Ii, a8 as M9, a9 as T9, aa as z9, ab as P9, ac as qi, ad as Yi } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-PnEFT3X7.js";
|
|
3
3
|
import { _ as L2 } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import { S as Wt } from "./index-BHtNKL1L.js";
|
|
5
5
|
import { o as n8, q as s8, E as Fe, s as K4, p as K6, m as V9, ay as A9, ap as E9, aq as B9, ax as L9, b as H9 } from "./request-XJsZ4h2T.js";
|
|
6
6
|
import { ab as G9, ac as Fi, a as X4, p as Bt, s as Ut, u as Q4, c as K0, a9 as Be, e as o8, a6 as O3, i as R9, t as N9 } from "./index-BK-oz1IK.js";
|
|
7
7
|
import { _ as Y0 } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
8
|
-
import {
|
|
8
|
+
import { m as Ki, B as $9, X as l8 } from "./index-5zBx2xab.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { s as J4 } from "./index-11kpzK0A.js";
|
|
11
|
-
import { T as Xi, a as j9 } from "./threeViewerHost-
|
|
12
|
-
import { A as W9 } from "./index-
|
|
11
|
+
import { T as Xi, a as j9 } from "./threeViewerHost-oZOwIdFN.js";
|
|
12
|
+
import { A as W9 } from "./index-BMbjyksn.js";
|
|
13
13
|
var U9 = "[object Date]";
|
|
14
14
|
function I9(n) {
|
|
15
15
|
return n8(n) && s8(n) == U9;
|
|
@@ -24048,7 +24048,7 @@ const JC = { class: "signature-wrap" }, ZC = { class: "signature-types" }, ek =
|
|
|
24048
24048
|
]);
|
|
24049
24049
|
};
|
|
24050
24050
|
}
|
|
24051
|
-
}), bk = /* @__PURE__ */ L2(xk, [["__scopeId", "data-v-
|
|
24051
|
+
}), bk = /* @__PURE__ */ L2(xk, [["__scopeId", "data-v-8a785888"]]), _k = {
|
|
24052
24052
|
LINK: Bp,
|
|
24053
24053
|
TAG: Lp,
|
|
24054
24054
|
AVATARUPLOAD: W9,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as x, ref as I, reactive as N, resolveComponent as v, createElementBlock as E, openBlock as U, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as h, toDisplayString as T, nextTick as z, Fragment as H, withDirectives as q, renderSlot as $, vShow as M } from "vue";
|
|
2
|
-
import { ae as V } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-
|
|
2
|
+
import { ae as V } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-PnEFT3X7.js";
|
|
3
3
|
import { ac as X, az as J, H as D, K as c, N as R, a3 as g } from "./request-XJsZ4h2T.js";
|
|
4
4
|
import { ad as K } from "./index-BK-oz1IK.js";
|
|
5
5
|
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|