@okiss/oms 0.0.78 → 0.0.80
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/index.es.js +1233 -1368
- package/dist/index.es.js.map +1 -1
- package/dist/oms.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -4
package/dist/index.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { normalizeTheme as
|
|
3
|
-
import { defineStore as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import { ref as R, watch as en, computed as w, defineComponent as K, onBeforeMount as ut, provide as tn, resolveComponent as A, createBlock as h, openBlock as a, createVNode as u, createTextVNode as C, withCtx as r, TransitionGroup as nn, createElementBlock as y, Fragment as O, renderList as q, toDisplayString as N, normalizeClass as Z, renderSlot as re, createCommentVNode as B, mergeProps as Q, toRefs as on, unref as p, isRef as dt, onMounted as Ue, normalizeStyle as ln, createElementVNode as v, withKeys as Ze, withModifiers as Ye, resolveDynamicComponent as pt, Transition as sn, normalizeProps as le, guardReactiveProps as ke, withDirectives as Ce, vModelText as Te, onUnmounted as an, getCurrentInstance as rn, h as cn, toRaw as un, createApp as dn } from "vue";
|
|
2
|
+
import { normalizeTheme as ce, applyDocumentTheme as pn, dispatchThemeChange as mn, addNewStyle as fn, addNewStyleTag as hn, queryParams as bn, logGroup as yn, compactObject as mt, showEleByClassName as ft, waterMarker as _n, Cache as fe, isExternal as et, getQueryParam as ht, createIFrame as vn, strVarReplace as ne, obj2Param as gn, isObject as _e, isString as bt, effectDataTrans as kn, isArray as wn } from "@okiss/utils";
|
|
3
|
+
import { defineStore as we, createPinia as Sn } from "pinia";
|
|
4
|
+
import de from "js-cookie";
|
|
5
|
+
import yt from "element-plus/es/locale/lang/zh-cn";
|
|
6
|
+
import xn, { cloneDeep as S, merge as z, get as ue, unset as _t, isObject as En } from "lodash";
|
|
7
|
+
import Be from "mockjs";
|
|
8
|
+
import Ve from "axios";
|
|
9
|
+
import In, { ElMessageBox as vt, ElMessage as Cn, ElCol as Tn, ElRow as Bn, ElCard as Rn } from "element-plus";
|
|
10
10
|
import "element-plus/dist/index.css";
|
|
11
11
|
import "element-plus/theme-chalk/dark/css-vars.css";
|
|
12
12
|
import "dayjs/locale/zh-cn";
|
|
13
|
-
import { useRoute as
|
|
14
|
-
import { ElBreadcrumb as
|
|
13
|
+
import { useRoute as se, useRouter as Se, onBeforeRouteLeave as On, createRouter as $n, createWebHashHistory as An, onBeforeRouteUpdate as Pn } from "vue-router";
|
|
14
|
+
import { ElBreadcrumb as Ln, ElBreadcrumbItem as Mn, ElContainer as Dn, ElRow as xe, ElMain as jn, ElAside as Nn, ElForm as gt, ElFormItem as kt, ElSelect as qe, ElOption as He, ElDivider as wt, ElButton as pe, ElCol as Fe, ElDrawer as St, ElTooltip as Un, ElIcon as Vn, ElDropdown as qn, ElDropdownMenu as Hn, ElDropdownItem as Fn, ElMenuItem as Gn, ElSubMenu as zn, ElOptionGroup as Kn, ElScrollbar as Jn, ElMenu as Wn, ElBacktop as Qn, ElMessage as Xn, ElAlert as xt, ElCard as Zn, ElTree as Yn } from "element-plus/es";
|
|
15
15
|
import "element-plus/es/components/base/style/css";
|
|
16
16
|
import "element-plus/es/components/row/style/css";
|
|
17
17
|
import "element-plus/es/components/drawer/style/css";
|
|
@@ -23,7 +23,7 @@ import "element-plus/es/components/icon/style/css";
|
|
|
23
23
|
import "element-plus/es/components/col/style/css";
|
|
24
24
|
import "element-plus/es/components/breadcrumb/style/css";
|
|
25
25
|
import "element-plus/es/components/breadcrumb-item/style/css";
|
|
26
|
-
import * as
|
|
26
|
+
import * as eo from "path-to-regexp";
|
|
27
27
|
import "element-plus/es/components/form/style/css";
|
|
28
28
|
import "element-plus/es/components/form-item/style/css";
|
|
29
29
|
import "element-plus/es/components/select/style/css";
|
|
@@ -33,25 +33,24 @@ import "element-plus/es/components/divider/style/css";
|
|
|
33
33
|
import "element-plus/es/components/container/style/css";
|
|
34
34
|
import "element-plus/es/components/aside/style/css";
|
|
35
35
|
import "element-plus/es/components/main/style/css";
|
|
36
|
-
import { JsonView as
|
|
36
|
+
import { JsonView as Et, VBtn as Ge, VForm as oe, VTable as ve, setUploadHeaderHandle as to, VIcon as no } from "@okiss/vbtf";
|
|
37
37
|
import "normalize.css/normalize.css";
|
|
38
38
|
import "@okiss/vbtf/style.css";
|
|
39
|
-
import
|
|
40
|
-
import { Moon as
|
|
39
|
+
import oo from "mitt";
|
|
40
|
+
import { Moon as lo, Sunny as so } from "@element-plus/icons-vue";
|
|
41
41
|
import "element-plus/es/components/scrollbar/style/css";
|
|
42
42
|
import "element-plus/es/components/menu/style/css";
|
|
43
43
|
import "element-plus/es/components/sub-menu/style/css";
|
|
44
44
|
import "element-plus/es/components/menu-item/style/css";
|
|
45
45
|
import "element-plus/es/components/option-group/style/css";
|
|
46
46
|
import "element-plus/es/components/backtop/style/css";
|
|
47
|
-
import { useEventListener as
|
|
47
|
+
import { useEventListener as io } from "@vueuse/core";
|
|
48
48
|
import "element-plus/es/components/alert/style/css";
|
|
49
49
|
import "element-plus/es/components/card/style/css";
|
|
50
50
|
import "element-plus/es/components/tree/style/css";
|
|
51
|
-
import
|
|
52
|
-
import so from "crypto-js";
|
|
51
|
+
import ao from "crypto-js";
|
|
53
52
|
import "element-plus/es/components/message/style/css";
|
|
54
|
-
import
|
|
53
|
+
import Le from "nprogress";
|
|
55
54
|
import "nprogress/nprogress.css";
|
|
56
55
|
String.prototype.format || (String.prototype.format = function() {
|
|
57
56
|
const e = arguments;
|
|
@@ -59,29 +58,29 @@ String.prototype.format || (String.prototype.format = function() {
|
|
|
59
58
|
return typeof e[n] < "u" ? e[n] : t;
|
|
60
59
|
});
|
|
61
60
|
});
|
|
62
|
-
const
|
|
63
|
-
function
|
|
64
|
-
return
|
|
61
|
+
const ze = "oms:token";
|
|
62
|
+
function me() {
|
|
63
|
+
return de.get(ze) || "";
|
|
65
64
|
}
|
|
66
|
-
function
|
|
67
|
-
const t =
|
|
68
|
-
return
|
|
65
|
+
function ro(e) {
|
|
66
|
+
const t = U(P), n = new Date((/* @__PURE__ */ new Date()).getTime() + (t.tokenExpire || 1440 * 60 * 1e3));
|
|
67
|
+
return de.set(ze, e, { expires: n });
|
|
69
68
|
}
|
|
70
|
-
function
|
|
71
|
-
return
|
|
69
|
+
function It() {
|
|
70
|
+
return de.remove(ze);
|
|
72
71
|
}
|
|
73
|
-
let
|
|
74
|
-
function
|
|
75
|
-
|
|
72
|
+
let Ct = null;
|
|
73
|
+
function co(e) {
|
|
74
|
+
Ct = e;
|
|
76
75
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
76
|
+
function Re() {
|
|
77
|
+
return Ct;
|
|
79
78
|
}
|
|
80
|
-
const
|
|
79
|
+
const uo = {
|
|
81
80
|
baseURL: "/api",
|
|
82
81
|
withCredentials: !0,
|
|
83
82
|
cacheEnable: !0
|
|
84
|
-
},
|
|
83
|
+
}, Tt = {
|
|
85
84
|
title: "oms",
|
|
86
85
|
fixedHeader: !1,
|
|
87
86
|
sidebarLogo: !0,
|
|
@@ -95,7 +94,7 @@ const ro = {
|
|
|
95
94
|
ElementPlus: {
|
|
96
95
|
size: "default",
|
|
97
96
|
zIndex: 3e3,
|
|
98
|
-
locale:
|
|
97
|
+
locale: yt
|
|
99
98
|
},
|
|
100
99
|
nav: [],
|
|
101
100
|
whiteRoutes: ["/login"],
|
|
@@ -109,24 +108,25 @@ const ro = {
|
|
|
109
108
|
formMutex: !0,
|
|
110
109
|
captcha: !0,
|
|
111
110
|
themeMode: "light"
|
|
112
|
-
},
|
|
113
|
-
axios:
|
|
114
|
-
settings:
|
|
111
|
+
}, Ee = {
|
|
112
|
+
axios: uo,
|
|
113
|
+
settings: Tt,
|
|
115
114
|
plugins: [],
|
|
116
115
|
mock: !1
|
|
117
|
-
},
|
|
118
|
-
state: () => ({ ...
|
|
116
|
+
}, po = S(Tt), U = we("settings", {
|
|
117
|
+
state: () => ({ ...po }),
|
|
119
118
|
actions: {
|
|
120
119
|
updateSettings(e) {
|
|
121
|
-
|
|
120
|
+
z(this, e);
|
|
122
121
|
}
|
|
123
122
|
}
|
|
124
|
-
}),
|
|
123
|
+
}), tt = {
|
|
125
124
|
name: "",
|
|
126
125
|
nickname: "",
|
|
127
126
|
avatar: "",
|
|
128
|
-
token:
|
|
127
|
+
token: me(),
|
|
129
128
|
customRouter: [],
|
|
129
|
+
rawCustomRouter: [],
|
|
130
130
|
remoteRouter: [],
|
|
131
131
|
menuRoutes: [],
|
|
132
132
|
isLodeRemoteRoutes: !1,
|
|
@@ -135,26 +135,36 @@ const ro = {
|
|
|
135
135
|
path: "",
|
|
136
136
|
env: "",
|
|
137
137
|
expired: !1
|
|
138
|
-
},
|
|
139
|
-
state: () => ({ ...
|
|
138
|
+
}, j = we("user", {
|
|
139
|
+
state: () => ({ ...tt }),
|
|
140
140
|
actions: {
|
|
141
141
|
updateToken(e) {
|
|
142
|
-
this.token = e,
|
|
142
|
+
this.token = e, ro(e);
|
|
143
143
|
},
|
|
144
144
|
removeToken() {
|
|
145
|
-
this.token = "",
|
|
145
|
+
this.token = "", It();
|
|
146
146
|
},
|
|
147
147
|
updateRemoteRouter(e) {
|
|
148
148
|
this.remoteRouter = e, this.isLodeRemoteRoutes = !0;
|
|
149
149
|
},
|
|
150
150
|
setCustomRoutes(e) {
|
|
151
|
-
this.customRouter =
|
|
151
|
+
this.customRouter = e;
|
|
152
|
+
},
|
|
153
|
+
addRawCustomRoutes(e) {
|
|
154
|
+
if (!e.length)
|
|
155
|
+
return;
|
|
156
|
+
const t = /* @__PURE__ */ new Map(), n = (o) => typeof o.name == "string" && o.name ? o.name : o.path;
|
|
157
|
+
this.rawCustomRouter.forEach((o) => {
|
|
158
|
+
t.set(n(o), o);
|
|
159
|
+
}), e.forEach((o) => {
|
|
160
|
+
t.set(n(o), S(o));
|
|
161
|
+
}), this.rawCustomRouter = Array.from(t.values());
|
|
152
162
|
},
|
|
153
163
|
updateState({ key: e, value: t }) {
|
|
154
164
|
this[e] = t;
|
|
155
165
|
},
|
|
156
166
|
resetUser() {
|
|
157
|
-
const e = { ...
|
|
167
|
+
const e = { ...tt, token: me() };
|
|
158
168
|
Object.assign(this, e);
|
|
159
169
|
},
|
|
160
170
|
SET_EXPIRED() {
|
|
@@ -163,7 +173,7 @@ const ro = {
|
|
|
163
173
|
// async actions
|
|
164
174
|
login(e) {
|
|
165
175
|
return new Promise((t, n) => {
|
|
166
|
-
const o =
|
|
176
|
+
const o = Re();
|
|
167
177
|
if (!o) {
|
|
168
178
|
n("http client not init");
|
|
169
179
|
return;
|
|
@@ -182,7 +192,7 @@ const ro = {
|
|
|
182
192
|
},
|
|
183
193
|
info() {
|
|
184
194
|
return new Promise((e, t) => {
|
|
185
|
-
const n =
|
|
195
|
+
const n = Re();
|
|
186
196
|
if (!n) {
|
|
187
197
|
t("http client not init");
|
|
188
198
|
return;
|
|
@@ -194,13 +204,13 @@ const ro = {
|
|
|
194
204
|
const l = o.data?.role_ids || [];
|
|
195
205
|
this.updateState({ key: "name", value: o.data?.name }), this.updateState({ key: "nickname", value: o.data?.nickname }), this.updateState({ key: "roleIds", value: l }), this.updateState({ key: "env", value: o.data?.env });
|
|
196
206
|
const s = o.data?.website || {};
|
|
197
|
-
|
|
207
|
+
U().updateSettings(s), !de.get("username") && de.set("username", o.data?.name), e(!0);
|
|
198
208
|
}).catch((o) => t(o));
|
|
199
209
|
});
|
|
200
210
|
},
|
|
201
211
|
loadRemoteRoutes() {
|
|
202
212
|
return new Promise((e, t) => {
|
|
203
|
-
|
|
213
|
+
Re()?.request({
|
|
204
214
|
url: "/user/routes",
|
|
205
215
|
method: "get"
|
|
206
216
|
}).then((o) => {
|
|
@@ -218,9 +228,26 @@ const ro = {
|
|
|
218
228
|
this.SET_EXPIRED();
|
|
219
229
|
}
|
|
220
230
|
}
|
|
221
|
-
}),
|
|
231
|
+
}), Bt = "oms:sidebarStatus", mo = () => {
|
|
232
|
+
if (typeof window > "u")
|
|
233
|
+
return null;
|
|
234
|
+
try {
|
|
235
|
+
return window.localStorage.getItem(Bt);
|
|
236
|
+
} catch {
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
}, nt = (e) => {
|
|
240
|
+
if (!(typeof window > "u"))
|
|
241
|
+
try {
|
|
242
|
+
window.localStorage.setItem(Bt, e);
|
|
243
|
+
} catch {
|
|
244
|
+
}
|
|
245
|
+
}, fo = {
|
|
222
246
|
sidebar: {
|
|
223
|
-
opened:
|
|
247
|
+
opened: (() => {
|
|
248
|
+
const e = mo();
|
|
249
|
+
return e === "1" ? !0 : e !== "0";
|
|
250
|
+
})(),
|
|
224
251
|
withoutAnimation: !1
|
|
225
252
|
},
|
|
226
253
|
device: "desktop",
|
|
@@ -228,14 +255,14 @@ const ro = {
|
|
|
228
255
|
currentRouteMeta: {},
|
|
229
256
|
builderSchema: {},
|
|
230
257
|
baseURL: ""
|
|
231
|
-
},
|
|
232
|
-
state: () => ({ ...
|
|
258
|
+
}, X = we("app", {
|
|
259
|
+
state: () => ({ ...fo }),
|
|
233
260
|
actions: {
|
|
234
261
|
TOGGLE_SIDEBAR() {
|
|
235
|
-
this.sidebar.opened = !this.sidebar.opened, this.sidebar.withoutAnimation = !1,
|
|
262
|
+
this.sidebar.opened = !this.sidebar.opened, this.sidebar.withoutAnimation = !1, nt(this.sidebar.opened ? "1" : "0");
|
|
236
263
|
},
|
|
237
264
|
CLOSE_SIDEBAR(e) {
|
|
238
|
-
|
|
265
|
+
nt("0"), this.sidebar.opened = !1, this.sidebar.withoutAnimation = e;
|
|
239
266
|
},
|
|
240
267
|
TOGGLE_DEVICE(e) {
|
|
241
268
|
this.device = e;
|
|
@@ -275,11 +302,11 @@ const ro = {
|
|
|
275
302
|
this.SET_BASE_API(e);
|
|
276
303
|
}
|
|
277
304
|
}
|
|
278
|
-
}),
|
|
305
|
+
}), ho = {
|
|
279
306
|
currentCellItem: {}
|
|
280
307
|
// form/sub-form 当前单元格编辑数据
|
|
281
|
-
},
|
|
282
|
-
state: () => ({ ...
|
|
308
|
+
}, Ra = we("builderSchema", {
|
|
309
|
+
state: () => ({ ...ho }),
|
|
283
310
|
actions: {
|
|
284
311
|
SET_CURRENT_CELLITEM(e) {
|
|
285
312
|
this.currentCellItem = e;
|
|
@@ -288,58 +315,58 @@ const ro = {
|
|
|
288
315
|
this.SET_CURRENT_CELLITEM(e);
|
|
289
316
|
}
|
|
290
317
|
}
|
|
291
|
-
}),
|
|
292
|
-
function
|
|
293
|
-
e.use(
|
|
318
|
+
}), P = Sn();
|
|
319
|
+
function bo(e) {
|
|
320
|
+
e.use(P);
|
|
294
321
|
}
|
|
295
|
-
const
|
|
296
|
-
let
|
|
297
|
-
function
|
|
298
|
-
const t =
|
|
322
|
+
const Rt = "oms-theme", Ot = R("light");
|
|
323
|
+
let ot = !1, he = null;
|
|
324
|
+
function yo(e) {
|
|
325
|
+
const t = ce(e ?? void 0);
|
|
299
326
|
if (typeof window > "u")
|
|
300
327
|
return t;
|
|
301
|
-
const n = window.localStorage?.getItem(
|
|
328
|
+
const n = window.localStorage?.getItem(Rt);
|
|
302
329
|
return n === "dark" || n === "light" ? n : e === "dark" || e === "light" ? e : window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
303
330
|
}
|
|
304
|
-
function
|
|
305
|
-
typeof window < "u" && window.localStorage?.setItem(
|
|
331
|
+
function _o(e) {
|
|
332
|
+
typeof window < "u" && window.localStorage?.setItem(Rt, e);
|
|
306
333
|
}
|
|
307
|
-
function
|
|
308
|
-
const t =
|
|
309
|
-
|
|
334
|
+
function Oe(e) {
|
|
335
|
+
const t = ce(e);
|
|
336
|
+
Ot.value = t, pn(t), mn(t), _o(t);
|
|
310
337
|
}
|
|
311
|
-
function
|
|
338
|
+
function vo(e) {
|
|
312
339
|
if (typeof window > "u" || typeof window.matchMedia != "function") {
|
|
313
|
-
|
|
340
|
+
he = null;
|
|
314
341
|
return;
|
|
315
342
|
}
|
|
316
343
|
const t = window.matchMedia("(prefers-color-scheme: dark)"), n = (o) => {
|
|
317
344
|
const l = o.matches ?? t.matches;
|
|
318
345
|
e(l ? "dark" : "light");
|
|
319
346
|
};
|
|
320
|
-
typeof t.addEventListener == "function" ? t.addEventListener("change", n) : t.addListener(n),
|
|
321
|
-
typeof t.removeEventListener == "function" ? t.removeEventListener("change", n) : t.removeListener(n),
|
|
347
|
+
typeof t.addEventListener == "function" ? t.addEventListener("change", n) : t.addListener(n), he = () => {
|
|
348
|
+
typeof t.removeEventListener == "function" ? t.removeEventListener("change", n) : t.removeListener(n), he = null;
|
|
322
349
|
};
|
|
323
350
|
}
|
|
324
|
-
function
|
|
325
|
-
const e =
|
|
326
|
-
const
|
|
327
|
-
e.themeMode !==
|
|
351
|
+
function $t() {
|
|
352
|
+
const e = U(), t = (s) => {
|
|
353
|
+
const i = ce(s);
|
|
354
|
+
e.themeMode !== i ? e.updateSettings({ themeMode: i }) : Oe(i);
|
|
328
355
|
};
|
|
329
|
-
if (!
|
|
330
|
-
|
|
331
|
-
const s =
|
|
332
|
-
|
|
356
|
+
if (!ot) {
|
|
357
|
+
ot = !0;
|
|
358
|
+
const s = yo(e.themeMode);
|
|
359
|
+
ce(e.themeMode) !== s ? e.updateSettings({ themeMode: s }) : Oe(s), en(
|
|
333
360
|
() => e.themeMode,
|
|
334
|
-
(
|
|
335
|
-
|
|
361
|
+
(i) => {
|
|
362
|
+
Oe(ce(i));
|
|
336
363
|
},
|
|
337
364
|
{ immediate: !0 }
|
|
338
|
-
),
|
|
339
|
-
t(
|
|
365
|
+
), he?.(), vo((i) => {
|
|
366
|
+
t(i);
|
|
340
367
|
});
|
|
341
368
|
}
|
|
342
|
-
const n =
|
|
369
|
+
const n = w(() => Ot.value), o = w(() => n.value === "dark");
|
|
343
370
|
return {
|
|
344
371
|
themeMode: n,
|
|
345
372
|
isDark: o,
|
|
@@ -349,25 +376,25 @@ function Ot() {
|
|
|
349
376
|
}
|
|
350
377
|
};
|
|
351
378
|
}
|
|
352
|
-
const
|
|
379
|
+
const go = /* @__PURE__ */ K({
|
|
353
380
|
__name: "App",
|
|
354
381
|
setup(e) {
|
|
355
|
-
return
|
|
382
|
+
return $t(), ut(() => {
|
|
356
383
|
const t = document.getElementById("preloader");
|
|
357
|
-
t !== null && (document.body.removeChild(t), document.getElementById("preloader")?.remove(),
|
|
384
|
+
t !== null && (document.body.removeChild(t), document.getElementById("preloader")?.remove(), fn("test-icon", "//at.alicdn.com/t/font_2246548_zclaqxwmzq8.css"), hn(`.iconfont {
|
|
358
385
|
font-size: 19px;
|
|
359
386
|
font-style: normal;
|
|
360
387
|
-webkit-font-smoothing: antialiased;
|
|
361
388
|
font-family: iconfont !important;
|
|
362
389
|
}`));
|
|
363
|
-
}), window?.OmsOptions?.form?.vsPath &&
|
|
390
|
+
}), window?.OmsOptions?.form?.vsPath && tn("vsPath", window?.OmsOptions?.form?.vsPath), (t, n) => {
|
|
364
391
|
const o = A("router-view");
|
|
365
|
-
return
|
|
392
|
+
return a(), h(o);
|
|
366
393
|
};
|
|
367
394
|
}
|
|
368
395
|
});
|
|
369
|
-
var
|
|
370
|
-
const
|
|
396
|
+
var ie = /* @__PURE__ */ ((e) => (e.GET = "get", e.POST = "post", e.DELETE = "delete", e.FETCH = "fetch", e.OPTION = "option", e.PUT = "put", e))(ie || {});
|
|
397
|
+
const ko = [
|
|
371
398
|
{
|
|
372
399
|
type: "jump",
|
|
373
400
|
text: "跳转",
|
|
@@ -424,9 +451,9 @@ const _o = [
|
|
|
424
451
|
}
|
|
425
452
|
];
|
|
426
453
|
[
|
|
427
|
-
...
|
|
454
|
+
...xn.cloneDeep(ko)
|
|
428
455
|
];
|
|
429
|
-
const
|
|
456
|
+
const wo = {
|
|
430
457
|
code: 0,
|
|
431
458
|
data: {
|
|
432
459
|
"list|0-100": [
|
|
@@ -447,9 +474,9 @@ const vo = {
|
|
|
447
474
|
"page|1-5": 2
|
|
448
475
|
}
|
|
449
476
|
}
|
|
450
|
-
},
|
|
477
|
+
}, So = { listMock: wo }, xo = [
|
|
451
478
|
{
|
|
452
|
-
method:
|
|
479
|
+
method: ie.POST,
|
|
453
480
|
url: "/login",
|
|
454
481
|
response(e) {
|
|
455
482
|
return {
|
|
@@ -462,7 +489,7 @@ const vo = {
|
|
|
462
489
|
}
|
|
463
490
|
},
|
|
464
491
|
{
|
|
465
|
-
method:
|
|
492
|
+
method: ie.GET,
|
|
466
493
|
url: "/user/info",
|
|
467
494
|
response(e) {
|
|
468
495
|
return {
|
|
@@ -476,7 +503,7 @@ const vo = {
|
|
|
476
503
|
},
|
|
477
504
|
{
|
|
478
505
|
url: "/user/routes",
|
|
479
|
-
method:
|
|
506
|
+
method: ie.GET,
|
|
480
507
|
response: (e) => ({
|
|
481
508
|
code: 0,
|
|
482
509
|
data: [
|
|
@@ -490,33 +517,33 @@ const vo = {
|
|
|
490
517
|
},
|
|
491
518
|
{
|
|
492
519
|
url: "/user/list",
|
|
493
|
-
method:
|
|
494
|
-
response: (e) =>
|
|
520
|
+
method: ie.GET,
|
|
521
|
+
response: (e) => So.listMock
|
|
495
522
|
}
|
|
496
|
-
],
|
|
497
|
-
...
|
|
523
|
+
], Eo = [
|
|
524
|
+
...xo
|
|
498
525
|
], Me = {};
|
|
499
|
-
function
|
|
526
|
+
function At(e) {
|
|
500
527
|
e.forEach((t) => {
|
|
501
528
|
const n = Pt(t);
|
|
502
529
|
Me[`${t.method}::${n}`] = t;
|
|
503
530
|
});
|
|
504
531
|
}
|
|
505
|
-
|
|
532
|
+
At(Eo);
|
|
506
533
|
function Pt(e) {
|
|
507
|
-
let t = e.url, n = e.baseURL ||
|
|
534
|
+
let t = e.url, n = e.baseURL || Ee.axios?.baseURL;
|
|
508
535
|
return n || (n = ""), typeof t == "string" ? (t = ("/" + n + t).split("/").filter((o) => o).join("/"), t += "(|\\?.*)$", new RegExp(t)) : t;
|
|
509
536
|
}
|
|
510
|
-
function
|
|
537
|
+
function Io() {
|
|
511
538
|
Object.keys(Me).forEach((e) => {
|
|
512
539
|
const t = Me[e], n = Pt(t);
|
|
513
|
-
|
|
514
|
-
const { url: l, type: s, body:
|
|
515
|
-
return
|
|
540
|
+
Be.mock(n, t.method, function(o) {
|
|
541
|
+
const { url: l, type: s, body: i } = o, c = bn(l), d = i ? JSON.parse(i) : {}, m = t.response({ query: c, data: d }), f = Be.mock(m);
|
|
542
|
+
return yn(l, { type: s, query: c, data: d, response: f }), Be.mock(f);
|
|
516
543
|
});
|
|
517
544
|
});
|
|
518
545
|
}
|
|
519
|
-
const
|
|
546
|
+
const Co = Cn, lt = vt, To = Ve.CancelToken, be = {
|
|
520
547
|
taskList: {},
|
|
521
548
|
cacheList: /* @__PURE__ */ new Map(),
|
|
522
549
|
uniqueId(e) {
|
|
@@ -552,48 +579,48 @@ const xo = xn, ct = gt, Eo = Fe.CancelToken, ge = {
|
|
|
552
579
|
const t = this.uniqueId(e);
|
|
553
580
|
return this.cacheList.delete(t);
|
|
554
581
|
}
|
|
555
|
-
},
|
|
582
|
+
}, Bo = {
|
|
556
583
|
onFulfilled: function(e) {
|
|
557
|
-
return e.cacheEnable === !1 || (
|
|
558
|
-
|
|
584
|
+
return e.cacheEnable === !1 || (be.pending(e) && be.delTask(e), e.cancelToken = new To((t) => {
|
|
585
|
+
be.addTask(e, t);
|
|
559
586
|
})), e;
|
|
560
587
|
},
|
|
561
588
|
onRejected(e) {
|
|
562
589
|
return Promise.reject(e);
|
|
563
590
|
}
|
|
564
|
-
},
|
|
591
|
+
}, Ro = {
|
|
565
592
|
onFulfilled: function(e) {
|
|
566
|
-
return e.config.cacheEnable === !1 || e.config.method === "get" && Object.keys(e.data).length > 0 &&
|
|
593
|
+
return e.config.cacheEnable === !1 || e.config.method === "get" && Object.keys(e.data).length > 0 && be.addCache(e.config, e.data), e;
|
|
567
594
|
},
|
|
568
595
|
onRejected(e) {
|
|
569
596
|
return Promise.reject(e);
|
|
570
597
|
}
|
|
571
|
-
},
|
|
572
|
-
function
|
|
573
|
-
|
|
598
|
+
}, Lt = {};
|
|
599
|
+
function Oa(e, t) {
|
|
600
|
+
Lt[e] = t;
|
|
574
601
|
}
|
|
575
|
-
function
|
|
576
|
-
return
|
|
602
|
+
function Oo(e) {
|
|
603
|
+
return Lt[e];
|
|
577
604
|
}
|
|
578
|
-
const $o = /* @__PURE__ */
|
|
605
|
+
const $o = /* @__PURE__ */ K({
|
|
579
606
|
name: "Dashboard",
|
|
580
607
|
setup() {
|
|
581
|
-
const e =
|
|
608
|
+
const e = Oo("dashboard");
|
|
582
609
|
if (e)
|
|
583
610
|
return () => u("span", null, [u(e, null, null)]);
|
|
584
|
-
const t =
|
|
611
|
+
const t = w(() => j().name);
|
|
585
612
|
return () => u("div", {
|
|
586
613
|
class: "dashboard-container"
|
|
587
614
|
}, [u("div", {
|
|
588
615
|
class: "dashboard-text"
|
|
589
|
-
}, [
|
|
616
|
+
}, [C("Hi "), t.value, C(" 😄")])]);
|
|
590
617
|
}
|
|
591
|
-
}),
|
|
618
|
+
}), L = (e, t) => {
|
|
592
619
|
const n = e.__vccOpts || e;
|
|
593
620
|
for (const [o, l] of t)
|
|
594
621
|
n[o] = l;
|
|
595
622
|
return n;
|
|
596
|
-
},
|
|
623
|
+
}, Ao = /* @__PURE__ */ L($o, [["__scopeId", "data-v-85165680"]]), Po = {
|
|
597
624
|
data() {
|
|
598
625
|
return {
|
|
599
626
|
levelList: null
|
|
@@ -625,7 +652,7 @@ const $o = /* @__PURE__ */ z({
|
|
|
625
652
|
},
|
|
626
653
|
pathCompile(e) {
|
|
627
654
|
const { params: t } = this.$route;
|
|
628
|
-
return
|
|
655
|
+
return eo.compile(e)(t);
|
|
629
656
|
},
|
|
630
657
|
handleLink(e) {
|
|
631
658
|
const { redirect: t, path: n } = e;
|
|
@@ -636,27 +663,27 @@ const $o = /* @__PURE__ */ z({
|
|
|
636
663
|
this.$router.push(this.pathCompile(n));
|
|
637
664
|
}
|
|
638
665
|
}
|
|
639
|
-
},
|
|
666
|
+
}, Lo = {
|
|
640
667
|
key: 0,
|
|
641
668
|
class: "no-redirect"
|
|
642
|
-
},
|
|
643
|
-
function
|
|
644
|
-
const
|
|
645
|
-
return
|
|
669
|
+
}, Mo = ["onClick"];
|
|
670
|
+
function Do(e, t, n, o, l, s) {
|
|
671
|
+
const i = Mn, c = Ln;
|
|
672
|
+
return a(), h(c, {
|
|
646
673
|
class: "app-breadcrumb",
|
|
647
674
|
separator: "/"
|
|
648
675
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
u(
|
|
651
|
-
default:
|
|
652
|
-
(
|
|
653
|
-
key:
|
|
676
|
+
default: r(() => [
|
|
677
|
+
u(nn, { name: "breadcrumb" }, {
|
|
678
|
+
default: r(() => [
|
|
679
|
+
(a(!0), y(O, null, q(l.levelList, (d, m) => (a(), h(i, {
|
|
680
|
+
key: d.path
|
|
654
681
|
}, {
|
|
655
|
-
default:
|
|
656
|
-
|
|
682
|
+
default: r(() => [
|
|
683
|
+
d.path.indexOf("/DIR_") === 0 && d.redirect === void 0 || m === l.levelList.length - 1 ? (a(), y("span", Lo, N(d.meta.title), 1)) : (a(), y("a", {
|
|
657
684
|
key: 1,
|
|
658
|
-
onClick: (
|
|
659
|
-
},
|
|
685
|
+
onClick: (f) => s.handleLink(d)
|
|
686
|
+
}, N(d.meta.title), 9, Mo))
|
|
660
687
|
]),
|
|
661
688
|
_: 2
|
|
662
689
|
}, 1024))), 128))
|
|
@@ -667,7 +694,7 @@ function Lo(e, t, n, o, l, s) {
|
|
|
667
694
|
_: 1
|
|
668
695
|
});
|
|
669
696
|
}
|
|
670
|
-
const
|
|
697
|
+
const jo = /* @__PURE__ */ L(Po, [["render", Do], ["__scopeId", "data-v-fa74804e"]]), No = {
|
|
671
698
|
name: "Hamburger",
|
|
672
699
|
props: {
|
|
673
700
|
isActive: {
|
|
@@ -682,26 +709,26 @@ const Ro = /* @__PURE__ */ P(Bo, [["render", Lo], ["__scopeId", "data-v-fa74804e
|
|
|
682
709
|
}
|
|
683
710
|
}
|
|
684
711
|
};
|
|
685
|
-
function
|
|
686
|
-
const
|
|
687
|
-
return
|
|
712
|
+
function Uo(e, t, n, o, l, s) {
|
|
713
|
+
const i = A("v-icon");
|
|
714
|
+
return a(), y("div", {
|
|
688
715
|
style: { padding: "0 15px" },
|
|
689
|
-
onClick: t[0] || (t[0] = (...
|
|
716
|
+
onClick: t[0] || (t[0] = (...c) => s.toggleClick && s.toggleClick(...c))
|
|
690
717
|
}, [
|
|
691
|
-
u(
|
|
692
|
-
class:
|
|
718
|
+
u(i, {
|
|
719
|
+
class: Z({ "is-active": n.isActive }),
|
|
693
720
|
name: "ra-leftalignment"
|
|
694
721
|
}, null, 8, ["class"])
|
|
695
722
|
]);
|
|
696
723
|
}
|
|
697
|
-
const
|
|
698
|
-
function
|
|
699
|
-
const n =
|
|
700
|
-
return
|
|
701
|
-
default:
|
|
724
|
+
const Vo = /* @__PURE__ */ L(No, [["render", Uo]]), qo = {};
|
|
725
|
+
function Ho(e, t) {
|
|
726
|
+
const n = xe, o = jn, l = Nn, s = Dn;
|
|
727
|
+
return a(), h(s, { style: { width: "100%", height: "100%" } }, {
|
|
728
|
+
default: r(() => [
|
|
702
729
|
u(n, { class: "aside" }, {
|
|
703
|
-
default:
|
|
704
|
-
|
|
730
|
+
default: r(() => [
|
|
731
|
+
re(e.$slots, "left-aside", {}, void 0, !0)
|
|
705
732
|
]),
|
|
706
733
|
_: 3
|
|
707
734
|
}),
|
|
@@ -709,8 +736,8 @@ function Vo(e, t) {
|
|
|
709
736
|
class: "main",
|
|
710
737
|
style: { margin: "0 10px" }
|
|
711
738
|
}, {
|
|
712
|
-
default:
|
|
713
|
-
|
|
739
|
+
default: r(() => [
|
|
740
|
+
re(e.$slots, "main", {}, void 0, !0)
|
|
714
741
|
]),
|
|
715
742
|
_: 3
|
|
716
743
|
}),
|
|
@@ -719,8 +746,8 @@ function Vo(e, t) {
|
|
|
719
746
|
width: "350px",
|
|
720
747
|
style: { padding: "20px" }
|
|
721
748
|
}, {
|
|
722
|
-
default:
|
|
723
|
-
|
|
749
|
+
default: r(() => [
|
|
750
|
+
re(e.$slots, "right-aside", {}, void 0, !0)
|
|
724
751
|
]),
|
|
725
752
|
_: 3
|
|
726
753
|
})
|
|
@@ -728,7 +755,7 @@ function Vo(e, t) {
|
|
|
728
755
|
_: 3
|
|
729
756
|
});
|
|
730
757
|
}
|
|
731
|
-
const
|
|
758
|
+
const Mt = /* @__PURE__ */ L(qo, [["render", Ho], ["__scopeId", "data-v-7c3d697b"]]), Fo = {
|
|
732
759
|
type: "input",
|
|
733
760
|
name: "文本框",
|
|
734
761
|
default: {
|
|
@@ -796,7 +823,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
796
823
|
}
|
|
797
824
|
}
|
|
798
825
|
]
|
|
799
|
-
},
|
|
826
|
+
}, Go = {
|
|
800
827
|
type: "number",
|
|
801
828
|
name: "数字",
|
|
802
829
|
default: {
|
|
@@ -838,7 +865,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
838
865
|
}
|
|
839
866
|
}
|
|
840
867
|
]
|
|
841
|
-
},
|
|
868
|
+
}, zo = {
|
|
842
869
|
type: "number-range",
|
|
843
870
|
name: "数字区间",
|
|
844
871
|
default: {
|
|
@@ -879,7 +906,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
879
906
|
}
|
|
880
907
|
}
|
|
881
908
|
]
|
|
882
|
-
},
|
|
909
|
+
}, Ko = {
|
|
883
910
|
type: "select",
|
|
884
911
|
name: "下拉框",
|
|
885
912
|
default: {
|
|
@@ -982,10 +1009,10 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
982
1009
|
}
|
|
983
1010
|
],
|
|
984
1011
|
trans(e) {
|
|
985
|
-
const t =
|
|
1012
|
+
const t = S(e);
|
|
986
1013
|
return e.optionType === 0 ? t.props && t.props.selectApi !== void 0 && delete t.props.selectApi : e.optionType === 1 && t.options && delete t.options, delete t.optionType, t;
|
|
987
1014
|
}
|
|
988
|
-
},
|
|
1015
|
+
}, Jo = {
|
|
989
1016
|
type: "radio",
|
|
990
1017
|
name: "单选框",
|
|
991
1018
|
default: {
|
|
@@ -1031,7 +1058,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1031
1058
|
label: "默认值"
|
|
1032
1059
|
}
|
|
1033
1060
|
]
|
|
1034
|
-
},
|
|
1061
|
+
}, Wo = {
|
|
1035
1062
|
type: "switch",
|
|
1036
1063
|
name: "开关",
|
|
1037
1064
|
default: {
|
|
@@ -1087,7 +1114,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1087
1114
|
}
|
|
1088
1115
|
}
|
|
1089
1116
|
]
|
|
1090
|
-
},
|
|
1117
|
+
}, Qo = {
|
|
1091
1118
|
type: "code",
|
|
1092
1119
|
name: "Code",
|
|
1093
1120
|
default: {
|
|
@@ -1107,7 +1134,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1107
1134
|
label: "字段key"
|
|
1108
1135
|
}
|
|
1109
1136
|
]
|
|
1110
|
-
},
|
|
1137
|
+
}, Xo = {
|
|
1111
1138
|
type: "json",
|
|
1112
1139
|
name: "json",
|
|
1113
1140
|
default: {
|
|
@@ -1127,7 +1154,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1127
1154
|
label: "字段key"
|
|
1128
1155
|
}
|
|
1129
1156
|
]
|
|
1130
|
-
},
|
|
1157
|
+
}, Zo = {
|
|
1131
1158
|
type: "upload",
|
|
1132
1159
|
name: "上传",
|
|
1133
1160
|
default: {
|
|
@@ -1147,7 +1174,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1147
1174
|
label: "字段key"
|
|
1148
1175
|
}
|
|
1149
1176
|
]
|
|
1150
|
-
},
|
|
1177
|
+
}, Yo = {
|
|
1151
1178
|
type: "template",
|
|
1152
1179
|
name: "自定义组件",
|
|
1153
1180
|
default: {
|
|
@@ -1167,7 +1194,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1167
1194
|
label: "字段key"
|
|
1168
1195
|
}
|
|
1169
1196
|
]
|
|
1170
|
-
},
|
|
1197
|
+
}, el = {
|
|
1171
1198
|
type: "icon-select",
|
|
1172
1199
|
name: "图标选择器",
|
|
1173
1200
|
default: {
|
|
@@ -1187,7 +1214,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1187
1214
|
label: "字段key"
|
|
1188
1215
|
}
|
|
1189
1216
|
]
|
|
1190
|
-
},
|
|
1217
|
+
}, tl = {
|
|
1191
1218
|
type: "sub-form",
|
|
1192
1219
|
name: "子表单",
|
|
1193
1220
|
default: {
|
|
@@ -1255,7 +1282,7 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1255
1282
|
}
|
|
1256
1283
|
}
|
|
1257
1284
|
]
|
|
1258
|
-
},
|
|
1285
|
+
}, nl = {
|
|
1259
1286
|
type: "checkbox",
|
|
1260
1287
|
name: "复选框",
|
|
1261
1288
|
default: {
|
|
@@ -1301,24 +1328,24 @@ const Lt = /* @__PURE__ */ P(No, [["render", Vo], ["__scopeId", "data-v-7c3d697b
|
|
|
1301
1328
|
}
|
|
1302
1329
|
}
|
|
1303
1330
|
]
|
|
1304
|
-
},
|
|
1331
|
+
}, Dt = {};
|
|
1305
1332
|
function H(e) {
|
|
1306
|
-
|
|
1333
|
+
Dt[e.type] = e;
|
|
1307
1334
|
}
|
|
1308
|
-
H(qo);
|
|
1309
1335
|
H(Fo);
|
|
1310
|
-
H(Uo);
|
|
1311
|
-
H(Ho);
|
|
1312
|
-
H(zo);
|
|
1313
|
-
H(Zo);
|
|
1314
|
-
H(Go);
|
|
1315
|
-
H(Yo);
|
|
1316
1336
|
H(Ko);
|
|
1317
|
-
H(
|
|
1337
|
+
H(Go);
|
|
1338
|
+
H(zo);
|
|
1318
1339
|
H(Wo);
|
|
1319
|
-
H(
|
|
1340
|
+
H(tl);
|
|
1341
|
+
H(Jo);
|
|
1342
|
+
H(nl);
|
|
1320
1343
|
H(Qo);
|
|
1321
|
-
|
|
1344
|
+
H(Xo);
|
|
1345
|
+
H(Zo);
|
|
1346
|
+
H(el);
|
|
1347
|
+
H(Yo);
|
|
1348
|
+
const De = Dt, ol = {
|
|
1322
1349
|
options: {
|
|
1323
1350
|
labelPosition: "top",
|
|
1324
1351
|
submitButton: !1,
|
|
@@ -1416,15 +1443,15 @@ const De = Rt, el = {
|
|
|
1416
1443
|
}
|
|
1417
1444
|
}
|
|
1418
1445
|
]
|
|
1419
|
-
},
|
|
1446
|
+
}, $e = {
|
|
1420
1447
|
labelPosition: "top",
|
|
1421
1448
|
submitButton: !1,
|
|
1422
1449
|
cancelButton: !1
|
|
1423
|
-
},
|
|
1450
|
+
}, Ke = [];
|
|
1424
1451
|
Object.keys(De).forEach((e) => {
|
|
1425
|
-
|
|
1452
|
+
Ke.push({ value: e, label: De[e].name });
|
|
1426
1453
|
});
|
|
1427
|
-
const
|
|
1454
|
+
const ll = {
|
|
1428
1455
|
options: {
|
|
1429
1456
|
submitButton: !1,
|
|
1430
1457
|
cancelButton: !1
|
|
@@ -1445,7 +1472,7 @@ const tl = {
|
|
|
1445
1472
|
type: "select",
|
|
1446
1473
|
field: "type",
|
|
1447
1474
|
label: "类型",
|
|
1448
|
-
options:
|
|
1475
|
+
options: S(Ke)
|
|
1449
1476
|
},
|
|
1450
1477
|
{
|
|
1451
1478
|
type: "input",
|
|
@@ -1456,8 +1483,8 @@ const tl = {
|
|
|
1456
1483
|
}
|
|
1457
1484
|
}
|
|
1458
1485
|
]
|
|
1459
|
-
},
|
|
1460
|
-
components: { DevLayout:
|
|
1486
|
+
}, sl = {
|
|
1487
|
+
components: { DevLayout: Mt, VForm: oe, VButton: Ge, JsonView: Et },
|
|
1461
1488
|
props: {
|
|
1462
1489
|
schema: {
|
|
1463
1490
|
type: Object,
|
|
@@ -1468,8 +1495,8 @@ const tl = {
|
|
|
1468
1495
|
data() {
|
|
1469
1496
|
return {
|
|
1470
1497
|
sqlOptions: {},
|
|
1471
|
-
sqlSchema:
|
|
1472
|
-
baseSchema:
|
|
1498
|
+
sqlSchema: ll,
|
|
1499
|
+
baseSchema: ol,
|
|
1473
1500
|
activeTab: "base",
|
|
1474
1501
|
builderSchema: Object.assign(
|
|
1475
1502
|
{},
|
|
@@ -1494,7 +1521,7 @@ const tl = {
|
|
|
1494
1521
|
tableStruct: "",
|
|
1495
1522
|
activeName: "1",
|
|
1496
1523
|
currentCtrlType: "input",
|
|
1497
|
-
types:
|
|
1524
|
+
types: S(Ke)
|
|
1498
1525
|
};
|
|
1499
1526
|
},
|
|
1500
1527
|
computed: {
|
|
@@ -1509,22 +1536,22 @@ const tl = {
|
|
|
1509
1536
|
deep: !0,
|
|
1510
1537
|
immediate: !0,
|
|
1511
1538
|
handler(e) {
|
|
1512
|
-
const t =
|
|
1513
|
-
e.showSubmitButton === !1 && (t.submitButton = !1), e.cancelSubmitButton === !1 && (t.cancelButton = !1), delete t.showSubmitButton, delete t.showCancelButton, Object.keys(t).length > 0 && (this.builderSchema =
|
|
1539
|
+
const t = S(e);
|
|
1540
|
+
e.showSubmitButton === !1 && (t.submitButton = !1), e.cancelSubmitButton === !1 && (t.cancelButton = !1), delete t.showSubmitButton, delete t.showCancelButton, Object.keys(t).length > 0 && (this.builderSchema = z(this.builderSchema, { options: t }), this.key++);
|
|
1514
1541
|
}
|
|
1515
1542
|
},
|
|
1516
1543
|
ctrlOptions: {
|
|
1517
1544
|
deep: !0,
|
|
1518
1545
|
// immediate: true,
|
|
1519
1546
|
handler(e) {
|
|
1520
|
-
const t =
|
|
1547
|
+
const t = ue(this.builderSchema, this.activeIndex);
|
|
1521
1548
|
if (!t)
|
|
1522
1549
|
return;
|
|
1523
1550
|
const n = t ? t.type : "", o = this.ctrlMap[n], l = o.trans ? o.trans(e) : e;
|
|
1524
1551
|
if (l && Object.keys(l).length > 0) {
|
|
1525
1552
|
if (l.type = n, this.activeIndex.indexOf("[") > -1) {
|
|
1526
|
-
const [s,
|
|
1527
|
-
this.builderSchema[
|
|
1553
|
+
const [s, i, c] = this.activeIndex.match(/(\w+)\[(\d+)\]/);
|
|
1554
|
+
this.builderSchema[i][c] = { ...l };
|
|
1528
1555
|
} else
|
|
1529
1556
|
this.builderSchema[this.activeIndex] = l;
|
|
1530
1557
|
this.key++;
|
|
@@ -1534,22 +1561,22 @@ const tl = {
|
|
|
1534
1561
|
currentCtrlType: {
|
|
1535
1562
|
handler(e) {
|
|
1536
1563
|
const t = this.ctrlMap[e];
|
|
1537
|
-
this.ctrlSchema =
|
|
1538
|
-
options:
|
|
1539
|
-
formItems:
|
|
1564
|
+
this.ctrlSchema = S({
|
|
1565
|
+
options: S($e),
|
|
1566
|
+
formItems: S(t.builder)
|
|
1540
1567
|
});
|
|
1541
|
-
const n =
|
|
1542
|
-
this.ctrlOptions =
|
|
1568
|
+
const n = ue(this.builderSchema, this.activeIndex);
|
|
1569
|
+
this.ctrlOptions = S(n), this.ctrlOptions.type = e, this.ctrlKey++, this.key++;
|
|
1543
1570
|
}
|
|
1544
1571
|
}
|
|
1545
1572
|
},
|
|
1546
1573
|
beforeCreate() {
|
|
1547
|
-
|
|
1574
|
+
Y.on("dev-action", ({ event: e, data: t }) => {
|
|
1548
1575
|
this.onDevAction(t.type, t.devId);
|
|
1549
1576
|
});
|
|
1550
1577
|
},
|
|
1551
1578
|
unmounted() {
|
|
1552
|
-
|
|
1579
|
+
Y.off("dev-action");
|
|
1553
1580
|
},
|
|
1554
1581
|
methods: {
|
|
1555
1582
|
onDevAction(e, t) {
|
|
@@ -1559,25 +1586,25 @@ const tl = {
|
|
|
1559
1586
|
const t = "formItems";
|
|
1560
1587
|
this.ctrlOptions = {}, this.builderSchema[t] = this.builderSchema[t] || [];
|
|
1561
1588
|
const n = this.ctrlMap[e];
|
|
1562
|
-
this.activeCtrl = n, this.builderSchema[t].push(
|
|
1563
|
-
options:
|
|
1564
|
-
formItems:
|
|
1589
|
+
this.activeCtrl = n, this.builderSchema[t].push(S(n.default)), this.ctrlSchema = S({
|
|
1590
|
+
options: S($e),
|
|
1591
|
+
formItems: S(n.builder)
|
|
1565
1592
|
}), this.ctrlKey++, this.key++, this.activeIndex = `${t}[${this.builderSchema[t].length - 1}]`, this.activeTab = "ctrl";
|
|
1566
1593
|
},
|
|
1567
1594
|
removeOne() {
|
|
1568
|
-
|
|
1595
|
+
_t(this.builderSchema, this.activeIndex), this.builderSchema = S(mt(this.builderSchema)), this.activeIndex = "", this.ctrlOptions = {}, this.ctrlSchema = {}, this.key++, this.ctrlKey++;
|
|
1569
1596
|
},
|
|
1570
1597
|
clicklabel() {
|
|
1571
1598
|
const e = this.activeIndex;
|
|
1572
1599
|
if (e.match(this.activeIndexReg)) {
|
|
1573
|
-
const n =
|
|
1600
|
+
const n = S(ue(this.builderSchema, e)), o = n.type, l = this.ctrlMap[o];
|
|
1574
1601
|
if (!l) {
|
|
1575
1602
|
this.$message({ type: "warning", message: "尚未支持该组件的UI编辑" });
|
|
1576
1603
|
return;
|
|
1577
1604
|
}
|
|
1578
|
-
this.currentCtrlType = o, this.ctrlOptions = n, this.ctrlSchema =
|
|
1579
|
-
options:
|
|
1580
|
-
formItems:
|
|
1605
|
+
this.currentCtrlType = o, this.ctrlOptions = n, this.ctrlSchema = S({
|
|
1606
|
+
options: S($e),
|
|
1607
|
+
formItems: S(l.builder)
|
|
1581
1608
|
}), this.ctrlKey++;
|
|
1582
1609
|
}
|
|
1583
1610
|
},
|
|
@@ -1592,48 +1619,48 @@ const tl = {
|
|
|
1592
1619
|
}
|
|
1593
1620
|
}
|
|
1594
1621
|
};
|
|
1595
|
-
function
|
|
1596
|
-
const
|
|
1597
|
-
return
|
|
1598
|
-
main:
|
|
1599
|
-
l.builderSchema.formItems ? (
|
|
1622
|
+
function il(e, t, n, o, l, s) {
|
|
1623
|
+
const i = A("v-form"), c = wt, d = pe, m = A("JsonView"), f = A("VButton"), k = He, b = qe, x = kt, I = gt, T = A("dev-layout");
|
|
1624
|
+
return a(), h(T, null, {
|
|
1625
|
+
main: r(() => [
|
|
1626
|
+
l.builderSchema.formItems ? (a(), h(i, Q({
|
|
1600
1627
|
ref: "form",
|
|
1601
1628
|
key: l.key,
|
|
1602
1629
|
dev: !0
|
|
1603
|
-
}, l.builderSchema), null, 16)) :
|
|
1604
|
-
u(
|
|
1605
|
-
u(
|
|
1630
|
+
}, l.builderSchema), null, 16)) : B("", !0),
|
|
1631
|
+
u(c),
|
|
1632
|
+
u(d, {
|
|
1606
1633
|
type: "primary",
|
|
1607
1634
|
onClick: s.saveSchema
|
|
1608
1635
|
}, {
|
|
1609
|
-
default:
|
|
1610
|
-
|
|
1636
|
+
default: r(() => [...t[2] || (t[2] = [
|
|
1637
|
+
C("保存页面配置", -1)
|
|
1611
1638
|
])]),
|
|
1612
1639
|
_: 1
|
|
1613
1640
|
}, 8, ["onClick"]),
|
|
1614
|
-
t[3] || (t[3] =
|
|
1615
|
-
u(
|
|
1641
|
+
t[3] || (t[3] = C(" ", -1)),
|
|
1642
|
+
u(f, {
|
|
1616
1643
|
text: "PageSchema",
|
|
1617
1644
|
type: "modal"
|
|
1618
1645
|
}, {
|
|
1619
|
-
default:
|
|
1620
|
-
u(
|
|
1646
|
+
default: r(() => [
|
|
1647
|
+
u(m, { data: s.getSaveSchema }, null, 8, ["data"])
|
|
1621
1648
|
]),
|
|
1622
1649
|
_: 1
|
|
1623
1650
|
})
|
|
1624
1651
|
]),
|
|
1625
|
-
"right-aside":
|
|
1626
|
-
l.activeIndex ? (
|
|
1627
|
-
default:
|
|
1628
|
-
u(
|
|
1629
|
-
default:
|
|
1630
|
-
u(
|
|
1652
|
+
"right-aside": r(() => [
|
|
1653
|
+
l.activeIndex ? (a(), h(I, { key: 0 }, {
|
|
1654
|
+
default: r(() => [
|
|
1655
|
+
u(x, { label: "控件类型" }, {
|
|
1656
|
+
default: r(() => [
|
|
1657
|
+
u(b, {
|
|
1631
1658
|
modelValue: l.currentCtrlType,
|
|
1632
1659
|
"onUpdate:modelValue": t[0] || (t[0] = (g) => l.currentCtrlType = g)
|
|
1633
1660
|
}, {
|
|
1634
|
-
default:
|
|
1635
|
-
(
|
|
1636
|
-
key:
|
|
1661
|
+
default: r(() => [
|
|
1662
|
+
(a(!0), y(O, null, q(l.types, (g, E) => (a(), h(k, {
|
|
1663
|
+
key: E,
|
|
1637
1664
|
label: g.label,
|
|
1638
1665
|
value: g.value
|
|
1639
1666
|
}, null, 8, ["label", "value"]))), 128))
|
|
@@ -1645,8 +1672,8 @@ function ol(e, t, n, o, l, s) {
|
|
|
1645
1672
|
})
|
|
1646
1673
|
]),
|
|
1647
1674
|
_: 1
|
|
1648
|
-
})) :
|
|
1649
|
-
(
|
|
1675
|
+
})) : B("", !0),
|
|
1676
|
+
(a(), h(i, Q({
|
|
1650
1677
|
key: l.ctrlKey,
|
|
1651
1678
|
modelValue: l.ctrlOptions,
|
|
1652
1679
|
"onUpdate:modelValue": t[1] || (t[1] = (g) => l.ctrlOptions = g)
|
|
@@ -1655,7 +1682,7 @@ function ol(e, t, n, o, l, s) {
|
|
|
1655
1682
|
_: 1
|
|
1656
1683
|
});
|
|
1657
1684
|
}
|
|
1658
|
-
const
|
|
1685
|
+
const al = /* @__PURE__ */ L(sl, [["render", il], ["__scopeId", "data-v-875f0171"]]), rl = {
|
|
1659
1686
|
type: "input",
|
|
1660
1687
|
name: "文本框",
|
|
1661
1688
|
default: {
|
|
@@ -1703,7 +1730,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1703
1730
|
}
|
|
1704
1731
|
}
|
|
1705
1732
|
]
|
|
1706
|
-
},
|
|
1733
|
+
}, cl = {
|
|
1707
1734
|
type: "select",
|
|
1708
1735
|
name: "下拉框",
|
|
1709
1736
|
default: {
|
|
@@ -1801,10 +1828,10 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1801
1828
|
}
|
|
1802
1829
|
],
|
|
1803
1830
|
trans(e) {
|
|
1804
|
-
const t =
|
|
1831
|
+
const t = S(e);
|
|
1805
1832
|
return e.optionType === 0 ? t.props && t.props.selectApi !== void 0 && delete t.props.selectApi : e.optionType === 1 && t.options && delete t.options, delete t.optionType, t;
|
|
1806
1833
|
}
|
|
1807
|
-
},
|
|
1834
|
+
}, ul = {
|
|
1808
1835
|
type: "date",
|
|
1809
1836
|
name: "日期",
|
|
1810
1837
|
default: {
|
|
@@ -1824,7 +1851,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1824
1851
|
label: "字段key"
|
|
1825
1852
|
}
|
|
1826
1853
|
]
|
|
1827
|
-
},
|
|
1854
|
+
}, st = {
|
|
1828
1855
|
options: {
|
|
1829
1856
|
labelPosition: "top",
|
|
1830
1857
|
submitButton: !1,
|
|
@@ -1853,7 +1880,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1853
1880
|
labelPosition: "top",
|
|
1854
1881
|
submitButton: !1,
|
|
1855
1882
|
cancelButton: !1
|
|
1856
|
-
},
|
|
1883
|
+
}, dl = {
|
|
1857
1884
|
type: "span",
|
|
1858
1885
|
name: "文本",
|
|
1859
1886
|
default: {
|
|
@@ -1883,7 +1910,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1883
1910
|
label: "排序"
|
|
1884
1911
|
}
|
|
1885
1912
|
]
|
|
1886
|
-
},
|
|
1913
|
+
}, pl = {
|
|
1887
1914
|
type: "enum",
|
|
1888
1915
|
name: "标签",
|
|
1889
1916
|
default: {
|
|
@@ -1934,7 +1961,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1934
1961
|
trans(e) {
|
|
1935
1962
|
return e.options = e.options || [], e.label || (e.label = "表头"), e;
|
|
1936
1963
|
}
|
|
1937
|
-
},
|
|
1964
|
+
}, ml = {
|
|
1938
1965
|
type: "html",
|
|
1939
1966
|
name: "HTML",
|
|
1940
1967
|
default: {
|
|
@@ -1959,7 +1986,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1959
1986
|
label: "提示"
|
|
1960
1987
|
}
|
|
1961
1988
|
]
|
|
1962
|
-
},
|
|
1989
|
+
}, fl = {
|
|
1963
1990
|
type: "icon",
|
|
1964
1991
|
name: "图标",
|
|
1965
1992
|
default: {
|
|
@@ -1984,7 +2011,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
1984
2011
|
label: "提示"
|
|
1985
2012
|
}
|
|
1986
2013
|
]
|
|
1987
|
-
},
|
|
2014
|
+
}, hl = {
|
|
1988
2015
|
type: "image",
|
|
1989
2016
|
name: "图片",
|
|
1990
2017
|
default: {
|
|
@@ -2009,7 +2036,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2009
2036
|
label: "提示"
|
|
2010
2037
|
}
|
|
2011
2038
|
]
|
|
2012
|
-
},
|
|
2039
|
+
}, bl = {
|
|
2013
2040
|
type: "json",
|
|
2014
2041
|
name: "JSON",
|
|
2015
2042
|
default: {
|
|
@@ -2034,7 +2061,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2034
2061
|
label: "提示"
|
|
2035
2062
|
}
|
|
2036
2063
|
]
|
|
2037
|
-
},
|
|
2064
|
+
}, yl = {
|
|
2038
2065
|
type: "link",
|
|
2039
2066
|
name: "链接",
|
|
2040
2067
|
default: {
|
|
@@ -2059,7 +2086,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2059
2086
|
label: "提示"
|
|
2060
2087
|
}
|
|
2061
2088
|
]
|
|
2062
|
-
},
|
|
2089
|
+
}, _l = {
|
|
2063
2090
|
type: "rich",
|
|
2064
2091
|
name: "富文本",
|
|
2065
2092
|
default: {
|
|
@@ -2084,7 +2111,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2084
2111
|
label: "提示"
|
|
2085
2112
|
}
|
|
2086
2113
|
]
|
|
2087
|
-
},
|
|
2114
|
+
}, vl = {
|
|
2088
2115
|
type: "tpl",
|
|
2089
2116
|
name: "模板",
|
|
2090
2117
|
default: {
|
|
@@ -2115,17 +2142,17 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2115
2142
|
info: "例如 <code>姓名: {name} 年龄:{age}</code>"
|
|
2116
2143
|
}
|
|
2117
2144
|
]
|
|
2118
|
-
},
|
|
2119
|
-
span:
|
|
2120
|
-
enum:
|
|
2121
|
-
html:
|
|
2122
|
-
icon:
|
|
2123
|
-
image:
|
|
2124
|
-
json:
|
|
2125
|
-
link:
|
|
2126
|
-
rich:
|
|
2127
|
-
tpl:
|
|
2128
|
-
},
|
|
2145
|
+
}, gl = {
|
|
2146
|
+
span: dl,
|
|
2147
|
+
enum: pl,
|
|
2148
|
+
html: ml,
|
|
2149
|
+
icon: fl,
|
|
2150
|
+
image: hl,
|
|
2151
|
+
json: bl,
|
|
2152
|
+
link: yl,
|
|
2153
|
+
rich: _l,
|
|
2154
|
+
tpl: vl
|
|
2155
|
+
}, kl = {
|
|
2129
2156
|
type: "jump",
|
|
2130
2157
|
name: "跳转",
|
|
2131
2158
|
default: {
|
|
@@ -2172,7 +2199,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2172
2199
|
}
|
|
2173
2200
|
}
|
|
2174
2201
|
]
|
|
2175
|
-
},
|
|
2202
|
+
}, wl = {
|
|
2176
2203
|
type: "api",
|
|
2177
2204
|
name: "接口请求",
|
|
2178
2205
|
default: {
|
|
@@ -2241,7 +2268,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2241
2268
|
}
|
|
2242
2269
|
}
|
|
2243
2270
|
]
|
|
2244
|
-
},
|
|
2271
|
+
}, Sl = {
|
|
2245
2272
|
type: "form",
|
|
2246
2273
|
name: "弹框表单",
|
|
2247
2274
|
default: {
|
|
@@ -2295,7 +2322,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2295
2322
|
label: "保存接口"
|
|
2296
2323
|
}
|
|
2297
2324
|
]
|
|
2298
|
-
},
|
|
2325
|
+
}, xl = {
|
|
2299
2326
|
type: "table",
|
|
2300
2327
|
name: "弹框列表",
|
|
2301
2328
|
default: {
|
|
@@ -2349,13 +2376,13 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2349
2376
|
label: "保存接口"
|
|
2350
2377
|
}
|
|
2351
2378
|
]
|
|
2352
|
-
},
|
|
2353
|
-
jump:
|
|
2354
|
-
api:
|
|
2355
|
-
form:
|
|
2356
|
-
table:
|
|
2357
|
-
},
|
|
2358
|
-
components: { JsonView:
|
|
2379
|
+
}, El = {
|
|
2380
|
+
jump: kl,
|
|
2381
|
+
api: wl,
|
|
2382
|
+
form: Sl,
|
|
2383
|
+
table: xl
|
|
2384
|
+
}, Il = {
|
|
2385
|
+
components: { JsonView: Et, DevLayout: Mt, VTable: ve, VForm: oe, VButton: Ge },
|
|
2359
2386
|
props: {
|
|
2360
2387
|
schema: {
|
|
2361
2388
|
type: Object,
|
|
@@ -2364,13 +2391,13 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2364
2391
|
}
|
|
2365
2392
|
},
|
|
2366
2393
|
data() {
|
|
2367
|
-
const e =
|
|
2394
|
+
const e = on(this.$props.schema);
|
|
2368
2395
|
return delete e.listApi, e.list = [{}], {
|
|
2369
|
-
baseSchema:
|
|
2396
|
+
baseSchema: st,
|
|
2370
2397
|
activeTab: "base",
|
|
2371
2398
|
builderSchema: Object.assign(
|
|
2372
2399
|
{},
|
|
2373
|
-
|
|
2400
|
+
st,
|
|
2374
2401
|
e
|
|
2375
2402
|
),
|
|
2376
2403
|
baseOptions: {},
|
|
@@ -2383,9 +2410,9 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2383
2410
|
ctrlName: "",
|
|
2384
2411
|
activeIndex: void 0,
|
|
2385
2412
|
ctrlMap: {
|
|
2386
|
-
filter: { input:
|
|
2387
|
-
headers:
|
|
2388
|
-
buttons:
|
|
2413
|
+
filter: { input: rl, select: cl, date: ul },
|
|
2414
|
+
headers: gl,
|
|
2415
|
+
buttons: El
|
|
2389
2416
|
},
|
|
2390
2417
|
activeIndexReg: /(filter|headers|normalButton|batchButton|rowButton)?\[(\d+)\]/,
|
|
2391
2418
|
currentCtrlType: "input"
|
|
@@ -2416,7 +2443,7 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2416
2443
|
deep: !0,
|
|
2417
2444
|
immediate: !0,
|
|
2418
2445
|
handler(e) {
|
|
2419
|
-
this.builderSchema =
|
|
2446
|
+
this.builderSchema = z(this.builderSchema, e), this.key++, this.updateBuilderSchema();
|
|
2420
2447
|
}
|
|
2421
2448
|
},
|
|
2422
2449
|
ctrlOptions: {
|
|
@@ -2434,8 +2461,8 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2434
2461
|
const l = o.trans ? o.trans(e) : e;
|
|
2435
2462
|
if (l && Object.keys(l).length > 0) {
|
|
2436
2463
|
if (l.type = n, this.activeIndex.indexOf("[") > -1) {
|
|
2437
|
-
const [s,
|
|
2438
|
-
this.builderSchema[
|
|
2464
|
+
const [s, i, c] = this.activeIndex.match(/(\w+)\[(\d+)\]/);
|
|
2465
|
+
this.builderSchema[i][c] = { ...l };
|
|
2439
2466
|
} else
|
|
2440
2467
|
this.builderSchema[this.activeIndex] = l;
|
|
2441
2468
|
this.key++;
|
|
@@ -2446,24 +2473,24 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2446
2473
|
currentCtrlType: {
|
|
2447
2474
|
handler(e) {
|
|
2448
2475
|
const t = this.ctrlMap[this.activeBrick][e];
|
|
2449
|
-
this.ctrlSchema =
|
|
2450
|
-
options:
|
|
2451
|
-
formItems:
|
|
2476
|
+
this.ctrlSchema = S({
|
|
2477
|
+
options: S(Ae),
|
|
2478
|
+
formItems: S(t.builder)
|
|
2452
2479
|
});
|
|
2453
|
-
const n =
|
|
2480
|
+
const n = ue(this.builderSchema, this.activeIndex);
|
|
2454
2481
|
n.type = e;
|
|
2455
|
-
const o =
|
|
2482
|
+
const o = S(n);
|
|
2456
2483
|
this.ctrlOptions = o, o.text && (this.ctrlOptions.text = o.text, this.ctrlOptions.props = o.props || {}), this.ctrlKey++, this.key++, this.updateBuilderSchema();
|
|
2457
2484
|
}
|
|
2458
2485
|
}
|
|
2459
2486
|
},
|
|
2460
2487
|
beforeCreate() {
|
|
2461
|
-
|
|
2488
|
+
Y.on("dev-action", ({ event: e, data: t }) => {
|
|
2462
2489
|
this.onDevAction(t.type, t.devId);
|
|
2463
2490
|
});
|
|
2464
2491
|
},
|
|
2465
2492
|
unmounted() {
|
|
2466
|
-
|
|
2493
|
+
Y.off("dev-action");
|
|
2467
2494
|
},
|
|
2468
2495
|
methods: {
|
|
2469
2496
|
updateBuilderSchema() {
|
|
@@ -2494,18 +2521,18 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2494
2521
|
this.$message({ type: "warning", message: "尚未支持此组件的UI编辑" });
|
|
2495
2522
|
return;
|
|
2496
2523
|
}
|
|
2497
|
-
this.activeCtrl = l[e], this.activeBrick = o, this.ctrlOptions = {}, this.builderSchema[t] = this.builderSchema[t] || [], this.builderSchema[t].push(
|
|
2498
|
-
options:
|
|
2499
|
-
formItems:
|
|
2524
|
+
this.activeCtrl = l[e], this.activeBrick = o, this.ctrlOptions = {}, this.builderSchema[t] = this.builderSchema[t] || [], this.builderSchema[t].push(S(l[e].default)), this.ctrlSchema = S({
|
|
2525
|
+
options: S(Ae),
|
|
2526
|
+
formItems: S(l[e].builder)
|
|
2500
2527
|
}), this.key++, this.ctrlKey++, this.activeIndex = `${t}[${this.builderSchema[t].length - 1}]`, this.activeTab = "ctrl";
|
|
2501
2528
|
},
|
|
2502
2529
|
removeOne() {
|
|
2503
|
-
|
|
2530
|
+
_t(this.builderSchema, this.activeIndex), this.builderSchema = S(mt(this.builderSchema)), this.activeIndex = "", this.ctrlOptions = {}, this.ctrlSchema = {}, this.key++, this.ctrlKey++;
|
|
2504
2531
|
},
|
|
2505
2532
|
clicklabel() {
|
|
2506
2533
|
const e = this.activeIndex, t = e.match(this.activeIndexReg);
|
|
2507
2534
|
if (t) {
|
|
2508
|
-
const n =
|
|
2535
|
+
const n = S(ue(this.builderSchema, e));
|
|
2509
2536
|
this.activeBrick = t[1], ["normalButton", "batchButton", "rowButton"].indexOf(t[1]) > -1 && (this.activeBrick = "buttons");
|
|
2510
2537
|
let o = this.builderSchema[t[1]][parseInt(t[2])].type;
|
|
2511
2538
|
t[1] === "headers" && o === void 0 && (o = "span");
|
|
@@ -2514,9 +2541,9 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2514
2541
|
this.activeBrick, this.$message({ type: "warning", message: "尚未支持此组件的UI编辑" });
|
|
2515
2542
|
return;
|
|
2516
2543
|
}
|
|
2517
|
-
this.ctrlOptions = n, this.currentCtrlType = o, this.ctrlSchema =
|
|
2518
|
-
options:
|
|
2519
|
-
formItems:
|
|
2544
|
+
this.ctrlOptions = n, this.currentCtrlType = o, this.ctrlSchema = S({
|
|
2545
|
+
options: S(Ae),
|
|
2546
|
+
formItems: S(l.builder)
|
|
2520
2547
|
}), this.ctrlKey++;
|
|
2521
2548
|
}
|
|
2522
2549
|
},
|
|
@@ -2538,59 +2565,59 @@ const ll = /* @__PURE__ */ P(nl, [["render", ol], ["__scopeId", "data-v-875f0171
|
|
|
2538
2565
|
}
|
|
2539
2566
|
}
|
|
2540
2567
|
};
|
|
2541
|
-
function
|
|
2542
|
-
const
|
|
2543
|
-
return
|
|
2544
|
-
"left-aside":
|
|
2545
|
-
u(
|
|
2546
|
-
default:
|
|
2547
|
-
u(
|
|
2548
|
-
default:
|
|
2549
|
-
u(
|
|
2568
|
+
function Cl(e, t, n, o, l, s) {
|
|
2569
|
+
const i = Fe, c = pe, d = xe, m = A("v-table"), f = wt, k = pe, b = A("JsonView"), x = A("VButton"), I = He, T = qe, g = kt, E = gt, $ = A("v-form"), ee = A("dev-layout");
|
|
2570
|
+
return a(), h(ee, null, {
|
|
2571
|
+
"left-aside": r(() => [
|
|
2572
|
+
u(d, { style: { width: "200px" } }, {
|
|
2573
|
+
default: r(() => [
|
|
2574
|
+
u(d, null, {
|
|
2575
|
+
default: r(() => [
|
|
2576
|
+
u(i, {
|
|
2550
2577
|
class: "title",
|
|
2551
2578
|
"data-id": 22222
|
|
2552
2579
|
}, {
|
|
2553
|
-
default:
|
|
2554
|
-
|
|
2580
|
+
default: r(() => [...t[5] || (t[5] = [
|
|
2581
|
+
C("添加搜索条件", -1)
|
|
2555
2582
|
])]),
|
|
2556
2583
|
_: 1
|
|
2557
2584
|
}),
|
|
2558
|
-
u(
|
|
2559
|
-
default:
|
|
2560
|
-
u(
|
|
2585
|
+
u(i, { class: "ctrl" }, {
|
|
2586
|
+
default: r(() => [
|
|
2587
|
+
u(c, {
|
|
2561
2588
|
class: "ctrl-btn",
|
|
2562
|
-
onClick: t[0] || (t[0] = (
|
|
2589
|
+
onClick: t[0] || (t[0] = (_) => s.pushFilter("input"))
|
|
2563
2590
|
}, {
|
|
2564
|
-
default:
|
|
2565
|
-
|
|
2591
|
+
default: r(() => [...t[6] || (t[6] = [
|
|
2592
|
+
C("文本框", -1)
|
|
2566
2593
|
])]),
|
|
2567
2594
|
_: 1
|
|
2568
2595
|
})
|
|
2569
2596
|
]),
|
|
2570
2597
|
_: 1
|
|
2571
2598
|
}),
|
|
2572
|
-
u(
|
|
2573
|
-
default:
|
|
2574
|
-
u(
|
|
2599
|
+
u(i, { class: "ctrl" }, {
|
|
2600
|
+
default: r(() => [
|
|
2601
|
+
u(c, {
|
|
2575
2602
|
class: "ctrl-btn",
|
|
2576
|
-
onClick: t[1] || (t[1] = (
|
|
2603
|
+
onClick: t[1] || (t[1] = (_) => s.pushFilter("select"))
|
|
2577
2604
|
}, {
|
|
2578
|
-
default:
|
|
2579
|
-
|
|
2605
|
+
default: r(() => [...t[7] || (t[7] = [
|
|
2606
|
+
C("下拉框", -1)
|
|
2580
2607
|
])]),
|
|
2581
2608
|
_: 1
|
|
2582
2609
|
})
|
|
2583
2610
|
]),
|
|
2584
2611
|
_: 1
|
|
2585
2612
|
}),
|
|
2586
|
-
u(
|
|
2587
|
-
default:
|
|
2588
|
-
u(
|
|
2613
|
+
u(i, { class: "ctrl" }, {
|
|
2614
|
+
default: r(() => [
|
|
2615
|
+
u(c, {
|
|
2589
2616
|
class: "ctrl-btn",
|
|
2590
|
-
onClick: t[2] || (t[2] = (
|
|
2617
|
+
onClick: t[2] || (t[2] = (_) => s.pushFilter("date"))
|
|
2591
2618
|
}, {
|
|
2592
|
-
default:
|
|
2593
|
-
|
|
2619
|
+
default: r(() => [...t[8] || (t[8] = [
|
|
2620
|
+
C("日期", -1)
|
|
2594
2621
|
])]),
|
|
2595
2622
|
_: 1
|
|
2596
2623
|
})
|
|
@@ -2600,25 +2627,25 @@ function xl(e, t, n, o, l, s) {
|
|
|
2600
2627
|
]),
|
|
2601
2628
|
_: 1
|
|
2602
2629
|
}),
|
|
2603
|
-
u(
|
|
2604
|
-
default:
|
|
2605
|
-
u(
|
|
2606
|
-
default:
|
|
2607
|
-
|
|
2630
|
+
u(d, null, {
|
|
2631
|
+
default: r(() => [
|
|
2632
|
+
u(i, { class: "title" }, {
|
|
2633
|
+
default: r(() => [...t[9] || (t[9] = [
|
|
2634
|
+
C("添加列表项", -1)
|
|
2608
2635
|
])]),
|
|
2609
2636
|
_: 1
|
|
2610
2637
|
}),
|
|
2611
|
-
(
|
|
2612
|
-
key: `column-${
|
|
2638
|
+
(a(!0), y(O, null, q(Object.keys(l.ctrlMap.headers), (_, V) => (a(), h(i, {
|
|
2639
|
+
key: `column-${V}`,
|
|
2613
2640
|
class: "ctrl"
|
|
2614
2641
|
}, {
|
|
2615
|
-
default:
|
|
2616
|
-
u(
|
|
2642
|
+
default: r(() => [
|
|
2643
|
+
u(c, {
|
|
2617
2644
|
class: "ctrl-btn",
|
|
2618
|
-
onClick: (
|
|
2645
|
+
onClick: (G) => s.pushHeaders(l.ctrlMap.headers[_].type)
|
|
2619
2646
|
}, {
|
|
2620
|
-
default:
|
|
2621
|
-
|
|
2647
|
+
default: r(() => [
|
|
2648
|
+
C(N(l.ctrlMap.headers[_].name), 1)
|
|
2622
2649
|
]),
|
|
2623
2650
|
_: 2
|
|
2624
2651
|
}, 1032, ["onClick"])
|
|
@@ -2628,25 +2655,25 @@ function xl(e, t, n, o, l, s) {
|
|
|
2628
2655
|
]),
|
|
2629
2656
|
_: 1
|
|
2630
2657
|
}),
|
|
2631
|
-
u(
|
|
2632
|
-
default:
|
|
2633
|
-
u(
|
|
2634
|
-
default:
|
|
2635
|
-
|
|
2658
|
+
u(d, null, {
|
|
2659
|
+
default: r(() => [
|
|
2660
|
+
u(i, { class: "title" }, {
|
|
2661
|
+
default: r(() => [...t[10] || (t[10] = [
|
|
2662
|
+
C("添加行按钮", -1)
|
|
2636
2663
|
])]),
|
|
2637
2664
|
_: 1
|
|
2638
2665
|
}),
|
|
2639
|
-
(
|
|
2640
|
-
key: `column-${
|
|
2666
|
+
(a(!0), y(O, null, q(Object.keys(l.ctrlMap.buttons), (_, V) => (a(), h(i, {
|
|
2667
|
+
key: `column-${V}`,
|
|
2641
2668
|
class: "ctrl"
|
|
2642
2669
|
}, {
|
|
2643
|
-
default:
|
|
2644
|
-
u(
|
|
2670
|
+
default: r(() => [
|
|
2671
|
+
u(c, {
|
|
2645
2672
|
class: "ctrl-btn",
|
|
2646
|
-
onClick: (
|
|
2673
|
+
onClick: (G) => s.pushRowButton(l.ctrlMap.buttons[_].type)
|
|
2647
2674
|
}, {
|
|
2648
|
-
default:
|
|
2649
|
-
|
|
2675
|
+
default: r(() => [
|
|
2676
|
+
C(N(l.ctrlMap.buttons[_].name), 1)
|
|
2650
2677
|
]),
|
|
2651
2678
|
_: 2
|
|
2652
2679
|
}, 1032, ["onClick"])
|
|
@@ -2656,36 +2683,36 @@ function xl(e, t, n, o, l, s) {
|
|
|
2656
2683
|
]),
|
|
2657
2684
|
_: 1
|
|
2658
2685
|
}),
|
|
2659
|
-
u(
|
|
2660
|
-
default:
|
|
2661
|
-
u(
|
|
2662
|
-
default:
|
|
2663
|
-
|
|
2686
|
+
u(d, null, {
|
|
2687
|
+
default: r(() => [
|
|
2688
|
+
u(i, { class: "title" }, {
|
|
2689
|
+
default: r(() => [...t[11] || (t[11] = [
|
|
2690
|
+
C("添加常规按钮", -1)
|
|
2664
2691
|
])]),
|
|
2665
2692
|
_: 1
|
|
2666
2693
|
}),
|
|
2667
|
-
(
|
|
2668
|
-
key: `column-${
|
|
2694
|
+
(a(!0), y(O, null, q(Object.keys(l.ctrlMap.buttons), (_, V) => (a(), h(i, {
|
|
2695
|
+
key: `column-${V}`,
|
|
2669
2696
|
class: "ctrl"
|
|
2670
2697
|
}, {
|
|
2671
|
-
default:
|
|
2672
|
-
u(
|
|
2698
|
+
default: r(() => [
|
|
2699
|
+
u(c, {
|
|
2673
2700
|
class: "ctrl-btn",
|
|
2674
|
-
onClick: (
|
|
2701
|
+
onClick: (G) => s.pushNormalButton(l.ctrlMap.buttons[_].type)
|
|
2675
2702
|
}, {
|
|
2676
|
-
default:
|
|
2677
|
-
|
|
2703
|
+
default: r(() => [
|
|
2704
|
+
C(N(l.ctrlMap.buttons[_].name), 1)
|
|
2678
2705
|
]),
|
|
2679
2706
|
_: 2
|
|
2680
2707
|
}, 1032, ["onClick"])
|
|
2681
2708
|
]),
|
|
2682
2709
|
_: 2
|
|
2683
2710
|
}, 1024))), 128)),
|
|
2684
|
-
u(
|
|
2685
|
-
default:
|
|
2686
|
-
u(
|
|
2687
|
-
default:
|
|
2688
|
-
|
|
2711
|
+
u(i, { class: "ctrl" }, {
|
|
2712
|
+
default: r(() => [
|
|
2713
|
+
u(c, { class: "ctrl-btn" }, {
|
|
2714
|
+
default: r(() => [...t[12] || (t[12] = [
|
|
2715
|
+
C("按钮组", -1)
|
|
2689
2716
|
])]),
|
|
2690
2717
|
_: 1
|
|
2691
2718
|
})
|
|
@@ -2695,36 +2722,36 @@ function xl(e, t, n, o, l, s) {
|
|
|
2695
2722
|
]),
|
|
2696
2723
|
_: 1
|
|
2697
2724
|
}),
|
|
2698
|
-
u(
|
|
2699
|
-
default:
|
|
2700
|
-
u(
|
|
2701
|
-
default:
|
|
2702
|
-
|
|
2725
|
+
u(d, null, {
|
|
2726
|
+
default: r(() => [
|
|
2727
|
+
u(i, { class: "title" }, {
|
|
2728
|
+
default: r(() => [...t[13] || (t[13] = [
|
|
2729
|
+
C("添加批量按钮", -1)
|
|
2703
2730
|
])]),
|
|
2704
2731
|
_: 1
|
|
2705
2732
|
}),
|
|
2706
|
-
(
|
|
2707
|
-
key: `column-${
|
|
2733
|
+
(a(!0), y(O, null, q(Object.keys(l.ctrlMap.buttons), (_, V) => (a(), h(i, {
|
|
2734
|
+
key: `column-${V}`,
|
|
2708
2735
|
class: "ctrl"
|
|
2709
2736
|
}, {
|
|
2710
|
-
default:
|
|
2711
|
-
u(
|
|
2737
|
+
default: r(() => [
|
|
2738
|
+
u(c, {
|
|
2712
2739
|
class: "ctrl-btn",
|
|
2713
|
-
onClick: (
|
|
2740
|
+
onClick: (G) => s.pushBatchButton(l.ctrlMap.buttons[_].type)
|
|
2714
2741
|
}, {
|
|
2715
|
-
default:
|
|
2716
|
-
|
|
2742
|
+
default: r(() => [
|
|
2743
|
+
C(N(l.ctrlMap.buttons[_].name), 1)
|
|
2717
2744
|
]),
|
|
2718
2745
|
_: 2
|
|
2719
2746
|
}, 1032, ["onClick"])
|
|
2720
2747
|
]),
|
|
2721
2748
|
_: 2
|
|
2722
2749
|
}, 1024))), 128)),
|
|
2723
|
-
u(
|
|
2724
|
-
default:
|
|
2725
|
-
u(
|
|
2726
|
-
default:
|
|
2727
|
-
|
|
2750
|
+
u(i, { class: "ctrl" }, {
|
|
2751
|
+
default: r(() => [
|
|
2752
|
+
u(c, { class: "ctrl-btn" }, {
|
|
2753
|
+
default: r(() => [...t[14] || (t[14] = [
|
|
2754
|
+
C("按钮组", -1)
|
|
2728
2755
|
])]),
|
|
2729
2756
|
_: 1
|
|
2730
2757
|
})
|
|
@@ -2738,47 +2765,47 @@ function xl(e, t, n, o, l, s) {
|
|
|
2738
2765
|
_: 1
|
|
2739
2766
|
})
|
|
2740
2767
|
]),
|
|
2741
|
-
main:
|
|
2742
|
-
(
|
|
2768
|
+
main: r(() => [
|
|
2769
|
+
(a(), h(m, Q({
|
|
2743
2770
|
ref: "table",
|
|
2744
2771
|
key: l.key,
|
|
2745
2772
|
dev: !0
|
|
2746
2773
|
}, l.builderSchema), null, 16)),
|
|
2747
|
-
u(
|
|
2748
|
-
u(
|
|
2774
|
+
u(f),
|
|
2775
|
+
u(k, {
|
|
2749
2776
|
type: "primary",
|
|
2750
2777
|
onClick: s.saveSchema
|
|
2751
2778
|
}, {
|
|
2752
|
-
default:
|
|
2753
|
-
|
|
2779
|
+
default: r(() => [...t[15] || (t[15] = [
|
|
2780
|
+
C("保存页面配置", -1)
|
|
2754
2781
|
])]),
|
|
2755
2782
|
_: 1
|
|
2756
2783
|
}, 8, ["onClick"]),
|
|
2757
|
-
t[16] || (t[16] =
|
|
2758
|
-
u(
|
|
2784
|
+
t[16] || (t[16] = C(" ", -1)),
|
|
2785
|
+
u(x, {
|
|
2759
2786
|
text: "PageSchema",
|
|
2760
2787
|
type: "modal"
|
|
2761
2788
|
}, {
|
|
2762
|
-
default:
|
|
2763
|
-
u(
|
|
2789
|
+
default: r(() => [
|
|
2790
|
+
u(b, { data: s.getSaveSchema }, null, 8, ["data"])
|
|
2764
2791
|
]),
|
|
2765
2792
|
_: 1
|
|
2766
2793
|
})
|
|
2767
2794
|
]),
|
|
2768
|
-
"right-aside":
|
|
2769
|
-
l.activeIndex ? (
|
|
2770
|
-
default:
|
|
2795
|
+
"right-aside": r(() => [
|
|
2796
|
+
l.activeIndex ? (a(), h(E, { key: 0 }, {
|
|
2797
|
+
default: r(() => [
|
|
2771
2798
|
u(g, { label: "控件类型" }, {
|
|
2772
|
-
default:
|
|
2773
|
-
u(
|
|
2799
|
+
default: r(() => [
|
|
2800
|
+
u(T, {
|
|
2774
2801
|
modelValue: l.currentCtrlType,
|
|
2775
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
2802
|
+
"onUpdate:modelValue": t[3] || (t[3] = (_) => l.currentCtrlType = _)
|
|
2776
2803
|
}, {
|
|
2777
|
-
default:
|
|
2778
|
-
(
|
|
2779
|
-
key:
|
|
2780
|
-
label:
|
|
2781
|
-
value:
|
|
2804
|
+
default: r(() => [
|
|
2805
|
+
(a(!0), y(O, null, q(s.types, (_, V) => (a(), h(I, {
|
|
2806
|
+
key: V,
|
|
2807
|
+
label: _.label,
|
|
2808
|
+
value: _.value
|
|
2782
2809
|
}, null, 8, ["label", "value"]))), 128))
|
|
2783
2810
|
]),
|
|
2784
2811
|
_: 1
|
|
@@ -2788,70 +2815,70 @@ function xl(e, t, n, o, l, s) {
|
|
|
2788
2815
|
})
|
|
2789
2816
|
]),
|
|
2790
2817
|
_: 1
|
|
2791
|
-
})) :
|
|
2792
|
-
(
|
|
2818
|
+
})) : B("", !0),
|
|
2819
|
+
(a(), h($, Q({
|
|
2793
2820
|
key: l.ctrlKey,
|
|
2794
2821
|
modelValue: l.ctrlOptions,
|
|
2795
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
2822
|
+
"onUpdate:modelValue": t[4] || (t[4] = (_) => l.ctrlOptions = _)
|
|
2796
2823
|
}, l.ctrlSchema), null, 16, ["modelValue"]))
|
|
2797
2824
|
]),
|
|
2798
2825
|
_: 1
|
|
2799
2826
|
});
|
|
2800
2827
|
}
|
|
2801
|
-
const
|
|
2828
|
+
const Tl = /* @__PURE__ */ L(Il, [["render", Cl], ["__scopeId", "data-v-af2552ba"]]), Bl = "rtl", Rl = {
|
|
2802
2829
|
__name: "PageEditor",
|
|
2803
2830
|
setup(e) {
|
|
2804
|
-
const t =
|
|
2805
|
-
|
|
2806
|
-
const n =
|
|
2807
|
-
return (s,
|
|
2808
|
-
const
|
|
2809
|
-
return
|
|
2810
|
-
u(
|
|
2831
|
+
const t = R(!1);
|
|
2832
|
+
R(1);
|
|
2833
|
+
const n = se(), o = X(), l = w(() => o.pages[n.path]);
|
|
2834
|
+
return (s, i) => {
|
|
2835
|
+
const c = A("VIcon"), d = St;
|
|
2836
|
+
return a(), y(O, null, [
|
|
2837
|
+
u(c, {
|
|
2811
2838
|
name: "ra-set",
|
|
2812
|
-
onClick:
|
|
2839
|
+
onClick: i[0] || (i[0] = (m) => t.value = !p(t))
|
|
2813
2840
|
}),
|
|
2814
|
-
u(
|
|
2815
|
-
modelValue:
|
|
2816
|
-
"onUpdate:modelValue":
|
|
2841
|
+
u(d, {
|
|
2842
|
+
modelValue: p(t),
|
|
2843
|
+
"onUpdate:modelValue": i[1] || (i[1] = (m) => dt(t) ? t.value = m : null),
|
|
2817
2844
|
title: "页面设计",
|
|
2818
2845
|
class: "my-drawer",
|
|
2819
|
-
direction:
|
|
2846
|
+
direction: Bl,
|
|
2820
2847
|
size: "90%",
|
|
2821
2848
|
"destroy-on-close": "",
|
|
2822
2849
|
"append-to-body": ""
|
|
2823
2850
|
}, {
|
|
2824
|
-
default:
|
|
2825
|
-
|
|
2851
|
+
default: r(() => [
|
|
2852
|
+
p(l).formItems !== void 0 ? (a(), h(al, {
|
|
2826
2853
|
key: 0,
|
|
2827
|
-
schema:
|
|
2828
|
-
}, null, 8, ["schema"])) :
|
|
2829
|
-
|
|
2854
|
+
schema: p(l)
|
|
2855
|
+
}, null, 8, ["schema"])) : B("", !0),
|
|
2856
|
+
p(l).headers !== void 0 ? (a(), h(Tl, {
|
|
2830
2857
|
key: 1,
|
|
2831
|
-
schema:
|
|
2832
|
-
}, null, 8, ["schema"])) :
|
|
2858
|
+
schema: p(l)
|
|
2859
|
+
}, null, 8, ["schema"])) : B("", !0)
|
|
2833
2860
|
]),
|
|
2834
2861
|
_: 1
|
|
2835
2862
|
}, 8, ["modelValue"])
|
|
2836
2863
|
], 64);
|
|
2837
2864
|
};
|
|
2838
2865
|
}
|
|
2839
|
-
},
|
|
2866
|
+
}, Ol = { class: "right-content" }, $l = {
|
|
2840
2867
|
key: 0,
|
|
2841
2868
|
class: "right-item"
|
|
2842
|
-
},
|
|
2869
|
+
}, Al = {
|
|
2843
2870
|
class: "right-item-button",
|
|
2844
2871
|
style: { padding: "0" }
|
|
2845
|
-
},
|
|
2872
|
+
}, Pl = { class: "user-info" }, Ll = ["src"], Ml = { class: "user-name" }, Dl = /* @__PURE__ */ K({
|
|
2846
2873
|
__name: "Navbar",
|
|
2847
2874
|
setup(e) {
|
|
2848
|
-
const t =
|
|
2849
|
-
|
|
2850
|
-
const l =
|
|
2851
|
-
|
|
2852
|
-
const s =
|
|
2853
|
-
const D =
|
|
2854
|
-
return
|
|
2875
|
+
const t = X(), n = U(), o = j();
|
|
2876
|
+
R(!1);
|
|
2877
|
+
const l = R(!1);
|
|
2878
|
+
R(""), R(0);
|
|
2879
|
+
const s = w(() => n.defaultAvatar), i = w(() => t.sidebar), c = w(() => o.avatar), d = w(() => o.name), m = w(() => o.nickname), f = w(() => n.nav), k = w(() => n), b = w(() => o), x = w(() => n.showPageJsonSchema || !1), { isDark: I, toggleTheme: T } = $t(), g = w(() => {
|
|
2880
|
+
const D = k.value.envColor?.[b.value.env];
|
|
2881
|
+
return I.value ? {
|
|
2855
2882
|
background: "linear-gradient(135deg, rgba(59, 130, 246, 0.55) 0%, rgba(37, 99, 235, 0.45) 45%, rgba(15, 23, 42, 0.92) 100%)",
|
|
2856
2883
|
borderBottom: "1px solid rgba(148, 163, 184, 0.35)",
|
|
2857
2884
|
boxShadow: "0 1px 8px rgba(15, 23, 42, 0.7)"
|
|
@@ -2865,100 +2892,100 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
2865
2892
|
boxShadow: "0 1px 4px rgba(15, 23, 42, 0.05)"
|
|
2866
2893
|
};
|
|
2867
2894
|
});
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
const D =
|
|
2871
|
-
D.length > 0 && !
|
|
2895
|
+
Ue(() => {
|
|
2896
|
+
ft("el-submenu is-active");
|
|
2897
|
+
const D = _("navBarNotice") || "";
|
|
2898
|
+
D.length > 0 && !_("closeNavNotice") && G(D) && window?.App?.config?.globalProperties?.$notify({
|
|
2872
2899
|
title: "提示",
|
|
2873
2900
|
message: D,
|
|
2874
2901
|
dangerouslyUseHTMLString: !0,
|
|
2875
2902
|
duration: 0,
|
|
2876
|
-
onClose:
|
|
2877
|
-
}),
|
|
2878
|
-
elRef:
|
|
2879
|
-
waterMark:
|
|
2903
|
+
onClose: V
|
|
2904
|
+
}), k.value.envColor?.[b.value.env] && _n({
|
|
2905
|
+
elRef: E.value.$el,
|
|
2906
|
+
waterMark: b.value.env,
|
|
2880
2907
|
color: "skyblue",
|
|
2881
2908
|
size: "20"
|
|
2882
2909
|
});
|
|
2883
2910
|
});
|
|
2884
|
-
const
|
|
2885
|
-
function
|
|
2911
|
+
const E = R();
|
|
2912
|
+
function $() {
|
|
2886
2913
|
t.toggleSideBar();
|
|
2887
2914
|
}
|
|
2888
|
-
async function
|
|
2915
|
+
async function ee() {
|
|
2889
2916
|
await o.logout();
|
|
2890
2917
|
const D = window?.App?.config?.globalProperties?.$router?.currentRoute?.value;
|
|
2891
2918
|
location.reload(`${location.origin}/#/login?redirect=${D?.fullPath || "/"}`);
|
|
2892
2919
|
}
|
|
2893
|
-
function
|
|
2920
|
+
function _(D) {
|
|
2894
2921
|
return n[D];
|
|
2895
2922
|
}
|
|
2896
|
-
async function
|
|
2897
|
-
n.updateSettings({ closeNavNotice: !0 }),
|
|
2923
|
+
async function V() {
|
|
2924
|
+
n.updateSettings({ closeNavNotice: !0 }), Kt(_("navBarNotice"));
|
|
2898
2925
|
}
|
|
2899
|
-
function
|
|
2900
|
-
const
|
|
2901
|
-
return
|
|
2926
|
+
function G(D) {
|
|
2927
|
+
const M = "dismiss:navbar_notice";
|
|
2928
|
+
return fe.exist(M) ? fe.get(M) !== D : !0;
|
|
2902
2929
|
}
|
|
2903
|
-
function
|
|
2904
|
-
|
|
2930
|
+
function Kt(D) {
|
|
2931
|
+
fe.set("dismiss:navbar_notice", D);
|
|
2905
2932
|
}
|
|
2906
|
-
return (D,
|
|
2907
|
-
const
|
|
2908
|
-
return
|
|
2933
|
+
return (D, M) => {
|
|
2934
|
+
const Qe = Fe, Jt = Vn, Wt = Un, Xe = Fn, Qt = Hn, Xt = qn, Zt = St, Yt = xe;
|
|
2935
|
+
return a(), h(Yt, {
|
|
2909
2936
|
ref_key: "header",
|
|
2910
|
-
ref:
|
|
2937
|
+
ref: E,
|
|
2911
2938
|
class: "navbar",
|
|
2912
|
-
style:
|
|
2939
|
+
style: ln(g.value)
|
|
2913
2940
|
}, {
|
|
2914
|
-
default:
|
|
2915
|
-
u(
|
|
2916
|
-
default:
|
|
2917
|
-
u(
|
|
2918
|
-
"is-active":
|
|
2941
|
+
default: r(() => [
|
|
2942
|
+
u(Qe, { span: 16 }, {
|
|
2943
|
+
default: r(() => [
|
|
2944
|
+
u(Vo, {
|
|
2945
|
+
"is-active": i.value.opened,
|
|
2919
2946
|
class: "hamburger-container",
|
|
2920
|
-
onToggleClick:
|
|
2947
|
+
onToggleClick: $
|
|
2921
2948
|
}, null, 8, ["is-active"]),
|
|
2922
|
-
u(
|
|
2949
|
+
u(jo, { class: "breadcrumb-container" })
|
|
2923
2950
|
]),
|
|
2924
2951
|
_: 1
|
|
2925
2952
|
}),
|
|
2926
|
-
u(
|
|
2927
|
-
default:
|
|
2928
|
-
v("div",
|
|
2929
|
-
|
|
2930
|
-
u(
|
|
2931
|
-
])) :
|
|
2932
|
-
v("div",
|
|
2933
|
-
u(
|
|
2953
|
+
u(Qe, { span: 8 }, {
|
|
2954
|
+
default: r(() => [
|
|
2955
|
+
v("div", Ol, [
|
|
2956
|
+
x.value ? (a(), y("div", $l, [
|
|
2957
|
+
u(Rl)
|
|
2958
|
+
])) : B("", !0),
|
|
2959
|
+
v("div", Al, [
|
|
2960
|
+
u(p(Ge), { buttons: f.value }, null, 8, ["buttons"])
|
|
2934
2961
|
]),
|
|
2935
|
-
u(
|
|
2962
|
+
u(Wt, {
|
|
2936
2963
|
placement: "bottom",
|
|
2937
|
-
content:
|
|
2964
|
+
content: p(I) ? "切换为明亮模式" : "切换为暗黑模式"
|
|
2938
2965
|
}, {
|
|
2939
|
-
default:
|
|
2966
|
+
default: r(() => [
|
|
2940
2967
|
v("div", {
|
|
2941
2968
|
class: "right-item theme-toggle",
|
|
2942
2969
|
role: "button",
|
|
2943
2970
|
tabindex: "0",
|
|
2944
|
-
onClick:
|
|
2945
|
-
(...
|
|
2971
|
+
onClick: M[0] || (M[0] = //@ts-ignore
|
|
2972
|
+
(...te) => p(T) && p(T)(...te)),
|
|
2946
2973
|
onKeydown: [
|
|
2947
|
-
|
|
2974
|
+
M[1] || (M[1] = Ze(Ye(
|
|
2948
2975
|
//@ts-ignore
|
|
2949
|
-
(...
|
|
2976
|
+
(...te) => p(T) && p(T)(...te),
|
|
2950
2977
|
["prevent"]
|
|
2951
2978
|
), ["enter"])),
|
|
2952
|
-
|
|
2979
|
+
M[2] || (M[2] = Ze(Ye(
|
|
2953
2980
|
//@ts-ignore
|
|
2954
|
-
(...
|
|
2981
|
+
(...te) => p(T) && p(T)(...te),
|
|
2955
2982
|
["prevent"]
|
|
2956
2983
|
), ["space"]))
|
|
2957
2984
|
]
|
|
2958
2985
|
}, [
|
|
2959
|
-
u(
|
|
2960
|
-
default:
|
|
2961
|
-
(
|
|
2986
|
+
u(Jt, null, {
|
|
2987
|
+
default: r(() => [
|
|
2988
|
+
(a(), h(pt(p(I) ? p(lo) : p(so))))
|
|
2962
2989
|
]),
|
|
2963
2990
|
_: 1
|
|
2964
2991
|
})
|
|
@@ -2966,29 +2993,29 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
2966
2993
|
]),
|
|
2967
2994
|
_: 1
|
|
2968
2995
|
}, 8, ["content"]),
|
|
2969
|
-
u(
|
|
2996
|
+
u(Xt, {
|
|
2970
2997
|
class: "right-item",
|
|
2971
2998
|
trigger: "click"
|
|
2972
2999
|
}, {
|
|
2973
|
-
dropdown:
|
|
2974
|
-
u(
|
|
2975
|
-
default:
|
|
2976
|
-
u(
|
|
3000
|
+
dropdown: r(() => [
|
|
3001
|
+
u(Qt, { class: "user-dropdown" }, {
|
|
3002
|
+
default: r(() => [
|
|
3003
|
+
u(Xe, {
|
|
2977
3004
|
icon: "oms-icon-index",
|
|
2978
|
-
onClick:
|
|
3005
|
+
onClick: M[3] || (M[3] = (te) => D.$router.push("/"))
|
|
2979
3006
|
}, {
|
|
2980
|
-
default:
|
|
2981
|
-
|
|
3007
|
+
default: r(() => [...M[5] || (M[5] = [
|
|
3008
|
+
C("首页", -1)
|
|
2982
3009
|
])]),
|
|
2983
3010
|
_: 1
|
|
2984
3011
|
}),
|
|
2985
|
-
u(
|
|
3012
|
+
u(Xe, {
|
|
2986
3013
|
divided: "",
|
|
2987
3014
|
icon: "el-icon-switch-button",
|
|
2988
|
-
onClick:
|
|
3015
|
+
onClick: ee
|
|
2989
3016
|
}, {
|
|
2990
|
-
default:
|
|
2991
|
-
|
|
3017
|
+
default: r(() => [...M[6] || (M[6] = [
|
|
3018
|
+
C("退出登录", -1)
|
|
2992
3019
|
])]),
|
|
2993
3020
|
_: 1
|
|
2994
3021
|
})
|
|
@@ -2996,15 +3023,15 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
2996
3023
|
_: 1
|
|
2997
3024
|
})
|
|
2998
3025
|
]),
|
|
2999
|
-
default:
|
|
3000
|
-
v("div",
|
|
3026
|
+
default: r(() => [
|
|
3027
|
+
v("div", Pl, [
|
|
3001
3028
|
v("img", {
|
|
3002
|
-
src:
|
|
3029
|
+
src: c.value ? c.value : s.value,
|
|
3003
3030
|
class: "user-avatar",
|
|
3004
3031
|
alt: "头像"
|
|
3005
|
-
}, null, 8,
|
|
3006
|
-
|
|
3007
|
-
v("span",
|
|
3032
|
+
}, null, 8, Ll),
|
|
3033
|
+
M[4] || (M[4] = C()),
|
|
3034
|
+
v("span", Ml, N(m.value || d.value), 1)
|
|
3008
3035
|
])
|
|
3009
3036
|
]),
|
|
3010
3037
|
_: 1
|
|
@@ -3013,59 +3040,59 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
3013
3040
|
]),
|
|
3014
3041
|
_: 1
|
|
3015
3042
|
}),
|
|
3016
|
-
l.value ? (
|
|
3043
|
+
l.value ? (a(), h(Zt, {
|
|
3017
3044
|
key: 0,
|
|
3018
3045
|
"with-header": !1,
|
|
3019
3046
|
size: "50%"
|
|
3020
|
-
})) :
|
|
3047
|
+
})) : B("", !0)
|
|
3021
3048
|
]),
|
|
3022
3049
|
_: 1
|
|
3023
3050
|
}, 8, ["style"]);
|
|
3024
3051
|
};
|
|
3025
3052
|
}
|
|
3026
|
-
}),
|
|
3053
|
+
}), jl = /* @__PURE__ */ L(Dl, [["__scopeId", "data-v-c4905268"]]), Nl = ["src"], Ul = {
|
|
3027
3054
|
key: 1,
|
|
3028
3055
|
class: "sidebar-title"
|
|
3029
|
-
},
|
|
3056
|
+
}, Vl = ["src"], ql = { class: "sidebar-title" }, Hl = /* @__PURE__ */ K({
|
|
3030
3057
|
__name: "Logo",
|
|
3031
3058
|
props: {
|
|
3032
3059
|
collapse: { type: Boolean }
|
|
3033
3060
|
},
|
|
3034
3061
|
setup(e) {
|
|
3035
|
-
const t =
|
|
3062
|
+
const t = U(), n = w(() => t.title), o = w(() => t.logo);
|
|
3036
3063
|
return (l, s) => {
|
|
3037
|
-
const
|
|
3038
|
-
return
|
|
3039
|
-
class:
|
|
3064
|
+
const i = A("router-link");
|
|
3065
|
+
return a(), y("div", {
|
|
3066
|
+
class: Z(["sidebar-logo-container", { collapse: l.collapse }])
|
|
3040
3067
|
}, [
|
|
3041
|
-
u(
|
|
3042
|
-
default:
|
|
3043
|
-
l.collapse ? (
|
|
3068
|
+
u(sn, { name: "sidebarLogoFade" }, {
|
|
3069
|
+
default: r(() => [
|
|
3070
|
+
l.collapse ? (a(), h(i, {
|
|
3044
3071
|
key: "collapse",
|
|
3045
3072
|
class: "sidebar-logo-link",
|
|
3046
3073
|
to: "/"
|
|
3047
3074
|
}, {
|
|
3048
|
-
default:
|
|
3049
|
-
o.value ? (
|
|
3075
|
+
default: r(() => [
|
|
3076
|
+
o.value ? (a(), y("img", {
|
|
3050
3077
|
key: 0,
|
|
3051
3078
|
src: o.value,
|
|
3052
3079
|
class: "sidebar-logo"
|
|
3053
|
-
}, null, 8,
|
|
3080
|
+
}, null, 8, Nl)) : (a(), y("h1", Ul, N(n.value), 1)),
|
|
3054
3081
|
s[0] || (s[0] = v("div", null, "系统", -1))
|
|
3055
3082
|
]),
|
|
3056
3083
|
_: 1
|
|
3057
|
-
})) : (
|
|
3084
|
+
})) : (a(), h(i, {
|
|
3058
3085
|
key: "expand",
|
|
3059
3086
|
class: "sidebar-logo-link",
|
|
3060
3087
|
to: "/"
|
|
3061
3088
|
}, {
|
|
3062
|
-
default:
|
|
3063
|
-
o.value ? (
|
|
3089
|
+
default: r(() => [
|
|
3090
|
+
o.value ? (a(), y("img", {
|
|
3064
3091
|
key: 0,
|
|
3065
3092
|
src: o.value,
|
|
3066
3093
|
class: "sidebar-logo"
|
|
3067
|
-
}, null, 8,
|
|
3068
|
-
v("h1",
|
|
3094
|
+
}, null, 8, Vl)) : B("", !0),
|
|
3095
|
+
v("h1", ql, N(n.value), 1)
|
|
3069
3096
|
]),
|
|
3070
3097
|
_: 1
|
|
3071
3098
|
}))
|
|
@@ -3075,7 +3102,7 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
3075
3102
|
], 2);
|
|
3076
3103
|
};
|
|
3077
3104
|
}
|
|
3078
|
-
}),
|
|
3105
|
+
}), Fl = /* @__PURE__ */ L(Hl, [["__scopeId", "data-v-7c0ca32e"]]), Gl = {
|
|
3079
3106
|
props: {
|
|
3080
3107
|
to: {
|
|
3081
3108
|
type: String,
|
|
@@ -3088,10 +3115,10 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
3088
3115
|
},
|
|
3089
3116
|
methods: {
|
|
3090
3117
|
compType(e) {
|
|
3091
|
-
return
|
|
3118
|
+
return et(e) || this.newTab ? "a" : "router-link";
|
|
3092
3119
|
},
|
|
3093
3120
|
linkProps(e) {
|
|
3094
|
-
return
|
|
3121
|
+
return et(e) ? {
|
|
3095
3122
|
is: "a",
|
|
3096
3123
|
href: e,
|
|
3097
3124
|
target: "_blank",
|
|
@@ -3108,15 +3135,15 @@ const El = /* @__PURE__ */ P(Sl, [["render", xl], ["__scopeId", "data-v-cd18f87f
|
|
|
3108
3135
|
}
|
|
3109
3136
|
}
|
|
3110
3137
|
};
|
|
3111
|
-
function
|
|
3112
|
-
return
|
|
3113
|
-
default:
|
|
3114
|
-
|
|
3138
|
+
function zl(e, t, n, o, l, s) {
|
|
3139
|
+
return a(), h(pt(s.compType(n.to)), le(ke(s.linkProps(n.to))), {
|
|
3140
|
+
default: r(() => [
|
|
3141
|
+
re(e.$slots, "default")
|
|
3115
3142
|
]),
|
|
3116
3143
|
_: 3
|
|
3117
3144
|
}, 16);
|
|
3118
3145
|
}
|
|
3119
|
-
const
|
|
3146
|
+
const Kl = /* @__PURE__ */ L(Gl, [["render", zl]]), Jl = {
|
|
3120
3147
|
computed: {
|
|
3121
3148
|
// @ts-ignore
|
|
3122
3149
|
device() {
|
|
@@ -3137,7 +3164,7 @@ const Fl = /* @__PURE__ */ P(Ul, [["render", Hl]]), Gl = {
|
|
|
3137
3164
|
}
|
|
3138
3165
|
}
|
|
3139
3166
|
}
|
|
3140
|
-
},
|
|
3167
|
+
}, Wl = { class: "menu-content" }, Ql = /* @__PURE__ */ K({
|
|
3141
3168
|
__name: "MenuContent",
|
|
3142
3169
|
props: {
|
|
3143
3170
|
meta: {
|
|
@@ -3151,21 +3178,21 @@ const Fl = /* @__PURE__ */ P(Ul, [["render", Hl]]), Gl = {
|
|
|
3151
3178
|
setup(e) {
|
|
3152
3179
|
return (t, n) => {
|
|
3153
3180
|
const o = A("VIcon");
|
|
3154
|
-
return
|
|
3181
|
+
return a(), y(O, null, [
|
|
3155
3182
|
u(o, {
|
|
3156
3183
|
name: e.meta.icon || "ra-all"
|
|
3157
3184
|
}, null, 8, ["name"]),
|
|
3158
|
-
v("span",
|
|
3185
|
+
v("span", Wl, N(e.meta.title), 1)
|
|
3159
3186
|
], 64);
|
|
3160
3187
|
};
|
|
3161
3188
|
}
|
|
3162
|
-
}),
|
|
3189
|
+
}), Xl = {
|
|
3163
3190
|
name: "SidebarItem",
|
|
3164
3191
|
components: {
|
|
3165
|
-
AppLink:
|
|
3166
|
-
MenuContent:
|
|
3192
|
+
AppLink: Kl,
|
|
3193
|
+
MenuContent: Ql
|
|
3167
3194
|
},
|
|
3168
|
-
mixins: [
|
|
3195
|
+
mixins: [Jl],
|
|
3169
3196
|
props: {
|
|
3170
3197
|
// route object
|
|
3171
3198
|
item: {
|
|
@@ -3183,7 +3210,7 @@ const Fl = /* @__PURE__ */ P(Ul, [["render", Hl]]), Gl = {
|
|
|
3183
3210
|
},
|
|
3184
3211
|
methods: {
|
|
3185
3212
|
itemClick() {
|
|
3186
|
-
|
|
3213
|
+
fe.remove("table_filter:" + this.$props.to);
|
|
3187
3214
|
},
|
|
3188
3215
|
getTo(e) {
|
|
3189
3216
|
try {
|
|
@@ -3193,27 +3220,27 @@ const Fl = /* @__PURE__ */ P(Ul, [["render", Hl]]), Gl = {
|
|
|
3193
3220
|
}
|
|
3194
3221
|
}
|
|
3195
3222
|
}
|
|
3196
|
-
},
|
|
3223
|
+
}, Zl = {
|
|
3197
3224
|
key: 0,
|
|
3198
3225
|
class: "menu-wrapper"
|
|
3199
3226
|
};
|
|
3200
|
-
function
|
|
3201
|
-
const
|
|
3202
|
-
return n.item.hidden !== !1 ? (
|
|
3203
|
-
n.item.meta && n.item.meta.menuType === 2 ? (
|
|
3204
|
-
n.item.meta ? (
|
|
3227
|
+
function Yl(e, t, n, o, l, s) {
|
|
3228
|
+
const i = A("menu-content"), c = Gn, d = A("app-link"), m = A("sidebar-item", !0), f = zn;
|
|
3229
|
+
return n.item.hidden !== !1 ? (a(), y("div", Zl, [
|
|
3230
|
+
n.item.meta && n.item.meta.menuType === 2 ? (a(), y(O, { key: 0 }, [
|
|
3231
|
+
n.item.meta ? (a(), h(d, {
|
|
3205
3232
|
key: 0,
|
|
3206
3233
|
to: n.to,
|
|
3207
3234
|
"new-tab": n.item.meta.newTab
|
|
3208
3235
|
}, {
|
|
3209
|
-
default:
|
|
3210
|
-
u(
|
|
3236
|
+
default: r(() => [
|
|
3237
|
+
u(c, {
|
|
3211
3238
|
index: n.to,
|
|
3212
|
-
class:
|
|
3239
|
+
class: Z({ "submenu-title-noDropdown": !n.isNest }),
|
|
3213
3240
|
onClick: s.itemClick
|
|
3214
3241
|
}, {
|
|
3215
|
-
default:
|
|
3216
|
-
u(
|
|
3242
|
+
default: r(() => [
|
|
3243
|
+
u(i, {
|
|
3217
3244
|
meta: n.item.meta
|
|
3218
3245
|
}, null, 8, ["meta"])
|
|
3219
3246
|
]),
|
|
@@ -3221,105 +3248,105 @@ function Ql(e, t, n, o, l, s) {
|
|
|
3221
3248
|
}, 8, ["index", "class", "onClick"])
|
|
3222
3249
|
]),
|
|
3223
3250
|
_: 1
|
|
3224
|
-
}, 8, ["to", "new-tab"])) :
|
|
3225
|
-
], 64)) : n.item.meta && n.item.meta.menuType === 1 ? (
|
|
3251
|
+
}, 8, ["to", "new-tab"])) : B("", !0)
|
|
3252
|
+
], 64)) : n.item.meta && n.item.meta.menuType === 1 ? (a(), h(f, {
|
|
3226
3253
|
key: 1,
|
|
3227
3254
|
ref: "subMenu",
|
|
3228
3255
|
index: n.to,
|
|
3229
|
-
class:
|
|
3256
|
+
class: Z({ "submenu-title-noDropdown": !n.isNest })
|
|
3230
3257
|
}, {
|
|
3231
|
-
title:
|
|
3232
|
-
n.item.redirect && n.item.redirect !== "#" ? (
|
|
3258
|
+
title: r(() => [
|
|
3259
|
+
n.item.redirect && n.item.redirect !== "#" ? (a(), h(d, {
|
|
3233
3260
|
key: 0,
|
|
3234
3261
|
to: n.to
|
|
3235
3262
|
}, {
|
|
3236
|
-
default:
|
|
3237
|
-
u(
|
|
3263
|
+
default: r(() => [
|
|
3264
|
+
u(i, {
|
|
3238
3265
|
meta: n.item.meta
|
|
3239
3266
|
}, null, 8, ["meta"])
|
|
3240
3267
|
]),
|
|
3241
3268
|
_: 1
|
|
3242
|
-
}, 8, ["to"])) : (
|
|
3269
|
+
}, 8, ["to"])) : (a(), h(i, {
|
|
3243
3270
|
key: 1,
|
|
3244
3271
|
meta: n.item.meta
|
|
3245
3272
|
}, null, 8, ["meta"]))
|
|
3246
3273
|
]),
|
|
3247
|
-
default:
|
|
3248
|
-
(
|
|
3249
|
-
key:
|
|
3274
|
+
default: r(() => [
|
|
3275
|
+
(a(!0), y(O, null, q(n.item.children, (k) => (a(), h(m, {
|
|
3276
|
+
key: k.path,
|
|
3250
3277
|
"is-nest": !0,
|
|
3251
|
-
item:
|
|
3252
|
-
to: s.getTo(
|
|
3278
|
+
item: k,
|
|
3279
|
+
to: s.getTo(k),
|
|
3253
3280
|
class: "nest-menu"
|
|
3254
3281
|
}, null, 8, ["item", "to"]))), 128))
|
|
3255
3282
|
]),
|
|
3256
3283
|
_: 1
|
|
3257
|
-
}, 8, ["index", "class"])) :
|
|
3258
|
-
])) :
|
|
3284
|
+
}, 8, ["index", "class"])) : B("", !0)
|
|
3285
|
+
])) : B("", !0);
|
|
3259
3286
|
}
|
|
3260
|
-
const
|
|
3287
|
+
const es = /* @__PURE__ */ L(Xl, [["render", Yl]]), ts = /* @__PURE__ */ K({
|
|
3261
3288
|
__name: "SearchMenu",
|
|
3262
3289
|
setup(e) {
|
|
3263
|
-
const t =
|
|
3264
|
-
function n(
|
|
3265
|
-
return
|
|
3290
|
+
const t = j();
|
|
3291
|
+
function n(m) {
|
|
3292
|
+
return m.filter((f) => f.meta?.menuType === 0 ? !1 : (f.children && (f.children = n(f.children), f.children.length === 0 && delete f.children), !0));
|
|
3266
3293
|
}
|
|
3267
|
-
const o =
|
|
3268
|
-
let
|
|
3269
|
-
return l.value.forEach((
|
|
3270
|
-
|
|
3271
|
-
}), n(
|
|
3294
|
+
const o = R(""), l = w(() => t.remoteRouter), s = Se(), i = w(() => {
|
|
3295
|
+
let m = [];
|
|
3296
|
+
return l.value.forEach((f) => {
|
|
3297
|
+
m = m.concat(S(f.routes));
|
|
3298
|
+
}), n(m);
|
|
3272
3299
|
});
|
|
3273
|
-
function
|
|
3274
|
-
let
|
|
3275
|
-
if (
|
|
3276
|
-
for (let
|
|
3277
|
-
if (
|
|
3278
|
-
|
|
3300
|
+
function c(m) {
|
|
3301
|
+
let f = m;
|
|
3302
|
+
if (m.meta.menuType === 1 && m.children && m.children.length > 0) {
|
|
3303
|
+
for (let k = 0; k < m.children.length; k++)
|
|
3304
|
+
if (m.children[k].path.indexOf("/:") === -1) {
|
|
3305
|
+
f = m.children[k];
|
|
3279
3306
|
break;
|
|
3280
3307
|
}
|
|
3281
3308
|
}
|
|
3282
|
-
return s.resolve(
|
|
3309
|
+
return s.resolve(f.redirect ? f.redirect : f).fullPath;
|
|
3283
3310
|
}
|
|
3284
|
-
function
|
|
3285
|
-
s.push(
|
|
3311
|
+
function d(m) {
|
|
3312
|
+
s.push(m), o.value = "";
|
|
3286
3313
|
}
|
|
3287
|
-
return (
|
|
3288
|
-
const
|
|
3289
|
-
return
|
|
3290
|
-
modelValue:
|
|
3291
|
-
"onUpdate:modelValue":
|
|
3314
|
+
return (m, f) => {
|
|
3315
|
+
const k = He, b = Kn, x = qe;
|
|
3316
|
+
return a(), h(x, {
|
|
3317
|
+
modelValue: p(o),
|
|
3318
|
+
"onUpdate:modelValue": f[0] || (f[0] = (I) => dt(o) ? o.value = I : null),
|
|
3292
3319
|
filterable: "",
|
|
3293
3320
|
placeholder: "搜索菜单...",
|
|
3294
3321
|
class: "search-menu",
|
|
3295
|
-
onChange:
|
|
3322
|
+
onChange: d
|
|
3296
3323
|
}, {
|
|
3297
|
-
default:
|
|
3298
|
-
(
|
|
3299
|
-
key:
|
|
3324
|
+
default: r(() => [
|
|
3325
|
+
(a(!0), y(O, null, q(p(i), (I) => (a(), y(O, {
|
|
3326
|
+
key: I.path
|
|
3300
3327
|
}, [
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
key:
|
|
3304
|
-
label:
|
|
3328
|
+
I.children !== void 0 ? (a(), y(O, { key: 0 }, [
|
|
3329
|
+
I.meta.menuType !== 0 ? (a(), h(b, {
|
|
3330
|
+
key: I.path + "-",
|
|
3331
|
+
label: I.meta.title
|
|
3305
3332
|
}, {
|
|
3306
|
-
default:
|
|
3307
|
-
(
|
|
3308
|
-
key:
|
|
3333
|
+
default: r(() => [
|
|
3334
|
+
(a(!0), y(O, null, q(I.children, (T, g) => (a(), y(O, {
|
|
3335
|
+
key: T.path
|
|
3309
3336
|
}, [
|
|
3310
|
-
|
|
3337
|
+
I.meta.menuType !== 0 ? (a(), h(k, {
|
|
3311
3338
|
key: 0,
|
|
3312
|
-
label: (g ===
|
|
3313
|
-
value:
|
|
3314
|
-
}, null, 8, ["label", "value"])) :
|
|
3339
|
+
label: (g === I.children.length - 1 ? "└─" : "├─") + T.meta.title,
|
|
3340
|
+
value: c(T)
|
|
3341
|
+
}, null, 8, ["label", "value"])) : B("", !0)
|
|
3315
3342
|
], 64))), 128))
|
|
3316
3343
|
]),
|
|
3317
3344
|
_: 2
|
|
3318
|
-
}, 1032, ["label"])) :
|
|
3319
|
-
], 64)) : (
|
|
3345
|
+
}, 1032, ["label"])) : B("", !0)
|
|
3346
|
+
], 64)) : (a(), h(k, {
|
|
3320
3347
|
key: 1,
|
|
3321
|
-
label: "" +
|
|
3322
|
-
value:
|
|
3348
|
+
label: "" + I.meta.title,
|
|
3349
|
+
value: c(I)
|
|
3323
3350
|
}, null, 8, ["label", "value"]))
|
|
3324
3351
|
], 64))), 128))
|
|
3325
3352
|
]),
|
|
@@ -3327,69 +3354,69 @@ const Xl = /* @__PURE__ */ P(Jl, [["render", Ql]]), Zl = /* @__PURE__ */ z({
|
|
|
3327
3354
|
}, 8, ["modelValue"]);
|
|
3328
3355
|
};
|
|
3329
3356
|
}
|
|
3330
|
-
}),
|
|
3331
|
-
var J = /* @__PURE__ */ ((e) => (e[e.custom = 0] = "custom", e[e.list = 1] = "list", e[e.form = 2] = "form", e[e.customSchema = 3] = "customSchema", e[e.localComp = 4] = "localComp", e[e.tree = 5] = "tree", e[e.report = 6] = "report", e[e.entity = 7] = "entity", e))(J || {}),
|
|
3332
|
-
const
|
|
3357
|
+
}), ns = /* @__PURE__ */ L(ts, [["__scopeId", "data-v-fb095d56"]]);
|
|
3358
|
+
var J = /* @__PURE__ */ ((e) => (e[e.custom = 0] = "custom", e[e.list = 1] = "list", e[e.form = 2] = "form", e[e.customSchema = 3] = "customSchema", e[e.localComp = 4] = "localComp", e[e.tree = 5] = "tree", e[e.report = 6] = "report", e[e.entity = 7] = "entity", e))(J || {}), F = /* @__PURE__ */ ((e) => (e[e.hidden = 0] = "hidden", e[e.dir = 1] = "dir", e[e.menu = 2] = "menu", e[e.page = 3] = "page", e))(F || {});
|
|
3359
|
+
const os = /* @__PURE__ */ K({
|
|
3333
3360
|
__name: "index",
|
|
3334
3361
|
setup(e) {
|
|
3335
|
-
const t =
|
|
3362
|
+
const t = X(), n = j(), o = U(), l = w(() => t.sidebar), s = w(() => n.remoteRouter), i = w(() => n.customRouter), c = Se(), d = se(), m = w(() => {
|
|
3336
3363
|
let g = [];
|
|
3337
|
-
return
|
|
3338
|
-
|
|
3339
|
-
}),
|
|
3364
|
+
return c.options.routes.concat(i.value || []).forEach((E) => {
|
|
3365
|
+
E.path === "/" ? g = g.concat(E.children || []) : g.push(E);
|
|
3366
|
+
}), S([
|
|
3340
3367
|
{ label: "", routes: g },
|
|
3341
3368
|
...s.value
|
|
3342
3369
|
]);
|
|
3343
|
-
}),
|
|
3344
|
-
const g =
|
|
3345
|
-
for (let
|
|
3346
|
-
const
|
|
3347
|
-
if (
|
|
3348
|
-
return
|
|
3370
|
+
}), f = w(() => {
|
|
3371
|
+
const g = d.matched;
|
|
3372
|
+
for (let E = g.length - 1; E >= 0; E--) {
|
|
3373
|
+
const $ = g[E];
|
|
3374
|
+
if ($.meta.menuType === F.menu)
|
|
3375
|
+
return I(), c.resolve($.redirect ? $.redirect : $).fullPath;
|
|
3349
3376
|
}
|
|
3350
3377
|
return "";
|
|
3351
|
-
}),
|
|
3378
|
+
}), k = w(() => o.sidebarLogo), b = w(() => ({
|
|
3352
3379
|
menuBg: "#304156",
|
|
3353
3380
|
menuText: "#bfcbd9",
|
|
3354
3381
|
menuActiveText: "#409EFF"
|
|
3355
|
-
})),
|
|
3356
|
-
|
|
3357
|
-
function
|
|
3358
|
-
|
|
3382
|
+
})), x = w(() => !l.value.opened);
|
|
3383
|
+
Ue(() => I());
|
|
3384
|
+
function I() {
|
|
3385
|
+
ft("is-active", 200);
|
|
3359
3386
|
}
|
|
3360
|
-
function
|
|
3361
|
-
return g.filter((
|
|
3387
|
+
function T(g) {
|
|
3388
|
+
return g.filter((E) => [F.dir, F.menu].indexOf(E.meta.menuType) !== -1).map((E) => (E = Object.assign({}, E), E.children && (E.children = T(E.children)), E));
|
|
3362
3389
|
}
|
|
3363
|
-
return (g,
|
|
3364
|
-
const
|
|
3365
|
-
return
|
|
3366
|
-
class:
|
|
3390
|
+
return (g, E) => {
|
|
3391
|
+
const $ = Wn, ee = Jn;
|
|
3392
|
+
return a(), y("div", {
|
|
3393
|
+
class: Z({ "has-logo": p(k) })
|
|
3367
3394
|
}, [
|
|
3368
|
-
|
|
3395
|
+
p(k) ? (a(), h(Fl, {
|
|
3369
3396
|
key: 0,
|
|
3370
|
-
collapse:
|
|
3371
|
-
}, null, 8, ["collapse"])) :
|
|
3372
|
-
u(
|
|
3373
|
-
default:
|
|
3374
|
-
|
|
3375
|
-
u(
|
|
3376
|
-
"default-active":
|
|
3377
|
-
collapse:
|
|
3378
|
-
"background-color":
|
|
3379
|
-
"text-color":
|
|
3397
|
+
collapse: p(x)
|
|
3398
|
+
}, null, 8, ["collapse"])) : B("", !0),
|
|
3399
|
+
u(ee, { "wrap-class": "scrollbar-wrapper" }, {
|
|
3400
|
+
default: r(() => [
|
|
3401
|
+
p(x) ? B("", !0) : (a(), h(ns, { key: 0 })),
|
|
3402
|
+
u($, {
|
|
3403
|
+
"default-active": p(f),
|
|
3404
|
+
collapse: p(x),
|
|
3405
|
+
"background-color": p(b).menuBg,
|
|
3406
|
+
"text-color": p(b).menuText,
|
|
3380
3407
|
"unique-opened": !1,
|
|
3381
|
-
"active-text-color":
|
|
3408
|
+
"active-text-color": p(b).menuActiveText,
|
|
3382
3409
|
"collapse-transition": !1,
|
|
3383
3410
|
mode: "vertical"
|
|
3384
3411
|
}, {
|
|
3385
|
-
default:
|
|
3386
|
-
(
|
|
3387
|
-
key:
|
|
3412
|
+
default: r(() => [
|
|
3413
|
+
(a(!0), y(O, null, q(p(m), (_, V) => (a(), y(O, {
|
|
3414
|
+
key: V + "-module"
|
|
3388
3415
|
}, [
|
|
3389
|
-
(
|
|
3390
|
-
key:
|
|
3391
|
-
item:
|
|
3392
|
-
to: g.$router.resolve(
|
|
3416
|
+
(a(!0), y(O, null, q(T(_.routes), (G) => (a(), h(es, {
|
|
3417
|
+
key: G.path,
|
|
3418
|
+
item: G,
|
|
3419
|
+
to: g.$router.resolve(G.redirect ? G.redirect : G).fullPath
|
|
3393
3420
|
}, null, 8, ["item", "to"]))), 128))
|
|
3394
3421
|
], 64))), 128))
|
|
3395
3422
|
]),
|
|
@@ -3401,133 +3428,148 @@ const es = /* @__PURE__ */ z({
|
|
|
3401
3428
|
], 2);
|
|
3402
3429
|
};
|
|
3403
3430
|
}
|
|
3404
|
-
}),
|
|
3431
|
+
}), ls = /* @__PURE__ */ L(os, [["__scopeId", "data-v-5b1cbaf5"]]), ss = { class: "app-main" }, is = {
|
|
3405
3432
|
__name: "AppMain",
|
|
3406
3433
|
setup(e) {
|
|
3407
|
-
const t =
|
|
3408
|
-
return
|
|
3434
|
+
const t = se(), n = [], o = R(0);
|
|
3435
|
+
return On(() => {
|
|
3409
3436
|
t.meta?.keepAlive && n.indexOf(t.name) && n.push(t.name), o.value++;
|
|
3410
3437
|
}), (l, s) => {
|
|
3411
|
-
const
|
|
3412
|
-
return
|
|
3413
|
-
(
|
|
3414
|
-
key: l.$route.fullPath +
|
|
3438
|
+
const i = A("router-view"), c = Qn;
|
|
3439
|
+
return a(), y("section", ss, [
|
|
3440
|
+
(a(), h(i, {
|
|
3441
|
+
key: l.$route.fullPath + p(o)
|
|
3415
3442
|
})),
|
|
3416
|
-
u(
|
|
3443
|
+
u(c, { bottom: 50 })
|
|
3417
3444
|
]);
|
|
3418
3445
|
};
|
|
3419
3446
|
}
|
|
3420
|
-
},
|
|
3447
|
+
}, as = /* @__PURE__ */ L(is, [["__scopeId", "data-v-ca0f0d98"]]), rs = { class: "main-container" }, cs = 992, us = {
|
|
3421
3448
|
__name: "index",
|
|
3422
3449
|
setup(e) {
|
|
3423
|
-
const { body: t } = document, n =
|
|
3450
|
+
const { body: t } = document, n = X(), o = U(), l = w(() => n.sidebar), s = w(() => n.device), i = w(() => o.fixedHeader), c = w(() => ({
|
|
3424
3451
|
hideSidebar: !l.value.opened,
|
|
3425
3452
|
openSidebar: l.value.opened,
|
|
3426
3453
|
withoutAnimation: l.value.withoutAnimation,
|
|
3427
3454
|
mobile: s.value === "mobile"
|
|
3428
|
-
})),
|
|
3429
|
-
|
|
3430
|
-
const
|
|
3455
|
+
})), d = () => t.getBoundingClientRect().width - 1 < cs;
|
|
3456
|
+
io(window, "resize", () => f());
|
|
3457
|
+
const m = () => n.closeSideBar({ withoutAnimation: !1 }), f = () => {
|
|
3431
3458
|
if (!document.hidden) {
|
|
3432
|
-
const
|
|
3433
|
-
n.toggleDevice(
|
|
3459
|
+
const k = d();
|
|
3460
|
+
n.toggleDevice(k ? "mobile" : "desktop"), k && n.closeSideBar({ withoutAnimation: !0 });
|
|
3434
3461
|
}
|
|
3435
3462
|
};
|
|
3436
|
-
return (
|
|
3437
|
-
class:
|
|
3463
|
+
return (k, b) => (a(), y("div", {
|
|
3464
|
+
class: Z([p(c), "app-wrapper"])
|
|
3438
3465
|
}, [
|
|
3439
|
-
|
|
3466
|
+
p(s) === "mobile" && p(l).opened ? (a(), y("div", {
|
|
3440
3467
|
key: 0,
|
|
3441
3468
|
class: "drawer-bg",
|
|
3442
|
-
onClick:
|
|
3443
|
-
})) :
|
|
3444
|
-
u(
|
|
3445
|
-
v("div",
|
|
3469
|
+
onClick: m
|
|
3470
|
+
})) : B("", !0),
|
|
3471
|
+
u(p(ls), { class: "sidebar-container" }),
|
|
3472
|
+
v("div", rs, [
|
|
3446
3473
|
v("div", {
|
|
3447
|
-
class:
|
|
3474
|
+
class: Z({ "fixed-header": p(i) })
|
|
3448
3475
|
}, [
|
|
3449
|
-
u(
|
|
3476
|
+
u(p(jl))
|
|
3450
3477
|
], 2),
|
|
3451
|
-
u(
|
|
3478
|
+
u(p(as))
|
|
3452
3479
|
])
|
|
3453
3480
|
], 2));
|
|
3454
3481
|
}
|
|
3455
|
-
},
|
|
3482
|
+
}, jt = /* @__PURE__ */ L(us, [["__scopeId", "data-v-b7ab74f0"]]), ds = { id: "login" }, ps = { id: "form" }, ms = {
|
|
3456
3483
|
key: 0,
|
|
3457
3484
|
class: "captcha"
|
|
3458
|
-
},
|
|
3485
|
+
}, fs = ["src"], hs = { class: "tips" }, bs = { class: "sso" }, ys = /* @__PURE__ */ K({
|
|
3459
3486
|
__name: "login",
|
|
3460
3487
|
setup(e) {
|
|
3461
|
-
const t =
|
|
3488
|
+
const t = Se(), n = se(), o = U(), l = X(), s = j(), i = w(() => o.loginTips), c = w(() => o.captcha), d = w(() => l.baseURL), m = R(0), f = () => m.value++, k = w(() => b.value.username.length > 0 && b.value.password.length >= 4 && (c.value ? b.value.captcha.length === 4 : !0)), b = R({
|
|
3462
3489
|
username: "",
|
|
3463
3490
|
password: "",
|
|
3464
3491
|
captcha: "",
|
|
3465
3492
|
sing: ""
|
|
3466
|
-
}),
|
|
3467
|
-
if (
|
|
3468
|
-
|
|
3469
|
-
|
|
3493
|
+
}), x = R(!1), I = () => {
|
|
3494
|
+
if (!x.value) {
|
|
3495
|
+
if (b.value.username === "" || b.value.password === "" || c.value && b.value.captcha === "") {
|
|
3496
|
+
Xn.error("用户名, 密码, 验证码是必须的");
|
|
3497
|
+
return;
|
|
3498
|
+
}
|
|
3499
|
+
c.value && (b.value.sing = ao.MD5(`${b.value.username}${b.value.password}${b.value.captcha}`).toString()), x.value = !0, s.login(b.value).then((T) => {
|
|
3500
|
+
t.push({ path: n.query?.redirect || "/" });
|
|
3501
|
+
}).catch((T) => {
|
|
3502
|
+
m.value++;
|
|
3503
|
+
}).finally(() => {
|
|
3504
|
+
x.value = !1;
|
|
3505
|
+
});
|
|
3470
3506
|
}
|
|
3471
|
-
r.value && (_.value.sing = so.MD5(`${_.value.username}${_.value.password}${_.value.captcha}`).toString()), s.login(_.value).then((E) => {
|
|
3472
|
-
t.push({ path: n.query?.redirect || "/" });
|
|
3473
|
-
}).catch((E) => {
|
|
3474
|
-
f.value++;
|
|
3475
|
-
});
|
|
3476
3507
|
};
|
|
3477
|
-
return (
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
class: "input"
|
|
3485
|
-
}, null, 512), [
|
|
3486
|
-
[Te, d(_).username]
|
|
3487
|
-
]),
|
|
3488
|
-
ye(v("input", {
|
|
3489
|
-
"onUpdate:modelValue": w[1] || (w[1] = (g) => d(_).password = g),
|
|
3490
|
-
type: "password",
|
|
3491
|
-
placeholder: "密码",
|
|
3492
|
-
class: "input"
|
|
3493
|
-
}, null, 512), [
|
|
3494
|
-
[Te, d(_).password]
|
|
3495
|
-
]),
|
|
3496
|
-
r.value ? (i(), b("div", us, [
|
|
3497
|
-
ye(v("input", {
|
|
3498
|
-
"onUpdate:modelValue": w[2] || (w[2] = (g) => d(_).captcha = g),
|
|
3508
|
+
return (T, g) => {
|
|
3509
|
+
const E = pe;
|
|
3510
|
+
return a(), y("div", ds, [
|
|
3511
|
+
g[4] || (g[4] = v("h1", { id: "title" }, "登录", -1)),
|
|
3512
|
+
v("form", ps, [
|
|
3513
|
+
Ce(v("input", {
|
|
3514
|
+
"onUpdate:modelValue": g[0] || (g[0] = ($) => p(b).username = $),
|
|
3499
3515
|
type: "text",
|
|
3500
|
-
placeholder: "
|
|
3501
|
-
class: "input
|
|
3516
|
+
placeholder: "用户名",
|
|
3517
|
+
class: "input"
|
|
3502
3518
|
}, null, 512), [
|
|
3503
|
-
[Te,
|
|
3519
|
+
[Te, p(b).username]
|
|
3504
3520
|
]),
|
|
3505
|
-
v("
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
}, null,
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3521
|
+
Ce(v("input", {
|
|
3522
|
+
"onUpdate:modelValue": g[1] || (g[1] = ($) => p(b).password = $),
|
|
3523
|
+
type: "password",
|
|
3524
|
+
placeholder: "密码",
|
|
3525
|
+
class: "input"
|
|
3526
|
+
}, null, 512), [
|
|
3527
|
+
[Te, p(b).password]
|
|
3528
|
+
]),
|
|
3529
|
+
c.value ? (a(), y("div", ms, [
|
|
3530
|
+
Ce(v("input", {
|
|
3531
|
+
"onUpdate:modelValue": g[2] || (g[2] = ($) => p(b).captcha = $),
|
|
3532
|
+
type: "text",
|
|
3533
|
+
placeholder: "验证码",
|
|
3534
|
+
class: "input-captcha"
|
|
3535
|
+
}, null, 512), [
|
|
3536
|
+
[Te, p(b).captcha]
|
|
3537
|
+
]),
|
|
3538
|
+
v("img", {
|
|
3539
|
+
class: "captcha-img",
|
|
3540
|
+
src: d.value + "/user/captcha?ts=" + p(m),
|
|
3541
|
+
title: "点击刷新",
|
|
3542
|
+
onClick: f
|
|
3543
|
+
}, null, 8, fs)
|
|
3544
|
+
])) : B("", !0),
|
|
3545
|
+
u(E, {
|
|
3546
|
+
class: "login-button",
|
|
3547
|
+
type: "primary",
|
|
3548
|
+
loading: p(x),
|
|
3549
|
+
disabled: !k.value || p(x),
|
|
3550
|
+
onClick: I
|
|
3551
|
+
}, {
|
|
3552
|
+
default: r(() => [
|
|
3553
|
+
C(N(p(x) ? "登录中…" : "登录"), 1)
|
|
3554
|
+
]),
|
|
3555
|
+
_: 1
|
|
3556
|
+
}, 8, ["loading", "disabled"]),
|
|
3557
|
+
v("div", hs, [
|
|
3558
|
+
v("div", null, N(i.value), 1)
|
|
3559
|
+
]),
|
|
3560
|
+
v("div", bs, [
|
|
3561
|
+
g[3] || (g[3] = v("div", { id: "sso-qrcode" }, null, -1)),
|
|
3562
|
+
(a(!0), y(O, null, q(Object.keys([]), ($) => (a(), y("div", { key: $ }, N($), 1))), 128))
|
|
3563
|
+
])
|
|
3522
3564
|
])
|
|
3523
|
-
])
|
|
3524
|
-
|
|
3565
|
+
]);
|
|
3566
|
+
};
|
|
3525
3567
|
}
|
|
3526
|
-
}),
|
|
3568
|
+
}), _s = {
|
|
3527
3569
|
name: "NotFoundPage"
|
|
3528
|
-
},
|
|
3529
|
-
function
|
|
3530
|
-
return
|
|
3570
|
+
}, vs = { class: "not-found" };
|
|
3571
|
+
function gs(e, t, n, o, l, s) {
|
|
3572
|
+
return a(), y("div", vs, [...t[0] || (t[0] = [
|
|
3531
3573
|
v("svg", {
|
|
3532
3574
|
width: "380px",
|
|
3533
3575
|
height: "500px",
|
|
@@ -3596,62 +3638,85 @@ function ys(e, t, n, o, l, s) {
|
|
|
3596
3638
|
], -1)
|
|
3597
3639
|
])]);
|
|
3598
3640
|
}
|
|
3599
|
-
const
|
|
3641
|
+
const ks = /* @__PURE__ */ L(_s, [["render", gs], ["__scopeId", "data-v-26068803"]]), ws = [
|
|
3600
3642
|
{
|
|
3601
3643
|
path: "/",
|
|
3602
|
-
component:
|
|
3644
|
+
component: jt,
|
|
3603
3645
|
redirect: "/dashboard",
|
|
3604
3646
|
name: "Root",
|
|
3605
3647
|
meta: {
|
|
3606
|
-
|
|
3648
|
+
id: 0,
|
|
3649
|
+
pageId: 0,
|
|
3650
|
+
title: "Root",
|
|
3651
|
+
menuType: 1,
|
|
3652
|
+
keepAlive: !1
|
|
3607
3653
|
},
|
|
3608
3654
|
children: [
|
|
3609
3655
|
{
|
|
3610
3656
|
path: "dashboard",
|
|
3611
3657
|
name: "Dashboard",
|
|
3612
|
-
component:
|
|
3613
|
-
meta: {
|
|
3658
|
+
component: Ao,
|
|
3659
|
+
meta: {
|
|
3660
|
+
id: 1,
|
|
3661
|
+
pageId: 1,
|
|
3662
|
+
title: "Dashboard",
|
|
3663
|
+
icon: "el-icon-help",
|
|
3664
|
+
menuType: 2,
|
|
3665
|
+
keepAlive: !0
|
|
3666
|
+
}
|
|
3614
3667
|
}
|
|
3615
3668
|
]
|
|
3616
3669
|
},
|
|
3617
3670
|
{
|
|
3618
3671
|
path: "/login",
|
|
3619
|
-
component:
|
|
3620
|
-
meta: {
|
|
3672
|
+
component: ys,
|
|
3673
|
+
meta: {
|
|
3674
|
+
id: 2,
|
|
3675
|
+
pageId: 2,
|
|
3676
|
+
title: "用户登录",
|
|
3677
|
+
menuType: 0,
|
|
3678
|
+
keepAlive: !1
|
|
3679
|
+
},
|
|
3621
3680
|
hidden: !0
|
|
3622
3681
|
},
|
|
3623
3682
|
{
|
|
3624
3683
|
path: "/404",
|
|
3625
|
-
component:
|
|
3626
|
-
meta: {
|
|
3684
|
+
component: ks,
|
|
3685
|
+
meta: {
|
|
3686
|
+
id: 3,
|
|
3687
|
+
pageId: 3,
|
|
3688
|
+
title: "404",
|
|
3689
|
+
menuType: 0,
|
|
3690
|
+
keepAlive: !1
|
|
3691
|
+
},
|
|
3627
3692
|
hidden: !0
|
|
3628
3693
|
}
|
|
3629
|
-
],
|
|
3630
|
-
history:
|
|
3631
|
-
routes:
|
|
3694
|
+
], W = $n({
|
|
3695
|
+
history: An(),
|
|
3696
|
+
routes: ws
|
|
3632
3697
|
});
|
|
3633
|
-
|
|
3634
|
-
function
|
|
3698
|
+
Le.configure({ showSpinner: !1 });
|
|
3699
|
+
function Ss(e) {
|
|
3635
3700
|
e.beforeEach((t, n, o) => {
|
|
3636
|
-
|
|
3701
|
+
Le.start(), t.preHash = location.hash.replace("#", ""), o();
|
|
3637
3702
|
}), e.afterEach((t) => {
|
|
3638
|
-
const n =
|
|
3703
|
+
const n = j(P);
|
|
3639
3704
|
t.matched.length > 0 && n.updateState({
|
|
3640
3705
|
key: "path",
|
|
3641
3706
|
value: t.matched[t.matched.length - 1].path.replace("(\\d+)", "")
|
|
3642
|
-
}),
|
|
3707
|
+
}), Le.done();
|
|
3643
3708
|
});
|
|
3644
3709
|
}
|
|
3645
|
-
function
|
|
3646
|
-
return
|
|
3710
|
+
function xs() {
|
|
3711
|
+
return j(P).isLodeRemoteRoutes;
|
|
3647
3712
|
}
|
|
3648
|
-
function
|
|
3649
|
-
return
|
|
3713
|
+
function Nt() {
|
|
3714
|
+
return U(P).whiteRoutes || [];
|
|
3650
3715
|
}
|
|
3651
|
-
function
|
|
3652
|
-
return
|
|
3716
|
+
function Es() {
|
|
3717
|
+
return j(P).token;
|
|
3653
3718
|
}
|
|
3654
|
-
class
|
|
3719
|
+
class Ut {
|
|
3655
3720
|
type = "qrcode";
|
|
3656
3721
|
flag() {
|
|
3657
3722
|
}
|
|
@@ -3661,14 +3726,14 @@ class jt {
|
|
|
3661
3726
|
showQrCode() {
|
|
3662
3727
|
}
|
|
3663
3728
|
}
|
|
3664
|
-
class
|
|
3729
|
+
class $a extends Ut {
|
|
3665
3730
|
type = "jump";
|
|
3666
3731
|
client_id = "";
|
|
3667
3732
|
constructor(t) {
|
|
3668
3733
|
super(), this.client_id = t.client_id;
|
|
3669
3734
|
}
|
|
3670
3735
|
flag() {
|
|
3671
|
-
const t =
|
|
3736
|
+
const t = ht("code");
|
|
3672
3737
|
if (t)
|
|
3673
3738
|
return {
|
|
3674
3739
|
ticket: t,
|
|
@@ -3680,7 +3745,7 @@ class Ri extends jt {
|
|
|
3680
3745
|
location.replace(`https://github.com/login/oauth/authorize?client_id=${this.client_id}&redirect_uri${o}`);
|
|
3681
3746
|
}
|
|
3682
3747
|
}
|
|
3683
|
-
class
|
|
3748
|
+
class Aa extends Ut {
|
|
3684
3749
|
type = "qrcode";
|
|
3685
3750
|
qrCodeUrl = "https://login.dingtalk.com/login/qrcode.htm?goto={goto}&style={style}";
|
|
3686
3751
|
reloadUrl = "https://oapi.dingtalk.com/connect/oauth2/sns_authorize?response_type=code&scope=snsapi_login&state=&appid={appid}&redirect_uri={redirect_uri}";
|
|
@@ -3693,7 +3758,7 @@ class Mi extends jt {
|
|
|
3693
3758
|
super();
|
|
3694
3759
|
}
|
|
3695
3760
|
flag() {
|
|
3696
|
-
const t =
|
|
3761
|
+
const t = ht("code");
|
|
3697
3762
|
if (t)
|
|
3698
3763
|
return {
|
|
3699
3764
|
ticket: t,
|
|
@@ -3706,63 +3771,63 @@ class Mi extends jt {
|
|
|
3706
3771
|
appid: this.appid,
|
|
3707
3772
|
redirect_uri: encodeURIComponent(this.redirectUri)
|
|
3708
3773
|
};
|
|
3709
|
-
return
|
|
3774
|
+
return ne(this.reloadUrl, s) + "&" + gn(l || {});
|
|
3710
3775
|
}, n = () => {
|
|
3711
3776
|
const l = {
|
|
3712
3777
|
goto: encodeURIComponent(t()),
|
|
3713
3778
|
style: encodeURIComponent(this.style)
|
|
3714
3779
|
};
|
|
3715
|
-
return
|
|
3780
|
+
return ne(this.qrCodeUrl, l);
|
|
3716
3781
|
}, o = (l) => {
|
|
3717
|
-
const { origin: s, data:
|
|
3718
|
-
s === "https://login.dingtalk.com" && (window.location.href = t({ loginTmpCode:
|
|
3782
|
+
const { origin: s, data: i } = l;
|
|
3783
|
+
s === "https://login.dingtalk.com" && (window.location.href = t({ loginTmpCode: i }));
|
|
3719
3784
|
};
|
|
3720
|
-
this.iframe.src = n(),
|
|
3785
|
+
this.iframe.src = n(), vn({ elId: this.elId, attrs: this.iframe }), typeof window.addEventListener < "u" ? window.addEventListener(
|
|
3721
3786
|
"message",
|
|
3722
3787
|
(l) => o(l),
|
|
3723
3788
|
!1
|
|
3724
3789
|
) : typeof window.attachEvent < "u" && window.attachEvent("onmessage", (l) => this.onScanSuccess(l));
|
|
3725
3790
|
}
|
|
3726
3791
|
}
|
|
3727
|
-
const
|
|
3728
|
-
function
|
|
3729
|
-
return U(
|
|
3792
|
+
const Is = {};
|
|
3793
|
+
function Cs() {
|
|
3794
|
+
return z(U(P).sso || {}, Is);
|
|
3730
3795
|
}
|
|
3731
|
-
function
|
|
3732
|
-
const e =
|
|
3796
|
+
function Ts() {
|
|
3797
|
+
const e = Cs(), t = U(P).activeSsoKey || "", n = e[t];
|
|
3733
3798
|
if (n !== void 0)
|
|
3734
3799
|
return n();
|
|
3735
3800
|
}
|
|
3736
|
-
function
|
|
3801
|
+
function Bs(e) {
|
|
3737
3802
|
e.beforeEach(async (t, n, o) => {
|
|
3738
|
-
if (
|
|
3803
|
+
if (Nt().indexOf(t.path) !== -1) {
|
|
3739
3804
|
o();
|
|
3740
3805
|
return;
|
|
3741
3806
|
}
|
|
3742
|
-
if (
|
|
3807
|
+
if (Es()) {
|
|
3743
3808
|
t.query?.redirect ? o(t.query?.redirect) : o();
|
|
3744
3809
|
return;
|
|
3745
3810
|
}
|
|
3746
|
-
const s = t.query.redirect || t.path,
|
|
3747
|
-
if (!
|
|
3811
|
+
const s = t.query.redirect || t.path, i = Ts();
|
|
3812
|
+
if (!i) {
|
|
3748
3813
|
o(`/login?redirect=${s}`);
|
|
3749
3814
|
return;
|
|
3750
3815
|
}
|
|
3751
|
-
const
|
|
3752
|
-
if (
|
|
3816
|
+
const c = i.flag(), d = j(P);
|
|
3817
|
+
if (c && await d.login(c)) {
|
|
3753
3818
|
o();
|
|
3754
3819
|
return;
|
|
3755
3820
|
}
|
|
3756
|
-
|
|
3821
|
+
i.jumpToLoginPage(o, `/login?redirect=${s}`);
|
|
3757
3822
|
});
|
|
3758
3823
|
}
|
|
3759
|
-
const
|
|
3824
|
+
const Rs = {}, Os = { class: "loading preloader" };
|
|
3760
3825
|
function $s(e, t) {
|
|
3761
|
-
return
|
|
3826
|
+
return a(), y("div", Os, [...t[0] || (t[0] = [
|
|
3762
3827
|
v("div", { class: "preloader-inner" }, null, -1)
|
|
3763
3828
|
])]);
|
|
3764
3829
|
}
|
|
3765
|
-
const
|
|
3830
|
+
const As = /* @__PURE__ */ L(Rs, [["render", $s]]), Ps = {
|
|
3766
3831
|
name: "VNotice",
|
|
3767
3832
|
props: {
|
|
3768
3833
|
dataApi: {
|
|
@@ -3791,52 +3856,52 @@ const Os = /* @__PURE__ */ P(Cs, [["render", $s]]), Bs = {
|
|
|
3791
3856
|
this.hasNotice = Object.keys(this.$props.notice).length > 0, this.noticeProps = this.$props.notice;
|
|
3792
3857
|
}
|
|
3793
3858
|
};
|
|
3794
|
-
function
|
|
3795
|
-
const
|
|
3796
|
-
return
|
|
3797
|
-
l.hasNotice ? (
|
|
3859
|
+
function Ls(e, t, n, o, l, s) {
|
|
3860
|
+
const i = xt;
|
|
3861
|
+
return a(), y("div", null, [
|
|
3862
|
+
l.hasNotice ? (a(), h(i, le(Q({ key: 0 }, l.noticeProps)), null, 16)) : B("", !0)
|
|
3798
3863
|
]);
|
|
3799
3864
|
}
|
|
3800
|
-
const
|
|
3865
|
+
const Ms = /* @__PURE__ */ L(Ps, [["render", Ls]]), Ds = ["innerHTML"], js = /* @__PURE__ */ K({
|
|
3801
3866
|
__name: "PageLoad",
|
|
3802
3867
|
props: {
|
|
3803
3868
|
schemaHandler: { type: Function, default: (e) => e },
|
|
3804
3869
|
schemaApi: { default: "" }
|
|
3805
3870
|
},
|
|
3806
3871
|
setup(e) {
|
|
3807
|
-
const t = e, n =
|
|
3808
|
-
return
|
|
3809
|
-
const
|
|
3810
|
-
(window?.App?.config?.globalProperties?.$http).get(t.schemaApi ||
|
|
3811
|
-
|
|
3872
|
+
const t = e, n = X(), o = U(), l = j(), s = se(), i = R(!0), c = R(!1), d = R({}), m = R(""), f = R({}), k = R([]), b = R(!1), x = w(() => l.env), I = w(() => o);
|
|
3873
|
+
return ut(() => {
|
|
3874
|
+
const T = s.path.split("/").filter((_) => _), g = T.length > 1 ? T.slice(0, T.length - 1).join("/") : T[0], E = "/schema" + s.meta.path, $ = { params: s.params };
|
|
3875
|
+
(window?.App?.config?.globalProperties?.$http).get(t.schemaApi || E, $).then(({ data: _ }) => {
|
|
3876
|
+
i.value = !1, _e(_) && (_.notice !== void 0 && (c.value = !0, bt(_.notice) ? d.value = { title: _.notice } : _e(_.notice) && (d.value = _.notice, m.value = _.notice.noticeApi), delete _.notice), k.value = _.ownerNames || [], b.value = _.serviceOffLine || !1), f.value = t.schemaHandler(_, g), n.SET_PAGE_JSON_SCHEMA({ page: s.path, json: f.value });
|
|
3812
3877
|
});
|
|
3813
|
-
}), (
|
|
3814
|
-
const
|
|
3815
|
-
return
|
|
3816
|
-
|
|
3878
|
+
}), (T, g) => {
|
|
3879
|
+
const E = xt;
|
|
3880
|
+
return a(), y(O, null, [
|
|
3881
|
+
p(k).length > 0 ? (a(), h(E, {
|
|
3817
3882
|
key: 0,
|
|
3818
|
-
title: `该页面功能对应开发: [ ${
|
|
3883
|
+
title: `该页面功能对应开发: [ ${p(k).join(", ")} ] 有问题可直接企微反馈`,
|
|
3819
3884
|
type: "info",
|
|
3820
3885
|
style: { margin: "0 0 20px 0" },
|
|
3821
3886
|
closable: !1
|
|
3822
|
-
}, null, 8, ["title"])) :
|
|
3823
|
-
|
|
3887
|
+
}, null, 8, ["title"])) : B("", !0),
|
|
3888
|
+
p(x) === "prod" && p(b) ? (a(), y("div", {
|
|
3824
3889
|
key: 1,
|
|
3825
3890
|
class: "offline-notice",
|
|
3826
|
-
innerHTML:
|
|
3827
|
-
}, null, 8,
|
|
3828
|
-
|
|
3891
|
+
innerHTML: p(b) === !0 ? p(I).serviceOffLineNotice : p(b)
|
|
3892
|
+
}, null, 8, Ds)) : (a(), y(O, { key: 2 }, [
|
|
3893
|
+
p(c) ? (a(), h(Ms, {
|
|
3829
3894
|
key: 0,
|
|
3830
|
-
notice: d
|
|
3895
|
+
notice: p(d),
|
|
3831
3896
|
style: { margin: "0 0 20px 0" },
|
|
3832
|
-
"data-api":
|
|
3833
|
-
}, null, 8, ["notice", "data-api"])) :
|
|
3834
|
-
|
|
3897
|
+
"data-api": p(m)
|
|
3898
|
+
}, null, 8, ["notice", "data-api"])) : B("", !0),
|
|
3899
|
+
p(i) ? (a(), h(As, { key: 1 })) : re(T.$slots, "default", le(Q({ key: 2 }, p(f))), void 0, !0)
|
|
3835
3900
|
], 64))
|
|
3836
3901
|
], 64);
|
|
3837
3902
|
};
|
|
3838
3903
|
}
|
|
3839
|
-
}),
|
|
3904
|
+
}), Ie = /* @__PURE__ */ L(js, [["__scopeId", "data-v-8c134236"]]), Vt = {
|
|
3840
3905
|
__name: "table",
|
|
3841
3906
|
setup(e) {
|
|
3842
3907
|
const t = (n, o) => {
|
|
@@ -3845,16 +3910,16 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
3845
3910
|
prop: n.orderBy.field,
|
|
3846
3911
|
order: n.orderBy.mod === "desc" ? "descending" : "ascending"
|
|
3847
3912
|
};
|
|
3848
|
-
n.tableProps =
|
|
3913
|
+
n.tableProps = z(n.tableProps, { defaultSort: s });
|
|
3849
3914
|
}
|
|
3850
|
-
const l = Object.keys(
|
|
3915
|
+
const l = Object.keys(ve.props);
|
|
3851
3916
|
return Object.keys(n).forEach((s) => {
|
|
3852
3917
|
l.indexOf(s) === -1 && delete n[s];
|
|
3853
3918
|
}), n.listApi === void 0 && (n.listApi = `/${o}/list`), n;
|
|
3854
3919
|
};
|
|
3855
|
-
return (n, o) => (
|
|
3856
|
-
default:
|
|
3857
|
-
u(
|
|
3920
|
+
return (n, o) => (a(), h(Ie, { "schema-handler": t }, {
|
|
3921
|
+
default: r((l) => [
|
|
3922
|
+
u(p(ve), le(ke(l)), null, 16)
|
|
3858
3923
|
]),
|
|
3859
3924
|
_: 1
|
|
3860
3925
|
}));
|
|
@@ -3862,59 +3927,59 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
3862
3927
|
}, je = {
|
|
3863
3928
|
__name: "form",
|
|
3864
3929
|
setup(e) {
|
|
3865
|
-
const t =
|
|
3866
|
-
const
|
|
3867
|
-
return Object.keys(
|
|
3868
|
-
if (
|
|
3869
|
-
delete
|
|
3930
|
+
const t = se(), n = Se(), o = (c, d) => {
|
|
3931
|
+
const m = Object.keys(oe.props);
|
|
3932
|
+
return Object.keys(c).forEach((f) => {
|
|
3933
|
+
if (m.indexOf(f) === -1) {
|
|
3934
|
+
delete c[f];
|
|
3870
3935
|
return;
|
|
3871
3936
|
}
|
|
3872
|
-
/.*Api$/.test(
|
|
3873
|
-
}),
|
|
3874
|
-
saveApi:
|
|
3937
|
+
/.*Api$/.test(f) && (c[f] = ne(c[f], t.params));
|
|
3938
|
+
}), c.saveApi === void 0 && (t.params.id !== void 0 ? (c.saveApi = `/${d}/update/${t.params.id}`, c.getApi || (c.getApi = `/${d}/get/${t.params.id}`)) : (delete c.getApi, c.saveApi = `/${d}/create`)), c = z({
|
|
3939
|
+
saveApi: d + "/save",
|
|
3875
3940
|
afterSubmit: "goback",
|
|
3876
3941
|
afterReset: "goback",
|
|
3877
3942
|
mod: t.params.id ? "edit" : "create"
|
|
3878
|
-
},
|
|
3879
|
-
}, l =
|
|
3880
|
-
|
|
3943
|
+
}, c), c;
|
|
3944
|
+
}, l = R(0), s = () => {
|
|
3945
|
+
yi.request({
|
|
3881
3946
|
url: "/form_mutex",
|
|
3882
3947
|
method: "get",
|
|
3883
3948
|
params: {
|
|
3884
3949
|
path: t.fullPath
|
|
3885
3950
|
}
|
|
3886
|
-
}).then((
|
|
3887
|
-
|
|
3951
|
+
}).then((c) => {
|
|
3952
|
+
c.data && (clearInterval(l.value), vt.alert(`${c.data}`, "操作提醒", {
|
|
3888
3953
|
showClose: !1,
|
|
3889
3954
|
showCancelButton: !0,
|
|
3890
3955
|
confirmButtonText: "返回",
|
|
3891
3956
|
cancelButtonText: "刷新",
|
|
3892
|
-
callback: (
|
|
3893
|
-
|
|
3957
|
+
callback: (d) => {
|
|
3958
|
+
d === "cancel" ? location.reload() : i();
|
|
3894
3959
|
}
|
|
3895
3960
|
}));
|
|
3896
3961
|
});
|
|
3897
3962
|
};
|
|
3898
|
-
|
|
3899
|
-
const
|
|
3900
|
-
t.params.id !== void 0 &&
|
|
3901
|
-
}),
|
|
3963
|
+
Ue(() => {
|
|
3964
|
+
const c = U();
|
|
3965
|
+
t.params.id !== void 0 && c.formMutex && (s(), l.value = setInterval(s, 2e3));
|
|
3966
|
+
}), an(() => {
|
|
3902
3967
|
clearInterval(l.value);
|
|
3903
3968
|
});
|
|
3904
|
-
function
|
|
3969
|
+
function i() {
|
|
3905
3970
|
t.query?.goback ? n.push(t.query?.goback) : history.state.back && history.back();
|
|
3906
3971
|
}
|
|
3907
|
-
return (
|
|
3908
|
-
default:
|
|
3909
|
-
u(
|
|
3972
|
+
return (c, d) => (a(), h(Ie, { "schema-handler": o }, {
|
|
3973
|
+
default: r((m) => [
|
|
3974
|
+
u(p(oe), le(ke(m)), null, 16)
|
|
3910
3975
|
]),
|
|
3911
3976
|
_: 1
|
|
3912
3977
|
}));
|
|
3913
3978
|
}
|
|
3914
|
-
},
|
|
3979
|
+
}, Ns = K({
|
|
3915
3980
|
name: "VTree",
|
|
3916
3981
|
components: {
|
|
3917
|
-
VForm:
|
|
3982
|
+
VForm: oe
|
|
3918
3983
|
},
|
|
3919
3984
|
props: {
|
|
3920
3985
|
treeApi: {
|
|
@@ -3967,7 +4032,7 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
3967
4032
|
// 1 新增, 2 编辑
|
|
3968
4033
|
treeData: [],
|
|
3969
4034
|
formData: {},
|
|
3970
|
-
localTreeProps:
|
|
4035
|
+
localTreeProps: z({
|
|
3971
4036
|
"default-expand-all": !0,
|
|
3972
4037
|
"expand-on-click-node": !1,
|
|
3973
4038
|
props: {
|
|
@@ -3985,7 +4050,7 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
3985
4050
|
return ["", "新建", "编辑"][this.type];
|
|
3986
4051
|
},
|
|
3987
4052
|
formProps() {
|
|
3988
|
-
let e =
|
|
4053
|
+
let e = ne(this.$props.saveApi, this.formData);
|
|
3989
4054
|
return this.type === 1 && (e = this.$props.createApi), {
|
|
3990
4055
|
saveApi: e,
|
|
3991
4056
|
getApi: this.$props.getApi,
|
|
@@ -4010,7 +4075,7 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
4010
4075
|
},
|
|
4011
4076
|
append(e, t) {
|
|
4012
4077
|
this.type = 1;
|
|
4013
|
-
const n = { pid: e.id, [this.$props.props?.levelKey ?? "level"]: t.level + 1, ...
|
|
4078
|
+
const n = { pid: e.id, [this.$props.props?.levelKey ?? "level"]: t.level + 1, ...kn(this.$props.props?.effectData, e) };
|
|
4014
4079
|
e.children || (e.children = []), this.formData = n, this.formkey++, e.children.push(n), this.treeData = [...this.treeData];
|
|
4015
4080
|
},
|
|
4016
4081
|
canAppend(e, t) {
|
|
@@ -4024,7 +4089,7 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
4024
4089
|
remove(e) {
|
|
4025
4090
|
this.$http.request({
|
|
4026
4091
|
method: "DELETE",
|
|
4027
|
-
url:
|
|
4092
|
+
url: ne(this.$props.deleteApi, e)
|
|
4028
4093
|
}).then(({ code: t }) => {
|
|
4029
4094
|
t !== 0 ? this.$message.error("操作失败") : this.loadTree();
|
|
4030
4095
|
});
|
|
@@ -4044,46 +4109,46 @@ const As = /* @__PURE__ */ P(Bs, [["render", Ps]]), Ls = ["innerHTML"], Rs = /*
|
|
|
4044
4109
|
const l = e.data;
|
|
4045
4110
|
l.pid = t.data.id, this.$http.request({
|
|
4046
4111
|
method: "POST",
|
|
4047
|
-
url:
|
|
4112
|
+
url: ne(this.$props.saveApi, l),
|
|
4048
4113
|
data: l
|
|
4049
4114
|
}).then(({ code: s }) => {
|
|
4050
4115
|
s !== 0 && this.$message.error("操作失败");
|
|
4051
4116
|
});
|
|
4052
4117
|
}
|
|
4053
4118
|
}
|
|
4054
|
-
}),
|
|
4119
|
+
}), Us = { class: "card-header" }, Vs = { class: "tree-action" }, qs = { key: 0 }, Hs = {
|
|
4055
4120
|
key: 1,
|
|
4056
4121
|
style: { color: "#E6A23C" }
|
|
4057
|
-
},
|
|
4058
|
-
function
|
|
4059
|
-
const
|
|
4060
|
-
return
|
|
4122
|
+
}, Fs = { class: "card-header" };
|
|
4123
|
+
function Gs(e, t, n, o, l, s) {
|
|
4124
|
+
const i = pe, c = Yn, d = Zn, m = Fe, f = A("v-form"), k = xe;
|
|
4125
|
+
return a(), h(k, {
|
|
4061
4126
|
class: "tree-box",
|
|
4062
4127
|
gutter: 20
|
|
4063
4128
|
}, {
|
|
4064
|
-
default:
|
|
4065
|
-
u(
|
|
4129
|
+
default: r(() => [
|
|
4130
|
+
u(m, {
|
|
4066
4131
|
span: 8,
|
|
4067
4132
|
class: "tree-tree"
|
|
4068
4133
|
}, {
|
|
4069
|
-
default:
|
|
4070
|
-
u(
|
|
4071
|
-
header:
|
|
4072
|
-
v("div",
|
|
4134
|
+
default: r(() => [
|
|
4135
|
+
u(d, { shadow: "never" }, {
|
|
4136
|
+
header: r(() => [
|
|
4137
|
+
v("div", Us, [
|
|
4073
4138
|
t[3] || (t[3] = v("span", null, "列表", -1)),
|
|
4074
|
-
u(
|
|
4139
|
+
u(i, {
|
|
4075
4140
|
type: "text",
|
|
4076
4141
|
onClick: t[0] || (t[0] = () => e.appendNew())
|
|
4077
4142
|
}, {
|
|
4078
|
-
default:
|
|
4079
|
-
|
|
4143
|
+
default: r(() => [...t[2] || (t[2] = [
|
|
4144
|
+
C("添加", -1)
|
|
4080
4145
|
])]),
|
|
4081
4146
|
_: 1
|
|
4082
4147
|
})
|
|
4083
4148
|
])
|
|
4084
4149
|
]),
|
|
4085
|
-
default:
|
|
4086
|
-
(e.treeData || []).length > 0 ? (
|
|
4150
|
+
default: r(() => [
|
|
4151
|
+
(e.treeData || []).length > 0 ? (a(), h(c, Q({
|
|
4087
4152
|
key: 0,
|
|
4088
4153
|
style: { height: "100vh" },
|
|
4089
4154
|
data: e.treeData,
|
|
@@ -4094,77 +4159,77 @@ function Us(e, t, n, o, l, s) {
|
|
|
4094
4159
|
"allow-drop": e.allowDrop,
|
|
4095
4160
|
onNodeDragEnd: e.handleDragEnd
|
|
4096
4161
|
}), {
|
|
4097
|
-
default:
|
|
4098
|
-
v("span",
|
|
4099
|
-
|
|
4162
|
+
default: r(({ node: b, data: x }) => [
|
|
4163
|
+
v("span", Vs, [
|
|
4164
|
+
x[e.localTreeProps.props.label] ? (a(), y("span", qs, N(x[e.localTreeProps.props.label]), 1)) : (a(), y("span", Hs, "请在右侧表单中修改 --> ")),
|
|
4100
4165
|
v("span", null, [
|
|
4101
|
-
|
|
4166
|
+
x[e.localTreeProps.props.label] ? (a(), h(i, {
|
|
4102
4167
|
key: 0,
|
|
4103
4168
|
class: "button",
|
|
4104
4169
|
type: "text",
|
|
4105
|
-
onClick: () => e.onclick(
|
|
4170
|
+
onClick: () => e.onclick(x)
|
|
4106
4171
|
}, {
|
|
4107
|
-
default:
|
|
4108
|
-
|
|
4172
|
+
default: r(() => [...t[4] || (t[4] = [
|
|
4173
|
+
C("编辑", -1)
|
|
4109
4174
|
])]),
|
|
4110
4175
|
_: 1
|
|
4111
|
-
}, 8, ["onClick"])) :
|
|
4112
|
-
e.canAppend(
|
|
4176
|
+
}, 8, ["onClick"])) : B("", !0),
|
|
4177
|
+
e.canAppend(x, b) ? (a(), h(i, {
|
|
4113
4178
|
key: 1,
|
|
4114
4179
|
class: "button",
|
|
4115
4180
|
type: "text",
|
|
4116
|
-
onClick: () => e.append(
|
|
4181
|
+
onClick: () => e.append(x, b)
|
|
4117
4182
|
}, {
|
|
4118
|
-
default:
|
|
4119
|
-
|
|
4183
|
+
default: r(() => [...t[5] || (t[5] = [
|
|
4184
|
+
C("添加", -1)
|
|
4120
4185
|
])]),
|
|
4121
4186
|
_: 1
|
|
4122
|
-
}, 8, ["onClick"])) :
|
|
4123
|
-
|
|
4187
|
+
}, 8, ["onClick"])) : B("", !0),
|
|
4188
|
+
x.children === void 0 || x.children.length === 0 ? (a(), h(i, {
|
|
4124
4189
|
key: 2,
|
|
4125
4190
|
class: "button",
|
|
4126
4191
|
type: "text",
|
|
4127
|
-
onClick: () => e.remove(
|
|
4192
|
+
onClick: () => e.remove(x)
|
|
4128
4193
|
}, {
|
|
4129
|
-
default:
|
|
4130
|
-
|
|
4194
|
+
default: r(() => [...t[6] || (t[6] = [
|
|
4195
|
+
C("删除", -1)
|
|
4131
4196
|
])]),
|
|
4132
4197
|
_: 1
|
|
4133
|
-
}, 8, ["onClick"])) :
|
|
4198
|
+
}, 8, ["onClick"])) : B("", !0)
|
|
4134
4199
|
])
|
|
4135
4200
|
])
|
|
4136
4201
|
]),
|
|
4137
4202
|
_: 1
|
|
4138
|
-
}, 16, ["data", "allow-drag", "allow-drop", "onNodeDragEnd"])) :
|
|
4203
|
+
}, 16, ["data", "allow-drag", "allow-drop", "onNodeDragEnd"])) : B("", !0)
|
|
4139
4204
|
]),
|
|
4140
4205
|
_: 1
|
|
4141
4206
|
})
|
|
4142
4207
|
]),
|
|
4143
4208
|
_: 1
|
|
4144
4209
|
}),
|
|
4145
|
-
u(
|
|
4210
|
+
u(m, {
|
|
4146
4211
|
span: 16,
|
|
4147
4212
|
class: "tree-form"
|
|
4148
4213
|
}, {
|
|
4149
|
-
default:
|
|
4150
|
-
e.type ? (
|
|
4214
|
+
default: r(() => [
|
|
4215
|
+
e.type ? (a(), h(d, {
|
|
4151
4216
|
key: 0,
|
|
4152
4217
|
shadow: "never"
|
|
4153
4218
|
}, {
|
|
4154
|
-
header:
|
|
4155
|
-
v("div",
|
|
4156
|
-
v("span", null,
|
|
4219
|
+
header: r(() => [
|
|
4220
|
+
v("div", Fs, [
|
|
4221
|
+
v("span", null, N(e.formType), 1)
|
|
4157
4222
|
])
|
|
4158
4223
|
]),
|
|
4159
|
-
default:
|
|
4160
|
-
(
|
|
4224
|
+
default: r(() => [
|
|
4225
|
+
(a(), h(f, Q({
|
|
4161
4226
|
key: e.formkey,
|
|
4162
4227
|
modelValue: e.formData,
|
|
4163
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
4228
|
+
"onUpdate:modelValue": t[1] || (t[1] = (b) => e.formData = b)
|
|
4164
4229
|
}, e.formProps, { onSubmit: e.submit }), null, 16, ["modelValue", "onSubmit"]))
|
|
4165
4230
|
]),
|
|
4166
4231
|
_: 1
|
|
4167
|
-
})) :
|
|
4232
|
+
})) : B("", !0)
|
|
4168
4233
|
]),
|
|
4169
4234
|
_: 1
|
|
4170
4235
|
})
|
|
@@ -4172,312 +4237,41 @@ function Us(e, t, n, o, l, s) {
|
|
|
4172
4237
|
_: 1
|
|
4173
4238
|
});
|
|
4174
4239
|
}
|
|
4175
|
-
const
|
|
4240
|
+
const it = /* @__PURE__ */ L(Ns, [["render", Gs]]), zs = {
|
|
4176
4241
|
__name: "tree",
|
|
4177
4242
|
setup(e) {
|
|
4178
4243
|
const t = (n, o) => {
|
|
4179
|
-
const l = Object.keys(
|
|
4244
|
+
const l = Object.keys(it.props);
|
|
4180
4245
|
return Object.keys(n).forEach((s) => {
|
|
4181
4246
|
l.indexOf(s) === -1 && delete n[s];
|
|
4182
4247
|
}), n;
|
|
4183
4248
|
};
|
|
4184
|
-
return (n, o) => (
|
|
4185
|
-
default:
|
|
4186
|
-
u(
|
|
4249
|
+
return (n, o) => (a(), h(Ie, { "schema-handler": t }, {
|
|
4250
|
+
default: r((l) => [
|
|
4251
|
+
u(it, le(ke(l)), null, 16)
|
|
4187
4252
|
]),
|
|
4188
4253
|
_: 1
|
|
4189
4254
|
}));
|
|
4190
4255
|
}
|
|
4191
|
-
},
|
|
4256
|
+
}, Pe = {
|
|
4192
4257
|
__name: "container",
|
|
4193
4258
|
setup(e) {
|
|
4194
|
-
const t =
|
|
4195
|
-
return
|
|
4259
|
+
const t = R(0);
|
|
4260
|
+
return Pn(() => {
|
|
4196
4261
|
t.value++;
|
|
4197
4262
|
}), (n, o) => {
|
|
4198
4263
|
const l = A("router-view");
|
|
4199
|
-
return
|
|
4200
|
-
};
|
|
4201
|
-
}
|
|
4202
|
-
}, Fs = {
|
|
4203
|
-
title: {
|
|
4204
|
-
text: ""
|
|
4205
|
-
},
|
|
4206
|
-
tooltip: {
|
|
4207
|
-
trigger: "axis"
|
|
4208
|
-
},
|
|
4209
|
-
grid: {
|
|
4210
|
-
left: "2%",
|
|
4211
|
-
right: "2%",
|
|
4212
|
-
bottom: "5%",
|
|
4213
|
-
containLabel: !0
|
|
4214
|
-
},
|
|
4215
|
-
toolbox: {
|
|
4216
|
-
feature: {
|
|
4217
|
-
saveAsImage: {}
|
|
4218
|
-
}
|
|
4219
|
-
},
|
|
4220
|
-
legend: {
|
|
4221
|
-
data: []
|
|
4222
|
-
},
|
|
4223
|
-
xAxis: {
|
|
4224
|
-
type: "category"
|
|
4225
|
-
},
|
|
4226
|
-
yAxis: {
|
|
4227
|
-
type: "value"
|
|
4228
|
-
},
|
|
4229
|
-
series: []
|
|
4230
|
-
};
|
|
4231
|
-
function Gs(e, t, n) {
|
|
4232
|
-
if (n.length === 0)
|
|
4233
|
-
return {};
|
|
4234
|
-
let o = U({}, Fs);
|
|
4235
|
-
if (o.title.text = e, He(t)) {
|
|
4236
|
-
const l = [], s = Object.keys(n[0]);
|
|
4237
|
-
let a = s[0], r = s.filter((f, m) => m > 0), p = t;
|
|
4238
|
-
if (t.indexOf(":") > -1) {
|
|
4239
|
-
const f = t.split(":"), m = f[1].split(",");
|
|
4240
|
-
p = f[0], a = m[0], r = m.filter((y, _) => _ > 0);
|
|
4241
|
-
}
|
|
4242
|
-
r.forEach((f) => {
|
|
4243
|
-
const m = [];
|
|
4244
|
-
n.forEach((y) => {
|
|
4245
|
-
m.push(y[f]);
|
|
4246
|
-
}), o.series.push({
|
|
4247
|
-
name: f,
|
|
4248
|
-
type: p,
|
|
4249
|
-
smooth: !0,
|
|
4250
|
-
data: m
|
|
4251
|
-
}), o.legend.data.push(f);
|
|
4252
|
-
}), n.forEach((f) => {
|
|
4253
|
-
l.push(f[a]);
|
|
4254
|
-
}), o.xAxis.data = l;
|
|
4255
|
-
}
|
|
4256
|
-
return ie(t) && (o = U(o, t)), o;
|
|
4257
|
-
}
|
|
4258
|
-
const zs = z({
|
|
4259
|
-
name: "NumberPanel",
|
|
4260
|
-
props: {
|
|
4261
|
-
dataList: {
|
|
4262
|
-
type: Array,
|
|
4263
|
-
default: (e) => []
|
|
4264
|
-
}
|
|
4265
|
-
},
|
|
4266
|
-
data() {
|
|
4267
|
-
return {};
|
|
4268
|
-
}
|
|
4269
|
-
}), Ks = { class: "number-panel-title" }, Js = { class: "number" }, Ws = { class: "name" };
|
|
4270
|
-
function Qs(e, t, n, o, l, s) {
|
|
4271
|
-
return i(!0), b(B, null, j(e.dataList, (a, r) => (i(), b("span", { key: r }, [
|
|
4272
|
-
v("div", Ks, [
|
|
4273
|
-
(i(!0), b(B, null, j(Object.keys(a), (p, f) => (i(), b("div", {
|
|
4274
|
-
key: f,
|
|
4275
|
-
class: "title-inner"
|
|
4276
|
-
}, [
|
|
4277
|
-
v("p", Js, M(a[p]), 1),
|
|
4278
|
-
v("p", Ws, M(p), 1)
|
|
4279
|
-
]))), 128))
|
|
4280
|
-
])
|
|
4281
|
-
]))), 128);
|
|
4282
|
-
}
|
|
4283
|
-
const Xs = /* @__PURE__ */ P(zs, [["render", Qs], ["__scopeId", "data-v-cc0d8293"]]), Zs = {
|
|
4284
|
-
components: {
|
|
4285
|
-
Chart: Xn,
|
|
4286
|
-
Md: lo,
|
|
4287
|
-
Json: We,
|
|
4288
|
-
Table: fe,
|
|
4289
|
-
Number: Xs,
|
|
4290
|
-
Html: ""
|
|
4291
|
-
},
|
|
4292
|
-
props: {
|
|
4293
|
-
option: {
|
|
4294
|
-
type: Object,
|
|
4295
|
-
default: () => {
|
|
4296
|
-
}
|
|
4297
|
-
}
|
|
4298
|
-
},
|
|
4299
|
-
setup(e) {
|
|
4300
|
-
const t = () => e.option.chart === "num" ? "number" : e.option.type;
|
|
4301
|
-
return {
|
|
4302
|
-
compprops: (o) => {
|
|
4303
|
-
const l = t();
|
|
4304
|
-
if (l === "number")
|
|
4305
|
-
return {
|
|
4306
|
-
dataList: o.data
|
|
4307
|
-
};
|
|
4308
|
-
if (l === "chart")
|
|
4309
|
-
return {
|
|
4310
|
-
options: Gs(o.id, o.chart, o.data)
|
|
4311
|
-
};
|
|
4312
|
-
if (l === "md")
|
|
4313
|
-
return {
|
|
4314
|
-
source: o.data
|
|
4315
|
-
};
|
|
4316
|
-
if (l === "table") {
|
|
4317
|
-
if (!yt(o.data))
|
|
4318
|
-
return { showPagination: !1 };
|
|
4319
|
-
const s = [];
|
|
4320
|
-
return o.data[0] && Object.keys(o.data[0]).forEach((a, r) => {
|
|
4321
|
-
s.push({ field: a, label: a });
|
|
4322
|
-
}), {
|
|
4323
|
-
headers: s,
|
|
4324
|
-
list: o.data,
|
|
4325
|
-
showPagination: !1
|
|
4326
|
-
};
|
|
4327
|
-
}
|
|
4328
|
-
return {};
|
|
4329
|
-
},
|
|
4330
|
-
comptype: t
|
|
4331
|
-
};
|
|
4332
|
-
}
|
|
4333
|
-
};
|
|
4334
|
-
function Ys(e, t, n, o, l, s) {
|
|
4335
|
-
const a = Je, r = ln("resize");
|
|
4336
|
-
return ye((i(), h(a, {
|
|
4337
|
-
shadow: "never",
|
|
4338
|
-
class: "part"
|
|
4339
|
-
}, {
|
|
4340
|
-
default: c(() => [
|
|
4341
|
-
(i(), h(Ue(o.comptype()), Z(re(o.compprops(n.option))), null, 16))
|
|
4342
|
-
]),
|
|
4343
|
-
_: 1
|
|
4344
|
-
})), [
|
|
4345
|
-
[r, !0]
|
|
4346
|
-
]);
|
|
4347
|
-
}
|
|
4348
|
-
const ea = /* @__PURE__ */ P(Zs, [["render", Ys], ["__scopeId", "data-v-a5a65cc1"]]), ta = /* @__PURE__ */ z({
|
|
4349
|
-
__name: "index",
|
|
4350
|
-
props: {
|
|
4351
|
-
filter: {
|
|
4352
|
-
type: Array,
|
|
4353
|
-
default: () => []
|
|
4354
|
-
},
|
|
4355
|
-
dataPart: {
|
|
4356
|
-
type: Array,
|
|
4357
|
-
default: () => []
|
|
4358
|
-
}
|
|
4359
|
-
},
|
|
4360
|
-
setup(e) {
|
|
4361
|
-
const t = Y();
|
|
4362
|
-
Se(() => {
|
|
4363
|
-
});
|
|
4364
|
-
const n = e, o = $({});
|
|
4365
|
-
Ve(() => {
|
|
4366
|
-
n.filter?.forEach((m) => {
|
|
4367
|
-
m.default !== null && (o.value[m.field] = m.default);
|
|
4368
|
-
});
|
|
4369
|
-
});
|
|
4370
|
-
const l = {
|
|
4371
|
-
inline: !0,
|
|
4372
|
-
labelPosition: "right",
|
|
4373
|
-
labelWidth: "auto",
|
|
4374
|
-
submitButton: {
|
|
4375
|
-
text: "查询"
|
|
4376
|
-
},
|
|
4377
|
-
cancelButton: {
|
|
4378
|
-
text: "重置"
|
|
4379
|
-
}
|
|
4380
|
-
}, s = $(1), a = $(n.filter), r = $(n.dataPart), p = S(() => {
|
|
4381
|
-
let m = t.params.id;
|
|
4382
|
-
if (!m) {
|
|
4383
|
-
const y = t.path.split("/");
|
|
4384
|
-
m = y[y.length - 1];
|
|
4385
|
-
}
|
|
4386
|
-
return "/focusbi_report/view/" + m;
|
|
4387
|
-
}), f = (m) => {
|
|
4388
|
-
Ht.get(p.value, { params: m }).then(({ data: y }) => {
|
|
4389
|
-
a.value = y.filter, r.value = y.dataPart, s.value++;
|
|
4390
|
-
});
|
|
4391
|
-
};
|
|
4392
|
-
return (m, y) => {
|
|
4393
|
-
const _ = Je, C = Ie, E = Ke, w = he;
|
|
4394
|
-
return i(), h(w, null, {
|
|
4395
|
-
default: c(() => [
|
|
4396
|
-
d(a).length > 0 ? (i(), h(C, {
|
|
4397
|
-
key: 0,
|
|
4398
|
-
span: 24
|
|
4399
|
-
}, {
|
|
4400
|
-
default: c(() => [
|
|
4401
|
-
u(_, {
|
|
4402
|
-
shadow: "never",
|
|
4403
|
-
class: "part-filter"
|
|
4404
|
-
}, {
|
|
4405
|
-
default: c(() => [
|
|
4406
|
-
u(d(te), {
|
|
4407
|
-
modelValue: d(o),
|
|
4408
|
-
"onUpdate:modelValue": y[0] || (y[0] = (g) => qe(o) ? o.value = g : null),
|
|
4409
|
-
"form-items": d(a),
|
|
4410
|
-
options: l,
|
|
4411
|
-
onSubmit: f
|
|
4412
|
-
}, null, 8, ["modelValue", "form-items"])
|
|
4413
|
-
]),
|
|
4414
|
-
_: 1
|
|
4415
|
-
})
|
|
4416
|
-
]),
|
|
4417
|
-
_: 1
|
|
4418
|
-
})) : O("", !0),
|
|
4419
|
-
u(C, { span: 24 }, {
|
|
4420
|
-
default: c(() => [
|
|
4421
|
-
u(w, { gutter: 20 }, {
|
|
4422
|
-
default: c(() => [
|
|
4423
|
-
(i(!0), b(B, null, j(d(r), (g, I) => (i(), h(C, {
|
|
4424
|
-
key: I,
|
|
4425
|
-
span: g.col || 24
|
|
4426
|
-
}, {
|
|
4427
|
-
default: c(() => [
|
|
4428
|
-
g.errMsg ? (i(), h(E, {
|
|
4429
|
-
key: 1,
|
|
4430
|
-
title: g.id + " 片段执行出错",
|
|
4431
|
-
type: "error"
|
|
4432
|
-
}, {
|
|
4433
|
-
default: c(() => [
|
|
4434
|
-
T(M(g.errMsg), 1)
|
|
4435
|
-
]),
|
|
4436
|
-
_: 2
|
|
4437
|
-
}, 1032, ["title"])) : (i(), h(ea, {
|
|
4438
|
-
key: d(s),
|
|
4439
|
-
option: g
|
|
4440
|
-
}, null, 8, ["option"]))
|
|
4441
|
-
]),
|
|
4442
|
-
_: 2
|
|
4443
|
-
}, 1032, ["span"]))), 128))
|
|
4444
|
-
]),
|
|
4445
|
-
_: 1
|
|
4446
|
-
})
|
|
4447
|
-
]),
|
|
4448
|
-
_: 1
|
|
4449
|
-
})
|
|
4450
|
-
]),
|
|
4451
|
-
_: 1
|
|
4452
|
-
});
|
|
4264
|
+
return a(), h(l);
|
|
4453
4265
|
};
|
|
4454
4266
|
}
|
|
4455
|
-
}),
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
}
|
|
4464
|
-
return "/focusbi_report/view/" + o;
|
|
4465
|
-
});
|
|
4466
|
-
return (o, l) => (i(), h(be, { "schema-api": d(n) }, {
|
|
4467
|
-
default: c((s) => [
|
|
4468
|
-
u(ta, Z(re(s)), null, 16)
|
|
4469
|
-
]),
|
|
4470
|
-
_: 1
|
|
4471
|
-
}, 8, ["schema-api"]));
|
|
4472
|
-
}
|
|
4473
|
-
}, oa = (e) => u("div", null, [e.test]), la = {
|
|
4474
|
-
card: Cn,
|
|
4475
|
-
form: te,
|
|
4476
|
-
table: fe,
|
|
4477
|
-
test: oa,
|
|
4478
|
-
row: In,
|
|
4479
|
-
col: En
|
|
4480
|
-
}, sa = {
|
|
4267
|
+
}, Ks = (e) => u("div", null, [e.test]), Js = {
|
|
4268
|
+
card: Rn,
|
|
4269
|
+
form: oe,
|
|
4270
|
+
table: ve,
|
|
4271
|
+
test: Ks,
|
|
4272
|
+
row: Bn,
|
|
4273
|
+
col: Tn
|
|
4274
|
+
}, Ws = {
|
|
4481
4275
|
card: {
|
|
4482
4276
|
type: "card",
|
|
4483
4277
|
props: {
|
|
@@ -4498,7 +4292,7 @@ const ea = /* @__PURE__ */ P(Zs, [["render", Ys], ["__scopeId", "data-v-a5a65cc1
|
|
|
4498
4292
|
}
|
|
4499
4293
|
}
|
|
4500
4294
|
};
|
|
4501
|
-
function
|
|
4295
|
+
function Qs(e) {
|
|
4502
4296
|
const t = Object.assign({}, e), n = t.type.split(".").reverse(), o = t.span || 24;
|
|
4503
4297
|
delete t.span;
|
|
4504
4298
|
let l = {
|
|
@@ -4510,9 +4304,9 @@ function aa(e) {
|
|
|
4510
4304
|
type: n[s],
|
|
4511
4305
|
children: [l]
|
|
4512
4306
|
};
|
|
4513
|
-
return l.span = o,
|
|
4307
|
+
return l.span = o, Je([l]);
|
|
4514
4308
|
}
|
|
4515
|
-
function
|
|
4309
|
+
function Je(e) {
|
|
4516
4310
|
const t = {
|
|
4517
4311
|
type: "row",
|
|
4518
4312
|
props: {
|
|
@@ -4523,11 +4317,11 @@ function et(e) {
|
|
|
4523
4317
|
};
|
|
4524
4318
|
return e.forEach((n) => {
|
|
4525
4319
|
let o = Object.assign({}, n);
|
|
4526
|
-
if (
|
|
4527
|
-
let
|
|
4528
|
-
Object.keys(o.props?.style).forEach((
|
|
4529
|
-
|
|
4530
|
-
}), o.props.style =
|
|
4320
|
+
if (_e(o.props?.style)) {
|
|
4321
|
+
let i = "";
|
|
4322
|
+
Object.keys(o.props?.style).forEach((c) => {
|
|
4323
|
+
i += c + ":" + o.props?.style[c] + ";";
|
|
4324
|
+
}), o.props.style = i;
|
|
4531
4325
|
}
|
|
4532
4326
|
const l = {
|
|
4533
4327
|
span: o.span ?? 24,
|
|
@@ -4537,82 +4331,80 @@ function et(e) {
|
|
|
4537
4331
|
t.children.push({
|
|
4538
4332
|
type: "col",
|
|
4539
4333
|
props: l,
|
|
4540
|
-
children:
|
|
4334
|
+
children: Qs(o)
|
|
4541
4335
|
});
|
|
4542
4336
|
return;
|
|
4543
4337
|
}
|
|
4544
|
-
o =
|
|
4338
|
+
o = z({
|
|
4545
4339
|
props: {}
|
|
4546
|
-
},
|
|
4547
|
-
const s =
|
|
4548
|
-
s.length && (o.children =
|
|
4340
|
+
}, Ws[o.type] || {}, o);
|
|
4341
|
+
const s = qt(o.children);
|
|
4342
|
+
s.length && (o.children = Je(s)), t.children.push({
|
|
4549
4343
|
type: "col",
|
|
4550
4344
|
props: l,
|
|
4551
4345
|
children: [o]
|
|
4552
4346
|
});
|
|
4553
4347
|
}), [t];
|
|
4554
4348
|
}
|
|
4555
|
-
function
|
|
4556
|
-
return
|
|
4349
|
+
function qt(e) {
|
|
4350
|
+
return wn(e) ? e : _e(e) ? [e] : [];
|
|
4557
4351
|
}
|
|
4558
4352
|
let Ne = {};
|
|
4559
|
-
const
|
|
4560
|
-
const t =
|
|
4561
|
-
return
|
|
4562
|
-
default: () =>
|
|
4353
|
+
const Ht = (e) => {
|
|
4354
|
+
const t = Js[e.type] || Ne[e.type] || e.type;
|
|
4355
|
+
return cn(t, e.props, {
|
|
4356
|
+
default: () => qt(e.children).map((n) => Ht(n))
|
|
4563
4357
|
});
|
|
4564
|
-
},
|
|
4358
|
+
}, Xs = (e) => (Object.keys(Ne).length === 0 && (Ne = rn().appContext.components), Je(Object.values(e.schema)).map((n) => Ht(n))), Zs = {
|
|
4565
4359
|
__name: "custom",
|
|
4566
4360
|
setup(e) {
|
|
4567
|
-
const t =
|
|
4568
|
-
return (o, l) => (
|
|
4569
|
-
default:
|
|
4570
|
-
u(
|
|
4361
|
+
const t = R([]), n = (o, l) => (t.value = un(o), o);
|
|
4362
|
+
return (o, l) => (a(), h(Ie, { "schema-handler": n }, {
|
|
4363
|
+
default: r(() => [
|
|
4364
|
+
u(p(Xs), { schema: p(t) }, null, 8, ["schema"])
|
|
4571
4365
|
]),
|
|
4572
4366
|
_: 1
|
|
4573
4367
|
}));
|
|
4574
4368
|
}
|
|
4575
4369
|
};
|
|
4576
|
-
let
|
|
4577
|
-
function
|
|
4578
|
-
|
|
4370
|
+
let ae = {};
|
|
4371
|
+
function Pa(e) {
|
|
4372
|
+
ae = e;
|
|
4579
4373
|
}
|
|
4580
|
-
const
|
|
4374
|
+
const Ys = (e) => {
|
|
4581
4375
|
const t = (n) => {
|
|
4582
4376
|
const o = "./views/" + n + ".vue";
|
|
4583
|
-
return
|
|
4377
|
+
return ae && ae[o] && ae[o].default ? ae[o].default : (console.error(`自定义组件不存在 ${e.name} ${e.view}`), Pe);
|
|
4584
4378
|
};
|
|
4585
4379
|
if (e.path === "#")
|
|
4586
|
-
return
|
|
4380
|
+
return Pe;
|
|
4587
4381
|
switch (e.page_type) {
|
|
4588
4382
|
case J.list:
|
|
4589
|
-
return
|
|
4383
|
+
return Vt;
|
|
4590
4384
|
case J.form:
|
|
4591
4385
|
return je;
|
|
4592
4386
|
case J.custom:
|
|
4593
4387
|
case J.localComp:
|
|
4594
4388
|
return t(e.view || "");
|
|
4595
4389
|
case J.tree:
|
|
4596
|
-
return
|
|
4597
|
-
case J.report:
|
|
4598
|
-
return na;
|
|
4390
|
+
return zs;
|
|
4599
4391
|
case J.customSchema:
|
|
4600
|
-
return
|
|
4392
|
+
return Zs;
|
|
4601
4393
|
}
|
|
4602
|
-
return
|
|
4394
|
+
return Pe;
|
|
4603
4395
|
};
|
|
4604
|
-
function
|
|
4396
|
+
function ei(e) {
|
|
4605
4397
|
let t = e.path;
|
|
4606
|
-
return e.type ===
|
|
4398
|
+
return e.type === F.menu && e.page_type === J.entity && (t = "#"), t.indexOf(":id") > -1 && t.indexOf(":id") + 3 === t.length && (t = t.replace(":id", ":id(\\d+)")), t === "#" ? "/" + e.id + "_DIR_" + e.name : t[0] !== "/" ? "/" + t : t;
|
|
4607
4399
|
}
|
|
4608
|
-
function
|
|
4400
|
+
function ti(e) {
|
|
4609
4401
|
return (e.path + e.name).split("/").filter((t) => t).join("_");
|
|
4610
4402
|
}
|
|
4611
|
-
const
|
|
4612
|
-
const t = e.type !==
|
|
4613
|
-
path:
|
|
4614
|
-
name: e.id + "_" +
|
|
4615
|
-
component:
|
|
4403
|
+
const Ft = (e) => {
|
|
4404
|
+
const t = e.type !== F.page, n = {
|
|
4405
|
+
path: ei(e),
|
|
4406
|
+
name: e.id + "_" + ti(e) + "_" + e.path.replaceAll("/", "_"),
|
|
4407
|
+
component: Ys(e),
|
|
4616
4408
|
meta: {
|
|
4617
4409
|
id: e.id,
|
|
4618
4410
|
pageId: e.id,
|
|
@@ -4621,20 +4413,21 @@ const Ut = (e) => {
|
|
|
4621
4413
|
hidden: !t,
|
|
4622
4414
|
path: e.path,
|
|
4623
4415
|
menuType: e.type,
|
|
4624
|
-
keepAlive: !1
|
|
4416
|
+
keepAlive: !1,
|
|
4417
|
+
role: e.role
|
|
4625
4418
|
},
|
|
4626
|
-
children: e.children ? e.children.map((o) =>
|
|
4419
|
+
children: e.children ? e.children.map((o) => Ft(o)) : []
|
|
4627
4420
|
};
|
|
4628
4421
|
if (e.page_type === J.entity) {
|
|
4629
|
-
const o = e.path + "/list", l = e.path + "/form", s = e.path + "/:id",
|
|
4422
|
+
const o = e.path + "/list", l = e.path + "/form", s = e.path + "/:id", i = [{
|
|
4630
4423
|
path: o,
|
|
4631
4424
|
name: e.name + "列表" + e.id,
|
|
4632
|
-
component:
|
|
4425
|
+
component: Vt,
|
|
4633
4426
|
meta: {
|
|
4634
4427
|
id: e.id + 99999,
|
|
4635
4428
|
title: "列表",
|
|
4636
4429
|
hidden: !0,
|
|
4637
|
-
menuType:
|
|
4430
|
+
menuType: F.hidden,
|
|
4638
4431
|
keepAlive: !1,
|
|
4639
4432
|
pageId: e.id,
|
|
4640
4433
|
path: e.path
|
|
@@ -4647,7 +4440,7 @@ const Ut = (e) => {
|
|
|
4647
4440
|
id: e.id + 99999 + 1,
|
|
4648
4441
|
title: "新建",
|
|
4649
4442
|
hidden: !0,
|
|
4650
|
-
menuType:
|
|
4443
|
+
menuType: F.hidden,
|
|
4651
4444
|
keepAlive: !1,
|
|
4652
4445
|
pageId: e.id,
|
|
4653
4446
|
path: e.path
|
|
@@ -4660,20 +4453,20 @@ const Ut = (e) => {
|
|
|
4660
4453
|
id: e.id + 99999 + 2,
|
|
4661
4454
|
title: "编辑",
|
|
4662
4455
|
hidden: !0,
|
|
4663
|
-
menuType:
|
|
4456
|
+
menuType: F.hidden,
|
|
4664
4457
|
keepAlive: !1,
|
|
4665
4458
|
pageId: e.id,
|
|
4666
4459
|
path: e.path
|
|
4667
4460
|
}
|
|
4668
4461
|
}];
|
|
4669
|
-
n.children = [...
|
|
4462
|
+
n.children = [...i, ...n.children];
|
|
4670
4463
|
}
|
|
4671
4464
|
if (n.children && n.children.length > 0) {
|
|
4672
4465
|
let o = !0;
|
|
4673
4466
|
if (n.children.forEach((l) => {
|
|
4674
4467
|
l.meta && !l.meta.hidden && (o = !1);
|
|
4675
|
-
}), n.meta && (n.meta.menuType = t ?
|
|
4676
|
-
n.meta && (n.meta.menuType =
|
|
4468
|
+
}), n.meta && (n.meta.menuType = t ? F.dir : F.hidden), o) {
|
|
4469
|
+
n.meta && (n.meta.menuType = F.menu);
|
|
4677
4470
|
let l = "/";
|
|
4678
4471
|
for (let s = 0; s < n.children.length; s++)
|
|
4679
4472
|
if (n.children[s].path.indexOf("/:") === -1) {
|
|
@@ -4684,7 +4477,7 @@ const Ut = (e) => {
|
|
|
4684
4477
|
}
|
|
4685
4478
|
}
|
|
4686
4479
|
return n;
|
|
4687
|
-
},
|
|
4480
|
+
}, ni = (e) => {
|
|
4688
4481
|
const t = [];
|
|
4689
4482
|
return e.forEach((n) => {
|
|
4690
4483
|
const o = {
|
|
@@ -4693,96 +4486,156 @@ const Ut = (e) => {
|
|
|
4693
4486
|
routes: []
|
|
4694
4487
|
};
|
|
4695
4488
|
n.routes.forEach((l) => {
|
|
4696
|
-
o.routes.push(
|
|
4489
|
+
o.routes.push(Ft(l));
|
|
4697
4490
|
}), t.push(o);
|
|
4698
4491
|
}), t;
|
|
4492
|
+
}, oi = "root", at = (e) => e ? e.split(",").map((t) => t.trim()).filter((t) => !!t) : [], li = (e) => {
|
|
4493
|
+
const t = typeof e.role == "string" ? e.role : "", n = e.meta && typeof e.meta.role == "string" ? e.meta.role : "", o = [...at(t), ...at(n)];
|
|
4494
|
+
return !o.length && e.children && e.children.length ? [] : Array.from(new Set(o));
|
|
4495
|
+
}, Gt = (e) => {
|
|
4496
|
+
const t = { ...e };
|
|
4497
|
+
return e.meta && (t.meta = { ...e.meta }), e.children && e.children.length && (t.children = e.children.map((n) => Gt(n))), t;
|
|
4498
|
+
}, si = (e, t) => e.length ? t.length ? e.some((n) => t.includes(n)) : !1 : !0, ge = (e = [], t) => t.includes(oi) ? e.map((n) => Gt(n)) : e.reduce((n, o) => {
|
|
4499
|
+
const l = li(o);
|
|
4500
|
+
if (!si(l, t))
|
|
4501
|
+
return n;
|
|
4502
|
+
const s = { ...o };
|
|
4503
|
+
if (o.meta && (s.meta = { ...o.meta }), o.children && o.children.length) {
|
|
4504
|
+
const i = ge(o.children, t);
|
|
4505
|
+
i.length ? s.children = i : delete s.children;
|
|
4506
|
+
}
|
|
4507
|
+
return n.push(s), n;
|
|
4508
|
+
}, []), ii = (e) => {
|
|
4509
|
+
const t = globalThis.atob(e);
|
|
4510
|
+
let n = "";
|
|
4511
|
+
for (let o = 0; o < t.length; o++) {
|
|
4512
|
+
const l = t.charCodeAt(o).toString(16).padStart(2, "0");
|
|
4513
|
+
n += "%" + l;
|
|
4514
|
+
}
|
|
4515
|
+
try {
|
|
4516
|
+
return decodeURIComponent(n);
|
|
4517
|
+
} catch {
|
|
4518
|
+
return decodeURIComponent(encodeURIComponent(t));
|
|
4519
|
+
}
|
|
4520
|
+
}, ai = (e) => {
|
|
4521
|
+
const t = e.replace(/-/g, "+").replace(/_/g, "/"), n = 4 - t.length % 4, o = t + (n < 4 ? "=".repeat(n) : "");
|
|
4522
|
+
return typeof globalThis.atob == "function" ? ii(o) : typeof Buffer < "u" ? Buffer.from(o, "base64").toString("utf-8") : "";
|
|
4523
|
+
}, ri = (e) => {
|
|
4524
|
+
if (!e)
|
|
4525
|
+
return null;
|
|
4526
|
+
const t = e.split(".");
|
|
4527
|
+
if (t.length < 2)
|
|
4528
|
+
return null;
|
|
4529
|
+
try {
|
|
4530
|
+
const n = ai(t[1]);
|
|
4531
|
+
return n ? JSON.parse(n) : null;
|
|
4532
|
+
} catch {
|
|
4533
|
+
return null;
|
|
4534
|
+
}
|
|
4535
|
+
}, zt = (e) => {
|
|
4536
|
+
const t = ri(e);
|
|
4537
|
+
return (t && typeof t.role == "string" ? t.role : "").split(",").map((o) => o.trim()).filter((o) => !!o);
|
|
4699
4538
|
};
|
|
4700
|
-
function
|
|
4539
|
+
function ci(e) {
|
|
4701
4540
|
e.beforeEach(async (t, n, o) => {
|
|
4702
|
-
if (
|
|
4541
|
+
if (Nt().indexOf(t.path) !== -1) {
|
|
4703
4542
|
o();
|
|
4704
4543
|
return;
|
|
4705
4544
|
}
|
|
4706
|
-
if (
|
|
4545
|
+
if (xs()) {
|
|
4707
4546
|
o();
|
|
4708
4547
|
return;
|
|
4709
4548
|
}
|
|
4710
|
-
const l =
|
|
4549
|
+
const l = j(P);
|
|
4711
4550
|
await l.info();
|
|
4712
|
-
const s =
|
|
4713
|
-
|
|
4714
|
-
|
|
4551
|
+
const s = zt(me());
|
|
4552
|
+
if (l.rawCustomRouter.length) {
|
|
4553
|
+
const m = ge(l.rawCustomRouter, s);
|
|
4554
|
+
m.forEach((f) => {
|
|
4555
|
+
const k = typeof f.name == "string" ? f.name : void 0, b = k ? e.hasRoute(k) : !1, x = e.getRoutes().some((I) => I.path === f.path);
|
|
4556
|
+
b || x || e.addRoute(f);
|
|
4557
|
+
}), l.setCustomRoutes(m);
|
|
4558
|
+
}
|
|
4559
|
+
const i = await l.loadRemoteRoutes(), d = ni(i).map((m) => {
|
|
4560
|
+
const f = ge(m.routes, s);
|
|
4561
|
+
return {
|
|
4562
|
+
...m,
|
|
4563
|
+
routes: f
|
|
4564
|
+
};
|
|
4565
|
+
}).filter((m) => m.routes.length > 0);
|
|
4566
|
+
d.forEach((m) => {
|
|
4567
|
+
m.routes.forEach((f) => {
|
|
4715
4568
|
e.addRoute({
|
|
4716
4569
|
path: "/",
|
|
4717
|
-
component:
|
|
4718
|
-
children: [
|
|
4570
|
+
component: jt,
|
|
4571
|
+
children: [f]
|
|
4719
4572
|
});
|
|
4720
4573
|
});
|
|
4721
|
-
}), e.addRoute({ name: "404", path: "/:pathMatch(.*)*", redirect: "/404", hidden: !0 }), l.updateRemoteRouter(
|
|
4574
|
+
}), e.addRoute({ name: "404", path: "/:pathMatch(.*)*", redirect: "/404", hidden: !0 }), l.updateRemoteRouter(d), await e.replace(t), o();
|
|
4722
4575
|
});
|
|
4723
4576
|
}
|
|
4724
|
-
function
|
|
4577
|
+
function ui(e) {
|
|
4725
4578
|
e.beforeEach(async (t, n, o) => {
|
|
4726
|
-
const s = [
|
|
4727
|
-
for (let
|
|
4728
|
-
const
|
|
4729
|
-
|
|
4579
|
+
const s = [U(P).title || ""], i = t.matched.length;
|
|
4580
|
+
for (let c = i; c > i - 3; c--) {
|
|
4581
|
+
const d = t.matched[c - 1];
|
|
4582
|
+
d?.meta?.title && s.push(d.meta.title + "");
|
|
4730
4583
|
}
|
|
4731
4584
|
s.length > 1 && (document.title = s.reverse().join("-")), o();
|
|
4732
4585
|
}), e.afterEach(async (t, n, o) => {
|
|
4733
|
-
const l =
|
|
4586
|
+
const l = X(P);
|
|
4734
4587
|
Object.keys(t.meta).length > 0 && await l.setCurrentMeta(t.meta);
|
|
4735
4588
|
});
|
|
4736
4589
|
}
|
|
4737
|
-
function
|
|
4738
|
-
|
|
4590
|
+
function di(e) {
|
|
4591
|
+
Bs(e), Ss(e), ci(e), ui(e);
|
|
4739
4592
|
}
|
|
4740
|
-
|
|
4741
|
-
function
|
|
4742
|
-
return
|
|
4593
|
+
di(W);
|
|
4594
|
+
function pi() {
|
|
4595
|
+
return j(P).token;
|
|
4743
4596
|
}
|
|
4744
|
-
function
|
|
4745
|
-
return
|
|
4597
|
+
function mi() {
|
|
4598
|
+
return j(P).expired;
|
|
4746
4599
|
}
|
|
4747
|
-
function
|
|
4748
|
-
|
|
4600
|
+
function rt(e) {
|
|
4601
|
+
Co({
|
|
4749
4602
|
message: e,
|
|
4750
4603
|
type: "error",
|
|
4751
4604
|
duration: 5 * 1e3,
|
|
4752
4605
|
grouping: !0
|
|
4753
4606
|
});
|
|
4754
4607
|
}
|
|
4755
|
-
const
|
|
4608
|
+
const fi = {
|
|
4756
4609
|
onFulfilled: function(e) {
|
|
4757
4610
|
e.headers = e.headers || {};
|
|
4758
|
-
const t =
|
|
4759
|
-
return t && (e.headers["X-Token"] = t),
|
|
4611
|
+
const t = pi();
|
|
4612
|
+
return t && (e.headers["X-Token"] = t), W.currentRoute.value.meta?.path && (e.headers["X-Path"] = W.currentRoute.value.meta.path), e;
|
|
4760
4613
|
}
|
|
4761
|
-
},
|
|
4614
|
+
}, hi = {
|
|
4762
4615
|
onFulfilled(e) {
|
|
4763
4616
|
if (!(e.config?.notHoldApiErr !== void 0 && e.config?.notHoldApiErr === !0) && e.data.code !== 0) {
|
|
4764
4617
|
const o = e.data.message || `接口请求错误 ${e.config.method}::${e.config.url?.split("?")[0]}`;
|
|
4765
4618
|
if (e.data.code === 401) {
|
|
4766
|
-
if (
|
|
4619
|
+
if (mi())
|
|
4767
4620
|
return;
|
|
4768
|
-
|
|
4621
|
+
j(P).SetExpired(), lt.alert("登录信息已过期或未登录, 是否跳转登录", "操作提醒", {
|
|
4769
4622
|
showClose: !1,
|
|
4770
4623
|
confirmButtonText: "重新登录",
|
|
4771
4624
|
showCancelButton: !0,
|
|
4772
4625
|
cancelButtonText: "取消",
|
|
4773
4626
|
callback: (l) => {
|
|
4774
|
-
l === "confirm" && (
|
|
4627
|
+
l === "confirm" && (It(), location.href = location.origin + location.pathname + location.hash.replace("#", "#/?redirect="), location.reload()), j(P).SetExpired();
|
|
4775
4628
|
}
|
|
4776
4629
|
});
|
|
4777
4630
|
return;
|
|
4778
4631
|
} else
|
|
4779
|
-
|
|
4632
|
+
rt(o);
|
|
4780
4633
|
return Promise.reject(o);
|
|
4781
4634
|
}
|
|
4782
4635
|
let n = e.data?.data?._message_box;
|
|
4783
|
-
return n !== void 0 && (
|
|
4636
|
+
return n !== void 0 && (bt(n) && (n = {
|
|
4784
4637
|
message: e.data?.data?._message_box
|
|
4785
|
-
}),
|
|
4638
|
+
}), lt({
|
|
4786
4639
|
title: "提示",
|
|
4787
4640
|
type: "success",
|
|
4788
4641
|
grouping: !0,
|
|
@@ -4790,28 +4643,28 @@ const _a = {
|
|
|
4790
4643
|
})), e.data;
|
|
4791
4644
|
},
|
|
4792
4645
|
onRejected(e) {
|
|
4793
|
-
return
|
|
4646
|
+
return Ve.isCancel(e) ? Promise.reject("") : (rt(`${e.message} ${e.config.method}::${e.config.url?.split("?")[0]}`), Promise.reject(e));
|
|
4794
4647
|
}
|
|
4795
|
-
},
|
|
4648
|
+
}, bi = [
|
|
4796
4649
|
{
|
|
4797
|
-
request:
|
|
4798
|
-
response:
|
|
4650
|
+
request: Bo,
|
|
4651
|
+
response: Ro
|
|
4799
4652
|
},
|
|
4800
4653
|
{
|
|
4801
|
-
request:
|
|
4802
|
-
response:
|
|
4654
|
+
request: fi,
|
|
4655
|
+
response: hi
|
|
4803
4656
|
}
|
|
4804
4657
|
];
|
|
4805
|
-
function
|
|
4806
|
-
const t =
|
|
4658
|
+
function We(e = {}) {
|
|
4659
|
+
const t = Ee.axios || {}, n = z(t, e || {}), o = Ve.create({
|
|
4807
4660
|
...n
|
|
4808
4661
|
// adapter: (c) => cacheAdapter(c, defaultAxios)
|
|
4809
4662
|
});
|
|
4810
|
-
return
|
|
4663
|
+
return bi.forEach((l) => {
|
|
4811
4664
|
o.interceptors.request.use(l.request.onFulfilled, l.request.onRejected), o.interceptors.response.use(l.response.onFulfilled, l.response.onRejected);
|
|
4812
4665
|
}), o;
|
|
4813
4666
|
}
|
|
4814
|
-
const
|
|
4667
|
+
const yi = We(), _i = {
|
|
4815
4668
|
beforeMount(e, t) {
|
|
4816
4669
|
e.clickOutsideEvent = function(n) {
|
|
4817
4670
|
e === n.target || e.contains(n.target) || t.value(n, e);
|
|
@@ -4820,90 +4673,102 @@ const Ht = tt(), ka = {
|
|
|
4820
4673
|
unmounted(e) {
|
|
4821
4674
|
document.body.removeEventListener("click", e.clickOutsideEvent);
|
|
4822
4675
|
}
|
|
4823
|
-
},
|
|
4676
|
+
}, Y = oo(), vi = {
|
|
4824
4677
|
mounted: (e, t) => {
|
|
4825
4678
|
e !== null && (t.value, e.oncontextmenu = (n) => {
|
|
4826
|
-
n.preventDefault(), n.stopPropagation(), n.cancelBubble = !0, t.value &&
|
|
4679
|
+
n.preventDefault(), n.stopPropagation(), n.cancelBubble = !0, t.value && Y.emit("right-click", { event: n, data: t.value });
|
|
4827
4680
|
});
|
|
4828
4681
|
}
|
|
4829
|
-
},
|
|
4682
|
+
}, gi = {
|
|
4830
4683
|
mounted(e) {
|
|
4831
4684
|
}
|
|
4832
4685
|
};
|
|
4833
|
-
function
|
|
4686
|
+
function ct(e, t) {
|
|
4834
4687
|
let n = e[`offset${t}`], o = e.offsetParent;
|
|
4835
4688
|
for (; o; )
|
|
4836
4689
|
n += o[`offset${t}`], o = o.offsetParent;
|
|
4837
4690
|
return n;
|
|
4838
4691
|
}
|
|
4839
|
-
const
|
|
4692
|
+
const ki = {
|
|
4840
4693
|
mounted: (e, t) => {
|
|
4841
4694
|
if (e === null || !t.value.dev)
|
|
4842
4695
|
return;
|
|
4843
4696
|
let n = e;
|
|
4844
4697
|
if (t.value.parent)
|
|
4845
|
-
for (let
|
|
4698
|
+
for (let d = 0; d < t.value.parent; d++)
|
|
4846
4699
|
n.parentElement && (n = n.parentElement);
|
|
4847
4700
|
n.classList.add("devtool-hover");
|
|
4848
4701
|
const o = document.createElement("i");
|
|
4849
4702
|
o.className = "devtool-item-wrapper", n.onmouseover = () => {
|
|
4850
|
-
o.style.height = n.offsetHeight + 30 + "px", o.style.width = n.offsetWidth + 30 + "px", o.style.top =
|
|
4703
|
+
o.style.height = n.offsetHeight + 30 + "px", o.style.width = n.offsetWidth + 30 + "px", o.style.top = ct(n, "Top") - 15 + "px", o.style.left = ct(n, "Left") - 15 + "px";
|
|
4851
4704
|
};
|
|
4852
4705
|
const l = document.createElement("span");
|
|
4853
4706
|
l.className = "dev-action-edit", l.title = "编辑";
|
|
4854
4707
|
const s = document.createElement("i");
|
|
4855
|
-
s.className = "iconfont ra-editor1", l.appendChild(s), l.onclick = (
|
|
4856
|
-
|
|
4708
|
+
s.className = "iconfont ra-editor1", l.appendChild(s), l.onclick = (d) => {
|
|
4709
|
+
Y.emit("dev-action", { event: d, data: { type: "edit", devId: t.value.devId } });
|
|
4857
4710
|
}, o.appendChild(l);
|
|
4858
|
-
const
|
|
4859
|
-
|
|
4860
|
-
const
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
}, o.appendChild(
|
|
4711
|
+
const i = document.createElement("span");
|
|
4712
|
+
i.className = "dev-action-del", i.title = "删除";
|
|
4713
|
+
const c = document.createElement("i");
|
|
4714
|
+
c.className = "iconfont ra-cut", i.appendChild(c), i.onclick = (d) => {
|
|
4715
|
+
Y.emit("dev-action", { event: d, data: { type: "del", devId: t.value.devId } });
|
|
4716
|
+
}, o.appendChild(i), n.insertBefore(o, n.firstChild);
|
|
4864
4717
|
}
|
|
4865
|
-
},
|
|
4718
|
+
}, wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4866
4719
|
__proto__: null,
|
|
4867
|
-
devtool:
|
|
4868
|
-
outClick:
|
|
4869
|
-
resize:
|
|
4870
|
-
rightClick:
|
|
4720
|
+
devtool: ki,
|
|
4721
|
+
outClick: _i,
|
|
4722
|
+
resize: gi,
|
|
4723
|
+
rightClick: vi
|
|
4871
4724
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4872
|
-
let
|
|
4873
|
-
|
|
4874
|
-
|
|
4725
|
+
let ye;
|
|
4726
|
+
const Si = (e) => {
|
|
4727
|
+
const t = typeof e.name == "string" ? e.name : void 0;
|
|
4728
|
+
return t && W.hasRoute(t) ? !0 : W.getRoutes().some((n) => n.path === e.path);
|
|
4729
|
+
};
|
|
4730
|
+
function La(e) {
|
|
4731
|
+
return e ? We(z(Ee.axios, e)) : ye;
|
|
4875
4732
|
}
|
|
4876
|
-
function
|
|
4877
|
-
const t =
|
|
4878
|
-
l.unshift(o), l.forEach((
|
|
4879
|
-
|
|
4880
|
-
}), t?.mock &&
|
|
4881
|
-
const s =
|
|
4882
|
-
|
|
4883
|
-
"X-Token":
|
|
4884
|
-
})),
|
|
4733
|
+
function Ma(e) {
|
|
4734
|
+
const t = z(Ee, e), n = dn(go), o = Ri(t), l = t.plugins || [];
|
|
4735
|
+
l.unshift(o), l.forEach((c) => {
|
|
4736
|
+
Bi(n, c);
|
|
4737
|
+
}), t?.mock && Io(), ye = We(t.axios), bo(n);
|
|
4738
|
+
const s = X(P), i = U(P);
|
|
4739
|
+
co(ye), i.updateSettings(e?.settings || {}), s.setBaseAPI(t?.axios.baseURL), n.config.globalProperties.$http = ye, n.config.globalProperties.$router = W, window.App = n, window.OmsOptions = t, to(() => ({
|
|
4740
|
+
"X-Token": me()
|
|
4741
|
+
})), W.isReady().then(() => n.mount("#app"));
|
|
4885
4742
|
}
|
|
4886
|
-
function
|
|
4743
|
+
function xi(e, t = {}) {
|
|
4887
4744
|
Object.keys(t).forEach((n) => {
|
|
4888
4745
|
e.component(n, t[n]);
|
|
4889
4746
|
});
|
|
4890
4747
|
}
|
|
4891
|
-
function
|
|
4892
|
-
e.
|
|
4893
|
-
|
|
4894
|
-
|
|
4748
|
+
function Ei(e = []) {
|
|
4749
|
+
if (!e.length)
|
|
4750
|
+
return;
|
|
4751
|
+
const t = j(P);
|
|
4752
|
+
t.addRawCustomRoutes(e);
|
|
4753
|
+
const n = zt(me());
|
|
4754
|
+
if (!n.length)
|
|
4755
|
+
return;
|
|
4756
|
+
const o = ge(t.rawCustomRouter, n);
|
|
4757
|
+
o.forEach((l) => {
|
|
4758
|
+
Si(l) || W.addRoute(l);
|
|
4759
|
+
}), t.setCustomRoutes(o);
|
|
4895
4760
|
}
|
|
4896
|
-
function
|
|
4761
|
+
function Ii(e, t) {
|
|
4897
4762
|
t.forEach((n) => {
|
|
4898
|
-
|
|
4763
|
+
En(n) && (n = [n]), e.use(...n);
|
|
4899
4764
|
});
|
|
4900
4765
|
}
|
|
4901
|
-
function
|
|
4766
|
+
function Ci(e, t = {}) {
|
|
4902
4767
|
Object.keys(t).forEach((n) => {
|
|
4903
4768
|
e.directive(n, t[n]);
|
|
4904
4769
|
});
|
|
4905
4770
|
}
|
|
4906
|
-
function
|
|
4771
|
+
function Ti(e = {}) {
|
|
4907
4772
|
const t = ["app", "settings", "user"];
|
|
4908
4773
|
Object.keys(e).forEach((n) => {
|
|
4909
4774
|
if (t.indexOf(n) !== -1) {
|
|
@@ -4913,50 +4778,50 @@ function Oa(e = {}) {
|
|
|
4913
4778
|
console.warn("[store] plugin storeModules are not supported under Pinia. Ignored:", n);
|
|
4914
4779
|
});
|
|
4915
4780
|
}
|
|
4916
|
-
function
|
|
4917
|
-
|
|
4781
|
+
function Bi(e, t) {
|
|
4782
|
+
xi(e, t.components || {}), Ei(t.routes || []), Ii(e, t.use || []), Ci(e, t.directives || {}), Ti(t.storeModules || {}), At(t.mockApis || []);
|
|
4918
4783
|
}
|
|
4919
|
-
function
|
|
4784
|
+
function Ri(e) {
|
|
4920
4785
|
return {
|
|
4921
|
-
components: { VIcon:
|
|
4922
|
-
directives:
|
|
4786
|
+
components: { VIcon: no },
|
|
4787
|
+
directives: wi,
|
|
4923
4788
|
use: [
|
|
4924
|
-
|
|
4925
|
-
[
|
|
4789
|
+
W,
|
|
4790
|
+
[In, { locale: yt, ...e.settings?.ElementPlus }]
|
|
4926
4791
|
]
|
|
4927
4792
|
};
|
|
4928
4793
|
}
|
|
4929
4794
|
export {
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4795
|
+
Ut as BaseSso,
|
|
4796
|
+
Pe as Container,
|
|
4797
|
+
Aa as DingTalk,
|
|
4798
|
+
$a as Github,
|
|
4799
|
+
jt as Layout,
|
|
4800
|
+
F as MenuType,
|
|
4801
|
+
Co as Message,
|
|
4802
|
+
lt as MessageBox,
|
|
4938
4803
|
J as PageType,
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4804
|
+
Cs as allSso,
|
|
4805
|
+
fo as appState,
|
|
4806
|
+
ho as builderSchemaState,
|
|
4807
|
+
Ma as createAdmin,
|
|
4808
|
+
Y as eventBus,
|
|
4809
|
+
Oo as getCmp,
|
|
4810
|
+
Re as getHttp,
|
|
4811
|
+
ye as http,
|
|
4812
|
+
We as instance,
|
|
4813
|
+
P as pinia,
|
|
4814
|
+
Pa as regViews,
|
|
4815
|
+
Oa as setCmp,
|
|
4816
|
+
co as setHttp,
|
|
4817
|
+
po as settings,
|
|
4818
|
+
bo as setupStore,
|
|
4819
|
+
ni as transRemoteModules,
|
|
4820
|
+
X as useAppStore,
|
|
4821
|
+
Ra as useBuilderSchemaStore,
|
|
4822
|
+
La as useHttp,
|
|
4823
|
+
U as useSettingsStore,
|
|
4824
|
+
j as useUserStore,
|
|
4825
|
+
tt as userState
|
|
4961
4826
|
};
|
|
4962
4827
|
//# sourceMappingURL=index.es.js.map
|