ss-component-new 1.3.283 → 1.3.285
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-CZBprXNP.cjs → MTLLoader-CdxYhBAE.cjs} +1 -1
- package/dist/{MTLLoader-ByvO3xpX.js → MTLLoader-RsaYZtZ_.js} +1 -1
- package/dist/{OrbitControls-pu_IAkAV.cjs → OrbitControls-BNTHZN2P.cjs} +1 -1
- package/dist/{OrbitControls-gFOfDXco.js → OrbitControls-D4mDZcDl.js} +1 -1
- package/dist/{URDFLoader-CJmlsLyG.cjs → URDFLoader-B56WRl4z.cjs} +1 -1
- package/dist/{URDFLoader-DItN2Cwe.js → URDFLoader-BPNyxykV.js} +2 -2
- package/dist/{animationData-DCnGuqAH.js → animationData-D4Q3av_t.js} +3 -3
- package/dist/animationData-DiyxzUT8.cjs +1 -0
- package/dist/array-CpxgPs3a.cjs +1 -0
- package/dist/{array-B8KzZ5ux.js → array-DuZDl88A.js} +19 -18
- package/dist/clone-BrrxU6_J.js +8 -0
- package/dist/clone-Dn6v3xp6.cjs +1 -0
- package/dist/dayjs.min-DRU3LNcy.cjs +1 -0
- package/dist/dayjs.min-Dx_LN6Bu.js +366 -0
- package/dist/{eleIcon-BSJV_1ZM.js → eleIcon-BLNEA11T.js} +1 -1
- package/dist/{iconfont-DAGWcDwE.js → iconfont-DkmQztG1.js} +2 -2
- package/dist/{iconfont-Cgm0Wjk4.cjs → iconfont-Dq-DsQsx.cjs} +1 -1
- package/dist/icons/svg/softCancel.svg +1 -0
- package/dist/icons/svg/softConfirm.svg +1 -0
- package/dist/icons/svg/softRemove.svg +1 -0
- package/dist/index--6MSMD-8.cjs +1 -0
- package/dist/{index-Du7JJqdx.js → index--PidpjSy.js} +4 -3
- package/dist/index--ZVD8xbU.js +83 -0
- package/dist/{index-CDlw-J9H.js → index-8CZJn10Y.js} +2 -2
- package/dist/index-9I9R7yqt.cjs +15 -0
- package/dist/index-B6b9Lr8M.js +623 -0
- package/dist/{index-C0s4Fa0R.js → index-BEGr3hBb.js} +32 -31
- package/dist/index-BET-Jwi1.cjs +1 -0
- package/dist/index-BIV-s4QY.js +29 -0
- package/dist/{index-CHH8aozZ.js → index-BIkySu-W.js} +2 -2
- package/dist/index-BOHy6XZd.cjs +1 -0
- package/dist/{index-Bj-ss9u6.js → index-BcwDR57s.js} +2 -2
- package/dist/index-BdyYMxx4.cjs +1 -0
- package/dist/{index-DB9zlG2m.cjs → index-BeuuWlVO.cjs} +1 -1
- package/dist/index-BjZpJRk2.cjs +1 -0
- package/dist/index-BlAISTfa.cjs +1 -0
- package/dist/index-Bs0qreV1.cjs +1 -0
- package/dist/{index-_uOv3SVz.js → index-BsDMamej.js} +1 -1
- package/dist/{index-BkBMQfsT.js → index-C1dVsNLG.js} +1 -1
- package/dist/{index-CULs51Vg.js → index-C5bOtOIk.js} +4 -4
- package/dist/{index-UqJOpNhM.js → index-C7-Idrnv.js} +2 -2
- package/dist/index-C81Qb0f2.js +209 -0
- package/dist/index-CAcP6bx_.cjs +1 -0
- package/dist/index-CPFAai4T.cjs +2 -0
- package/dist/{index-K_IiVShj.js → index-CQS-NY65.js} +25 -24
- package/dist/index-CQcXApCn.cjs +1 -0
- package/dist/index-CUJ_cdPT.cjs +1 -0
- package/dist/{index-BjEIX08g.js → index-CV8QlXGI.js} +3 -3
- package/dist/index-CXgZFuTt.cjs +1 -0
- package/dist/{index-BZ_R-Jcp.js → index-CY_HG5Gj.js} +4 -4
- package/dist/index-Ca-FxCDv.cjs +1 -0
- package/dist/index-Cbb4eaBp.js +343 -0
- package/dist/{index-D02CK1_5.js → index-CdKgZ2A_.js} +22 -21
- package/dist/{index-KrjXZO_d.cjs → index-CdrBTtcu.cjs} +1 -1
- package/dist/{index-CPmO67dF.js → index-Cg7Mpfpj.js} +13 -13
- package/dist/{index-BZwKLYgT.cjs → index-CuHxF23O.cjs} +1 -1
- package/dist/{index-pCW3eQ8e.js → index-D-kGKttu.js} +15 -14
- package/dist/{index-Dr9e3mBT.js → index-D21dwfqO.js} +24 -24
- package/dist/index-D3qNUVY7.cjs +1 -0
- package/dist/{index-77VURUPj.cjs → index-DAwnZFmG.cjs} +1 -1
- package/dist/{index-Cy1XXdCZ.cjs → index-DLN6R2tJ.cjs} +1 -1
- package/dist/index-DTiolIgS.cjs +7 -0
- package/dist/{index-C8kDBsVW.js → index-DTsHI5xQ.js} +2 -2
- package/dist/index-DXWN-UJr.cjs +1 -0
- package/dist/{index-Cf5PK2bA.js → index-DXjgumn5.js} +5 -5
- package/dist/index-Df8bxCwR.js +665 -0
- package/dist/{index-B_rDLuPm.js → index-DfAmIlWW.js} +3355 -3351
- package/dist/{index-m6ZHCUtH.cjs → index-DiPWs_9n.cjs} +1 -1
- package/dist/{index-C2PJu8mA.js → index-DoEwWbTL.js} +1421 -1409
- package/dist/index-DsNHJYr-.cjs +1 -0
- package/dist/index-DtYkQPnf.cjs +1 -0
- package/dist/index-Dx0DeTSC.js +9370 -0
- package/dist/{index-B_CkJtn2.js → index-DxhNwr8X.js} +1 -1
- package/dist/{index-BusM6WrM.js → index-H_NM-ZF-.js} +2 -2
- package/dist/{index-D9SznbhK.js → index-JG59WTIq.js} +1 -1
- package/dist/index-QG4F5kTH.js +2755 -0
- package/dist/{index-CW0nTu7g.js → index-RSaGZhb3.js} +4 -4
- package/dist/index-W8p89C7t.cjs +1 -0
- package/dist/index-WTaP_KDd.cjs +1 -0
- package/dist/index-bPKGQ9bV.cjs +25 -0
- package/dist/{index-DpfXqgm2.js → index-cFt1QbzL.js} +33 -32
- package/dist/{index-B5tAsf_R.js → index-gFBtUdzh.js} +15 -14
- package/dist/{index-DVrEV4RS.cjs → index-mHmXlK2R.cjs} +1 -1
- package/dist/{index-wHrfokYf.cjs → index-qIpeOak9.cjs} +1 -1
- package/dist/index-vbxWL2yo.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-mXh6sJo_.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DBQ_-V1_.js} +130 -129
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-GxCgBV8k.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyDtD61.cjs} +327 -327
- package/dist/isNil-CjWwlQS3.js +6 -0
- package/dist/isNil-x28vo2CT.cjs +1 -0
- package/dist/{isString-BLBZkTvd.js → isString-BA9CJNsy.js} +1 -1
- package/dist/{main-DECFHBC8.cjs → main-Avmwy4Fu.cjs} +2 -2
- package/dist/{main-Dglgquls.js → main-Qn9bfEMh.js} +4 -4
- package/dist/menu-CtG1loFf.js +5637 -0
- package/dist/menu-Hdw0L-Y2.cjs +12 -0
- package/dist/{menuIndex-6Fi3NW3Q.js → menuIndex-DmS5cMwB.js} +44 -42
- package/dist/menuIndex-DqY0uteo.cjs +1 -0
- package/dist/{request-B3-w_S8Z.js → request-CoGtW0Ux.js} +60 -60
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +19 -18
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +13 -13
- package/dist/threeModel-Dr6PqFqA.cjs +1 -0
- package/dist/{threeModel-BpjWJsnX.js → threeModel-L66n6sW7.js} +5 -5
- package/dist/{threePreview-DeEknsco.js → threePreview-BwElOyqr.js} +5 -5
- package/dist/threePreview-CWRtmSvh.cjs +1 -0
- package/dist/{threeSceneView-D5z_ADmg.js → threeSceneView-BEwen70K.js} +17 -15
- package/dist/{threeSceneView-C_ianMnn.cjs → threeSceneView-BpPiRRPf.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CMDrp7Du.js → threeSceneViewForCPMPIP-BIiU_5px.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-BicBhum7.cjs → threeSceneViewForCPMPIP-DpwlxGoP.cjs} +1 -1
- package/dist/{threeTrackPathView-DDKn5Z5k.js → threeTrackPathView-BckFDqUs.js} +6 -6
- package/dist/threeTrackPathView-CamXHHnK.cjs +1 -0
- package/dist/threeViewerHost-DLLTNlTR.cjs +1 -0
- package/dist/{threeViewerHost-BgN5No1S.js → threeViewerHost-DQz7pHM9.js} +3 -3
- package/dist/{urdfTree-DYLobS3F.js → urdfTree-B6GL3kgV.js} +1 -1
- package/dist/{urdfTree-ghaTIId6.cjs → urdfTree-DDQw6tEb.cjs} +1 -1
- package/dist/{workpieceTreePanel-BAu_7YB6.cjs → workpieceTreePanel-B6AVU13A.cjs} +1 -1
- package/dist/{workpieceTreePanel-PUhlo13O.js → workpieceTreePanel-BvO881iH.js} +4 -4
- package/package.json +1 -1
- package/public/icons/svg/softCancel.svg +1 -0
- package/public/icons/svg/softConfirm.svg +1 -0
- package/public/icons/svg/softRemove.svg +1 -0
- package/dist/animationData-CIM8_iu6.cjs +0 -1
- package/dist/array-DlgywTCo.cjs +0 -1
- package/dist/clone-BjZYQq33.cjs +0 -1
- package/dist/clone-XNy-gcwO.js +0 -8
- package/dist/index-5zdMes-B.cjs +0 -1
- package/dist/index-7aU_bwDz.js +0 -8959
- package/dist/index-9Q1_s4bE.cjs +0 -1
- package/dist/index-B3yoiLPJ.cjs +0 -1
- package/dist/index-BAGLBch9.cjs +0 -1
- package/dist/index-BB392QRk.js +0 -672
- package/dist/index-BBxu8MeT.js +0 -89
- package/dist/index-BHLuFtij.cjs +0 -1
- package/dist/index-BIDFrngN.cjs +0 -1
- package/dist/index-BM4Blp7z.cjs +0 -1
- package/dist/index-BUxJL5W1.cjs +0 -1
- package/dist/index-BmTzLFkx.js +0 -630
- package/dist/index-BuAZTecX.cjs +0 -1
- package/dist/index-C-6jbR4D.cjs +0 -1
- package/dist/index-C6dVScaZ.js +0 -349
- package/dist/index-Cm-ohQUX.cjs +0 -1
- package/dist/index-D0k42JA4.cjs +0 -15
- package/dist/index-D4QFcxJ-.js +0 -9196
- package/dist/index-DGULgN2U.cjs +0 -1
- package/dist/index-DRBuICJi.cjs +0 -2
- package/dist/index-DeAnBGqU.cjs +0 -18
- package/dist/index-Dtq1IcgW.cjs +0 -1
- package/dist/index-RNu0IAS4.cjs +0 -1
- package/dist/index-RpaKc4Lu.cjs +0 -25
- package/dist/index-ZGUlK0ro.cjs +0 -1
- package/dist/index-ity_8Fmx.cjs +0 -1
- package/dist/index-vUaB-HgD.cjs +0 -1
- package/dist/menuIndex-SRHovjCX.cjs +0 -1
- package/dist/threeModel-BAzu1aRu.cjs +0 -1
- package/dist/threePreview-5dyC70n0.cjs +0 -1
- package/dist/threeTrackPathView-DHLZAc5E.cjs +0 -1
- package/dist/threeViewerHost-B_4KXwsO.cjs +0 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { ref as h, computed as E, reactive as
|
|
2
|
-
import {
|
|
3
|
-
import { s as J, b as ye, u as be, p as G, c as me,
|
|
4
|
-
import { g as
|
|
5
|
-
import { J as
|
|
6
|
-
import { A as _e } from "./index-
|
|
1
|
+
import { ref as h, computed as E, reactive as j, defineComponent as q, watch as H, createElementBlock as N, openBlock as k, createVNode as A, createCommentVNode as ue, withCtx as _, createTextVNode as x, toDisplayString as F, resolveComponent as D, createBlock as R, Fragment as ie, renderList as ce, createElementVNode as de, normalizeStyle as pe } from "vue";
|
|
2
|
+
import { G as fe, H as ve, J as ge, E as T } from "./request-CoGtW0Ux.js";
|
|
3
|
+
import { s as J, b as ye, u as be, p as G, c as me, i as he } from "./menu-CtG1loFf.js";
|
|
4
|
+
import { g as Q, u as we } from "./index-BsDMamej.js";
|
|
5
|
+
import { J as X, r as Se } from "./index-Cg7Mpfpj.js";
|
|
6
|
+
import { A as _e } from "./index-D21dwfqO.js";
|
|
7
|
+
import { u as Y } from "./index-BIV-s4QY.js";
|
|
7
8
|
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
import { m as Ce } from "./index-
|
|
9
|
+
import { m as Ce } from "./index-DoEwWbTL.js";
|
|
9
10
|
import { S as V } from "./index-BHtNKL1L.js";
|
|
10
11
|
function Ae(t, s) {
|
|
11
|
-
const e = new
|
|
12
|
+
const e = new X();
|
|
12
13
|
return e.setPublicKey(s), e.encrypt(t) || "";
|
|
13
14
|
}
|
|
14
15
|
function ke(t, s) {
|
|
15
|
-
const e = new
|
|
16
|
+
const e = new X();
|
|
16
17
|
return e.setPrivateKey(s), e.decrypt(t) || "";
|
|
17
18
|
}
|
|
18
19
|
const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activeMenuPath: I } = J(Ie), Ue = h(0), ee = E(() => {
|
|
@@ -61,7 +62,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
61
62
|
}
|
|
62
63
|
];
|
|
63
64
|
}), Be = () => {
|
|
64
|
-
}, $ = h(!1), L =
|
|
65
|
+
}, $ = h(!1), L = j({
|
|
65
66
|
dialogTitle: "电子签名",
|
|
66
67
|
dialogWidth: "30",
|
|
67
68
|
dialogShow: !1,
|
|
@@ -107,7 +108,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
107
108
|
L.dialogShow = !1;
|
|
108
109
|
}, re = async (t) => {
|
|
109
110
|
var e, n, l, o, a, p, y, b, g;
|
|
110
|
-
const s = await
|
|
111
|
+
const s = await Q({
|
|
111
112
|
id: t
|
|
112
113
|
// key: {
|
|
113
114
|
// systemKey: sessionStorage.getItem("systemKey"),
|
|
@@ -154,7 +155,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
154
155
|
[e]: s
|
|
155
156
|
};
|
|
156
157
|
z.value = t === "avatarUrl", O.value = t === "signature", await ne(n, "图片修改");
|
|
157
|
-
}, B =
|
|
158
|
+
}, B = j({
|
|
158
159
|
baseCols: [],
|
|
159
160
|
otherCols: []
|
|
160
161
|
}), le = h([]), oe = h(), Pe = (t, s, e) => {
|
|
@@ -169,7 +170,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
169
170
|
s !== ((n = oe.value) == null ? void 0 : n.newtPass) ? e(new Error("两次输入的密码不一致")) : e();
|
|
170
171
|
}, Le = async () => {
|
|
171
172
|
var s, e, n, l, o, a, p, y, b, g;
|
|
172
|
-
const t = await
|
|
173
|
+
const t = await Q({
|
|
173
174
|
key: {
|
|
174
175
|
systemKey: sessionStorage.getItem("systemKey"),
|
|
175
176
|
type: "structure",
|
|
@@ -220,7 +221,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
220
221
|
...t,
|
|
221
222
|
status: ((p = d.value) == null ? void 0 : p.status) ?? "启用"
|
|
222
223
|
}), $.value = !0, await ne(e, s);
|
|
223
|
-
},
|
|
224
|
+
}, W = () => {
|
|
224
225
|
var n, l;
|
|
225
226
|
const t = {
|
|
226
227
|
base: [
|
|
@@ -275,7 +276,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
275
276
|
{ required: !0, message: "输入不能为空", trigger: "blur" }
|
|
276
277
|
]
|
|
277
278
|
},
|
|
278
|
-
buttonValue: (e =
|
|
279
|
+
buttonValue: (e = W()) == null ? void 0 : e.base,
|
|
279
280
|
isEnableWrap: !1,
|
|
280
281
|
isButtonRow: !1
|
|
281
282
|
},
|
|
@@ -304,7 +305,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
304
305
|
trigger: "blur"
|
|
305
306
|
}
|
|
306
307
|
], a), {}),
|
|
307
|
-
buttonValue: (o =
|
|
308
|
+
buttonValue: (o = W()) == null ? void 0 : o.other,
|
|
308
309
|
isEnableWrap: !1
|
|
309
310
|
},
|
|
310
311
|
value: ""
|
|
@@ -312,7 +313,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
312
313
|
]
|
|
313
314
|
}
|
|
314
315
|
];
|
|
315
|
-
},
|
|
316
|
+
}, ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
316
317
|
__proto__: null,
|
|
317
318
|
avatarLoading: z,
|
|
318
319
|
beforeSignDestroy: se,
|
|
@@ -383,7 +384,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
383
384
|
}, b = async (c) => {
|
|
384
385
|
var w, S, u, r, m;
|
|
385
386
|
try {
|
|
386
|
-
const f = await
|
|
387
|
+
const f = await Y(c);
|
|
387
388
|
((w = f == null ? void 0 : f.data) == null ? void 0 : w.code) === 200 && (a.value = l.value + "/" + ((u = (S = f.data) == null ? void 0 : S.result) == null ? void 0 : u.url), o.value = (m = (r = f.data) == null ? void 0 : r.result) == null ? void 0 : m.url, n("submitImage", o.value));
|
|
388
389
|
} catch (f) {
|
|
389
390
|
T.error(f);
|
|
@@ -419,7 +420,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
419
420
|
]);
|
|
420
421
|
};
|
|
421
422
|
}
|
|
422
|
-
}),
|
|
423
|
+
}), aa = /* @__PURE__ */ Z($e, [["__scopeId", "data-v-1a1f2575"]]), ze = /* @__PURE__ */ q({
|
|
423
424
|
__name: "index",
|
|
424
425
|
props: {
|
|
425
426
|
itemData: {
|
|
@@ -452,7 +453,7 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
452
453
|
}, g = async (u) => {
|
|
453
454
|
var r, m, f;
|
|
454
455
|
try {
|
|
455
|
-
const v = await
|
|
456
|
+
const v = await Y(u);
|
|
456
457
|
((r = v == null ? void 0 : v.data) == null ? void 0 : r.code) === 200 && o("clickSubmitSign", (f = (m = v.data) == null ? void 0 : m.result) == null ? void 0 : f.url);
|
|
457
458
|
} catch (v) {
|
|
458
459
|
T.error(v);
|
|
@@ -562,10 +563,10 @@ const M = ye(G), { loginUserInfo: d, cryptoInfo: P } = J(M), Ie = be(G), { activ
|
|
|
562
563
|
}, 8, ["signPadInfo"]);
|
|
563
564
|
};
|
|
564
565
|
}
|
|
565
|
-
}),
|
|
566
|
+
}), ta = /* @__PURE__ */ Z(ze, [["__scopeId", "data-v-ce5a2314"]]);
|
|
566
567
|
export {
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
ea as S,
|
|
569
|
+
ta as a,
|
|
570
|
+
aa as s,
|
|
570
571
|
Ue as t
|
|
571
572
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./request-BC2w2vGr.cjs"),$=require("./index-CuHxF23O.cjs"),y=require("./menu-Hdw0L-Y2.cjs"),le=require("./index-DTiolIgS.cjs"),F=require("./index-BOHy6XZd.cjs"),ie=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ie=require("./index-CUw6nGTo.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Se=y.useLoginState(y.pinia),{systemUrl:V}=y.storeToRefs(Se);let P=V.value===""||!V.value?"http://222.92.178.198:63002":V.value;e.watch(()=>V.value,()=>{P=V.value===""||!V.value?"http://222.92.178.198:63002":V.value},{deep:!0,immediate:!0});function De(l){return C.service({url:`${P}/platform/getdata_post`,method:"post",data:l})}function Te(l){return C.service({url:`${P}/platform/createdata_post`,method:"post",data:l})}function Le(l){return C.service({url:`${P}/platform/updatedata_post`,method:"post",data:l})}function Be(l){return C.service({url:`${P}/platform/deletedata_post`,method:"post",data:l})}const ke=[{label:"编辑",value:"edit"},{label:"删除",value:"delete"}],fe="post",p={ENABLE:{value:"enable",label:"启用",tag:"primary"},DISABLED:{value:"disabled",label:"禁用",tag:"info"}},qe=()=>{const{platId:l,userId:r,isSuperAdmin:S}=y.useUserInfo(),R=t=>{const o=t.toUpperCase(),n=p==null?void 0:p[o];return(n==null?void 0:n.label)||t},D=t=>{const o=t.toUpperCase(),n=p==null?void 0:p[o];return(n==null?void 0:n.tag)||"info"},h=e.ref({}),N=e.computed(()=>{var o;return S.value?!0:((o=h.value)==null?void 0:o.status)===F.featureStatusConstants.EDITABLE.value}),M=async()=>{var v,U;const o={pageName:"系统管理/职位管理",platId:l.value,userId:r.value},n=await y.getPageDataApi(o);return(U=(v=n==null?void 0:n.data)==null?void 0:v.result)==null?void 0:U[0]},G=async()=>{if(!S.value)return h.value=await M(),h},T=()=>({name:""}),m=e.ref(T()),O=()=>{m.value=T()},x=()=>({prop:"sort",order:"ascending"}),w=e.ref(x()),L=t=>{w.value=t},Q=()=>({pageNum:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),f=e.ref(Q()),j=t=>{f.value.pageNum=t},H=t=>{f.value.pageSize=t},J=()=>({platId:l.value,pageNum:f.value.pageNum,pageSize:f.value.pageSize,filter:{...m.value},orderBy:{prop:w.value.prop,order:w.value.order}}),K=async t=>{var n;const o=await De(t);return(n=o==null?void 0:o.data)==null?void 0:n.result},B=async t=>{const o=J(),n=await K(o),{total:v}=n||{};return f.value.total=v,n||{}},W=t=>{const o=le.formatterTimeStr(Date.now()),n=y.cloneDeep(t);return n.update_time=o,n},g=t=>{const o=le.formatterTimeStr(Date.now());let n={name:"",code:"",sort:1,status:p.ENABLE.value,create_time:o,update_time:o};if(t){const v=W(t);n={...n,...v}}return n},k=t=>{const o=[t];return{platId:l.value,changePostData:o}},X=async t=>{delete t.post_id;const o=k(t);await Te(o)},Y=async t=>{await X(t)},Z=async t=>{const o=k(t);await Le(o)},_=async t=>{await Z(t)},ee=async t=>{const{post_id:o}=t,n={platId:l.value,post_id:[o]};await Be(n)},q=async t=>{await le.ElMessageBox.confirm("是否确认要删除","",{showClose:!1,confirmButtonText:"确认",cancelButtonText:"取消",type:"warning",modalClass:"delete-position-message-modal",confirmButtonClass:"delete-position-confirm"}),await ee(t)},te=async t=>{var n;const o=await F.importData(t);return(n=o==null?void 0:o.data)==null?void 0:n.result},i=async t=>{const o=new FormData;return o.set("platId",l.value),o.set("file",t),o.set("tableType",fe),await te(o)},b=async t=>await F.exportData(t),oe=async()=>{const t={platId:l.value,tableType:fe,filter:m.value,orderBy:w.value},o=await b(t);return F.initDownloadFileByResponse(o),o},z=[["名称","编码","状态","排序"]];return{sortInfo:w,setSortInfo:L,queryInfo:m,resetQuery:O,pageInfo:f,setPageNum:j,setPageSize:H,hasPositionEditAuth:N,initPositionItem:g,initPositionConfig:G,initGetByPage:B,initCreate:Y,initUpdate:_,initDelete:q,getStatusLabelByValue:R,getStatusTagByValue:D,initImport:i,initExport:oe,exportTemplate:async()=>{const t=$.utils.aoa_to_sheet(z),o=$.utils.book_new();$.utils.book_append_sheet(o,t,"职位"),$.writeFileSync(o,"职位模板.xlsx")}}},ze={class:"position-management"},Ue={class:"header"},Ae={class:"header-left"},$e={class:"query-wrapper"},Fe={class:"header-right"},Re={class:"body"},Me={class:"position-table-wrapper"},Ge={class:"table-wrapper"},Oe={class:"operate-list"},Qe=["onClick"],je={class:"pagination-wrapper"},He={class:"position-management-wrapper"},Je={class:"position-management-body"},Ke={class:"position-form-wrapper"},We={class:"edit-footer"},Xe={class:"footer-right"},Ye=e.defineComponent({__name:"index",setup(l){const r=y.useMenuState(y.pinia),{sortInfo:S,setSortInfo:R,queryInfo:D,resetQuery:h,pageInfo:N,setPageNum:M,setPageSize:G,initGetByPage:T,hasPositionEditAuth:m,initPositionConfig:O,initPositionItem:x,initCreate:w,initUpdate:L,initDelete:Q,getStatusLabelByValue:f,getStatusTagByValue:j,initImport:H,initExport:J,exportTemplate:K}=qe(),B=e.ref([]),W=async()=>{const s=await T(),{postData:a=[]}=s;return a},g=async()=>{B.value=await W()},k=s=>{M(s),r.setImportLoading(!0),g().finally(()=>{r.setImportLoading(!1)})},X=s=>{G(s),r.setImportLoading(!0),g().finally(()=>{r.setImportLoading(!1)})},Y=s=>{const{prop:a,order:d}=s;R({prop:a,order:d}),g()},Z=async()=>{h(),r.setImportLoading(!0),await g().finally(()=>{r.setImportLoading(!1)})},_=async()=>{await O(),await g()};e.onMounted(async()=>{r.setImportLoading(!0),await _().finally(()=>{r.setImportLoading(!1)})});const ee=async(s,a)=>{if(!m.value)return;const{value:d}=s,u=a.row;if(d==="edit"){ae(u);return}if(d==="delete"){r.setImportLoading(!0),await v(u).finally(()=>{r.setImportLoading(!1)});return}},q=e.ref(),te=e.reactive({name:[{required:!0,message:"请输入职位名称",trigger:"blur"}],code:[{required:!0,message:"请选择职位编码",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"blur"}]}),i=e.ref(x());e.ref([]);const b=e.ref(!1),oe=()=>{b.value=!0},z=()=>{b.value=!1},ae=async s=>{m.value&&(i.value=x(s),oe())},t=()=>{i.value=x(),z()},o=async()=>{await w(i.value),await _()},n=async()=>{await L(i.value),await _()},v=async s=>{await Q(s),await _()},U=async()=>{var a,d;await((d=(a=q.value)==null?void 0:a.validate)==null?void 0:d.call(a));const{post_id:s}=i.value;r.setImportLoading(!0),s?await n().finally(()=>{r.setImportLoading(!1)}):await o().finally(()=>{r.setImportLoading(!1)}),t()},ge=async s=>{if(!m.value)return;const{status:a}=s;p.ENABLE.value===a?s.status=p.DISABLED.value:s.status=p.ENABLE.value,await L(s),await _()},_e=async()=>{await ve()},ve=async()=>{const s=document.createElement("input");s.type="file",s.accept=".xlsx",s.onchange=async a=>{var E;const u=(E=a.target.files)==null?void 0:E[0];if(u)try{r.setImportLoading(!0),await H(u),await _(),r.setImportLoading(!1)}catch{r.setImportLoading(!1)}},s.click()},ye=async()=>{r.setImportLoading(!0),await J().finally(()=>{r.setImportLoading(!1)})},we=async()=>{K()};return(s,a)=>{var de,ue,pe,me;const d=e.resolveComponent("el-input"),u=e.resolveComponent("el-button"),E=e.resolveComponent("el-icon"),ne=e.resolveComponent("el-dropdown-item"),Ve=e.resolveComponent("el-dropdown-menu"),Ne=e.resolveComponent("el-dropdown"),I=e.resolveComponent("el-table-column"),Ce=e.resolveComponent("el-tag"),he=e.resolveComponent("el-table"),xe=e.resolveComponent("el-pagination"),se=e.resolveComponent("el-form-item"),re=e.resolveComponent("el-col"),ce=e.resolveComponent("el-row"),be=e.resolveComponent("el-input-number"),Ee=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",ze,[e.createElementVNode("div",Ue,[e.createElementVNode("div",Ae,[e.createElementVNode("div",$e,[e.createVNode(d,{modelValue:e.unref(D).name,"onUpdate:modelValue":a[0]||(a[0]=c=>e.unref(D).name=c),style:{width:"240px"},placeholder:"请输入名称"},null,8,["modelValue"]),e.createVNode(u,{type:"primary",onClick:g},{default:e.withCtx(()=>a[5]||(a[5]=[e.createTextVNode("查询")])),_:1,__:[5]}),e.createVNode(u,{type:"primary",plain:"",onClick:Z},{default:e.withCtx(()=>a[6]||(a[6]=[e.createTextVNode("重置")])),_:1,__:[6]})])]),e.createElementVNode("div",Fe,[e.createVNode(u,{type:"primary",onClick:_e},{default:e.withCtx(()=>[a[7]||(a[7]=e.createTextVNode(" 导入 ")),e.createVNode(E,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.upload_default))]),_:1})]),_:1,__:[7]}),e.createVNode(Ne,null,{dropdown:e.withCtx(()=>[e.createVNode(Ve,null,{default:e.withCtx(()=>[e.createVNode(ne,{onClick:we},{default:e.withCtx(()=>a[9]||(a[9]=[e.createTextVNode("导出模板")])),_:1,__:[9]}),e.createVNode(ne,{onClick:ye},{default:e.withCtx(()=>a[10]||(a[10]=[e.createTextVNode("导出数据")])),_:1,__:[10]})]),_:1})]),default:e.withCtx(()=>[e.createVNode(u,{type:"primary"},{default:e.withCtx(()=>[a[8]||(a[8]=e.createTextVNode(" 导出 ")),e.createVNode(E,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(C.arrow_down_default))]),_:1})]),_:1,__:[8]})]),_:1}),e.createVNode(ie._sfc_main,{emptyColor:!0,onClickTrigger:a[1]||(a[1]=c=>ae()),modelValue:"创建职位",buttonType:"primary"})])]),e.createElementVNode("div",Re,[e.createElementVNode("div",Me,[e.createElementVNode("div",Ge,[e.createVNode(he,{class:"department-table",data:B.value,"empty-text":"","default-sort":e.unref(S),onSortChange:Y},{default:e.withCtx(()=>[e.createVNode(I,{prop:"name",label:"名称",align:"center"}),e.createVNode(I,{prop:"code",label:"编码",align:"center"}),e.createVNode(I,{prop:"status",label:"状态",align:"center"},{default:e.withCtx(c=>[e.createVNode(Ce,{class:"status-tag",type:e.unref(j)(c.row.status),title:"点击切换",onClick:A=>ge(c.row)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)(c.row.status)),1)]),_:2},1032,["type","onClick"])]),_:1}),e.createVNode(I,{prop:"sort",label:"排序",align:"center",sortable:"custom"}),e.createVNode(I,{label:"操作",align:"center"},{default:e.withCtx(c=>[e.createElementVNode("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ke),A=>(e.openBlock(),e.createElementBlock("div",{class:"operate-item",key:A.value,onClick:e.withModifiers(et=>ee(A,c),["stop"])},e.toDisplayString(A.label),9,Qe))),128))])]),_:1})]),_:1},8,["data","default-sort"])]),e.createElementVNode("div",je,[a[11]||(a[11]=e.createElementVNode("div",null,null,-1)),e.createVNode(xe,{onSizeChange:X,onCurrentChange:k,"current-page":(de=e.unref(N))==null?void 0:de.pageNum,"page-sizes":(ue=e.unref(N))==null?void 0:ue.pageSizes,"page-size":((pe=e.unref(N))==null?void 0:pe.pageSize)??10,layout:"total, sizes, prev, pager, next, jumper",total:((me=e.unref(N))==null?void 0:me.total)??0},null,8,["current-page","page-sizes","page-size","total"])])])]),a[14]||(a[14]=e.createElementVNode("div",{class:"footer"},[e.createElementVNode("div",{class:"footer-left"}),e.createElementVNode("div",{class:"footer-right"})],-1)),e.createVNode(Ie.ssDialog,{class:"position-edit-dialog",visible:b.value,title:"职位信息",onBeforeDestroy:z,showClose:!0,closeOnClickModal:!1,closeOnPressEscape:!1,modalClass:"position-edit-modal",alignCenter:!0,appendToBody:!1},{default:e.withCtx(()=>[e.createElementVNode("div",He,[a[12]||(a[12]=e.createElementVNode("div",{class:"position-management-header"},[e.createElementVNode("div",{class:"header-left"}),e.createElementVNode("div",{class:"header-right"})],-1)),e.createElementVNode("div",Je,[e.createElementVNode("div",Ke,[e.createVNode(Ee,{class:"position-edit-form",ref_key:"positionFormRef",ref:q,model:i.value,rules:te},{default:e.withCtx(()=>[e.createVNode(ce,{gutter:20},{default:e.withCtx(()=>[e.createVNode(re,{span:12},{default:e.withCtx(()=>[e.createVNode(se,{prop:"name",label:"职位名称","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:i.value.name,"onUpdate:modelValue":a[2]||(a[2]=c=>i.value.name=c),"aria-label":"职位名称",placeholder:"职位名称"},null,8,["modelValue"])]),_:1})]),_:1}),e.createVNode(re,{span:12},{default:e.withCtx(()=>[e.createVNode(se,{prop:"code",label:"职位编码","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:i.value.code,"onUpdate:modelValue":a[3]||(a[3]=c=>i.value.code=c),"aria-label":"职位编码",placeholder:"职位编码"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e.createVNode(ce,{gutter:20},{default:e.withCtx(()=>[e.createVNode(re,{span:12},{default:e.withCtx(()=>[e.createVNode(se,{prop:"sort",label:"排序","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(be,{modelValue:i.value.sort,"onUpdate:modelValue":a[4]||(a[4]=c=>i.value.sort=c),"aria-label":"排序",placeholder:"排序",min:"1"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])])])])]),footer:e.withCtx(()=>[e.createElementVNode("div",We,[a[13]||(a[13]=e.createElementVNode("div",{class:"footer-left"},null,-1)),e.createElementVNode("div",Xe,[e.createVNode(ie._sfc_main,{class:"cancel",emptyColor:!0,onClickTrigger:t,modelValue:"取消",buttonType:"info"}),e.createVNode(ie._sfc_main,{class:"confirm",emptyColor:!0,onClickTrigger:U,modelValue:"确定",buttonType:"primary"})])])]),_:1},8,["visible"])])}}}),Ze=Pe._export_sfc(Ye,[["__scopeId","data-v-c988d077"]]);exports.default=Ze;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("vue"),n=require("./menu-Hdw0L-Y2.cjs"),a=require("./request-BC2w2vGr.cjs"),u=n.useLoginState(n.pinia),{systemUrl:r}=n.storeToRefs(u);let t=r.value===""||!r.value?"http://222.92.178.198:63002":r.value;p.watch(()=>r.value,()=>{t=r.value===""||!r.value?"http://222.92.178.198:63002":r.value},{deep:!0,immediate:!0});function o(e){return a.service({url:`${t}/platform/getdata_department_tree`,method:"post",data:e})}function m(e){return a.service({url:`${t}/platform/getdata_department`,method:"post",data:e})}function i(e){return a.service({url:`${t}/platform/createdata_department`,method:"post",data:e})}function s(e){return a.service({url:`${t}/platform/updatedata_department`,method:"post",data:e})}function l(e){return a.service({url:`${t}/platform/deletedata_department`,method:"post",data:e})}function d(e){return a.service({url:`${t}/platform/getdata_department`,method:"post",data:e})}function c(e){return a.service({url:`${t}/platform/getdata_department_type`,method:"post",data:e})}async function g(e){return await c({platId:e})}async function f(e){return await g(e)}exports.createDepartment=i;exports.deleteDepartment=l;exports.getByPage=m;exports.getDepartmentOptions=f;exports.getDepartmentTree=o;exports.getParentByType=d;exports.updateDepartment=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref as _, computed as A } from "vue";
|
|
2
|
-
import { d as I, g as M } from "./index-
|
|
3
|
-
import { E as N } from "./index-
|
|
4
|
-
import { E as s } from "./request-
|
|
2
|
+
import { d as I, g as M } from "./index-BsDMamej.js";
|
|
3
|
+
import { E as N } from "./index-QG4F5kTH.js";
|
|
4
|
+
import { E as s } from "./request-CoGtW0Ux.js";
|
|
5
5
|
const K = _([]), T = A(() => [
|
|
6
6
|
{
|
|
7
7
|
key: "extraButton",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("vue"),I=require("./menu-Hdw0L-Y2.cjs"),pe=require("./index-DAwnZFmG.cjs"),k=require("./index-CW4qJdP8.cjs"),fe=require("./menuIndex-DqY0uteo.cjs"),w=require("./request-BC2w2vGr.cjs"),F=I.useModelComp(I.pinia),ee=I.useUnit(I.pinia),C=I.useMenuState(I.pinia),{menus:te,configMenu:q,activeMenuPath:j,cacheStructures:K}=I.storeToRefs(C),$=i.ref(!1),le=i.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=I.cloneDeep(te.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),J=i.ref([]),R=i.ref([{label:"新建"}]),de=i.computed(()=>[{key:"extraButton",contents:R.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:J.value}]),U=i.ref([]),T=i.ref({}),ie=i.ref({}),O=i.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),_=e=>{var t;U.value=e?(t=O.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):O.value},ge=i.ref([{label:"查询"},{label:"重置"}]),ve=async()=>{},ae=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:ae(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),g=i.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),z=i.ref([]),h=i.ref({}),b=i.ref(null),oe=i.ref([]),ne=i.computed(()=>{var e;return(e=ae(te.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ue=async e=>{var l,u,n,c;const t=await k.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});oe.value=r,C.setCacheStructures({key:"contentConfig",data:r})}},ye=async e=>{var t;$.value=!0,b.value={...e,rootNode:fe.findRootNodeByPath(ne.value,e.path)},C.setCacheStructures(null),(e==null?void 0:e.level)===0?R.value.splice(0):(R.value=[{label:"新建"}],z.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await C.setConfigMenu(null),await ue(e==null?void 0:e.path),await B(e)},be=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},he=async(e,t)=>{var l,u;if(!b.value)return w.ElMessage.warning("请先选择菜单");if(g.type=be(e),z.value=[],F.setSubmitCurStructure(!1),ee.setSelectTitle([]),h.value=I.cloneDeep(t),g.type!=="delete"){switch(g.type){case"create":_(null),await C.setConfigMenu(null);break;case"update":_(h.value),await C.setConfigMenu(h.value),console.log("clickRowButton",h.value);break}await i.nextTick(),g.title=`【${g.type==="create"?(l=b.value)==null?void 0:l.path:(u=h.value)==null?void 0:u.path}】菜单配置${e}`,g.show=!0}else await se(h.value,g.type)},re=i.ref(!0),Ce=async e=>{var t;T.value=e,await C.setConfigMenu({...T.value,path:(t=b.value)==null?void 0:t.path}),re.value=(e==null?void 0:e.operateType)!=="新增"};i.watch(()=>re.value,async e=>{var t;await i.nextTick(),U.value=(t=O.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:T.value?T.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ie=i.ref(null),ke=async(e,t)=>{var r,p,f,s,y;if(g.type==="create"){const a=(p=(r=K.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);F.setItemData(a),C.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(y=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:y.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return k.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var M,D,A,P,E,o,H;return{id:(A=(D=(M=d==null?void 0:d.data)==null?void 0:M.result)==null?void 0:D[0])==null?void 0:A.id,...(H=(o=(E=(P=d==null?void 0:d.data)==null?void 0:P.result)==null?void 0:E[0])==null?void 0:o.value)==null?void 0:H.pageData}});F.setItemData(a),C.setCacheStructures({key:t,data:a})}},Te=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";C.setButtonTriggerType(t),await ke(h.value,t);let l;(n=T.value)!=null&&n.subMenus&&((c=T.value)==null?void 0:c.subMenus.length)>0&&(l=(r=z.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=h.value)==null?void 0:p.title}));let u;g.type==="create"?u={...T.value,path:(f=b.value)==null?void 0:f.path}:g.type==="update"&&(u=q.value),await C.setConfigMenu(u),ee.setSelectTitle(l),F.setIsEdit("edit")},B=async e=>{var l,u,n,c,r,p;const t=await k.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:j.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&(J.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),$.value=!1},x=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,y;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:j.value+"/"+((u=b.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},y=k.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},y=k.updateInsofDataApi):t==="delete"&&(s={id:e},y=k.deleteInsofDataApi);const a=await y(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw w.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{w.ElMessage.error("保存响应失败")}},Z=(e,t)=>{var f,s,y;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(y=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:y.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},m=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(x(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(x(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(x(s,"update",e))})),l},Me=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},De=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),y=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await i.nextTick();const a=(n=(u=(l=K.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=K.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=oe.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const M=Z(y,a),D=Z(s,d),A=m("dialogConfig",M),P=m("contentConfig",D),E=[...A,...P];await Promise.all(E).then(o=>{var G,L,V,Q,W,X,Y;if(!(o==null?void 0:o.every(v=>v.status)))return;let N=(G=o==null?void 0:o.flatMap(v=>v==null?void 0:v.data))==null?void 0:G.filter(v=>(v==null?void 0:v.id)!==null&&(v==null?void 0:v.id)!==void 0);if(((L=M==null?void 0:M.updateComps)==null?void 0:L.length)===0&&g.type==="update"){const v=(Q=(V=h.value)==null?void 0:V.structureIds)==null?void 0:Q.filter(S=>(S==null?void 0:S.key)==="dialogConfig");N=[...N,...v]}if(((W=D==null?void 0:D.updateComps)==null?void 0:W.length)===0&&g.type==="update"){const v=(Y=(X=h.value)==null?void 0:X.structureIds)==null?void 0:Y.filter(S=>(S==null?void 0:S.key)==="contentConfig");N=[...N,...v]}const ce=Me(N);se({...t,isNotInitial:!0,structureIds:ce},g.type)}).catch(o=>{w.ElMessage.error(o)})}catch(s){throw w.ElMessage.error(s),new Error(s)}},se=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:j.value+"/"+((n=b.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=k.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=k.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=k.batchDeleteInsofDataApi),pe.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&J.value.push({...e,id:r}),t&&r&&w.ElMessage.success("响应成功"),B(b.value)})},Se=async()=>{var l,u,n,c,r;const e=JSON.parse(I.cloneDeep(JSON.stringify(K.value)));await i.nextTick();const t=g.type==="create"?{...q.value,rootNodePath:(u=(l=b.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...q.value,rootNodePath:(c=(n=b.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=h.value)==null?void 0:r.id};await De(e,t),T.value={},g.show=!1,await B(b.value)},we=()=>{g.show=!1},Ne={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:le.value,name:""}]}]},Ae=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:we,buttonValue:ge,changeTrigger:Ce,changedRow:ie,clickNodeTrigger:ye,clickRowButton:he,clickSubmitForm:Se,clickTrigger:Te,dialogInfo:g,formatFormData:_,getInitialSubStructure:ue,getTableDataAsync:B,handleItemDataChange:ve,inputForm:T,menuPageData:de,operatingForm:Ie,pageData:le,renderFormData:U,tableLoading:$,tempMenuPageData:Ne,treeData:ne},Symbol.toStringTag,{value:"Module"}));exports.State=Ae;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as C, reactive as k, ref as v, onMounted as D, nextTick as b, resolveComponent as i, resolveDirective as T, createElementBlock as m, openBlock as u, createVNode as t, withCtx as n, withDirectives as w, createElementVNode as p, createTextVNode as _ } from "vue";
|
|
2
|
-
import { S as x } from "./index-
|
|
3
|
-
import { Y as B } from "./index-
|
|
2
|
+
import { S as x } from "./index-DXjgumn5.js";
|
|
3
|
+
import { Y as B } from "./index-DfAmIlWW.js";
|
|
4
4
|
import { s as F } from "./index-CnjGqJZS.js";
|
|
5
|
-
import { b as y } from "./index-
|
|
6
|
-
import { u as S, p as I, s as N } from "./
|
|
5
|
+
import { b as y } from "./index-DoEwWbTL.js";
|
|
6
|
+
import { u as S, p as I, s as N } from "./menu-CtG1loFf.js";
|
|
7
7
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const E = { class: "menu-module" }, M = {
|
|
9
9
|
class: "table-wrap",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),U=require("./menu-Hdw0L-Y2.cjs"),gt=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DpyDtD61.cjs");const kt=require("./request-BC2w2vGr.cjs"),Ct=require("./index-CUw6nGTo.cjs"),Dt=require("./index-9I9R7yqt.cjs"),It=require("vue-router"),Ke=require("./index-RoXicHV9.cjs"),N=require("./index-CW4qJdP8.cjs"),St=require("./index-bPKGQ9bV.cjs"),_t=require("./menuIndex-DqY0uteo.cjs"),m=require("./index-CuHxF23O.cjs"),Pe=require("./index-DTiolIgS.cjs"),Bt=require("./index-BOHy6XZd.cjs"),bt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),je=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-9I9R7yqt.cjs")).then(n=>n.index));je.install=n=>{n.component("ssMenu",je)};const Ye={__name:"index",props:{name:String},setup(n){const p=n,T=t.computed(()=>kt.Icons[p.name]);return t.onMounted(()=>{}),(h,r)=>{const l=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(l,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(T.value)))]),_:1})}}},Re=(n,p,T=0)=>{let h=n;return h!=null&&h.every(r=>Array.isArray(r))&&(h!=null&&h.every(r=>Array.isArray(r)&&r.length===1)?h=h==null?void 0:h.filter(r=>(r==null?void 0:r[0])!==(p==null?void 0:p[T])):h=h==null?void 0:h.map(r=>{if(r!=null&&r.find(l=>l===(p==null?void 0:p[T]))&&(p==null?void 0:p.length)!==1){let l=U.cloneDeep(p),c=r==null?void 0:r.filter(I=>I!==(l==null?void 0:l[T])),w=T+1,x=Re(c,l,w),E=[];E.push(r==null?void 0:r[0]),x==null||x.forEach(I=>{E.push(I)}),r=E}return r})),h},Oe=(n,p,T,h=0)=>{let r=n;return r!=null&&r.every(l=>Array.isArray(l))&&(r!=null&&r.every(l=>Array.isArray(l)&&l.length===1)?r.push([T]):r=r==null?void 0:r.map(l=>{if(l!=null&&l.find(c=>c===(p==null?void 0:p[h]))&&(p==null?void 0:p.length)!==1){let c=U.cloneDeep(p),w=l==null?void 0:l.filter(q=>q!==(c==null?void 0:c[h])),x=h+1,E=Oe(w,c,T,x),I=[];I.push(l==null?void 0:l[0]),E==null||E.forEach(q=>{I.push(q)}),l=I}return l})),r},ze=(n,p,T,h,r=0)=>{let l=n;return l!=null&&l.every(c=>Array.isArray(c))&&(l!=null&&l.every(c=>Array.isArray(c)&&c.length===1)?l=l==null?void 0:l.map(c=>((c==null?void 0:c[0])===T&&(c=[h]),c)):l=l==null?void 0:l.map(c=>{if(c!=null&&c.find(w=>w===(p==null?void 0:p[r]))&&(p==null?void 0:p.length)!==1){let w=U.cloneDeep(p),x=c==null?void 0:c.filter(P=>P!==(w==null?void 0:w[r])),E=r+1,I=ze(x,w,T,h,E),q=[];q.push(c==null?void 0:c[0]),I==null||I.forEach(P=>{q.push(P)}),c=q}return c})),l};function Ze(n="menu"){return{name:n,components:{SvgIcon:gt.SvgIcon,ssMenu:je,DynamicIcon:Ye,ssDialog:Ct.ssDialog,ssInput:Dt.ssInput},setup(p,{emit:T}){const h=t.defineProps({mode:{type:String,default:"vertical"}}),r=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=U.useMenuState(),c=U.useModelComp(U.pinia),w=U.useLoginState(U.pinia),{loginUserInfo:x}=U.storeToRefs(w),E=t.ref(0),I=It.useRouter(),q=t.ref(),{asideMenus:P,menuTriggerType:s,platform:Ve}=U.storeToRefs(l),{fixMenuStatus:Fe}=U.storeToRefs(c),{isSuperAdmin:Le}=Bt.useRole(),Ne=t.computed(()=>h==null?void 0:h.mode),A=o=>o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),Ue=t.computed(()=>{let o=[...P.value];if((o==null?void 0:o.length)===0)return I.push("/"),[];const a=lt(o,ot.value);return a.isFlag||(o=a==null?void 0:a.data),o=o==null?void 0:o.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=A(e.children)),e}),o}),me=async(o,a)=>{c.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(o==null?void 0:o.path),l.setActiveAsideMenu(o),o.isRouter?I.push(o.path):I.push("/"),T("node-click",o,a)},et=async o=>{const a=_t.findNodeByPropInTree(Ue.value,"path",o);l.setActiveAsideMenu(a),c.setRouteToChildPath(""),Fe.value?c.setFixMenuStatus(!1):(Z.value&&(s.value="open"),s.value==="click"?E.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(o):Z.value||(l.setMenuTriggerType("click"),l.setActiveMenuPath(o))),o!=null&&o.startsWith("/")?I.push(o):I.push("/"),E.value++},tt=o=>{Z.value||l.setActiveMenuPath(o)},X=o=>{const a=document.documentElement;o==null||o.forEach(e=>{a.style.setProperty(e.name,e.value)})};t.onMounted(()=>{E.value=1});const ot=t.computed(()=>{const o=sessionStorage.getItem("authority");return o?JSON.parse(o):[]});t.watch(()=>Ve.value,o=>{o==="browser"?X(Ke.browserVerticalMenuClasses):o==="client"?(X(Ke.clientHorizontalMenuClasses),X(Ke.clientVerticalMenuClasses)):o==="three"&&(X(Ke.threeHorizontalMenuClasses),X(Ke.threeVerticalMenuClasses))},{immediate:!0});const lt=(o,a)=>({isFlag:!0}),R=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),at=o=>St.getComponent(o),st=t.ref({}),it=t.ref([]),ee=t.ref({}),Y=t.ref({}),rt=o=>{switch(o){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Je=t.ref({}),nt=o=>{l.setCacheInputMenu({type:R.type,data:o}),l.setIsRefreshMenus(!0)},ct=async(o,a,e)=>{var k,C,_,z,M,H,j,te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe,y,K,V,B;if(a==="create"){let d=(e==null?void 0:e.title)+"(1)",u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(C=(k=u==null?void 0:u.data)==null?void 0:k.result)==null?void 0:C[0],J=(_=S==null?void 0:S.value)==null?void 0:_.pageData;J.compData=(z=J.compData)==null?void 0:z.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Oe(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),d)),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}});let F=(H=(M=e==null?void 0:e.path)==null?void 0:M.split("/"))==null?void 0:H.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}),L=await m.getItemData((oe=(te=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:te.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:oe.join("/"),sessionStorage.getItem("systemKey"),"");if(F.push(d),F=F==null?void 0:F.join("/"),(L==null?void 0:L.length)>0){let i=L==null?void 0:L[0],f=(ae=(le=i==null?void 0:i.compData)==null?void 0:le.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:ae.contents;if(((se=f==null?void 0:f[0])==null?void 0:se.directiveLabel)==="#isMain"){let g=(ie=f==null?void 0:f[0])==null?void 0:ie.prop,D=(ne=(re=i==null?void 0:i.compData)==null?void 0:re.find(b=>(b==null?void 0:b.key)==="tableContents"))==null?void 0:ne.contents,W;D==null||D.forEach(b=>{var G,O;if(b.length===1)((G=b==null?void 0:b[0])==null?void 0:G[g])===(e==null?void 0:e.title)&&(W=b==null?void 0:b[0],W[g]=d);else{let Q=(O=f==null?void 0:f.filter($=>$!=="操作"))==null?void 0:O.map($=>$==null?void 0:$.prop),$e=b==null?void 0:b.filter($=>!($!=null&&$.id)),Ae=m.getValueToObjectValue($e,Q);Ae[g]=d,W=Ae}}),await N.createInsofDataApi({key:{type:"data",pageKey:(de=(pe=(ce=e==null?void 0:e.path)==null?void 0:ce.split("/"))==null?void 0:pe.filter((b,G)=>{var O,Q;return G!==((Q=(O=e==null?void 0:e.path)==null?void 0:O.split("/"))==null?void 0:Q.length)-1}))==null?void 0:de.join("/"),tableId:i==null?void 0:i.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(fe=x.value)==null?void 0:fe.id,createUserLayer:((he=x.value)==null?void 0:he.dept)||((ye=x.value)==null?void 0:ye.部门名称)},value:{tableData:W}})}}await m.newLoadingConstruct(e==null?void 0:e.path,F),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ke=(ge=(ve=e==null?void 0:e.path)==null?void 0:ve.split("/"))==null?void 0:ge.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:ke.join("/")),l.setActiveTopMenuPath((De=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:De[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}else if(a==="update")q.value=e;else if(a==="delete"){let d=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),u=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(Se=(Ie=u==null?void 0:u.data)==null?void 0:Ie.result)==null?void 0:Se[0],J=(_e=S==null?void 0:S.value)==null?void 0:_e.pageData;if(J.compData=(Be=J.compData)==null?void 0:Be.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Re(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),i}),await N.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}}),((we=(be=d==null?void 0:d.data)==null?void 0:be.result)==null?void 0:we.length)>0){let i=(Ee=(Te=d==null?void 0:d.data)==null?void 0:Te.result)==null?void 0:Ee.map(f=>f==null?void 0:f.id);(i==null?void 0:i.length)>0&&await N.batchDeleteInsofDataApi({ids:i})}let F=await m.getItemData((xe=(ue=(Me=e==null?void 0:e.path)==null?void 0:Me.split("/"))==null?void 0:ue.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:xe.join("/"),sessionStorage.getItem("systemKey"),""),L=[];(F==null?void 0:F.length)>0&&(F==null||F.forEach(i=>{var g,D,W,b,G,O,Q,$e,Ae,$,We;let f=(b=(W=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:D.contents)==null?void 0:W[0])==null?void 0:b.prop;(($e=(Q=(O=(G=i==null?void 0:i.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents)==null?void 0:Q[0])==null?void 0:$e.directiveLabel)==="#isMain"&&((We=($=(Ae=i==null?void 0:i.compData)==null?void 0:Ae.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:$.contents)==null||We.forEach(v=>{var Ge,Qe,Xe;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&L.push((Ge=v==null?void 0:v[0])==null?void 0:Ge.id):((Qe=v==null?void 0:v[0])==null?void 0:Qe[f])===(e==null?void 0:e.title)&&L.push((Xe=v==null?void 0:v[0])==null?void 0:Xe.id)}))})),(L==null?void 0:L.length)>0&&await N.batchDeleteInsofDataApi({ids:L}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((K=(y=(qe=e==null?void 0:e.path)==null?void 0:qe.split("/"))==null?void 0:y.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:K.join("/")),l.setActiveTopMenuPath((B=(V=e==null?void 0:e.path)==null?void 0:V.split("/"))==null?void 0:B[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0)}},pt=async(o,a)=>{var te,oe,le,ae,se,ie,re,ne,ce,pe,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,Be,be,we,Te,Ee,Me,ue,xe,qe;let e=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),k=(oe=(te=e==null?void 0:e.data)==null?void 0:te.result)==null?void 0:oe[0],C=(le=k==null?void 0:k.value)==null?void 0:le.pageData;C.compData=(ae=C.compData)==null?void 0:ae.map(y=>{var K,V;return(y==null?void 0:y.key)==="menuContents"&&(y.contents=ze(y.contents,(K=a==null?void 0:a.path)==null?void 0:K.split("/"),a==null?void 0:a.title,(V=o==null?void 0:o.target)==null?void 0:V.value)),y}),k!=null&&k.id&&await N.updateInsofDataApi({id:k==null?void 0:k.id,value:{pageData:C}});let _=(ie=(se=a==null?void 0:a.path)==null?void 0:se.split("/"))==null?void 0:ie.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}),z=_==null?void 0:_.join("/");_.push((re=o==null?void 0:o.target)==null?void 0:re.value),_=_==null?void 0:_.join("/");let M=await m.getItemData(z,sessionStorage.getItem("systemKey"),"");if(((fe=(de=(pe=(ce=(ne=M==null?void 0:M[0])==null?void 0:ne.compData)==null?void 0:ce.find(y=>(y==null?void 0:y.key)==="header"))==null?void 0:pe.contents)==null?void 0:de[0])==null?void 0:fe.directiveLabel)==="#isMain"){let y=(ke=(ge=(ve=(ye=(he=M==null?void 0:M[0])==null?void 0:he.compData)==null?void 0:ye.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ve.contents)==null?void 0:ge[0])==null?void 0:ke.prop,K=(Ie=(De=(Ce=M==null?void 0:M[0])==null?void 0:Ce.compData)==null?void 0:De.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:Ie.contents,V=(be=(Be=(_e=(Se=M==null?void 0:M[0])==null?void 0:Se.compData)==null?void 0:_e.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:Be.contents)==null?void 0:be.map(d=>d==null?void 0:d.prop),B;if(K==null||K.forEach(d=>{var S;let u=m.getValueToObjectValue(d,V);(u==null?void 0:u[y])===a.title&&(B=u,B[y]=(S=o==null?void 0:o.target)==null?void 0:S.value)}),B){let d={};for(let S in B)S!=="id"&&(d[S]=B==null?void 0:B[S]);let u=[{id:B==null?void 0:B.id,value:{tableData:d}}];await N.batchUpdateInsofDataApi({dataList:u})}}let H=await N.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a==null?void 0:a.path}}),j=(Te=(we=H==null?void 0:H.data)==null?void 0:we.result)==null?void 0:Te.map(y=>({id:y==null?void 0:y.id,key:y==null?void 0:y.key}));j=j==null?void 0:j.map(y=>(y.key.pageKey=_,y)),(j==null?void 0:j.length)>0&&await N.batchUpdateInsofDataApi({dataList:j}),l.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),l.setActiveMenuPath((ue=(Me=(Ee=a==null?void 0:a.path)==null?void 0:Ee.split("/"))==null?void 0:Me.filter((y,K)=>{var V,B;return K!==((B=(V=a==null?void 0:a.path)==null?void 0:V.split("/"))==null?void 0:B.length)-1}))==null?void 0:ue.join("/")),l.setActiveTopMenuPath((qe=(xe=a==null?void 0:a.path)==null?void 0:xe.split("/"))==null?void 0:qe[0]),l.setIsRefreshMenus(!1),l.setIsRefreshMenus(!0),q.value=void 0},dt=async(o,a)=>{R.type=rt(a==null?void 0:a.operateType),await ct(a,R.type,o),Y.value=o,Je.value=a},ft=()=>{R.show=!1},ht=o=>o==null?void 0:o.filter(a=>a.allowInherit),yt=()=>{var e,k,C,_,z;let o;R.type==="create"&&(o=((e=Y.value)==null?void 0:e.path)+"/"+ee.value[(k=ee.value)==null?void 0:k.prop]),R.type==="update"&&(o=(C=Y.value)==null?void 0:C.path);const a={...Y.value,config:ht((_=Y.value)==null?void 0:_.config),children:[],childMenus:[],title:ee.value[(z=ee.value)==null?void 0:z.prop],path:o};console.log("clickSubmitForm",Je.value,Y.value,a),nt(a),R.show=!1},vt=o=>{var e,k;const a=(e=o==null?void 0:o.contents)==null?void 0:e.find(C=>C.key==="formContent");a&&(ee.value=(k=a==null?void 0:a.contents)==null?void 0:k.reduce((C,_)=>(C[_.key]=_.value,C.prop=_.key,C),{}))},Z=t.ref(!1);return{isCollapse:Z,handleMenuCollapse:()=>{Z.value=!Z.value},handleCompChange:vt,dialogForm:st,dialogRenderComps:it,getComponents:at,clickSubmitForm:yt,dialogInfo:R,beforeDialogDestroy:ft,clickMenuIcon:dt,mode:Ne,renderMenuList:Ue,clickMenu:me,openMenu:et,closeMenu:tt,changeMenuStyle:X,fixElement:q,onBlur:pt,isSuperAdmin:Le}}}}const wt=t.defineComponent(Ze()),Tt=["title"],Et={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},Mt={key:2,class:"menu-operate-icon"},ut={class:"menu-config-wrap"},xt=["onClick"],qt={class:"module-dialog-content"};function At(n,p,T,h,r,l){var P;const c=t.resolveComponent("ss-input"),w=t.resolveComponent("svg-icon"),x=t.resolveComponent("el-popover"),E=t.resolveComponent("ss-menu"),I=t.resolveComponent("el-button"),q=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(E,{class:"vertical-menu",mode:n.mode,menuList:n.renderMenuList,isCollapse:n.isCollapse,uniqueOpened:!0,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu},{title:t.withCtx(({menu:s})=>{var Ve,Fe,Le,Ne;return[!n.fixElement||(s==null?void 0:s.path)!==((Ve=n.fixElement)==null?void 0:Ve.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:s.title,class:"menu-title",style:t.normalizeStyle({marginRight:s!=null&&s.config&&((Fe=s==null?void 0:s.config)==null?void 0:Fe.length)>0?"25px":"1px"})},t.toDisplayString(s.title??""),13,Tt)):t.createCommentVNode("",!0),n.fixElement&&(s==null?void 0:s.path)===((Le=n.fixElement)==null?void 0:Le.path)?(t.openBlock(),t.createElementBlock("span",Et,[t.createVNode(c,{value:s.title,onBlur:A=>n.onBlur(A,s)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),s!=null&&s.config&&((Ne=s==null?void 0:s.config)==null?void 0:Ne.length)>0&&n.isSuperAdmin?(t.openBlock(),t.createElementBlock("span",Mt,[t.createVNode(x,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(w,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",ut,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s==null?void 0:s.config,A=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:A.id,onClick:Ue=>n.clickMenuIcon(s,A)},[t.createVNode(w,{name:A==null?void 0:A.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(A==null?void 0:A.operateType),1)],8,xt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((P=n.renderMenuList)==null?void 0:P.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:p[0]||(p[0]=(...s)=>n.handleMenuCollapse&&n.handleMenuCollapse(...s))},[t.createVNode(w,{name:n.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(q,{class:"module-dialog",title:n.dialogInfo.title,visible:n.dialogInfo.show,width:n.dialogInfo.width,onBeforeDestroy:n.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",qt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.dialogRenderComps,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.getComponents((s==null?void 0:s.comp)??"Input")),{itemData:s==null?void 0:s.compData,key:s==null?void 0:s.id,content:(s==null?void 0:s.contents)??[],config:s==null?void 0:s.config,onContentChange:n.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(I,{id:"themeBorderButton",onClick:n.beforeDialogDestroy},{default:t.withCtx(()=>p[1]||(p[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(I,{id:"themeButton",onClick:n.clickSubmitForm},{default:t.withCtx(()=>p[2]||(p[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const He=bt._export_sfc(wt,[["render",At],["__scopeId","data-v-b8641e04"]]),Kt=Object.freeze(Object.defineProperty({__proto__:null,addSelectMenu:Oe,default:He,deleteSelectMenu:Re,fixSelectMenu:ze,setComponent:Ze},Symbol.toStringTag,{value:"Module"}));exports._sfc_main=Ye;exports.index=Kt;exports.ssMenu=je;exports.ssVMenu=He;
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { watch as be, ref as w, computed as we } from "vue";
|
|
2
|
+
import { i as E, f as B, w as Le } from "./index-RSaGZhb3.js";
|
|
3
|
+
import { s as Te, b as V, p as C, u as Re, g as De, c as A, h as Ee, T as Be, V as Ae, W as Pe, X as Ue, Y as xe, Z as Se } from "./menu-CtG1loFf.js";
|
|
4
|
+
import { f as N, E as ke } from "./index-QG4F5kTH.js";
|
|
5
|
+
import { s as z } from "./request-CoGtW0Ux.js";
|
|
6
|
+
const qe = V(C), { systemUrl: f } = Te(qe);
|
|
7
|
+
let P = f.value === "" || !f.value ? "http://222.92.178.198:63002" : f.value;
|
|
8
|
+
be(
|
|
9
|
+
() => f.value,
|
|
10
|
+
() => {
|
|
11
|
+
P = f.value === "" || !f.value ? "http://222.92.178.198:63002" : f.value;
|
|
12
|
+
},
|
|
13
|
+
{ deep: !0, immediate: !0 }
|
|
14
|
+
);
|
|
15
|
+
function Ne(s) {
|
|
16
|
+
return z({
|
|
17
|
+
url: `${P}/platform/import_data`,
|
|
18
|
+
method: "post",
|
|
19
|
+
data: s
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function Fe(s) {
|
|
23
|
+
return z({
|
|
24
|
+
url: `${P}/platform/export_data`,
|
|
25
|
+
method: "post",
|
|
26
|
+
data: s,
|
|
27
|
+
responseType: "blob"
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function Ve(s = "") {
|
|
31
|
+
const r = s.match(/filename\*=UTF-8''([^;]+)/i);
|
|
32
|
+
if (r)
|
|
33
|
+
return decodeURIComponent(r[1]);
|
|
34
|
+
const i = s.match(/filename=["']?([^"';]+)["']?/);
|
|
35
|
+
return i ? i[1] : "download.xlsx";
|
|
36
|
+
}
|
|
37
|
+
const Ce = (s) => {
|
|
38
|
+
var I, g;
|
|
39
|
+
const r = ((I = s == null ? void 0 : s.headers) == null ? void 0 : I["content-type"]) || "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", i = new Blob([s.data], { type: r }), L = (g = s == null ? void 0 : s.headers) == null ? void 0 : g["content-disposition"], h = Ve(L) || "数据.xlsx", c = window.URL.createObjectURL(i), u = document.createElement("a");
|
|
40
|
+
u.href = c, u.setAttribute("download", h), document.body.appendChild(u), u.click(), document.body.removeChild(u), window.URL.revokeObjectURL(c);
|
|
41
|
+
}, Ke = [
|
|
42
|
+
{
|
|
43
|
+
label: "编辑",
|
|
44
|
+
value: "edit"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "删除",
|
|
48
|
+
value: "delete"
|
|
49
|
+
}
|
|
50
|
+
], F = "role", m = {
|
|
51
|
+
ENABLE: {
|
|
52
|
+
value: "enable",
|
|
53
|
+
label: "启用",
|
|
54
|
+
tag: "primary"
|
|
55
|
+
},
|
|
56
|
+
DISABLED: {
|
|
57
|
+
value: "disabled",
|
|
58
|
+
label: "禁用",
|
|
59
|
+
tag: "info"
|
|
60
|
+
}
|
|
61
|
+
}, d = {
|
|
62
|
+
EDITABLE: {
|
|
63
|
+
value: "editable",
|
|
64
|
+
label: "可编辑",
|
|
65
|
+
tag: "primary"
|
|
66
|
+
},
|
|
67
|
+
DISABLED: {
|
|
68
|
+
value: "disabled",
|
|
69
|
+
label: "不可编辑",
|
|
70
|
+
tag: "info"
|
|
71
|
+
}
|
|
72
|
+
}, ze = {
|
|
73
|
+
TABLE: {
|
|
74
|
+
value: "Table"
|
|
75
|
+
}
|
|
76
|
+
}, Oe = ["查看", "查看三维模型", "导出paraform", "导出", "导出全部", "导出选中"], Xe = () => {
|
|
77
|
+
const s = V(), r = Re(C), { isSuperAdmin: i, userId: L, userName: h, platId: c } = De(), u = w([]), I = (t) => {
|
|
78
|
+
const { propertyType: e } = t || {};
|
|
79
|
+
return e === ze.TABLE.value;
|
|
80
|
+
}, g = w({}), O = we(() => {
|
|
81
|
+
var e;
|
|
82
|
+
return i.value ? !0 : ((e = g.value) == null ? void 0 : e.status) === d.EDITABLE.value;
|
|
83
|
+
}), G = (t) => {
|
|
84
|
+
var o, l;
|
|
85
|
+
const e = N(Date.now()), { id: a = 0 } = s.loginUserInfo || {}, n = A(t);
|
|
86
|
+
return n.update_user_id = a, n.update_user_name = h.value, n.update_time = e, n.checked_ids = ((l = (o = n == null ? void 0 : n.main_ids) == null ? void 0 : o.map) == null ? void 0 : l.call(o, (p) => {
|
|
87
|
+
const { id: _ } = p;
|
|
88
|
+
return _;
|
|
89
|
+
})) || [], n;
|
|
90
|
+
}, U = (t) => {
|
|
91
|
+
let e = [];
|
|
92
|
+
return t.forEach((a) => {
|
|
93
|
+
var n;
|
|
94
|
+
if (a.isPropertyLeaf) {
|
|
95
|
+
const o = A(a);
|
|
96
|
+
e.push(o);
|
|
97
|
+
}
|
|
98
|
+
a.children && ((n = a.children) == null ? void 0 : n.length) > 0 && (e = e.concat(U(a.children)));
|
|
99
|
+
}), e;
|
|
100
|
+
}, x = (t = []) => {
|
|
101
|
+
let e = [];
|
|
102
|
+
for (let a = 0; a < t.length; a++) {
|
|
103
|
+
const n = t[a], o = n.children || [];
|
|
104
|
+
delete n.children, e.push(n), o && o.length > 0 && (e = e.concat(x(o)));
|
|
105
|
+
}
|
|
106
|
+
return e;
|
|
107
|
+
}, M = (t) => {
|
|
108
|
+
let e = [];
|
|
109
|
+
return t.forEach((a) => {
|
|
110
|
+
if (a.isPropertyLeaf) {
|
|
111
|
+
const n = x(a.params);
|
|
112
|
+
e = e.concat(n);
|
|
113
|
+
}
|
|
114
|
+
}), e;
|
|
115
|
+
}, S = (t, e) => {
|
|
116
|
+
const a = s.loginUserInfo, { id: n = 0 } = a || {}, o = N(Date.now());
|
|
117
|
+
let l = {
|
|
118
|
+
name: "",
|
|
119
|
+
code: "",
|
|
120
|
+
order_no: 1,
|
|
121
|
+
data_scope: 1,
|
|
122
|
+
remark: "",
|
|
123
|
+
tenant_id: "",
|
|
124
|
+
create_time: o,
|
|
125
|
+
update_time: o,
|
|
126
|
+
create_user_id: n,
|
|
127
|
+
create_user_name: h.value,
|
|
128
|
+
update_user_id: n,
|
|
129
|
+
update_user_name: h.value,
|
|
130
|
+
status: m.ENABLE.value,
|
|
131
|
+
main_ids: [],
|
|
132
|
+
checked_ids: [],
|
|
133
|
+
params: []
|
|
134
|
+
};
|
|
135
|
+
const { checkAll: p, tree: _ } = e || {};
|
|
136
|
+
if (p && _) {
|
|
137
|
+
const v = U(_), Ie = v.map((D) => ({
|
|
138
|
+
...D,
|
|
139
|
+
department_scope: "unlimited"
|
|
140
|
+
}));
|
|
141
|
+
l.main_ids = Ie, l.checked_ids = v.map((D) => D.id), l.params = M(v);
|
|
142
|
+
}
|
|
143
|
+
if (t) {
|
|
144
|
+
const v = G(t);
|
|
145
|
+
l = {
|
|
146
|
+
...l,
|
|
147
|
+
...v
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
return l;
|
|
151
|
+
}, T = (t) => {
|
|
152
|
+
const e = [t];
|
|
153
|
+
return {
|
|
154
|
+
platId: c.value,
|
|
155
|
+
changeRoleData: e
|
|
156
|
+
};
|
|
157
|
+
}, $ = async (t) => await xe({
|
|
158
|
+
platId: t
|
|
159
|
+
}), j = async () => {
|
|
160
|
+
var e;
|
|
161
|
+
r.setImportLoading(!0);
|
|
162
|
+
const t = await $(c.value).finally(() => {
|
|
163
|
+
r.setImportLoading(!1);
|
|
164
|
+
});
|
|
165
|
+
return (e = t == null ? void 0 : t.data) == null ? void 0 : e.result;
|
|
166
|
+
}, k = () => ({
|
|
167
|
+
name: ""
|
|
168
|
+
}), b = w(k()), H = () => {
|
|
169
|
+
b.value = k();
|
|
170
|
+
}, y = w({
|
|
171
|
+
pageNum: 1,
|
|
172
|
+
pageSize: 10,
|
|
173
|
+
total: 0,
|
|
174
|
+
pageSizes: [5, 10, 20, 50, 100]
|
|
175
|
+
}), Q = (t) => {
|
|
176
|
+
y.value.pageNum = t;
|
|
177
|
+
}, W = (t) => {
|
|
178
|
+
y.value.pageSize = t;
|
|
179
|
+
}, K = () => ({
|
|
180
|
+
platId: c.value,
|
|
181
|
+
pageNum: y.value.pageNum,
|
|
182
|
+
pageSize: y.value.pageSize,
|
|
183
|
+
filter: {
|
|
184
|
+
...b.value
|
|
185
|
+
}
|
|
186
|
+
}), X = async (t) => {
|
|
187
|
+
var a;
|
|
188
|
+
const e = await Se(t);
|
|
189
|
+
return (a = e == null ? void 0 : e.data) == null ? void 0 : a.result;
|
|
190
|
+
}, Y = async () => {
|
|
191
|
+
const t = K(), e = await X(t), { total: a } = e || {};
|
|
192
|
+
return y.value.total = a, e || {};
|
|
193
|
+
}, Z = async (t) => {
|
|
194
|
+
delete t.role_id;
|
|
195
|
+
const e = T(t);
|
|
196
|
+
await Ue(e);
|
|
197
|
+
}, J = async (t) => {
|
|
198
|
+
r.setImportLoading(!0), await Z(t).finally(() => {
|
|
199
|
+
r.setImportLoading(!1);
|
|
200
|
+
});
|
|
201
|
+
}, ee = async (t) => {
|
|
202
|
+
const e = T(t);
|
|
203
|
+
await Pe(e);
|
|
204
|
+
}, te = async (t) => {
|
|
205
|
+
r.setImportLoading(!0), await ee(t).finally(() => {
|
|
206
|
+
r.setImportLoading(!1);
|
|
207
|
+
});
|
|
208
|
+
}, ae = async (t) => {
|
|
209
|
+
const { role_id: e } = t, a = {
|
|
210
|
+
platId: c.value,
|
|
211
|
+
role_id: [e]
|
|
212
|
+
};
|
|
213
|
+
await Ae(a);
|
|
214
|
+
}, ne = async (t) => {
|
|
215
|
+
await ke.confirm("是否确认要删除", "", {
|
|
216
|
+
showClose: !1,
|
|
217
|
+
confirmButtonText: "确认",
|
|
218
|
+
cancelButtonText: "取消",
|
|
219
|
+
type: "warning",
|
|
220
|
+
modalClass: "delete-role-message-modal",
|
|
221
|
+
confirmButtonClass: "delete-role-confirm"
|
|
222
|
+
}), r.setImportLoading(!0), await ae(t).finally(() => {
|
|
223
|
+
r.setImportLoading(!1);
|
|
224
|
+
});
|
|
225
|
+
}, oe = (t) => {
|
|
226
|
+
const e = t.toUpperCase(), a = m == null ? void 0 : m[e];
|
|
227
|
+
return (a == null ? void 0 : a.label) || t;
|
|
228
|
+
}, se = (t) => {
|
|
229
|
+
const e = t.toUpperCase(), a = m == null ? void 0 : m[e];
|
|
230
|
+
return (a == null ? void 0 : a.tag) || "info";
|
|
231
|
+
}, re = async (t) => {
|
|
232
|
+
var a;
|
|
233
|
+
const e = await Be(t);
|
|
234
|
+
return ((a = e == null ? void 0 : e.data) == null ? void 0 : a.result) || [];
|
|
235
|
+
}, le = async (t) => {
|
|
236
|
+
const e = {
|
|
237
|
+
platId: c.value,
|
|
238
|
+
includeHidden: !0,
|
|
239
|
+
roleIds: t
|
|
240
|
+
};
|
|
241
|
+
r.setImportLoading(!0);
|
|
242
|
+
const a = await re(e).finally(() => {
|
|
243
|
+
r.setImportLoading(!1);
|
|
244
|
+
});
|
|
245
|
+
u.value = a;
|
|
246
|
+
}, ce = (t = "") => {
|
|
247
|
+
const e = t.toUpperCase(), a = d == null ? void 0 : d[e];
|
|
248
|
+
return (a == null ? void 0 : a.label) || t;
|
|
249
|
+
}, ie = (t = "") => {
|
|
250
|
+
const e = t.toUpperCase(), a = d == null ? void 0 : d[e];
|
|
251
|
+
return (a == null ? void 0 : a.tag) || "info";
|
|
252
|
+
}, R = (t) => t === d.EDITABLE.value, ue = (t, e) => {
|
|
253
|
+
const { status: a } = t || {}, { tableOperate: n } = e || {};
|
|
254
|
+
return !!(R(a) || n && Oe.includes(n));
|
|
255
|
+
}, pe = (t, e) => {
|
|
256
|
+
const { status: a } = t || {};
|
|
257
|
+
return R(a);
|
|
258
|
+
}, de = (t, e) => {
|
|
259
|
+
if (i.value)
|
|
260
|
+
return !0;
|
|
261
|
+
const { type: a } = e || {};
|
|
262
|
+
if (E.TABLE === a)
|
|
263
|
+
return ue(t, e);
|
|
264
|
+
if (E.FORM === a)
|
|
265
|
+
return pe(t);
|
|
266
|
+
const { status: n } = t || {};
|
|
267
|
+
return R(n);
|
|
268
|
+
}, me = async () => {
|
|
269
|
+
var n, o;
|
|
270
|
+
const e = {
|
|
271
|
+
pageName: "系统管理/角色管理",
|
|
272
|
+
platId: c.value,
|
|
273
|
+
userId: L.value
|
|
274
|
+
}, a = await Ee(e);
|
|
275
|
+
return (o = (n = a == null ? void 0 : a.data) == null ? void 0 : n.result) == null ? void 0 : o[0];
|
|
276
|
+
}, fe = async () => {
|
|
277
|
+
if (!i.value)
|
|
278
|
+
return g.value = await me(), g;
|
|
279
|
+
}, q = (t) => {
|
|
280
|
+
const e = A(t);
|
|
281
|
+
for (let a = 0; a < e.length; a++) {
|
|
282
|
+
const n = e == null ? void 0 : e[a], { id: o, prop: l, children: p } = n || {};
|
|
283
|
+
n.uniqueKey = `${o}_${l}`, p && (n.children = q(p));
|
|
284
|
+
}
|
|
285
|
+
return e;
|
|
286
|
+
}, ge = async (t) => {
|
|
287
|
+
var a;
|
|
288
|
+
const e = await Ne(t);
|
|
289
|
+
return (a = e == null ? void 0 : e.data) == null ? void 0 : a.result;
|
|
290
|
+
}, ye = async (t) => {
|
|
291
|
+
const e = new FormData(), a = S(), { create_user_id: n, update_user_id: o, create_user_name: l, update_user_name: p } = a;
|
|
292
|
+
return e.set("platId", c.value), e.set("file", t), e.set("tableType", F), e.set("create_user_id", n), e.set("update_user_id", o), e.set("create_user_name", l), e.set("update_user_name", p), await ge(e);
|
|
293
|
+
}, he = async (t) => await Fe(t), _e = async () => {
|
|
294
|
+
const t = {
|
|
295
|
+
platId: c.value,
|
|
296
|
+
tableType: F,
|
|
297
|
+
filter: b.value
|
|
298
|
+
}, e = await he(t);
|
|
299
|
+
return Ce(e), e;
|
|
300
|
+
}, ve = [["名称", "编码", "备注", "状态"]];
|
|
301
|
+
return {
|
|
302
|
+
compType: E,
|
|
303
|
+
isTableFeature: I,
|
|
304
|
+
queryInfo: b,
|
|
305
|
+
resetQuery: H,
|
|
306
|
+
pageInfo: y,
|
|
307
|
+
setPageNum: Q,
|
|
308
|
+
setPageSize: W,
|
|
309
|
+
initGetByPage: Y,
|
|
310
|
+
initRoleList: j,
|
|
311
|
+
initCreate: J,
|
|
312
|
+
initUpdate: te,
|
|
313
|
+
initDelete: ne,
|
|
314
|
+
initRoleRequestData: T,
|
|
315
|
+
initPropertyAuthTree: le,
|
|
316
|
+
propertyAuthTree: u,
|
|
317
|
+
initRoleItem: S,
|
|
318
|
+
isSuperAdmin: i,
|
|
319
|
+
getStatusLabelByValue: oe,
|
|
320
|
+
getStatusTagByValue: se,
|
|
321
|
+
getFeatureStatusLabelByValue: ce,
|
|
322
|
+
getFeatureStatusTagByValue: ie,
|
|
323
|
+
hasEditable: de,
|
|
324
|
+
initRoleConfig: fe,
|
|
325
|
+
hasRoleEditAuth: O,
|
|
326
|
+
buildParamAuthTree: q,
|
|
327
|
+
initImport: ye,
|
|
328
|
+
initExport: _e,
|
|
329
|
+
exportTemplate: async () => {
|
|
330
|
+
const t = B.aoa_to_sheet(ve), e = B.book_new();
|
|
331
|
+
B.book_append_sheet(e, t, "角色"), Le(e, "角色模板.xlsx");
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
export {
|
|
336
|
+
Ne as a,
|
|
337
|
+
Fe as e,
|
|
338
|
+
d as f,
|
|
339
|
+
Ce as i,
|
|
340
|
+
Ke as o,
|
|
341
|
+
m as s,
|
|
342
|
+
Xe as u
|
|
343
|
+
};
|