x-essential-lib 0.2.4 → 0.2.7
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.d.ts +209 -0
- package/dist/index.js +206 -187
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -133,3 +133,212 @@ export declare function onBeforeEach(
|
|
|
133
133
|
from: RouteLocationNormalized,
|
|
134
134
|
next: NavigationGuardNext
|
|
135
135
|
): void
|
|
136
|
+
|
|
137
|
+
export enum Permission {
|
|
138
|
+
//----------------------------------------------------------------------
|
|
139
|
+
// 应用
|
|
140
|
+
//----------------------------------------------------------------------
|
|
141
|
+
|
|
142
|
+
// 后端
|
|
143
|
+
|
|
144
|
+
list_app_group = 'list_app_group',
|
|
145
|
+
create_app_group = 'create_app_group',
|
|
146
|
+
delete_app_group = 'delete_app_group',
|
|
147
|
+
update_app_group = 'update_app_group',
|
|
148
|
+
arrange_app_group = 'arrange_app_group',
|
|
149
|
+
|
|
150
|
+
list_app = 'list_group',
|
|
151
|
+
get_app = 'get_app',
|
|
152
|
+
create_app = 'create_app',
|
|
153
|
+
delete_app = 'delete_app',
|
|
154
|
+
update_app = 'update_app',
|
|
155
|
+
|
|
156
|
+
list_app_release = 'list_app_release',
|
|
157
|
+
get_app_release = 'get_app_release',
|
|
158
|
+
create_app_release = 'create_app_release',
|
|
159
|
+
delete_app_release = 'delete_app_release',
|
|
160
|
+
deploy_app_release = 'deploy_app_release',
|
|
161
|
+
|
|
162
|
+
// 前端
|
|
163
|
+
|
|
164
|
+
open_app_layer = 'open_app_layer',
|
|
165
|
+
open_app = 'open_app',
|
|
166
|
+
|
|
167
|
+
//----------------------------------------------------------------------
|
|
168
|
+
// 计算
|
|
169
|
+
//----------------------------------------------------------------------
|
|
170
|
+
|
|
171
|
+
// 后端
|
|
172
|
+
|
|
173
|
+
list_calc_space = 'list_calc_space',
|
|
174
|
+
get_calc_space = 'get_calc_space',
|
|
175
|
+
create_calc_space = 'create_calc_space',
|
|
176
|
+
delete_calc_space = 'delete_calc_space',
|
|
177
|
+
update_calc_space = 'update_calc_space',
|
|
178
|
+
arrange_calc_space = 'arrange_calc_space',
|
|
179
|
+
|
|
180
|
+
list_func_group = 'list_func_group',
|
|
181
|
+
create_func_group = 'create_func_group',
|
|
182
|
+
delete_func_group = 'delete_func_group',
|
|
183
|
+
update_func_group = 'update_func_group',
|
|
184
|
+
arrange_func_group = 'arrange_func_group',
|
|
185
|
+
|
|
186
|
+
list_func = 'list_func',
|
|
187
|
+
get_func = 'get_func',
|
|
188
|
+
create_func = 'create_func',
|
|
189
|
+
delete_func = 'delete_func',
|
|
190
|
+
update_func = 'update_func',
|
|
191
|
+
debug_func = 'debug_func',
|
|
192
|
+
call_func = 'call_func',
|
|
193
|
+
|
|
194
|
+
list_func_release = 'list_func_release',
|
|
195
|
+
get_func_release = 'get_func_release',
|
|
196
|
+
create_func_release = 'create_func_release',
|
|
197
|
+
delete_func_release = 'delete_func_release',
|
|
198
|
+
deploy_func_release = 'deploy_func_release',
|
|
199
|
+
|
|
200
|
+
list_flow_group = 'list_flow_group',
|
|
201
|
+
create_flow_group = 'create_flow_group',
|
|
202
|
+
delete_flow_group = 'delete_flow_group',
|
|
203
|
+
update_flow_group = 'update_flow_group',
|
|
204
|
+
arrange_flow_group = 'arrange_flow_group',
|
|
205
|
+
|
|
206
|
+
list_flow = 'list_flow',
|
|
207
|
+
get_flow = 'get_flow',
|
|
208
|
+
create_flow = 'create_flow',
|
|
209
|
+
delete_flow = 'delete_flow',
|
|
210
|
+
update_flow = 'update_flow',
|
|
211
|
+
call_flow = 'call_flow',
|
|
212
|
+
|
|
213
|
+
list_flow_release = 'list_flow_release',
|
|
214
|
+
get_flow_release = 'get_flow_release',
|
|
215
|
+
create_flow_release = 'create_flow_release',
|
|
216
|
+
delete_flow_release = 'delete_flow_release',
|
|
217
|
+
deploy_flow_release = 'deploy_flow_release',
|
|
218
|
+
|
|
219
|
+
list_task = 'list_task',
|
|
220
|
+
get_task = 'get_task',
|
|
221
|
+
create_task = 'create_task',
|
|
222
|
+
delete_task = 'delete_task',
|
|
223
|
+
update_task = 'update_task',
|
|
224
|
+
call_task = 'call_task',
|
|
225
|
+
|
|
226
|
+
// 前端
|
|
227
|
+
|
|
228
|
+
open_calc_layer = 'open_calc_layer',
|
|
229
|
+
|
|
230
|
+
//----------------------------------------------------------------------
|
|
231
|
+
// 数据
|
|
232
|
+
//----------------------------------------------------------------------
|
|
233
|
+
|
|
234
|
+
list_db_space = 'list_db_space',
|
|
235
|
+
get_db_space = 'get_db_space',
|
|
236
|
+
create_db_space = 'create_db_space',
|
|
237
|
+
delete_db_space = 'delete_db_space',
|
|
238
|
+
update_db_space = 'update_db_space',
|
|
239
|
+
arrange_db_space = 'arrange_db_space',
|
|
240
|
+
|
|
241
|
+
list_model_group = 'list_model_group',
|
|
242
|
+
create_model_group = 'create_model_group',
|
|
243
|
+
delete_model_group = 'delete_model_group',
|
|
244
|
+
update_model_group = 'update_model_group',
|
|
245
|
+
arrange_model_group = 'arrange_model_group',
|
|
246
|
+
|
|
247
|
+
list_model = 'list_model',
|
|
248
|
+
get_model = 'get_model',
|
|
249
|
+
create_model = 'create_model',
|
|
250
|
+
delete_model = 'delete_model',
|
|
251
|
+
update_model = 'update_model',
|
|
252
|
+
|
|
253
|
+
get_model_data = 'get_model_data',
|
|
254
|
+
create_model_data = 'create_model_data',
|
|
255
|
+
delete_model_data = 'delete_model_data',
|
|
256
|
+
update_model_data = 'update_model_data',
|
|
257
|
+
|
|
258
|
+
get_graph = 'get_graph',
|
|
259
|
+
update_graph = 'update_graph',
|
|
260
|
+
|
|
261
|
+
list_change = 'list_change',
|
|
262
|
+
apply_change = 'apply_change',
|
|
263
|
+
|
|
264
|
+
// 前端
|
|
265
|
+
|
|
266
|
+
open_data_layer = 'open_data_layer',
|
|
267
|
+
|
|
268
|
+
//----------------------------------------------------------------------
|
|
269
|
+
// 资料
|
|
270
|
+
//----------------------------------------------------------------------
|
|
271
|
+
|
|
272
|
+
// 后端
|
|
273
|
+
|
|
274
|
+
list_asset_space = 'list_asset_space',
|
|
275
|
+
get_asset_space = 'get_asset_space',
|
|
276
|
+
create_asset_space = 'create_asset_space',
|
|
277
|
+
delete_asset_space = 'delete_asset_space',
|
|
278
|
+
update_asset_space = 'update_asset_space',
|
|
279
|
+
arrange_asset_space = 'arrange_asset_space',
|
|
280
|
+
|
|
281
|
+
list_dir = 'list_dir',
|
|
282
|
+
create_dir = 'create_dir',
|
|
283
|
+
delete_dir = 'delete_dir',
|
|
284
|
+
update_dir = 'update_dir',
|
|
285
|
+
move_dir = 'move_dir',
|
|
286
|
+
|
|
287
|
+
list_asset = 'list_asset',
|
|
288
|
+
get_asset = 'get_asset',
|
|
289
|
+
create_asset = 'create_asset',
|
|
290
|
+
delete_asset = 'delete_asset',
|
|
291
|
+
update_asset = 'update_asset',
|
|
292
|
+
move_asset = 'move_asset',
|
|
293
|
+
|
|
294
|
+
// 后端
|
|
295
|
+
|
|
296
|
+
open_asset_layer = 'open_asset_layer',
|
|
297
|
+
|
|
298
|
+
//----------------------------------------------------------------------
|
|
299
|
+
// 组织
|
|
300
|
+
//----------------------------------------------------------------------
|
|
301
|
+
|
|
302
|
+
// 后端
|
|
303
|
+
|
|
304
|
+
list_org_member = 'list_org_member',
|
|
305
|
+
add_org_member = 'add_org_member',
|
|
306
|
+
remove_org_member = 'remove_org_member',
|
|
307
|
+
update_org_member = 'update_org_member',
|
|
308
|
+
|
|
309
|
+
list_org_role = 'list_org_role',
|
|
310
|
+
get_org_role = 'get_org_role',
|
|
311
|
+
create_org_role = 'create_org_role',
|
|
312
|
+
delete_org_role = 'delete_org_role',
|
|
313
|
+
update_org_role = 'update_org_role',
|
|
314
|
+
arrange_org_role = 'arrange_org_role',
|
|
315
|
+
|
|
316
|
+
get_org_structure = 'get_org_structure',
|
|
317
|
+
update_org_structure = 'update_org_structure',
|
|
318
|
+
|
|
319
|
+
//----------------------------------------------------------------------
|
|
320
|
+
// 过滤
|
|
321
|
+
//----------------------------------------------------------------------
|
|
322
|
+
|
|
323
|
+
filter_model = 'filter_model'
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
type InstanceTree = {
|
|
327
|
+
[key: string]: InstanceTree
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
type PermissionObject = {
|
|
331
|
+
includes: InstanceTree
|
|
332
|
+
excludes: InstanceTree
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
type PermissionObjects = {
|
|
336
|
+
[key: string]: PermissionObject
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
export declare function setPermissionObject(permissonObjects: PermissionObjects)
|
|
340
|
+
|
|
341
|
+
export declare function verifyPermission(
|
|
342
|
+
permission: Permission,
|
|
343
|
+
instance: string | undefined
|
|
344
|
+
): boolean
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.x-cont[data-v-a8f3d91f]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-a8f3d91f]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-a8f3d91f]{transform-origin:20px 20px;animation:lds-spinner-a8f3d91f 1.2s linear infinite}.lds-spinner div[data-v-a8f3d91f]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-a8f3d91f]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-a8f3d91f]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-a8f3d91f]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-a8f3d91f]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-a8f3d91f]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-a8f3d91f]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-a8f3d91f]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-a8f3d91f]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-a8f3d91f]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-a8f3d91f]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-a8f3d91f{0%{opacity:1}to{opacity:0}}.x-cont[data-v-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { VAlert as
|
|
3
|
-
import { defineComponent as S, useModel as L, ref as _, computed as d, onMounted as
|
|
4
|
-
import { useLocale as H, useTheme as X, useDisplay as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
2
|
+
import { VAlert as fe, VBtn as me, VCard as ve, VCardActions as ge, VCardText as _e, VCardTitle as he, VDialog as xe, VForm as ye, VTextField as we } from "vuetify/lib/components/index.mjs";
|
|
3
|
+
import { defineComponent as S, useModel as L, ref as _, computed as d, onMounted as j, onBeforeUnmount as W, watch as N, resolveComponent as m, openBlock as C, createBlock as M, withKeys as U, withModifiers as I, withCtx as v, createVNode as h, createTextVNode as b, toDisplayString as k, createElementBlock as K, normalizeStyle as ke, pushScopeId as be, popScopeId as Ce, createElementVNode as g, reactive as Ve, Fragment as qe, renderList as De, unref as Se, inject as Re } from "vue";
|
|
4
|
+
import { useLocale as H, useTheme as X, useDisplay as Te } from "vuetify/lib/framework.mjs";
|
|
5
|
+
import Oe from "axios";
|
|
6
|
+
function Pe(e) {
|
|
7
7
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(o, t) {
|
|
8
8
|
var n = e.get(o);
|
|
9
9
|
n ? n.push(t) : e.set(o, [t]);
|
|
@@ -19,8 +19,8 @@ function Ie(e) {
|
|
|
19
19
|
});
|
|
20
20
|
} };
|
|
21
21
|
}
|
|
22
|
-
const i =
|
|
23
|
-
async function
|
|
22
|
+
const i = Pe();
|
|
23
|
+
async function ut(e) {
|
|
24
24
|
return new Promise((o) => {
|
|
25
25
|
setTimeout(o, e);
|
|
26
26
|
});
|
|
@@ -28,13 +28,13 @@ async function ct(e) {
|
|
|
28
28
|
async function F(e, o, t) {
|
|
29
29
|
const n = Date.now();
|
|
30
30
|
return new Promise((r) => {
|
|
31
|
-
const
|
|
32
|
-
e() ? r(!0) : o && Date.now() - n > o ? r(!1) : setTimeout(
|
|
31
|
+
const a = async () => {
|
|
32
|
+
e() ? r(!0) : o && Date.now() - n > o ? r(!1) : setTimeout(a, t ?? 30);
|
|
33
33
|
};
|
|
34
|
-
|
|
34
|
+
a();
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
const
|
|
37
|
+
const Ie = /* @__PURE__ */ S({
|
|
38
38
|
__name: "index",
|
|
39
39
|
props: {
|
|
40
40
|
modelValue: { type: Boolean },
|
|
@@ -42,41 +42,41 @@ const Pe = /* @__PURE__ */ S({
|
|
|
42
42
|
},
|
|
43
43
|
emits: ["update:modelValue"],
|
|
44
44
|
setup(e) {
|
|
45
|
-
const o = H(), t = L(e, "modelValue"), n = _(""), r = _(""),
|
|
45
|
+
const o = H(), t = L(e, "modelValue"), n = _(""), r = _(""), a = _(), l = _(), s = d(() => {
|
|
46
46
|
var u;
|
|
47
|
-
return ((u =
|
|
47
|
+
return ((u = a.value) == null ? void 0 : u.color) ?? "primary";
|
|
48
48
|
}), f = d(() => {
|
|
49
49
|
var u;
|
|
50
|
-
return ((u =
|
|
50
|
+
return ((u = a.value) == null ? void 0 : u.text) ?? o.t("cancel");
|
|
51
51
|
}), p = d(() => {
|
|
52
52
|
var u;
|
|
53
|
-
return ((u =
|
|
53
|
+
return ((u = l.value) == null ? void 0 : u.color) ?? "primary";
|
|
54
54
|
}), V = d(() => {
|
|
55
55
|
var u;
|
|
56
|
-
return ((u =
|
|
56
|
+
return ((u = l.value) == null ? void 0 : u.text) ?? o.t("confirm");
|
|
57
57
|
});
|
|
58
58
|
let R = 0, q = !1;
|
|
59
|
-
const
|
|
60
|
-
n.value = u.title, r.value = u.text,
|
|
59
|
+
const $ = (u) => {
|
|
60
|
+
n.value = u.title, r.value = u.text, a.value = u.cancel, l.value = u.confirm, R = u.seq, q = !1, t.value = !0;
|
|
61
61
|
};
|
|
62
|
-
|
|
63
|
-
i.on("confirmDlg",
|
|
62
|
+
j(() => {
|
|
63
|
+
i.on("confirmDlg", $);
|
|
64
64
|
}), W(() => {
|
|
65
|
-
i.off("confirmDlg",
|
|
65
|
+
i.off("confirmDlg", $);
|
|
66
66
|
});
|
|
67
|
-
const
|
|
67
|
+
const A = () => {
|
|
68
68
|
t.value = !1, q || (i.emit("confirmDlgResult" + R, !0), q = !0);
|
|
69
69
|
};
|
|
70
70
|
return N(t, (u) => {
|
|
71
71
|
!u && !q && (i.emit("confirmDlgResult" + R, !1), q = !0);
|
|
72
72
|
}), (u, y) => {
|
|
73
|
-
const D = m("v-card-title"),
|
|
74
|
-
return C(),
|
|
73
|
+
const D = m("v-card-title"), B = m("v-card-text"), T = m("v-btn"), c = m("v-card-actions"), x = m("v-card"), z = m("v-dialog");
|
|
74
|
+
return C(), M(z, {
|
|
75
75
|
modelValue: t.value,
|
|
76
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
76
|
+
"onUpdate:modelValue": y[1] || (y[1] = (O) => t.value = O),
|
|
77
77
|
onKeydown: [
|
|
78
|
-
y[2] || (y[2] = U(
|
|
79
|
-
U(
|
|
78
|
+
y[2] || (y[2] = U(I((O) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
79
|
+
U(I(A, ["stop", "prevent"]), ["enter"])
|
|
80
80
|
],
|
|
81
81
|
transition: "dialog-top-transition",
|
|
82
82
|
"max-width": "600px"
|
|
@@ -90,7 +90,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
90
90
|
]),
|
|
91
91
|
_: 1
|
|
92
92
|
}),
|
|
93
|
-
h(
|
|
93
|
+
h(B, null, {
|
|
94
94
|
default: v(() => [
|
|
95
95
|
b(k(r.value), 1)
|
|
96
96
|
]),
|
|
@@ -99,7 +99,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
99
99
|
h(c, { class: "d-flex justify-end" }, {
|
|
100
100
|
default: v(() => [
|
|
101
101
|
h(T, {
|
|
102
|
-
onClick: y[0] || (y[0] = (
|
|
102
|
+
onClick: y[0] || (y[0] = (O) => t.value = !1),
|
|
103
103
|
color: s.value,
|
|
104
104
|
variant: "text"
|
|
105
105
|
}, {
|
|
@@ -109,7 +109,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
109
109
|
_: 1
|
|
110
110
|
}, 8, ["color"]),
|
|
111
111
|
h(T, {
|
|
112
|
-
onClick:
|
|
112
|
+
onClick: A,
|
|
113
113
|
color: p.value,
|
|
114
114
|
variant: "text"
|
|
115
115
|
}, {
|
|
@@ -129,7 +129,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
129
129
|
}, 8, ["modelValue", "onKeydown"]);
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
132
|
+
}), je = (e) => (be("data-v-a8f3d91f"), e = e(), Ce(), e), Me = /* @__PURE__ */ je(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
|
|
133
133
|
/* @__PURE__ */ g("div"),
|
|
134
134
|
/* @__PURE__ */ g("div"),
|
|
135
135
|
/* @__PURE__ */ g("div"),
|
|
@@ -142,9 +142,9 @@ const Pe = /* @__PURE__ */ S({
|
|
|
142
142
|
/* @__PURE__ */ g("div"),
|
|
143
143
|
/* @__PURE__ */ g("div"),
|
|
144
144
|
/* @__PURE__ */ g("div")
|
|
145
|
-
], -1)),
|
|
146
|
-
|
|
147
|
-
],
|
|
145
|
+
], -1)), $e = [
|
|
146
|
+
Me
|
|
147
|
+
], Ae = /* @__PURE__ */ S({
|
|
148
148
|
__name: "index",
|
|
149
149
|
props: {
|
|
150
150
|
zIndex: {
|
|
@@ -157,17 +157,17 @@ const Pe = /* @__PURE__ */ S({
|
|
|
157
157
|
background: o.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
158
158
|
zIndex: t.zIndex
|
|
159
159
|
}));
|
|
160
|
-
return (r,
|
|
160
|
+
return (r, a) => (C(), K("div", {
|
|
161
161
|
class: "x-cont",
|
|
162
|
-
style:
|
|
163
|
-
},
|
|
162
|
+
style: ke(n.value)
|
|
163
|
+
}, $e, 4));
|
|
164
164
|
}
|
|
165
|
-
}),
|
|
165
|
+
}), ne = (e, o) => {
|
|
166
166
|
const t = e.__vccOpts || e;
|
|
167
167
|
for (const [n, r] of o)
|
|
168
168
|
t[n] = r;
|
|
169
169
|
return t;
|
|
170
|
-
},
|
|
170
|
+
}, Be = /* @__PURE__ */ ne(Ae, [["__scopeId", "data-v-a8f3d91f"]]), Ee = /* @__PURE__ */ S({
|
|
171
171
|
__name: "item",
|
|
172
172
|
props: {
|
|
173
173
|
id: {
|
|
@@ -189,38 +189,38 @@ const Pe = /* @__PURE__ */ S({
|
|
|
189
189
|
},
|
|
190
190
|
emits: ["timeout"],
|
|
191
191
|
setup(e, { emit: o }) {
|
|
192
|
-
const t = e, n = _(!0), r = o,
|
|
193
|
-
let
|
|
192
|
+
const t = e, n = _(!0), r = o, a = d(() => {
|
|
193
|
+
let l = "";
|
|
194
194
|
switch (t.type) {
|
|
195
195
|
case "error":
|
|
196
|
-
|
|
196
|
+
l = "cancel";
|
|
197
197
|
break;
|
|
198
198
|
case "info":
|
|
199
|
-
|
|
199
|
+
l = "info";
|
|
200
200
|
break;
|
|
201
201
|
case "success":
|
|
202
|
-
|
|
202
|
+
l = "check-circle";
|
|
203
203
|
break;
|
|
204
204
|
case "warning":
|
|
205
|
-
|
|
205
|
+
l = "error";
|
|
206
206
|
break;
|
|
207
207
|
}
|
|
208
|
-
return
|
|
208
|
+
return l;
|
|
209
209
|
});
|
|
210
|
-
return
|
|
210
|
+
return j(() => {
|
|
211
211
|
setTimeout(() => {
|
|
212
212
|
r("timeout", t.id);
|
|
213
213
|
}, t.timeout);
|
|
214
|
-
}), N(n, (
|
|
215
|
-
|
|
216
|
-
}), (
|
|
214
|
+
}), N(n, (l) => {
|
|
215
|
+
l || r("timeout", t.id);
|
|
216
|
+
}), (l, s) => {
|
|
217
217
|
const f = m("v-alert");
|
|
218
|
-
return C(),
|
|
218
|
+
return C(), M(f, {
|
|
219
219
|
modelValue: n.value,
|
|
220
220
|
"onUpdate:modelValue": s[0] || (s[0] = (p) => n.value = p),
|
|
221
221
|
class: "mt-2",
|
|
222
222
|
type: e.type,
|
|
223
|
-
icon:
|
|
223
|
+
icon: a.value,
|
|
224
224
|
text: e.text,
|
|
225
225
|
"max-width": "90%",
|
|
226
226
|
width: "500px",
|
|
@@ -230,34 +230,34 @@ const Pe = /* @__PURE__ */ S({
|
|
|
230
230
|
}, null, 8, ["modelValue", "type", "icon", "text"]);
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
}),
|
|
233
|
+
}), Ue = /* @__PURE__ */ S({
|
|
234
234
|
__name: "index",
|
|
235
235
|
setup(e) {
|
|
236
|
-
const o =
|
|
237
|
-
|
|
236
|
+
const o = Ve({ items: [] });
|
|
237
|
+
j(() => {
|
|
238
238
|
i.on("message", t);
|
|
239
239
|
}), W(() => {
|
|
240
240
|
i.off("message", t);
|
|
241
241
|
});
|
|
242
242
|
const t = (s) => {
|
|
243
|
-
|
|
243
|
+
a(s.type, s.text, s.timeout);
|
|
244
244
|
}, n = (s) => {
|
|
245
|
-
|
|
245
|
+
l(s);
|
|
246
246
|
};
|
|
247
247
|
let r = 0;
|
|
248
|
-
const
|
|
248
|
+
const a = (s, f, p) => {
|
|
249
249
|
const V = r++;
|
|
250
250
|
o.items.push({ id: V, type: s, text: f, timeout: p });
|
|
251
|
-
},
|
|
251
|
+
}, l = (s) => {
|
|
252
252
|
const f = o.items.findIndex((p) => p.id === s);
|
|
253
253
|
f >= 0 && o.items.splice(f, 1);
|
|
254
254
|
};
|
|
255
255
|
return (s, f) => (C(), K("div", {
|
|
256
|
-
onClick: f[0] || (f[0] =
|
|
256
|
+
onClick: f[0] || (f[0] = I(() => {
|
|
257
257
|
}, ["stop"])),
|
|
258
258
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
259
259
|
}, [
|
|
260
|
-
(C(!0), K(
|
|
260
|
+
(C(!0), K(qe, null, De(o.items, (p) => (C(), M(Ee, {
|
|
261
261
|
onTimeout: n,
|
|
262
262
|
id: p.id,
|
|
263
263
|
type: p.type,
|
|
@@ -267,7 +267,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
267
267
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
268
268
|
]));
|
|
269
269
|
}
|
|
270
|
-
}),
|
|
270
|
+
}), We = /* @__PURE__ */ ne(Ue, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ S({
|
|
271
271
|
__name: "index",
|
|
272
272
|
props: {
|
|
273
273
|
modelValue: { type: Boolean },
|
|
@@ -275,28 +275,28 @@ const Pe = /* @__PURE__ */ S({
|
|
|
275
275
|
},
|
|
276
276
|
emits: ["update:modelValue"],
|
|
277
277
|
setup(e) {
|
|
278
|
-
const o = H(), t = L(e, "modelValue"), n = _(""), r = _(""),
|
|
278
|
+
const o = H(), t = L(e, "modelValue"), n = _(""), r = _(""), a = _(), l = _(), s = _(), f = _(""), p = _(), V = _(), R = d(() => {
|
|
279
279
|
var c;
|
|
280
280
|
return ((c = p.value) == null ? void 0 : c.color) ?? "primary";
|
|
281
281
|
}), q = d(() => {
|
|
282
282
|
var c;
|
|
283
283
|
return ((c = p.value) == null ? void 0 : c.text) ?? o.t("cancel");
|
|
284
|
-
}),
|
|
284
|
+
}), $ = d(() => {
|
|
285
285
|
var c;
|
|
286
286
|
return ((c = V.value) == null ? void 0 : c.color) ?? "primary";
|
|
287
|
-
}),
|
|
287
|
+
}), A = d(() => {
|
|
288
288
|
var c;
|
|
289
289
|
return ((c = V.value) == null ? void 0 : c.text) ?? o.t("confirm");
|
|
290
290
|
}), u = _();
|
|
291
291
|
let y = 0, D = !1;
|
|
292
|
-
const
|
|
292
|
+
const B = async (c) => {
|
|
293
293
|
var x;
|
|
294
|
-
n.value = c.title, r.value = c.text,
|
|
294
|
+
n.value = c.title, r.value = c.text, a.value = c.label, l.value = c.placeholder, s.value = c.rules, f.value = c.value, p.value = c.cancel, V.value = c.confirm, y = c.seq, D = !1, t.value = !0, await F(() => u.value !== void 0, 1e3), (x = u.value) == null || x.focus();
|
|
295
295
|
};
|
|
296
|
-
|
|
297
|
-
i.on("promptDlg",
|
|
296
|
+
j(() => {
|
|
297
|
+
i.on("promptDlg", B);
|
|
298
298
|
}), W(() => {
|
|
299
|
-
i.off("promptDlg",
|
|
299
|
+
i.off("promptDlg", B);
|
|
300
300
|
});
|
|
301
301
|
const T = () => {
|
|
302
302
|
t.value = !1, D || (i.emit("promptDlgResult" + y, f.value ?? ""), D = !0);
|
|
@@ -304,19 +304,19 @@ const Pe = /* @__PURE__ */ S({
|
|
|
304
304
|
return N(t, (c) => {
|
|
305
305
|
!c && !D && (i.emit("promptDlgResult" + y, void 0), D = !0);
|
|
306
306
|
}), (c, x) => {
|
|
307
|
-
const z = m("v-card-title"),
|
|
308
|
-
return C(),
|
|
307
|
+
const z = m("v-card-title"), O = m("v-card-text"), ce = m("v-text-field"), ie = m("v-form"), J = m("v-btn"), ue = m("v-card-actions"), de = m("v-card"), pe = m("v-dialog");
|
|
308
|
+
return C(), M(pe, {
|
|
309
309
|
modelValue: t.value,
|
|
310
310
|
"onUpdate:modelValue": x[2] || (x[2] = (P) => t.value = P),
|
|
311
311
|
onKeydown: [
|
|
312
|
-
x[3] || (x[3] = U(
|
|
313
|
-
U(
|
|
312
|
+
x[3] || (x[3] = U(I((P) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
313
|
+
U(I(T, ["stop", "prevent"]), ["enter"])
|
|
314
314
|
],
|
|
315
315
|
transition: "dialog-top-transition",
|
|
316
316
|
"max-width": "600px"
|
|
317
317
|
}, {
|
|
318
318
|
default: v(() => [
|
|
319
|
-
h(
|
|
319
|
+
h(de, null, {
|
|
320
320
|
default: v(() => [
|
|
321
321
|
h(z, null, {
|
|
322
322
|
default: v(() => [
|
|
@@ -324,19 +324,19 @@ const Pe = /* @__PURE__ */ S({
|
|
|
324
324
|
]),
|
|
325
325
|
_: 1
|
|
326
326
|
}),
|
|
327
|
-
h(
|
|
327
|
+
h(O, null, {
|
|
328
328
|
default: v(() => [
|
|
329
329
|
b(k(r.value), 1)
|
|
330
330
|
]),
|
|
331
331
|
_: 1
|
|
332
332
|
}),
|
|
333
|
-
h(
|
|
333
|
+
h(ie, { class: "mx-3" }, {
|
|
334
334
|
default: v(() => [
|
|
335
|
-
h(
|
|
335
|
+
h(ce, {
|
|
336
336
|
modelValue: f.value,
|
|
337
337
|
"onUpdate:modelValue": x[0] || (x[0] = (P) => f.value = P),
|
|
338
|
-
label:
|
|
339
|
-
placeholder:
|
|
338
|
+
label: a.value,
|
|
339
|
+
placeholder: l.value,
|
|
340
340
|
rules: s.value,
|
|
341
341
|
ref_key: "target",
|
|
342
342
|
ref: u
|
|
@@ -344,7 +344,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
344
344
|
]),
|
|
345
345
|
_: 1
|
|
346
346
|
}),
|
|
347
|
-
h(
|
|
347
|
+
h(ue, { class: "d-flex justify-end" }, {
|
|
348
348
|
default: v(() => [
|
|
349
349
|
h(J, {
|
|
350
350
|
onClick: x[1] || (x[1] = (P) => t.value = !1),
|
|
@@ -358,11 +358,11 @@ const Pe = /* @__PURE__ */ S({
|
|
|
358
358
|
}, 8, ["color"]),
|
|
359
359
|
h(J, {
|
|
360
360
|
onClick: T,
|
|
361
|
-
color:
|
|
361
|
+
color: $.value,
|
|
362
362
|
variant: "text"
|
|
363
363
|
}, {
|
|
364
364
|
default: v(() => [
|
|
365
|
-
b(k(
|
|
365
|
+
b(k(A.value), 1)
|
|
366
366
|
]),
|
|
367
367
|
_: 1
|
|
368
368
|
}, 8, ["color"])
|
|
@@ -377,7 +377,7 @@ const Pe = /* @__PURE__ */ S({
|
|
|
377
377
|
}, 8, ["modelValue", "onKeydown"]);
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
|
-
}),
|
|
380
|
+
}), Ke = { class: "mx-auto my-auto" }, Le = { class: "d-flex align-center justify-center w-100 h-100" }, Ne = /* @__PURE__ */ S({
|
|
381
381
|
__name: "index",
|
|
382
382
|
props: {
|
|
383
383
|
modelValue: { type: Boolean },
|
|
@@ -390,29 +390,29 @@ const Pe = /* @__PURE__ */ S({
|
|
|
390
390
|
}, r = () => {
|
|
391
391
|
t.value = !1;
|
|
392
392
|
};
|
|
393
|
-
return
|
|
393
|
+
return j(() => {
|
|
394
394
|
i.on("openWaitDlg", n), i.on("closeWaitDlg", r);
|
|
395
395
|
}), W(() => {
|
|
396
396
|
i.off("openWaitDlg", n), i.off("closeWaitDlg", r);
|
|
397
|
-
}), (
|
|
397
|
+
}), (a, l) => {
|
|
398
398
|
const s = m("v-card"), f = m("v-dialog");
|
|
399
|
-
return C(),
|
|
399
|
+
return C(), M(f, {
|
|
400
400
|
modelValue: t.value,
|
|
401
|
-
"onUpdate:modelValue":
|
|
401
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => t.value = p),
|
|
402
402
|
persistent: "",
|
|
403
403
|
"no-click-animation": "",
|
|
404
404
|
fullscreen: ""
|
|
405
405
|
}, {
|
|
406
406
|
default: v(() => [
|
|
407
|
-
g("div",
|
|
407
|
+
g("div", Ke, [
|
|
408
408
|
h(s, {
|
|
409
409
|
width: "300px",
|
|
410
410
|
height: "80px",
|
|
411
411
|
loading: ""
|
|
412
412
|
}, {
|
|
413
413
|
default: v(() => [
|
|
414
|
-
g("div",
|
|
415
|
-
g("span", null, k(
|
|
414
|
+
g("div", Le, [
|
|
415
|
+
g("span", null, k(Se(o).t("waitingResponse")), 1)
|
|
416
416
|
])
|
|
417
417
|
]),
|
|
418
418
|
_: 1
|
|
@@ -424,23 +424,23 @@ const Pe = /* @__PURE__ */ S({
|
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
});
|
|
427
|
-
function
|
|
428
|
-
const e = X(), o = d(() => e.global.current.value.colors.primary), t = d(() => e.global.current.value.colors.secondary), n = d(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), r = d(() => e.current.value.dark ? "#272727" : "#eeeeee"),
|
|
427
|
+
function dt() {
|
|
428
|
+
const e = X(), o = d(() => e.global.current.value.colors.primary), t = d(() => e.global.current.value.colors.secondary), n = d(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), r = d(() => e.current.value.dark ? "#272727" : "#eeeeee"), a = d(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = d(() => e.current.value.dark ? "#303030" : "#f6f6f6"), s = d(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
429
429
|
return {
|
|
430
430
|
primaryColor: o,
|
|
431
431
|
secondaryColor: t,
|
|
432
432
|
backgroundColor0: n,
|
|
433
433
|
backgroundColor1: r,
|
|
434
|
-
backgroundColor2:
|
|
435
|
-
highlightColor:
|
|
434
|
+
backgroundColor2: a,
|
|
435
|
+
highlightColor: l,
|
|
436
436
|
borderColor: s
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
function
|
|
440
|
-
const e = X(), { width: o } =
|
|
439
|
+
function pt() {
|
|
440
|
+
const e = X(), { width: o } = Te(), t = d(() => e.current.value.dark), n = d(() => !!window.cordova), r = d(() => o.value <= 1280 ? o.value + "px" : o.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
441
441
|
return { dark: t, sysBarAvail: n, compactWidth: r };
|
|
442
442
|
}
|
|
443
|
-
var
|
|
443
|
+
var He = {}, G;
|
|
444
444
|
(function(e) {
|
|
445
445
|
e.pop = "pop", e.push = "push";
|
|
446
446
|
})(G || (G = {}));
|
|
@@ -452,96 +452,96 @@ var Y;
|
|
|
452
452
|
(function(e) {
|
|
453
453
|
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
|
454
454
|
})(Y || (Y = {}));
|
|
455
|
-
const
|
|
456
|
-
function
|
|
457
|
-
return
|
|
455
|
+
const Xe = Symbol(He.NODE_ENV !== "production" ? "router" : "");
|
|
456
|
+
function Fe() {
|
|
457
|
+
return Re(Xe);
|
|
458
458
|
}
|
|
459
459
|
const E = require("js-cookie");
|
|
460
|
-
function
|
|
461
|
-
const o =
|
|
460
|
+
function ft(e) {
|
|
461
|
+
const o = Oe.create({
|
|
462
462
|
timeout: 6e3
|
|
463
463
|
});
|
|
464
464
|
return o.defaults.baseURL = e.baseUrl, o.interceptors.request.use(
|
|
465
|
-
(t) =>
|
|
465
|
+
(t) => Je(t),
|
|
466
466
|
(t) => {
|
|
467
|
-
|
|
467
|
+
Ge(t, e.onError);
|
|
468
468
|
}
|
|
469
469
|
), o.interceptors.response.use(
|
|
470
|
-
(t) =>
|
|
471
|
-
(t) =>
|
|
470
|
+
(t) => Qe(t),
|
|
471
|
+
(t) => Ye(t, e.onError)
|
|
472
472
|
), o;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Je(e) {
|
|
475
475
|
const o = E.get("accessToken") ?? "";
|
|
476
476
|
return e.headers.Authorization = "Basic " + o, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ge(e, o) {
|
|
479
479
|
console.error(e), o("request timeout");
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function Qe(e) {
|
|
482
482
|
return e.data;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ye(e, o) {
|
|
485
485
|
var r;
|
|
486
486
|
const t = e.response;
|
|
487
487
|
if (!t)
|
|
488
488
|
return Promise.reject(e);
|
|
489
|
-
t.status === 401 &&
|
|
489
|
+
t.status === 401 && Ze();
|
|
490
490
|
let n = (r = t.data) == null ? void 0 : r.message;
|
|
491
491
|
return n || (n = {
|
|
492
492
|
code: t.status,
|
|
493
493
|
message: t.statusText
|
|
494
494
|
}), o(n), Promise.reject(e);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
497
|
-
E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"),
|
|
496
|
+
function Ze() {
|
|
497
|
+
E.remove("accessToken"), E.remove("refreshToken"), E.remove("activeOrg"), Fe().replace({ path: "/passport/login" });
|
|
498
498
|
}
|
|
499
499
|
let Z = Date.now();
|
|
500
|
-
function
|
|
500
|
+
function re() {
|
|
501
501
|
const e = Date.now();
|
|
502
502
|
return e - Z > 500 ? (Z = e, !0) : !1;
|
|
503
503
|
}
|
|
504
|
-
let
|
|
505
|
-
function
|
|
506
|
-
return ++
|
|
504
|
+
let et = 0;
|
|
505
|
+
function le() {
|
|
506
|
+
return ++et;
|
|
507
507
|
}
|
|
508
|
-
async function
|
|
509
|
-
if (!
|
|
508
|
+
async function mt(e) {
|
|
509
|
+
if (!re())
|
|
510
510
|
return;
|
|
511
511
|
let o = !1, t;
|
|
512
|
-
const n = (
|
|
513
|
-
t =
|
|
514
|
-
}, r =
|
|
512
|
+
const n = (a) => {
|
|
513
|
+
t = a, o = !0;
|
|
514
|
+
}, r = le();
|
|
515
515
|
return i.on("confirmDlgResult" + r, n), i.emit("confirmDlg", { ...e, seq: r }), await F(() => o), i.off("confirmDlgResult" + r, n), t;
|
|
516
516
|
}
|
|
517
|
-
async function
|
|
518
|
-
if (!
|
|
517
|
+
async function vt(e) {
|
|
518
|
+
if (!re())
|
|
519
519
|
return;
|
|
520
520
|
let o = !1, t;
|
|
521
|
-
const n = (
|
|
522
|
-
t =
|
|
523
|
-
}, r =
|
|
521
|
+
const n = (a) => {
|
|
522
|
+
t = a, o = !0;
|
|
523
|
+
}, r = le();
|
|
524
524
|
return i.on("promptDlgResult" + r, n), i.emit("promptDlg", { ...e, seq: r }), await F(() => o), i.off("promptDlgResult" + r, n), t;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function gt() {
|
|
527
527
|
i.emit("openWaitDlg");
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function _t() {
|
|
530
530
|
i.emit("closeWaitDlg");
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function ht(e, o) {
|
|
533
533
|
i.emit("message", { type: "error", text: e, timeout: o });
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function xt(e, o) {
|
|
536
536
|
i.emit("message", { type: "info", text: e, timeout: o });
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function yt(e, o) {
|
|
539
539
|
i.emit("message", { type: "success", text: e, timeout: o });
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function wt(e, o) {
|
|
542
542
|
i.emit("message", { type: "warning", text: e, timeout: o });
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function kt(e) {
|
|
545
545
|
var n, r;
|
|
546
546
|
if (!window.appAppear) {
|
|
547
547
|
window.appAppear = !0;
|
|
@@ -552,7 +552,25 @@ function yt(e) {
|
|
|
552
552
|
t.add("app-reset");
|
|
553
553
|
}, 0));
|
|
554
554
|
}
|
|
555
|
-
|
|
555
|
+
let tt = {};
|
|
556
|
+
function ee(e, o) {
|
|
557
|
+
if (!e)
|
|
558
|
+
return !1;
|
|
559
|
+
let t = e;
|
|
560
|
+
return Object.keys(t).length <= 0 || (o.split("/").forEach((r) => {
|
|
561
|
+
if (Object.keys(t).length <= 0)
|
|
562
|
+
return !0;
|
|
563
|
+
if (t[r])
|
|
564
|
+
t = t[r];
|
|
565
|
+
else
|
|
566
|
+
return !1;
|
|
567
|
+
}), Object.keys(t).length <= 0);
|
|
568
|
+
}
|
|
569
|
+
function bt(e, o) {
|
|
570
|
+
const t = tt[e];
|
|
571
|
+
return t ? o ? (!ee(t.includes, o) || ee(t.excludes, o), !1) : !0 : !1;
|
|
572
|
+
}
|
|
573
|
+
const ae = require("js-cookie"), ot = [
|
|
556
574
|
{ path: "/passport/login", level: 0 },
|
|
557
575
|
{ path: "/passport/loginAccount", level: 1 },
|
|
558
576
|
{ path: "/passport/register", level: 1 },
|
|
@@ -572,99 +590,100 @@ const ae = require("js-cookie"), et = [
|
|
|
572
590
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
573
591
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
574
592
|
];
|
|
575
|
-
function
|
|
593
|
+
function se(e) {
|
|
576
594
|
let o, t = 0;
|
|
577
595
|
const n = e.split("/");
|
|
578
|
-
return
|
|
579
|
-
const
|
|
580
|
-
let
|
|
581
|
-
for (let s = 0; s < n.length && !(s >=
|
|
582
|
-
|
|
583
|
-
|
|
596
|
+
return ot.forEach((r) => {
|
|
597
|
+
const a = r.path.split("/");
|
|
598
|
+
let l = 0;
|
|
599
|
+
for (let s = 0; s < n.length && !(s >= a.length || n[s] !== a[s]); s++)
|
|
600
|
+
l++;
|
|
601
|
+
l >= t && (o = r, t = l);
|
|
584
602
|
}), o;
|
|
585
603
|
}
|
|
586
|
-
function
|
|
604
|
+
function te(e) {
|
|
587
605
|
if (e === "/")
|
|
588
606
|
return { app: "", path: "/", level: -1 };
|
|
589
|
-
const o =
|
|
607
|
+
const o = se(e);
|
|
590
608
|
if (!o)
|
|
591
609
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
592
610
|
const t = e.split("/");
|
|
593
611
|
return console.assert(t.length >= 2), { app: t[1], path: o.path, level: o.level };
|
|
594
612
|
}
|
|
595
|
-
const
|
|
613
|
+
const oe = _("");
|
|
596
614
|
function w(e, o) {
|
|
597
|
-
const t =
|
|
615
|
+
const t = te(e), n = te(o), r = t.app === n.app, a = t.path === n.path, l = t.level >= n.level;
|
|
598
616
|
console.info(
|
|
599
|
-
`~~~~before route change~~~~ ${n.path} -> ${t.path} inner=${r} forward=${
|
|
600
|
-
), r ?
|
|
617
|
+
`~~~~before route change~~~~ ${n.path} -> ${t.path} inner=${r} forward=${l}`
|
|
618
|
+
), r ? a ? oe.value = "" : oe.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
|
|
601
619
|
}
|
|
602
|
-
function
|
|
620
|
+
function nt() {
|
|
603
621
|
return !!ae.get("accessToken");
|
|
604
622
|
}
|
|
605
|
-
function
|
|
623
|
+
function rt() {
|
|
606
624
|
return !!ae.get("activeOrg");
|
|
607
625
|
}
|
|
608
|
-
function
|
|
609
|
-
const n =
|
|
610
|
-
if (!
|
|
626
|
+
function Ct(e, o, t) {
|
|
627
|
+
const n = nt(), r = rt(), a = se(e.path);
|
|
628
|
+
if (!a) {
|
|
611
629
|
t();
|
|
612
630
|
return;
|
|
613
631
|
}
|
|
614
|
-
if (
|
|
632
|
+
if (a.requiredState === "auth")
|
|
615
633
|
if (n)
|
|
616
634
|
if (r) {
|
|
617
|
-
const
|
|
618
|
-
w(
|
|
635
|
+
const l = "/main";
|
|
636
|
+
w(l, o.path), t({ path: l });
|
|
619
637
|
} else
|
|
620
638
|
w(e.path, o.path), t();
|
|
621
639
|
else {
|
|
622
|
-
const
|
|
623
|
-
w(
|
|
640
|
+
const l = "/passport/login";
|
|
641
|
+
w(l, o.path), t({ path: l });
|
|
624
642
|
}
|
|
625
|
-
else if (
|
|
643
|
+
else if (a.requiredState === "org")
|
|
626
644
|
if (n)
|
|
627
645
|
if (r)
|
|
628
646
|
w(e.path, o.path), t();
|
|
629
647
|
else {
|
|
630
|
-
const
|
|
631
|
-
w(
|
|
648
|
+
const l = "/org/joinOrCreate";
|
|
649
|
+
w(l, o.path), t({ path: l });
|
|
632
650
|
}
|
|
633
651
|
else {
|
|
634
|
-
const
|
|
635
|
-
w(
|
|
652
|
+
const l = "/passport/login";
|
|
653
|
+
w(l, o.path), t({ path: l });
|
|
636
654
|
}
|
|
637
655
|
else if (n)
|
|
638
656
|
if (r) {
|
|
639
|
-
const
|
|
640
|
-
w(
|
|
657
|
+
const l = "/main";
|
|
658
|
+
w(l, o.path), t({ path: l });
|
|
641
659
|
} else {
|
|
642
|
-
const
|
|
643
|
-
w(
|
|
660
|
+
const l = "/org/joinOrCreate";
|
|
661
|
+
w(l, o.path), t({ path: l });
|
|
644
662
|
}
|
|
645
663
|
else
|
|
646
664
|
w(e.path, o.path), t();
|
|
647
665
|
}
|
|
648
|
-
const
|
|
649
|
-
e.component("v-alert",
|
|
650
|
-
},
|
|
666
|
+
const lt = (e) => {
|
|
667
|
+
e.component("v-alert", fe), e.component("v-btn", me), e.component("v-card", ve), e.component("v-card-actions", ge), e.component("v-card-text", _e), e.component("v-card-title", he), e.component("v-dialog", xe), e.component("v-form", ye), e.component("v-text-field", we), e.component("x-confirm-dlg", Ie), e.component("x-loading", Be), e.component("x-message", We), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Ne);
|
|
668
|
+
}, Vt = { install: lt };
|
|
651
669
|
export {
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
670
|
+
kt as appAppear,
|
|
671
|
+
_t as closeWaitDlg,
|
|
672
|
+
ft as createAxios,
|
|
673
|
+
Vt as default,
|
|
656
674
|
i as eventBus,
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
675
|
+
ht as messageError,
|
|
676
|
+
xt as messageInfo,
|
|
677
|
+
yt as messageSuccess,
|
|
678
|
+
wt as messageWarning,
|
|
679
|
+
Ct as onBeforeEach,
|
|
680
|
+
mt as openConfirmDlg,
|
|
681
|
+
vt as openPromptDlg,
|
|
682
|
+
gt as openWaitDlg,
|
|
683
|
+
oe as routeTransName,
|
|
684
|
+
dt as useColor,
|
|
685
|
+
pt as useSystem,
|
|
686
|
+
bt as verifyPermission,
|
|
687
|
+
ut as waitMs,
|
|
669
688
|
F as waitUtil
|
|
670
689
|
};
|