@partex/one-core 1.0.0

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.
Files changed (63) hide show
  1. package/README.md +591 -0
  2. package/lib/components/auth/index.d.ts +1 -0
  3. package/lib/components/auth/index.vue.d.ts +3 -0
  4. package/lib/components/back/index.d.ts +1 -0
  5. package/lib/components/back/index.vue.d.ts +17 -0
  6. package/lib/components/common.d.ts +100 -0
  7. package/lib/components/components.d.ts +17 -0
  8. package/lib/components/create.d.ts +16 -0
  9. package/lib/components/dashboard/index.d.ts +1 -0
  10. package/lib/components/dashboard/store.d.ts +6 -0
  11. package/lib/components/error404/index.d.ts +1 -0
  12. package/lib/components/error404/index.vue.d.ts +5 -0
  13. package/lib/components/error500/index.d.ts +1 -0
  14. package/lib/components/error500/index.vue.d.ts +5 -0
  15. package/lib/components/footer/index.d.ts +1 -0
  16. package/lib/components/footer/index.vue.d.ts +15 -0
  17. package/lib/components/header/api.d.ts +44 -0
  18. package/lib/components/header/index.d.ts +4 -0
  19. package/lib/components/header/index.vue.d.ts +114 -0
  20. package/lib/components/header/interface.d.ts +14 -0
  21. package/lib/components/header/message.vue.d.ts +51 -0
  22. package/lib/components/header/pop.vue.d.ts +53 -0
  23. package/lib/components/header/store.d.ts +20 -0
  24. package/lib/components/icon.d.ts +17 -0
  25. package/lib/components/importer/api.d.ts +21 -0
  26. package/lib/components/importer/index.d.ts +1 -0
  27. package/lib/components/importer/index.vue.d.ts +115 -0
  28. package/lib/components/index.d.ts +5 -0
  29. package/lib/components/local/en-US.d.ts +89 -0
  30. package/lib/components/local/index.d.ts +175 -0
  31. package/lib/components/local/zh-CN.d.ts +88 -0
  32. package/lib/components/login/api.d.ts +7 -0
  33. package/lib/components/login/index.d.ts +3 -0
  34. package/lib/components/login/index.vue.d.ts +76 -0
  35. package/lib/components/login/interface.d.ts +49 -0
  36. package/lib/components/login/store.d.ts +47 -0
  37. package/lib/components/logo/index.d.ts +1 -0
  38. package/lib/components/logo/index.vue.d.ts +18 -0
  39. package/lib/components/my/api.d.ts +3 -0
  40. package/lib/components/my/index.d.ts +1 -0
  41. package/lib/components/my/index.vue.d.ts +30 -0
  42. package/lib/components/my/interface.d.ts +14 -0
  43. package/lib/components/numberRoll/index.d.ts +1 -0
  44. package/lib/components/numberRoll/index.vue.d.ts +47 -0
  45. package/lib/components/preset.d.ts +5 -0
  46. package/lib/components/report/api.d.ts +1 -0
  47. package/lib/components/report/index.d.ts +1 -0
  48. package/lib/components/report/index.vue.d.ts +9 -0
  49. package/lib/components/searchBar/index.d.ts +2 -0
  50. package/lib/components/searchBar/index.vue.d.ts +74 -0
  51. package/lib/components/searchBar/interface.d.ts +76 -0
  52. package/lib/components/searchBar/item.vue.d.ts +63 -0
  53. package/lib/components/skeleton/index.d.ts +1 -0
  54. package/lib/components/skeleton/index.vue.d.ts +24 -0
  55. package/lib/components/table/index.d.ts +1 -0
  56. package/lib/components/table/index.vue.d.ts +158 -0
  57. package/lib/index.d.ts +1 -0
  58. package/lib/one-core.cjs +1 -0
  59. package/lib/one-core.js +4982 -0
  60. package/lib/one-core.umd.cjs +1 -0
  61. package/lib/style.css +1 -0
  62. package/package.json +77 -0
  63. package/volar.d.ts +19 -0
@@ -0,0 +1,4982 @@
1
+ var at = Object.defineProperty;
2
+ var lt = (e, o, t) => o in e ? at(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
3
+ var ke = (e, o, t) => (lt(e, typeof o != "symbol" ? o + "" : o, t), t);
4
+ import { defineComponent as H, ref as v, onMounted as le, watch as ee, resolveComponent as p, openBlock as y, createElementBlock as D, createVNode as a, withCtx as l, createBlock as B, createCommentVNode as j, Fragment as se, renderList as Ue, createTextVNode as L, toDisplayString as A, createSlots as go, normalizeStyle as rt, createElementVNode as d, onBeforeUnmount as be, normalizeClass as Mo, renderSlot as me, reactive as Ee, h as I, withDirectives as wo, vShow as vo, withKeys as yo, pushScopeId as Ge, popScopeId as He } from "vue";
5
+ import { NIcon as oe, NButton as E, NGrid as _e, NGridItem as st, NInput as Oe, NInputNumber as it, NSelect as ut, NPopover as Ce, NDataTable as he, NCascader as ct, NTreeSelect as dt, NDatePicker as Oo, NInputGroup as To, NInputGroupLabel as zo, NSpace as ae, NTooltip as Ne, createDiscreteApi as pt, darkTheme as ie, NPopconfirm as Ao, useNotification as ge, NBadge as ft, NRadioGroup as mt, NRadioButton as ht, NDropdown as Ro, NMenu as gt, NModal as Bo, NCard as Lo, NUpload as wt, NTabs as vt, NTabPane as yt, NForm as jo, NFormItem as qo, NGi as Te, NDivider as bt, NSkeleton as _t } from "naive-ui";
6
+ import { createRouter as Ct, createWebHistory as Nt, useRoute as Vo, useRouter as ze } from "vue-router";
7
+ import Je from "axios";
8
+ import Pe from "md5";
9
+ import { useI18n as ue } from "vue-i18n";
10
+ const $t = H({
11
+ name: "OcSearchBarItem",
12
+ components: {
13
+ NIcon: oe,
14
+ NButton: E,
15
+ NGrid: _e,
16
+ NGridItem: st,
17
+ NInput: Oe,
18
+ NInputNumber: it,
19
+ NSelect: ut,
20
+ NPopover: Ce,
21
+ NDataTable: he,
22
+ NCascader: ct,
23
+ NTreeSelect: dt,
24
+ NDatePicker: Oo,
25
+ NInputGroup: To,
26
+ NInputGroupLabel: zo
27
+ },
28
+ props: {
29
+ value: {
30
+ required: !0,
31
+ type: Object,
32
+ default: () => ({})
33
+ },
34
+ data: {
35
+ required: !0,
36
+ type: Object,
37
+ default: () => ({})
38
+ },
39
+ cols: {
40
+ type: Number,
41
+ default: 4
42
+ },
43
+ small: {
44
+ type: Boolean,
45
+ default: !1
46
+ }
47
+ },
48
+ setup(e, { expose: o }) {
49
+ const t = v(!0), s = v(!0), r = v(0), c = v("{}"), i = v({}), u = v({}), f = v([
50
+ {
51
+ key: "label"
52
+ }
53
+ ]), h = (_, $, z) => {
54
+ const R = z.options.filter(
55
+ (x) => String(x.label).toLocaleLowerCase().indexOf(String($).toLocaleLowerCase()) > -1
56
+ ) || [];
57
+ i.value[_].options = R, R.length === 0 ? i.value[_].display = !1 : i.value[_].display = !0;
58
+ }, C = (_) => {
59
+ var x;
60
+ Object.keys(_).forEach((n) => {
61
+ const P = _[n];
62
+ P.show = P.show ?? !0, P.type === "dropdown" && (i.value[n] = {
63
+ display: !1,
64
+ options: P.options
65
+ });
66
+ });
67
+ let $ = 0;
68
+ const z = e.small ? 1 : e.cols, R = Object.keys(_);
69
+ if (Object.keys(_).length > 0)
70
+ for (let n = 0; n <= z; n++)
71
+ (x = _[R[n]]) != null && x.show && ($ = $ + 1);
72
+ r.value = z - $ >= 0 ? z - $ - 1 : -1, $ > z ? s.value = !0 : s.value = !1, e.small && (t.value = !1, s.value = !1), u.value = Object.assign({}, e.value);
73
+ }, N = (_) => {
74
+ i.value[_].options.length === 0 ? i.value[_].display = !1 : i.value[_].display = !0;
75
+ }, g = () => {
76
+ t.value = !t.value;
77
+ };
78
+ return o({ getValues: () => {
79
+ const _ = JSON.stringify(
80
+ u.value,
81
+ ($, z) => z === void 0 ? null : z
82
+ );
83
+ return JSON.parse(_);
84
+ }, clearValues: () => {
85
+ u.value = JSON.parse(c.value);
86
+ } }), le(() => {
87
+ c.value = JSON.stringify(e.value), C(e.data);
88
+ }), ee(
89
+ () => e.value,
90
+ (_) => {
91
+ u.value = Object.assign({}, u.value, _);
92
+ },
93
+ {
94
+ deep: !0
95
+ }
96
+ ), ee(
97
+ () => e.data,
98
+ (_) => {
99
+ C(_);
100
+ },
101
+ {
102
+ deep: !0
103
+ }
104
+ ), {
105
+ more: s,
106
+ offset: r,
107
+ collapsed: t,
108
+ searchData: u,
109
+ dropDisplay: i,
110
+ columnsPopover: f,
111
+ showMore: g,
112
+ dropValueChange: h,
113
+ dropDisplayToggle: N
114
+ };
115
+ }
116
+ }), T = (e, o) => {
117
+ const t = e.__vccOpts || e;
118
+ for (const [s, r] of o)
119
+ t[s] = r;
120
+ return t;
121
+ }, kt = { class: "oc-search-bar-line" }, St = {
122
+ key: 0,
123
+ class: "oc-search-action-more"
124
+ }, Pt = /* @__PURE__ */ d("svg", {
125
+ xmlns: "http://www.w3.org/2000/svg",
126
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
127
+ viewBox: "0 0 24 24"
128
+ }, [
129
+ /* @__PURE__ */ d("g", { fill: "none" }, [
130
+ /* @__PURE__ */ d("path", {
131
+ d: "M4.22 8.47a.75.75 0 0 1 1.06 0L12 15.19l6.72-6.72a.75.75 0 1 1 1.06 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L4.22 9.53a.75.75 0 0 1 0-1.06z",
132
+ fill: "currentColor"
133
+ })
134
+ ])
135
+ ], -1), It = /* @__PURE__ */ d("svg", {
136
+ xmlns: "http://www.w3.org/2000/svg",
137
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
138
+ viewBox: "0 0 24 24"
139
+ }, [
140
+ /* @__PURE__ */ d("g", { fill: "none" }, [
141
+ /* @__PURE__ */ d("path", {
142
+ d: "M4.22 15.53a.75.75 0 0 0 1.06 0L12 8.81l6.72 6.72a.75.75 0 1 0 1.06-1.06l-7.25-7.25a.75.75 0 0 0-1.06 0l-7.25 7.25a.75.75 0 0 0 0 1.06z",
143
+ fill: "currentColor"
144
+ })
145
+ ])
146
+ ], -1);
147
+ function Dt(e, o, t, s, r, c) {
148
+ const i = p("NGridItem"), u = p("NInputGroupLabel"), f = p("NInput"), h = p("NInputNumber"), C = p("NSelect"), N = p("NDataTable"), g = p("NPopover"), w = p("NCascader"), M = p("NTreeSelect"), _ = p("NDatePicker"), $ = p("NInputGroup"), z = p("NGrid"), R = p("NIcon"), x = p("NButton");
149
+ return y(), D("div", kt, [
150
+ a(z, {
151
+ "x-gap": "15",
152
+ "y-gap": "15",
153
+ cols: e.small ? 1 : e.cols,
154
+ "collapsed-rows": 1,
155
+ collapsed: e.collapsed
156
+ }, {
157
+ default: l(() => [
158
+ e.offset > -1 ? (y(), B(i, {
159
+ key: 0,
160
+ offset: e.offset
161
+ }, null, 8, ["offset"])) : j("", !0),
162
+ (y(!0), D(se, null, Ue(e.data, (n, P, F) => (y(), D(se, {
163
+ key: `${P}_${F}`
164
+ }, [
165
+ n.show ? (y(), B(i, { key: 0 }, {
166
+ default: l(() => [
167
+ n.type !== "group" ? (y(), B($, { key: 0 }, {
168
+ default: l(() => {
169
+ var G;
170
+ return [
171
+ a(u, { class: "oc-group-label" }, {
172
+ default: l(() => [
173
+ L(A(typeof n.title == "string" ? n.title : n.title()), 1)
174
+ ]),
175
+ _: 2
176
+ }, 1024),
177
+ n.type === "input" ? (y(), B(f, {
178
+ key: 0,
179
+ value: e.searchData[P],
180
+ "onUpdate:value": (k) => e.searchData[P] = k,
181
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
182
+ "on-update:value": (k) => {
183
+ n.updateValue ? n.updateValue(
184
+ k,
185
+ JSON.parse(JSON.stringify(e.searchData))
186
+ ) : e.searchData[P] = k;
187
+ },
188
+ clearable: n.clearable ?? !0
189
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "on-update:value", "clearable"])) : j("", !0),
190
+ n.type === "number" ? (y(), B(h, {
191
+ key: 1,
192
+ value: e.searchData[P],
193
+ "onUpdate:value": (k) => e.searchData[P] = k,
194
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
195
+ min: n == null ? void 0 : n.min,
196
+ max: n == null ? void 0 : n.max,
197
+ step: (n == null ? void 0 : n.step) || 1,
198
+ "show-button": (n == null ? void 0 : n.showButton) || !0,
199
+ "update-value-on-input": !1,
200
+ validator: n == null ? void 0 : n.validator,
201
+ "on-update:value": (k) => {
202
+ n.updateValue ? n.updateValue(
203
+ k,
204
+ JSON.parse(JSON.stringify(e.searchData))
205
+ ) : e.searchData[P] = k;
206
+ },
207
+ clearable: n.clearable ?? !0
208
+ }, go({ _: 2 }, [
209
+ n != null && n.suffix ? {
210
+ name: "suffix",
211
+ fn: l(() => [
212
+ L(A(n == null ? void 0 : n.suffix), 1)
213
+ ]),
214
+ key: "0"
215
+ } : void 0
216
+ ]), 1032, ["value", "onUpdate:value", "placeholder", "min", "max", "step", "show-button", "validator", "on-update:value", "clearable"])) : j("", !0),
217
+ n.type === "select" ? (y(), B(C, {
218
+ key: 2,
219
+ value: e.searchData[P],
220
+ "onUpdate:value": (k) => e.searchData[P] = k,
221
+ "show-checkmark": !1,
222
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
223
+ options: n.options,
224
+ multiple: n.multiple,
225
+ "on-update:value": (k) => {
226
+ n.updateValue ? n.updateValue(
227
+ k,
228
+ JSON.parse(JSON.stringify(e.searchData))
229
+ ) : e.searchData[P] = k;
230
+ },
231
+ clearable: n.clearable ?? !0,
232
+ "max-tag-count": "responsive",
233
+ filterable: "",
234
+ style: { flex: "1", width: "0" }
235
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options", "multiple", "on-update:value", "clearable"])) : j("", !0),
236
+ n.type === "dropdown" ? (y(), B(g, {
237
+ key: 3,
238
+ width: "trigger",
239
+ trigger: "manual",
240
+ style: { padding: "5px" },
241
+ "show-arrow": !1,
242
+ show: (G = e.dropDisplay[P]) == null ? void 0 : G.display,
243
+ "on-clickoutside": () => {
244
+ e.dropDisplay[P].display = !1;
245
+ }
246
+ }, {
247
+ trigger: l(() => [
248
+ a(f, {
249
+ value: e.searchData[P],
250
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
251
+ clearable: n.clearable ?? !0,
252
+ "on-update:value": (k) => {
253
+ e.searchData[P] = k, e.dropValueChange(P, k, n);
254
+ },
255
+ onClick: (k) => e.dropDisplayToggle(P),
256
+ onFocus: (k) => e.dropDisplayToggle(P)
257
+ }, null, 8, ["value", "placeholder", "clearable", "on-update:value", "onClick", "onFocus"])
258
+ ]),
259
+ default: l(() => {
260
+ var k;
261
+ return [
262
+ a(N, {
263
+ columns: e.columnsPopover,
264
+ data: ((k = e.dropDisplay[P]) == null ? void 0 : k.options) || [],
265
+ "max-height": 300,
266
+ bordered: !1,
267
+ "bottom-bordered": !1,
268
+ "row-props": (X) => ({
269
+ style: "cursor: pointer;",
270
+ onClick: () => {
271
+ e.searchData[P] = X.value, e.dropDisplay[P].display = !1;
272
+ }
273
+ }),
274
+ size: "small",
275
+ "virtual-scroll": "",
276
+ class: "oc-popover-table"
277
+ }, null, 8, ["columns", "data", "row-props"])
278
+ ];
279
+ }),
280
+ _: 2
281
+ }, 1032, ["show", "on-clickoutside"])) : j("", !0),
282
+ n.type === "cascader" ? (y(), B(w, {
283
+ key: 4,
284
+ value: e.searchData[P],
285
+ "onUpdate:value": (k) => e.searchData[P] = k,
286
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
287
+ options: n.options,
288
+ "check-strategy": n.checkStrategy || "all",
289
+ multiple: n.multiple,
290
+ "on-update:value": (k) => {
291
+ n.updateValue ? n.updateValue(
292
+ k,
293
+ JSON.parse(JSON.stringify(e.searchData))
294
+ ) : e.searchData[P] = k;
295
+ },
296
+ clearable: n.clearable ?? !0,
297
+ "max-tag-count": "responsive",
298
+ filterable: ""
299
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options", "check-strategy", "multiple", "on-update:value", "clearable"])) : j("", !0),
300
+ n.type === "treeSelect" ? (y(), B(M, {
301
+ key: 5,
302
+ value: e.searchData[P],
303
+ "onUpdate:value": (k) => e.searchData[P] = k,
304
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
305
+ options: n.options,
306
+ "check-strategy": n.checkStrategy || "all",
307
+ multiple: n.multiple,
308
+ "on-update:value": (k) => {
309
+ n.updateValue ? n.updateValue(
310
+ k,
311
+ JSON.parse(JSON.stringify(e.searchData))
312
+ ) : e.searchData[P] = k;
313
+ },
314
+ clearable: n.clearable ?? !0,
315
+ "max-tag-count": "responsive",
316
+ filterable: ""
317
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options", "check-strategy", "multiple", "on-update:value", "clearable"])) : j("", !0),
318
+ n.type === "datePicker" ? (y(), B(_, {
319
+ key: 6,
320
+ value: e.searchData[P],
321
+ "onUpdate:value": (k) => e.searchData[P] = k,
322
+ placeholder: typeof (n == null ? void 0 : n.placeholder) == "string" ? n == null ? void 0 : n.placeholder : (n == null ? void 0 : n.placeholder) && (n == null ? void 0 : n.placeholder()),
323
+ type: n.dateType,
324
+ format: n == null ? void 0 : n.format,
325
+ "is-date-disabled": n == null ? void 0 : n.isDateDisabled,
326
+ shortcuts: n == null ? void 0 : n.shortcuts,
327
+ "update-value-on-close": n.dateType !== "year",
328
+ "on-update:value": (k) => {
329
+ n.updateValue ? n.updateValue(
330
+ k,
331
+ JSON.parse(JSON.stringify(e.searchData))
332
+ ) : e.searchData[P] = k;
333
+ },
334
+ clearable: n.clearable ?? !0,
335
+ "close-on-select": ""
336
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "type", "format", "is-date-disabled", "shortcuts", "update-value-on-close", "on-update:value", "clearable"])) : j("", !0)
337
+ ];
338
+ }),
339
+ _: 2
340
+ }, 1024)) : j("", !0),
341
+ n.type === "group" ? (y(), B($, { key: 1 }, {
342
+ default: l(() => {
343
+ var G, k, X, ce, de, re, pe, fe, O, S, q, K, J, b, Q, lo, ro, so, io, uo, co, po, fo, mo, ho;
344
+ return [
345
+ a(C, {
346
+ value: e.searchData[P],
347
+ "onUpdate:value": (V) => e.searchData[P] = V,
348
+ options: n.options,
349
+ "show-checkmark": !1,
350
+ style: rt(
351
+ n.width ? typeof n.width == "number" ? {
352
+ width: `${n.width}px`
353
+ } : {
354
+ width: n.width
355
+ } : {}
356
+ ),
357
+ "on-update:value": (V) => {
358
+ n.updateValue ? n.updateValue(
359
+ V,
360
+ JSON.parse(JSON.stringify(e.searchData))
361
+ ) : e.searchData[P] = V;
362
+ },
363
+ class: "oc-group-select",
364
+ placeholder: " "
365
+ }, null, 8, ["value", "onUpdate:value", "options", "style", "on-update:value"]),
366
+ n.input.type === "input" ? (y(), B(f, {
367
+ key: 0,
368
+ value: e.searchData[n.input.key],
369
+ "onUpdate:value": (V) => e.searchData[n.input.key] = V,
370
+ placeholder: typeof ((G = n.input) == null ? void 0 : G.placeholder) == "string" ? (k = n.input) == null ? void 0 : k.placeholder : ((X = n.input) == null ? void 0 : X.placeholder) && ((ce = n.input) == null ? void 0 : ce.placeholder()),
371
+ "on-update:value": (V) => {
372
+ n.input.updateValue ? n.input.updateValue(
373
+ V,
374
+ JSON.parse(JSON.stringify(e.searchData))
375
+ ) : e.searchData[n.input.key] = V;
376
+ },
377
+ clearable: n.input.clearable ?? !0,
378
+ style: { flex: "1" }
379
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "on-update:value", "clearable"])) : j("", !0),
380
+ n.input.type === "number" ? (y(), B(h, {
381
+ key: 1,
382
+ value: e.searchData[n.input.key],
383
+ "onUpdate:value": (V) => e.searchData[n.input.key] = V,
384
+ placeholder: typeof ((de = n.input) == null ? void 0 : de.placeholder) == "string" ? (re = n.input) == null ? void 0 : re.placeholder : ((pe = n.input) == null ? void 0 : pe.placeholder) && ((fe = n.input) == null ? void 0 : fe.placeholder()),
385
+ min: (O = n.input) == null ? void 0 : O.min,
386
+ max: (S = n.input) == null ? void 0 : S.max,
387
+ step: ((q = n.input) == null ? void 0 : q.step) || 1,
388
+ "show-button": ((K = n.input) == null ? void 0 : K.showButton) || !0,
389
+ "update-value-on-input": !1,
390
+ validator: (J = n.input) == null ? void 0 : J.validator,
391
+ "on-update:value": (V) => {
392
+ n.input.updateValue ? n.input.updateValue(
393
+ V,
394
+ JSON.parse(JSON.stringify(e.searchData))
395
+ ) : e.searchData[n.input.key] = V;
396
+ },
397
+ clearable: n.input.clearable ?? !0,
398
+ style: { flex: "1" }
399
+ }, go({ _: 2 }, [
400
+ (b = n.input) != null && b.suffix ? {
401
+ name: "suffix",
402
+ fn: l(() => {
403
+ var V;
404
+ return [
405
+ L(A((V = n.input) == null ? void 0 : V.suffix), 1)
406
+ ];
407
+ }),
408
+ key: "0"
409
+ } : void 0
410
+ ]), 1032, ["value", "onUpdate:value", "placeholder", "min", "max", "step", "show-button", "validator", "on-update:value", "clearable"])) : j("", !0),
411
+ n.input.type === "datePicker" ? (y(), B(_, {
412
+ key: 2,
413
+ value: e.searchData[n.input.key],
414
+ "onUpdate:value": (V) => e.searchData[n.input.key] = V,
415
+ placeholder: typeof ((Q = n.input) == null ? void 0 : Q.placeholder) == "string" ? (lo = n.input) == null ? void 0 : lo.placeholder : ((ro = n.input) == null ? void 0 : ro.placeholder) && ((so = n.input) == null ? void 0 : so.placeholder()),
416
+ type: n.input.dateType,
417
+ format: (io = n.input) == null ? void 0 : io.format,
418
+ "is-date-disabled": (uo = n.input) == null ? void 0 : uo.isDateDisabled,
419
+ shortcuts: (co = n.input) == null ? void 0 : co.shortcuts,
420
+ "update-value-on-close": n.input.dateType !== "year",
421
+ "on-update:value": (V) => {
422
+ n.input.updateValue ? n.input.updateValue(
423
+ V,
424
+ JSON.parse(JSON.stringify(e.searchData))
425
+ ) : e.searchData[n.input.key] = V;
426
+ },
427
+ clearable: n.input.clearable ?? !0,
428
+ "close-on-select": "",
429
+ style: { flex: "1" }
430
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "type", "format", "is-date-disabled", "shortcuts", "update-value-on-close", "on-update:value", "clearable"])) : j("", !0),
431
+ n.input.type === "select" ? (y(), B(C, {
432
+ key: 3,
433
+ value: e.searchData[n.input.key],
434
+ "onUpdate:value": (V) => e.searchData[n.input.key] = V,
435
+ "show-checkmark": !1,
436
+ placeholder: typeof ((po = n.input) == null ? void 0 : po.placeholder) == "string" ? (fo = n.input) == null ? void 0 : fo.placeholder : ((mo = n.input) == null ? void 0 : mo.placeholder) && ((ho = n.input) == null ? void 0 : ho.placeholder()),
437
+ options: n.input.options,
438
+ multiple: n.input.multiple,
439
+ "on-update:value": (V) => {
440
+ n.input.updateValue ? n.input.updateValue(
441
+ V,
442
+ JSON.parse(JSON.stringify(e.searchData))
443
+ ) : e.searchData[n.input.key] = V;
444
+ },
445
+ clearable: n.input.clearable ?? !0,
446
+ "max-tag-count": "responsive",
447
+ filterable: "",
448
+ style: { flex: "1", width: "0" }
449
+ }, null, 8, ["value", "onUpdate:value", "placeholder", "options", "multiple", "on-update:value", "clearable"])) : j("", !0)
450
+ ];
451
+ }),
452
+ _: 2
453
+ }, 1024)) : j("", !0)
454
+ ]),
455
+ _: 2
456
+ }, 1024)) : j("", !0)
457
+ ], 64))), 128))
458
+ ]),
459
+ _: 1
460
+ }, 8, ["cols", "collapsed"]),
461
+ e.more ? (y(), D("div", St, [
462
+ e.collapsed ? (y(), B(x, {
463
+ key: 0,
464
+ onClick: e.showMore
465
+ }, {
466
+ icon: l(() => [
467
+ a(R, null, {
468
+ default: l(() => [
469
+ Pt
470
+ ]),
471
+ _: 1
472
+ })
473
+ ]),
474
+ _: 1
475
+ }, 8, ["onClick"])) : (y(), B(x, {
476
+ key: 1,
477
+ onClick: e.showMore
478
+ }, {
479
+ icon: l(() => [
480
+ a(R, null, {
481
+ default: l(() => [
482
+ It
483
+ ]),
484
+ _: 1
485
+ })
486
+ ]),
487
+ _: 1
488
+ }, 8, ["onClick"]))
489
+ ])) : j("", !0)
490
+ ]);
491
+ }
492
+ const Mt = /* @__PURE__ */ T($t, [["render", Dt]]), Ot = H({
493
+ name: "OcSearchBar",
494
+ components: {
495
+ NSpace: ae,
496
+ NIcon: oe,
497
+ NTooltip: Ne,
498
+ NButton: E,
499
+ NPopover: Ce,
500
+ OcSearchBarItem: Mt
501
+ },
502
+ props: {
503
+ value: {
504
+ required: !0,
505
+ type: Object,
506
+ default: () => ({})
507
+ },
508
+ data: {
509
+ required: !0,
510
+ type: Object,
511
+ default: () => ({})
512
+ },
513
+ loading: {
514
+ type: Boolean,
515
+ default: !1
516
+ },
517
+ cols: {
518
+ type: Number,
519
+ default: 4
520
+ },
521
+ small: {
522
+ type: Boolean,
523
+ default: !1
524
+ },
525
+ resetButton: {
526
+ type: Boolean,
527
+ default: !0
528
+ }
529
+ },
530
+ emits: ["update:loading", "on-update:value"],
531
+ setup(e, { emit: o, slots: t }) {
532
+ const s = v(), r = v(!!t.header), c = v(window.screen.availWidth <= 1300), i = () => {
533
+ if (!e.loading && s.value) {
534
+ const h = s.value.getValues();
535
+ o("update:loading", !0), o("on-update:value", h);
536
+ }
537
+ }, u = () => {
538
+ e.loading || (s.value.clearValues(), i());
539
+ }, f = () => {
540
+ c.value = window.screen.availWidth <= 1300;
541
+ };
542
+ return le(() => {
543
+ window.addEventListener("resize", f);
544
+ }), be(() => {
545
+ window.removeEventListener("resize", f);
546
+ }), {
547
+ itemRef: s,
548
+ isSlotHeader: r,
549
+ availWidth: c,
550
+ doSearch: i,
551
+ clearAll: u
552
+ };
553
+ }
554
+ }), Tt = {
555
+ key: 0,
556
+ class: "oc-search-bar-title"
557
+ }, zt = {
558
+ key: 1,
559
+ class: "oc-search-bar-popover"
560
+ }, At = /* @__PURE__ */ d("svg", {
561
+ xmlns: "http://www.w3.org/2000/svg",
562
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
563
+ viewBox: "0 0 32 32"
564
+ }, [
565
+ /* @__PURE__ */ d("path", {
566
+ d: "M26 6H4v3.17l7.41 7.42l.59.58V26h4v-2h2v2a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-8l-7.41-7.41A2 2 0 0 1 2 9.17V6a2 2 0 0 1 2-2h22z",
567
+ fill: "currentColor"
568
+ }),
569
+ /* @__PURE__ */ d("path", {
570
+ d: "M29.71 11.29l-3-3a1 1 0 0 0-1.42 0L16 17.59V22h4.41l9.3-9.29a1 1 0 0 0 0-1.42zM19.59 20H18v-1.59l5-5L24.59 15zM26 13.59L24.41 12L26 10.41L27.59 12z",
571
+ fill: "currentColor"
572
+ })
573
+ ], -1), Rt = { class: "oc-search-bar-popover-content" }, Bt = /* @__PURE__ */ d("svg", {
574
+ xmlns: "http://www.w3.org/2000/svg",
575
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
576
+ viewBox: "0 0 24 24"
577
+ }, [
578
+ /* @__PURE__ */ d("g", { fill: "none" }, [
579
+ /* @__PURE__ */ d("path", {
580
+ d: "M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",
581
+ fill: "currentColor"
582
+ })
583
+ ])
584
+ ], -1), Lt = /* @__PURE__ */ d("svg", {
585
+ xmlns: "http://www.w3.org/2000/svg",
586
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
587
+ viewBox: "0 0 24 24"
588
+ }, [
589
+ /* @__PURE__ */ d("g", { fill: "none" }, [
590
+ /* @__PURE__ */ d("path", {
591
+ d: "M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",
592
+ fill: "currentColor"
593
+ })
594
+ ])
595
+ ], -1), jt = { class: "oc-search-bar-center" }, qt = /* @__PURE__ */ d("svg", {
596
+ xmlns: "http://www.w3.org/2000/svg",
597
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
598
+ viewBox: "0 0 24 24"
599
+ }, [
600
+ /* @__PURE__ */ d("g", { fill: "none" }, [
601
+ /* @__PURE__ */ d("path", {
602
+ d: "M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",
603
+ fill: "currentColor"
604
+ })
605
+ ])
606
+ ], -1), Vt = /* @__PURE__ */ d("svg", {
607
+ xmlns: "http://www.w3.org/2000/svg",
608
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
609
+ viewBox: "0 0 24 24"
610
+ }, [
611
+ /* @__PURE__ */ d("g", { fill: "none" }, [
612
+ /* @__PURE__ */ d("path", {
613
+ d: "M16.25 5.18a.75.75 0 0 0 .142 1.051a7.251 7.251 0 0 1-3.599 12.976l.677-.677a.75.75 0 0 0-.977-1.133l-.084.073l-2 2a.75.75 0 0 0-.073.976l.073.084l2 2a.75.75 0 0 0 1.133-.976l-.072-.084l-.75-.75A8.75 8.75 0 0 0 17.301 5.04a.75.75 0 0 0-1.051.141zm-5.72-3.71a.75.75 0 0 0 0 1.06l.75.75a8.75 8.75 0 0 0-4.85 15.47a.75.75 0 1 0 .956-1.157a7.251 7.251 0 0 1 3.82-12.8l-.676.677a.75.75 0 1 0 1.061 1.06l2-2a.75.75 0 0 0 0-1.06l-2-2a.75.75 0 0 0-1.06 0z",
614
+ fill: "currentColor"
615
+ })
616
+ ])
617
+ ], -1);
618
+ function Ut(e, o, t, s, r, c) {
619
+ const i = p("NIcon"), u = p("NButton"), f = p("OcSearchBarItem"), h = p("NTooltip"), C = p("NSpace"), N = p("NPopover");
620
+ return y(), D("div", {
621
+ class: Mo(["oc-search-bar", {
622
+ small: !e.isSlotHeader && (e.small || e.availWidth)
623
+ }])
624
+ }, [
625
+ e.isSlotHeader ? (y(), D("span", Tt, [
626
+ me(e.$slots, "header")
627
+ ])) : j("", !0),
628
+ e.small || e.availWidth ? (y(), D("div", zt, [
629
+ a(h, { trigger: "hover" }, {
630
+ trigger: l(() => [
631
+ a(N, {
632
+ placement: "bottom",
633
+ "display-directive": "show",
634
+ trigger: "click",
635
+ "show-arrow": !1,
636
+ to: !1
637
+ }, {
638
+ trigger: l(() => [
639
+ a(u, { class: "oc-search-bar-popover-button" }, {
640
+ icon: l(() => [
641
+ a(i, null, {
642
+ default: l(() => [
643
+ At
644
+ ]),
645
+ _: 1
646
+ })
647
+ ]),
648
+ _: 1
649
+ })
650
+ ]),
651
+ default: l(() => [
652
+ d("div", Rt, [
653
+ a(f, {
654
+ ref: "itemRef",
655
+ value: e.value,
656
+ data: e.data,
657
+ loading: e.loading,
658
+ small: ""
659
+ }, null, 8, ["value", "data", "loading"]),
660
+ a(C, {
661
+ justify: "end",
662
+ size: 15,
663
+ wrap: !1,
664
+ class: "oc-search-bar-popover-action"
665
+ }, {
666
+ default: l(() => [
667
+ a(h, { trigger: "hover" }, {
668
+ trigger: l(() => [
669
+ a(u, {
670
+ loading: e.loading,
671
+ class: "button-primary",
672
+ onClick: e.doSearch
673
+ }, {
674
+ icon: l(() => [
675
+ a(i, null, {
676
+ default: l(() => [
677
+ Bt
678
+ ]),
679
+ _: 1
680
+ })
681
+ ]),
682
+ _: 1
683
+ }, 8, ["loading", "onClick"])
684
+ ]),
685
+ default: l(() => [
686
+ L(" " + A(e.$t("Common.search")), 1)
687
+ ]),
688
+ _: 1
689
+ }),
690
+ e.resetButton ? (y(), B(h, {
691
+ key: 0,
692
+ trigger: "hover"
693
+ }, {
694
+ trigger: l(() => [
695
+ a(u, {
696
+ loading: e.loading,
697
+ onClick: e.clearAll
698
+ }, {
699
+ icon: l(() => [
700
+ a(i, null, {
701
+ default: l(() => [
702
+ Lt
703
+ ]),
704
+ _: 1
705
+ })
706
+ ]),
707
+ _: 1
708
+ }, 8, ["loading", "onClick"])
709
+ ]),
710
+ default: l(() => [
711
+ L(" " + A(e.$t("Common.reset")), 1)
712
+ ]),
713
+ _: 1
714
+ })) : j("", !0)
715
+ ]),
716
+ _: 1
717
+ })
718
+ ])
719
+ ]),
720
+ _: 1
721
+ })
722
+ ]),
723
+ default: l(() => [
724
+ L(" " + A(e.$t("Common.filter")), 1)
725
+ ]),
726
+ _: 1
727
+ }),
728
+ a(C, {
729
+ size: 15,
730
+ wrap: !1,
731
+ class: "oc-search-action"
732
+ }, {
733
+ default: l(() => [
734
+ me(e.$slots, "action")
735
+ ]),
736
+ _: 3
737
+ })
738
+ ])) : (y(), D(se, { key: 2 }, [
739
+ d("div", jt, [
740
+ a(f, {
741
+ ref: "itemRef",
742
+ value: e.value,
743
+ data: e.data,
744
+ loading: e.loading,
745
+ cols: e.cols
746
+ }, null, 8, ["value", "data", "loading", "cols"]),
747
+ a(C, {
748
+ size: 15,
749
+ wrap: !1,
750
+ style: { "padding-left": "15px" }
751
+ }, {
752
+ default: l(() => [
753
+ a(h, { trigger: "hover" }, {
754
+ trigger: l(() => [
755
+ a(u, {
756
+ loading: e.loading,
757
+ class: "button-primary",
758
+ onClick: e.doSearch
759
+ }, {
760
+ icon: l(() => [
761
+ a(i, null, {
762
+ default: l(() => [
763
+ qt
764
+ ]),
765
+ _: 1
766
+ })
767
+ ]),
768
+ _: 1
769
+ }, 8, ["loading", "onClick"])
770
+ ]),
771
+ default: l(() => [
772
+ L(" " + A(e.$t("Common.search")), 1)
773
+ ]),
774
+ _: 1
775
+ }),
776
+ e.resetButton ? (y(), B(h, {
777
+ key: 0,
778
+ trigger: "hover"
779
+ }, {
780
+ trigger: l(() => [
781
+ a(u, {
782
+ loading: e.loading,
783
+ onClick: e.clearAll
784
+ }, {
785
+ icon: l(() => [
786
+ a(i, null, {
787
+ default: l(() => [
788
+ Vt
789
+ ]),
790
+ _: 1
791
+ })
792
+ ]),
793
+ _: 1
794
+ }, 8, ["loading", "onClick"])
795
+ ]),
796
+ default: l(() => [
797
+ L(" " + A(e.$t("Common.reset")), 1)
798
+ ]),
799
+ _: 1
800
+ })) : j("", !0)
801
+ ]),
802
+ _: 1
803
+ })
804
+ ]),
805
+ a(C, {
806
+ size: 15,
807
+ wrap: !1,
808
+ class: "oc-search-action"
809
+ }, {
810
+ default: l(() => [
811
+ me(e.$slots, "action")
812
+ ]),
813
+ _: 3
814
+ })
815
+ ], 64))
816
+ ], 2);
817
+ }
818
+ const Uo = /* @__PURE__ */ T(Ot, [["render", Ut]]), Ft = H({
819
+ name: "OcTable",
820
+ components: {
821
+ NDataTable: he,
822
+ OcSearchBar: Uo
823
+ },
824
+ props: {
825
+ init: {
826
+ type: Function,
827
+ default: () => {
828
+ }
829
+ },
830
+ loading: {
831
+ type: Boolean,
832
+ default: !1
833
+ },
834
+ // searchValue: {
835
+ // required: true,
836
+ // type: Object,
837
+ // default: () => ({})
838
+ // },
839
+ searchData: {
840
+ required: !0,
841
+ type: Object,
842
+ default: () => ({})
843
+ },
844
+ columns: {
845
+ type: Array,
846
+ default: () => []
847
+ },
848
+ columnsData: {
849
+ type: Array,
850
+ default: () => []
851
+ },
852
+ query: {
853
+ type: Object,
854
+ default: () => ({
855
+ page: 1,
856
+ pageCount: 1,
857
+ pageSize: 30
858
+ })
859
+ },
860
+ cols: {
861
+ type: Number,
862
+ default: 4
863
+ },
864
+ small: {
865
+ type: Boolean,
866
+ default: !1
867
+ },
868
+ resetButton: {
869
+ type: Boolean,
870
+ default: !0
871
+ },
872
+ height: {
873
+ type: String,
874
+ default: ""
875
+ },
876
+ scrollX: {
877
+ type: String,
878
+ default: null
879
+ }
880
+ },
881
+ emits: ["on-update:value"],
882
+ setup(e, { emit: o }) {
883
+ const t = v(!0), s = v({}), r = v({
884
+ page: 1,
885
+ pageCount: 1,
886
+ pageSize: 30
887
+ }), c = (h) => {
888
+ e.loading || o("on-update:value", h);
889
+ }, i = (h) => {
890
+ r.value.page = h, e.init();
891
+ }, u = (h) => {
892
+ r.value.pageSize = h, r.value.page = 1, e.init();
893
+ }, f = (h) => {
894
+ r.value.sorter = h, e.init();
895
+ };
896
+ return le(() => {
897
+ const h = {};
898
+ s.value = h, (!e.columns || e.columns.length === 0) && (t.value = !1);
899
+ }), ee(() => e.query, (h) => {
900
+ r.value = h;
901
+ }), {
902
+ query: r,
903
+ doSearch: c,
904
+ pageChange: i,
905
+ pageSizeChange: u,
906
+ pageSorter: f,
907
+ showTable: t,
908
+ searchValue: s
909
+ };
910
+ }
911
+ }), Et = {
912
+ key: 0,
913
+ class: "com-card"
914
+ };
915
+ function Gt(e, o, t, s, r, c) {
916
+ const i = p("OcSearchBar"), u = p("NDataTable");
917
+ return y(), D("div", null, [
918
+ a(i, {
919
+ loading: e.loading,
920
+ value: e.searchValue,
921
+ data: e.searchData,
922
+ cols: e.cols,
923
+ small: e.small,
924
+ resetButton: e.resetButton,
925
+ "onOnUpdate:value": e.doSearch
926
+ }, {
927
+ header: l(() => [
928
+ me(e.$slots, "header")
929
+ ]),
930
+ action: l(() => [
931
+ me(e.$slots, "action")
932
+ ]),
933
+ _: 3
934
+ }, 8, ["loading", "value", "data", "cols", "small", "resetButton", "onOnUpdate:value"]),
935
+ e.showTable ? (y(), D("div", Et, [
936
+ a(u, {
937
+ columns: e.columns,
938
+ data: e.columnsData,
939
+ loading: e.loading,
940
+ pagination: e.query,
941
+ "on-update:page": e.pageChange,
942
+ "on-update:page-size": e.pageSizeChange,
943
+ "on-update:sorter": e.pageSorter,
944
+ "min-height": e.height,
945
+ "max-height": e.height,
946
+ "scroll-x": e.scrollX,
947
+ remote: ""
948
+ }, null, 8, ["columns", "data", "loading", "pagination", "on-update:page", "on-update:page-size", "on-update:sorter", "min-height", "max-height", "scroll-x"])
949
+ ])) : j("", !0)
950
+ ]);
951
+ }
952
+ const Ht = /* @__PURE__ */ T(Ft, [["render", Gt]]), Y = Ct({
953
+ history: Nt(),
954
+ routes: [],
955
+ scrollBehavior: () => ({ left: 0, top: 0 })
956
+ }), Le = document.querySelector("html");
957
+ Y.beforeEach(() => {
958
+ Le == null || Le.removeAttribute("style");
959
+ });
960
+ const Jt = Object.prototype.hasOwnProperty;
961
+ function Fo(e, o) {
962
+ const t = [];
963
+ for (const s in e) {
964
+ if (!Jt.call(e, s))
965
+ continue;
966
+ const r = e[s], c = encodeURIComponent(s);
967
+ let i;
968
+ typeof r == "object" ? i = Fo(r, o ? o + "[" + c + "]" : c) : i = (o ? o + "[" + c + "]" : c) + "=" + encodeURIComponent(r), t.push(i);
969
+ }
970
+ return t.join("&");
971
+ }
972
+ const { notification: je } = pt(["notification"], {
973
+ configProviderProps: {
974
+ themeOverrides: {
975
+ common: {
976
+ borderRadius: "16px",
977
+ borderRadiusSmall: "8px",
978
+ primaryColor: "#8e54c8",
979
+ primaryColorHover: "#9b66d0",
980
+ primaryColorPressed: "#8e54c8",
981
+ primaryColorSuppl: "#8e54c8",
982
+ infoColor: "#2080f0",
983
+ infoColorHover: "#57a4fd",
984
+ infoColorPressed: "#2080f0",
985
+ infoColorSuppl: "#2080f0",
986
+ successColor: "#5dae57",
987
+ successColorHover: "#70ce69",
988
+ successColorPressed: "#5dae57",
989
+ successColorSuppl: "#5dae57",
990
+ warningColor: "#f0973a",
991
+ warningColorHover: "#ffb05d",
992
+ warningColorPressed: "#f0973a",
993
+ warningColorSuppl: "#f0973a",
994
+ errorColor: "#e65444",
995
+ errorColorHover: "#fc6c5d",
996
+ errorColorPressed: "#e65444",
997
+ errorColorSuppl: "#e65444",
998
+ cardColor: "#fff"
999
+ },
1000
+ Button: {
1001
+ textColor: "rgb(var(--font))"
1002
+ },
1003
+ Notification: {
1004
+ borderRadius: "16px"
1005
+ }
1006
+ }
1007
+ },
1008
+ notificationProviderProps: {
1009
+ placement: "top"
1010
+ }
1011
+ }), $e = Je.create({
1012
+ timeout: 3e5,
1013
+ responseType: "json",
1014
+ headers: {
1015
+ platformType: "T1"
1016
+ }
1017
+ });
1018
+ let Fe = Je.CancelToken.source();
1019
+ $e.interceptors.request.use(
1020
+ (e) => {
1021
+ var t;
1022
+ e.cancelToken = Fe.token;
1023
+ const o = Z("token", !1);
1024
+ if (e.headers && o && (e.headers["X-Auth-Token"] = o), ((t = e.method) == null ? void 0 : t.toLocaleUpperCase()) === "GET") {
1025
+ const s = Fo(e.data);
1026
+ s && (e.url = `${e.url}?${s}`);
1027
+ }
1028
+ return e;
1029
+ },
1030
+ (e) => Promise.reject(e)
1031
+ );
1032
+ $e.interceptors.response.use(
1033
+ (e) => {
1034
+ const o = e.data;
1035
+ if (e.config.responseType === "blob" || e.config.responseType === "text")
1036
+ return Promise.resolve(e.data);
1037
+ if (o.ok)
1038
+ return Promise.resolve(o.data);
1039
+ {
1040
+ let t = o.message;
1041
+ return (t.indexOf("Connection refused") > -1 || t.indexOf("finishConnect") > -1) && (t = "网络错误,请稍后重试"), je.error({
1042
+ content: t,
1043
+ duration: 3e3
1044
+ }), Promise.reject(t);
1045
+ }
1046
+ },
1047
+ (e) => {
1048
+ if (e && e.code === "ECONNABORTED" && e.config && e.config.url && e.config.url.indexOf("auth/user/getCurrentUserInfo") > -1 && (nl(), Y.replace("/custom/500")), e && e.response)
1049
+ switch (e.response.status) {
1050
+ case 401:
1051
+ case 403:
1052
+ Ae("token"), window.location.href = "/login";
1053
+ break;
1054
+ default:
1055
+ return je.destroyAll(), je.error({
1056
+ content: "系统正在维护中,请稍后再试!",
1057
+ duration: 3e3
1058
+ }), Promise.reject();
1059
+ }
1060
+ else
1061
+ return Promise.reject();
1062
+ }
1063
+ );
1064
+ const gi = () => {
1065
+ Fe.cancel(), Fe = Je.CancelToken.source();
1066
+ }, U = Ee({
1067
+ needUpdate: !1,
1068
+ download: !1,
1069
+ theme: !1,
1070
+ lang: "zh-CN",
1071
+ platformName: "智能效率监测平台",
1072
+ platformType: "T1",
1073
+ platformUrl: "/iot/home/all"
1074
+ });
1075
+ function xe(e) {
1076
+ U.download = e;
1077
+ }
1078
+ function xt(e) {
1079
+ U.lang = e;
1080
+ }
1081
+ function Ie(e) {
1082
+ te("lang", e, 0), U.lang = e;
1083
+ const o = document.body;
1084
+ o.dataset.lang = e;
1085
+ }
1086
+ function Eo(e) {
1087
+ U.theme = e;
1088
+ const o = document.body, t = document.querySelector("meta[name=theme-color]");
1089
+ t && (e ? (t.setAttribute("content", "#2b2b2d"), o.dataset.theme = "dark") : (t.setAttribute("content", "#ffffff"), o.dataset.theme = ""));
1090
+ }
1091
+ function Wt(e) {
1092
+ U.platformName = e.platformName, U.platformType = e.platformType, U.platformUrl = e.platformUrl;
1093
+ }
1094
+ function Kt(e) {
1095
+ U.platformName = e;
1096
+ }
1097
+ function Xt(e) {
1098
+ U.needUpdate = e;
1099
+ }
1100
+ const Qt = () => W("api/auth/user/logout"), Zt = () => W("api/manager/message/markReadAll"), Yt = () => W("api/auth/user/updateTenantRenewalStatus"), en = (e) => W("api/manager/job/remove", e), on = (e) => W("api/manager/job/retry", {
1101
+ jobId: e
1102
+ }), tn = (e) => new Promise((o, t) => {
1103
+ const s = oo(e);
1104
+ W("api/manager/job/page", s).then((r) => {
1105
+ const c = eo(r);
1106
+ o(c);
1107
+ }).catch(() => {
1108
+ t();
1109
+ });
1110
+ }), nn = (e) => new Promise((o, t) => {
1111
+ const s = new FormData();
1112
+ s.append("jobType", "EXPORT"), Object.keys(e).forEach((r) => {
1113
+ e.query && r === "query" ? s.append("query", JSON.stringify(e.query)) : s.append(r, e[r]);
1114
+ }), xo("api/manager/job/submit", s).then(() => {
1115
+ xe(!0), o();
1116
+ }).catch((r) => {
1117
+ t(r);
1118
+ });
1119
+ }), an = (e) => new Promise((o, t) => {
1120
+ const s = oo(e);
1121
+ s.status === -1 && (s.status = ""), W("api/manager/message/messagePage", s).then((r) => {
1122
+ const c = eo(r);
1123
+ o({
1124
+ data: c,
1125
+ unRead: r.unRead
1126
+ });
1127
+ }).catch(() => {
1128
+ t();
1129
+ });
1130
+ }), ln = (e) => W("api/manager/message/markRead", {
1131
+ messageId: e
1132
+ }), bo = (e) => {
1133
+ const o = JSON.parse(JSON.stringify(e));
1134
+ return o.password = Pe(o.password), W("api/user/v2/login", o);
1135
+ }, rn = () => new Promise((e, o) => {
1136
+ W("api/auth/user/getCurrentUserInfo", {}, "json", 1e4).then((t) => {
1137
+ const s = ["046459"];
1138
+ t.commissioner = !1, s.includes(String(t.tenantLoginCode)) && (t.commissioner = !0);
1139
+ const r = t.ownedProducts ? JSON.parse(t.ownedProducts) : [];
1140
+ switch (r.includes(2) ? t.platform_tdm = !0 : t.platform_tdm = !1, r.includes(3) ? t.platform_qms = !0 : t.platform_qms = !1, r.includes(4) ? t.platform_twin = !0 : t.platform_twin = !1, r.includes(5) ? t.platform_maintain = !0 : t.platform_maintain = !1, r.includes(6) ? t.platform_simple_tdm = !0 : t.platform_simple_tdm = !1, t.systemType) {
1141
+ case "Premium":
1142
+ t.systemType = 1;
1143
+ break;
1144
+ case "Flagship":
1145
+ t.systemType = 2;
1146
+ break;
1147
+ default:
1148
+ t.systemType = 0;
1149
+ break;
1150
+ }
1151
+ t.info = JSON.parse(t.info), e(t);
1152
+ }).catch(() => {
1153
+ o();
1154
+ });
1155
+ });
1156
+ let Go = !0;
1157
+ const m = Ee({
1158
+ commissioner: !1,
1159
+ factoryId: "",
1160
+ tenantLoginCode: "",
1161
+ thirdUserId: "",
1162
+ userId: "",
1163
+ email: "",
1164
+ name: "",
1165
+ realName: "",
1166
+ phone: "",
1167
+ description: "",
1168
+ tenantName: "",
1169
+ oeeStatus: 0,
1170
+ ncFlg: 0,
1171
+ info: {
1172
+ type: 0,
1173
+ id: "",
1174
+ viewType: 1,
1175
+ interval: 5,
1176
+ theme: "light"
1177
+ },
1178
+ kind: 0,
1179
+ systemType: 0,
1180
+ password: "",
1181
+ enable: !0,
1182
+ platform_tdm: !1,
1183
+ platform_qms: !1,
1184
+ platform_twin: !1,
1185
+ platform_maintain: !1,
1186
+ platform_simple_tdm: !1,
1187
+ authorizationGroupArray: [],
1188
+ authorizationMachineArray: [],
1189
+ iot_menu_authorization: [],
1190
+ tdm_menu_authorization: [],
1191
+ qms_menu_authorization: [],
1192
+ endTime: 0,
1193
+ tenantStatus: 1,
1194
+ renewalStatus: 0,
1195
+ roleId: 1,
1196
+ industryCategory: "0"
1197
+ });
1198
+ function sn(e) {
1199
+ Go = e;
1200
+ }
1201
+ function Ho(e) {
1202
+ const o = window.location.host;
1203
+ if (o.includes("partexiot")) {
1204
+ const t = Z("token", !1);
1205
+ m.industryCategory = e.industryCategory || "0", !o.includes("vpn") && Go && (e.industryCategory === "0" && o.includes("printing") && (window.location.href = `https://www.partexiot.cn/auth?auth=${t}`), e.industryCategory === "1" && !o.includes("printing") && (window.location.href = `https://printing.partexiot.cn/auth?auth=${t}`));
1206
+ }
1207
+ if (m.commissioner = e.commissioner, m.factoryId = e.factoryId, m.tenantLoginCode = e.tenantLoginCode, m.userId = e.userId, m.email = e.email, m.name = e.name, m.realName = e.realName, m.tenantName = e.tenantName, m.phone = e.phone, m.info = e.info, m.kind = e.kind, m.oeeStatus = e.oeeStatus || 0, m.ncFlg = e.ncFlg || 0, m.systemType = e.systemType, m.platform_tdm = e.platform_tdm, m.platform_qms = e.platform_qms, m.platform_twin = e.platform_twin, m.platform_maintain = e.platform_maintain, m.platform_simple_tdm = e.platform_simple_tdm, m.authorizationGroupArray = e.authorizationGroupArray || [], m.authorizationMachineArray = e.authorizationMachineArray || [], m.iot_menu_authorization = e.iot_menu_authorization || [], m.tdm_menu_authorization = e.tdm_menu_authorization || [], m.qms_menu_authorization = e.qms_menu_authorization || [], m.endTime = e.endTime ?? 0, m.tenantStatus = e.tenantStatus ?? 1, m.renewalStatus = e.renewalStatus ?? 0, m.roleId = e.roleId || 0, m.kind === 1) {
1208
+ const t = e.info, s = String(e.info.type);
1209
+ s === "0" && Y.replace(
1210
+ `/dashboard/list?machGroupId=${t.id}&theme=${t.theme || "light"}`
1211
+ ), s === "1" && Y.replace(
1212
+ `/dashboard/single?machId=${t.id}&type=${t.viewType ?? 1}&theme=${t.theme || "light"}`
1213
+ ), s === "2" && Y.push(`/dashboard/carousel?theme=${t.theme || "light"}`), s === "3" && Y.push(`/dashboard/carouselist?theme=${t.theme || "light"}`), s === "4" && Y.push(`/dashboard/performance?schemeId=${t.id}&theme=${t.theme || "light"}`);
1214
+ }
1215
+ }
1216
+ function We() {
1217
+ return new Promise((e, o) => {
1218
+ rn().then((t) => {
1219
+ Ho(t), e(t);
1220
+ }).catch(() => {
1221
+ o();
1222
+ });
1223
+ });
1224
+ }
1225
+ function Ke() {
1226
+ m.factoryId = "", m.commissioner = !1, m.tenantLoginCode = "", m.userId = "", m.email = "", m.name = "", m.realName = "", m.tenantName = "", m.phone = "", m.description = "", m.info = {
1227
+ type: 0,
1228
+ id: "",
1229
+ viewType: 1,
1230
+ interval: 5,
1231
+ theme: "light"
1232
+ }, m.kind = 0, m.systemType = 0, m.oeeStatus = 0, m.ncFlg = 0, m.password = "", m.enable = !0, m.platform_tdm = !1, m.platform_qms = !1, m.platform_twin = !1, m.platform_maintain = !1, m.platform_simple_tdm = !1, m.authorizationGroupArray = [], m.authorizationMachineArray = [], m.iot_menu_authorization = [], m.tdm_menu_authorization = [], m.qms_menu_authorization = [], m.endTime = 0, m.tenantStatus = 1, m.renewalStatus = 0, m.roleId = 1;
1233
+ }
1234
+ async function Jo() {
1235
+ await Qt().catch(() => null), Ae("token"), Ke(), window.location.href = "/login";
1236
+ }
1237
+ const un = {}, cn = {
1238
+ xmlns: "http://www.w3.org/2000/svg",
1239
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1240
+ viewBox: "0 0 24 24"
1241
+ }, dn = /* @__PURE__ */ d("g", { fill: "none" }, [
1242
+ /* @__PURE__ */ d("path", {
1243
+ d: "M12 1.996a7.49 7.49 0 0 1 7.496 7.25l.004.25v4.097l1.38 3.156a1.249 1.249 0 0 1-1.145 1.75L15 18.502a3 3 0 0 1-5.995.177L9 18.499H4.275a1.251 1.251 0 0 1-1.147-1.747L4.5 13.594V9.496c0-4.155 3.352-7.5 7.5-7.5zM13.5 18.5l-3 .002a1.5 1.5 0 0 0 2.993.145l.007-.147zM12 3.496c-3.32 0-6 2.674-6 6v4.41L4.656 17h14.697L18 13.907V9.509l-.003-.225A5.988 5.988 0 0 0 12 3.496z",
1244
+ fill: "currentColor"
1245
+ })
1246
+ ], -1), pn = [
1247
+ dn
1248
+ ];
1249
+ function fn(e, o) {
1250
+ return y(), D("svg", cn, pn);
1251
+ }
1252
+ const mn = /* @__PURE__ */ T(un, [["render", fn]]), hn = {}, gn = {
1253
+ xmlns: "http://www.w3.org/2000/svg",
1254
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1255
+ viewBox: "0 0 24 24"
1256
+ }, wn = /* @__PURE__ */ d("g", {
1257
+ fill: "none",
1258
+ stroke: "currentColor",
1259
+ "stroke-width": "2",
1260
+ "stroke-linecap": "round",
1261
+ "stroke-linejoin": "round"
1262
+ }, [
1263
+ /* @__PURE__ */ d("path", { d: "M8 6h12" }),
1264
+ /* @__PURE__ */ d("path", { d: "M6 12h12" }),
1265
+ /* @__PURE__ */ d("path", { d: "M4 18h12" })
1266
+ ], -1), vn = [
1267
+ wn
1268
+ ];
1269
+ function yn(e, o) {
1270
+ return y(), D("svg", gn, vn);
1271
+ }
1272
+ const bn = /* @__PURE__ */ T(hn, [["render", yn]]), _n = {}, Cn = {
1273
+ xmlns: "http://www.w3.org/2000/svg",
1274
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1275
+ viewBox: "0 0 24 24"
1276
+ }, Nn = /* @__PURE__ */ d("g", { fill: "none" }, [
1277
+ /* @__PURE__ */ d("path", {
1278
+ d: "M15.53 4.22a.75.75 0 0 1 0 1.06L8.81 12l6.72 6.72a.75.75 0 1 1-1.06 1.06l-7.25-7.25a.75.75 0 0 1 0-1.06l7.25-7.25a.75.75 0 0 1 1.06 0z",
1279
+ fill: "currentColor"
1280
+ })
1281
+ ], -1), $n = [
1282
+ Nn
1283
+ ];
1284
+ function kn(e, o) {
1285
+ return y(), D("svg", Cn, $n);
1286
+ }
1287
+ const Sn = /* @__PURE__ */ T(_n, [["render", kn]]), Pn = {}, In = {
1288
+ xmlns: "http://www.w3.org/2000/svg",
1289
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1290
+ viewBox: "0 0 24 24"
1291
+ }, Dn = /* @__PURE__ */ d("g", { fill: "none" }, [
1292
+ /* @__PURE__ */ d("path", {
1293
+ d: "M16.53 11.72l-.084-.072a.75.75 0 0 0-.976.072l-2.72 2.72V7.75l-.007-.102A.75.75 0 0 0 12 7l-.102.007a.75.75 0 0 0-.648.743v6.692L8.53 11.72l-.085-.073a.75.75 0 0 0-.976 1.133l4 4.002l.084.072a.75.75 0 0 0 .976-.072l4.001-4l.073-.085a.75.75 0 0 0-.073-.977zM6.25 3A3.25 3.25 0 0 0 3 6.25v11.5A3.25 3.25 0 0 0 6.25 21h11.5A3.25 3.25 0 0 0 21 17.75V6.25A3.25 3.25 0 0 0 17.75 3H6.25zM4.5 6.25c0-.966.784-1.75 1.75-1.75h11.5c.966 0 1.75.784 1.75 1.75v11.5a1.75 1.75 0 0 1-1.75 1.75H6.25a1.75 1.75 0 0 1-1.75-1.75V6.25z",
1294
+ fill: "currentColor"
1295
+ })
1296
+ ], -1), Mn = [
1297
+ Dn
1298
+ ];
1299
+ function On(e, o) {
1300
+ return y(), D("svg", In, Mn);
1301
+ }
1302
+ const Tn = /* @__PURE__ */ T(Pn, [["render", On]]), zn = {}, An = {
1303
+ xmlns: "http://www.w3.org/2000/svg",
1304
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1305
+ viewBox: "0 0 24 24"
1306
+ }, Rn = /* @__PURE__ */ d("g", { fill: "none" }, [
1307
+ /* @__PURE__ */ d("path", {
1308
+ d: "M20.026 17.001c-2.762 4.784-8.879 6.423-13.663 3.661A9.965 9.965 0 0 1 3.13 17.68a.75.75 0 0 1 .365-1.132c3.767-1.348 5.785-2.91 6.956-5.146c1.232-2.353 1.551-4.93.689-8.463a.75.75 0 0 1 .769-.927a9.961 9.961 0 0 1 4.457 1.327c4.784 2.762 6.423 8.879 3.66 13.662z",
1309
+ fill: "currentColor"
1310
+ })
1311
+ ], -1), Bn = [
1312
+ Rn
1313
+ ];
1314
+ function Ln(e, o) {
1315
+ return y(), D("svg", An, Bn);
1316
+ }
1317
+ const jn = /* @__PURE__ */ T(zn, [["render", Ln]]), qn = {}, Vn = {
1318
+ xmlns: "http://www.w3.org/2000/svg",
1319
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1320
+ viewBox: "0 0 24 24"
1321
+ }, Un = /* @__PURE__ */ d("g", { fill: "none" }, [
1322
+ /* @__PURE__ */ d("path", {
1323
+ d: "M12 2a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 2zm5 10a5 5 0 1 1-10 0a5 5 0 0 1 10 0zm4.25.75a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zM12 19a.75.75 0 0 1 .75.75v1.5a.75.75 0 0 1-1.5 0v-1.5A.75.75 0 0 1 12 19zm-7.75-6.25a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5h1.5zm-.03-8.53a.75.75 0 0 1 1.06 0l1.5 1.5a.75.75 0 0 1-1.06 1.06l-1.5-1.5a.75.75 0 0 1 0-1.06zm1.06 15.56a.75.75 0 1 1-1.06-1.06l1.5-1.5a.75.75 0 1 1 1.06 1.06l-1.5 1.5zm14.5-15.56a.75.75 0 0 0-1.06 0l-1.5 1.5a.75.75 0 0 0 1.06 1.06l1.5-1.5a.75.75 0 0 0 0-1.06zm-1.06 15.56a.75.75 0 1 0 1.06-1.06l-1.5-1.5a.75.75 0 1 0-1.06 1.06l1.5 1.5z",
1324
+ fill: "currentColor"
1325
+ })
1326
+ ], -1), Fn = [
1327
+ Un
1328
+ ];
1329
+ function En(e, o) {
1330
+ return y(), D("svg", Vn, Fn);
1331
+ }
1332
+ const Gn = /* @__PURE__ */ T(qn, [["render", En]]), Hn = {}, Jn = {
1333
+ xmlns: "http://www.w3.org/2000/svg",
1334
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1335
+ viewBox: "0 0 24 24"
1336
+ }, xn = /* @__PURE__ */ d("g", { fill: "none" }, [
1337
+ /* @__PURE__ */ d("path", {
1338
+ d: "M12 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 17a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 10a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7-7a2 2 0 1 1 0 4a2 2 0 0 1 0-4zm7 0a2 2 0 1 1 0 4a2 2 0 0 1 0-4zM5 3a2 2 0 1 1 0 4a2 2 0 0 1 0-4z",
1339
+ fill: "currentColor"
1340
+ })
1341
+ ], -1), Wn = [
1342
+ xn
1343
+ ];
1344
+ function Kn(e, o) {
1345
+ return y(), D("svg", Jn, Wn);
1346
+ }
1347
+ const Xn = /* @__PURE__ */ T(Hn, [["render", Kn]]), Qn = {}, Zn = {
1348
+ xmlns: "http://www.w3.org/2000/svg",
1349
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1350
+ viewBox: "0 0 24 24"
1351
+ }, Yn = /* @__PURE__ */ d("g", { fill: "none" }, [
1352
+ /* @__PURE__ */ d("path", {
1353
+ d: "M10 2.75a7.25 7.25 0 0 1 5.63 11.819l4.9 4.9a.75.75 0 0 1-.976 1.134l-.084-.073l-4.901-4.9A7.25 7.25 0 1 1 10 2.75zm0 1.5a5.75 5.75 0 1 0 0 11.5a5.75 5.75 0 0 0 0-11.5z",
1354
+ fill: "currentColor"
1355
+ })
1356
+ ], -1), ea = [
1357
+ Yn
1358
+ ];
1359
+ function oa(e, o) {
1360
+ return y(), D("svg", Zn, ea);
1361
+ }
1362
+ const ta = /* @__PURE__ */ T(Qn, [["render", oa]]), na = {}, aa = {
1363
+ xmlns: "http://www.w3.org/2000/svg",
1364
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1365
+ viewBox: "0 0 24 24"
1366
+ }, la = /* @__PURE__ */ d("g", { fill: "none" }, [
1367
+ /* @__PURE__ */ d("path", {
1368
+ d: "M12 4.5a7.5 7.5 0 1 0 7.419 6.392c-.067-.454.265-.892.724-.892c.37 0 .696.256.752.623A9 9 0 1 1 18 5.292V4.25a.75.75 0 0 1 1.5 0v3a.75.75 0 0 1-.75.75h-3a.75.75 0 0 1 0-1.5h1.35a7.474 7.474 0 0 0-5.1-2z",
1369
+ fill: "currentColor"
1370
+ })
1371
+ ], -1), ra = [
1372
+ la
1373
+ ];
1374
+ function sa(e, o) {
1375
+ return y(), D("svg", aa, ra);
1376
+ }
1377
+ const De = /* @__PURE__ */ T(na, [["render", sa]]), ia = {}, ua = {
1378
+ xmlns: "http://www.w3.org/2000/svg",
1379
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1380
+ viewBox: "0 0 24 24"
1381
+ }, ca = /* @__PURE__ */ d("g", { fill: "none" }, [
1382
+ /* @__PURE__ */ d("path", {
1383
+ d: "M17.75 3A3.25 3.25 0 0 1 21 6.25v5.772a6.471 6.471 0 0 0-1.5-.709V8.5h-15v9.25c0 .966.784 1.75 1.75 1.75h5.063c.173.534.412 1.037.709 1.5H6.25A3.25 3.25 0 0 1 3 17.75V6.25A3.25 3.25 0 0 1 6.25 3h11.5zm0 1.5H6.25A1.75 1.75 0 0 0 4.5 6.25V7h15v-.75a1.75 1.75 0 0 0-1.75-1.75zm5.25 13a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0zm-5-3a.5.5 0 0 0-1 0v4.793l-1.646-1.647a.5.5 0 0 0-.708.708l2.5 2.5a.5.5 0 0 0 .708 0l2.5-2.5a.5.5 0 0 0-.708-.708L18 19.293V14.5z",
1384
+ fill: "currentColor"
1385
+ })
1386
+ ], -1), da = [
1387
+ ca
1388
+ ];
1389
+ function pa(e, o) {
1390
+ return y(), D("svg", ua, da);
1391
+ }
1392
+ const Xe = /* @__PURE__ */ T(ia, [["render", pa]]), fa = {}, ma = {
1393
+ xmlns: "http://www.w3.org/2000/svg",
1394
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1395
+ viewBox: "0 0 24 24"
1396
+ }, ha = /* @__PURE__ */ d("g", { fill: "none" }, [
1397
+ /* @__PURE__ */ d("path", {
1398
+ d: "M4.5 5.75c0-.69.56-1.25 1.25-1.25h2a.75.75 0 0 0 0-1.5h-2A2.75 2.75 0 0 0 3 5.75v2a.75.75 0 0 0 1.5 0v-2zm0 12.5c0 .69.56 1.25 1.25 1.25h2a.75.75 0 0 1 0 1.5h-2A2.75 2.75 0 0 1 3 18.25v-2a.75.75 0 0 1 1.5 0v2zM18.25 4.5c.69 0 1.25.56 1.25 1.25v2a.75.75 0 0 0 1.5 0v-2A2.75 2.75 0 0 0 18.25 3h-2a.75.75 0 0 0 0 1.5h2zm1.25 13.75c0 .69-.56 1.25-1.25 1.25h-2a.75.75 0 0 0 0 1.5h2A2.75 2.75 0 0 0 21 18.25v-2a.75.75 0 0 0-1.5 0v2z",
1399
+ fill: "currentColor"
1400
+ })
1401
+ ], -1), ga = [
1402
+ ha
1403
+ ];
1404
+ function wa(e, o) {
1405
+ return y(), D("svg", ma, ga);
1406
+ }
1407
+ const wi = /* @__PURE__ */ T(fa, [["render", wa]]), va = {}, ya = {
1408
+ xmlns: "http://www.w3.org/2000/svg",
1409
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1410
+ viewBox: "0 0 24 24"
1411
+ }, ba = /* @__PURE__ */ d("g", { fill: "none" }, [
1412
+ /* @__PURE__ */ d("path", {
1413
+ d: "M12 1.75a3.25 3.25 0 0 1 3.245 3.066L15.25 5h5.25a.75.75 0 0 1 .102 1.493L20.5 6.5h-.796l-1.28 13.02a2.75 2.75 0 0 1-2.561 2.474l-.176.006H8.313a2.75 2.75 0 0 1-2.714-2.307l-.023-.174L4.295 6.5H3.5a.75.75 0 0 1-.743-.648L2.75 5.75a.75.75 0 0 1 .648-.743L3.5 5h5.25A3.25 3.25 0 0 1 12 1.75zm6.197 4.75H5.802l1.267 12.872a1.25 1.25 0 0 0 1.117 1.122l.127.006h7.374c.6 0 1.109-.425 1.225-1.002l.02-.126L18.196 6.5zM13.75 9.25a.75.75 0 0 1 .743.648L14.5 10v7a.75.75 0 0 1-1.493.102L13 17v-7a.75.75 0 0 1 .75-.75zm-3.5 0a.75.75 0 0 1 .743.648L11 10v7a.75.75 0 0 1-1.493.102L9.5 17v-7a.75.75 0 0 1 .75-.75zm1.75-6a1.75 1.75 0 0 0-1.744 1.606L10.25 5h3.5A1.75 1.75 0 0 0 12 3.25z",
1414
+ fill: "currentColor"
1415
+ })
1416
+ ], -1), _a = [
1417
+ ba
1418
+ ];
1419
+ function Ca(e, o) {
1420
+ return y(), D("svg", ya, _a);
1421
+ }
1422
+ const Na = /* @__PURE__ */ T(va, [["render", Ca]]), $a = {}, ka = {
1423
+ xmlns: "http://www.w3.org/2000/svg",
1424
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1425
+ viewBox: "0 0 1024 1024"
1426
+ }, Sa = /* @__PURE__ */ d("path", {
1427
+ d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 0 0 0 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3c7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176s176-78.8 176-176s-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112s112 50.1 112 112s-50.1 112-112 112z",
1428
+ fill: "currentColor"
1429
+ }, null, -1), Pa = [
1430
+ Sa
1431
+ ];
1432
+ function Ia(e, o) {
1433
+ return y(), D("svg", ka, Pa);
1434
+ }
1435
+ const Da = /* @__PURE__ */ T($a, [["render", Ia]]), Ma = {}, Oa = {
1436
+ xmlns: "http://www.w3.org/2000/svg",
1437
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1438
+ viewBox: "0 0 24 24"
1439
+ }, Ta = /* @__PURE__ */ d("g", { fill: "none" }, [
1440
+ /* @__PURE__ */ d("path", {
1441
+ d: "M20 4.746a2.75 2.75 0 0 0-2.75-2.75H4.75A2.75 2.75 0 0 0 2 4.746v12.5a2.75 2.75 0 0 0 2.75 2.75h6.666l.105-.42c.096-.384.253-.748.463-1.08H4.75c-.69 0-1.25-.56-1.25-1.25v-12.5c0-.69.56-1.25 1.25-1.25h12.5c.69 0 1.25.56 1.25 1.25v7.113c.437-.4.956-.66 1.5-.781V4.746zm-4 9.608V6.73l-.007-.1A.744.744 0 0 0 15.25 6a.74.74 0 0 0-.75.73v8.541l.007.099c.017.125.067.24.142.337L16 14.355zm-8.507-5.71A.75.75 0 0 0 6.75 8a.748.748 0 0 0-.75.747v6.507l.007.101c.05.365.363.645.743.645c.414 0 .75-.334.75-.746V8.746l-.007-.101zm4.214 2.973a.73.73 0 0 0-.732-.62a.73.73 0 0 0-.725.733l.035 3.547l.008.099a.731.731 0 0 0 .732.62a.73.73 0 0 0 .725-.733l-.035-3.548l-.008-.098zm7.393 1.052l-5.903 5.902a2.686 2.686 0 0 0-.706 1.248l-.458 1.83a1.087 1.087 0 0 0 1.319 1.319l1.83-.458a2.685 2.685 0 0 0 1.248-.706l5.902-5.903A2.286 2.286 0 0 0 19.1 12.67z",
1442
+ fill: "currentColor"
1443
+ })
1444
+ ], -1), za = [
1445
+ Ta
1446
+ ];
1447
+ function Aa(e, o) {
1448
+ return y(), D("svg", Oa, za);
1449
+ }
1450
+ const Ra = /* @__PURE__ */ T(Ma, [["render", Aa]]), Ba = {}, La = {
1451
+ xmlns: "http://www.w3.org/2000/svg",
1452
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1453
+ viewBox: "0 0 24 24"
1454
+ }, ja = /* @__PURE__ */ d("g", { fill: "none" }, [
1455
+ /* @__PURE__ */ d("path", {
1456
+ d: "M4.397 4.554l.073-.084a.75.75 0 0 1 .976-.073l.084.073L12 10.939l6.47-6.47a.75.75 0 1 1 1.06 1.061L13.061 12l6.47 6.47a.75.75 0 0 1 .072.976l-.073.084a.75.75 0 0 1-.976.073l-.084-.073L12 13.061l-6.47 6.47a.75.75 0 0 1-1.06-1.061L10.939 12l-6.47-6.47a.75.75 0 0 1-.072-.976l.073-.084l-.073.084z",
1457
+ fill: "currentColor"
1458
+ })
1459
+ ], -1), qa = [
1460
+ ja
1461
+ ];
1462
+ function Va(e, o) {
1463
+ return y(), D("svg", La, qa);
1464
+ }
1465
+ const Me = /* @__PURE__ */ T(Ba, [["render", Va]]), Ua = {}, Fa = {
1466
+ xmlns: "http://www.w3.org/2000/svg",
1467
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1468
+ viewBox: "0 0 24 24"
1469
+ }, Ea = /* @__PURE__ */ d("g", { fill: "none" }, [
1470
+ /* @__PURE__ */ d("path", {
1471
+ d: "M22 6.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zM17 7l.001 2.504a.5.5 0 1 1-1 0V7h-2.505a.5.5 0 0 1 0-1H16V3.5a.5.5 0 0 1 1 0V6h2.503a.5.5 0 1 1 0 1h-2.502zm2.5 7v-1.732A6.518 6.518 0 0 0 21 11.19v7.56a3.25 3.25 0 0 1-3.066 3.245L17.75 22H6.25a3.25 3.25 0 0 1-3.245-3.066L3 18.75V7.25a3.25 3.25 0 0 1 3.066-3.245L6.25 4h4.248a6.451 6.451 0 0 0-.422 1.5H6.25a1.75 1.75 0 0 0-1.744 1.606L4.5 7.25V14H9a.75.75 0 0 1 .743.648l.007.102a2.25 2.25 0 0 0 4.495.154l.005-.154a.75.75 0 0 1 .648-.743L15 14h4.5zm-15 1.5v3.25a1.75 1.75 0 0 0 1.606 1.744l.144.006h11.5a1.75 1.75 0 0 0 1.744-1.607l.006-.143V15.5h-3.825a3.752 3.752 0 0 1-3.475 2.995l-.2.005a3.752 3.752 0 0 1-3.632-2.812l-.043-.188H4.5z",
1472
+ fill: "currentColor"
1473
+ })
1474
+ ], -1), Ga = [
1475
+ Ea
1476
+ ];
1477
+ function Ha(e, o) {
1478
+ return y(), D("svg", Fa, Ga);
1479
+ }
1480
+ const Ja = /* @__PURE__ */ T(Ua, [["render", Ha]]), xa = {}, Wa = {
1481
+ xmlns: "http://www.w3.org/2000/svg",
1482
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
1483
+ viewBox: "0 0 24 24"
1484
+ }, Ka = /* @__PURE__ */ d("g", { fill: "none" }, [
1485
+ /* @__PURE__ */ d("path", {
1486
+ d: "M6.087 7.75a5.752 5.752 0 0 1 11.326 0h.087a4 4 0 0 1 3.962 4.552a6.534 6.534 0 0 0-1.597-1.364A2.501 2.501 0 0 0 17.5 9.25h-.756a.75.75 0 0 1-.75-.713a4.25 4.25 0 0 0-8.489 0a.75.75 0 0 1-.749.713H6a2.5 2.5 0 0 0 0 5h4.4a6.458 6.458 0 0 0-.357 1.5H6a4 4 0 0 1 0-8h.087zM22 16.5a5.5 5.5 0 1 0-11 0a5.5 5.5 0 0 0 11 0zm-6-3a.5.5 0 0 1 1 0v4.793l1.646-1.647a.5.5 0 0 1 .708.708l-2.5 2.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 .708-.708L16 18.293V13.5z",
1487
+ fill: "currentColor"
1488
+ })
1489
+ ], -1), Xa = [
1490
+ Ka
1491
+ ];
1492
+ function Qa(e, o) {
1493
+ return y(), D("svg", Wa, Xa);
1494
+ }
1495
+ const Za = /* @__PURE__ */ T(xa, [["render", Qa]]), Qe = window.localStorage;
1496
+ function qe(e, o) {
1497
+ Qe.setItem(e, JSON.stringify(o));
1498
+ }
1499
+ function _o(e) {
1500
+ const o = Qe.getItem(e);
1501
+ return o ? JSON.parse(o) : null;
1502
+ }
1503
+ function Ya(e) {
1504
+ Qe.removeItem(e);
1505
+ }
1506
+ function Co() {
1507
+ return Date.parse(String(/* @__PURE__ */ new Date()));
1508
+ }
1509
+ const el = "local-";
1510
+ class ol {
1511
+ constructor(o = "") {
1512
+ ke(this, "namespace");
1513
+ ke(this, "mapKey");
1514
+ ke(this, "map");
1515
+ this.namespace = o, this.mapKey = el + this.namespace, this.map = _o(this.mapKey) || {};
1516
+ }
1517
+ set(o, t, s = 0) {
1518
+ const r = this.getReallyKey(o), c = {
1519
+ expires: s,
1520
+ time: Co()
1521
+ };
1522
+ qe(r, t), this.map[o] = c, qe(this.mapKey, this.map);
1523
+ }
1524
+ getReallyKey(o) {
1525
+ return this.namespace + "-" + o;
1526
+ }
1527
+ get(o, t) {
1528
+ const s = this.getReallyKey(o), r = this.map[o];
1529
+ if (r) {
1530
+ const c = _o(s);
1531
+ if (r.expires > 0) {
1532
+ if (Co() - r.time <= r.expires)
1533
+ return c === !1 || c ? c : t;
1534
+ this.delete(o);
1535
+ } else
1536
+ return c === !1 || c ? c : t;
1537
+ }
1538
+ return t;
1539
+ }
1540
+ // getAll(): ObjectKey {
1541
+ // const result: ObjectKey = {}
1542
+ // for (const i in this.map) {
1543
+ // result[i] = this.get(i)
1544
+ // }
1545
+ // return result
1546
+ // }
1547
+ delete(o) {
1548
+ const t = this.getReallyKey(o);
1549
+ delete this.map[o], qe(this.mapKey, this.map), Ya(t);
1550
+ }
1551
+ deleteAll() {
1552
+ for (const o in this.map)
1553
+ this.delete(o);
1554
+ }
1555
+ }
1556
+ const Ze = new ol("partex"), Ye = "/apiserver/";
1557
+ ie.common.cardColor = "#32323b";
1558
+ ie.common.primaryColor = "#b274ef";
1559
+ ie.common.primaryColorHover = "#b274ef";
1560
+ ie.common.borderRadius = "16px";
1561
+ ie.common.borderRadiusSmall = "8px";
1562
+ ie.DataTable.tdColor = "#2d2d31";
1563
+ const vi = {
1564
+ common: {
1565
+ borderRadius: "16px",
1566
+ borderRadiusSmall: "8px",
1567
+ primaryColor: "#8e54c8",
1568
+ primaryColorHover: "#9b66d0",
1569
+ primaryColorPressed: "#8e54c8",
1570
+ primaryColorSuppl: "#8e54c8",
1571
+ infoColor: "#2080f0",
1572
+ infoColorHover: "#57a4fd",
1573
+ infoColorPressed: "#2080f0",
1574
+ infoColorSuppl: "#2080f0",
1575
+ successColor: "#5dae57",
1576
+ successColorHover: "#70ce69",
1577
+ successColorPressed: "#5dae57",
1578
+ successColorSuppl: "#5dae57",
1579
+ warningColor: "#f0973a",
1580
+ warningColorHover: "#ffb05d",
1581
+ warningColorPressed: "#f0973a",
1582
+ warningColorSuppl: "#f0973a",
1583
+ errorColor: "#e65444",
1584
+ errorColorHover: "#fc6c5d",
1585
+ errorColorPressed: "#e65444",
1586
+ errorColorSuppl: "#e65444",
1587
+ cardColor: "#fff"
1588
+ },
1589
+ Button: {
1590
+ textColor: "rgb(var(--font))"
1591
+ },
1592
+ Notification: {
1593
+ borderRadius: "16px"
1594
+ }
1595
+ }, yi = ie;
1596
+ function bi() {
1597
+ return window.screen.availWidth <= 568;
1598
+ }
1599
+ function te(e, o, t = 3e4) {
1600
+ if (typeof t == "string") {
1601
+ let s = 0;
1602
+ const r = t.split(" ");
1603
+ switch (r[1]) {
1604
+ case "Minutes":
1605
+ s = 6e4;
1606
+ break;
1607
+ case "Hours":
1608
+ s = 36e5;
1609
+ break;
1610
+ case "Day":
1611
+ s = 864e5;
1612
+ break;
1613
+ case "Week":
1614
+ s = 6048e5;
1615
+ break;
1616
+ }
1617
+ t = Number(r[0]) * s;
1618
+ }
1619
+ Ze.set(e, o, t);
1620
+ }
1621
+ function Z(e, o) {
1622
+ return Ze.get(e, o);
1623
+ }
1624
+ const Ae = (e) => {
1625
+ Ze.delete(e);
1626
+ }, tl = (e = 0) => {
1627
+ const o = document.documentElement;
1628
+ o && (o.scrollTop = e, setTimeout(() => {
1629
+ o.scrollTop = e;
1630
+ }, 100));
1631
+ }, nl = () => {
1632
+ const e = document.querySelectorAll(".partex-loading");
1633
+ e && e.length > 0 && e.forEach((o) => {
1634
+ const t = o.parentNode;
1635
+ t == null || t.removeChild(o);
1636
+ });
1637
+ };
1638
+ function eo(e, o = !1) {
1639
+ let t = e.records;
1640
+ o && (t = t.map((r, c) => ({
1641
+ key: c,
1642
+ ...r
1643
+ })));
1644
+ const s = parseInt(e.size);
1645
+ return {
1646
+ query: {
1647
+ page: Number(e.current),
1648
+ pageCount: parseInt(e.pages),
1649
+ pageSize: s > 29 ? s : 30,
1650
+ itemCount: parseInt(e.total),
1651
+ pageSizes: [30, 40, 50],
1652
+ showQuickJumper: !0,
1653
+ showSizePicker: !0,
1654
+ pageSlot: 8,
1655
+ prefix: () => I("div", {}, { default: () => `共${e.total}条` })
1656
+ },
1657
+ records: t
1658
+ };
1659
+ }
1660
+ function oo(e) {
1661
+ if (!e.query)
1662
+ return e;
1663
+ const o = {};
1664
+ return e.query.page && (o.current = e.query.page), e.query.pageSize && (o.size = e.query.pageSize), e.query.isGetAll && (o.isGetAll = e.query.isGetAll), e.query.keyword && (o.keyword = e.query.keyword), e.query.columnKey && (o.columnKey = e.query.columnKey), e.query.order && (o.order = e.query.order), {
1665
+ ...e,
1666
+ query: o
1667
+ };
1668
+ }
1669
+ const ne = (e, o = "yyyy-MM-dd") => {
1670
+ if (!e)
1671
+ return "";
1672
+ typeof e == "string" && (e = e.replace(/年/g, "-").replace(/月/g, "-").replace(/日/g, ""));
1673
+ let t = new Date(e);
1674
+ if (typeof e == "string" && isNaN(t.getTime()) && (t = new Date(parseInt(e))), isNaN(t.getTime()))
1675
+ return "---";
1676
+ const s = {
1677
+ "M+": t.getMonth() + 1,
1678
+ // 月
1679
+ "d+": t.getDate(),
1680
+ // 日
1681
+ "h+": t.getHours(),
1682
+ // 时
1683
+ "m+": t.getMinutes(),
1684
+ // 分
1685
+ "s+": t.getSeconds()
1686
+ // 秒
1687
+ };
1688
+ /(y+)/.test(o) && (o = o.replace(
1689
+ RegExp.$1,
1690
+ (t.getFullYear() + "").substr(4 - RegExp.$1.length)
1691
+ ));
1692
+ for (const r in s)
1693
+ if (new RegExp("(" + r + ")").test(o)) {
1694
+ let c = s[r];
1695
+ RegExp.$1.length !== 1 && (c = ("00" + s[r]).substr(("" + s[r]).length)), o = o.replace(RegExp.$1, c);
1696
+ }
1697
+ return o;
1698
+ }, ve = (e, o = "default", t, s = !1, r = !1, c) => e ? I(
1699
+ E,
1700
+ {
1701
+ size: "small",
1702
+ type: o,
1703
+ text: !0,
1704
+ disabled: s,
1705
+ loading: r,
1706
+ onClick: t
1707
+ },
1708
+ {
1709
+ default: () => c || null,
1710
+ icon: () => I(
1711
+ oe,
1712
+ {},
1713
+ {
1714
+ default: () => I(
1715
+ e,
1716
+ {},
1717
+ {
1718
+ default: () => null
1719
+ }
1720
+ )
1721
+ }
1722
+ )
1723
+ }
1724
+ ) : I(
1725
+ E,
1726
+ {
1727
+ size: "small",
1728
+ type: o,
1729
+ text: !0,
1730
+ disabled: s,
1731
+ loading: r,
1732
+ onClick: t
1733
+ },
1734
+ {
1735
+ default: () => c || null
1736
+ }
1737
+ ), ye = (e, o) => I(
1738
+ Ne,
1739
+ {},
1740
+ {
1741
+ trigger: () => e,
1742
+ default: () => o
1743
+ }
1744
+ ), al = (e, o = !1, t = !1) => I(
1745
+ Ao,
1746
+ {
1747
+ placement: "left",
1748
+ "on-positive-click": () => e()
1749
+ },
1750
+ {
1751
+ default: () => I(
1752
+ "span",
1753
+ {},
1754
+ {
1755
+ default: () => U.lang === "zh-CN" ? "删除后无法恢复,是否确认删除?" : "Are you sure you want to delete ?"
1756
+ }
1757
+ ),
1758
+ trigger: () => ye(
1759
+ ve(Na, "error", void 0, o, t),
1760
+ U.lang === "zh-CN" ? "删除" : "Delete"
1761
+ )
1762
+ }
1763
+ ), Re = (e) => {
1764
+ const o = [];
1765
+ return e.forEach((t) => {
1766
+ t.type === "detail" && o.push(
1767
+ ye(
1768
+ ve(
1769
+ Da,
1770
+ "primary",
1771
+ t.onClick,
1772
+ t.disabled,
1773
+ t.loading
1774
+ ),
1775
+ U.lang === "zh-CN" ? "详情" : "Detail"
1776
+ )
1777
+ ), t.type === "edit" && o.push(
1778
+ ye(
1779
+ ve(
1780
+ Ra,
1781
+ "success",
1782
+ t.onClick,
1783
+ t.disabled,
1784
+ t.loading
1785
+ ),
1786
+ U.lang === "zh-CN" ? "编辑" : "Edit"
1787
+ )
1788
+ ), t.type === "delete" && o.push(al(t.onClick, t.disabled, t.loading)), t.type === "custom" && o.push(
1789
+ ye(
1790
+ ve(
1791
+ t.icon,
1792
+ t.color,
1793
+ t.onClick,
1794
+ t.disabled,
1795
+ t.loading,
1796
+ t.buttonText
1797
+ ),
1798
+ t.text
1799
+ )
1800
+ ), t.type === "tips" && o.push(
1801
+ I(
1802
+ Ao,
1803
+ {
1804
+ placement: "left",
1805
+ "on-positive-click": () => t.onClick()
1806
+ },
1807
+ {
1808
+ default: () => I(
1809
+ "span",
1810
+ {},
1811
+ {
1812
+ default: () => t.tips
1813
+ }
1814
+ ),
1815
+ trigger: () => ye(
1816
+ ve(
1817
+ t.icon,
1818
+ t.color,
1819
+ void 0,
1820
+ t.disabled,
1821
+ t.loading,
1822
+ t.buttonText
1823
+ ),
1824
+ t.text
1825
+ )
1826
+ }
1827
+ )
1828
+ );
1829
+ }), I(
1830
+ "div",
1831
+ {
1832
+ class: "action-flex"
1833
+ },
1834
+ {
1835
+ default: () => o
1836
+ }
1837
+ );
1838
+ }, _i = (e) => !e || Object.keys(e).length === 0 ? "" : window.btoa(encodeURI(JSON.stringify(e))), Ci = (e) => !e || Object.keys(e).length === 0 ? {} : JSON.parse(decodeURI(window.atob(e))), Ni = (e, o = 500) => {
1839
+ const t = e;
1840
+ let s;
1841
+ const r = function(...i) {
1842
+ s || (s = setTimeout(function() {
1843
+ s && clearTimeout(s), s = void 0, t.apply(r, i);
1844
+ }, o));
1845
+ };
1846
+ return r;
1847
+ };
1848
+ function $i(e, o) {
1849
+ e.requestFullscreen ? (o && (e.onfullscreenchange = o), e.requestFullscreen()) : e.mozRequestFullScreen ? (o && (e.onmozfullscreenchange = o), e.mozRequestFullScreen()) : e.webkitRequestFullscreen ? (o && (e.onwebkitfullscreenchange = o), e.webkitRequestFullscreen()) : e.msRequestFullscreen && (o && (e.onmsfullscreenchange = o), e.msRequestFullscreen());
1850
+ }
1851
+ function ki(e, o = 0) {
1852
+ const t = ["", "k", "m", "b", "t"], s = Math.floor(Math.log10(Math.abs(e)) / 3), r = Math.max(0, Math.min(s, t.length - 1)), c = t[r];
1853
+ return c ? (e / Math.pow(10, r * 3)).toFixed(o) + c : (e / Math.pow(10, r * 3)).toFixed(0);
1854
+ }
1855
+ const ll = (e, o, t = "json") => $e({
1856
+ url: `${Ye}${e}`,
1857
+ method: "GET",
1858
+ data: o,
1859
+ responseType: t
1860
+ }), W = (e, o = {}, t = "json", s = 3e5) => $e({
1861
+ url: `${Ye}${e}`,
1862
+ method: "POST",
1863
+ data: o,
1864
+ responseType: t,
1865
+ timeout: s
1866
+ }), xo = (e, o) => $e({
1867
+ headers: {
1868
+ "Content-Type": "multipart/form-data"
1869
+ },
1870
+ url: `${Ye}${e}`,
1871
+ method: "POST",
1872
+ data: o
1873
+ }), Si = (e) => !!(m.kind === -1 || m.kind === 99 || m.iot_menu_authorization.includes(e)), Pi = (e) => m.platform_tdm ? m.kind === -1 || m.kind === 99 || e === "home" ? !0 : m.tdm_menu_authorization.includes(e) : !1, Ii = (e) => m.platform_qms ? m.kind === -1 || m.kind === 99 || e === "home" ? !0 : m.qms_menu_authorization.includes(e) : !1, Di = (e) => m.platform_twin ? (m.kind === -1 || m.kind === 99 || e === "home", !0) : !1, rl = H({
1874
+ name: "HeaderPop",
1875
+ components: {
1876
+ NSpace: ae,
1877
+ NInput: Oe,
1878
+ NPopover: Ce,
1879
+ NTooltip: Ne,
1880
+ NButton: E,
1881
+ NIcon: oe,
1882
+ NDataTable: he,
1883
+ IconSearch: ta,
1884
+ IconArrowClockwise: De,
1885
+ IconArrowSquareDown: Tn
1886
+ // IconFullScreenMaximize
1887
+ },
1888
+ setup() {
1889
+ const { t: e } = ue(), o = v(!1), t = ge(), s = v([]), r = v(""), c = v(!1), i = v({
1890
+ page: 1,
1891
+ pageCount: 1,
1892
+ pageSize: 30
1893
+ }), u = v([
1894
+ {
1895
+ title: () => e("Common.importer.fileName"),
1896
+ key: "jobName",
1897
+ width: 300,
1898
+ render(w) {
1899
+ return I(
1900
+ "div",
1901
+ {},
1902
+ {
1903
+ default: () => [
1904
+ I(
1905
+ "p",
1906
+ {},
1907
+ {
1908
+ default: () => w.jobName || "--"
1909
+ }
1910
+ ),
1911
+ I(
1912
+ "p",
1913
+ {
1914
+ style: {
1915
+ color: "rgba(var(--font), 0.6)"
1916
+ }
1917
+ },
1918
+ {
1919
+ default: () => ne(w.commitTime, "yyyy-MM-dd hh:mm:ss")
1920
+ }
1921
+ )
1922
+ ]
1923
+ }
1924
+ );
1925
+ }
1926
+ },
1927
+ {
1928
+ title: () => e("Common.importer.status"),
1929
+ key: "jobStatus",
1930
+ align: "center",
1931
+ width: 90,
1932
+ render(w) {
1933
+ let M = e("Common.processing");
1934
+ return w.jobStatus === 1 && (M = e("Common.success")), w.jobStatus === 2 && (M = e("Common.failed")), I(
1935
+ "span",
1936
+ {},
1937
+ {
1938
+ default: () => M
1939
+ }
1940
+ );
1941
+ }
1942
+ },
1943
+ {
1944
+ title: () => e("Common.action"),
1945
+ key: "action",
1946
+ align: "center",
1947
+ fixed: "right",
1948
+ width: 90,
1949
+ render(w) {
1950
+ const M = [
1951
+ {
1952
+ type: "delete",
1953
+ onClick: () => {
1954
+ en([w.jobId]).then(() => {
1955
+ t.success({
1956
+ content: () => e("Notice.success"),
1957
+ duration: 3e3
1958
+ }), N();
1959
+ }).catch(() => {
1960
+ t.error({
1961
+ content: () => e("Notice.error"),
1962
+ duration: 3e3
1963
+ });
1964
+ });
1965
+ }
1966
+ }
1967
+ ];
1968
+ return w.jobStatus === 2 ? M.unshift({
1969
+ type: "custom",
1970
+ onClick: () => {
1971
+ on(w.jobId).then(() => {
1972
+ t.success({
1973
+ content: () => e("Notice.success"),
1974
+ duration: 3e3
1975
+ }), N();
1976
+ }).catch(() => {
1977
+ t.error({
1978
+ content: () => e("Notice.error"),
1979
+ duration: 3e3
1980
+ });
1981
+ });
1982
+ },
1983
+ icon: De,
1984
+ color: "info",
1985
+ text: e("Common.importer.retry")
1986
+ }) : M.unshift({
1987
+ type: "custom",
1988
+ disabled: w.jobStatus !== 1,
1989
+ onClick: () => {
1990
+ window.open(w.downloadUrl);
1991
+ },
1992
+ icon: Xe,
1993
+ color: "success",
1994
+ text: e("Common.importer.btnDownload")
1995
+ }), Re(M);
1996
+ }
1997
+ }
1998
+ ]), f = (w) => {
1999
+ i.value.page = w, N();
2000
+ }, h = (w) => {
2001
+ i.value.pageSize = w, i.value.page = 1, N();
2002
+ }, C = () => {
2003
+ i.value.page = 1, N();
2004
+ }, N = () => {
2005
+ c.value || (c.value = !0, tn({
2006
+ jobType: "EXPORT",
2007
+ jobName: r.value,
2008
+ query: i.value
2009
+ }).then((w) => {
2010
+ i.value = w.query, s.value = w.records, c.value = !1;
2011
+ }).catch(() => {
2012
+ c.value = !1;
2013
+ }));
2014
+ }, g = (w) => {
2015
+ xe(w), o.value = w;
2016
+ };
2017
+ return N(), ee(
2018
+ () => U.download,
2019
+ (w) => {
2020
+ o.value = w, w && N();
2021
+ }
2022
+ ), {
2023
+ jobName: r,
2024
+ loading: c,
2025
+ columns: u,
2026
+ coldata: s,
2027
+ query: i,
2028
+ popDownload: o,
2029
+ init: N,
2030
+ pageChange: f,
2031
+ pageSizeChange: h,
2032
+ doSearch: C,
2033
+ popDownloadUpdate: g
2034
+ };
2035
+ }
2036
+ }), sl = { class: "header-download" };
2037
+ function il(e, o, t, s, r, c) {
2038
+ const i = p("IconArrowSquareDown"), u = p("NIcon"), f = p("NButton"), h = p("NInput"), C = p("IconSearch"), N = p("NTooltip"), g = p("IconArrowClockwise"), w = p("NSpace"), M = p("NDataTable"), _ = p("NPopover");
2039
+ return y(), B(_, {
2040
+ trigger: "click",
2041
+ placement: "bottom-end",
2042
+ show: e.popDownload,
2043
+ "show-arrow": !1,
2044
+ "on-update:show": e.popDownloadUpdate,
2045
+ style: { width: "650px" }
2046
+ }, {
2047
+ trigger: l(() => [
2048
+ a(f, {
2049
+ text: "",
2050
+ style: { "margin-left": "15px" }
2051
+ }, {
2052
+ icon: l(() => [
2053
+ a(u, { class: "com-header-icon" }, {
2054
+ default: l(() => [
2055
+ a(i)
2056
+ ]),
2057
+ _: 1
2058
+ })
2059
+ ]),
2060
+ _: 1
2061
+ })
2062
+ ]),
2063
+ default: l(() => [
2064
+ a(w, { justify: "end" }, {
2065
+ default: l(() => [
2066
+ d("span", sl, A(e.$t("Common.validDays")), 1),
2067
+ a(h, {
2068
+ value: e.jobName,
2069
+ "onUpdate:value": o[0] || (o[0] = ($) => e.jobName = $),
2070
+ type: "text",
2071
+ clearable: "",
2072
+ placeholder: e.$t("Common.importer.fileName")
2073
+ }, null, 8, ["value", "placeholder"]),
2074
+ a(N, { trigger: "hover" }, {
2075
+ trigger: l(() => [
2076
+ a(f, {
2077
+ loading: e.loading,
2078
+ class: "button-primary",
2079
+ onClick: e.doSearch
2080
+ }, {
2081
+ icon: l(() => [
2082
+ a(u, null, {
2083
+ default: l(() => [
2084
+ a(C)
2085
+ ]),
2086
+ _: 1
2087
+ })
2088
+ ]),
2089
+ _: 1
2090
+ }, 8, ["loading", "onClick"])
2091
+ ]),
2092
+ default: l(() => [
2093
+ L(" " + A(e.$t("Common.search")), 1)
2094
+ ]),
2095
+ _: 1
2096
+ }),
2097
+ a(N, { trigger: "hover" }, {
2098
+ trigger: l(() => [
2099
+ a(f, { onClick: e.init }, {
2100
+ icon: l(() => [
2101
+ a(u, null, {
2102
+ default: l(() => [
2103
+ a(g)
2104
+ ]),
2105
+ _: 1
2106
+ })
2107
+ ]),
2108
+ _: 1
2109
+ }, 8, ["onClick"])
2110
+ ]),
2111
+ default: l(() => [
2112
+ L(" " + A(e.$t("Common.refresh")), 1)
2113
+ ]),
2114
+ _: 1
2115
+ })
2116
+ ]),
2117
+ _: 1
2118
+ }),
2119
+ a(M, {
2120
+ columns: e.columns,
2121
+ data: e.coldata,
2122
+ pagination: e.query,
2123
+ loading: e.loading,
2124
+ "on-update:page": e.pageChange,
2125
+ "on-update:page-size": e.pageSizeChange,
2126
+ "min-height": 300,
2127
+ "max-height": 505,
2128
+ class: "n-table-dark",
2129
+ "scroll-x": "600",
2130
+ style: { "margin-top": "8px" },
2131
+ remote: ""
2132
+ }, null, 8, ["columns", "data", "pagination", "loading", "on-update:page", "on-update:page-size"])
2133
+ ]),
2134
+ _: 1
2135
+ }, 8, ["show", "on-update:show"]);
2136
+ }
2137
+ const ul = /* @__PURE__ */ T(rl, [["render", il]]), cl = H({
2138
+ name: "HeaderPop",
2139
+ components: {
2140
+ NBadge: ft,
2141
+ NPopover: Ce,
2142
+ NSpace: ae,
2143
+ NTooltip: Ne,
2144
+ NButton: E,
2145
+ NIcon: oe,
2146
+ NDataTable: he,
2147
+ NRadioGroup: mt,
2148
+ NRadioButton: ht,
2149
+ IconAlert: mn,
2150
+ IconClear: bn,
2151
+ IconArrowClockwise: De
2152
+ },
2153
+ setup() {
2154
+ const { t: e } = ue(), o = v(0), t = v(0), s = v([]), r = v(""), c = v(!1), i = v({
2155
+ page: 1,
2156
+ pageCount: 1,
2157
+ pageSize: 30
2158
+ }), u = v([
2159
+ {
2160
+ title: () => e("Common.message.title2"),
2161
+ key: "messageContent",
2162
+ width: 300,
2163
+ render(w) {
2164
+ return [
2165
+ I(
2166
+ "div",
2167
+ {
2168
+ class: w.status === 1 ? "card-grey-txt" : ""
2169
+ },
2170
+ {
2171
+ default: () => w.messageContent
2172
+ }
2173
+ ),
2174
+ I(
2175
+ "div",
2176
+ {
2177
+ class: "card-grey-txt"
2178
+ },
2179
+ {
2180
+ default: () => ne(w.createTime, "yyyy-MM-dd hh:mm:ss")
2181
+ }
2182
+ )
2183
+ ];
2184
+ }
2185
+ },
2186
+ {
2187
+ title: () => e("Common.action"),
2188
+ key: "action",
2189
+ align: "center",
2190
+ fixed: "right",
2191
+ width: 90,
2192
+ render(w) {
2193
+ return w.status === 0 ? Re([
2194
+ {
2195
+ type: "custom",
2196
+ color: "primary",
2197
+ text: e("Common.message.read"),
2198
+ buttonText: e("Common.message.read"),
2199
+ onClick: () => {
2200
+ ln(w.messageId).then(() => {
2201
+ g();
2202
+ }).catch(() => {
2203
+ g();
2204
+ });
2205
+ }
2206
+ }
2207
+ ]) : I(
2208
+ "div",
2209
+ {},
2210
+ {
2211
+ default: () => `${w.updateByName} ${e("Common.message.read")}`
2212
+ }
2213
+ );
2214
+ }
2215
+ }
2216
+ ]), f = (w) => {
2217
+ i.value.page = 1, o.value = w, g();
2218
+ }, h = () => {
2219
+ Zt().then(() => {
2220
+ g();
2221
+ }).catch(() => {
2222
+ g();
2223
+ });
2224
+ }, C = (w) => {
2225
+ i.value.page = w, g();
2226
+ }, N = (w) => {
2227
+ i.value.pageSize = w, i.value.page = 1, g();
2228
+ }, g = () => {
2229
+ c.value || (c.value = !0, an({
2230
+ status: o.value,
2231
+ query: i.value
2232
+ }).then((w) => {
2233
+ t.value = w.unRead, i.value = w.data.query, s.value = w.data.records, c.value = !1;
2234
+ }).catch(() => {
2235
+ c.value = !1;
2236
+ }));
2237
+ };
2238
+ return g(), {
2239
+ badge: t,
2240
+ radios: o,
2241
+ jobName: r,
2242
+ loading: c,
2243
+ columns: u,
2244
+ coldata: s,
2245
+ query: i,
2246
+ clearAll: h,
2247
+ pageChange: C,
2248
+ pageSizeChange: N,
2249
+ init: g,
2250
+ radiosChecked: f
2251
+ };
2252
+ }
2253
+ }), dl = { class: "com-title" };
2254
+ function pl(e, o, t, s, r, c) {
2255
+ const i = p("IconAlert"), u = p("NIcon"), f = p("NButton"), h = p("NBadge"), C = p("NRadioButton"), N = p("NRadioGroup"), g = p("IconClear"), w = p("NTooltip"), M = p("IconArrowClockwise"), _ = p("NSpace"), $ = p("NDataTable"), z = p("NPopover");
2256
+ return y(), B(z, {
2257
+ trigger: "click",
2258
+ placement: "bottom-end",
2259
+ "show-arrow": !1,
2260
+ style: { width: "650px" }
2261
+ }, {
2262
+ trigger: l(() => [
2263
+ a(h, {
2264
+ value: e.badge,
2265
+ max: 99
2266
+ }, {
2267
+ default: l(() => [
2268
+ a(f, {
2269
+ text: "",
2270
+ style: { "margin-left": "30px" }
2271
+ }, {
2272
+ icon: l(() => [
2273
+ a(u, { class: "com-header-icon" }, {
2274
+ default: l(() => [
2275
+ a(i)
2276
+ ]),
2277
+ _: 1
2278
+ })
2279
+ ]),
2280
+ _: 1
2281
+ })
2282
+ ]),
2283
+ _: 1
2284
+ }, 8, ["value"])
2285
+ ]),
2286
+ default: l(() => [
2287
+ a(_, { justify: "space-between" }, {
2288
+ default: l(() => [
2289
+ d("div", dl, A(e.$t("Common.message.title")), 1),
2290
+ a(N, {
2291
+ value: e.radios,
2292
+ "onUpdate:value": o[0] || (o[0] = (R) => e.radios = R),
2293
+ name: "radios",
2294
+ "on-update:value": e.radiosChecked
2295
+ }, {
2296
+ default: l(() => [
2297
+ a(C, {
2298
+ key: "0",
2299
+ value: 0,
2300
+ label: e.$t("Common.message.unRead")
2301
+ }, null, 8, ["label"]),
2302
+ a(C, {
2303
+ key: "-1",
2304
+ value: -1,
2305
+ label: e.$t("Common.message.all")
2306
+ }, null, 8, ["label"]),
2307
+ a(C, {
2308
+ key: "1",
2309
+ value: 1,
2310
+ label: e.$t("Common.message.read")
2311
+ }, null, 8, ["label"])
2312
+ ]),
2313
+ _: 1
2314
+ }, 8, ["value", "on-update:value"]),
2315
+ d("div", null, [
2316
+ a(w, { trigger: "hover" }, {
2317
+ trigger: l(() => [
2318
+ a(f, { onClick: e.clearAll }, {
2319
+ icon: l(() => [
2320
+ a(u, null, {
2321
+ default: l(() => [
2322
+ a(g)
2323
+ ]),
2324
+ _: 1
2325
+ })
2326
+ ]),
2327
+ _: 1
2328
+ }, 8, ["onClick"])
2329
+ ]),
2330
+ default: l(() => [
2331
+ L(" " + A(e.$t("Common.message.readAll")), 1)
2332
+ ]),
2333
+ _: 1
2334
+ }),
2335
+ a(w, { trigger: "hover" }, {
2336
+ trigger: l(() => [
2337
+ a(f, { onClick: e.init }, {
2338
+ icon: l(() => [
2339
+ a(u, null, {
2340
+ default: l(() => [
2341
+ a(M)
2342
+ ]),
2343
+ _: 1
2344
+ })
2345
+ ]),
2346
+ _: 1
2347
+ }, 8, ["onClick"])
2348
+ ]),
2349
+ default: l(() => [
2350
+ L(" " + A(e.$t("Common.refresh")), 1)
2351
+ ]),
2352
+ _: 1
2353
+ })
2354
+ ])
2355
+ ]),
2356
+ _: 1
2357
+ }),
2358
+ a($, {
2359
+ columns: e.columns,
2360
+ data: e.coldata,
2361
+ pagination: e.query,
2362
+ loading: e.loading,
2363
+ "on-update:page": e.pageChange,
2364
+ "on-update:page-size": e.pageSizeChange,
2365
+ "min-height": 300,
2366
+ "max-height": 505,
2367
+ class: "n-table-dark",
2368
+ "scroll-x": "600",
2369
+ style: { "margin-top": "8px" },
2370
+ remote: ""
2371
+ }, null, 8, ["columns", "data", "pagination", "loading", "on-update:page", "on-update:page-size"])
2372
+ ]),
2373
+ _: 1
2374
+ });
2375
+ }
2376
+ const fl = /* @__PURE__ */ T(cl, [["render", pl]]), ml = H({
2377
+ name: "OcHeader",
2378
+ components: {
2379
+ Pop: ul,
2380
+ Message: fl,
2381
+ NDropdown: Ro,
2382
+ NMenu: gt,
2383
+ NIcon: oe,
2384
+ NButton: E,
2385
+ NModal: Bo,
2386
+ NCard: Lo,
2387
+ IconWeatherSunny: Gn,
2388
+ IconWeatherMoon: jn,
2389
+ IconGridDots: Xn,
2390
+ IconDismiss: Me
2391
+ },
2392
+ props: {
2393
+ qiankun: {
2394
+ type: Boolean,
2395
+ default: !1
2396
+ },
2397
+ language: {
2398
+ type: Boolean,
2399
+ default: !1
2400
+ },
2401
+ report: {
2402
+ type: Boolean,
2403
+ default: !1
2404
+ },
2405
+ menuOptions: {
2406
+ required: !0,
2407
+ type: Array,
2408
+ default: () => []
2409
+ }
2410
+ },
2411
+ setup(e) {
2412
+ const { t: o } = ue(), t = Vo(), s = ze(), r = ge(), c = v(""), i = v("/iot/home"), u = v(!1), f = v(!1), h = v(void 0), C = v(10), N = v([]), g = v(window.screen.availWidth < 1030), w = v(""), M = v(Z("lang", "zh-CN")), _ = (b) => {
2413
+ u.value = b, Eo(b), te("theme", b, 0);
2414
+ }, $ = () => {
2415
+ window.screen.availWidth <= 1300 && window.screen.availWidth >= 1030 ? w.value = "tiny-menu" : window.screen.availWidth < 1030 ? w.value = "hide-menu" : w.value = "";
2416
+ }, z = (b) => {
2417
+ const Q = b.split("/");
2418
+ i.value = `/${Q[1]}/${Q[2]}`, tl();
2419
+ }, R = (b) => {
2420
+ b.disabled || (z(b.key), s.push(b.key));
2421
+ }, x = (b) => {
2422
+ if (!b.disabled) {
2423
+ if (b.children)
2424
+ return;
2425
+ z(b.key), s.push(b.key), f.value = !1;
2426
+ }
2427
+ }, n = (b) => I(
2428
+ "div",
2429
+ {
2430
+ onClick: () => R(b)
2431
+ },
2432
+ {
2433
+ default: () => b.label
2434
+ }
2435
+ ), P = (b) => I(
2436
+ "div",
2437
+ {
2438
+ onClick: () => x(b)
2439
+ },
2440
+ {
2441
+ default: () => b.label
2442
+ }
2443
+ ), F = (b) => b.icon ? I(
2444
+ oe,
2445
+ {
2446
+ size: 24,
2447
+ onClick: () => R(b)
2448
+ },
2449
+ {
2450
+ default: () => b.icon && b.icon()
2451
+ }
2452
+ ) : !1, G = (b) => {
2453
+ e.qiankun ? window.location.href = `https://www.partexiot.cn${b}` : s.replace(b);
2454
+ }, k = () => {
2455
+ f.value = !1;
2456
+ }, X = () => {
2457
+ const b = [
2458
+ {
2459
+ label: o("Platform.iot"),
2460
+ key: U.platformUrl ? U.platformUrl : "/iot/home"
2461
+ }
2462
+ ];
2463
+ return m.platform_tdm && b.push({
2464
+ label: o("Platform.tdm"),
2465
+ key: "/tdm/home"
2466
+ }), m.platform_qms && b.push({
2467
+ label: o("Platform.qms"),
2468
+ key: "/qms/home"
2469
+ }), m.platform_twin && b.push({
2470
+ label: o("Platform.twin"),
2471
+ key: "/twin/home"
2472
+ }), m.platform_maintain && b.push({
2473
+ label: o("Platform.maintain"),
2474
+ key: "/maintain/home"
2475
+ }), console.log(b), b;
2476
+ }, ce = () => {
2477
+ const b = [
2478
+ {
2479
+ label: m.tenantName,
2480
+ key: "tenantName"
2481
+ },
2482
+ {
2483
+ label: o("Common.dropdownMenu.software"),
2484
+ key: "app",
2485
+ children: [
2486
+ {
2487
+ label: o("Common.dropdownMenu.android"),
2488
+ key: "android"
2489
+ },
2490
+ {
2491
+ label: o("Common.dropdownMenu.ios"),
2492
+ key: "ios"
2493
+ },
2494
+ {
2495
+ label: o("Common.dropdownMenu.chrome"),
2496
+ key: "chrome"
2497
+ },
2498
+ {
2499
+ label: o("Common.dropdownMenu.edge"),
2500
+ key: "edge"
2501
+ },
2502
+ {
2503
+ label: o("Common.dropdownMenu.dashboard_IoT"),
2504
+ key: "dashboard_IoT"
2505
+ },
2506
+ {
2507
+ label: o("Common.dropdownMenu.dashboard_Prt"),
2508
+ key: "dashboard_Prt"
2509
+ }
2510
+ ]
2511
+ }
2512
+ ];
2513
+ return e.report && b.push({
2514
+ label: o("Common.dropdownMenu.report"),
2515
+ key: "report"
2516
+ }), b.push(
2517
+ {
2518
+ label: o("Common.dropdownMenu.info"),
2519
+ key: "info"
2520
+ },
2521
+ {
2522
+ label: o("Common.dropdownMenu.logout"),
2523
+ key: "logout"
2524
+ }
2525
+ ), b;
2526
+ }, de = async (b) => {
2527
+ b === "logout" && Jo(), b === "info" && s.push("/custom/my"), b === "report" && s.push("/custom/report"), b === "android" && window.open("http://miiot.partexiot.cn/dk7u"), b === "ios" && window.open("https://apps.apple.com/cn/app/id1587313547"), b === "chrome" && window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/chrome_installer.exe"), b === "edge" && window.open("http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/MicrosoftEdgeSetup.exe"), b === "dashboard_IoT" && window.open(
2528
+ "http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94IoT_v1.2.0.zip"
2529
+ ), b === "dashboard_Prt" && window.open(
2530
+ "http://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/Software/%E9%9B%B6%E6%8D%B7%E4%BA%92%E8%81%94%E5%8D%B0%E5%88%B7%E7%89%88_v1.2.0.zip"
2531
+ );
2532
+ }, re = () => {
2533
+ Yt().then(() => {
2534
+ r.success({
2535
+ content: "续订请求已发送,七个工作日内将会有专人联系",
2536
+ duration: 3e3
2537
+ });
2538
+ }).catch(() => {
2539
+ r.error({
2540
+ content: () => o("Notice.error"),
2541
+ duration: 3e3
2542
+ });
2543
+ });
2544
+ }, pe = () => {
2545
+ if (m.tenantStatus === 0 && m.renewalStatus === 0) {
2546
+ const b = document.getElementById("app");
2547
+ b && b.classList.add("outrange"), r.info({
2548
+ action: () => I(
2549
+ ae,
2550
+ {
2551
+ size: [15, 15]
2552
+ },
2553
+ {
2554
+ default: () => I(
2555
+ E,
2556
+ {
2557
+ class: "button-primary",
2558
+ "on-click": () => {
2559
+ re();
2560
+ }
2561
+ },
2562
+ {
2563
+ default: () => "立即续订"
2564
+ }
2565
+ )
2566
+ }
2567
+ ),
2568
+ closable: !1,
2569
+ content: `您的订阅已于${ne(
2570
+ m.endTime
2571
+ )}到期,如需继续使用请联系我们`,
2572
+ title: "到期提示"
2573
+ });
2574
+ }
2575
+ if (m.tenantStatus === 2 && m.renewalStatus === 0) {
2576
+ let b = `您的订阅即将于${ne(
2577
+ m.endTime
2578
+ )}到期,请联系管理员进行续订`, Q = [
2579
+ I(
2580
+ E,
2581
+ {
2582
+ secondary: !0,
2583
+ "on-click": () => {
2584
+ r.destroyAll();
2585
+ }
2586
+ },
2587
+ {
2588
+ default: () => "了解"
2589
+ }
2590
+ )
2591
+ ];
2592
+ m.kind === 99 && (b = `您的订阅即将于${ne(
2593
+ m.endTime
2594
+ )}到期,为保证持续有效的提供服务请立即续订`, Q = [
2595
+ I(
2596
+ E,
2597
+ {
2598
+ secondary: !0,
2599
+ "on-click": () => {
2600
+ r.destroyAll();
2601
+ }
2602
+ },
2603
+ {
2604
+ default: () => "稍后提示我"
2605
+ }
2606
+ ),
2607
+ I(
2608
+ E,
2609
+ {
2610
+ class: "button-primary",
2611
+ "on-click": () => {
2612
+ re();
2613
+ }
2614
+ },
2615
+ {
2616
+ default: () => "立即续订"
2617
+ }
2618
+ )
2619
+ ]), r.info({
2620
+ action: () => I(
2621
+ ae,
2622
+ {
2623
+ size: [15, 15]
2624
+ },
2625
+ {
2626
+ default: () => Q
2627
+ }
2628
+ ),
2629
+ closable: !1,
2630
+ content: b,
2631
+ title: "温馨提示"
2632
+ });
2633
+ }
2634
+ }, fe = () => {
2635
+ s.push(U.platformUrl);
2636
+ }, O = () => {
2637
+ M.value = M.value === "zh-CN" ? "en-US" : "zh-CN", Ie(M.value);
2638
+ }, S = () => {
2639
+ c.value = o("Platform.iot"), t.path.indexOf("tdm") > -1 && (c.value = o("Platform.tdm")), t.path.indexOf("qms") > -1 && (c.value = o("Platform.qms")), t.path.indexOf("twin") > -1 && (c.value = o("Platform.twin")), t.path.indexOf("maintain") > -1 && (c.value = o("Platform.maintain")), Kt(c.value);
2640
+ }, q = Z("theme", !1);
2641
+ _(q), "backdropFilter" in document.documentElement.style || "WebkitBackdropFilter" in document.documentElement.style || document.body.classList.add("not-support-backdrop");
2642
+ const K = () => {
2643
+ g.value = window.screen.availWidth < 1030, $();
2644
+ }, J = () => {
2645
+ if (m.tenantStatus === 0) {
2646
+ const b = document.body;
2647
+ b && b.classList.add("outrange");
2648
+ }
2649
+ };
2650
+ return le(() => {
2651
+ Ie(M.value), pe(), z(t.path), S(), J(), N.value = X(), window.addEventListener("resize", K);
2652
+ }), be(() => {
2653
+ window.removeEventListener("resize", K);
2654
+ }), ee(
2655
+ () => U.lang,
2656
+ () => {
2657
+ S();
2658
+ }
2659
+ ), ee(
2660
+ () => t.path,
2661
+ (b) => {
2662
+ z(b), J();
2663
+ }
2664
+ ), ee(
2665
+ () => U.needUpdate,
2666
+ (b) => {
2667
+ if (b) {
2668
+ h.value = setInterval(() => {
2669
+ C.value = C.value - 1, C.value <= 0 && (clearInterval(window.versionMonitor), clearInterval(h.value), h.value = void 0, Q.destroy());
2670
+ }, 1e3);
2671
+ const Q = r.create({
2672
+ title: "检测到系统有新版本需要更新",
2673
+ content: () => `是否立即更新?更新需要重新加载页面,请确保所有项目都已经保存完毕。${C.value}秒后自动关闭`,
2674
+ meta: ne(/* @__PURE__ */ new Date(), "yyyy-MM-dd hh:mm:ss"),
2675
+ onClose: () => {
2676
+ clearInterval(window.versionMonitor);
2677
+ },
2678
+ action: () => I(
2679
+ ae,
2680
+ {
2681
+ justify: "space-between"
2682
+ },
2683
+ {
2684
+ default: () => [
2685
+ I(
2686
+ E,
2687
+ {
2688
+ quaternary: !0,
2689
+ onClick: () => {
2690
+ clearInterval(window.versionMonitor), Q.destroy();
2691
+ }
2692
+ },
2693
+ {
2694
+ default: () => "稍后"
2695
+ }
2696
+ ),
2697
+ I(
2698
+ E,
2699
+ {
2700
+ type: "primary",
2701
+ onClick: () => {
2702
+ window.location.reload();
2703
+ }
2704
+ },
2705
+ {
2706
+ default: () => "更新"
2707
+ }
2708
+ )
2709
+ ]
2710
+ }
2711
+ )
2712
+ });
2713
+ }
2714
+ }
2715
+ ), {
2716
+ userStore: m,
2717
+ headerStore: U,
2718
+ theme: u,
2719
+ activeMenu: i,
2720
+ lang: M,
2721
+ platformName: c,
2722
+ platformOption: N,
2723
+ availWidth: g,
2724
+ showMenu: f,
2725
+ menuType: w,
2726
+ changeLang: O,
2727
+ setDropdownMenu: ce,
2728
+ renderMenuLabel: n,
2729
+ renderMenuLabel2: P,
2730
+ renderMenuIcon: F,
2731
+ indexClick: fe,
2732
+ platformClick: G,
2733
+ dropdownClick: de,
2734
+ changeTheme: _,
2735
+ closeModel: k
2736
+ };
2737
+ }
2738
+ }), hl = { class: "oc-header" }, gl = { class: "menu" }, wl = /* @__PURE__ */ d("svg", {
2739
+ xmlns: "http://www.w3.org/2000/svg",
2740
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
2741
+ viewBox: "0 0 512 512"
2742
+ }, [
2743
+ /* @__PURE__ */ d("path", {
2744
+ fill: "none",
2745
+ stroke: "currentColor",
2746
+ "stroke-linecap": "round",
2747
+ "stroke-miterlimit": "10",
2748
+ "stroke-width": "32",
2749
+ d: "M80 160h352"
2750
+ }),
2751
+ /* @__PURE__ */ d("path", {
2752
+ fill: "none",
2753
+ stroke: "currentColor",
2754
+ "stroke-linecap": "round",
2755
+ "stroke-miterlimit": "10",
2756
+ "stroke-width": "32",
2757
+ d: "M80 256h352"
2758
+ }),
2759
+ /* @__PURE__ */ d("path", {
2760
+ fill: "none",
2761
+ stroke: "currentColor",
2762
+ "stroke-linecap": "round",
2763
+ "stroke-miterlimit": "10",
2764
+ "stroke-width": "32",
2765
+ d: "M80 352h352"
2766
+ })
2767
+ ], -1);
2768
+ function vl(e, o, t, s, r, c) {
2769
+ const i = p("IconGridDots"), u = p("NIcon"), f = p("NButton"), h = p("NDropdown"), C = p("NMenu"), N = p("Pop"), g = p("Message"), w = p("IconWeatherMoon"), M = p("IconWeatherSunny"), _ = p("IconDismiss"), $ = p("NCard"), z = p("NModal");
2770
+ return y(), D("header", hl, [
2771
+ e.platformOption.length > 1 ? (y(), B(h, {
2772
+ key: 0,
2773
+ trigger: "hover",
2774
+ placement: "bottom-start",
2775
+ size: "huge",
2776
+ options: e.platformOption,
2777
+ onSelect: e.platformClick
2778
+ }, {
2779
+ default: l(() => [
2780
+ a(f, { style: { padding: "0 14px 0 0" } }, {
2781
+ icon: l(() => [
2782
+ a(u, null, {
2783
+ default: l(() => [
2784
+ a(i)
2785
+ ]),
2786
+ _: 1
2787
+ })
2788
+ ]),
2789
+ _: 1
2790
+ })
2791
+ ]),
2792
+ _: 1
2793
+ }, 8, ["options", "onSelect"])) : j("", !0),
2794
+ d("a", {
2795
+ href: "javascript:;",
2796
+ class: "logo",
2797
+ onClick: o[0] || (o[0] = (...R) => e.indexClick && e.indexClick(...R))
2798
+ }),
2799
+ d("a", {
2800
+ href: "javascript:;",
2801
+ class: "platform-txt",
2802
+ onClick: o[1] || (o[1] = (...R) => e.indexClick && e.indexClick(...R))
2803
+ }, " | " + A(e.platformName), 1),
2804
+ d("div", gl, [
2805
+ a(C, {
2806
+ value: e.activeMenu,
2807
+ "onUpdate:value": o[2] || (o[2] = (R) => e.activeMenu = R),
2808
+ mode: "horizontal",
2809
+ options: e.menuOptions,
2810
+ "render-icon": e.renderMenuIcon,
2811
+ "render-label": e.renderMenuLabel,
2812
+ class: Mo(["header-menu", e.menuType])
2813
+ }, null, 8, ["value", "options", "render-icon", "render-label", "class"]),
2814
+ e.availWidth ? (y(), B(f, {
2815
+ key: 0,
2816
+ onClick: o[3] || (o[3] = (R) => e.showMenu = !0)
2817
+ }, {
2818
+ icon: l(() => [
2819
+ a(u, null, {
2820
+ default: l(() => [
2821
+ wl
2822
+ ]),
2823
+ _: 1
2824
+ })
2825
+ ]),
2826
+ _: 1
2827
+ })) : j("", !0),
2828
+ e.availWidth ? j("", !0) : (y(), B(N, { key: 1 })),
2829
+ e.availWidth ? j("", !0) : (y(), B(g, { key: 2 })),
2830
+ e.availWidth ? j("", !0) : (y(), B(f, {
2831
+ key: 3,
2832
+ style: { "margin-left": "15px" },
2833
+ onClick: o[4] || (o[4] = (R) => e.changeTheme(!e.theme))
2834
+ }, {
2835
+ icon: l(() => [
2836
+ wo(a(u, { color: "#8e54c8" }, {
2837
+ default: l(() => [
2838
+ a(w)
2839
+ ]),
2840
+ _: 1
2841
+ }, 512), [
2842
+ [vo, e.theme]
2843
+ ]),
2844
+ wo(a(u, { color: "#f2a651" }, {
2845
+ default: l(() => [
2846
+ a(M)
2847
+ ]),
2848
+ _: 1
2849
+ }, 512), [
2850
+ [vo, !e.theme]
2851
+ ])
2852
+ ]),
2853
+ _: 1
2854
+ })),
2855
+ e.language ? (y(), B(f, {
2856
+ key: 4,
2857
+ class: "com-header-icon",
2858
+ onClick: e.changeLang
2859
+ }, {
2860
+ default: l(() => [
2861
+ L(A(e.lang === "zh-CN" ? "EN" : "中文"), 1)
2862
+ ]),
2863
+ _: 1
2864
+ }, 8, ["onClick"])) : j("", !0),
2865
+ a(h, {
2866
+ trigger: "click",
2867
+ placement: "bottom-end",
2868
+ options: e.setDropdownMenu(),
2869
+ onSelect: e.dropdownClick
2870
+ }, {
2871
+ default: l(() => [
2872
+ a(f, {
2873
+ text: "",
2874
+ class: "user",
2875
+ title: e.userStore.name
2876
+ }, {
2877
+ default: l(() => [
2878
+ L(A(e.userStore.name), 1)
2879
+ ]),
2880
+ _: 1
2881
+ }, 8, ["title"])
2882
+ ]),
2883
+ _: 1
2884
+ }, 8, ["options", "onSelect"])
2885
+ ]),
2886
+ a(z, {
2887
+ show: e.showMenu,
2888
+ "onUpdate:show": o[6] || (o[6] = (R) => e.showMenu = R),
2889
+ "on-mask-click": e.closeModel
2890
+ }, {
2891
+ default: l(() => [
2892
+ a($, {
2893
+ title: e.platformName,
2894
+ bordered: !1,
2895
+ class: "oc-header-modal-content"
2896
+ }, {
2897
+ "header-extra": l(() => [
2898
+ a(f, {
2899
+ quaternary: "",
2900
+ onClick: e.closeModel
2901
+ }, {
2902
+ icon: l(() => [
2903
+ a(u, null, {
2904
+ default: l(() => [
2905
+ a(_)
2906
+ ]),
2907
+ _: 1
2908
+ })
2909
+ ]),
2910
+ _: 1
2911
+ }, 8, ["onClick"])
2912
+ ]),
2913
+ default: l(() => [
2914
+ a(C, {
2915
+ value: e.activeMenu,
2916
+ "onUpdate:value": o[5] || (o[5] = (R) => e.activeMenu = R),
2917
+ options: e.menuOptions,
2918
+ "render-label": e.renderMenuLabel2
2919
+ }, null, 8, ["value", "options", "render-label"])
2920
+ ]),
2921
+ _: 1
2922
+ }, 8, ["title"])
2923
+ ]),
2924
+ _: 1
2925
+ }, 8, ["show", "on-mask-click"])
2926
+ ]);
2927
+ }
2928
+ const yl = /* @__PURE__ */ T(ml, [["render", vl]]), bl = H({
2929
+ name: "OcFooter",
2930
+ props: {
2931
+ version: {
2932
+ type: String,
2933
+ default: ""
2934
+ }
2935
+ }
2936
+ }), _l = { class: "footer" }, Cl = /* @__PURE__ */ d("span", { style: { "font-family": "Arial, Helvetica, sans-serif" } }, "©", -1), Nl = /* @__PURE__ */ d("a", {
2937
+ href: "https://beian.miit.gov.cn/",
2938
+ target: "_blank",
2939
+ class: "footer-record"
2940
+ }, " 沪ICP备 18025935号-3 ", -1);
2941
+ function $l(e, o, t, s, r, c) {
2942
+ return y(), D("footer", _l, [
2943
+ L(" Copyright "),
2944
+ Cl,
2945
+ L(" 2020-2023 " + A(e.$t("Common.title")) + " ", 1),
2946
+ e.version ? (y(), D(se, { key: 0 }, [
2947
+ L("v" + A(e.version) + " ", 1)
2948
+ ], 64)) : j("", !0),
2949
+ Nl
2950
+ ]);
2951
+ }
2952
+ const kl = /* @__PURE__ */ T(bl, [["render", $l]]), Sl = H({
2953
+ name: "OcBack",
2954
+ components: {
2955
+ IconChevronLeft: Sn,
2956
+ NButton: E,
2957
+ NIcon: oe
2958
+ },
2959
+ props: {
2960
+ to: {
2961
+ type: String,
2962
+ default: ""
2963
+ }
2964
+ },
2965
+ setup(e) {
2966
+ const o = ze();
2967
+ return {
2968
+ back: () => {
2969
+ e.to ? o.push(e.to) : o.back();
2970
+ }
2971
+ };
2972
+ }
2973
+ });
2974
+ function Pl(e, o, t, s, r, c) {
2975
+ const i = p("IconChevronLeft"), u = p("NIcon"), f = p("NButton");
2976
+ return y(), B(f, {
2977
+ text: "",
2978
+ onClick: e.back
2979
+ }, {
2980
+ icon: l(() => [
2981
+ a(u, null, {
2982
+ default: l(() => [
2983
+ a(i)
2984
+ ]),
2985
+ _: 1
2986
+ })
2987
+ ]),
2988
+ default: l(() => [
2989
+ d("span", null, A(e.$t("Common.back")), 1)
2990
+ ]),
2991
+ _: 1
2992
+ }, 8, ["onClick"]);
2993
+ }
2994
+ const Il = /* @__PURE__ */ T(Sl, [["render", Pl]]), Wo = (e) => {
2995
+ const o = new FormData();
2996
+ return Object.keys(e).forEach((t) => {
2997
+ e.query && t === "query" ? o.append("query", JSON.stringify(e.query)) : o.append(t, e[t]);
2998
+ }), xo("api/manager/job/submit", o);
2999
+ }, Dl = (e) => new Promise((o, t) => {
3000
+ const s = oo(e);
3001
+ W("api/manager/job/page", s).then((r) => {
3002
+ const c = eo(r);
3003
+ o(c);
3004
+ }).catch(() => {
3005
+ t();
3006
+ });
3007
+ }), Ml = (e, o = {}) => ll(e, o, "blob"), Ol = H({
3008
+ name: "OcImporter",
3009
+ components: {
3010
+ IconDismiss: Me,
3011
+ IconArrowClockwise: De,
3012
+ IconMailInboxAdd: Ja,
3013
+ IconCloudArrowDown: Za,
3014
+ NModal: Bo,
3015
+ NCard: Lo,
3016
+ NSpace: ae,
3017
+ NUpload: wt,
3018
+ NButton: E,
3019
+ NTooltip: Ne,
3020
+ NIcon: oe,
3021
+ NDataTable: he
3022
+ },
3023
+ props: {
3024
+ show: {
3025
+ required: !0,
3026
+ type: Boolean,
3027
+ default: !1
3028
+ },
3029
+ type: {
3030
+ required: !0,
3031
+ type: String,
3032
+ default: ""
3033
+ },
3034
+ params: {
3035
+ required: !1,
3036
+ type: String,
3037
+ default: ""
3038
+ },
3039
+ file: {
3040
+ required: !0,
3041
+ type: String,
3042
+ default: ""
3043
+ },
3044
+ steam: {
3045
+ type: Boolean,
3046
+ default: !1
3047
+ }
3048
+ },
3049
+ emits: ["update:show"],
3050
+ setup(e, { emit: o }) {
3051
+ const { t } = ue(), s = ge(), r = v(!1), c = v(!1), i = v({
3052
+ page: 1,
3053
+ pageCount: 1,
3054
+ pageSize: 30
3055
+ }), u = v([
3056
+ {
3057
+ title: "#",
3058
+ width: 60,
3059
+ align: "center",
3060
+ key: "index",
3061
+ render(_, $) {
3062
+ return I(
3063
+ "span",
3064
+ {},
3065
+ {
3066
+ default: () => $ + 1
3067
+ }
3068
+ );
3069
+ }
3070
+ },
3071
+ {
3072
+ title: t("Common.importer.fileName"),
3073
+ key: "jobName",
3074
+ fixed: "left"
3075
+ },
3076
+ {
3077
+ title: t("Common.importer.status"),
3078
+ key: "jobStatus",
3079
+ width: 120,
3080
+ render(_) {
3081
+ let $ = t("Common.processing");
3082
+ return _.jobStatus === 1 && ($ = t("Common.success")), _.jobStatus === 2 && ($ = t("Common.failed")), I(
3083
+ "span",
3084
+ {},
3085
+ {
3086
+ default: () => $
3087
+ }
3088
+ );
3089
+ }
3090
+ },
3091
+ {
3092
+ title: t("Common.importer.createTime"),
3093
+ key: "commitTime",
3094
+ width: 200,
3095
+ render(_) {
3096
+ return I(
3097
+ "div",
3098
+ {},
3099
+ {
3100
+ default: () => ne(_.commitTime, "yyyy-MM-dd hh:mm:ss")
3101
+ }
3102
+ );
3103
+ }
3104
+ },
3105
+ {
3106
+ title: t("Common.action"),
3107
+ key: "action",
3108
+ align: "center",
3109
+ fixed: "right",
3110
+ width: 120,
3111
+ render(_) {
3112
+ return Re([
3113
+ {
3114
+ type: "custom",
3115
+ disabled: _.jobStatus === 0,
3116
+ onClick: () => {
3117
+ window.open(_.downloadUrl);
3118
+ },
3119
+ icon: Xe,
3120
+ color: "success",
3121
+ text: t("Common.importer.btnDownload")
3122
+ }
3123
+ ]);
3124
+ }
3125
+ }
3126
+ ]), f = v([]), h = () => {
3127
+ o("update:show", !1);
3128
+ }, C = (_) => {
3129
+ i.value.page = _, w();
3130
+ }, N = (_) => {
3131
+ i.value.pageSize = _, i.value.page = 1, w();
3132
+ }, g = (_) => new Promise(($, z) => {
3133
+ _.file.file && Wo({
3134
+ jobType: "IMPORT",
3135
+ jobTypeName: e.type,
3136
+ jobParams: e.params,
3137
+ file: _.file.file
3138
+ }).then(() => {
3139
+ w(), $();
3140
+ }).catch(() => {
3141
+ w(), z();
3142
+ }), z();
3143
+ }), w = () => {
3144
+ c.value = !0, Dl({
3145
+ jobType: "IMPORT",
3146
+ jobTypeName: e.type,
3147
+ query: i.value
3148
+ }).then((_) => {
3149
+ c.value = !1, f.value = _.records, i.value = _.query;
3150
+ }).catch(() => {
3151
+ c.value = !1;
3152
+ });
3153
+ }, M = () => {
3154
+ e.steam ? Ml(e.file).then((_) => {
3155
+ const $ = document.createElement("a");
3156
+ $.style.display = "none", $.download = "刀组品号导入模板.xls", $.href = URL.createObjectURL(_), document.body.appendChild($), $.click(), URL.revokeObjectURL($.href), document.body.removeChild($);
3157
+ }).catch(() => {
3158
+ s.error({
3159
+ content: () => t("Notice.error"),
3160
+ duration: 3e3
3161
+ });
3162
+ }) : window.open(`${e.file}?v=${Date.now()}`);
3163
+ };
3164
+ return ee(
3165
+ () => e.show,
3166
+ (_) => {
3167
+ r.value = _, _ && (i.value = {
3168
+ page: 1,
3169
+ pageCount: 1,
3170
+ pageSize: 30
3171
+ }, w());
3172
+ }
3173
+ ), {
3174
+ modal: r,
3175
+ columns: u,
3176
+ coldata: f,
3177
+ query: i,
3178
+ loading: c,
3179
+ init: w,
3180
+ closeModel: h,
3181
+ pageChange: C,
3182
+ pageSizeChange: N,
3183
+ beforeUpload: g,
3184
+ downloadFile: M
3185
+ };
3186
+ }
3187
+ }), Tl = { class: "header-download" };
3188
+ function zl(e, o, t, s, r, c) {
3189
+ const i = p("IconMailInboxAdd"), u = p("NIcon"), f = p("NButton"), h = p("NUpload"), C = p("IconCloudArrowDown"), N = p("IconArrowClockwise"), g = p("NTooltip"), w = p("IconDismiss"), M = p("NSpace"), _ = p("NDataTable"), $ = p("NCard"), z = p("NModal");
3190
+ return y(), B(z, {
3191
+ show: e.modal,
3192
+ "onUpdate:show": o[0] || (o[0] = (R) => e.modal = R),
3193
+ "on-mask-click": e.closeModel
3194
+ }, {
3195
+ default: l(() => [
3196
+ a($, { style: { width: "900px" } }, {
3197
+ header: l(() => [
3198
+ L(A(e.$t("Common.importer.title")) + " ", 1),
3199
+ d("span", Tl, A(e.$t("Common.validDays")), 1)
3200
+ ]),
3201
+ "header-extra": l(() => [
3202
+ a(M, { justify: "end" }, {
3203
+ default: l(() => [
3204
+ a(h, {
3205
+ "on-before-upload": e.beforeUpload,
3206
+ accept: ".xlsx,.xls",
3207
+ "show-file-list": !1
3208
+ }, {
3209
+ default: l(() => [
3210
+ a(f, null, {
3211
+ icon: l(() => [
3212
+ a(u, null, {
3213
+ default: l(() => [
3214
+ a(i)
3215
+ ]),
3216
+ _: 1
3217
+ })
3218
+ ]),
3219
+ default: l(() => [
3220
+ L(" " + A(e.$t("Common.importer.file")), 1)
3221
+ ]),
3222
+ _: 1
3223
+ })
3224
+ ]),
3225
+ _: 1
3226
+ }, 8, ["on-before-upload"]),
3227
+ me(e.$slots, "default"),
3228
+ a(f, { onClick: e.downloadFile }, {
3229
+ icon: l(() => [
3230
+ a(u, null, {
3231
+ default: l(() => [
3232
+ a(C)
3233
+ ]),
3234
+ _: 1
3235
+ })
3236
+ ]),
3237
+ default: l(() => [
3238
+ L(" " + A(e.$t("Common.importer.download")), 1)
3239
+ ]),
3240
+ _: 1
3241
+ }, 8, ["onClick"]),
3242
+ a(g, { trigger: "hover" }, {
3243
+ trigger: l(() => [
3244
+ a(f, {
3245
+ loading: e.loading,
3246
+ onClick: e.init
3247
+ }, {
3248
+ icon: l(() => [
3249
+ a(u, null, {
3250
+ default: l(() => [
3251
+ a(N)
3252
+ ]),
3253
+ _: 1
3254
+ })
3255
+ ]),
3256
+ _: 1
3257
+ }, 8, ["loading", "onClick"])
3258
+ ]),
3259
+ default: l(() => [
3260
+ L(" " + A(e.$t("Common.refresh")), 1)
3261
+ ]),
3262
+ _: 1
3263
+ }),
3264
+ a(f, {
3265
+ quaternary: "",
3266
+ onClick: e.closeModel
3267
+ }, {
3268
+ icon: l(() => [
3269
+ a(u, null, {
3270
+ default: l(() => [
3271
+ a(w)
3272
+ ]),
3273
+ _: 1
3274
+ })
3275
+ ]),
3276
+ _: 1
3277
+ }, 8, ["onClick"])
3278
+ ]),
3279
+ _: 3
3280
+ })
3281
+ ]),
3282
+ default: l(() => [
3283
+ a(_, {
3284
+ columns: e.columns,
3285
+ data: e.coldata,
3286
+ pagination: e.query,
3287
+ loading: e.loading,
3288
+ "on-update:page": e.pageChange,
3289
+ "on-update:page-size": e.pageSizeChange,
3290
+ "min-height": "500",
3291
+ "max-height": "500",
3292
+ "scroll-x": "600",
3293
+ remote: ""
3294
+ }, null, 8, ["columns", "data", "pagination", "loading", "on-update:page", "on-update:page-size"])
3295
+ ]),
3296
+ _: 3
3297
+ })
3298
+ ]),
3299
+ _: 3
3300
+ }, 8, ["show", "on-mask-click"]);
3301
+ }
3302
+ const Al = /* @__PURE__ */ T(Ol, [["render", zl]]), Rl = H({
3303
+ name: "OcLogin",
3304
+ components: {
3305
+ NTabs: vt,
3306
+ NTabPane: yt,
3307
+ NForm: jo,
3308
+ NFormItem: qo,
3309
+ NDropdown: Ro,
3310
+ NInput: Oe,
3311
+ NButton: E,
3312
+ NGrid: _e,
3313
+ NGi: Te,
3314
+ NPopover: Ce
3315
+ },
3316
+ props: {
3317
+ version: {
3318
+ required: !1,
3319
+ type: String,
3320
+ default: "效率监测"
3321
+ },
3322
+ info: {
3323
+ required: !1,
3324
+ type: Object,
3325
+ default: () => ({
3326
+ href: "",
3327
+ text: ""
3328
+ })
3329
+ }
3330
+ },
3331
+ setup() {
3332
+ const { t: e } = ue(), o = v(Z("lang", "zh-CN")), t = ge(), s = ze(), r = v("1"), c = v(), i = v(), u = v(), f = v(), h = v(!1), C = v(!1), N = v(!1), g = v({
3333
+ phone: "",
3334
+ name: "",
3335
+ password: ""
3336
+ }), w = v({
3337
+ name: {
3338
+ required: !0,
3339
+ // validator: (rule: string, value: string) => {
3340
+ // if (!value) {
3341
+ // return false
3342
+ // }
3343
+ // if (value.indexOf('@') > 0) {
3344
+ // return true
3345
+ // }
3346
+ // return false
3347
+ // },
3348
+ message: () => e("Common.login.userNameMessage"),
3349
+ trigger: "blur"
3350
+ },
3351
+ phone: {
3352
+ required: !0,
3353
+ validator: (O, S) => S ? /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(S) : !1,
3354
+ message: () => e("Common.login.mobileMessage"),
3355
+ trigger: "blur"
3356
+ },
3357
+ password: {
3358
+ required: !0,
3359
+ message: () => e("Common.login.passwordMessage"),
3360
+ trigger: "input"
3361
+ }
3362
+ }), M = v([]), _ = v([]), $ = v([]), z = v([]), R = () => {
3363
+ const O = Z("loginOption", {}), S = [];
3364
+ Object.keys(O).forEach((q) => {
3365
+ S.push({
3366
+ label: q,
3367
+ key: q
3368
+ });
3369
+ }), M.value = S, _.value = S;
3370
+ }, x = () => {
3371
+ const O = Z("phoneOption", {}), S = [];
3372
+ Object.keys(O).forEach((q) => {
3373
+ S.push({
3374
+ label: q,
3375
+ key: q
3376
+ });
3377
+ }), $.value = S, z.value = S;
3378
+ }, n = (O) => {
3379
+ te("token", O, 0), We().then((S) => {
3380
+ t.success({
3381
+ content: () => e("Notice.success"),
3382
+ duration: 3e3
3383
+ }), S.kind !== 1 && s.replace(U.platformUrl);
3384
+ }).catch(() => {
3385
+ t.error({
3386
+ content: () => e("Notice.error"),
3387
+ duration: 3e3
3388
+ }), g.value.password = "", h.value = !1;
3389
+ });
3390
+ }, P = () => {
3391
+ var O, S;
3392
+ h.value || (h.value = !0, r.value === "0" ? (O = i.value) == null || O.validate((q) => {
3393
+ q ? h.value = !1 : bo({
3394
+ type: r.value,
3395
+ ...g.value
3396
+ }).then((K) => {
3397
+ const J = Z("loginOption", {});
3398
+ J[g.value.name] = !0, te("loginOption", J, 0), n(K);
3399
+ }).catch(() => {
3400
+ g.value.password = "", h.value = !1;
3401
+ });
3402
+ }) : (S = c.value) == null || S.validate((q) => {
3403
+ q ? h.value = !1 : bo({
3404
+ type: r.value,
3405
+ ...g.value
3406
+ }).then((K) => {
3407
+ const J = Z("phoneOption", {});
3408
+ J[g.value.name] = !0, te("phoneOption", J, 0), n(K);
3409
+ }).catch(() => {
3410
+ g.value.password = "", h.value = !1;
3411
+ });
3412
+ }));
3413
+ }, F = (O) => {
3414
+ g.value.name = O;
3415
+ const S = _.value.filter(
3416
+ (q) => q.label.indexOf(O) > -1
3417
+ );
3418
+ M.value = S, S.length === 0 ? N.value = !1 : N.value = !0;
3419
+ }, G = (O) => {
3420
+ g.value.name = O, N.value = !1, u.value.focus(), setTimeout(() => {
3421
+ var S;
3422
+ (S = i.value) == null || S.restoreValidation();
3423
+ }, 80);
3424
+ }, k = (O) => {
3425
+ var S;
3426
+ M.value.length === 0 ? N.value = !1 : N.value = O, (S = i.value) == null || S.restoreValidation();
3427
+ }, X = (O) => {
3428
+ g.value.phone = O;
3429
+ const S = z.value.filter(
3430
+ (q) => q.label.indexOf(O) > -1
3431
+ );
3432
+ $.value = S, S.length === 0 ? C.value = !1 : C.value = !0;
3433
+ }, ce = (O) => {
3434
+ g.value.phone = O, C.value = !1, f.value.focus(), setTimeout(() => {
3435
+ var S;
3436
+ (S = c.value) == null || S.restoreValidation();
3437
+ }, 80);
3438
+ }, de = (O) => {
3439
+ var S;
3440
+ $.value.length === 0 ? C.value = !1 : C.value = O, (S = c.value) == null || S.restoreValidation();
3441
+ }, re = (O) => {
3442
+ var S, q;
3443
+ r.value = O, g.value = {
3444
+ phone: "",
3445
+ name: "",
3446
+ password: ""
3447
+ }, (S = i.value) == null || S.restoreValidation(), (q = c.value) == null || q.restoreValidation();
3448
+ }, pe = (O) => I(
3449
+ "div",
3450
+ {
3451
+ style: {
3452
+ position: "relative"
3453
+ }
3454
+ },
3455
+ {
3456
+ default: () => [
3457
+ I(
3458
+ "div",
3459
+ {},
3460
+ {
3461
+ default: () => O.label
3462
+ }
3463
+ ),
3464
+ I(
3465
+ Me,
3466
+ {
3467
+ class: "login-drop-menu",
3468
+ onclick: (S) => {
3469
+ S.stopPropagation(), S.stopImmediatePropagation();
3470
+ const q = Z("loginOption", {});
3471
+ delete q[O.label], te("loginOption", q, 0), R();
3472
+ const K = g.value.name, J = _.value.filter(
3473
+ (b) => b.label.indexOf(K) > -1
3474
+ );
3475
+ M.value = J;
3476
+ }
3477
+ },
3478
+ {
3479
+ default: () => ""
3480
+ }
3481
+ )
3482
+ ]
3483
+ }
3484
+ ), fe = (O) => I(
3485
+ "div",
3486
+ {
3487
+ style: {
3488
+ position: "relative"
3489
+ }
3490
+ },
3491
+ {
3492
+ default: () => [
3493
+ I(
3494
+ "div",
3495
+ {},
3496
+ {
3497
+ default: () => O.label
3498
+ }
3499
+ ),
3500
+ I(
3501
+ Me,
3502
+ {
3503
+ class: "login-drop-menu",
3504
+ onclick: (S) => {
3505
+ S.stopPropagation(), S.stopImmediatePropagation();
3506
+ const q = Z("phoneOption", {});
3507
+ delete q[O.label], te("phoneOption", q, 0), x();
3508
+ const K = g.value.name, J = z.value.filter(
3509
+ (b) => b.label.indexOf(K) > -1
3510
+ );
3511
+ $.value = J;
3512
+ }
3513
+ },
3514
+ {
3515
+ default: () => ""
3516
+ }
3517
+ )
3518
+ ]
3519
+ }
3520
+ );
3521
+ return Ke(), Ae("token"), R(), x(), Ie(o.value), {
3522
+ tabs: r,
3523
+ pwdRef: u,
3524
+ pwdPhoneRef: f,
3525
+ formRef: i,
3526
+ formPhoneRef: c,
3527
+ formValue: g,
3528
+ formRules: w,
3529
+ showPhoneDropdown: C,
3530
+ showNameDropdown: N,
3531
+ optionsName: M,
3532
+ optionsPhone: $,
3533
+ loading: h,
3534
+ submit: P,
3535
+ tabChange: re,
3536
+ nameChange: F,
3537
+ phoneChange: X,
3538
+ dropNameSelect: G,
3539
+ dropPhoneSelect: ce,
3540
+ showDropdownNameChange: k,
3541
+ showDropdownPhoneChange: de,
3542
+ renderDropdownNameLabel: pe,
3543
+ renderDropdownPhoneLabel: fe
3544
+ };
3545
+ }
3546
+ }), Bl = { class: "login" }, Ll = /* @__PURE__ */ d("div", { class: "login-left" }, [
3547
+ /* @__PURE__ */ d("img", {
3548
+ src: "https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/login.png",
3549
+ alt: "logo",
3550
+ class: "login-img"
3551
+ })
3552
+ ], -1), jl = { class: "login-right" }, ql = /* @__PURE__ */ d("div", { class: "login-title" }, null, -1), Vl = { class: "login-form" }, Ul = /* @__PURE__ */ d("br", null, null, -1), Fl = /* @__PURE__ */ d("br", null, null, -1), El = { class: "login-submit" }, Gl = ["href"], Hl = /* @__PURE__ */ d("div", { class: "google-play" }, null, -1), Jl = /* @__PURE__ */ d("img", {
3553
+ src: "https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/android_qr.png",
3554
+ alt: "AndroidQr",
3555
+ width: "300",
3556
+ height: "300"
3557
+ }, null, -1), xl = /* @__PURE__ */ d("div", { class: "app-store" }, null, -1), Wl = /* @__PURE__ */ d("img", {
3558
+ src: "https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com/ios_qr.png",
3559
+ alt: "iOSQr",
3560
+ width: "300",
3561
+ height: "300"
3562
+ }, null, -1), Kl = { class: "login-footer" }, Xl = /* @__PURE__ */ d("span", { style: { "font-family": "Arial, Helvetica, sans-serif" } }, "©", -1), Ql = /* @__PURE__ */ d("a", {
3563
+ href: "https://beian.miit.gov.cn/",
3564
+ target: "_blank",
3565
+ class: "footer-record"
3566
+ }, " 沪ICP备 18025935号-3 ", -1);
3567
+ function Zl(e, o, t, s, r, c) {
3568
+ const i = p("NTabPane"), u = p("NInput"), f = p("NDropdown"), h = p("NFormItem"), C = p("NForm"), N = p("NTabs"), g = p("NButton"), w = p("NPopover"), M = p("NGi"), _ = p("NGrid");
3569
+ return y(), D("div", Bl, [
3570
+ Ll,
3571
+ d("div", jl, [
3572
+ ql,
3573
+ d("div", Vl, [
3574
+ a(N, {
3575
+ value: e.tabs,
3576
+ "on-update:value": e.tabChange,
3577
+ type: "segment",
3578
+ "justify-content": "end",
3579
+ animated: ""
3580
+ }, {
3581
+ default: l(() => [
3582
+ a(i, {
3583
+ name: e.version,
3584
+ disabled: ""
3585
+ }, null, 8, ["name"]),
3586
+ a(i, {
3587
+ name: "1",
3588
+ tab: e.$t("Common.login.mobile")
3589
+ }, {
3590
+ default: l(() => [
3591
+ Ul,
3592
+ a(C, {
3593
+ ref: "formPhoneRef",
3594
+ model: e.formValue,
3595
+ rules: e.formRules,
3596
+ "show-require-mark": !1,
3597
+ "label-placement": "top",
3598
+ onKeyup: yo(e.submit, ["enter"])
3599
+ }, {
3600
+ default: l(() => [
3601
+ a(h, {
3602
+ label: e.$t("Common.login.mobile"),
3603
+ path: "phone"
3604
+ }, {
3605
+ default: l(() => [
3606
+ a(f, {
3607
+ show: e.showPhoneDropdown,
3608
+ options: e.optionsPhone,
3609
+ "render-label": e.renderDropdownPhoneLabel,
3610
+ width: "trigger",
3611
+ onClickoutside: o[3] || (o[3] = () => {
3612
+ e.showPhoneDropdown = !1;
3613
+ }),
3614
+ onSelect: e.dropPhoneSelect
3615
+ }, {
3616
+ default: l(() => [
3617
+ a(u, {
3618
+ value: e.formValue.phone,
3619
+ "onUpdate:value": o[0] || (o[0] = ($) => e.formValue.phone = $),
3620
+ placeholder: e.$t("Common.login.mobilePlaceholder"),
3621
+ "on-update:value": e.phoneChange,
3622
+ onClick: o[1] || (o[1] = ($) => e.showDropdownPhoneChange(!0)),
3623
+ onFocus: o[2] || (o[2] = ($) => e.showDropdownPhoneChange(!0))
3624
+ }, null, 8, ["value", "placeholder", "on-update:value"])
3625
+ ]),
3626
+ _: 1
3627
+ }, 8, ["show", "options", "render-label", "onSelect"])
3628
+ ]),
3629
+ _: 1
3630
+ }, 8, ["label"]),
3631
+ a(h, {
3632
+ label: e.$t("Common.login.password"),
3633
+ path: "password"
3634
+ }, {
3635
+ default: l(() => [
3636
+ a(u, {
3637
+ ref: "pwdPhoneRef",
3638
+ value: e.formValue.password,
3639
+ "onUpdate:value": o[4] || (o[4] = ($) => e.formValue.password = $),
3640
+ type: "password",
3641
+ "show-password-on": "click",
3642
+ placeholder: e.$t("Common.login.passwordPlaceholder"),
3643
+ onFocus: o[5] || (o[5] = ($) => e.showDropdownPhoneChange(!1))
3644
+ }, null, 8, ["value", "placeholder"])
3645
+ ]),
3646
+ _: 1
3647
+ }, 8, ["label"])
3648
+ ]),
3649
+ _: 1
3650
+ }, 8, ["model", "rules", "onKeyup"])
3651
+ ]),
3652
+ _: 1
3653
+ }, 8, ["tab"]),
3654
+ a(i, {
3655
+ name: "0",
3656
+ tab: e.$t("Common.login.userName")
3657
+ }, {
3658
+ default: l(() => [
3659
+ Fl,
3660
+ a(C, {
3661
+ ref: "formRef",
3662
+ model: e.formValue,
3663
+ rules: e.formRules,
3664
+ "show-require-mark": !1,
3665
+ "label-placement": "top",
3666
+ onKeyup: yo(e.submit, ["enter"])
3667
+ }, {
3668
+ default: l(() => [
3669
+ a(h, {
3670
+ label: e.$t("Common.login.userName"),
3671
+ path: "name"
3672
+ }, {
3673
+ default: l(() => [
3674
+ a(f, {
3675
+ show: e.showNameDropdown,
3676
+ options: e.optionsName,
3677
+ "render-label": e.renderDropdownNameLabel,
3678
+ width: "trigger",
3679
+ onClickoutside: o[9] || (o[9] = () => {
3680
+ e.showNameDropdown = !1;
3681
+ }),
3682
+ onSelect: e.dropNameSelect
3683
+ }, {
3684
+ default: l(() => [
3685
+ a(u, {
3686
+ value: e.formValue.name,
3687
+ "onUpdate:value": o[6] || (o[6] = ($) => e.formValue.name = $),
3688
+ placeholder: e.$t("Common.login.userNamePlaceholder"),
3689
+ "on-update:value": e.nameChange,
3690
+ onClick: o[7] || (o[7] = ($) => e.showDropdownNameChange(!0)),
3691
+ onFocus: o[8] || (o[8] = ($) => e.showDropdownNameChange(!0))
3692
+ }, null, 8, ["value", "placeholder", "on-update:value"])
3693
+ ]),
3694
+ _: 1
3695
+ }, 8, ["show", "options", "render-label", "onSelect"])
3696
+ ]),
3697
+ _: 1
3698
+ }, 8, ["label"]),
3699
+ a(h, {
3700
+ label: e.$t("Common.login.password"),
3701
+ path: "password"
3702
+ }, {
3703
+ default: l(() => [
3704
+ a(u, {
3705
+ ref: "pwdRef",
3706
+ value: e.formValue.password,
3707
+ "onUpdate:value": o[10] || (o[10] = ($) => e.formValue.password = $),
3708
+ type: "password",
3709
+ "show-password-on": "click",
3710
+ placeholder: e.$t("Common.login.passwordPlaceholder")
3711
+ }, null, 8, ["value", "placeholder"])
3712
+ ]),
3713
+ _: 1
3714
+ }, 8, ["label"])
3715
+ ]),
3716
+ _: 1
3717
+ }, 8, ["model", "rules", "onKeyup"])
3718
+ ]),
3719
+ _: 1
3720
+ }, 8, ["tab"])
3721
+ ]),
3722
+ _: 1
3723
+ }, 8, ["value", "on-update:value"]),
3724
+ d("div", El, [
3725
+ a(g, {
3726
+ loading: e.loading,
3727
+ class: "button-primary",
3728
+ onClick: e.submit
3729
+ }, {
3730
+ default: l(() => [
3731
+ L(A(e.$t("Common.login.in")), 1)
3732
+ ]),
3733
+ _: 1
3734
+ }, 8, ["loading", "onClick"])
3735
+ ]),
3736
+ e.info.href ? (y(), D("a", {
3737
+ key: 0,
3738
+ href: e.info.href,
3739
+ class: "login-other"
3740
+ }, A(e.info.text), 9, Gl)) : j("", !0),
3741
+ a(_, {
3742
+ "x-gap": "15",
3743
+ cols: 2
3744
+ }, {
3745
+ default: l(() => [
3746
+ a(M, null, {
3747
+ default: l(() => [
3748
+ a(w, {
3749
+ trigger: "hover",
3750
+ placement: "top"
3751
+ }, {
3752
+ trigger: l(() => [
3753
+ Hl
3754
+ ]),
3755
+ default: l(() => [
3756
+ Jl
3757
+ ]),
3758
+ _: 1
3759
+ })
3760
+ ]),
3761
+ _: 1
3762
+ }),
3763
+ a(M, null, {
3764
+ default: l(() => [
3765
+ a(w, {
3766
+ trigger: "hover",
3767
+ placement: "top"
3768
+ }, {
3769
+ trigger: l(() => [
3770
+ xl
3771
+ ]),
3772
+ default: l(() => [
3773
+ Wl
3774
+ ]),
3775
+ _: 1
3776
+ })
3777
+ ]),
3778
+ _: 1
3779
+ })
3780
+ ]),
3781
+ _: 1
3782
+ })
3783
+ ]),
3784
+ d("footer", Kl, [
3785
+ L(" Copyright "),
3786
+ Xl,
3787
+ L(" 2020-2023 " + A(e.$t("Common.title")) + " ", 1),
3788
+ Ql
3789
+ ])
3790
+ ])
3791
+ ]);
3792
+ }
3793
+ const Yl = /* @__PURE__ */ T(Rl, [["render", Zl]]), er = H({
3794
+ name: "OcNumberRoll",
3795
+ props: {
3796
+ value: {
3797
+ required: !0,
3798
+ type: [Number, String],
3799
+ default: 0
3800
+ },
3801
+ duration: {
3802
+ type: Number,
3803
+ default: 1e3
3804
+ },
3805
+ precision: {
3806
+ type: Number,
3807
+ default: 0
3808
+ },
3809
+ format: {
3810
+ type: Function,
3811
+ default: void 0
3812
+ }
3813
+ },
3814
+ setup(e) {
3815
+ const o = v(!1), t = v(0), s = (u) => 1 - Math.pow(1 - u, 5), r = (u) => e.format ? e.format(u) : u;
3816
+ function c(u, f, h = e.duration) {
3817
+ const C = () => {
3818
+ const g = performance.now(), w = Math.min(g - N, h), M = u + (f - u) * s(w / h);
3819
+ if (w === h) {
3820
+ t.value = r(Number(e.value)), o.value = !1;
3821
+ return;
3822
+ }
3823
+ const _ = Number(M.toFixed(e.precision));
3824
+ t.value = r(_), requestAnimationFrame(C);
3825
+ }, N = performance.now();
3826
+ C();
3827
+ }
3828
+ const i = (u = 0, f = e.value) => {
3829
+ o.value = !0, t.value = r(u), String(u) !== String(f) && c(u, Number(f));
3830
+ };
3831
+ return ee(
3832
+ () => e.value,
3833
+ (u, f) => {
3834
+ i(Number(f) || 0, Number(u));
3835
+ }
3836
+ ), le(() => {
3837
+ i();
3838
+ }), {
3839
+ displayedValueRef: t
3840
+ };
3841
+ }
3842
+ });
3843
+ function or(e, o, t, s, r, c) {
3844
+ return A(e.displayedValueRef);
3845
+ }
3846
+ const Ko = /* @__PURE__ */ T(er, [["render", or]]), tr = H({
3847
+ name: "OcLogo",
3848
+ components: {
3849
+ NGrid: _e,
3850
+ NGi: Te,
3851
+ NDivider: bt,
3852
+ NumberRoll: Ko
3853
+ },
3854
+ props: {
3855
+ text: {
3856
+ type: String,
3857
+ default: "智能效率监测平台"
3858
+ }
3859
+ },
3860
+ setup() {
3861
+ const e = v(Date.now()), o = v(void 0), t = (s) => ne(s, "yyyy-MM-dd hh:mm:ss");
3862
+ return le(() => {
3863
+ o.value = setInterval(() => {
3864
+ e.value = Date.now();
3865
+ }, 1e3);
3866
+ }), be(() => {
3867
+ clearInterval(o.value), o.value = void 0;
3868
+ }), {
3869
+ time: e,
3870
+ numFormat: t
3871
+ };
3872
+ }
3873
+ }), nr = (e) => (Ge("data-v-e71866dd"), e = e(), He(), e), ar = /* @__PURE__ */ nr(() => /* @__PURE__ */ d("div", { class: "logo" }, null, -1));
3874
+ function lr(e, o, t, s, r, c) {
3875
+ const i = p("NGi"), u = p("NDivider"), f = p("NumberRoll"), h = p("NGrid");
3876
+ return y(), B(h, {
3877
+ cols: 5,
3878
+ class: "dashboard-logo"
3879
+ }, {
3880
+ default: l(() => [
3881
+ a(i, {
3882
+ span: "1",
3883
+ class: "flex-center-left"
3884
+ }, {
3885
+ default: l(() => [
3886
+ ar
3887
+ ]),
3888
+ _: 1
3889
+ }),
3890
+ a(i, {
3891
+ span: "3",
3892
+ class: "flex-center"
3893
+ }, {
3894
+ default: l(() => [
3895
+ a(u, { class: "dashboard-title-show" }, {
3896
+ default: l(() => [
3897
+ L(A(e.text), 1)
3898
+ ]),
3899
+ _: 1
3900
+ })
3901
+ ]),
3902
+ _: 1
3903
+ }),
3904
+ a(i, {
3905
+ span: "1",
3906
+ class: "flex-center-right time"
3907
+ }, {
3908
+ default: l(() => [
3909
+ a(f, {
3910
+ value: e.time,
3911
+ format: e.numFormat
3912
+ }, null, 8, ["value", "format"])
3913
+ ]),
3914
+ _: 1
3915
+ })
3916
+ ]),
3917
+ _: 1
3918
+ });
3919
+ }
3920
+ const rr = /* @__PURE__ */ T(tr, [["render", lr], ["__scopeId", "data-v-e71866dd"]]), sr = (e) => {
3921
+ const o = JSON.parse(JSON.stringify(e));
3922
+ return o.oldPassword = Pe(o.oldPassword), o.newPassword = Pe(o.newPassword), o.comfirmPassword = Pe(o.comfirmPassword), W("api/auth/user/modifyPassword", o);
3923
+ }, ir = (e) => W("api/auth/user/update", e), ur = H({
3924
+ name: "OcMy",
3925
+ components: {
3926
+ NGrid: _e,
3927
+ NGi: Te,
3928
+ NForm: jo,
3929
+ NFormItem: qo,
3930
+ NInput: Oe,
3931
+ NButton: E
3932
+ },
3933
+ setup() {
3934
+ const { t: e } = ue(), o = ge(), t = v(), s = v(), r = v(!1), c = v({
3935
+ oldPassword: "",
3936
+ newPassword: "",
3937
+ comfirmPassword: ""
3938
+ }), i = v({
3939
+ oldPassword: {
3940
+ required: !0,
3941
+ message: () => e("Common.my.oldPasswordMessage"),
3942
+ trigger: "blur"
3943
+ },
3944
+ newPassword: {
3945
+ required: !0,
3946
+ message: () => e("Common.my.newPasswordMessage"),
3947
+ trigger: "blur"
3948
+ },
3949
+ comfirmPassword: {
3950
+ required: !0,
3951
+ message: () => e("Common.my.checkPasswordMessage"),
3952
+ trigger: "blur"
3953
+ }
3954
+ }), u = v(m), f = v({
3955
+ // realName: {
3956
+ // required: false,
3957
+ // trigger: 'blur',
3958
+ // validator: (rule, value) => {
3959
+ // if (!value) {
3960
+ // return true
3961
+ // }
3962
+ // return /^[\u4E00-\u9FA5]+$/.test(value)
3963
+ // },
3964
+ // message: '真实姓名应为中文'
3965
+ // },
3966
+ email: {
3967
+ required: !1,
3968
+ trigger: "blur",
3969
+ validator: (N, g) => g ? /^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/.test(
3970
+ g
3971
+ ) : !0,
3972
+ message: () => e("Common.my.emailMessage")
3973
+ },
3974
+ phone: {
3975
+ required: !1,
3976
+ trigger: "blur",
3977
+ validator: (N, g) => g ? /^[1][3,4,5,7,8,9][0-9]{9}$/.test(g) : !0,
3978
+ message: () => e("Common.my.phoneMessage")
3979
+ }
3980
+ });
3981
+ return {
3982
+ formRef: s,
3983
+ pwdRef: t,
3984
+ pwdValue: c,
3985
+ formValue: u,
3986
+ pwdRules: i,
3987
+ formRules: f,
3988
+ loading: r,
3989
+ pwdSubmit: () => {
3990
+ var N;
3991
+ r.value || (r.value = !0, (N = t.value) == null || N.validate((g) => {
3992
+ g ? r.value = !1 : sr(c.value).then(() => {
3993
+ var w;
3994
+ c.value = {
3995
+ oldPassword: "",
3996
+ newPassword: "",
3997
+ comfirmPassword: ""
3998
+ }, (w = t.value) == null || w.restoreValidation(), o.success({
3999
+ content: () => e("Notice.success"),
4000
+ duration: 3e3
4001
+ }), setTimeout(() => {
4002
+ window.location.href = "/login";
4003
+ }, 1e3);
4004
+ }).catch(() => {
4005
+ r.value = !1;
4006
+ });
4007
+ }));
4008
+ },
4009
+ formSubmit: () => {
4010
+ var N;
4011
+ r.value || (r.value = !0, (N = s.value) == null || N.validate((g) => {
4012
+ g ? r.value = !1 : ir(u.value).then(() => {
4013
+ o.success({
4014
+ content: () => e("Notice.success"),
4015
+ duration: 3e3
4016
+ }), r.value = !1, We().catch(() => null);
4017
+ }).catch(() => {
4018
+ r.value = !1;
4019
+ });
4020
+ }));
4021
+ }
4022
+ };
4023
+ }
4024
+ }), cr = { class: "com-card" }, dr = { class: "com-title" }, pr = /* @__PURE__ */ d("br", null, null, -1), fr = { class: "text-right" }, mr = { class: "com-card" }, hr = { class: "com-title" }, gr = /* @__PURE__ */ d("br", null, null, -1), wr = { class: "text-right" };
4025
+ function vr(e, o, t, s, r, c) {
4026
+ const i = p("NInput"), u = p("NFormItem"), f = p("NForm"), h = p("NButton"), C = p("NGi"), N = p("NGrid");
4027
+ return y(), B(N, {
4028
+ "x-gap": "15",
4029
+ "y-gap": "15",
4030
+ cols: 2
4031
+ }, {
4032
+ default: l(() => [
4033
+ a(C, { span: "1" }, {
4034
+ default: l(() => [
4035
+ d("div", cr, [
4036
+ d("div", dr, A(e.$t("Common.my.title")), 1),
4037
+ pr,
4038
+ a(f, {
4039
+ ref: "formRef",
4040
+ model: e.formValue,
4041
+ rules: e.formRules,
4042
+ "label-placement": "top"
4043
+ }, {
4044
+ default: l(() => [
4045
+ a(u, {
4046
+ label: e.$t("Common.my.tenantCode"),
4047
+ path: "tenantLoginCode"
4048
+ }, {
4049
+ default: l(() => [
4050
+ a(i, {
4051
+ value: e.formValue.tenantLoginCode,
4052
+ "onUpdate:value": o[0] || (o[0] = (g) => e.formValue.tenantLoginCode = g),
4053
+ readonly: ""
4054
+ }, null, 8, ["value"])
4055
+ ]),
4056
+ _: 1
4057
+ }, 8, ["label"]),
4058
+ a(u, {
4059
+ label: e.$t("Common.my.tenantName"),
4060
+ path: "tenantName"
4061
+ }, {
4062
+ default: l(() => [
4063
+ a(i, {
4064
+ value: e.formValue.tenantName,
4065
+ "onUpdate:value": o[1] || (o[1] = (g) => e.formValue.tenantName = g),
4066
+ readonly: ""
4067
+ }, null, 8, ["value"])
4068
+ ]),
4069
+ _: 1
4070
+ }, 8, ["label"]),
4071
+ a(u, {
4072
+ label: e.$t("Common.my.name"),
4073
+ path: "name"
4074
+ }, {
4075
+ default: l(() => [
4076
+ a(i, {
4077
+ value: e.formValue.name,
4078
+ "onUpdate:value": o[2] || (o[2] = (g) => e.formValue.name = g),
4079
+ readonly: ""
4080
+ }, null, 8, ["value"])
4081
+ ]),
4082
+ _: 1
4083
+ }, 8, ["label"]),
4084
+ a(u, {
4085
+ label: e.$t("Common.my.email"),
4086
+ path: "email"
4087
+ }, {
4088
+ default: l(() => [
4089
+ a(i, {
4090
+ value: e.formValue.email,
4091
+ "onUpdate:value": o[3] || (o[3] = (g) => e.formValue.email = g),
4092
+ placeholder: "邮箱"
4093
+ }, null, 8, ["value"])
4094
+ ]),
4095
+ _: 1
4096
+ }, 8, ["label"]),
4097
+ a(u, {
4098
+ label: e.$t("Common.my.realName"),
4099
+ path: "realName"
4100
+ }, {
4101
+ default: l(() => [
4102
+ a(i, {
4103
+ value: e.formValue.realName,
4104
+ "onUpdate:value": o[4] || (o[4] = (g) => e.formValue.realName = g),
4105
+ placeholder: "真实姓名"
4106
+ }, null, 8, ["value"])
4107
+ ]),
4108
+ _: 1
4109
+ }, 8, ["label"]),
4110
+ a(u, {
4111
+ label: e.$t("Common.my.phone"),
4112
+ path: "phone"
4113
+ }, {
4114
+ default: l(() => [
4115
+ a(i, {
4116
+ value: e.formValue.phone,
4117
+ "onUpdate:value": o[5] || (o[5] = (g) => e.formValue.phone = g),
4118
+ placeholder: "手机"
4119
+ }, null, 8, ["value"])
4120
+ ]),
4121
+ _: 1
4122
+ }, 8, ["label"])
4123
+ ]),
4124
+ _: 1
4125
+ }, 8, ["model", "rules"]),
4126
+ d("div", fr, [
4127
+ a(h, {
4128
+ loading: e.loading,
4129
+ class: "button-primary",
4130
+ onClick: e.formSubmit
4131
+ }, {
4132
+ default: l(() => [
4133
+ L(A(e.$t("Common.my.submit")), 1)
4134
+ ]),
4135
+ _: 1
4136
+ }, 8, ["loading", "onClick"])
4137
+ ])
4138
+ ])
4139
+ ]),
4140
+ _: 1
4141
+ }),
4142
+ a(C, { span: "1" }, {
4143
+ default: l(() => [
4144
+ d("div", mr, [
4145
+ d("div", hr, A(e.$t("Common.my.password")), 1),
4146
+ gr,
4147
+ a(f, {
4148
+ ref: "pwdRef",
4149
+ model: e.pwdValue,
4150
+ rules: e.pwdRules,
4151
+ "label-placement": "top"
4152
+ }, {
4153
+ default: l(() => [
4154
+ a(u, {
4155
+ label: e.$t("Common.my.oldPassword"),
4156
+ path: "oldPassword"
4157
+ }, {
4158
+ default: l(() => [
4159
+ a(i, {
4160
+ value: e.pwdValue.oldPassword,
4161
+ "onUpdate:value": o[6] || (o[6] = (g) => e.pwdValue.oldPassword = g),
4162
+ type: "password",
4163
+ placeholder: e.$t("Common.my.oldPassword"),
4164
+ "show-password-on": "click"
4165
+ }, null, 8, ["value", "placeholder"])
4166
+ ]),
4167
+ _: 1
4168
+ }, 8, ["label"]),
4169
+ a(u, {
4170
+ label: e.$t("Common.my.newPassword"),
4171
+ path: "newPassword"
4172
+ }, {
4173
+ default: l(() => [
4174
+ a(i, {
4175
+ value: e.pwdValue.newPassword,
4176
+ "onUpdate:value": o[7] || (o[7] = (g) => e.pwdValue.newPassword = g),
4177
+ type: "password",
4178
+ placeholder: e.$t("Common.my.newPassword"),
4179
+ "show-password-on": "click"
4180
+ }, null, 8, ["value", "placeholder"])
4181
+ ]),
4182
+ _: 1
4183
+ }, 8, ["label"]),
4184
+ a(u, {
4185
+ label: e.$t("Common.my.checkPassword"),
4186
+ path: "comfirmPassword"
4187
+ }, {
4188
+ default: l(() => [
4189
+ a(i, {
4190
+ value: e.pwdValue.comfirmPassword,
4191
+ "onUpdate:value": o[8] || (o[8] = (g) => e.pwdValue.comfirmPassword = g),
4192
+ type: "password",
4193
+ placeholder: e.$t("Common.my.checkPassword"),
4194
+ "show-password-on": "click"
4195
+ }, null, 8, ["value", "placeholder"])
4196
+ ]),
4197
+ _: 1
4198
+ }, 8, ["label"])
4199
+ ]),
4200
+ _: 1
4201
+ }, 8, ["model", "rules"]),
4202
+ d("div", wr, [
4203
+ a(h, {
4204
+ loading: e.loading,
4205
+ class: "button-primary",
4206
+ onClick: e.pwdSubmit
4207
+ }, {
4208
+ default: l(() => [
4209
+ L(A(e.$t("Common.my.submit")), 1)
4210
+ ]),
4211
+ _: 1
4212
+ }, 8, ["loading", "onClick"])
4213
+ ])
4214
+ ])
4215
+ ]),
4216
+ _: 1
4217
+ })
4218
+ ]),
4219
+ _: 1
4220
+ });
4221
+ }
4222
+ const yr = /* @__PURE__ */ T(ur, [["render", vr]]);
4223
+ function br(e) {
4224
+ return new Promise((o, t) => {
4225
+ W("api/manager/factory-params/detail", { keyName: e }).then((s) => {
4226
+ const r = JSON.parse(s.valueJson ?? "[]");
4227
+ o(r);
4228
+ }).catch(() => {
4229
+ t();
4230
+ });
4231
+ });
4232
+ }
4233
+ const _r = H({
4234
+ name: "OcReport",
4235
+ components: {
4236
+ NSpace: ae,
4237
+ NDataTable: he,
4238
+ NDatePicker: Oo,
4239
+ NInputGroup: To,
4240
+ NInputGroupLabel: zo
4241
+ },
4242
+ setup() {
4243
+ const { t: e } = ue(), o = v(!0), t = ge(), s = v([
4244
+ {
4245
+ title: "#",
4246
+ width: 60,
4247
+ align: "center",
4248
+ key: "index",
4249
+ render(f, h) {
4250
+ return I(
4251
+ "span",
4252
+ {},
4253
+ {
4254
+ default: () => h + 1
4255
+ }
4256
+ );
4257
+ }
4258
+ },
4259
+ {
4260
+ title: "名称",
4261
+ key: "name"
4262
+ },
4263
+ {
4264
+ title: "备注",
4265
+ key: "content"
4266
+ },
4267
+ {
4268
+ title: "操作",
4269
+ key: "action",
4270
+ align: "center",
4271
+ fixed: "right",
4272
+ width: 120,
4273
+ render(f) {
4274
+ return Re([
4275
+ {
4276
+ type: "custom",
4277
+ onClick: () => {
4278
+ i(f.key);
4279
+ },
4280
+ icon: Xe,
4281
+ color: "success",
4282
+ text: "下载"
4283
+ }
4284
+ ]);
4285
+ }
4286
+ }
4287
+ ]), r = v([]), c = v([Date.now(), Date.now()]), i = (f) => {
4288
+ o.value = !0, Wo({
4289
+ jobType: "EXPORT",
4290
+ jobTypeName: f,
4291
+ jobParams: JSON.stringify({
4292
+ startDate: c.value[0],
4293
+ endDate: c.value[1]
4294
+ })
4295
+ }).then(() => {
4296
+ o.value = !1, t.success({
4297
+ content: () => e("Notice.success"),
4298
+ duration: 3e3
4299
+ }), xe(!0);
4300
+ }).catch(() => {
4301
+ o.value = !1, t.error({
4302
+ content: () => e("Notice.error"),
4303
+ duration: 3e3
4304
+ });
4305
+ });
4306
+ }, u = (f) => f > Date.now();
4307
+ return br("individuation_report_download").then((f) => {
4308
+ r.value = f.map((h) => ({
4309
+ key: h.key,
4310
+ name: h.name,
4311
+ content: "默认导出最近30天的数据。每个企业租户下的所有账号,每天累计最多下载10次,采用异步下载"
4312
+ })), o.value = !1;
4313
+ }).catch(() => {
4314
+ o.value = !1;
4315
+ }), {
4316
+ columns: s,
4317
+ columnData: r,
4318
+ loading: o,
4319
+ range: c,
4320
+ isRangeDateDisabled: u
4321
+ };
4322
+ }
4323
+ }), Cr = { class: "com-card" }, Nr = /* @__PURE__ */ d("br", null, null, -1);
4324
+ function $r(e, o, t, s, r, c) {
4325
+ const i = p("NInputGroupLabel"), u = p("NDatePicker"), f = p("NInputGroup"), h = p("NSpace"), C = p("n-data-table");
4326
+ return y(), D("div", Cr, [
4327
+ a(h, { justify: "end" }, {
4328
+ default: l(() => [
4329
+ a(f, null, {
4330
+ default: l(() => [
4331
+ a(i, { class: "oc-group-label" }, {
4332
+ default: l(() => [
4333
+ L("日期")
4334
+ ]),
4335
+ _: 1
4336
+ }),
4337
+ a(u, {
4338
+ value: e.range,
4339
+ "onUpdate:value": o[0] || (o[0] = (N) => e.range = N),
4340
+ type: "daterange",
4341
+ "is-date-disabled": e.isRangeDateDisabled,
4342
+ style: { width: "300px" }
4343
+ }, null, 8, ["value", "is-date-disabled"])
4344
+ ]),
4345
+ _: 1
4346
+ })
4347
+ ]),
4348
+ _: 1
4349
+ }),
4350
+ Nr,
4351
+ a(C, {
4352
+ columns: e.columns,
4353
+ data: e.columnData,
4354
+ loading: e.loading,
4355
+ "min-height": "calc(100vh - 180px)",
4356
+ "max-height": "calc(100vh - 180px)"
4357
+ }, null, 8, ["columns", "data", "loading"])
4358
+ ]);
4359
+ }
4360
+ const kr = /* @__PURE__ */ T(_r, [["render", $r]]), Sr = H({
4361
+ name: "OcSkeleton",
4362
+ components: {
4363
+ NGrid: _e,
4364
+ NGi: Te,
4365
+ NSkeleton: _t
4366
+ },
4367
+ props: {
4368
+ cols: {
4369
+ type: Number,
4370
+ default: 6
4371
+ },
4372
+ num: {
4373
+ type: Array,
4374
+ default: () => [[12, 1]]
4375
+ }
4376
+ },
4377
+ setup() {
4378
+ return {};
4379
+ }
4380
+ }), Pr = { class: "com-skeleton" };
4381
+ function Ir(e, o, t, s, r, c) {
4382
+ const i = p("NSkeleton"), u = p("NGi"), f = p("NGrid");
4383
+ return y(), D("div", Pr, [
4384
+ a(f, {
4385
+ "x-gap": "15",
4386
+ "y-gap": "15",
4387
+ cols: e.cols
4388
+ }, {
4389
+ default: l(() => [
4390
+ (y(!0), D(se, null, Ue(e.num, (h, C) => (y(), D(se, {
4391
+ key: `skeleton_${C}`
4392
+ }, [
4393
+ (y(!0), D(se, null, Ue(e.num[C][0], (N, g) => (y(), B(u, {
4394
+ key: `skeleton_${C}_${g}`,
4395
+ span: e.num[C][1]
4396
+ }, {
4397
+ default: l(() => [
4398
+ a(i)
4399
+ ]),
4400
+ _: 2
4401
+ }, 1032, ["span"]))), 128))
4402
+ ], 64))), 128))
4403
+ ]),
4404
+ _: 1
4405
+ }, 8, ["cols"])
4406
+ ]);
4407
+ }
4408
+ const Dr = /* @__PURE__ */ T(Sr, [["render", Ir]]), Mr = H({
4409
+ name: "Oc404",
4410
+ components: {
4411
+ NButton: E
4412
+ },
4413
+ setup() {
4414
+ const e = () => {
4415
+ Y.push(U.platformUrl);
4416
+ }, o = v();
4417
+ return le(() => {
4418
+ o.value = setInterval(() => {
4419
+ Y.push(U.platformUrl);
4420
+ }, 3e3);
4421
+ }), be(() => {
4422
+ clearInterval(o.value);
4423
+ }), {
4424
+ goBack: e
4425
+ };
4426
+ }
4427
+ }), to = (e) => (Ge("data-v-4387c328"), e = e(), He(), e), Or = {
4428
+ class: "com-card flex-center error404",
4429
+ style: { flex: "1" }
4430
+ }, Tr = /* @__PURE__ */ to(() => /* @__PURE__ */ d("div", { class: "miss-img" }, null, -1)), zr = /* @__PURE__ */ to(() => /* @__PURE__ */ d("p", { class: "miss-title" }, "404 页面走丢了", -1)), Ar = /* @__PURE__ */ to(() => /* @__PURE__ */ d("p", { class: "miss-title2" }, "Something's missing.", -1));
4431
+ function Rr(e, o, t, s, r, c) {
4432
+ const i = p("n-button");
4433
+ return y(), D("div", Or, [
4434
+ Tr,
4435
+ zr,
4436
+ Ar,
4437
+ a(i, {
4438
+ tertiary: "",
4439
+ onClick: e.goBack
4440
+ }, {
4441
+ default: l(() => [
4442
+ L("返回首页")
4443
+ ]),
4444
+ _: 1
4445
+ }, 8, ["onClick"])
4446
+ ]);
4447
+ }
4448
+ const Br = /* @__PURE__ */ T(Mr, [["render", Rr], ["__scopeId", "data-v-4387c328"]]), Lr = H({
4449
+ name: "Oc500",
4450
+ components: {
4451
+ NButton: E
4452
+ },
4453
+ setup() {
4454
+ const e = () => {
4455
+ Y.push(U.platformUrl);
4456
+ }, o = v();
4457
+ return le(() => {
4458
+ o.value = setInterval(() => {
4459
+ Y.push(U.platformUrl);
4460
+ }, 3e3);
4461
+ }), be(() => {
4462
+ clearInterval(o.value);
4463
+ }), {
4464
+ goBack: e
4465
+ };
4466
+ }
4467
+ }), Be = (e) => (Ge("data-v-d1bdd42b"), e = e(), He(), e), jr = {
4468
+ class: "com-card flex-center error500",
4469
+ style: { flex: "1" }
4470
+ }, qr = /* @__PURE__ */ Be(() => /* @__PURE__ */ d("img", {
4471
+ src: "https://partex-cloud-static.oss-cn-hangzhou.aliyuncs.com//500.png",
4472
+ alt: "500"
4473
+ }, null, -1)), Vr = /* @__PURE__ */ Be(() => /* @__PURE__ */ d("div", { class: "miss-txt" }, "500", -1)), Ur = /* @__PURE__ */ Be(() => /* @__PURE__ */ d("p", { class: "miss-title" }, "服务暂时中断,请稍后重试.", -1)), Fr = /* @__PURE__ */ Be(() => /* @__PURE__ */ d("p", { class: "miss-title2" }, "Oops! No Internet connection found.", -1));
4474
+ function Er(e, o, t, s, r, c) {
4475
+ const i = p("NButton");
4476
+ return y(), D("div", jr, [
4477
+ qr,
4478
+ Vr,
4479
+ Ur,
4480
+ Fr,
4481
+ a(i, {
4482
+ tertiary: "",
4483
+ onClick: e.goBack
4484
+ }, {
4485
+ default: l(() => [
4486
+ L("返回首页")
4487
+ ]),
4488
+ _: 1
4489
+ }, 8, ["onClick"])
4490
+ ]);
4491
+ }
4492
+ const Gr = /* @__PURE__ */ T(Lr, [["render", Er], ["__scopeId", "data-v-d1bdd42b"]]), Hr = H({
4493
+ name: "OcAuth",
4494
+ setup() {
4495
+ const e = Vo(), o = ze(), { auth: t } = e.query;
4496
+ t ? te("token", t, 0) : Ae("token"), o.replace(U.platformUrl);
4497
+ }
4498
+ }), Jr = {
4499
+ class: "com-card flex-center",
4500
+ style: { flex: "1" }
4501
+ }, xr = /* @__PURE__ */ d("p", { class: "miss-title" }, "登录中...", -1), Wr = [
4502
+ xr
4503
+ ];
4504
+ function Kr(e, o, t, s, r, c) {
4505
+ return y(), D("div", Jr, Wr);
4506
+ }
4507
+ const Xr = /* @__PURE__ */ T(Hr, [["render", Kr]]);
4508
+ var Se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4509
+ function Qr(e) {
4510
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4511
+ }
4512
+ function Zr(e) {
4513
+ var o = typeof e;
4514
+ return e != null && (o == "object" || o == "function");
4515
+ }
4516
+ var Xo = Zr, Yr = typeof Se == "object" && Se && Se.Object === Object && Se, es = Yr, os = es, ts = typeof self == "object" && self && self.Object === Object && self, ns = os || ts || Function("return this")(), Qo = ns, as = Qo, ls = function() {
4517
+ return as.Date.now();
4518
+ }, rs = ls, ss = /\s/;
4519
+ function is(e) {
4520
+ for (var o = e.length; o-- && ss.test(e.charAt(o)); )
4521
+ ;
4522
+ return o;
4523
+ }
4524
+ var us = is, cs = us, ds = /^\s+/;
4525
+ function ps(e) {
4526
+ return e && e.slice(0, cs(e) + 1).replace(ds, "");
4527
+ }
4528
+ var fs = ps, ms = Qo, hs = ms.Symbol, Zo = hs, No = Zo, Yo = Object.prototype, gs = Yo.hasOwnProperty, ws = Yo.toString, we = No ? No.toStringTag : void 0;
4529
+ function vs(e) {
4530
+ var o = gs.call(e, we), t = e[we];
4531
+ try {
4532
+ e[we] = void 0;
4533
+ var s = !0;
4534
+ } catch {
4535
+ }
4536
+ var r = ws.call(e);
4537
+ return s && (o ? e[we] = t : delete e[we]), r;
4538
+ }
4539
+ var ys = vs, bs = Object.prototype, _s = bs.toString;
4540
+ function Cs(e) {
4541
+ return _s.call(e);
4542
+ }
4543
+ var Ns = Cs, $o = Zo, $s = ys, ks = Ns, Ss = "[object Null]", Ps = "[object Undefined]", ko = $o ? $o.toStringTag : void 0;
4544
+ function Is(e) {
4545
+ return e == null ? e === void 0 ? Ps : Ss : ko && ko in Object(e) ? $s(e) : ks(e);
4546
+ }
4547
+ var Ds = Is;
4548
+ function Ms(e) {
4549
+ return e != null && typeof e == "object";
4550
+ }
4551
+ var Os = Ms, Ts = Ds, zs = Os, As = "[object Symbol]";
4552
+ function Rs(e) {
4553
+ return typeof e == "symbol" || zs(e) && Ts(e) == As;
4554
+ }
4555
+ var Bs = Rs, Ls = fs, So = Xo, js = Bs, Po = NaN, qs = /^[-+]0x[0-9a-f]+$/i, Vs = /^0b[01]+$/i, Us = /^0o[0-7]+$/i, Fs = parseInt;
4556
+ function Es(e) {
4557
+ if (typeof e == "number")
4558
+ return e;
4559
+ if (js(e))
4560
+ return Po;
4561
+ if (So(e)) {
4562
+ var o = typeof e.valueOf == "function" ? e.valueOf() : e;
4563
+ e = So(o) ? o + "" : o;
4564
+ }
4565
+ if (typeof e != "string")
4566
+ return e === 0 ? e : +e;
4567
+ e = Ls(e);
4568
+ var t = Vs.test(e);
4569
+ return t || Us.test(e) ? Fs(e.slice(2), t ? 2 : 8) : qs.test(e) ? Po : +e;
4570
+ }
4571
+ var Gs = Es, Hs = Xo, Ve = rs, Io = Gs, Js = "Expected a function", xs = Math.max, Ws = Math.min;
4572
+ function Ks(e, o, t) {
4573
+ var s, r, c, i, u, f, h = 0, C = !1, N = !1, g = !0;
4574
+ if (typeof e != "function")
4575
+ throw new TypeError(Js);
4576
+ o = Io(o) || 0, Hs(t) && (C = !!t.leading, N = "maxWait" in t, c = N ? xs(Io(t.maxWait) || 0, o) : c, g = "trailing" in t ? !!t.trailing : g);
4577
+ function w(F) {
4578
+ var G = s, k = r;
4579
+ return s = r = void 0, h = F, i = e.apply(k, G), i;
4580
+ }
4581
+ function M(F) {
4582
+ return h = F, u = setTimeout(z, o), C ? w(F) : i;
4583
+ }
4584
+ function _(F) {
4585
+ var G = F - f, k = F - h, X = o - G;
4586
+ return N ? Ws(X, c - k) : X;
4587
+ }
4588
+ function $(F) {
4589
+ var G = F - f, k = F - h;
4590
+ return f === void 0 || G >= o || G < 0 || N && k >= c;
4591
+ }
4592
+ function z() {
4593
+ var F = Ve();
4594
+ if ($(F))
4595
+ return R(F);
4596
+ u = setTimeout(z, _(F));
4597
+ }
4598
+ function R(F) {
4599
+ return u = void 0, g && s ? w(F) : (s = r = void 0, i);
4600
+ }
4601
+ function x() {
4602
+ u !== void 0 && clearTimeout(u), h = 0, s = f = r = u = void 0;
4603
+ }
4604
+ function n() {
4605
+ return u === void 0 ? i : R(Ve());
4606
+ }
4607
+ function P() {
4608
+ var F = Ve(), G = $(F);
4609
+ if (s = arguments, r = this, f = F, G) {
4610
+ if (u === void 0)
4611
+ return M(f);
4612
+ if (N)
4613
+ return clearTimeout(u), u = setTimeout(z, o), w(f);
4614
+ }
4615
+ return u === void 0 && (u = setTimeout(z, o)), i;
4616
+ }
4617
+ return P.cancel = x, P.flush = n, P;
4618
+ }
4619
+ var Xs = Ks;
4620
+ const Qs = /* @__PURE__ */ Qr(Xs);
4621
+ let no = 3840, ao = 2160;
4622
+ const et = Ee({
4623
+ scale: 1
4624
+ });
4625
+ function Zs(e, o) {
4626
+ no = e, ao = o;
4627
+ }
4628
+ function ot() {
4629
+ let e = 1;
4630
+ const o = window.innerWidth, t = window.innerHeight, s = no, r = ao, c = parseFloat(
4631
+ (s / r).toFixed(5)
4632
+ );
4633
+ if (parseFloat((o / t).toFixed(5)) > c) {
4634
+ const u = parseFloat(
4635
+ (t * c / s).toFixed(5)
4636
+ );
4637
+ e = u > 1 ? 1 : u;
4638
+ } else {
4639
+ const u = parseFloat(
4640
+ (o / c / r).toFixed(5)
4641
+ );
4642
+ e = u > 1 ? 1 : u;
4643
+ }
4644
+ et.scale = e;
4645
+ }
4646
+ function Ys() {
4647
+ const e = Qs(ot, 200);
4648
+ return e(), window.addEventListener("resize", e), () => {
4649
+ no = 3840, ao = 2160, window.removeEventListener("resize", e);
4650
+ };
4651
+ }
4652
+ const ei = {
4653
+ Platform: {
4654
+ iot: "智能效率监测平台",
4655
+ tdm: "智能刀具管理平台",
4656
+ qms: "智能质量检测平台",
4657
+ twin: "智能数字大屏平台",
4658
+ maintain: "智能设备维保平台"
4659
+ },
4660
+ Notice: {
4661
+ success: "操作成功",
4662
+ error: "操作失败,请稍后重试"
4663
+ },
4664
+ Common: {
4665
+ validDays: "报表文件具有七天有效期",
4666
+ search: "查询",
4667
+ refresh: "刷新",
4668
+ filter: "筛选",
4669
+ reset: "重置",
4670
+ success: "成功",
4671
+ failed: "失败",
4672
+ processing: "处理中",
4673
+ action: "操作",
4674
+ back: "返回",
4675
+ title: "零捷互联智能云平台",
4676
+ message: {
4677
+ title: "消息列表",
4678
+ title2: "消息",
4679
+ unRead: "未读",
4680
+ all: "全部",
4681
+ read: "已读",
4682
+ readAll: "一键已读"
4683
+ },
4684
+ login: {
4685
+ mobile: "手机号",
4686
+ mobilePlaceholder: "请输入手机号码",
4687
+ mobileMessage: "请输入正确的手机号码",
4688
+ password: "密码",
4689
+ passwordPlaceholder: "请输入密码",
4690
+ passwordMessage: "请输入密码",
4691
+ userName: "用户名",
4692
+ userNamePlaceholder: "请输入用户名",
4693
+ userNameMessage: "请输入正确的用户名",
4694
+ in: "登录"
4695
+ },
4696
+ my: {
4697
+ title: "我的信息",
4698
+ tenantCode: "租户代码",
4699
+ tenantName: "租户名称",
4700
+ name: "名称",
4701
+ email: "邮箱",
4702
+ emailMessage: "邮箱格式不正确",
4703
+ realName: "真实姓名",
4704
+ phone: "手机",
4705
+ phoneMessage: "手机号码格式不正确",
4706
+ submit: "更新",
4707
+ password: "修改密码",
4708
+ oldPassword: "旧密码",
4709
+ newPassword: "新密码",
4710
+ checkPassword: "确认新密码",
4711
+ oldPasswordMessage: "请填写旧密码",
4712
+ newPasswordMessage: "请填写新密码",
4713
+ checkPasswordMessage: "请填写确认新密码"
4714
+ },
4715
+ dropdownMenu: {
4716
+ software: "零捷软件",
4717
+ android: "安卓APP",
4718
+ ios: "iOS APP",
4719
+ chrome: "Chrome浏览器",
4720
+ edge: "Edge浏览器",
4721
+ dashboard_IoT: "大屏机加工版本",
4722
+ dashboard_Prt: "大屏印刷版本",
4723
+ report: "个性化报表",
4724
+ info: "我的信息",
4725
+ logout: "退出"
4726
+ },
4727
+ importer: {
4728
+ title: "导入",
4729
+ file: "导入文件",
4730
+ download: "下载模版",
4731
+ btnDownload: "下载",
4732
+ fileName: "文件名称",
4733
+ status: "状态",
4734
+ createTime: "创建时间",
4735
+ retry: "重试"
4736
+ }
4737
+ }
4738
+ }, oi = {
4739
+ Platform: {
4740
+ iot: "SMART LEAN IOT PLATFORM",
4741
+ tdm: "SMART TOOL MANAGEMENT PLATFORM",
4742
+ qms: "SMART QUALITY MANAGEMENT PLATFORM",
4743
+ twin: "SMART DASHBOARD PLATFORM",
4744
+ maintain: "SMART MAINTAIN PLATFORM"
4745
+ },
4746
+ Notice: {
4747
+ success: "Success",
4748
+ error: "An error occurred, please try again later"
4749
+ },
4750
+ Common: {
4751
+ validDays: "Files are valid for seven days",
4752
+ search: "Search",
4753
+ refresh: "Refresh",
4754
+ filter: "Filter",
4755
+ reset: "Reset",
4756
+ success: "Success",
4757
+ failed: "Failed",
4758
+ processing: "Processing",
4759
+ action: "Action",
4760
+ back: "Back",
4761
+ title: "Partex",
4762
+ message: {
4763
+ title: "Messages",
4764
+ title2: "Message",
4765
+ unRead: "Unread",
4766
+ all: "All",
4767
+ read: "Read",
4768
+ readAll: "Read All"
4769
+ },
4770
+ login: {
4771
+ mobile: "Mobile",
4772
+ mobilePlaceholder: "Please Input Mobile",
4773
+ mobileMessage: "Mobile is not correct",
4774
+ password: "Password",
4775
+ passwordPlaceholder: "Please Input Password",
4776
+ passwordMessage: "Please Input Password",
4777
+ userName: "UserName",
4778
+ userNamePlaceholder: "Please Input UserName",
4779
+ userNameMessage: "UserName is not correct",
4780
+ in: "Sign in"
4781
+ },
4782
+ my: {
4783
+ title: "Info",
4784
+ tenantCode: "TenantCode",
4785
+ tenantName: "TenantName",
4786
+ name: "Name",
4787
+ email: "Email",
4788
+ emailMessage: "Email is not correct",
4789
+ realName: "RealName",
4790
+ phone: "Mobile",
4791
+ phoneMessage: "Mobile is not correct",
4792
+ submit: "Apply",
4793
+ password: "Change Password",
4794
+ oldPassword: "Current",
4795
+ newPassword: "New",
4796
+ checkPassword: "Check",
4797
+ oldPasswordMessage: "Please Input Current Password",
4798
+ newPasswordMessage: "Please Input New Password",
4799
+ checkPasswordMessage: "Please Check New Password"
4800
+ },
4801
+ dropdownMenu: {
4802
+ software: "Software",
4803
+ android: "Android APP",
4804
+ ios: "iOS APP",
4805
+ chrome: "Chrome",
4806
+ edge: "Edge",
4807
+ dashboard: "Dashboard",
4808
+ dashboard_IoT: "Dashboard_IoT",
4809
+ dashboard_Prt: "Dashboard_Print",
4810
+ report: "Reports",
4811
+ info: "UserInfo",
4812
+ logout: "Logout"
4813
+ },
4814
+ importer: {
4815
+ title: "Import",
4816
+ file: "Import File",
4817
+ download: "Download Template",
4818
+ btnDownload: "Download",
4819
+ fileName: "FileName",
4820
+ status: "Status",
4821
+ createTime: "CreateTime",
4822
+ retry: "Retry"
4823
+ }
4824
+ }
4825
+ }, ti = ei, ni = oi, Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4826
+ __proto__: null,
4827
+ Oc404: Br,
4828
+ Oc500: Gr,
4829
+ OcAuth: Xr,
4830
+ OcBack: Il,
4831
+ OcFooter: kl,
4832
+ OcHeader: yl,
4833
+ OcImporter: Al,
4834
+ OcLogin: Yl,
4835
+ OcLogo: rr,
4836
+ OcMy: yr,
4837
+ OcNumberRoll: Ko,
4838
+ OcReport: kr,
4839
+ OcSearchBar: Uo,
4840
+ OcSkeleton: Dr,
4841
+ OcTable: Ht,
4842
+ fnClearUser: Ke,
4843
+ fnComputedScale: ot,
4844
+ fnDownload: nn,
4845
+ fnGetUser: We,
4846
+ fnListenerScale: Ys,
4847
+ fnSetLang: Ie,
4848
+ fnSetNormalWidthAndHeight: Zs,
4849
+ fnSetPlatform: Wt,
4850
+ fnSetTheme: Eo,
4851
+ fnSetUser: Ho,
4852
+ fnUserLogout: Jo,
4853
+ headerStore: U,
4854
+ langCN: ti,
4855
+ langUS: ni,
4856
+ scaleStore: et,
4857
+ userStore: m
4858
+ }, Symbol.toStringTag, { value: "Module" })), ai = "1.0.0";
4859
+ let tt;
4860
+ async function nt() {
4861
+ const e = await fetch(
4862
+ `${window.location.protocol}//${window.location.host}`,
4863
+ {
4864
+ method: "HEAD",
4865
+ cache: "no-cache"
4866
+ }
4867
+ );
4868
+ return e.headers.get("etag") || e.headers.get("last-modified");
4869
+ }
4870
+ async function li() {
4871
+ const e = await nt();
4872
+ tt !== e && Xt(!0);
4873
+ }
4874
+ async function ri() {
4875
+ tt = await nt(), window.versionMonitor && clearInterval(window.versionMonitor), window.versionMonitor = setInterval(() => {
4876
+ li();
4877
+ }, 60 * 1e3);
4878
+ }
4879
+ function si({ components: e = [] } = {}) {
4880
+ const o = [];
4881
+ function t(r, c, i) {
4882
+ r.component(c) || r.component(c, i);
4883
+ }
4884
+ function s(r, c) {
4885
+ if (!o.includes(r) && (o.push(r), e.forEach((i) => {
4886
+ const { name: u, alias: f } = i;
4887
+ t(r, u, i), f && f.forEach((h) => {
4888
+ t(r, h, i);
4889
+ });
4890
+ }), c)) {
4891
+ const { versionMonitor: i = !0, enableRedirect: u = !0, local: f = "zh-CN" } = c;
4892
+ sn(u), xt(f), i && ri();
4893
+ }
4894
+ }
4895
+ return {
4896
+ version: ai,
4897
+ install: s
4898
+ };
4899
+ }
4900
+ const ii = si({
4901
+ components: Object.keys(Do).map(
4902
+ (e) => Do[e]
4903
+ )
4904
+ }), Mi = ii.install;
4905
+ export {
4906
+ xo as FILE,
4907
+ ll as GET,
4908
+ mn as IconAlert,
4909
+ De as IconArrowClockwise,
4910
+ Tn as IconArrowSquareDown,
4911
+ Xe as IconCalendarArrowDown,
4912
+ Sn as IconChevronLeft,
4913
+ bn as IconClear,
4914
+ Za as IconCloudArrowDown,
4915
+ Na as IconDelete,
4916
+ Me as IconDismiss,
4917
+ Ra as IconDrafts,
4918
+ Da as IconEye,
4919
+ wi as IconFullScreenMaximize,
4920
+ Xn as IconGridDots,
4921
+ Ja as IconMailInboxAdd,
4922
+ ta as IconSearch,
4923
+ jn as IconWeatherMoon,
4924
+ Gn as IconWeatherSunny,
4925
+ Br as Oc404,
4926
+ Gr as Oc500,
4927
+ Xr as OcAuth,
4928
+ Il as OcBack,
4929
+ kl as OcFooter,
4930
+ yl as OcHeader,
4931
+ Al as OcImporter,
4932
+ Yl as OcLogin,
4933
+ rr as OcLogo,
4934
+ yr as OcMy,
4935
+ Ko as OcNumberRoll,
4936
+ kr as OcReport,
4937
+ Uo as OcSearchBar,
4938
+ Dr as OcSkeleton,
4939
+ Ht as OcTable,
4940
+ W as POST,
4941
+ si as create,
4942
+ yi as darkTheme,
4943
+ ii as default,
4944
+ gi as fnCancelFetch,
4945
+ Di as fnCheckDashRole,
4946
+ Si as fnCheckIoTRole,
4947
+ Ii as fnCheckQMSRole,
4948
+ Pi as fnCheckTDMRole,
4949
+ Ke as fnClearUser,
4950
+ ot as fnComputedScale,
4951
+ Ci as fnDecodeCursor,
4952
+ Ae as fnDelStorage,
4953
+ nl as fnDeleteLoad,
4954
+ nn as fnDownload,
4955
+ _i as fnEncodeCursor,
4956
+ ne as fnFormatTime,
4957
+ ki as fnFormatUnits,
4958
+ $i as fnFullScreen,
4959
+ Z as fnGetStorage,
4960
+ We as fnGetUser,
4961
+ bi as fnIsMobile,
4962
+ Ys as fnListenerScale,
4963
+ eo as fnPageModel2Naive,
4964
+ oo as fnPageNaive2Model,
4965
+ Re as fnRenderAction,
4966
+ tl as fnScrollTop,
4967
+ Ie as fnSetLang,
4968
+ Zs as fnSetNormalWidthAndHeight,
4969
+ Wt as fnSetPlatform,
4970
+ te as fnSetStorage,
4971
+ Eo as fnSetTheme,
4972
+ Ho as fnSetUser,
4973
+ Ni as fnThrottle,
4974
+ Jo as fnUserLogout,
4975
+ U as headerStore,
4976
+ Mi as install,
4977
+ ti as langCN,
4978
+ ni as langUS,
4979
+ vi as lightTheme,
4980
+ et as scaleStore,
4981
+ m as userStore
4982
+ };