ss-component-new 1.3.697 → 1.3.698

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.
@@ -0,0 +1,365 @@
1
+ import { defineComponent as q, ref as f, onMounted as L, resolveComponent as N, createElementBlock as F, openBlock as T, createVNode as y, withCtx as g, createElementVNode as E, Fragment as Q, renderList as X, withModifiers as $, normalizeStyle as Y, toDisplayString as M, createTextVNode as H, computed as Z, watch as A, nextTick as ee, onUnmounted as te } from "vue";
2
+ import { g as K, E as ae, f as ne, c as oe, a as le, u as se, b as ie, d as ue, v as re } from "./index.vue_vue_type_script_setup_true_lang-Dj5jZLRU.js";
3
+ import { s as de, t as ce, a as fe } from "./header-R5IfoKTX.js";
4
+ import { s as me } from "./index-BKoAuSBh.js";
5
+ import { c as pe, p as U, s as G, u as ve } from "./menu-Blo579Ai.js";
6
+ import { _ as J } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ import { l as ye } from "./index-By70dOai.js";
8
+ import "vue-router";
9
+ const we = { class: "main-content" }, _e = { class: "menu-config-wrap" }, ge = ["onClick"], Ce = { class: "form-content" }, he = { class: "dialog-footer" }, be = /* @__PURE__ */ q({
10
+ __name: "index",
11
+ setup(V) {
12
+ const h = f([
13
+ {
14
+ prop: "id",
15
+ label: "编号"
16
+ },
17
+ {
18
+ prop: "account",
19
+ label: "账号"
20
+ },
21
+ {
22
+ prop: "password",
23
+ label: "密码"
24
+ },
25
+ {
26
+ prop: "business_type",
27
+ label: "平台名称"
28
+ },
29
+ {
30
+ prop: "type",
31
+ label: "平台类型"
32
+ },
33
+ {
34
+ prop: "version",
35
+ label: "平台版本"
36
+ },
37
+ {
38
+ prop: "operate",
39
+ label: "操作",
40
+ type: "operate"
41
+ }
42
+ ]), c = f(""), m = f(720), w = f(!1), i = f({}), x = f(), _ = f([]), e = f([]), B = f([
43
+ {
44
+ label: "新增"
45
+ }
46
+ ]), b = f([
47
+ {
48
+ label: "修改"
49
+ }
50
+ ]);
51
+ L(async () => {
52
+ var n, u, s;
53
+ e.value = (n = h.value) == null ? void 0 : n.map((a) => a == null ? void 0 : a.label);
54
+ let l = await K({});
55
+ _.value = ((s = (u = l == null ? void 0 : l.data) == null ? void 0 : u.result) == null ? void 0 : s.sort((a, d) => parseInt(a == null ? void 0 : a.platId) - parseInt(d == null ? void 0 : d.platId))) ?? [];
56
+ });
57
+ const t = (l, n, u) => {
58
+ l === "新增" ? (c.value = "新增", o(""), w.value = !0) : l === "修改" && (c.value = "修改", o(n), w.value = !0);
59
+ }, o = (l) => {
60
+ var u, s;
61
+ const n = [];
62
+ for (let a in l)
63
+ Array.isArray(l == null ? void 0 : l[a]);
64
+ (s = (u = pe(h.value)) == null ? void 0 : u.filter((a) => (a == null ? void 0 : a.label) !== "操作")) == null || s.forEach((a) => {
65
+ n.push({
66
+ label: a == null ? void 0 : a.label,
67
+ prop: a == null ? void 0 : a.prop,
68
+ name: a == null ? void 0 : a.prop,
69
+ type: "Input",
70
+ value: (l == null ? void 0 : l[a == null ? void 0 : a.prop]) ?? "",
71
+ width: 2,
72
+ disabled: (a == null ? void 0 : a.prop) === "id"
73
+ });
74
+ }), x.value = n;
75
+ }, p = (l) => {
76
+ i.value = l;
77
+ }, v = async () => {
78
+ var u, s, a, d, S, r, I, D, O, j, z, P, R, W;
79
+ if (c.value === "新增" && ((u = _.value) != null && u.find((C) => {
80
+ var k;
81
+ return (C == null ? void 0 : C.account) === ((k = i.value) == null ? void 0 : k.account);
82
+ }))) {
83
+ ae.error("创建失败,账号密码重复");
84
+ return;
85
+ }
86
+ w.value = !1;
87
+ const l = ne(Date.now());
88
+ c.value === "新增" ? await oe({
89
+ userName: (s = i.value) == null ? void 0 : s.account,
90
+ password: (a = i.value) == null ? void 0 : a.password,
91
+ platName: (d = i.value) == null ? void 0 : d.business_type,
92
+ platType: (S = i.value) == null ? void 0 : S.type,
93
+ platVersion: (r = i.value) == null ? void 0 : r.version,
94
+ platCreatedAt: l,
95
+ platUpdatedAt: l
96
+ }) : c.value === "修改" && await le({
97
+ platId: parseInt((I = i.value) == null ? void 0 : I.id),
98
+ userName: (D = i.value) == null ? void 0 : D.account,
99
+ password: (O = i.value) == null ? void 0 : O.password,
100
+ platName: (j = i.value) == null ? void 0 : j.business_type,
101
+ platType: (z = i.value) == null ? void 0 : z.type,
102
+ platVersion: (P = i.value) == null ? void 0 : P.version,
103
+ platUpdatedAt: l
104
+ });
105
+ let n = await K({});
106
+ _.value = ((W = (R = n == null ? void 0 : n.data) == null ? void 0 : R.result) == null ? void 0 : W.sort((C, k) => parseInt(C == null ? void 0 : C.id) - parseInt(k == null ? void 0 : k.id))) ?? [];
107
+ };
108
+ return (l, n) => {
109
+ const u = N("svg-icon"), s = N("el-popover"), a = N("el-button");
110
+ return T(), F("div", we, [
111
+ y(de, {
112
+ columns: h.value,
113
+ tableData: _.value,
114
+ checkedColumns: e.value,
115
+ isShowEdit: !1,
116
+ isShowDelete: !1,
117
+ style: { width: "80%", height: "70%" },
118
+ extraButton: B.value,
119
+ rowButton: b.value
120
+ }, {
121
+ headerButton: g((d) => {
122
+ var S;
123
+ return [
124
+ y(ce, {
125
+ dataNums: (S = _.value) == null ? void 0 : S.length,
126
+ buttons: d.buttons,
127
+ onButtonClick: n[0] || (n[0] = (r, I, D) => t(r, I)),
128
+ columns: h.value
129
+ }, null, 8, ["dataNums", "buttons", "columns"])
130
+ ];
131
+ }),
132
+ actions: g(({ item: d, fIndex: S }) => [
133
+ y(s, {
134
+ title: "",
135
+ placement: "left-start",
136
+ "popper-class": "menu-operate-popover"
137
+ }, {
138
+ reference: g(() => [
139
+ y(u, {
140
+ name: "more",
141
+ style: { cursor: "pointer", width: "15px", height: "15px" },
142
+ onClick: n[1] || (n[1] = $(() => {
143
+ }, ["stop"]))
144
+ })
145
+ ]),
146
+ default: g(() => [
147
+ E("div", _e, [
148
+ (T(!0), F(Q, null, X(b.value, (r, I) => (T(), F("div", {
149
+ class: "menu-config-item",
150
+ key: I,
151
+ onClick: $((D) => t(r == null ? void 0 : r.label, d), ["stop"])
152
+ }, [
153
+ E("div", {
154
+ style: Y({ color: r == null ? void 0 : r.textColor }),
155
+ class: "extra-button-label"
156
+ }, M(r == null ? void 0 : r.label), 5)
157
+ ], 8, ge))), 128))
158
+ ])
159
+ ]),
160
+ _: 2
161
+ }, 1024)
162
+ ]),
163
+ _: 1
164
+ }, 8, ["columns", "tableData", "checkedColumns", "extraButton", "rowButton"]),
165
+ y(me, {
166
+ title: c.value,
167
+ visible: w.value,
168
+ width: m.value,
169
+ onBeforeDestroy: n[4] || (n[4] = (d) => w.value = !1),
170
+ style: { height: "74%" }
171
+ }, {
172
+ default: g(() => [
173
+ E("div", Ce, [
174
+ y(fe, {
175
+ rowContents: x.value,
176
+ isEnableWrap: !1,
177
+ showOperator: !1,
178
+ onChange: p
179
+ }, null, 8, ["rowContents"])
180
+ ])
181
+ ]),
182
+ footer: g(() => [
183
+ E("div", he, [
184
+ y(a, {
185
+ onClick: n[2] || (n[2] = (d) => w.value = !1),
186
+ id: "themeBorderButton"
187
+ }, {
188
+ default: g(() => n[5] || (n[5] = [
189
+ H(M("取消"))
190
+ ])),
191
+ _: 1,
192
+ __: [5]
193
+ }),
194
+ y(a, {
195
+ class: "ok-button",
196
+ onClick: n[3] || (n[3] = (d) => v()),
197
+ id: "themeButton"
198
+ }, {
199
+ default: g(() => n[6] || (n[6] = [
200
+ H(M("确认"))
201
+ ])),
202
+ _: 1,
203
+ __: [6]
204
+ })
205
+ ])
206
+ ]),
207
+ _: 1
208
+ }, 8, ["title", "visible", "width"])
209
+ ]);
210
+ };
211
+ }
212
+ }), Se = /* @__PURE__ */ J(be, [["__scopeId", "data-v-42e01e88"]]), Ie = /* @__PURE__ */ q({
213
+ __name: "index",
214
+ props: {
215
+ windowConfig: {
216
+ type: Object,
217
+ default: () => {
218
+ }
219
+ },
220
+ systemInfo: {
221
+ type: Object,
222
+ default: () => {
223
+ }
224
+ },
225
+ systemKey: {
226
+ type: String,
227
+ default: ""
228
+ },
229
+ pathContent: {
230
+ type: String,
231
+ default: ""
232
+ },
233
+ mode: {
234
+ type: String,
235
+ default: "view"
236
+ },
237
+ content: {
238
+ type: String,
239
+ default: ""
240
+ },
241
+ jsonContents: {
242
+ type: Array,
243
+ default: () => []
244
+ },
245
+ showButton: {
246
+ type: Boolean,
247
+ default: !1
248
+ },
249
+ nodeDev: {
250
+ type: String,
251
+ default: ""
252
+ },
253
+ pageKey: {
254
+ type: String,
255
+ default: ""
256
+ },
257
+ interfaceContent: {
258
+ type: Array,
259
+ default: () => []
260
+ },
261
+ loginContent: {
262
+ type: Object,
263
+ default: () => {
264
+ }
265
+ },
266
+ menuFiles: {
267
+ type: Array,
268
+ default: () => []
269
+ },
270
+ workspaceHistoryData: {
271
+ type: Array,
272
+ default: () => []
273
+ },
274
+ // 用于打开/拣选工作区
275
+ workspaceInfo: {
276
+ type: Object,
277
+ default: () => []
278
+ }
279
+ },
280
+ emits: [
281
+ "buildContent",
282
+ "openThreeBuild",
283
+ "threeData",
284
+ "setLoginInfo",
285
+ "projectLogin",
286
+ "updateApiUrl",
287
+ "clearFileContent",
288
+ "systemContent",
289
+ "getMenuPathValue",
290
+ "executeWorkspace",
291
+ "updateVersion"
292
+ ],
293
+ setup(V, { emit: h }) {
294
+ const c = se(U), { loginUserInfo: m } = G(c), { initSystemInfo: w } = ie(), i = ve(U), x = f(!0), { activeMenuPath: _ } = G(i), e = V, B = h;
295
+ Z(() => {
296
+ var t, o;
297
+ return (e == null ? void 0 : e.showButton) || ((o = (t = m.value) == null ? void 0 : t.accounttype) == null ? void 0 : o.toUpperCase()) === "SUPERADMIN";
298
+ }), A(
299
+ () => e == null ? void 0 : e.menuFiles,
300
+ () => {
301
+ var t;
302
+ ((t = e == null ? void 0 : e.menuFiles) == null ? void 0 : t.length) > 0 && i.setLocalFiles(e == null ? void 0 : e.menuFiles);
303
+ },
304
+ { deep: !0, immediate: !0 }
305
+ ), A(
306
+ () => _.value,
307
+ async () => {
308
+ var o, p, v;
309
+ if (!((o = m == null ? void 0 : m.value) != null && o.plat_id)) return;
310
+ let t = await ue({
311
+ platId: parseInt((p = m == null ? void 0 : m.value) == null ? void 0 : p.plat_id)
312
+ });
313
+ t = (v = t == null ? void 0 : t.data) == null ? void 0 : v.result, i.setDataFiles(t), B("getMenuPathValue", _.value);
314
+ },
315
+ { deep: !0, immediate: !0 }
316
+ ), A(
317
+ () => e == null ? void 0 : e.loginContent,
318
+ async () => {
319
+ x.value = !0;
320
+ let t = e == null ? void 0 : e.loginContent;
321
+ if (t != null && t.account && (t != null && t.password) && (await ye(t), status)) {
322
+ let o = await re();
323
+ B("systemContent", o == null ? void 0 : o.allMenuContents), i.setHasClickEditComp(!1);
324
+ }
325
+ x.value = !1, await ee();
326
+ },
327
+ { deep: !0, immediate: !0 }
328
+ ), A(
329
+ () => [e == null ? void 0 : e.systemKey, e == null ? void 0 : e.systemInfo],
330
+ async ([t, o]) => {
331
+ c.setSystemKey(t), t !== "" && sessionStorage.setItem("systemKey", t);
332
+ },
333
+ { immediate: !0 }
334
+ ), A(
335
+ () => e == null ? void 0 : e.interfaceContent,
336
+ () => {
337
+ var p, v, l, n, u;
338
+ if (!(e != null && e.interfaceContent) || Array.isArray(e == null ? void 0 : e.interfaceContent) && ((p = e == null ? void 0 : e.interfaceContent) == null ? void 0 : p.length) === 0)
339
+ return;
340
+ let t = (v = e == null ? void 0 : e.interfaceContent) == null ? void 0 : v.find((s) => s == null ? void 0 : s.includes("VITE_API_NEW_URL")), o = (l = e == null ? void 0 : e.interfaceContent) == null ? void 0 : l.find((s) => s == null ? void 0 : s.includes("VITE_FACE_RECOGNITION_API_URL"));
341
+ o = (n = o == null ? void 0 : o.split("=")) == null ? void 0 : n[1], o = o == null ? void 0 : o.trim(), t = (u = t == null ? void 0 : t.split("=")) == null ? void 0 : u[1], t = t == null ? void 0 : t.trim(), c.setExtraUrl(o ?? ""), c.setSystemUrl(t ?? "");
342
+ },
343
+ { immediate: !0, deep: !0 }
344
+ ), L(async () => {
345
+ e.systemInfo ? c.setSystemInfo(e.systemInfo) : await w();
346
+ });
347
+ const b = () => {
348
+ var u, s, a;
349
+ const t = e != null && e.windowConfig ? (u = e == null ? void 0 : e.windowConfig) == null ? void 0 : u.width : window.innerWidth, o = (s = e == null ? void 0 : e.windowConfig) != null && s.height ? (a = e == null ? void 0 : e.windowConfig) == null ? void 0 : a.height : window.innerHeight;
350
+ i.setSystemHeight(o);
351
+ const p = 1920, v = 16, l = t / p, n = v * l;
352
+ document.documentElement.style.fontSize = `${n}px`;
353
+ };
354
+ return L(() => {
355
+ b(), window.addEventListener("resize", b);
356
+ }), te(() => {
357
+ window.removeEventListener("resize", b);
358
+ }), (t, o) => (T(), F("div", null, [
359
+ y(Se)
360
+ ]));
361
+ }
362
+ }), Ne = /* @__PURE__ */ J(Ie, [["__scopeId", "data-v-42b1c3ed"]]);
363
+ export {
364
+ Ne as default
365
+ };