@syhr/sy-graph 1.1.0-rc.13 → 1.1.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-graph/sy-graph.cjs +3 -3
- package/dist-graph/sy-graph.css +1 -1
- package/dist-graph/sy-graph.mjs +1586 -1453
- package/dist-graph/sy-graph.umd.js +4 -4
- package/package.json +30 -17
package/dist-graph/sy-graph.mjs
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import './sy-graph.css';var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
import './sy-graph.css';var Ia = Object.defineProperty, Sa = Object.defineProperties;
|
|
2
|
+
var ba = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Et = Object.getOwnPropertySymbols;
|
|
4
|
+
var xa = Object.prototype.hasOwnProperty, Ca = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var st = (a, e, t) => e in a ? Ia(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, d = (a, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
7
|
+
xa.call(e, t) && st(a, t, e[t]);
|
|
8
|
+
if (Et)
|
|
9
|
+
for (var t of Et(e))
|
|
10
|
+
Ca.call(e, t) && st(a, t, e[t]);
|
|
11
|
+
return a;
|
|
12
|
+
}, D = (a, e) => Sa(a, ba(e));
|
|
13
|
+
var Se = (a, e, t) => st(a, typeof e != "symbol" ? e + "" : e, t);
|
|
14
|
+
var ae = (a, e, t) => new Promise((n, r) => {
|
|
15
|
+
var i = (f) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
c(t.next(f));
|
|
18
|
+
} catch (g) {
|
|
19
|
+
r(g);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, s = (f) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
c(t.throw(f));
|
|
24
|
+
} catch (g) {
|
|
25
|
+
r(g);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, c = (f) => f.done ? n(f.value) : Promise.resolve(f.value).then(i, s);
|
|
28
|
+
c((t = t.apply(a, e)).next());
|
|
29
29
|
});
|
|
30
|
-
import { openBlock as ue, createElementBlock as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
30
|
+
import { openBlock as ue, createElementBlock as xe, createElementVNode as ge, toDisplayString as At, createVNode as $e, unref as ze, withCtx as _t, createTextVNode as ra, ref as Q, useCssVars as Pa, computed as Ge, resolveComponent as gt, normalizeStyle as ia, createBlock as et, createCommentVNode as je, inject as Ra, shallowRef as Na, watch as vt, nextTick as ka, onMounted as oa, onUnmounted as sa, provide as Da } from "vue";
|
|
31
|
+
import la from "qs";
|
|
32
|
+
import ca from "axios";
|
|
33
|
+
import La from "mitt";
|
|
34
|
+
import Oa from "dayjs";
|
|
35
35
|
import "crypto-js";
|
|
36
|
-
import { SM4 as
|
|
37
|
-
import { throttle as
|
|
38
|
-
import { ElMessage as
|
|
39
|
-
import { clearLineCross as
|
|
40
|
-
import { Meta2d as
|
|
41
|
-
import { mindBoxPlugin as
|
|
42
|
-
import { collapseChildPlugin as
|
|
43
|
-
import { formPens as
|
|
44
|
-
import { classPens as
|
|
45
|
-
import { chartsPens as
|
|
46
|
-
import { videos as
|
|
47
|
-
import { flowPens as
|
|
48
|
-
import { ftaPens as
|
|
49
|
-
import { sequencePens as
|
|
50
|
-
import { activityDiagram as
|
|
51
|
-
import { Loading as
|
|
52
|
-
const
|
|
36
|
+
import { SM4 as Ve, SM2 as Ma } from "gm-crypto";
|
|
37
|
+
import { throttle as da, isObject as Fa, debounce as Tt } from "lodash-es";
|
|
38
|
+
import { ElMessage as he, ElButton as ua, ElNotification as Ua } from "element-plus";
|
|
39
|
+
import { clearLineCross as Ga, handleLineCross as Ha } from "@meta2d/utils";
|
|
40
|
+
import { Meta2d as Va, register as Ke, registerAnchors as It, registerCanvasDraw as We, LockState as Pe, HoverType as Le, setHover as lt, getParent as ct, PenType as Ba, pointInRect as Ka, getAllChildren as Wa } from "@meta2d/core";
|
|
41
|
+
import { mindBoxPlugin as Ya } from "@meta2d/plugin-mind-core";
|
|
42
|
+
import { collapseChildPlugin as $a } from "@meta2d/plugin-mind-collapse";
|
|
43
|
+
import { formPens as za } from "@meta2d/form-diagram";
|
|
44
|
+
import { classPens as ja } from "@meta2d/class-diagram";
|
|
45
|
+
import { chartsPens as Xa } from "@meta2d/le5le-charts";
|
|
46
|
+
import { videos as Oe } from "@meta2d/core/src/diagrams";
|
|
47
|
+
import { flowPens as qa, flowAnchors as Qa } from "@meta2d/flow-diagram";
|
|
48
|
+
import { ftaPens as Ja, ftaAnchors as Za, ftaPensbyCtx as en } from "@meta2d/fta-diagram";
|
|
49
|
+
import { sequencePens as tn, sequencePensbyCtx as an } from "@meta2d/sequence-diagram";
|
|
50
|
+
import { activityDiagram as nn, activityDiagramByCtx as rn } from "@meta2d/activity-diagram";
|
|
51
|
+
import { Loading as on } from "@element-plus/icons-vue";
|
|
52
|
+
const sn = {
|
|
53
53
|
OFFLINE: 0
|
|
54
54
|
// 离线
|
|
55
|
-
},
|
|
55
|
+
}, ln = {
|
|
56
56
|
STOP: 2
|
|
57
57
|
// 停止
|
|
58
|
-
},
|
|
58
|
+
}, cn = {
|
|
59
59
|
1: 1,
|
|
60
60
|
2: 2,
|
|
61
61
|
3: 3,
|
|
62
62
|
4: 4,
|
|
63
63
|
5: 5
|
|
64
|
-
},
|
|
64
|
+
}, Y = {
|
|
65
65
|
AREA: 1,
|
|
66
66
|
// 区域
|
|
67
67
|
BAY: 2,
|
|
@@ -88,21 +88,21 @@ const Ya = {
|
|
|
88
88
|
// 定值
|
|
89
89
|
GIS_SENSOR: 13
|
|
90
90
|
// 局放
|
|
91
|
-
},
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
},
|
|
91
|
+
}, dn = {
|
|
92
|
+
[Y.AREA]: "area",
|
|
93
|
+
[Y.BAY]: "bay",
|
|
94
|
+
[Y.DEVICE]: "device",
|
|
95
|
+
[Y.COMPONENT]: "component",
|
|
96
|
+
[Y.POINT]: "patrolpoint",
|
|
97
|
+
[Y.YX]: "yxpoint",
|
|
98
|
+
[Y.YC]: "ycpoint",
|
|
99
|
+
[Y.YK]: "ykpoint",
|
|
100
|
+
[Y.AUX_DEVICE]: "acdevice",
|
|
101
|
+
[Y.LD]: "ld",
|
|
102
|
+
[Y.LN]: "ln",
|
|
103
|
+
[Y.SG]: "sgpoint",
|
|
104
|
+
[Y.GIS_SENSOR]: "gisuhfsensor"
|
|
105
|
+
}, ne = {
|
|
106
106
|
CUSTOM_MSG: "CUSTOM_MSG",
|
|
107
107
|
OPEN_CAMERA: "OPEN_CAMERA",
|
|
108
108
|
// 打开摄像机弹窗
|
|
@@ -118,14 +118,14 @@ const Ya = {
|
|
|
118
118
|
// 通知弹窗
|
|
119
119
|
GIS_PROPS_PANEL: "GIS_PROPS_PANEL"
|
|
120
120
|
// 属性面板
|
|
121
|
-
},
|
|
121
|
+
}, Xe = {
|
|
122
122
|
Emit: 7
|
|
123
|
-
},
|
|
123
|
+
}, qe = {
|
|
124
124
|
NONE: "none",
|
|
125
125
|
WUJIE: "wujie",
|
|
126
126
|
QIANKUN: "qiankun",
|
|
127
127
|
MICROAPP: "microapp"
|
|
128
|
-
},
|
|
128
|
+
}, P = {
|
|
129
129
|
TEXT: "TEXT",
|
|
130
130
|
// 未特殊定义
|
|
131
131
|
NORMAL: "NORMAL",
|
|
@@ -168,11 +168,11 @@ const Ya = {
|
|
|
168
168
|
// 光字牌
|
|
169
169
|
VIDEO_STREAM: "VIDEO_STREAM"
|
|
170
170
|
// 视频流
|
|
171
|
-
},
|
|
171
|
+
}, St = {
|
|
172
172
|
GRAPH: {
|
|
173
173
|
SOCKET: "GRAPH_SOCKET"
|
|
174
174
|
}
|
|
175
|
-
},
|
|
175
|
+
}, dt = {
|
|
176
176
|
AC: {
|
|
177
177
|
ALARM: "ac.channel.alarm",
|
|
178
178
|
// 智辅告警
|
|
@@ -434,181 +434,194 @@ const Ya = {
|
|
|
434
434
|
// 超声停障
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
|
-
var
|
|
437
|
+
var rt = {};
|
|
438
438
|
/*!
|
|
439
439
|
* vite-plugin-qiankun.js v1.0.14
|
|
440
440
|
* (c) 2021-2022 Teng Mao Qing
|
|
441
441
|
* Released under the MIT License.
|
|
442
442
|
*/
|
|
443
|
-
Object.defineProperty(
|
|
444
|
-
var
|
|
445
|
-
|
|
443
|
+
Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
444
|
+
var Fe = typeof window != "undefined" ? window.proxy || window : {}, ha = function(a) {
|
|
445
|
+
Fe != null && Fe.__POWERED_BY_QIANKUN__ && (window.moudleQiankunAppLifeCycles || (window.moudleQiankunAppLifeCycles = {}), Fe.qiankunName && (window.moudleQiankunAppLifeCycles[Fe.qiankunName] = a));
|
|
446
446
|
};
|
|
447
|
-
|
|
448
|
-
var
|
|
449
|
-
|
|
450
|
-
function
|
|
451
|
-
return window.__POWERED_BY_WUJIE__ || window.$wujie ?
|
|
447
|
+
rt.default = ha;
|
|
448
|
+
var ut = rt.qiankunWindow = Fe;
|
|
449
|
+
rt.renderWithQiankun = ha;
|
|
450
|
+
function un() {
|
|
451
|
+
return window.__POWERED_BY_WUJIE__ || window.$wujie ? qe.WUJIE : window.__POWERED_BY_QIANKUN__ || ut != null && ut.__POWERED_BY_QIANKUN__ ? qe.QIANKUN : window.__MICRO_APP_ENVIRONMENT__ || window.microApp ? qe.MICROAPP : qe.NONE;
|
|
452
452
|
}
|
|
453
|
-
const
|
|
454
|
-
var
|
|
455
|
-
const
|
|
456
|
-
var
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
var
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
453
|
+
const Ze = "/", ma = window.meta.app.encrypt;
|
|
454
|
+
var Mt, Ft;
|
|
455
|
+
const tt = ((Ft = (Mt = window == null ? void 0 : window.meta) == null ? void 0 : Mt.app) == null ? void 0 : Ft.proxyUrl) || "";
|
|
456
|
+
var Ut, Gt;
|
|
457
|
+
const bt = ((Gt = (Ut = window == null ? void 0 : window.meta) == null ? void 0 : Ut.app) == null ? void 0 : Gt.singoPrefixUrl) || "";
|
|
458
|
+
var Ht, Vt;
|
|
459
|
+
const xt = ((Vt = (Ht = window == null ? void 0 : window.meta) == null ? void 0 : Ht.app) == null ? void 0 : Vt.singoToken) || "";
|
|
460
|
+
un();
|
|
461
|
+
const hn = location.protocol === "https:", mn = location.hostname, fn = hn ? "wss:" : "ws:", pn = location.port, An = tt ? `${location.origin}/${tt}` : `${location.origin}`, gn = tt ? `${location.origin}/${tt}` : bt ? `${location.origin}/${bt}` : `${location.origin}`, Ct = `${fn}//${location.host}/ws`;
|
|
462
|
+
var Bt, Kt, Wt, Yt, __$t__, zt, jt, Xt, qt, Qt, Jt, Zt;
|
|
463
|
+
(Kt = (Bt = window.meta) == null ? void 0 : Bt.graph) != null && Kt.savePath, (Yt = (Wt = window.meta) == null ? void 0 : Wt.graph) != null && Yt.graphPenPath, (zt = (__$t__ = window.meta) == null ? void 0 : __$t__.graph) != null && zt.templatePath, (Xt = (jt = window.meta) == null ? void 0 : jt.graph) != null && Xt.graphImgUploadPath, (Qt = (qt = window.meta) == null ? void 0 : qt.graph) != null && Qt.threeSavePath, (Zt = (Jt = window.meta) == null ? void 0 : Jt.graph) != null && Zt.threeModelPath;
|
|
464
|
+
var ea;
|
|
465
|
+
const B = ca.create({
|
|
466
|
+
baseURL: An,
|
|
467
|
+
timeout: ((ea = window.meta.axios) == null ? void 0 : ea.timeout) || 6e4,
|
|
468
|
+
withCredentials: !1,
|
|
469
|
+
paramsSerializer: (a) => la.stringify(a)
|
|
470
|
+
});
|
|
471
|
+
B.interceptors.request.use(
|
|
472
|
+
(a) => (a.headers["x-token"] = "ewoglCJhbGcilDogpc3", a),
|
|
473
|
+
(a) => Promise.reject(a)
|
|
474
|
+
);
|
|
475
|
+
B.interceptors.response.use(
|
|
476
|
+
(a) => {
|
|
477
|
+
const { data: e } = a;
|
|
478
|
+
return Promise.resolve(e);
|
|
479
|
+
},
|
|
480
|
+
(a) => Promise.reject(a)
|
|
481
|
+
);
|
|
482
|
+
var ta;
|
|
483
|
+
const it = ca.create({
|
|
484
|
+
baseURL: gn,
|
|
485
|
+
timeout: ((ta = window.meta.axios) == null ? void 0 : ta.timeout) || 6e4,
|
|
466
486
|
withCredentials: !1,
|
|
467
|
-
paramsSerializer: (
|
|
487
|
+
paramsSerializer: (a) => la.stringify(a)
|
|
468
488
|
});
|
|
469
|
-
|
|
470
|
-
(
|
|
471
|
-
(
|
|
489
|
+
it.interceptors.request.use(
|
|
490
|
+
(a) => (xt && (a.headers["x-token"] = xt), a),
|
|
491
|
+
(a) => Promise.reject(a)
|
|
472
492
|
);
|
|
473
|
-
|
|
474
|
-
(
|
|
475
|
-
const { data: e } =
|
|
493
|
+
it.interceptors.response.use(
|
|
494
|
+
(a) => {
|
|
495
|
+
const { data: e } = a;
|
|
476
496
|
return Promise.resolve(e);
|
|
477
497
|
},
|
|
478
|
-
(
|
|
498
|
+
(a) => Promise.reject(a)
|
|
479
499
|
);
|
|
480
|
-
function
|
|
481
|
-
return new Promise((
|
|
482
|
-
|
|
500
|
+
function vn(a, e = {}, t = {}) {
|
|
501
|
+
return new Promise((n) => {
|
|
502
|
+
B.get(a, d({ params: e }, t)).then((r) => n({ res: r, err: null })).catch((r) => n({ res: null, err: r }));
|
|
483
503
|
});
|
|
484
504
|
}
|
|
485
|
-
function
|
|
486
|
-
return new Promise((
|
|
487
|
-
|
|
505
|
+
function wn(a, e = {}, t = {}) {
|
|
506
|
+
return new Promise((n) => {
|
|
507
|
+
B.post(a, e, t).then((r) => n({ res: r, err: null })).catch((r) => n({ res: null, err: r }));
|
|
488
508
|
});
|
|
489
509
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
510
|
+
function yn(a, e = {}, t = {}) {
|
|
511
|
+
return B.get(a, d({ params: e }, t));
|
|
492
512
|
}
|
|
493
|
-
function
|
|
494
|
-
return
|
|
513
|
+
function _n(a, e = {}, t = {}) {
|
|
514
|
+
return B.post(a, e, t);
|
|
495
515
|
}
|
|
496
|
-
function
|
|
497
|
-
return
|
|
516
|
+
function En(a, e = {}) {
|
|
517
|
+
return B.get(`/filehandle/${a}`, { params: e });
|
|
498
518
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
519
|
+
function Tn(a, e = {}, t = {}) {
|
|
520
|
+
return B.post(`/filehandle/${a}`, e, t);
|
|
501
521
|
}
|
|
502
|
-
function
|
|
503
|
-
return
|
|
522
|
+
function In(a, e = {}) {
|
|
523
|
+
return B.get(`/user/${a}`, { params: e });
|
|
504
524
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
525
|
+
function Sn(a, e = {}, t = {}) {
|
|
526
|
+
return B.post(`/user/${a}`, e, t);
|
|
507
527
|
}
|
|
508
|
-
function
|
|
509
|
-
return
|
|
528
|
+
function bn(a, e = {}) {
|
|
529
|
+
return B.get(`${a}`, e.local ? { params: e, baseURL: Ze } : { params: e });
|
|
510
530
|
}
|
|
511
|
-
function
|
|
512
|
-
return
|
|
531
|
+
function xn(a, e = {}) {
|
|
532
|
+
return B.get(`/media/${a}/`, { params: e });
|
|
513
533
|
}
|
|
514
|
-
function
|
|
515
|
-
return
|
|
534
|
+
function Cn(a, e = {}, t = {}) {
|
|
535
|
+
return B.post(`/media/${a}/`, e, t);
|
|
516
536
|
}
|
|
517
|
-
function
|
|
518
|
-
return
|
|
519
|
-
`/${window.meta.app.isFactory ? window.meta.factory.singo_prefix || "acproxy/common" : "common"}/${n}/`,
|
|
520
|
-
{ params: e }
|
|
521
|
-
);
|
|
537
|
+
function Pn(a, e = {}) {
|
|
538
|
+
return it.get(`/common/${a}/`, { params: e });
|
|
522
539
|
}
|
|
523
|
-
function
|
|
524
|
-
return
|
|
525
|
-
`/${window.meta.app.isFactory ? window.meta.factory.singo_prefix || "acproxy/common" : "common"}/${n}/`,
|
|
526
|
-
e,
|
|
527
|
-
t
|
|
528
|
-
);
|
|
540
|
+
function Rn(a, e = {}, t = {}) {
|
|
541
|
+
return it.post(`/common/${a}/`, e, t);
|
|
529
542
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
543
|
+
function Nn(a, e = {}) {
|
|
544
|
+
return B.get(`/history/${a}`, { params: e });
|
|
532
545
|
}
|
|
533
|
-
function
|
|
534
|
-
return
|
|
546
|
+
function kn(a, e = {}, t = {}) {
|
|
547
|
+
return B.post(`/history/${a}`, e, t);
|
|
535
548
|
}
|
|
536
|
-
function
|
|
537
|
-
return
|
|
549
|
+
function Dn(a, e = {}) {
|
|
550
|
+
return B.get(`/scada/${a}`, { params: e });
|
|
538
551
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
552
|
+
function Ln(a, e = {}, t = {}) {
|
|
553
|
+
return B.post(`/scada/${a}`, e, t);
|
|
541
554
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
555
|
+
function On(a, e = {}) {
|
|
556
|
+
return B.get(`/common/factory/${a}`, { params: e });
|
|
544
557
|
}
|
|
545
|
-
function
|
|
546
|
-
return
|
|
558
|
+
function Mn(a, e = {}, t = {}) {
|
|
559
|
+
return B.post(`/common/factory/${a}`, e, t);
|
|
547
560
|
}
|
|
548
|
-
function
|
|
549
|
-
return
|
|
561
|
+
function Fn(a, e = {}) {
|
|
562
|
+
return B.get(`/factory/${a}`, { params: e });
|
|
550
563
|
}
|
|
551
|
-
function
|
|
552
|
-
return
|
|
564
|
+
function Un(a, e = {}, t = {}) {
|
|
565
|
+
return B.post(`/factory/${a}`, e, t);
|
|
553
566
|
}
|
|
554
|
-
function
|
|
555
|
-
return
|
|
567
|
+
function Gn(a, e = {}) {
|
|
568
|
+
return B.get(`/pd/${a}`, { params: e });
|
|
556
569
|
}
|
|
557
|
-
function
|
|
558
|
-
return
|
|
570
|
+
function Hn(a, e = {}, t = {}) {
|
|
571
|
+
return B.post(`/pd/${a}`, e, t);
|
|
559
572
|
}
|
|
560
|
-
const
|
|
561
|
-
getApi:
|
|
562
|
-
postApi:
|
|
563
|
-
getFileApi:
|
|
564
|
-
postFileApi:
|
|
565
|
-
getBaseApi:
|
|
566
|
-
postBaseApi:
|
|
567
|
-
getUserApi:
|
|
568
|
-
postUserApi:
|
|
569
|
-
getGraphApi:
|
|
570
|
-
getMediaApi:
|
|
571
|
-
postMediaApi:
|
|
572
|
-
getScadaApi:
|
|
573
|
-
postScadaApi:
|
|
574
|
-
getCommonApi:
|
|
575
|
-
postCommonApi:
|
|
576
|
-
getHistoryApi:
|
|
577
|
-
postHistoryApi:
|
|
578
|
-
getFactoryApi:
|
|
579
|
-
postFactoryApi:
|
|
580
|
-
getCommonFactoryApi:
|
|
581
|
-
postCommonFactoryApi:
|
|
582
|
-
getPDApi:
|
|
583
|
-
postPDApi:
|
|
584
|
-
},
|
|
585
|
-
function
|
|
586
|
-
if (typeof
|
|
573
|
+
const Ue = {
|
|
574
|
+
getApi: vn,
|
|
575
|
+
postApi: wn,
|
|
576
|
+
getFileApi: En,
|
|
577
|
+
postFileApi: Tn,
|
|
578
|
+
getBaseApi: yn,
|
|
579
|
+
postBaseApi: _n,
|
|
580
|
+
getUserApi: In,
|
|
581
|
+
postUserApi: Sn,
|
|
582
|
+
getGraphApi: bn,
|
|
583
|
+
getMediaApi: xn,
|
|
584
|
+
postMediaApi: Cn,
|
|
585
|
+
getScadaApi: Dn,
|
|
586
|
+
postScadaApi: Ln,
|
|
587
|
+
getCommonApi: Pn,
|
|
588
|
+
postCommonApi: Rn,
|
|
589
|
+
getHistoryApi: Nn,
|
|
590
|
+
postHistoryApi: kn,
|
|
591
|
+
getFactoryApi: Fn,
|
|
592
|
+
postFactoryApi: Un,
|
|
593
|
+
getCommonFactoryApi: On,
|
|
594
|
+
postCommonFactoryApi: Mn,
|
|
595
|
+
getPDApi: Gn,
|
|
596
|
+
postPDApi: Hn
|
|
597
|
+
}, wt = La(), Vn = [65535, -99999];
|
|
598
|
+
function ht(a) {
|
|
599
|
+
if (typeof a != "string") return !1;
|
|
587
600
|
const e = /^-?\d+(\.\d+)?$/;
|
|
588
|
-
return
|
|
601
|
+
return a.trim() !== "" && e.test(a.trim());
|
|
589
602
|
}
|
|
590
|
-
function
|
|
591
|
-
return !["null", "undefined"].includes(
|
|
603
|
+
function yt(a) {
|
|
604
|
+
return !["null", "undefined"].includes(a) && a !== void 0 && a !== null && a !== "";
|
|
592
605
|
}
|
|
593
|
-
function
|
|
594
|
-
return typeof
|
|
606
|
+
function Qe(a) {
|
|
607
|
+
return typeof a == "number" && !Vn.includes(a);
|
|
595
608
|
}
|
|
596
|
-
const
|
|
597
|
-
var
|
|
598
|
-
const
|
|
599
|
-
for (const [
|
|
600
|
-
|
|
601
|
-
return
|
|
609
|
+
const mt = () => {
|
|
610
|
+
var n;
|
|
611
|
+
const a = {}, e = ((n = window.location.href.split("?")) == null ? void 0 : n[1]) || "", t = new URLSearchParams(e);
|
|
612
|
+
for (const [r, i] of t.entries())
|
|
613
|
+
a[r] = i;
|
|
614
|
+
return a;
|
|
602
615
|
};
|
|
603
|
-
function
|
|
604
|
-
return Object.prototype.toString.call(
|
|
616
|
+
function ft(a) {
|
|
617
|
+
return Object.prototype.toString.call(a).slice(8, -1);
|
|
605
618
|
}
|
|
606
619
|
(function() {
|
|
607
620
|
if (typeof Object.id == "undefined") {
|
|
608
|
-
var
|
|
621
|
+
var a = 0;
|
|
609
622
|
Object.id = function(e) {
|
|
610
623
|
return typeof e.__uniqueid == "undefined" && Object.defineProperty(e, "__uniqueid", {
|
|
611
|
-
value: ++
|
|
624
|
+
value: ++a,
|
|
612
625
|
enumerable: !1,
|
|
613
626
|
// This could go either way, depending on your
|
|
614
627
|
// interpretation of what an "id" is
|
|
@@ -617,8 +630,8 @@ function at(n) {
|
|
|
617
630
|
};
|
|
618
631
|
}
|
|
619
632
|
})();
|
|
620
|
-
function
|
|
621
|
-
var
|
|
633
|
+
function Bn() {
|
|
634
|
+
var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = [
|
|
622
635
|
-1,
|
|
623
636
|
-1,
|
|
624
637
|
-1,
|
|
@@ -749,54 +762,54 @@ function xn() {
|
|
|
749
762
|
-1
|
|
750
763
|
];
|
|
751
764
|
this.encode = function(t) {
|
|
752
|
-
var
|
|
753
|
-
for (
|
|
754
|
-
if (
|
|
755
|
-
|
|
765
|
+
var n, r, i, s, c, f;
|
|
766
|
+
for (i = t.length, r = 0, n = ""; r < i; ) {
|
|
767
|
+
if (s = t.charCodeAt(r++) & 255, r == i) {
|
|
768
|
+
n += a.charAt(s >> 2), n += a.charAt((s & 3) << 4), n += "==";
|
|
756
769
|
break;
|
|
757
770
|
}
|
|
758
|
-
if (
|
|
759
|
-
|
|
771
|
+
if (c = t.charCodeAt(r++), r == i) {
|
|
772
|
+
n += a.charAt(s >> 2), n += a.charAt((s & 3) << 4 | (c & 240) >> 4), n += a.charAt((c & 15) << 2), n += "=";
|
|
760
773
|
break;
|
|
761
774
|
}
|
|
762
|
-
|
|
775
|
+
f = t.charCodeAt(r++), n += a.charAt(s >> 2), n += a.charAt((s & 3) << 4 | (c & 240) >> 4), n += a.charAt((c & 15) << 2 | (f & 192) >> 6), n += a.charAt(f & 63);
|
|
763
776
|
}
|
|
764
|
-
return
|
|
777
|
+
return n;
|
|
765
778
|
}, this.decode = function(t) {
|
|
766
|
-
var
|
|
767
|
-
for (
|
|
779
|
+
var n, r, i, s, c, f, g;
|
|
780
|
+
for (f = t.length, c = 0, g = ""; c < f; ) {
|
|
768
781
|
do
|
|
769
|
-
|
|
770
|
-
while (
|
|
771
|
-
if (
|
|
782
|
+
n = e[t.charCodeAt(c++) & 255];
|
|
783
|
+
while (c < f && n == -1);
|
|
784
|
+
if (n == -1) break;
|
|
772
785
|
do
|
|
773
|
-
|
|
774
|
-
while (
|
|
775
|
-
if (i == -1) break;
|
|
776
|
-
v += String.fromCharCode(a << 2 | (i & 48) >> 4);
|
|
777
|
-
do {
|
|
778
|
-
if (r = t.charCodeAt(l++) & 255, r == 61) return v;
|
|
779
|
-
r = e[r];
|
|
780
|
-
} while (l < m && r == -1);
|
|
786
|
+
r = e[t.charCodeAt(c++) & 255];
|
|
787
|
+
while (c < f && r == -1);
|
|
781
788
|
if (r == -1) break;
|
|
782
|
-
|
|
789
|
+
g += String.fromCharCode(n << 2 | (r & 48) >> 4);
|
|
790
|
+
do {
|
|
791
|
+
if (i = t.charCodeAt(c++) & 255, i == 61) return g;
|
|
792
|
+
i = e[i];
|
|
793
|
+
} while (c < f && i == -1);
|
|
794
|
+
if (i == -1) break;
|
|
795
|
+
g += String.fromCharCode((r & 15) << 4 | (i & 60) >> 2);
|
|
783
796
|
do {
|
|
784
|
-
if (
|
|
785
|
-
|
|
786
|
-
} while (
|
|
787
|
-
if (
|
|
788
|
-
|
|
797
|
+
if (s = t.charCodeAt(c++) & 255, s == 61) return g;
|
|
798
|
+
s = e[s];
|
|
799
|
+
} while (c < f && s == -1);
|
|
800
|
+
if (s == -1) break;
|
|
801
|
+
g += String.fromCharCode((i & 3) << 6 | s);
|
|
789
802
|
}
|
|
790
|
-
return
|
|
803
|
+
return g;
|
|
791
804
|
}, this.utf16to8 = function(t) {
|
|
792
|
-
var
|
|
793
|
-
for (
|
|
794
|
-
|
|
795
|
-
return
|
|
805
|
+
var n, r, i, s;
|
|
806
|
+
for (n = "", i = t.length, r = 0; r < i; r++)
|
|
807
|
+
s = t.charCodeAt(r), s >= 1 && s <= 127 ? n += t.charAt(r) : s > 2047 ? (n += String.fromCharCode(224 | s >> 12 & 15), n += String.fromCharCode(128 | s >> 6 & 63), n += String.fromCharCode(128 | s >> 0 & 63)) : (n += String.fromCharCode(192 | s >> 6 & 31), n += String.fromCharCode(128 | s >> 0 & 63));
|
|
808
|
+
return n;
|
|
796
809
|
}, this.utf8to16 = function(t) {
|
|
797
|
-
var
|
|
798
|
-
for (
|
|
799
|
-
switch (
|
|
810
|
+
var n, r, i, s, c, f;
|
|
811
|
+
for (n = "", i = t.length, r = 0; r < i; )
|
|
812
|
+
switch (s = t.charCodeAt(r++), s >> 4) {
|
|
800
813
|
case 0:
|
|
801
814
|
case 1:
|
|
802
815
|
case 2:
|
|
@@ -805,58 +818,58 @@ function xn() {
|
|
|
805
818
|
case 5:
|
|
806
819
|
case 6:
|
|
807
820
|
case 7:
|
|
808
|
-
|
|
821
|
+
n += t.charAt(r - 1);
|
|
809
822
|
break;
|
|
810
823
|
case 12:
|
|
811
824
|
case 13:
|
|
812
|
-
|
|
825
|
+
c = t.charCodeAt(r++), n += String.fromCharCode((s & 31) << 6 | c & 63);
|
|
813
826
|
break;
|
|
814
827
|
case 14:
|
|
815
|
-
|
|
828
|
+
c = t.charCodeAt(r++), f = t.charCodeAt(r++), n += String.fromCharCode((s & 15) << 12 | (c & 63) << 6 | (f & 63) << 0);
|
|
816
829
|
break;
|
|
817
830
|
}
|
|
818
|
-
return
|
|
831
|
+
return n;
|
|
819
832
|
}, this.charToHex = function(t) {
|
|
820
|
-
var
|
|
821
|
-
for (
|
|
822
|
-
|
|
833
|
+
var n, r, i;
|
|
834
|
+
for (n = "", r = 0; r < t.length; )
|
|
835
|
+
i = t.charCodeAt(r++).toString(16), n += "\\0x" + i, n += r > 0 && r % 8 == 0 ? `\r
|
|
823
836
|
` : ", ";
|
|
824
|
-
return
|
|
837
|
+
return n;
|
|
825
838
|
};
|
|
826
839
|
}
|
|
827
|
-
function
|
|
828
|
-
var
|
|
829
|
-
this.add = function(t,
|
|
830
|
-
this.containsKey(t) ||
|
|
840
|
+
function Kn() {
|
|
841
|
+
var a = 0, e = new Object();
|
|
842
|
+
this.add = function(t, n) {
|
|
843
|
+
this.containsKey(t) || a++, e[t] = n;
|
|
831
844
|
}, this.getValue = function(t) {
|
|
832
845
|
return this.containsKey(t) ? e[t] : null;
|
|
833
846
|
}, this.remove = function(t) {
|
|
834
|
-
this.containsKey(t) && delete e[t] &&
|
|
847
|
+
this.containsKey(t) && delete e[t] && a--;
|
|
835
848
|
}, this.containsKey = function(t) {
|
|
836
849
|
return t in e;
|
|
837
850
|
}, this.containsValue = function(t) {
|
|
838
|
-
for (var
|
|
839
|
-
if (e[
|
|
851
|
+
for (var n in e)
|
|
852
|
+
if (e[n] == t)
|
|
840
853
|
return !0;
|
|
841
854
|
return !1;
|
|
842
855
|
}, this.getValues = function() {
|
|
843
856
|
var t = [];
|
|
844
|
-
for (var
|
|
845
|
-
t.push(e[
|
|
857
|
+
for (var n in e)
|
|
858
|
+
t.push(e[n]);
|
|
846
859
|
return t;
|
|
847
860
|
}, this.getKeys = function() {
|
|
848
861
|
var t = [];
|
|
849
|
-
for (var
|
|
850
|
-
t.push(
|
|
862
|
+
for (var n in e)
|
|
863
|
+
t.push(n);
|
|
851
864
|
return t;
|
|
852
865
|
}, this.getSize = function() {
|
|
853
|
-
return
|
|
866
|
+
return a;
|
|
854
867
|
}, this.clear = function() {
|
|
855
|
-
|
|
868
|
+
a = 0, e = new Object();
|
|
856
869
|
};
|
|
857
870
|
}
|
|
858
|
-
function
|
|
859
|
-
if (this.connect = !1, this.ready_func_ = null, this.callbacks_ = new
|
|
871
|
+
function Wn(a) {
|
|
872
|
+
if (this.connect = !1, this.ready_func_ = null, this.callbacks_ = new Kn(), this.module_ = "JS_IActiveXCtrl", "WebSocket" in window)
|
|
860
873
|
this.ws = new WebSocket("ws://127.0.0.1:7321");
|
|
861
874
|
else
|
|
862
875
|
throw "WebSocket not supported";
|
|
@@ -872,49 +885,49 @@ function Rn(n) {
|
|
|
872
885
|
}, this.loadModuleCallBack = function(e) {
|
|
873
886
|
if (!e) throw e.Response;
|
|
874
887
|
this.ready_func_ && this.ready_func_();
|
|
875
|
-
}.bind(this), this.callbacks_.add("LoadModule", this.loadModuleCallBack), this.exec = function(e, t,
|
|
876
|
-
var
|
|
877
|
-
this.callbacks_.add(
|
|
878
|
-
var
|
|
879
|
-
MsgId:
|
|
880
|
-
Method: e + "|" +
|
|
888
|
+
}.bind(this), this.callbacks_.add("LoadModule", this.loadModuleCallBack), this.exec = function(e, t, n) {
|
|
889
|
+
var r = Object.id(n).toString();
|
|
890
|
+
this.callbacks_.add(r, n);
|
|
891
|
+
var i = {
|
|
892
|
+
MsgId: r,
|
|
893
|
+
Method: e + "|" + a
|
|
881
894
|
};
|
|
882
|
-
t && (
|
|
883
|
-
var
|
|
884
|
-
this.connect && this.ws.send(
|
|
895
|
+
t && (i.Param = JSON.stringify(t));
|
|
896
|
+
var s = JSON.stringify(i);
|
|
897
|
+
this.connect && this.ws.send(s);
|
|
885
898
|
}, this.ready = function(e) {
|
|
886
899
|
this.ready_func_ = e;
|
|
887
900
|
}, this._callback = function(e) {
|
|
888
|
-
var t = JSON.parse(e.data),
|
|
889
|
-
if (this.callbacks_.containsKey(
|
|
890
|
-
var
|
|
891
|
-
|
|
901
|
+
var t = JSON.parse(e.data), n = t.MsgId;
|
|
902
|
+
if (this.callbacks_.containsKey(n)) {
|
|
903
|
+
var r = this.callbacks_.getValue(n);
|
|
904
|
+
r(t.Result, t.Response), this.callbacks_.remove(n);
|
|
892
905
|
}
|
|
893
|
-
}, this.ws.onopen = this.loadModule.bind(this), this.Arm_GetDongleInfo = function({ Index: e, DongleInfoNum: t },
|
|
894
|
-
this.exec("Arm_GetDongleInfo", [parseInt(e), parseInt(t)],
|
|
906
|
+
}, this.ws.onopen = this.loadModule.bind(this), this.Arm_GetDongleInfo = function({ Index: e, DongleInfoNum: t }, n) {
|
|
907
|
+
this.exec("Arm_GetDongleInfo", [parseInt(e), parseInt(t)], n);
|
|
895
908
|
}, this.Arm_Enum = function(e) {
|
|
896
909
|
this.exec("Arm_Enum", null, e);
|
|
897
910
|
}, this.Arm_Open = function({ Index: e }, t) {
|
|
898
911
|
this.exec("Arm_Open", [parseInt(e)], t);
|
|
899
912
|
}, this.Arm_Close = function({ Handle: e }, t) {
|
|
900
913
|
this.exec("Arm_Close", [parseInt(e)], t);
|
|
901
|
-
}, this.Arm_VerifyPIN = function({ Handle: e, UserPin: t, UserType:
|
|
902
|
-
this.exec("Arm_VerifyPIN", [parseInt(e),
|
|
914
|
+
}, this.Arm_VerifyPIN = function({ Handle: e, UserPin: t, UserType: n }, r) {
|
|
915
|
+
this.exec("Arm_VerifyPIN", [parseInt(e), n, t], r);
|
|
903
916
|
}, this.Arm_ResetState = function({ Handle: e }, t) {
|
|
904
917
|
this.exec("Arm_ResetState", [parseInt(e)], t);
|
|
905
|
-
}, this.Arm_GenRandom = function({ Handle: e, RandomLen: t },
|
|
906
|
-
this.exec("Arm_GenRandom", [parseInt(e), parseInt(t)],
|
|
907
|
-
}, this.Arm_LEDControl = function({ Handle: e, LedFlag: t },
|
|
908
|
-
this.exec("Arm_LEDControl", [parseInt(e), t],
|
|
909
|
-
}, this.Arm_SwitchProtocol = function({ Handle: e, ProtocolFlag: t },
|
|
910
|
-
this.exec("Arm_SwitchProtocol", [parseInt(e), t],
|
|
911
|
-
}, this.Arm_CreateFile = function({ Handle: e, FileID: t, FileType:
|
|
912
|
-
this.exec("Arm_CreateFile", [parseInt(e),
|
|
913
|
-
}, this.Arm_WriteFile = function({ Handle: e, FileID: t, FileType:
|
|
918
|
+
}, this.Arm_GenRandom = function({ Handle: e, RandomLen: t }, n) {
|
|
919
|
+
this.exec("Arm_GenRandom", [parseInt(e), parseInt(t)], n);
|
|
920
|
+
}, this.Arm_LEDControl = function({ Handle: e, LedFlag: t }, n) {
|
|
921
|
+
this.exec("Arm_LEDControl", [parseInt(e), t], n);
|
|
922
|
+
}, this.Arm_SwitchProtocol = function({ Handle: e, ProtocolFlag: t }, n) {
|
|
923
|
+
this.exec("Arm_SwitchProtocol", [parseInt(e), t], n);
|
|
924
|
+
}, this.Arm_CreateFile = function({ Handle: e, FileID: t, FileType: n, AttrBuffer: r }, i) {
|
|
925
|
+
this.exec("Arm_CreateFile", [parseInt(e), n, parseInt(t), r], i);
|
|
926
|
+
}, this.Arm_WriteFile = function({ Handle: e, FileID: t, FileType: n, FileOffset: r, DataInput: i }, s) {
|
|
914
927
|
this.exec(
|
|
915
928
|
"Arm_WriteFile",
|
|
916
|
-
[parseInt(e),
|
|
917
|
-
|
|
929
|
+
[parseInt(e), n, parseInt(t), parseInt(r), i],
|
|
930
|
+
s
|
|
918
931
|
);
|
|
919
932
|
}, this.Arm_ReadFile0001 = function({ Handle: e }, t) {
|
|
920
933
|
this.exec("Arm_ReadFile", [parseInt(e), parseInt("0001"), parseInt(0), parseInt("64")], t);
|
|
@@ -926,48 +939,48 @@ function Rn(n) {
|
|
|
926
939
|
this.exec("Arm_ReadFile", [parseInt(e), parseInt("0004"), parseInt(0), parseInt("2048")], t);
|
|
927
940
|
}, this.Arm_ReadFile0005 = function({ Handle: e }, t) {
|
|
928
941
|
this.exec("Arm_ReadFile", [parseInt(e), parseInt("0005"), parseInt(0), parseInt("2048")], t);
|
|
929
|
-
}, this.Arm_DownloadExeFile = function({ Handle: e, Count: t, ExeFileInfo:
|
|
930
|
-
this.exec("Arm_DownloadExeFile", [parseInt(e), parseInt(t),
|
|
931
|
-
}, this.Arm_RunExeFile = function({ Handle: e, FileID: t, InData:
|
|
942
|
+
}, this.Arm_DownloadExeFile = function({ Handle: e, Count: t, ExeFileInfo: n }, r) {
|
|
943
|
+
this.exec("Arm_DownloadExeFile", [parseInt(e), parseInt(t), n], r);
|
|
944
|
+
}, this.Arm_RunExeFile = function({ Handle: e, FileID: t, InData: n, DataLen: r }, i) {
|
|
932
945
|
this.exec(
|
|
933
946
|
"Arm_RunExeFile",
|
|
934
|
-
[parseInt(e), parseInt(t),
|
|
935
|
-
|
|
947
|
+
[parseInt(e), parseInt(t), n, n.length, parseInt(r)],
|
|
948
|
+
i
|
|
936
949
|
);
|
|
937
950
|
}, this.Arm_ReadRunExeFileData = function(e) {
|
|
938
951
|
this.exec("Arm_ReadRunExeFileData", null, e);
|
|
939
|
-
}, this.Arm_DeleteFile = function({ Handle: e, FileID: t, FileType:
|
|
940
|
-
this.exec("Arm_DeleteFile", [parseInt(e),
|
|
941
|
-
}, this.Arm_WriteData = function({ Handle: e, Offset: t, DataInput:
|
|
942
|
-
this.exec("Arm_WriteData", [parseInt(e), parseInt(t),
|
|
943
|
-
}, this.Arm_ReadData = function({ Handle: e, Offset: t, ReadLength:
|
|
944
|
-
this.exec("Arm_ReadData", [parseInt(e), parseInt(t),
|
|
945
|
-
}, this.Arm_WriteShareMemory = function({ Handle: e, DataInput: t },
|
|
946
|
-
this.exec("Arm_WriteShareMemory", [parseInt(e), t],
|
|
952
|
+
}, this.Arm_DeleteFile = function({ Handle: e, FileID: t, FileType: n }, r) {
|
|
953
|
+
this.exec("Arm_DeleteFile", [parseInt(e), n, parseInt(t)], r);
|
|
954
|
+
}, this.Arm_WriteData = function({ Handle: e, Offset: t, DataInput: n }, r) {
|
|
955
|
+
this.exec("Arm_WriteData", [parseInt(e), parseInt(t), n], r);
|
|
956
|
+
}, this.Arm_ReadData = function({ Handle: e, Offset: t, ReadLength: n }, r) {
|
|
957
|
+
this.exec("Arm_ReadData", [parseInt(e), parseInt(t), n], r);
|
|
958
|
+
}, this.Arm_WriteShareMemory = function({ Handle: e, DataInput: t }, n) {
|
|
959
|
+
this.exec("Arm_WriteShareMemory", [parseInt(e), t], n);
|
|
947
960
|
}, this.Arm_ReadShareMemory = function({ Handle: e }, t) {
|
|
948
961
|
this.exec("Arm_ReadShareMemory", [parseInt(e)], t);
|
|
949
|
-
}, this.Arm_GenUniqueKey = function({ Handle: e, Seed: t },
|
|
950
|
-
this.exec("Arm_GenUniqueKey", [parseInt(e), t.length, t],
|
|
951
|
-
}, this.Arm_ChangePIN = function({ Handle: e, NewPIN: t, OldPIN:
|
|
952
|
-
this.exec("Arm_ChangePIN", [parseInt(e),
|
|
953
|
-
}, this.Arm_ResetUserPIN = function({ Handle: e, AdminPIN: t },
|
|
954
|
-
this.exec("Arm_ResetUserPIN", [parseInt(e), t],
|
|
955
|
-
}, this.Arm_SetUserID = function({ Handle: e, UserID: t },
|
|
956
|
-
this.exec("Arm_SetUserID", [parseInt(e), parseInt(t)],
|
|
962
|
+
}, this.Arm_GenUniqueKey = function({ Handle: e, Seed: t }, n) {
|
|
963
|
+
this.exec("Arm_GenUniqueKey", [parseInt(e), t.length, t], n);
|
|
964
|
+
}, this.Arm_ChangePIN = function({ Handle: e, NewPIN: t, OldPIN: n, TryCount: r, PinFlag: i }, s) {
|
|
965
|
+
this.exec("Arm_ChangePIN", [parseInt(e), i, n, t, parseInt(r)], s);
|
|
966
|
+
}, this.Arm_ResetUserPIN = function({ Handle: e, AdminPIN: t }, n) {
|
|
967
|
+
this.exec("Arm_ResetUserPIN", [parseInt(e), t], n);
|
|
968
|
+
}, this.Arm_SetUserID = function({ Handle: e, UserID: t }, n) {
|
|
969
|
+
this.exec("Arm_SetUserID", [parseInt(e), parseInt(t)], n);
|
|
957
970
|
}, this.Arm_GetDeadline = function({ Handle: e }, t) {
|
|
958
971
|
this.exec("Arm_GetDeadline", [parseInt(e)], t);
|
|
959
|
-
}, this.Arm_SetDeadline = function({ Handle: e, SetDeadTime: t },
|
|
960
|
-
this.exec("Arm_SetDeadline", [parseInt(e), parseInt(t)],
|
|
972
|
+
}, this.Arm_SetDeadline = function({ Handle: e, SetDeadTime: t }, n) {
|
|
973
|
+
this.exec("Arm_SetDeadline", [parseInt(e), parseInt(t)], n);
|
|
961
974
|
}, this.Arm_GetUTCTime = function({ Handle: e }, t) {
|
|
962
975
|
this.exec("Arm_GetUTCTime", [parseInt(e)], t);
|
|
963
976
|
}, this.Arm_RFS = function({ Handle: e }, t) {
|
|
964
977
|
this.exec("Arm_RFS", [parseInt(e)], t);
|
|
965
|
-
}, this.Arm_RsaGenPubPriKey = function({ Handle: e, RsaFileId: t },
|
|
966
|
-
this.exec("Arm_RsaGenPubPriKey", [parseInt(e), parseInt(t)],
|
|
967
|
-
}, this.Arm_EccGenPubPriKey = function({ Handle: e, EccFileId: t },
|
|
968
|
-
this.exec("Arm_EccGenPubPriKey", [parseInt(e), parseInt(t)],
|
|
969
|
-
}, this.Arm_Sm2GenPubPriKey = function({ Handle: e, Sm2FileId: t },
|
|
970
|
-
this.exec("Arm_Sm2GenPubPriKey", [parseInt(e), parseInt(t)],
|
|
978
|
+
}, this.Arm_RsaGenPubPriKey = function({ Handle: e, RsaFileId: t }, n) {
|
|
979
|
+
this.exec("Arm_RsaGenPubPriKey", [parseInt(e), parseInt(t)], n);
|
|
980
|
+
}, this.Arm_EccGenPubPriKey = function({ Handle: e, EccFileId: t }, n) {
|
|
981
|
+
this.exec("Arm_EccGenPubPriKey", [parseInt(e), parseInt(t)], n);
|
|
982
|
+
}, this.Arm_Sm2GenPubPriKey = function({ Handle: e, Sm2FileId: t }, n) {
|
|
983
|
+
this.exec("Arm_Sm2GenPubPriKey", [parseInt(e), parseInt(t)], n);
|
|
971
984
|
}, this.Arm_ReadRsaPri = function(e) {
|
|
972
985
|
this.exec("Arm_ReadRsaPri", null, e);
|
|
973
986
|
}, this.Arm_ReadRsaPub = function(e) {
|
|
@@ -980,145 +993,145 @@ function Rn(n) {
|
|
|
980
993
|
this.exec("Arm_ReadSm2Pri", null, e);
|
|
981
994
|
}, this.Arm_ReadSm2Pub = function(e) {
|
|
982
995
|
this.exec("Arm_ReadSm2Pub", null, e);
|
|
983
|
-
}, this.Arm_RsaPri = function({ Handle: e, RsaPri_Flag: t, RsaPriInData:
|
|
996
|
+
}, this.Arm_RsaPri = function({ Handle: e, RsaPri_Flag: t, RsaPriInData: n, RsaPriFileID: r, RsaPriFileSize: i }, s) {
|
|
984
997
|
this.exec(
|
|
985
998
|
"Arm_RsaPri",
|
|
986
|
-
[parseInt(e), parseInt(
|
|
987
|
-
|
|
999
|
+
[parseInt(e), parseInt(r), parseInt(i), t, n],
|
|
1000
|
+
s
|
|
988
1001
|
);
|
|
989
|
-
}, this.Arm_RsaPub = function({ Handle: e, RsaPubKey: t, RsaPub_Flag:
|
|
1002
|
+
}, this.Arm_RsaPub = function({ Handle: e, RsaPubKey: t, RsaPub_Flag: n, RsaPubInData: r, RsaPubFileSize: i }, s) {
|
|
990
1003
|
this.exec(
|
|
991
1004
|
"Arm_RsaPub",
|
|
992
|
-
[parseInt(e), parseInt(
|
|
993
|
-
|
|
1005
|
+
[parseInt(e), parseInt(i), n, t, t.length, r],
|
|
1006
|
+
s
|
|
994
1007
|
);
|
|
995
|
-
}, this.Arm_EccSign = function({ Handle: e, HashData: t, EccFileId:
|
|
996
|
-
this.exec("Arm_EccSign", [parseInt(e), parseInt(
|
|
997
|
-
}, this.Arm_EccVerify = function({ Handle: e, HashData: t, EccPubKey:
|
|
998
|
-
this.exec("Arm_EccVerify", [parseInt(e),
|
|
999
|
-
}, this.Arm_Sm2Sign = function({ Handle: e, HashData: t, Sm2FileId:
|
|
1000
|
-
this.exec("Arm_Sm2Sign", [parseInt(e), parseInt(
|
|
1001
|
-
}, this.Arm_Sm2Verify = function({ Handle: e, HashData: t, Sm2PubKey:
|
|
1002
|
-
this.exec("Arm_Sm2Verify", [parseInt(e),
|
|
1003
|
-
}, this.Arm_TDES = function({ Handle: e, Tdes_Flag: t, TdesFileID:
|
|
1004
|
-
this.exec("Arm_TDES", [parseInt(e), parseInt(
|
|
1005
|
-
}, this.Arm_SM4 = function({ Handle: e, Sm4_Flag: t, Sm4FileID:
|
|
1006
|
-
this.exec("Arm_SM4", [parseInt(e), parseInt(
|
|
1007
|
-
}, this.Arm_HASH = function({ Handle: e, Hash_Flag: t, HashInData:
|
|
1008
|
-
this.exec("Arm_HASH", [parseInt(e), t,
|
|
1009
|
-
}, this.Arm_Seed = function({ Handle: e, SeedData: t, SeedLength:
|
|
1010
|
-
this.exec("Arm_Seed", [parseInt(e),
|
|
1011
|
-
}, this.Arm_LimitSeedCount = function({ Handle: e, SeedCount: t },
|
|
1012
|
-
this.exec("Arm_LimitSeedCount", [parseInt(e), parseInt(t)],
|
|
1013
|
-
}, this.Arm_GenMotherKey = function({ Handle: e, SeedLen: t, SeedForPID:
|
|
1008
|
+
}, this.Arm_EccSign = function({ Handle: e, HashData: t, EccFileId: n }, r) {
|
|
1009
|
+
this.exec("Arm_EccSign", [parseInt(e), parseInt(n), t], r);
|
|
1010
|
+
}, this.Arm_EccVerify = function({ Handle: e, HashData: t, EccPubKey: n, EccSignData: r }, i) {
|
|
1011
|
+
this.exec("Arm_EccVerify", [parseInt(e), n, n.length, t, r], i);
|
|
1012
|
+
}, this.Arm_Sm2Sign = function({ Handle: e, HashData: t, Sm2FileId: n }, r) {
|
|
1013
|
+
this.exec("Arm_Sm2Sign", [parseInt(e), parseInt(n), t], r);
|
|
1014
|
+
}, this.Arm_Sm2Verify = function({ Handle: e, HashData: t, Sm2PubKey: n, Sm2SignData: r }, i) {
|
|
1015
|
+
this.exec("Arm_Sm2Verify", [parseInt(e), n, n.length, t, r], i);
|
|
1016
|
+
}, this.Arm_TDES = function({ Handle: e, Tdes_Flag: t, TdesFileID: n, TdesInData: r }, i) {
|
|
1017
|
+
this.exec("Arm_TDES", [parseInt(e), parseInt(n), t, r], i);
|
|
1018
|
+
}, this.Arm_SM4 = function({ Handle: e, Sm4_Flag: t, Sm4FileID: n, Sm4InData: r }, i) {
|
|
1019
|
+
this.exec("Arm_SM4", [parseInt(e), parseInt(n), t, r], i);
|
|
1020
|
+
}, this.Arm_HASH = function({ Handle: e, Hash_Flag: t, HashInData: n }, r) {
|
|
1021
|
+
this.exec("Arm_HASH", [parseInt(e), t, n], r);
|
|
1022
|
+
}, this.Arm_Seed = function({ Handle: e, SeedData: t, SeedLength: n }, r) {
|
|
1023
|
+
this.exec("Arm_Seed", [parseInt(e), n, t], r);
|
|
1024
|
+
}, this.Arm_LimitSeedCount = function({ Handle: e, SeedCount: t }, n) {
|
|
1025
|
+
this.exec("Arm_LimitSeedCount", [parseInt(e), parseInt(t)], n);
|
|
1026
|
+
}, this.Arm_GenMotherKey = function({ Handle: e, SeedLen: t, SeedForPID: n, SonCount: r, StartUserID: i, AdminTryCount: s, UserPin: c, UserTryCount: f, UpdateRSAPriKey: g }, O) {
|
|
1014
1027
|
this.exec(
|
|
1015
1028
|
"Arm_GenMotherKey",
|
|
1016
1029
|
[
|
|
1017
1030
|
parseInt(e),
|
|
1018
1031
|
parseInt(t),
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
parseInt(
|
|
1022
|
-
parseInt(
|
|
1023
|
-
|
|
1024
|
-
parseInt(
|
|
1025
|
-
parseInt(
|
|
1032
|
+
n,
|
|
1033
|
+
c,
|
|
1034
|
+
parseInt(f),
|
|
1035
|
+
parseInt(s),
|
|
1036
|
+
g,
|
|
1037
|
+
parseInt(i),
|
|
1038
|
+
parseInt(r)
|
|
1026
1039
|
],
|
|
1027
|
-
|
|
1040
|
+
O
|
|
1028
1041
|
);
|
|
1029
1042
|
}, this.Arm_RequestInit = function({ Handle: e }, t) {
|
|
1030
1043
|
this.exec("Arm_RequestInit", [parseInt(e)], t);
|
|
1031
1044
|
}, this.Arm_GetInitDataFromMother = function({ Handle: e }, t) {
|
|
1032
1045
|
this.exec("Arm_GetInitDataFromMother", [parseInt(e), Request], t);
|
|
1033
|
-
}, this.Arm_InitSon = function({ Handle: e, InitData: t },
|
|
1034
|
-
this.exec("Arm_InitSon", [parseInt(e), t],
|
|
1035
|
-
}, this.Arm_SetUpdatePriKey = function({ Handle: e, UpdatePriKey: t },
|
|
1036
|
-
this.exec("Arm_SetUpdatePriKey", [parseInt(e), t],
|
|
1037
|
-
}, this.Arm_MakeUpdatePacket = function({ Handle: e, HID: t, Func:
|
|
1046
|
+
}, this.Arm_InitSon = function({ Handle: e, InitData: t }, n) {
|
|
1047
|
+
this.exec("Arm_InitSon", [parseInt(e), t], n);
|
|
1048
|
+
}, this.Arm_SetUpdatePriKey = function({ Handle: e, UpdatePriKey: t }, n) {
|
|
1049
|
+
this.exec("Arm_SetUpdatePriKey", [parseInt(e), t], n);
|
|
1050
|
+
}, this.Arm_MakeUpdatePacket = function({ Handle: e, HID: t, Func: n, FileID: r, FileType: i, Offset: s, DataLen: c, DataBuffer: f, UpRSAPubKey: g }, O) {
|
|
1038
1051
|
this.exec(
|
|
1039
1052
|
"Arm_MakeUpdatePacket",
|
|
1040
1053
|
[
|
|
1041
1054
|
parseInt(e),
|
|
1042
1055
|
t,
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
parseInt(
|
|
1046
|
-
parseInt(
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
parseInt(
|
|
1056
|
+
n,
|
|
1057
|
+
i,
|
|
1058
|
+
parseInt(r),
|
|
1059
|
+
parseInt(s),
|
|
1060
|
+
f,
|
|
1061
|
+
g,
|
|
1062
|
+
parseInt(c)
|
|
1050
1063
|
],
|
|
1051
|
-
|
|
1064
|
+
O
|
|
1052
1065
|
);
|
|
1053
|
-
}, this.Arm_MakeUpdatePacketFromMother = function({ Handle: e, HID: t, Func:
|
|
1066
|
+
}, this.Arm_MakeUpdatePacketFromMother = function({ Handle: e, HID: t, Func: n, FileID: r, FileType: i, Offset: s, DataLen: c, DataBuffer: f }, g) {
|
|
1054
1067
|
this.exec(
|
|
1055
1068
|
"Arm_MakeUpdatePacketFromMother",
|
|
1056
|
-
[parseInt(e), t,
|
|
1057
|
-
|
|
1069
|
+
[parseInt(e), t, n, i, parseInt(r), parseInt(s), f, parseInt(c)],
|
|
1070
|
+
g
|
|
1058
1071
|
);
|
|
1059
|
-
}, this.Arm_Update = function({ Handle: e, UpdateData: t },
|
|
1060
|
-
this.exec("Arm_Update", [parseInt(e), t],
|
|
1061
|
-
}, this.Arm_Set_DATA_FILE_ATTR = function({ Size: e, ReadPriv: t, WritePriv:
|
|
1062
|
-
this.exec("Arm_Set_DATA_FILE_ATTR", [parseInt(e), parseInt(t), parseInt(
|
|
1063
|
-
}, this.Arm_Set_PRIKEY_FILE_ATTR = function({ Count: e, Size: t, Type:
|
|
1072
|
+
}, this.Arm_Update = function({ Handle: e, UpdateData: t }, n) {
|
|
1073
|
+
this.exec("Arm_Update", [parseInt(e), t], n);
|
|
1074
|
+
}, this.Arm_Set_DATA_FILE_ATTR = function({ Size: e, ReadPriv: t, WritePriv: n }, r) {
|
|
1075
|
+
this.exec("Arm_Set_DATA_FILE_ATTR", [parseInt(e), parseInt(t), parseInt(n)], r);
|
|
1076
|
+
}, this.Arm_Set_PRIKEY_FILE_ATTR = function({ Count: e, Size: t, Type: n, Priv: r, IsReset: i, IsDecOnRAM: s }, c) {
|
|
1064
1077
|
this.exec(
|
|
1065
1078
|
"Arm_Set_PRIKEY_FILE_ATTR",
|
|
1066
|
-
[
|
|
1067
|
-
|
|
1079
|
+
[n, parseInt(t), parseInt(e), parseInt(r), parseInt(s), parseInt(i)],
|
|
1080
|
+
c
|
|
1068
1081
|
);
|
|
1069
|
-
}, this.Arm_Set_KEY_FILE_ATTR = function({ Size: e, PrivEnc: t },
|
|
1070
|
-
this.exec("Arm_Set_KEY_FILE_ATTR", [parseInt(e), parseInt(t)],
|
|
1071
|
-
}, this.Arm_Set_EXE_FILE_ATTR = function({ FileLen: e, PrivExe: t },
|
|
1072
|
-
this.exec("Arm_Set_EXE_FILE_ATTR", [parseInt(e), parseInt(t)],
|
|
1073
|
-
}, this.Arm_Set_DATA_LIC = function({ ReadPriv: e, WritePriv: t },
|
|
1074
|
-
this.exec("Arm_Set_DATA_LIC", [parseInt(e), parseInt(t)],
|
|
1075
|
-
}, this.Arm_Set_PRIKEY_LIC = function({ Count: e, Priv: t, IsReset:
|
|
1082
|
+
}, this.Arm_Set_KEY_FILE_ATTR = function({ Size: e, PrivEnc: t }, n) {
|
|
1083
|
+
this.exec("Arm_Set_KEY_FILE_ATTR", [parseInt(e), parseInt(t)], n);
|
|
1084
|
+
}, this.Arm_Set_EXE_FILE_ATTR = function({ FileLen: e, PrivExe: t }, n) {
|
|
1085
|
+
this.exec("Arm_Set_EXE_FILE_ATTR", [parseInt(e), parseInt(t)], n);
|
|
1086
|
+
}, this.Arm_Set_DATA_LIC = function({ ReadPriv: e, WritePriv: t }, n) {
|
|
1087
|
+
this.exec("Arm_Set_DATA_LIC", [parseInt(e), parseInt(t)], n);
|
|
1088
|
+
}, this.Arm_Set_PRIKEY_LIC = function({ Count: e, Priv: t, IsReset: n, IsDecOnRAM: r }, i) {
|
|
1076
1089
|
this.exec(
|
|
1077
1090
|
"Arm_Set_PRIKEY_LIC",
|
|
1078
|
-
[parseInt(e), parseInt(t), parseInt(
|
|
1079
|
-
|
|
1091
|
+
[parseInt(e), parseInt(t), parseInt(r), parseInt(n)],
|
|
1092
|
+
i
|
|
1080
1093
|
);
|
|
1081
1094
|
}, this.Arm_Set_KEY_LIC = function({ PrivEnc: e }, t) {
|
|
1082
1095
|
this.exec("Arm_Set_KEY_LIC", [parseInt(e)], t);
|
|
1083
1096
|
}, this.Arm_Set_EXE_LIC = function({ PrivExe: e }, t) {
|
|
1084
1097
|
this.exec("Arm_Set_EXE_LIC", [parseInt(e)], t);
|
|
1085
|
-
}, this.Arm_Set_EXE_FILE_INFO = function({ FileID: e, FileData: t, FileSize:
|
|
1098
|
+
}, this.Arm_Set_EXE_FILE_INFO = function({ FileID: e, FileData: t, FileSize: n, InBuffer: r, CallLimit: i }, s) {
|
|
1086
1099
|
this.exec(
|
|
1087
1100
|
"Arm_Set_EXE_FILE_INFO",
|
|
1088
|
-
[
|
|
1089
|
-
|
|
1101
|
+
[r, parseInt(n), parseInt(e), parseInt(i), t, t.length],
|
|
1102
|
+
s
|
|
1090
1103
|
);
|
|
1091
1104
|
}, this.Arm_Clear_EXE_FILE_INFO = function({ InBuffer: e }, t) {
|
|
1092
1105
|
this.exec("Arm_Clear_EXE_FILE_INFO", [e], t);
|
|
1093
1106
|
};
|
|
1094
1107
|
}
|
|
1095
|
-
const
|
|
1108
|
+
const Yn = {
|
|
1096
1109
|
HID: 0
|
|
1097
|
-
},
|
|
1110
|
+
}, Je = {
|
|
1098
1111
|
PRODUCT_ID: 0,
|
|
1099
1112
|
// 产品ID
|
|
1100
1113
|
USER_ID: 1,
|
|
1101
1114
|
// 用户ID
|
|
1102
1115
|
HARDWARE_ID: 2
|
|
1103
1116
|
// 硬件ID
|
|
1104
|
-
},
|
|
1117
|
+
}, Pt = {
|
|
1105
1118
|
USER: 0
|
|
1106
1119
|
// 普通用户
|
|
1107
1120
|
};
|
|
1108
|
-
class
|
|
1121
|
+
class fa {
|
|
1109
1122
|
// 加密随机数
|
|
1110
1123
|
constructor() {
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1124
|
+
Se(this, "Base64", new Bn());
|
|
1125
|
+
Se(this, "AtlCtrl", null);
|
|
1126
|
+
Se(this, "ArmCount", 0);
|
|
1114
1127
|
// 加密锁数量
|
|
1115
|
-
|
|
1128
|
+
Se(this, "ArmIndex", 0);
|
|
1116
1129
|
// 加密锁索引
|
|
1117
|
-
|
|
1130
|
+
Se(this, "ArmHandle", 0);
|
|
1118
1131
|
// 加密锁句柄
|
|
1119
|
-
|
|
1132
|
+
Se(this, "ArmRandom", "");
|
|
1120
1133
|
try {
|
|
1121
|
-
this.AtlCtrl = new
|
|
1134
|
+
this.AtlCtrl = new Wn("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}");
|
|
1122
1135
|
} catch (e) {
|
|
1123
1136
|
console.error(e), this.AtlCtrl = null;
|
|
1124
1137
|
}
|
|
@@ -1127,228 +1140,228 @@ class Xt {
|
|
|
1127
1140
|
armEnum() {
|
|
1128
1141
|
if (this.AtlCtrl)
|
|
1129
1142
|
return new Promise((e, t) => {
|
|
1130
|
-
this.AtlCtrl.Arm_Enum((
|
|
1131
|
-
|
|
1143
|
+
this.AtlCtrl.Arm_Enum((n, r) => {
|
|
1144
|
+
n ? (this.ArmCount = +r, e(r)) : t(r);
|
|
1132
1145
|
});
|
|
1133
1146
|
});
|
|
1134
1147
|
}
|
|
1135
1148
|
// 打开加密锁,索引值从0开始
|
|
1136
1149
|
armOpen(e = 0) {
|
|
1137
1150
|
if (this.AtlCtrl)
|
|
1138
|
-
return this.ArmIndex = e, new Promise((t,
|
|
1139
|
-
this.AtlCtrl.Arm_Open({ Index: e }, (
|
|
1140
|
-
|
|
1151
|
+
return this.ArmIndex = e, new Promise((t, n) => {
|
|
1152
|
+
this.AtlCtrl.Arm_Open({ Index: e }, (r, i) => {
|
|
1153
|
+
r ? (this.ArmHandle = +i, t(i)) : (this.ArmHandle = i, n(i));
|
|
1141
1154
|
});
|
|
1142
1155
|
});
|
|
1143
1156
|
}
|
|
1144
1157
|
// 关闭加密锁
|
|
1145
1158
|
armClose(e = this.ArmHandle) {
|
|
1146
1159
|
if (this.AtlCtrl)
|
|
1147
|
-
return new Promise((t,
|
|
1148
|
-
this.AtlCtrl.Arm_Close({ Handle: e }, (
|
|
1149
|
-
|
|
1160
|
+
return new Promise((t, n) => {
|
|
1161
|
+
this.AtlCtrl.Arm_Close({ Handle: e }, (r, i) => {
|
|
1162
|
+
r ? t(i) : n(i);
|
|
1150
1163
|
});
|
|
1151
1164
|
});
|
|
1152
1165
|
}
|
|
1153
1166
|
// 修改用户PIN码
|
|
1154
|
-
armChangePIN(e, t,
|
|
1167
|
+
armChangePIN(e, t, n = 255, r = Pt.USER, i = this.ArmHandle) {
|
|
1155
1168
|
if (this.AtlCtrl)
|
|
1156
|
-
return new Promise((
|
|
1157
|
-
this.AtlCtrl.Arm_ChangePIN({ Handle:
|
|
1158
|
-
|
|
1169
|
+
return new Promise((s, c) => {
|
|
1170
|
+
this.AtlCtrl.Arm_ChangePIN({ Handle: i, NewPIN: e, OldPIN: t, TryCount: n, PinFlag: r }, (f, g) => {
|
|
1171
|
+
f && g == 0 ? (this.ArmPin = e, s(g)) : c(g);
|
|
1159
1172
|
});
|
|
1160
1173
|
});
|
|
1161
1174
|
}
|
|
1162
1175
|
// 生成随机数,随机数长度范围为1~128
|
|
1163
1176
|
armGenRandom(e = 16, t = this.ArmHandle) {
|
|
1164
1177
|
if (this.AtlCtrl)
|
|
1165
|
-
return new Promise((
|
|
1166
|
-
this.AtlCtrl.Arm_GenRandom({ Handle: t, RandomLen: e }, (
|
|
1167
|
-
|
|
1178
|
+
return new Promise((n, r) => {
|
|
1179
|
+
this.AtlCtrl.Arm_GenRandom({ Handle: t, RandomLen: e }, (i, s) => {
|
|
1180
|
+
i ? (this.ArmRandom = s, n(s)) : r(s);
|
|
1168
1181
|
});
|
|
1169
1182
|
});
|
|
1170
1183
|
}
|
|
1171
1184
|
// 获取加密锁到期时间
|
|
1172
1185
|
armGetDeadline(e = this.ArmHandle) {
|
|
1173
1186
|
if (this.AtlCtrl)
|
|
1174
|
-
return new Promise((t,
|
|
1175
|
-
this.AtlCtrl.Arm_GetDeadline({ Handle: e }, (
|
|
1176
|
-
|
|
1187
|
+
return new Promise((t, n) => {
|
|
1188
|
+
this.AtlCtrl.Arm_GetDeadline({ Handle: e }, (r, i) => {
|
|
1189
|
+
r ? (this.ArmDeadline = i, t(i)) : n(i);
|
|
1177
1190
|
});
|
|
1178
1191
|
});
|
|
1179
1192
|
}
|
|
1180
1193
|
// 唯一化锁,种子码为1234567890,唯一化锁后生成密码为0C56DA077DF5CA8C,产品ID为66D23E87
|
|
1181
1194
|
armGenUniqueKey(e = "MTIzNDU2Nzg5MA==", t = this.ArmHandle) {
|
|
1182
1195
|
if (this.AtlCtrl)
|
|
1183
|
-
return new Promise((
|
|
1184
|
-
this.AtlCtrl.Arm_GenUniqueKey({ Handle: t, Seed: e }, (
|
|
1185
|
-
|
|
1196
|
+
return new Promise((n, r) => {
|
|
1197
|
+
this.AtlCtrl.Arm_GenUniqueKey({ Handle: t, Seed: e }, (i, s) => {
|
|
1198
|
+
i ? (this.ArmUKey = s, n(s)) : r(s);
|
|
1186
1199
|
});
|
|
1187
1200
|
});
|
|
1188
1201
|
}
|
|
1189
1202
|
// 读取加密锁信息(产品ID/用户ID/硬件ID)
|
|
1190
|
-
armGetDongleInfo(e = 0, t =
|
|
1203
|
+
armGetDongleInfo(e = 0, t = Je.HARDWARE_ID) {
|
|
1191
1204
|
if (this.AtlCtrl)
|
|
1192
|
-
return this.ArmIndex = e, new Promise((
|
|
1193
|
-
this.AtlCtrl.Arm_GetDongleInfo({ Index: e, DongleInfoNum: t }, (
|
|
1194
|
-
if (
|
|
1205
|
+
return this.ArmIndex = e, new Promise((n, r) => {
|
|
1206
|
+
this.AtlCtrl.Arm_GetDongleInfo({ Index: e, DongleInfoNum: t }, (i, s) => {
|
|
1207
|
+
if (i) {
|
|
1195
1208
|
switch (t) {
|
|
1196
|
-
case
|
|
1197
|
-
this.ArmUid =
|
|
1209
|
+
case Je.USER_ID:
|
|
1210
|
+
this.ArmUid = s;
|
|
1198
1211
|
break;
|
|
1199
|
-
case
|
|
1200
|
-
this.ArmPid =
|
|
1212
|
+
case Je.PRODUCT_ID:
|
|
1213
|
+
this.ArmPid = s;
|
|
1201
1214
|
break;
|
|
1202
|
-
case
|
|
1203
|
-
this.ArmHid =
|
|
1215
|
+
case Je.HARDWARE_ID:
|
|
1216
|
+
this.ArmHid = s;
|
|
1204
1217
|
break;
|
|
1205
1218
|
}
|
|
1206
|
-
|
|
1219
|
+
n(s);
|
|
1207
1220
|
} else
|
|
1208
|
-
|
|
1221
|
+
r(s);
|
|
1209
1222
|
});
|
|
1210
1223
|
});
|
|
1211
1224
|
}
|
|
1212
1225
|
// LED灯控制操作
|
|
1213
1226
|
armLEDControl(e, t = this.ArmHandle) {
|
|
1214
1227
|
if (this.AtlCtrl)
|
|
1215
|
-
return new Promise((
|
|
1216
|
-
this.AtlCtrl.Arm_LEDControl({ Handle: t, LedFlag: e }, (
|
|
1217
|
-
|
|
1228
|
+
return new Promise((n, r) => {
|
|
1229
|
+
this.AtlCtrl.Arm_LEDControl({ Handle: t, LedFlag: e }, (i, s) => {
|
|
1230
|
+
i && s == 0 ? n(s) : r(s);
|
|
1218
1231
|
});
|
|
1219
1232
|
});
|
|
1220
1233
|
}
|
|
1221
1234
|
// 一键恢复出厂状态
|
|
1222
1235
|
armRFS(e = this.ArmHandle) {
|
|
1223
1236
|
if (this.AtlCtrl)
|
|
1224
|
-
return new Promise((t,
|
|
1225
|
-
this.AtlCtrl.Arm_RFS({ Handle: e }, (
|
|
1226
|
-
|
|
1237
|
+
return new Promise((t, n) => {
|
|
1238
|
+
this.AtlCtrl.Arm_RFS({ Handle: e }, (r, i) => {
|
|
1239
|
+
r && i == 0 ? t(i) : n(i);
|
|
1227
1240
|
});
|
|
1228
1241
|
});
|
|
1229
1242
|
}
|
|
1230
1243
|
// 读取加密锁文件
|
|
1231
1244
|
armReadFile(e = "0001", t = this.ArmHandle) {
|
|
1232
1245
|
if (this.AtlCtrl)
|
|
1233
|
-
return new Promise((
|
|
1234
|
-
this.AtlCtrl[`Arm_ReadFile${e}`]({ Handle: t }, (
|
|
1235
|
-
if (
|
|
1246
|
+
return new Promise((n, r) => {
|
|
1247
|
+
this.AtlCtrl[`Arm_ReadFile${e}`]({ Handle: t }, (i, s) => {
|
|
1248
|
+
if (i && s.length > 0)
|
|
1236
1249
|
try {
|
|
1237
|
-
|
|
1238
|
-
} catch (
|
|
1239
|
-
console.error(
|
|
1250
|
+
s = this.Base64.decode(s), n(s);
|
|
1251
|
+
} catch (c) {
|
|
1252
|
+
console.error(c), n(s);
|
|
1240
1253
|
}
|
|
1241
1254
|
else
|
|
1242
|
-
|
|
1255
|
+
r(s);
|
|
1243
1256
|
});
|
|
1244
1257
|
});
|
|
1245
1258
|
}
|
|
1246
1259
|
// 清除PIN码验证状态
|
|
1247
1260
|
armResetState(e = this.ArmHandle) {
|
|
1248
1261
|
if (this.AtlCtrl)
|
|
1249
|
-
return new Promise((t,
|
|
1250
|
-
this.AtlCtrl.Arm_ResetState({ Handle: e }, (
|
|
1251
|
-
|
|
1262
|
+
return new Promise((t, n) => {
|
|
1263
|
+
this.AtlCtrl.Arm_ResetState({ Handle: e }, (r, i) => {
|
|
1264
|
+
r && i == 0 ? t(i) : n(i);
|
|
1252
1265
|
});
|
|
1253
1266
|
});
|
|
1254
1267
|
}
|
|
1255
1268
|
// 重置用户PIN码,空锁不能重置
|
|
1256
1269
|
armResetUserPIN(e, t = this.ArmHandle) {
|
|
1257
1270
|
if (this.AtlCtrl)
|
|
1258
|
-
return new Promise((
|
|
1259
|
-
this.AtlCtrl.Arm_ResetUserPIN({ Handle: t, AdminPIN: e }, (
|
|
1260
|
-
|
|
1271
|
+
return new Promise((n, r) => {
|
|
1272
|
+
this.AtlCtrl.Arm_ResetUserPIN({ Handle: t, AdminPIN: e }, (i, s) => {
|
|
1273
|
+
i && s == 0 ? n(s) : r(s);
|
|
1261
1274
|
});
|
|
1262
1275
|
});
|
|
1263
1276
|
}
|
|
1264
1277
|
// 设置用户ID
|
|
1265
1278
|
armSetUserID(e, t = this.ArmHandle) {
|
|
1266
1279
|
if (this.AtlCtrl)
|
|
1267
|
-
return new Promise((
|
|
1268
|
-
this.AtlCtrl.Arm_SetUserID({ Handle: t, UserID: e }, (
|
|
1269
|
-
|
|
1280
|
+
return new Promise((n, r) => {
|
|
1281
|
+
this.AtlCtrl.Arm_SetUserID({ Handle: t, UserID: e }, (i, s) => {
|
|
1282
|
+
i && s == 0 ? n(s) : r(s);
|
|
1270
1283
|
});
|
|
1271
1284
|
});
|
|
1272
1285
|
}
|
|
1273
1286
|
// 设置加密锁到期时间
|
|
1274
1287
|
armSetDeadline(e, t = this.ArmHandle) {
|
|
1275
1288
|
if (this.AtlCtrl)
|
|
1276
|
-
return new Promise((
|
|
1277
|
-
this.AtlCtrl.Arm_SetDeadline({ Handle: t, SetDeadTime: e }, (
|
|
1278
|
-
|
|
1289
|
+
return new Promise((n, r) => {
|
|
1290
|
+
this.AtlCtrl.Arm_SetDeadline({ Handle: t, SetDeadTime: e }, (i, s) => {
|
|
1291
|
+
i && s == 0 ? n(s) : r(s);
|
|
1279
1292
|
});
|
|
1280
1293
|
});
|
|
1281
1294
|
}
|
|
1282
1295
|
// 切换通讯协议
|
|
1283
|
-
armSwitchProtocol(e =
|
|
1296
|
+
armSwitchProtocol(e = Yn.HID, t = this.ArmHandle) {
|
|
1284
1297
|
if (this.AtlCtrl)
|
|
1285
|
-
return new Promise((
|
|
1286
|
-
this.AtlCtrl.Arm_SwitchProtocol({ Handle: t, ProtocolFlag: e }, (
|
|
1287
|
-
|
|
1298
|
+
return new Promise((n, r) => {
|
|
1299
|
+
this.AtlCtrl.Arm_SwitchProtocol({ Handle: t, ProtocolFlag: e }, (i, s) => {
|
|
1300
|
+
i && s == 0 ? n(s) : r(s);
|
|
1288
1301
|
});
|
|
1289
1302
|
});
|
|
1290
1303
|
}
|
|
1291
1304
|
// 验证加密锁PIN码
|
|
1292
|
-
armVerifyPIN(e, t =
|
|
1305
|
+
armVerifyPIN(e, t = Pt.USER, n = this.ArmHandle) {
|
|
1293
1306
|
if (this.AtlCtrl)
|
|
1294
|
-
return new Promise((
|
|
1295
|
-
this.AtlCtrl.Arm_VerifyPIN({ Handle:
|
|
1296
|
-
|
|
1307
|
+
return new Promise((r, i) => {
|
|
1308
|
+
this.AtlCtrl.Arm_VerifyPIN({ Handle: n, UserPin: e, UserType: t }, (s, c) => {
|
|
1309
|
+
s && c == 0 ? (this.ArmPin = e, r(c)) : i(c);
|
|
1297
1310
|
});
|
|
1298
1311
|
});
|
|
1299
1312
|
}
|
|
1300
1313
|
// 读取锁内数据区数据
|
|
1301
|
-
armReadData(e = 0, t = 128,
|
|
1314
|
+
armReadData(e = 0, t = 128, n = this.ArmHandle) {
|
|
1302
1315
|
if (this.AtlCtrl)
|
|
1303
|
-
return new Promise((
|
|
1304
|
-
this.AtlCtrl.Arm_ReadData({ Handle:
|
|
1305
|
-
|
|
1316
|
+
return new Promise((r, i) => {
|
|
1317
|
+
this.AtlCtrl.Arm_ReadData({ Handle: n, Offset: e, ReadLength: t }, (s, c) => {
|
|
1318
|
+
s ? (this.ArmData = c, r(c)) : i(c);
|
|
1306
1319
|
});
|
|
1307
1320
|
});
|
|
1308
1321
|
}
|
|
1309
1322
|
// 写入锁内数据区数据
|
|
1310
|
-
armWriteData(e, t = 0,
|
|
1323
|
+
armWriteData(e, t = 0, n = this.ArmHandle) {
|
|
1311
1324
|
if (this.AtlCtrl)
|
|
1312
|
-
return new Promise((
|
|
1313
|
-
this.AtlCtrl.Arm_WriteData({ Handle:
|
|
1314
|
-
|
|
1325
|
+
return new Promise((r, i) => {
|
|
1326
|
+
this.AtlCtrl.Arm_WriteData({ Handle: n, Offset: t, DataInput: e }, (s, c) => {
|
|
1327
|
+
s && c == 0 ? r(c) : i(c);
|
|
1315
1328
|
});
|
|
1316
1329
|
});
|
|
1317
1330
|
}
|
|
1318
1331
|
// 读取共享内存数据
|
|
1319
1332
|
armReadShareMemory(e = this.ArmHandle) {
|
|
1320
1333
|
if (this.AtlCtrl)
|
|
1321
|
-
return new Promise((t,
|
|
1322
|
-
this.AtlCtrl.Arm_ReadShareMemory({ Handle: e }, (
|
|
1323
|
-
|
|
1334
|
+
return new Promise((t, n) => {
|
|
1335
|
+
this.AtlCtrl.Arm_ReadShareMemory({ Handle: e }, (r, i) => {
|
|
1336
|
+
r ? (this.ArmData = i, t(i)) : n(i);
|
|
1324
1337
|
});
|
|
1325
1338
|
});
|
|
1326
1339
|
}
|
|
1327
1340
|
// 设置共享内存数据
|
|
1328
1341
|
armWriteShareMemory(e, t = this.ArmHandle) {
|
|
1329
1342
|
if (this.AtlCtrl)
|
|
1330
|
-
return new Promise((
|
|
1331
|
-
this.AtlCtrl.Arm_WriteShareMemory({ Handle: t, DataInput: e }, (
|
|
1332
|
-
|
|
1343
|
+
return new Promise((n, r) => {
|
|
1344
|
+
this.AtlCtrl.Arm_WriteShareMemory({ Handle: t, DataInput: e }, (i, s) => {
|
|
1345
|
+
i && s == 0 ? n(s) : r(s);
|
|
1333
1346
|
});
|
|
1334
1347
|
});
|
|
1335
1348
|
}
|
|
1336
1349
|
}
|
|
1337
|
-
const
|
|
1338
|
-
let
|
|
1339
|
-
function
|
|
1340
|
-
let t = "",
|
|
1341
|
-
for (;
|
|
1342
|
-
t += e[Math.floor(Math.random() *
|
|
1350
|
+
const pa = "0123456789abcdeffedcba9876543210", Aa = "4b0de988570c3a0f", $n = window.ENCRYPT;
|
|
1351
|
+
let He = $n && new fa();
|
|
1352
|
+
function ga(a = 16, e = "0123456789abcdefghijklmnopqrstuvwxyz") {
|
|
1353
|
+
let t = "", n = e.length;
|
|
1354
|
+
for (; a > 0; )
|
|
1355
|
+
t += e[Math.floor(Math.random() * n)], a--;
|
|
1343
1356
|
return t;
|
|
1344
1357
|
}
|
|
1345
|
-
function
|
|
1346
|
-
return
|
|
1347
|
-
return
|
|
1348
|
-
|
|
1349
|
-
|
|
1358
|
+
function va() {
|
|
1359
|
+
return ae(this, null, function* () {
|
|
1360
|
+
return He || (He = new fa()), new Promise((a, e) => {
|
|
1361
|
+
He.armEnum().then((t) => {
|
|
1362
|
+
a(+t);
|
|
1350
1363
|
}).catch((t) => {
|
|
1351
|
-
|
|
1364
|
+
he({
|
|
1352
1365
|
type: "warning",
|
|
1353
1366
|
ElMessage: "未找到U盘锁,请检查U盘锁!"
|
|
1354
1367
|
}), e(t);
|
|
@@ -1356,21 +1369,21 @@ function Zt() {
|
|
|
1356
1369
|
});
|
|
1357
1370
|
});
|
|
1358
1371
|
}
|
|
1359
|
-
|
|
1360
|
-
() =>
|
|
1361
|
-
const
|
|
1362
|
-
if (typeof
|
|
1363
|
-
|
|
1372
|
+
da(
|
|
1373
|
+
() => ae(void 0, null, function* () {
|
|
1374
|
+
const a = yield va(), e = {};
|
|
1375
|
+
if (typeof a != "number" || a <= 0)
|
|
1376
|
+
he({
|
|
1364
1377
|
type: "warning",
|
|
1365
1378
|
ElMessage: "未找到U盘锁,请检查U盘锁!"
|
|
1366
1379
|
}), e.resetToken();
|
|
1367
1380
|
else {
|
|
1368
|
-
const t = yield
|
|
1381
|
+
const t = yield jn();
|
|
1369
1382
|
if (!e.token) return;
|
|
1370
|
-
t.length ? t.includes(e.ukeyHid) || (
|
|
1383
|
+
t.length ? t.includes(e.ukeyHid) || (he({
|
|
1371
1384
|
type: "error",
|
|
1372
1385
|
ElMessage: "U盘锁不匹配,请检查U盘锁!"
|
|
1373
|
-
}), e.resetToken()) : (
|
|
1386
|
+
}), e.resetToken()) : (he({
|
|
1374
1387
|
type: "warning",
|
|
1375
1388
|
ElMessage: "未找到U盘锁,请检查U盘锁!"
|
|
1376
1389
|
}), e.resetToken());
|
|
@@ -1379,193 +1392,199 @@ Yt(
|
|
|
1379
1392
|
5e3,
|
|
1380
1393
|
{ trailing: !1 }
|
|
1381
1394
|
);
|
|
1382
|
-
function
|
|
1383
|
-
return
|
|
1384
|
-
return
|
|
1385
|
-
|
|
1386
|
-
|
|
1395
|
+
function zn(a = 0) {
|
|
1396
|
+
return ae(this, null, function* () {
|
|
1397
|
+
return He ? new Promise((e, t) => {
|
|
1398
|
+
He.armGetDongleInfo(a).then((n) => {
|
|
1399
|
+
n ? e(n) : (he({
|
|
1387
1400
|
type: "warning",
|
|
1388
1401
|
ElMessage: "U盘锁信息为空,请检查U盘锁!"
|
|
1389
|
-
}), t(
|
|
1390
|
-
}).catch((
|
|
1391
|
-
t(
|
|
1402
|
+
}), t(n));
|
|
1403
|
+
}).catch((n) => {
|
|
1404
|
+
t(n);
|
|
1392
1405
|
});
|
|
1393
|
-
}) :
|
|
1406
|
+
}) : he({
|
|
1394
1407
|
type: "warning",
|
|
1395
1408
|
ElMessage: "未找到U盘锁程序,请检查后台程序!"
|
|
1396
1409
|
});
|
|
1397
1410
|
});
|
|
1398
1411
|
}
|
|
1399
|
-
function
|
|
1400
|
-
return
|
|
1401
|
-
if (!
|
|
1402
|
-
return
|
|
1412
|
+
function jn() {
|
|
1413
|
+
return ae(this, null, function* () {
|
|
1414
|
+
if (!He)
|
|
1415
|
+
return he({
|
|
1403
1416
|
type: "warning",
|
|
1404
1417
|
ElMessage: "未找到U盘锁程序,请检查后台程序!"
|
|
1405
1418
|
});
|
|
1406
|
-
const
|
|
1419
|
+
const a = yield va();
|
|
1407
1420
|
let e = [];
|
|
1408
|
-
for (let t = 0; t <
|
|
1409
|
-
const
|
|
1410
|
-
e.push(
|
|
1421
|
+
for (let t = 0; t < a; t++) {
|
|
1422
|
+
const n = yield zn(t);
|
|
1423
|
+
e.push(n);
|
|
1411
1424
|
}
|
|
1412
1425
|
return e;
|
|
1413
1426
|
});
|
|
1414
1427
|
}
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
const
|
|
1418
|
-
function
|
|
1419
|
-
const
|
|
1420
|
-
t =
|
|
1421
|
-
mode:
|
|
1428
|
+
ga(16);
|
|
1429
|
+
ga(16);
|
|
1430
|
+
const wa = window.meta.app.inspect ? Ve.constants.CBC : Ve.constants.ECB, { publicKey: di, privateKey: ui } = Ma.generateKeyPair();
|
|
1431
|
+
function Xn(a, e, t = {}) {
|
|
1432
|
+
const n = ya(Aa), r = t.mode || wa;
|
|
1433
|
+
t = r === Ve.constants.ECB ? d({
|
|
1434
|
+
mode: r,
|
|
1422
1435
|
// ECB
|
|
1423
1436
|
inputEncoding: "utf8",
|
|
1424
1437
|
outputEncoding: "hex"
|
|
1425
|
-
}, t) :
|
|
1426
|
-
iv:
|
|
1427
|
-
mode:
|
|
1438
|
+
}, t) : d({
|
|
1439
|
+
iv: pa,
|
|
1440
|
+
mode: r,
|
|
1428
1441
|
// ECB
|
|
1429
1442
|
inputEncoding: "utf8",
|
|
1430
1443
|
outputEncoding: "hex"
|
|
1431
1444
|
}, t);
|
|
1432
|
-
let
|
|
1445
|
+
let i = "";
|
|
1433
1446
|
try {
|
|
1434
|
-
|
|
1435
|
-
} catch (
|
|
1436
|
-
console.log("err: ",
|
|
1447
|
+
i = Ve.encrypt(a, n, t);
|
|
1448
|
+
} catch (s) {
|
|
1449
|
+
console.log("err: ", s);
|
|
1437
1450
|
}
|
|
1438
|
-
return
|
|
1451
|
+
return i;
|
|
1439
1452
|
}
|
|
1440
|
-
function
|
|
1441
|
-
const
|
|
1442
|
-
return t =
|
|
1443
|
-
mode:
|
|
1453
|
+
function qn(a, e, t = {}) {
|
|
1454
|
+
const n = ya(Aa), r = t.mode || wa;
|
|
1455
|
+
return t = r === Ve.constants.ECB ? d({
|
|
1456
|
+
mode: r,
|
|
1444
1457
|
inputEncoding: "hex",
|
|
1445
1458
|
outputEncoding: "utf8"
|
|
1446
|
-
}, t) :
|
|
1447
|
-
iv:
|
|
1448
|
-
mode:
|
|
1459
|
+
}, t) : d({
|
|
1460
|
+
iv: pa,
|
|
1461
|
+
mode: r,
|
|
1449
1462
|
inputEncoding: "hex",
|
|
1450
1463
|
outputEncoding: "utf8"
|
|
1451
|
-
}, t),
|
|
1464
|
+
}, t), Ve.decrypt(a, n, t);
|
|
1452
1465
|
}
|
|
1453
|
-
function
|
|
1454
|
-
return [...
|
|
1466
|
+
function ya(a) {
|
|
1467
|
+
return [...a].map((e) => e.charCodeAt().toString(16)).join("");
|
|
1455
1468
|
}
|
|
1456
|
-
function
|
|
1457
|
-
return
|
|
1469
|
+
function pt(a) {
|
|
1470
|
+
return a = ma && yt(a) ? qn(a) : a, yt(a) ? JSON.parse(a) : a;
|
|
1458
1471
|
}
|
|
1459
|
-
function
|
|
1460
|
-
return
|
|
1472
|
+
function Rt(a) {
|
|
1473
|
+
return a = ma && yt(a) ? Xn(a) : a, JSON.stringify(a);
|
|
1461
1474
|
}
|
|
1462
|
-
function
|
|
1463
|
-
const
|
|
1475
|
+
function Me(a, e, t, n) {
|
|
1476
|
+
const r = new StorageEvent("storage", {
|
|
1464
1477
|
url: window.location.href,
|
|
1465
|
-
key:
|
|
1478
|
+
key: a,
|
|
1466
1479
|
oldValue: e,
|
|
1467
1480
|
newValue: t,
|
|
1468
|
-
storageArea:
|
|
1481
|
+
storageArea: n
|
|
1469
1482
|
});
|
|
1470
|
-
window.dispatchEvent(
|
|
1483
|
+
window.dispatchEvent(r);
|
|
1471
1484
|
}
|
|
1472
|
-
const
|
|
1473
|
-
getLocal: (
|
|
1485
|
+
const at = {
|
|
1486
|
+
getLocal: (a) => {
|
|
1474
1487
|
try {
|
|
1475
|
-
const e = window.localStorage.getItem(
|
|
1476
|
-
return
|
|
1488
|
+
const e = window.localStorage.getItem(a);
|
|
1489
|
+
return pt(e);
|
|
1477
1490
|
} catch (e) {
|
|
1478
1491
|
console.error(e);
|
|
1479
1492
|
}
|
|
1480
1493
|
},
|
|
1481
|
-
setLocal: (
|
|
1494
|
+
setLocal: (a, e) => {
|
|
1482
1495
|
try {
|
|
1483
|
-
const t = window.localStorage.getItem(
|
|
1484
|
-
window.localStorage.setItem(
|
|
1496
|
+
const t = window.localStorage.getItem(a), n = Rt(e);
|
|
1497
|
+
window.localStorage.setItem(a, n), Me(a, t, n, window.localStorage);
|
|
1485
1498
|
} catch (t) {
|
|
1486
1499
|
console.error(t);
|
|
1487
1500
|
}
|
|
1488
1501
|
},
|
|
1489
|
-
eachLocal: (
|
|
1490
|
-
if (!
|
|
1502
|
+
eachLocal: (a) => {
|
|
1503
|
+
if (!a || ft(a) !== "Function")
|
|
1491
1504
|
return console.error("传递参数非函数类型!");
|
|
1492
|
-
for (let e = 0
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1505
|
+
for (let e = 0; e < window.localStorage.length; e++) {
|
|
1506
|
+
const t = window.localStorage.key(e);
|
|
1507
|
+
a(at.getLocal(t), t);
|
|
1495
1508
|
}
|
|
1496
1509
|
},
|
|
1497
1510
|
clearLocal: () => {
|
|
1498
|
-
window.localStorage.clear(),
|
|
1511
|
+
window.localStorage.clear(), Me(null, null, null, window.localStorage);
|
|
1499
1512
|
},
|
|
1500
|
-
removeLocal: (
|
|
1501
|
-
const e = window.localStorage.getItem(
|
|
1502
|
-
window.localStorage.removeItem(
|
|
1513
|
+
removeLocal: (a) => {
|
|
1514
|
+
const e = window.localStorage.getItem(a);
|
|
1515
|
+
window.localStorage.removeItem(a), Me(a, e, null, window.localStorage);
|
|
1503
1516
|
},
|
|
1504
|
-
getSession: (
|
|
1517
|
+
getSession: (a) => {
|
|
1505
1518
|
try {
|
|
1506
|
-
const e = window.sessionStorage.getItem(
|
|
1507
|
-
return
|
|
1519
|
+
const e = window.sessionStorage.getItem(a);
|
|
1520
|
+
return pt(e);
|
|
1508
1521
|
} catch (e) {
|
|
1509
1522
|
console.error(e);
|
|
1510
1523
|
}
|
|
1511
1524
|
},
|
|
1512
|
-
setSession: (
|
|
1525
|
+
setSession: (a, e) => {
|
|
1513
1526
|
try {
|
|
1514
|
-
const t = window.sessionStorage.getItem(
|
|
1515
|
-
window.sessionStorage.setItem(
|
|
1527
|
+
const t = window.sessionStorage.getItem(a), n = Rt(e);
|
|
1528
|
+
window.sessionStorage.setItem(a, n), Me(a, t, n, window.sessionStorage);
|
|
1516
1529
|
} catch (t) {
|
|
1517
1530
|
console.error(t);
|
|
1518
1531
|
}
|
|
1519
1532
|
},
|
|
1520
|
-
eachSession: (
|
|
1521
|
-
if (!
|
|
1533
|
+
eachSession: (a) => {
|
|
1534
|
+
if (!a || ft(a) !== "Function")
|
|
1522
1535
|
return console.error("传递参数非函数类型!");
|
|
1523
|
-
for (let e = 0
|
|
1524
|
-
const
|
|
1525
|
-
|
|
1536
|
+
for (let e = 0; e < window.sessionStorage.length; e++) {
|
|
1537
|
+
const t = window.sessionStorage.key(e);
|
|
1538
|
+
a(at.getSession(t), t);
|
|
1526
1539
|
}
|
|
1527
1540
|
},
|
|
1528
1541
|
clearSession: () => {
|
|
1529
|
-
window.sessionStorage.clear(),
|
|
1542
|
+
window.sessionStorage.clear(), Me(null, null, null, window.sessionStorage);
|
|
1530
1543
|
},
|
|
1531
|
-
removeSession: (
|
|
1532
|
-
const e = window.sessionStorage.getItem(
|
|
1533
|
-
window.sessionStorage.removeItem(
|
|
1544
|
+
removeSession: (a) => {
|
|
1545
|
+
const e = window.sessionStorage.getItem(a);
|
|
1546
|
+
window.sessionStorage.removeItem(a), Me(a, e, null, window.sessionStorage);
|
|
1534
1547
|
},
|
|
1535
1548
|
// 监听storage变化
|
|
1536
|
-
onStorageChange: (
|
|
1537
|
-
if (!
|
|
1549
|
+
onStorageChange: (a) => {
|
|
1550
|
+
if (!a || ft(a) !== "Function")
|
|
1538
1551
|
return console.error("传递参数非函数类型!");
|
|
1539
|
-
const e = (
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1552
|
+
const e = (n) => {
|
|
1553
|
+
try {
|
|
1554
|
+
return pt(n);
|
|
1555
|
+
} catch (r) {
|
|
1556
|
+
return console.error(r), n;
|
|
1557
|
+
}
|
|
1558
|
+
}, t = (n) => {
|
|
1559
|
+
a({
|
|
1560
|
+
url: n.url,
|
|
1561
|
+
key: n.key,
|
|
1562
|
+
newValue: n.newValue ? e(n.newValue) : null,
|
|
1563
|
+
oldValue: n.oldValue ? e(n.oldValue) : null,
|
|
1564
|
+
storageArea: n.storageArea
|
|
1546
1565
|
});
|
|
1547
1566
|
};
|
|
1548
|
-
return window.addEventListener("storage",
|
|
1549
|
-
window.removeEventListener("storage",
|
|
1567
|
+
return window.addEventListener("storage", t), () => {
|
|
1568
|
+
window.removeEventListener("storage", t);
|
|
1550
1569
|
};
|
|
1551
1570
|
}
|
|
1552
|
-
},
|
|
1553
|
-
const { quality: e, value: t, function_id:
|
|
1554
|
-
return (e >> 7 & 1) === 1 || e === 0 &&
|
|
1555
|
-
},
|
|
1571
|
+
}, Nt = (a) => {
|
|
1572
|
+
const { quality: e, value: t, function_id: n } = a;
|
|
1573
|
+
return (e >> 7 & 1) === 1 || e === 0 && n === 2 && t === 1;
|
|
1574
|
+
}, kt = "USER_TOKEN", Dt = "STATION_ID", Qn = [
|
|
1556
1575
|
{ key: 0, value: "离线" },
|
|
1557
1576
|
{ key: 1, value: "在线" }
|
|
1558
|
-
],
|
|
1577
|
+
], Jn = [
|
|
1559
1578
|
{ key: 0, value: "反向" },
|
|
1560
1579
|
{ key: 1, value: "正向" },
|
|
1561
1580
|
{ key: 2, value: "停止" }
|
|
1562
|
-
],
|
|
1581
|
+
], Zn = [
|
|
1563
1582
|
{ key: 1, value: 1 },
|
|
1564
1583
|
{ key: 2, value: 2 },
|
|
1565
1584
|
{ key: 3, value: 3 },
|
|
1566
1585
|
{ key: 4, value: 4 },
|
|
1567
1586
|
{ key: 5, value: 5 }
|
|
1568
|
-
],
|
|
1587
|
+
], er = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1753954524851'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='1506'%20width='256'%20height='256'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cpath%20d='M888.65792%20280.15616a46.80704%2046.80704%200%200%200-46.80704-46.80704H233.34912a46.80704%2046.80704%200%200%200-46.80704%2046.80704v93.61408h702.11584V280.15616zM186.54208%20420.5824v374.46144a46.80704%2046.80704%200%200%200%2046.80704%2046.80704h608.49664a46.80704%2046.80704%200%200%200%2046.80704-46.80704V420.5824H186.54208z%20m442.9056%2084.98688l30.92992%2011.47904c-15.62624%2024.23808-35.39968%2050.38592-50.70848%2067.6096l-25.51296-10.84416c15.31392-17.85856%2034.7648-46.56128%2045.29152-68.24448z%20m-184.64768-1.59744c17.54112%2020.09088%2038.26688%2047.5136%2047.5136%2065.37728l-25.51296%2015.62624c-8.61184-17.85856-28.70272-46.23872-45.92128-67.28704l23.92064-13.71648z%20m199.95136%20267.2384h-45.28128c-32.20992%200-39.86432-8.92928-39.86432-39.86432v-102.36416h-46.23872c-5.73952%2069.8368-21.6832%20121.18528-101.0944%20149.56544-3.5072-7.97184-11.47904-19.456-18.49344-25.51296%2072.07424-22.9632%2083.87072-66.01728%2088.65792-124.05248H399.19616v-28.70272h122.7776V483.88096h30.92992v116.39808h122.46016v28.70272h-85.7856v102.04672c0%2010.5216%201.90976%2012.11904%2013.71136%2012.11904h38.90176c8.92928%200%2010.84416-4.1472%2011.8016-28.38016%206.69696%204.78208%2019.12832%209.56928%2027.42272%2011.47904-3.49696%2035.39968-11.4688%2044.96384-36.66432%2044.96384z'%20fill='%23005CFF'%20p-id='1507'%3e%3c/path%3e%3c/svg%3e", be = window.meta.graph.penFormMap ? window.meta.graph.penFormMap : {
|
|
1569
1588
|
NORMAL: [
|
|
1570
1589
|
{
|
|
1571
1590
|
name: "颜色",
|
|
@@ -1649,7 +1668,7 @@ const vt = {
|
|
|
1649
1668
|
]
|
|
1650
1669
|
}
|
|
1651
1670
|
]
|
|
1652
|
-
},
|
|
1671
|
+
}, _a = window.meta.graph.lightPlateColorMap ? window.meta.graph.lightPlateColorMap : {
|
|
1653
1672
|
0: "#00d200",
|
|
1654
1673
|
// 正常
|
|
1655
1674
|
1: "#e2ac06",
|
|
@@ -1660,7 +1679,7 @@ const vt = {
|
|
|
1660
1679
|
// 严重
|
|
1661
1680
|
4: "#ff0000"
|
|
1662
1681
|
// 危急
|
|
1663
|
-
},
|
|
1682
|
+
}, Ea = window.meta.graph.lightPlateTextMap ? window.meta.graph.lightPlateTextMap : {
|
|
1664
1683
|
0: "#fff",
|
|
1665
1684
|
// 正常
|
|
1666
1685
|
1: "#fff",
|
|
@@ -1671,16 +1690,16 @@ const vt = {
|
|
|
1671
1690
|
// 严重
|
|
1672
1691
|
4: "#fff"
|
|
1673
1692
|
// 危急
|
|
1674
|
-
},
|
|
1693
|
+
}, j = {
|
|
1675
1694
|
form: [
|
|
1676
1695
|
{
|
|
1677
1696
|
name: "带电状态",
|
|
1678
1697
|
key: "charged_state",
|
|
1679
1698
|
type: "select",
|
|
1680
1699
|
dataIds: {},
|
|
1681
|
-
options:
|
|
1682
|
-
label:
|
|
1683
|
-
value:
|
|
1700
|
+
options: Qn.map((a) => ({
|
|
1701
|
+
label: a.value,
|
|
1702
|
+
value: a.key
|
|
1684
1703
|
}))
|
|
1685
1704
|
},
|
|
1686
1705
|
{
|
|
@@ -1688,9 +1707,9 @@ const vt = {
|
|
|
1688
1707
|
key: "electric_direction",
|
|
1689
1708
|
type: "select",
|
|
1690
1709
|
dataIds: {},
|
|
1691
|
-
options:
|
|
1692
|
-
label:
|
|
1693
|
-
value:
|
|
1710
|
+
options: Jn.map((a) => ({
|
|
1711
|
+
label: a.value,
|
|
1712
|
+
value: a.key
|
|
1694
1713
|
}))
|
|
1695
1714
|
},
|
|
1696
1715
|
{
|
|
@@ -1698,9 +1717,9 @@ const vt = {
|
|
|
1698
1717
|
key: "electric_size",
|
|
1699
1718
|
type: "select",
|
|
1700
1719
|
dataIds: {},
|
|
1701
|
-
options:
|
|
1702
|
-
label:
|
|
1703
|
-
value:
|
|
1720
|
+
options: Zn.map((a) => ({
|
|
1721
|
+
label: a.value,
|
|
1722
|
+
value: a.key
|
|
1704
1723
|
}))
|
|
1705
1724
|
}
|
|
1706
1725
|
],
|
|
@@ -1716,27 +1735,28 @@ const vt = {
|
|
|
1716
1735
|
// 默认按照名称批量匹配
|
|
1717
1736
|
visibleLevel: window.visibleLevel
|
|
1718
1737
|
// 默认显示数据类型为设备层级
|
|
1719
|
-
}, A =
|
|
1720
|
-
penType:
|
|
1721
|
-
},
|
|
1722
|
-
form: [...
|
|
1738
|
+
}, A = D(d({
|
|
1739
|
+
penType: P.NORMAL
|
|
1740
|
+
}, j), {
|
|
1741
|
+
form: [...be[P.NORMAL] || [], ...j.form]
|
|
1723
1742
|
});
|
|
1724
|
-
|
|
1743
|
+
Y.YX, Y.YX, Y.YX, P.POINT_VALUE, j.anchors, window.visibleLevel, j.form, j.form, window.dataType, window.dataProp, window.visibleLevel, j.form, window.dataType, window.dataProp, window.visibleLevel, j.form, window.dataType, window.dataProp, window.visibleLevel, Ea[0], P.LIGHT_PLATE, _a[0], j.anchors, window.visibleLevel, [...be[P.LIGHT_PLATE], ...j.form], Ze + "", P.SENSOR, j.anchors, window.visibleLevel, [...be[P.LIGHT_PLATE], ...j.form], D(d({
|
|
1725
1744
|
width: 100,
|
|
1726
1745
|
height: 30,
|
|
1727
1746
|
name: "text",
|
|
1728
1747
|
penName: "文本",
|
|
1729
1748
|
text: "文本",
|
|
1749
|
+
ellipsis: !1,
|
|
1730
1750
|
disableAnchor: !0,
|
|
1731
|
-
penType:
|
|
1732
|
-
},
|
|
1733
|
-
form: [...
|
|
1734
|
-
}),
|
|
1751
|
+
penType: P.TEXT
|
|
1752
|
+
}, j), {
|
|
1753
|
+
form: [...be[P.TEXT], ...j.form]
|
|
1754
|
+
}), d({
|
|
1735
1755
|
width: 100,
|
|
1736
1756
|
height: 100,
|
|
1737
1757
|
name: "square",
|
|
1738
1758
|
penName: "正方形"
|
|
1739
|
-
}, A),
|
|
1759
|
+
}, A), D(d({
|
|
1740
1760
|
type: 1,
|
|
1741
1761
|
name: "line",
|
|
1742
1762
|
width: 100,
|
|
@@ -1753,74 +1773,74 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1753
1773
|
{ x: 0, y: 0.5, id: "0" },
|
|
1754
1774
|
{ x: 1, y: 0.5, id: "1" }
|
|
1755
1775
|
]
|
|
1756
|
-
}),
|
|
1776
|
+
}), d({
|
|
1757
1777
|
width: 200,
|
|
1758
1778
|
height: 50,
|
|
1759
1779
|
borderRadius: 0,
|
|
1760
1780
|
name: "rectangle",
|
|
1761
1781
|
penName: "矩形"
|
|
1762
|
-
}, A),
|
|
1782
|
+
}, A), d({
|
|
1763
1783
|
width: 100,
|
|
1764
1784
|
height: 100,
|
|
1765
1785
|
name: "circle",
|
|
1766
1786
|
penName: "圆"
|
|
1767
|
-
}, A),
|
|
1787
|
+
}, A), d({
|
|
1768
1788
|
width: 100,
|
|
1769
1789
|
height: 100,
|
|
1770
1790
|
name: "triangle",
|
|
1771
1791
|
penName: "三角形"
|
|
1772
|
-
}, A),
|
|
1792
|
+
}, A), d({
|
|
1773
1793
|
width: 100,
|
|
1774
1794
|
height: 100,
|
|
1775
1795
|
name: "diamond",
|
|
1776
1796
|
penName: "菱形"
|
|
1777
|
-
}, A),
|
|
1797
|
+
}, A), d({
|
|
1778
1798
|
width: 100,
|
|
1779
1799
|
height: 100,
|
|
1780
1800
|
name: "pentagon",
|
|
1781
1801
|
penName: "五边形"
|
|
1782
|
-
}, A),
|
|
1802
|
+
}, A), d({
|
|
1783
1803
|
width: 100,
|
|
1784
1804
|
height: 100,
|
|
1785
1805
|
name: "hexagon",
|
|
1786
1806
|
penName: "六边形"
|
|
1787
|
-
}, A),
|
|
1807
|
+
}, A), d({
|
|
1788
1808
|
width: 100,
|
|
1789
1809
|
height: 100,
|
|
1790
1810
|
name: "pentagram",
|
|
1791
1811
|
penName: "五角星"
|
|
1792
|
-
}, A),
|
|
1812
|
+
}, A), d({
|
|
1793
1813
|
width: 120,
|
|
1794
1814
|
height: 60,
|
|
1795
1815
|
name: "leftArrow",
|
|
1796
1816
|
penName: "左箭头"
|
|
1797
|
-
}, A),
|
|
1817
|
+
}, A), d({
|
|
1798
1818
|
width: 120,
|
|
1799
1819
|
height: 60,
|
|
1800
1820
|
penName: "右箭头",
|
|
1801
1821
|
name: "rightArrow"
|
|
1802
|
-
}, A),
|
|
1822
|
+
}, A), d({
|
|
1803
1823
|
width: 150,
|
|
1804
1824
|
height: 60,
|
|
1805
1825
|
name: "twowayArrow",
|
|
1806
1826
|
penName: "双向箭头"
|
|
1807
|
-
}, A),
|
|
1827
|
+
}, A), d({
|
|
1808
1828
|
width: 100,
|
|
1809
1829
|
height: 100,
|
|
1810
1830
|
name: "cloud",
|
|
1811
1831
|
penName: "云"
|
|
1812
|
-
}, A),
|
|
1832
|
+
}, A), d({
|
|
1813
1833
|
textTop: -0.1,
|
|
1814
1834
|
width: 100,
|
|
1815
1835
|
height: 100,
|
|
1816
1836
|
name: "message",
|
|
1817
1837
|
penName: "消息框"
|
|
1818
|
-
}, A),
|
|
1838
|
+
}, A), d({
|
|
1819
1839
|
width: 80,
|
|
1820
1840
|
height: 100,
|
|
1821
1841
|
name: "file",
|
|
1822
1842
|
penName: "文件"
|
|
1823
|
-
}, A),
|
|
1843
|
+
}, A), D(d({
|
|
1824
1844
|
width: 60,
|
|
1825
1845
|
height: 100,
|
|
1826
1846
|
name: "cube",
|
|
@@ -1853,12 +1873,12 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1853
1873
|
}
|
|
1854
1874
|
]
|
|
1855
1875
|
}
|
|
1856
|
-
}),
|
|
1876
|
+
}), d({
|
|
1857
1877
|
width: 70,
|
|
1858
1878
|
height: 100,
|
|
1859
1879
|
name: "people",
|
|
1860
1880
|
penName: "人"
|
|
1861
|
-
}, A),
|
|
1881
|
+
}, A), D(d({
|
|
1862
1882
|
name: "rectangle",
|
|
1863
1883
|
penName: "按钮",
|
|
1864
1884
|
width: 80,
|
|
@@ -1877,8 +1897,8 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1877
1897
|
hoverColor: "#40a9ff",
|
|
1878
1898
|
hoverTextColor: "#fff"
|
|
1879
1899
|
}, A), {
|
|
1880
|
-
penType:
|
|
1881
|
-
}),
|
|
1900
|
+
penType: P.BUTTON
|
|
1901
|
+
}), D(d({
|
|
1882
1902
|
name: "rectangle",
|
|
1883
1903
|
penName: "输入框",
|
|
1884
1904
|
height: 50,
|
|
@@ -1894,8 +1914,8 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1894
1914
|
activeTextColor: "#000000FF",
|
|
1895
1915
|
textLeft: 10
|
|
1896
1916
|
}, A), {
|
|
1897
|
-
penType:
|
|
1898
|
-
}),
|
|
1917
|
+
penType: P.INPUT
|
|
1918
|
+
}), D(d({
|
|
1899
1919
|
name: "rectangle",
|
|
1900
1920
|
penName: "选择器",
|
|
1901
1921
|
height: 50,
|
|
@@ -1921,8 +1941,8 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1921
1941
|
}
|
|
1922
1942
|
]
|
|
1923
1943
|
}, A), {
|
|
1924
|
-
penType:
|
|
1925
|
-
}),
|
|
1944
|
+
penType: P.SELECT
|
|
1945
|
+
}), D(d({
|
|
1926
1946
|
name: "slider",
|
|
1927
1947
|
penName: "进度条",
|
|
1928
1948
|
width: 300,
|
|
@@ -1938,20 +1958,20 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1938
1958
|
textColor: "#222",
|
|
1939
1959
|
unit: "%"
|
|
1940
1960
|
}, A), {
|
|
1941
|
-
penType:
|
|
1942
|
-
}),
|
|
1961
|
+
penType: P.SLIDER
|
|
1962
|
+
}), D(d({
|
|
1943
1963
|
name: "time",
|
|
1944
1964
|
penName: "时间",
|
|
1945
1965
|
width: 300,
|
|
1946
1966
|
height: 40,
|
|
1947
|
-
text: `${
|
|
1967
|
+
text: `${Oa().format("YYYY-MM-DD HH:mm:ss")}`,
|
|
1948
1968
|
lineWidth: 0,
|
|
1949
1969
|
fontSize: 20,
|
|
1950
1970
|
// 绘画帧时长
|
|
1951
1971
|
interval: 67,
|
|
1952
1972
|
fillZero: !0
|
|
1953
1973
|
}, A), {
|
|
1954
|
-
penType:
|
|
1974
|
+
penType: P.TIME,
|
|
1955
1975
|
form: [
|
|
1956
1976
|
{
|
|
1957
1977
|
key: "timeFormat",
|
|
@@ -1966,7 +1986,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1966
1986
|
...A.form
|
|
1967
1987
|
],
|
|
1968
1988
|
timeFormat: "`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"
|
|
1969
|
-
}),
|
|
1989
|
+
}), D(d({
|
|
1970
1990
|
name: "switch",
|
|
1971
1991
|
penName: "开关",
|
|
1972
1992
|
height: 30,
|
|
@@ -1978,9 +1998,9 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1978
1998
|
disableOnColor: "#A3D3FF",
|
|
1979
1999
|
locked: 0
|
|
1980
2000
|
}, A), {
|
|
1981
|
-
penType:
|
|
2001
|
+
penType: P.SWITCH
|
|
1982
2002
|
//disable: true,
|
|
1983
|
-
}),
|
|
2003
|
+
}), D(d({
|
|
1984
2004
|
name: "radio",
|
|
1985
2005
|
penName: "单选框",
|
|
1986
2006
|
direction: "horizontal",
|
|
@@ -1989,8 +2009,8 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1989
2009
|
checked: "",
|
|
1990
2010
|
options: [{ text: "选项一" }, { text: "选项二" }, { text: "选项三", isForbidden: !0 }]
|
|
1991
2011
|
}, A), {
|
|
1992
|
-
penType:
|
|
1993
|
-
}),
|
|
2012
|
+
penType: P.RADIO
|
|
2013
|
+
}), D(d({
|
|
1994
2014
|
name: "checkbox",
|
|
1995
2015
|
penName: "多选框",
|
|
1996
2016
|
width: 30,
|
|
@@ -1999,8 +2019,8 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
1999
2019
|
// isForbidden: true,
|
|
2000
2020
|
value: "选项一"
|
|
2001
2021
|
}, A), {
|
|
2002
|
-
penType:
|
|
2003
|
-
}),
|
|
2022
|
+
penType: P.CHECKBOX
|
|
2023
|
+
}), D(d({
|
|
2004
2024
|
name: "table2",
|
|
2005
2025
|
penName: "表格",
|
|
2006
2026
|
width: 80,
|
|
@@ -2017,7 +2037,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2017
2037
|
color: "#333",
|
|
2018
2038
|
textColor: "#444"
|
|
2019
2039
|
}, A), {
|
|
2020
|
-
penType:
|
|
2040
|
+
penType: P.TABLE,
|
|
2021
2041
|
replaceMode: 2,
|
|
2022
2042
|
data: [
|
|
2023
2043
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2068,7 +2088,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2068
2088
|
textColor: "#000"
|
|
2069
2089
|
}
|
|
2070
2090
|
]
|
|
2071
|
-
}),
|
|
2091
|
+
}), D(d({
|
|
2072
2092
|
name: "table2",
|
|
2073
2093
|
penName: "斑马纹表格",
|
|
2074
2094
|
width: 80,
|
|
@@ -2085,7 +2105,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2085
2105
|
color: "#333",
|
|
2086
2106
|
textColor: "#444"
|
|
2087
2107
|
}, A), {
|
|
2088
|
-
penType:
|
|
2108
|
+
penType: P.TABLE,
|
|
2089
2109
|
replaceMode: 2,
|
|
2090
2110
|
data: [
|
|
2091
2111
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2136,7 +2156,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2136
2156
|
textColor: "#000"
|
|
2137
2157
|
}
|
|
2138
2158
|
]
|
|
2139
|
-
}),
|
|
2159
|
+
}), D(d({
|
|
2140
2160
|
name: "table2",
|
|
2141
2161
|
penName: "滚动表格",
|
|
2142
2162
|
width: 80,
|
|
@@ -2155,7 +2175,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2155
2175
|
color: "#333",
|
|
2156
2176
|
textColor: "#444"
|
|
2157
2177
|
}, A), {
|
|
2158
|
-
penType:
|
|
2178
|
+
penType: P.TABLE,
|
|
2159
2179
|
replaceMode: 2,
|
|
2160
2180
|
data: [
|
|
2161
2181
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2216,95 +2236,95 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2216
2236
|
textColor: "#000"
|
|
2217
2237
|
}
|
|
2218
2238
|
]
|
|
2219
|
-
}),
|
|
2239
|
+
}), D(d({
|
|
2220
2240
|
name: "svg",
|
|
2221
2241
|
width: 100,
|
|
2222
2242
|
height: 100,
|
|
2223
|
-
image:
|
|
2243
|
+
image: Ze + "/icon/audio.svg",
|
|
2224
2244
|
audioId: "",
|
|
2225
2245
|
penName: "音频",
|
|
2226
2246
|
datable: !0,
|
|
2227
|
-
penType:
|
|
2228
|
-
},
|
|
2229
|
-
form: [...
|
|
2247
|
+
penType: P.AUDIO
|
|
2248
|
+
}, j), {
|
|
2249
|
+
form: [...be[P.AUDIO], ...j.form],
|
|
2230
2250
|
events: [
|
|
2231
2251
|
{
|
|
2232
2252
|
name: "enter",
|
|
2233
|
-
action:
|
|
2234
|
-
value:
|
|
2253
|
+
action: Xe.Emit,
|
|
2254
|
+
value: ne.OPEN_AUDIO,
|
|
2235
2255
|
where: {
|
|
2236
2256
|
type: ""
|
|
2237
2257
|
},
|
|
2238
2258
|
params: JSON.stringify({
|
|
2239
|
-
action:
|
|
2259
|
+
action: ne.OPEN_AUDIO,
|
|
2240
2260
|
data: ""
|
|
2241
2261
|
// 音频id
|
|
2242
2262
|
})
|
|
2243
2263
|
},
|
|
2244
2264
|
{
|
|
2245
2265
|
name: "leave",
|
|
2246
|
-
action:
|
|
2247
|
-
value:
|
|
2266
|
+
action: Xe.Emit,
|
|
2267
|
+
value: ne.CLOSE_AUDIO,
|
|
2248
2268
|
where: {
|
|
2249
2269
|
type: ""
|
|
2250
2270
|
},
|
|
2251
2271
|
params: JSON.stringify({
|
|
2252
|
-
action:
|
|
2272
|
+
action: ne.CLOSE_AUDIO,
|
|
2253
2273
|
data: ""
|
|
2254
2274
|
// 音频id
|
|
2255
2275
|
})
|
|
2256
2276
|
}
|
|
2257
2277
|
]
|
|
2258
|
-
}),
|
|
2278
|
+
}), D(d({
|
|
2259
2279
|
name: "svg",
|
|
2260
2280
|
width: 100,
|
|
2261
2281
|
height: 100,
|
|
2262
|
-
image:
|
|
2282
|
+
image: Ze + "/icon/camera.svg",
|
|
2263
2283
|
cameraId: "",
|
|
2264
2284
|
penName: "摄像机",
|
|
2265
2285
|
datable: !0,
|
|
2266
2286
|
events: [
|
|
2267
2287
|
{
|
|
2268
2288
|
name: "enter",
|
|
2269
|
-
action:
|
|
2270
|
-
value:
|
|
2289
|
+
action: Xe.Emit,
|
|
2290
|
+
value: ne.OPEN_CAMERA,
|
|
2271
2291
|
where: {
|
|
2272
2292
|
type: ""
|
|
2273
2293
|
},
|
|
2274
2294
|
params: JSON.stringify({
|
|
2275
|
-
action:
|
|
2295
|
+
action: ne.OPEN_CAMERA,
|
|
2276
2296
|
data: ""
|
|
2277
2297
|
// 摄像机id
|
|
2278
2298
|
})
|
|
2279
2299
|
},
|
|
2280
2300
|
{
|
|
2281
2301
|
name: "leave",
|
|
2282
|
-
action:
|
|
2283
|
-
value:
|
|
2302
|
+
action: Xe.Emit,
|
|
2303
|
+
value: ne.CLOSE_CAMERA,
|
|
2284
2304
|
where: {
|
|
2285
2305
|
type: ""
|
|
2286
2306
|
},
|
|
2287
2307
|
params: JSON.stringify({
|
|
2288
|
-
action:
|
|
2308
|
+
action: ne.CLOSE_CAMERA,
|
|
2289
2309
|
data: ""
|
|
2290
2310
|
// 摄像机id
|
|
2291
2311
|
})
|
|
2292
2312
|
}
|
|
2293
2313
|
],
|
|
2294
|
-
penType:
|
|
2295
|
-
},
|
|
2296
|
-
form: [...
|
|
2297
|
-
}),
|
|
2314
|
+
penType: P.CAMERA
|
|
2315
|
+
}, j), {
|
|
2316
|
+
form: [...be[P.CAMERA], ...j.form]
|
|
2317
|
+
}), D(d({
|
|
2298
2318
|
name: "video",
|
|
2299
2319
|
width: 100,
|
|
2300
2320
|
height: 100,
|
|
2301
2321
|
video: "https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",
|
|
2302
2322
|
autoPlay: !0,
|
|
2303
2323
|
penName: "MP4",
|
|
2304
|
-
penType:
|
|
2305
|
-
},
|
|
2306
|
-
form: [...
|
|
2307
|
-
}),
|
|
2324
|
+
penType: P.MP4
|
|
2325
|
+
}, j), {
|
|
2326
|
+
form: [...be[P.MP4], ...j.form]
|
|
2327
|
+
}), D(d({
|
|
2308
2328
|
name: "video",
|
|
2309
2329
|
width: 100,
|
|
2310
2330
|
height: 100,
|
|
@@ -2312,102 +2332,102 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2312
2332
|
datable: !0,
|
|
2313
2333
|
video: "https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",
|
|
2314
2334
|
autoPlay: !0,
|
|
2315
|
-
penType:
|
|
2316
|
-
},
|
|
2317
|
-
form: [...
|
|
2318
|
-
}),
|
|
2335
|
+
penType: P.VIDEO_STREAM
|
|
2336
|
+
}, j), {
|
|
2337
|
+
form: [...be[P.VIDEO_STREAM], ...j.form]
|
|
2338
|
+
}), d({
|
|
2319
2339
|
text: "开始/结束",
|
|
2320
2340
|
width: 120,
|
|
2321
2341
|
height: 40,
|
|
2322
2342
|
borderRadius: 0.5,
|
|
2323
2343
|
name: "rectangle",
|
|
2324
2344
|
penName: "开始/结束"
|
|
2325
|
-
}, A),
|
|
2345
|
+
}, A), d({
|
|
2326
2346
|
text: "流程",
|
|
2327
2347
|
width: 120,
|
|
2328
2348
|
height: 40,
|
|
2329
2349
|
name: "rectangle",
|
|
2330
2350
|
penName: "流程"
|
|
2331
|
-
}, A),
|
|
2351
|
+
}, A), d({
|
|
2332
2352
|
text: "判定",
|
|
2333
2353
|
width: 120,
|
|
2334
2354
|
height: 60,
|
|
2335
2355
|
name: "diamond",
|
|
2336
2356
|
penName: "判定"
|
|
2337
|
-
}, A),
|
|
2357
|
+
}, A), d({
|
|
2338
2358
|
text: "数据",
|
|
2339
2359
|
width: 120,
|
|
2340
2360
|
height: 50,
|
|
2341
2361
|
name: "flowData",
|
|
2342
2362
|
penName: "数据",
|
|
2343
2363
|
offsetX: 0.14
|
|
2344
|
-
}, A),
|
|
2364
|
+
}, A), d({
|
|
2345
2365
|
text: "准备",
|
|
2346
2366
|
width: 120,
|
|
2347
2367
|
height: 50,
|
|
2348
2368
|
name: "hexagon",
|
|
2349
2369
|
penName: "准备"
|
|
2350
|
-
}, A),
|
|
2370
|
+
}, A), d({
|
|
2351
2371
|
text: "子流程",
|
|
2352
2372
|
width: 120,
|
|
2353
2373
|
height: 50,
|
|
2354
2374
|
name: "flowSubprocess",
|
|
2355
2375
|
penName: "子流程"
|
|
2356
|
-
}, A),
|
|
2376
|
+
}, A), d({
|
|
2357
2377
|
text: "数据库",
|
|
2358
2378
|
width: 80,
|
|
2359
2379
|
height: 120,
|
|
2360
2380
|
name: "flowDb",
|
|
2361
2381
|
penName: "数据库"
|
|
2362
|
-
}, A),
|
|
2382
|
+
}, A), d({
|
|
2363
2383
|
text: "文档",
|
|
2364
2384
|
width: 120,
|
|
2365
2385
|
height: 100,
|
|
2366
2386
|
name: "flowDocument",
|
|
2367
2387
|
penName: "文档"
|
|
2368
|
-
}, A),
|
|
2388
|
+
}, A), d({
|
|
2369
2389
|
text: "内部存储",
|
|
2370
2390
|
width: 120,
|
|
2371
2391
|
height: 80,
|
|
2372
2392
|
name: "flowInternalStorage",
|
|
2373
2393
|
penName: "内部存储"
|
|
2374
|
-
}, A),
|
|
2394
|
+
}, A), d({
|
|
2375
2395
|
text: "外部存储",
|
|
2376
2396
|
width: 120,
|
|
2377
2397
|
height: 80,
|
|
2378
2398
|
name: "flowExternStorage",
|
|
2379
2399
|
penName: "外部存储"
|
|
2380
|
-
}, A),
|
|
2400
|
+
}, A), d({
|
|
2381
2401
|
text: "队列",
|
|
2382
2402
|
width: 100,
|
|
2383
2403
|
height: 100,
|
|
2384
2404
|
name: "flowQueue",
|
|
2385
2405
|
penName: "队列"
|
|
2386
|
-
}, A),
|
|
2406
|
+
}, A), d({
|
|
2387
2407
|
text: "手动输入",
|
|
2388
2408
|
width: 120,
|
|
2389
2409
|
height: 80,
|
|
2390
2410
|
name: "flowManually",
|
|
2391
2411
|
penName: "手动输入"
|
|
2392
|
-
}, A),
|
|
2412
|
+
}, A), d({
|
|
2393
2413
|
text: "展示",
|
|
2394
2414
|
width: 120,
|
|
2395
2415
|
height: 80,
|
|
2396
2416
|
name: "flowDisplay",
|
|
2397
2417
|
penName: "展示"
|
|
2398
|
-
}, A),
|
|
2418
|
+
}, A), d({
|
|
2399
2419
|
text: "并行模式",
|
|
2400
2420
|
width: 120,
|
|
2401
2421
|
height: 50,
|
|
2402
2422
|
name: "flowParallel",
|
|
2403
2423
|
penName: "并行模式"
|
|
2404
|
-
}, A),
|
|
2424
|
+
}, A), d({
|
|
2405
2425
|
text: "注释",
|
|
2406
2426
|
width: 100,
|
|
2407
2427
|
height: 100,
|
|
2408
2428
|
name: "flowComment",
|
|
2409
2429
|
penName: "注释"
|
|
2410
|
-
}, A),
|
|
2430
|
+
}, A), d({
|
|
2411
2431
|
text: "",
|
|
2412
2432
|
width: 30,
|
|
2413
2433
|
height: 30,
|
|
@@ -2415,25 +2435,25 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2415
2435
|
penName: "开始",
|
|
2416
2436
|
background: "#555",
|
|
2417
2437
|
lineWidth: 0
|
|
2418
|
-
}, A),
|
|
2438
|
+
}, A), d({
|
|
2419
2439
|
width: 30,
|
|
2420
2440
|
height: 30,
|
|
2421
2441
|
name: "activityFinal",
|
|
2422
2442
|
penName: "结束"
|
|
2423
|
-
}, A),
|
|
2443
|
+
}, A), d({
|
|
2424
2444
|
text: "活动",
|
|
2425
2445
|
width: 120,
|
|
2426
2446
|
height: 50,
|
|
2427
2447
|
borderRadius: 0.25,
|
|
2428
2448
|
name: "rectangle",
|
|
2429
2449
|
penName: "活动"
|
|
2430
|
-
}, A),
|
|
2450
|
+
}, A), d({
|
|
2431
2451
|
text: "决策/合并",
|
|
2432
2452
|
width: 120,
|
|
2433
2453
|
height: 50,
|
|
2434
2454
|
name: "diamond",
|
|
2435
2455
|
penName: "决策/合并"
|
|
2436
|
-
}, A),
|
|
2456
|
+
}, A), d({
|
|
2437
2457
|
text: "垂直泳道",
|
|
2438
2458
|
width: 200,
|
|
2439
2459
|
height: 500,
|
|
@@ -2443,7 +2463,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2443
2463
|
textTop: 20,
|
|
2444
2464
|
// textHeight: ,
|
|
2445
2465
|
lineTop: 0.08
|
|
2446
|
-
}, A),
|
|
2466
|
+
}, A), d({
|
|
2447
2467
|
text: "水平泳道",
|
|
2448
2468
|
width: 500,
|
|
2449
2469
|
height: 200,
|
|
@@ -2453,7 +2473,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2453
2473
|
textLeft: 0.04,
|
|
2454
2474
|
textAlign: "left",
|
|
2455
2475
|
lineLeft: 0.08
|
|
2456
|
-
}, A),
|
|
2476
|
+
}, A), d({
|
|
2457
2477
|
text: "垂直分岔/汇合",
|
|
2458
2478
|
width: 10,
|
|
2459
2479
|
height: 150,
|
|
@@ -2461,7 +2481,7 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2461
2481
|
penName: "垂直分岔/汇合",
|
|
2462
2482
|
fillStyle: "#555",
|
|
2463
2483
|
strokeStyle: "transparent"
|
|
2464
|
-
}, A),
|
|
2484
|
+
}, A), d({
|
|
2465
2485
|
text: "水平分岔/汇合",
|
|
2466
2486
|
width: 150,
|
|
2467
2487
|
height: 10,
|
|
@@ -2469,76 +2489,76 @@ H.YX, H.YX, H.YX, b.POINT_VALUE, W.anchors, window.visibleLevel, W.form, W.form,
|
|
|
2469
2489
|
penName: "水平分岔/汇合",
|
|
2470
2490
|
fillStyle: "#555",
|
|
2471
2491
|
strokeStyle: "transparent"
|
|
2472
|
-
}, A),
|
|
2492
|
+
}, A), d({
|
|
2473
2493
|
name: "andGate",
|
|
2474
2494
|
penName: "与门",
|
|
2475
2495
|
width: 100,
|
|
2476
2496
|
height: 150
|
|
2477
|
-
}, A),
|
|
2497
|
+
}, A), d({
|
|
2478
2498
|
name: "basicEvent",
|
|
2479
2499
|
penName: "基本事件",
|
|
2480
2500
|
width: 100,
|
|
2481
2501
|
height: 150
|
|
2482
|
-
}, A),
|
|
2502
|
+
}, A), d({
|
|
2483
2503
|
name: "unexpandedEvent",
|
|
2484
2504
|
penName: "未展开事件",
|
|
2485
2505
|
width: 100,
|
|
2486
2506
|
height: 150
|
|
2487
|
-
}, A),
|
|
2507
|
+
}, A), d({
|
|
2488
2508
|
name: "priorityAndGate",
|
|
2489
2509
|
penName: "优先AND门",
|
|
2490
2510
|
width: 100,
|
|
2491
2511
|
height: 150
|
|
2492
|
-
}, A),
|
|
2512
|
+
}, A), d({
|
|
2493
2513
|
name: "forbiddenGate",
|
|
2494
2514
|
penName: "禁止门",
|
|
2495
2515
|
width: 100,
|
|
2496
2516
|
height: 150
|
|
2497
|
-
}, A),
|
|
2517
|
+
}, A), d({
|
|
2498
2518
|
name: "event",
|
|
2499
2519
|
penName: "事件",
|
|
2500
2520
|
width: 100,
|
|
2501
2521
|
height: 150
|
|
2502
|
-
}, A),
|
|
2522
|
+
}, A), d({
|
|
2503
2523
|
name: "switchEvent",
|
|
2504
2524
|
penName: "开关事件",
|
|
2505
2525
|
width: 100,
|
|
2506
2526
|
height: 150
|
|
2507
|
-
}, A),
|
|
2527
|
+
}, A), d({
|
|
2508
2528
|
name: "conditionalEvent",
|
|
2509
2529
|
penName: "条件事件",
|
|
2510
2530
|
width: 150,
|
|
2511
2531
|
height: 100
|
|
2512
|
-
}, A),
|
|
2532
|
+
}, A), d({
|
|
2513
2533
|
name: "transferSymbol",
|
|
2514
2534
|
penName: "转移符号",
|
|
2515
2535
|
width: 100,
|
|
2516
2536
|
height: 150
|
|
2517
|
-
}, A),
|
|
2537
|
+
}, A), d({
|
|
2518
2538
|
name: "orGate",
|
|
2519
2539
|
penName: "或门",
|
|
2520
2540
|
width: 100,
|
|
2521
2541
|
height: 150
|
|
2522
|
-
}, A),
|
|
2542
|
+
}, A), d({
|
|
2523
2543
|
name: "xorGate",
|
|
2524
2544
|
penName: "异或门",
|
|
2525
2545
|
width: 100,
|
|
2526
2546
|
height: 150
|
|
2527
|
-
}, A),
|
|
2547
|
+
}, A), d({
|
|
2528
2548
|
name: "votingGate",
|
|
2529
2549
|
penName: "表决门",
|
|
2530
2550
|
width: 100,
|
|
2531
2551
|
height: 150
|
|
2532
2552
|
}, A);
|
|
2533
|
-
const
|
|
2553
|
+
const tr = (a, e = { isDev: !1, devServerUrl: "", devServerPort: 8443 }) => (a = a.replace(
|
|
2534
2554
|
/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,
|
|
2535
|
-
`$1${e.isDev ? e.devServerUrl :
|
|
2536
|
-
), e.isDev ?
|
|
2537
|
-
const t =
|
|
2538
|
-
for (const [
|
|
2539
|
-
t[
|
|
2555
|
+
`$1${e.isDev ? e.devServerUrl : mn}:${e.isDev ? e.devServerPort : pn}`
|
|
2556
|
+
), e.isDev ? a : a.replace("/baseUrl", "")), ot = (a, e) => {
|
|
2557
|
+
const t = a.__vccOpts || a;
|
|
2558
|
+
for (const [n, r] of e)
|
|
2559
|
+
t[n] = r;
|
|
2540
2560
|
return t;
|
|
2541
|
-
},
|
|
2561
|
+
}, ar = { class: "props-panel__title" }, nr = { class: "props-panel__value" }, rr = { class: "value-left" }, ir = { class: "props-panel__value-num" }, or = { class: "value-right" }, sr = /* @__PURE__ */ Object.assign({ name: "PropsPanle" }, {
|
|
2542
2562
|
__name: "PropsPanle",
|
|
2543
2563
|
props: {
|
|
2544
2564
|
data: {
|
|
@@ -2547,39 +2567,39 @@ const Vn = (n, e = { isDev: !1, devServerUrl: "", devServerPort: 8443 }) => (n =
|
|
|
2547
2567
|
}
|
|
2548
2568
|
},
|
|
2549
2569
|
emits: ["close", "enter", "view-history"],
|
|
2550
|
-
setup(
|
|
2551
|
-
const t =
|
|
2552
|
-
function
|
|
2553
|
-
return
|
|
2570
|
+
setup(a, { emit: e }) {
|
|
2571
|
+
const t = a, n = e;
|
|
2572
|
+
function r(f) {
|
|
2573
|
+
return f == null || f === "—" ? "—" : typeof f == "number" ? f.toFixed(2) : f;
|
|
2554
2574
|
}
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
},
|
|
2558
|
-
|
|
2559
|
-
},
|
|
2560
|
-
|
|
2575
|
+
const i = () => {
|
|
2576
|
+
n("close");
|
|
2577
|
+
}, s = () => {
|
|
2578
|
+
n("enter");
|
|
2579
|
+
}, c = () => {
|
|
2580
|
+
n("view-history", t.data);
|
|
2561
2581
|
};
|
|
2562
|
-
return (
|
|
2563
|
-
var
|
|
2564
|
-
return ue(),
|
|
2582
|
+
return (f, g) => {
|
|
2583
|
+
var O, U;
|
|
2584
|
+
return ue(), xe("div", {
|
|
2565
2585
|
class: "props-panel",
|
|
2566
|
-
onMouseleave:
|
|
2567
|
-
onMouseover:
|
|
2586
|
+
onMouseleave: i,
|
|
2587
|
+
onMouseover: s
|
|
2568
2588
|
}, [
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2589
|
+
ge("div", ar, At(((O = t == null ? void 0 : t.data) == null ? void 0 : O.name) || "—"), 1),
|
|
2590
|
+
g[2] || (g[2] = ge("div", { class: "props-panel__label" }, "脉冲峰值", -1)),
|
|
2591
|
+
ge("div", nr, [
|
|
2592
|
+
ge("div", rr, [
|
|
2593
|
+
ge("span", ir, At(r((U = t == null ? void 0 : t.data) == null ? void 0 : U.value)), 1),
|
|
2594
|
+
g[0] || (g[0] = ge("span", { class: "props-panel__unit" }, "dBm", -1))
|
|
2575
2595
|
]),
|
|
2576
|
-
|
|
2577
|
-
|
|
2596
|
+
ge("div", or, [
|
|
2597
|
+
$e(ze(ua), {
|
|
2578
2598
|
type: "primary",
|
|
2579
|
-
onClick:
|
|
2599
|
+
onClick: c
|
|
2580
2600
|
}, {
|
|
2581
|
-
default:
|
|
2582
|
-
|
|
2601
|
+
default: _t(() => [...g[1] || (g[1] = [
|
|
2602
|
+
ra("查看历史", -1)
|
|
2583
2603
|
])]),
|
|
2584
2604
|
_: 1
|
|
2585
2605
|
})
|
|
@@ -2588,10 +2608,10 @@ const Vn = (n, e = { isDev: !1, devServerUrl: "", devServerPort: 8443 }) => (n =
|
|
|
2588
2608
|
], 32);
|
|
2589
2609
|
};
|
|
2590
2610
|
}
|
|
2591
|
-
}),
|
|
2592
|
-
class
|
|
2611
|
+
}), lr = /* @__PURE__ */ ot(sr, [["__scopeId", "data-v-937ebfaa"]]);
|
|
2612
|
+
class cr {
|
|
2593
2613
|
constructor(e) {
|
|
2594
|
-
|
|
2614
|
+
Se(this, "editor");
|
|
2595
2615
|
this.editor = e;
|
|
2596
2616
|
}
|
|
2597
2617
|
/**
|
|
@@ -2600,92 +2620,162 @@ class Xn {
|
|
|
2600
2620
|
* @param {*} target 目标组件
|
|
2601
2621
|
* @param {*} options 配置信息
|
|
2602
2622
|
*/
|
|
2603
|
-
initPlugin(e, t,
|
|
2623
|
+
initPlugin(e, t, n = {}) {
|
|
2604
2624
|
e.installPenPlugins({ name: t }, [
|
|
2605
2625
|
{
|
|
2606
|
-
plugin:
|
|
2607
|
-
options:
|
|
2626
|
+
plugin: Ya,
|
|
2627
|
+
options: n
|
|
2608
2628
|
},
|
|
2609
2629
|
{
|
|
2610
|
-
plugin:
|
|
2611
|
-
options:
|
|
2630
|
+
plugin: $a,
|
|
2631
|
+
options: n
|
|
2612
2632
|
}
|
|
2613
2633
|
]);
|
|
2614
2634
|
}
|
|
2615
2635
|
}
|
|
2616
|
-
function
|
|
2617
|
-
var
|
|
2618
|
-
const t = e || new Path2D(), { x:
|
|
2619
|
-
if (t.arc(
|
|
2636
|
+
function dr(a, e) {
|
|
2637
|
+
var $, Z;
|
|
2638
|
+
const t = e || new Path2D(), { x: n, y: r, width: i, height: s } = a.calculative.worldRect, c = n + i / 2, f = r + s / 2, g = i / 2, O = ($ = a.startAngle) != null ? $ : 0, U = (Z = a.endAngle) != null ? Z : 2 * Math.PI;
|
|
2639
|
+
if (t.arc(c, f, g, O, U, a.anticlockwise), t instanceof Path2D) return t;
|
|
2620
2640
|
}
|
|
2621
|
-
function
|
|
2622
|
-
const t = e || new Path2D(), { x:
|
|
2623
|
-
if (t.rect(
|
|
2641
|
+
function ur(a, e) {
|
|
2642
|
+
const t = e || new Path2D(), { x: n, y: r, width: i, height: s } = a.calculative.worldRect;
|
|
2643
|
+
if (t.rect(n, r, i, s), t instanceof Path2D) return t;
|
|
2624
2644
|
}
|
|
2625
|
-
function
|
|
2626
|
-
const t =
|
|
2627
|
-
if (!
|
|
2628
|
-
const
|
|
2629
|
-
x:
|
|
2630
|
-
y:
|
|
2631
|
-
}),
|
|
2632
|
-
|
|
2633
|
-
const
|
|
2634
|
-
t.moveTo(
|
|
2635
|
-
const
|
|
2636
|
-
if (
|
|
2637
|
-
const
|
|
2638
|
-
t.moveTo(
|
|
2645
|
+
function hr(a, e) {
|
|
2646
|
+
const t = a || new Path2D(), n = e.dimensionData;
|
|
2647
|
+
if (!n) return t;
|
|
2648
|
+
const r = e.calculative.worldRect, i = (G) => ({
|
|
2649
|
+
x: r.x + G.x * r.width,
|
|
2650
|
+
y: r.y + G.y * r.height
|
|
2651
|
+
}), s = i(n.tp1), c = i(n.tp2), f = i(n.dimStart), g = i(n.dimEnd), O = e.calculative.fontSize || 12;
|
|
2652
|
+
a && a.beginPath && (a.save(), a.beginPath(), a.strokeStyle = e.color || "#000", a.lineWidth = e.calculative.lineWidth || 1);
|
|
2653
|
+
const U = Math.max(5, O * 0.4), $ = f.x - s.x, Z = f.y - s.y, K = Math.hypot($, Z) || 1, te = f.x + $ / K * U, L = f.y + Z / K * U, W = g.x - c.x, me = g.y - c.y, _e = Math.hypot(W, me) || 1, Re = g.x + W / _e * U, re = g.y + me / _e * U;
|
|
2654
|
+
t.moveTo(s.x, s.y), t.lineTo(te, L), t.moveTo(c.x, c.y), t.lineTo(Re, re), t.moveTo(f.x, f.y), t.lineTo(g.x, g.y);
|
|
2655
|
+
const Ne = Math.hypot(g.x - f.x, g.y - f.y), J = Math.min(10, Ne / 2.1), fe = (G, ee) => {
|
|
2656
|
+
if (J < 1) return;
|
|
2657
|
+
const se = Math.atan2(ee.y - G.y, ee.x - G.x), pe = Math.PI / 6, Ee = ee.x - J * Math.cos(se - pe), le = ee.y - J * Math.sin(se - pe), ie = ee.x - J * Math.cos(se + pe), ce = ee.y - J * Math.sin(se + pe);
|
|
2658
|
+
t.moveTo(ee.x, ee.y), t.lineTo(Ee, le), t.lineTo(ie, ce), t.closePath();
|
|
2639
2659
|
};
|
|
2640
|
-
if (
|
|
2641
|
-
|
|
2642
|
-
let
|
|
2643
|
-
|
|
2644
|
-
const
|
|
2645
|
-
if (
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2660
|
+
if (fe(g, f), fe(f, g), a && a.stroke && (a.stroke(), a.restore()), a && a.fillText && n.text) {
|
|
2661
|
+
a.save(), a.fillStyle = e.textColor || e.color || "#000", a.textAlign = "center", a.textBaseline = "bottom";
|
|
2662
|
+
let G = O;
|
|
2663
|
+
a.font = `${e.fontStyle || ""} ${e.fontWeight || ""} ${G}px ${e.fontFamily || "Arial"}`;
|
|
2664
|
+
const ee = a.measureText(n.text), se = Ne * 0.9;
|
|
2665
|
+
if (ee.width > se && se > 0) {
|
|
2666
|
+
const ie = se / ee.width;
|
|
2667
|
+
G = G * ie, a.font = `${e.fontStyle || ""} ${e.fontWeight || ""} ${G}px ${e.fontFamily || "Arial"}`;
|
|
2648
2668
|
}
|
|
2649
|
-
const
|
|
2650
|
-
let
|
|
2651
|
-
(
|
|
2669
|
+
const pe = (f.x + g.x) / 2, Ee = (f.y + g.y) / 2;
|
|
2670
|
+
let le = Math.atan2(g.y - f.y, g.x - f.x);
|
|
2671
|
+
(le > Math.PI / 2 || le < -Math.PI / 2) && (le += Math.PI), a.translate(pe, Ee), a.rotate(le), a.fillText(n.text, 0, -G * 0.2), a.restore();
|
|
2652
2672
|
}
|
|
2653
2673
|
if (t instanceof Path2D) return t;
|
|
2654
2674
|
}
|
|
2655
|
-
function
|
|
2656
|
-
const t = e || new Path2D(), { x:
|
|
2657
|
-
if ((
|
|
2675
|
+
function mr(a, e) {
|
|
2676
|
+
const t = e || new Path2D(), { x: n, y: r, width: i, height: s } = a.calculative.worldRect;
|
|
2677
|
+
if ((a.anchors && a.anchors.length >= 3 ? a.anchors.slice(0, 3) : [
|
|
2658
2678
|
{ x: 0, y: 1 },
|
|
2659
2679
|
{ x: 1, y: 1 },
|
|
2660
2680
|
{ x: 0.5, y: 0 }
|
|
2661
|
-
]).forEach((
|
|
2662
|
-
const
|
|
2663
|
-
|
|
2681
|
+
]).forEach((f, g) => {
|
|
2682
|
+
const O = n + f.x * i, U = r + f.y * s;
|
|
2683
|
+
g === 0 ? t.moveTo(O, U) : t.lineTo(O, U);
|
|
2664
2684
|
}), t.closePath(), t instanceof Path2D) return t;
|
|
2665
2685
|
}
|
|
2666
|
-
function
|
|
2667
|
-
var
|
|
2668
|
-
const t = e || new Path2D(), { x:
|
|
2669
|
-
if (t.ellipse(
|
|
2686
|
+
function fr(a, e) {
|
|
2687
|
+
var Z, K;
|
|
2688
|
+
const t = e || new Path2D(), { x: n, y: r, width: i, height: s } = a.calculative.worldRect, c = n + i / 2, f = r + s / 2, g = i / 2, O = s / 2, U = (Z = a.startAngle) != null ? Z : 0, $ = (K = a.endAngle) != null ? K : 2 * Math.PI;
|
|
2689
|
+
if (t.ellipse(c, f, g, O, 0, U, $, a.anticlockwise), t instanceof Path2D) return t;
|
|
2670
2690
|
}
|
|
2671
|
-
function
|
|
2672
|
-
return
|
|
2673
|
-
yield meta2d.register({ arc:
|
|
2691
|
+
function pr() {
|
|
2692
|
+
return ae(this, null, function* () {
|
|
2693
|
+
yield meta2d.register({ arc: dr, mtext: ur, arrow: mr, ellipse: fr }), yield meta2d.registerCanvasDraw({ dimension: hr });
|
|
2674
2694
|
});
|
|
2675
2695
|
}
|
|
2676
|
-
const
|
|
2677
|
-
function
|
|
2678
|
-
|
|
2696
|
+
const Ta = "meta2d-pen-size:", Ar = Q(0), gr = ["uhf:"], vr = (a) => gr.some((e) => a == null ? void 0 : a.startsWith(e)), Lt = (a) => Math.round(a * 100) / 100;
|
|
2697
|
+
function wr(a, e) {
|
|
2698
|
+
var n, r;
|
|
2699
|
+
if (!a) return null;
|
|
2700
|
+
if (typeof a.getPenRect == "function")
|
|
2701
|
+
return a.getPenRect(e);
|
|
2702
|
+
const t = ((r = (n = a.store) == null ? void 0 : n.data) == null ? void 0 : r.scale) || 1;
|
|
2703
|
+
return {
|
|
2704
|
+
x: (e.x || 0) / t,
|
|
2705
|
+
y: (e.y || 0) / t,
|
|
2706
|
+
width: (e.width || 0) / t,
|
|
2707
|
+
height: (e.height || 0) / t
|
|
2708
|
+
};
|
|
2679
2709
|
}
|
|
2680
|
-
|
|
2681
|
-
|
|
2710
|
+
function yr(a) {
|
|
2711
|
+
var r, i, s;
|
|
2712
|
+
const e = (s = (i = (r = a == null ? void 0 : a.calculative) == null ? void 0 : r.canvas) == null ? void 0 : i.store) == null ? void 0 : s.pens, t = [], n = (c) => {
|
|
2713
|
+
(c.children || []).forEach((f) => {
|
|
2714
|
+
const g = e == null ? void 0 : e[f];
|
|
2715
|
+
g && (t.push(g), n(g));
|
|
2716
|
+
});
|
|
2717
|
+
};
|
|
2718
|
+
return n(a), t;
|
|
2719
|
+
}
|
|
2720
|
+
function _r(a) {
|
|
2721
|
+
const e = yr(a);
|
|
2722
|
+
if (e.length)
|
|
2723
|
+
return e.map((t) => typeof t.fontSize == "number" ? t.fontSize : null);
|
|
2724
|
+
}
|
|
2725
|
+
function Er(a) {
|
|
2726
|
+
if (!a) return null;
|
|
2727
|
+
try {
|
|
2728
|
+
const e = localStorage.getItem(Ta + a);
|
|
2729
|
+
return e ? JSON.parse(e) : null;
|
|
2730
|
+
} catch (e) {
|
|
2731
|
+
return null;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
function Tr(a, e) {
|
|
2735
|
+
if (!(!a || !e))
|
|
2736
|
+
try {
|
|
2737
|
+
localStorage.setItem(Ta + a, JSON.stringify(e)), Ar.value += 1;
|
|
2738
|
+
} catch (t) {
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
function Ir(a, e) {
|
|
2742
|
+
if (!a || !(e != null && e.length)) return;
|
|
2743
|
+
const t = /* @__PURE__ */ new Map();
|
|
2744
|
+
e.forEach((n) => {
|
|
2745
|
+
if (!n || n.parentId || !n.libraryKey) return;
|
|
2746
|
+
const r = wr(a, n);
|
|
2747
|
+
if (!r || !(r.width > 0) || !(r.height > 0)) return;
|
|
2748
|
+
const i = t.get(n.libraryKey) || [];
|
|
2749
|
+
i.push({ pen: n, rect: r }), t.set(n.libraryKey, i);
|
|
2750
|
+
}), t.forEach((n, r) => {
|
|
2751
|
+
var U;
|
|
2752
|
+
let i, s;
|
|
2753
|
+
if (n.length === 1 || vr(r))
|
|
2754
|
+
({ width: i, height: s } = n[0].rect);
|
|
2755
|
+
else {
|
|
2756
|
+
const $ = n.map((W) => W.rect), Z = Math.min(...$.map((W) => W.x)), K = Math.min(...$.map((W) => W.y)), te = Math.max(...$.map((W) => W.x + W.width)), L = Math.max(...$.map((W) => W.y + W.height));
|
|
2757
|
+
i = te - Z, s = L - K;
|
|
2758
|
+
}
|
|
2759
|
+
if (!(i > 0) || !(s > 0)) return;
|
|
2760
|
+
const c = Er(r) || {}, f = D(d({}, c), { width: Lt(i), height: Lt(s) }), g = _r(n[0].pen);
|
|
2761
|
+
g && (f.childFontSizes = g);
|
|
2762
|
+
const O = n[0].pen;
|
|
2763
|
+
(U = O.children) != null && U.length && typeof O.fontSize == "number" && (f.rootFontSize = O.fontSize), Tr(r, f);
|
|
2764
|
+
});
|
|
2765
|
+
}
|
|
2766
|
+
const Sr = "original_meta2d";
|
|
2767
|
+
function br() {
|
|
2768
|
+
return localStorage.removeItem(Sr);
|
|
2769
|
+
}
|
|
2770
|
+
let Ye = {};
|
|
2771
|
+
const xr = (a) => {
|
|
2682
2772
|
const e = document.querySelectorAll("video");
|
|
2683
2773
|
let t = null;
|
|
2684
|
-
if (e.forEach((
|
|
2685
|
-
|
|
2774
|
+
if (e.forEach((r) => {
|
|
2775
|
+
r.getAttribute("src") === a.video && (t = r);
|
|
2686
2776
|
}), !t) return;
|
|
2687
2777
|
t.setAttribute("muted", "muted"), t.setAttribute("autoplay", "autoplay"), t.setAttribute("loop", "loop"), t.setAttribute("crossorigin", ""), t.setAttribute("controls", ""), t.style.display = "none", t.parentElement.style.border = "2px solid #ffc878";
|
|
2688
|
-
const
|
|
2778
|
+
const n = new JessibucaPro({
|
|
2689
2779
|
container: t.parentElement,
|
|
2690
2780
|
background: "",
|
|
2691
2781
|
// 背景图片
|
|
@@ -2746,15 +2836,15 @@ const ii = (n) => {
|
|
|
2746
2836
|
videoBufferDelay: 1
|
|
2747
2837
|
// 缓存延迟(延迟超过会触发丢帧)
|
|
2748
2838
|
});
|
|
2749
|
-
return
|
|
2750
|
-
},
|
|
2751
|
-
Object.keys(
|
|
2752
|
-
|
|
2753
|
-
}),
|
|
2754
|
-
},
|
|
2839
|
+
return a.autoPlay && a.streamUrl && n.play(a.streamUrl), Ye[a.id] = n, n;
|
|
2840
|
+
}, Cr = () => {
|
|
2841
|
+
Object.keys(Ye).forEach((a) => {
|
|
2842
|
+
Ye[a].destroy(), Ye[a] = null;
|
|
2843
|
+
}), Ye = {};
|
|
2844
|
+
}, Pr = { class: "sy-empty" }, Rr = {
|
|
2755
2845
|
key: 1,
|
|
2756
2846
|
class: "sy-empty-picture"
|
|
2757
|
-
},
|
|
2847
|
+
}, Nr = { class: "sy-empty-description" }, kr = /* @__PURE__ */ Object.assign({
|
|
2758
2848
|
name: "SyEmpty"
|
|
2759
2849
|
}, {
|
|
2760
2850
|
__name: "index",
|
|
@@ -2776,53 +2866,53 @@ const ii = (n) => {
|
|
|
2776
2866
|
default: !1
|
|
2777
2867
|
}
|
|
2778
2868
|
},
|
|
2779
|
-
setup(
|
|
2780
|
-
|
|
2781
|
-
v7ddea5d8:
|
|
2782
|
-
v4735fb99:
|
|
2869
|
+
setup(a) {
|
|
2870
|
+
Pa((r) => ({
|
|
2871
|
+
v7ddea5d8: n.value.width,
|
|
2872
|
+
v4735fb99: n.value.height
|
|
2783
2873
|
}));
|
|
2784
|
-
const e =
|
|
2874
|
+
const e = a, t = Ge(() => ({
|
|
2785
2875
|
"font-size": e.imageSize ? `${e.imageSize}px` : "80px"
|
|
2786
|
-
})),
|
|
2876
|
+
})), n = Ge(() => e.imageSize ? {
|
|
2787
2877
|
width: e.imageSize * 1.2 + "px",
|
|
2788
2878
|
height: e.imageSize + "px"
|
|
2789
2879
|
} : {
|
|
2790
2880
|
width: "187px",
|
|
2791
2881
|
height: "144px"
|
|
2792
2882
|
});
|
|
2793
|
-
return (
|
|
2794
|
-
const
|
|
2795
|
-
return ue(),
|
|
2796
|
-
|
|
2883
|
+
return (r, i) => {
|
|
2884
|
+
const s = gt("SyIcon"), c = gt("el-icon");
|
|
2885
|
+
return ue(), xe("div", Pr, [
|
|
2886
|
+
a.image !== "empty" ? (ue(), xe("span", {
|
|
2797
2887
|
key: 0,
|
|
2798
2888
|
class: "sy-empty-image",
|
|
2799
|
-
style:
|
|
2889
|
+
style: ia(t.value)
|
|
2800
2890
|
}, [
|
|
2801
|
-
|
|
2891
|
+
a.image !== "loading" ? (ue(), et(s, {
|
|
2802
2892
|
key: 0,
|
|
2803
|
-
name:
|
|
2893
|
+
name: a.image,
|
|
2804
2894
|
gradient: ""
|
|
2805
|
-
}, null, 8, ["name"])) : (ue(),
|
|
2895
|
+
}, null, 8, ["name"])) : (ue(), et(c, {
|
|
2806
2896
|
key: 1,
|
|
2807
2897
|
class: "is-loading",
|
|
2808
2898
|
style: { color: "#1671d4" }
|
|
2809
2899
|
}, {
|
|
2810
|
-
default:
|
|
2811
|
-
|
|
2900
|
+
default: _t(() => [
|
|
2901
|
+
$e(ze(on))
|
|
2812
2902
|
]),
|
|
2813
2903
|
_: 1
|
|
2814
2904
|
}))
|
|
2815
|
-
], 4)) :
|
|
2816
|
-
|
|
2817
|
-
|
|
2905
|
+
], 4)) : a.onlyText ? je("", !0) : (ue(), xe("span", Rr)),
|
|
2906
|
+
ge("div", Nr, [
|
|
2907
|
+
ge("p", null, At(a.description), 1)
|
|
2818
2908
|
])
|
|
2819
2909
|
]);
|
|
2820
2910
|
};
|
|
2821
2911
|
}
|
|
2822
|
-
}),
|
|
2912
|
+
}), Dr = /* @__PURE__ */ ot(kr, [["__scopeId", "data-v-97343c87"]]), Lr = {
|
|
2823
2913
|
key: 1,
|
|
2824
2914
|
class: "move-step-panel"
|
|
2825
|
-
},
|
|
2915
|
+
}, Ot = 30, Or = /* @__PURE__ */ Object.assign({
|
|
2826
2916
|
name: "Meta2dEditor"
|
|
2827
2917
|
}, {
|
|
2828
2918
|
__name: "index",
|
|
@@ -2854,285 +2944,316 @@ const ii = (n) => {
|
|
|
2854
2944
|
}
|
|
2855
2945
|
},
|
|
2856
2946
|
emits: ["loaded", "load-error"],
|
|
2857
|
-
setup(
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2860
|
-
|
|
2947
|
+
setup(a, { expose: e, emit: t }) {
|
|
2948
|
+
const n = t, r = a, i = Ra("isComponent"), s = Q(null), c = Na(), f = Q(1), g = Q(!1);
|
|
2949
|
+
let O = 0, U = null, $ = null;
|
|
2950
|
+
const Z = Ge(() => !!(r.data || r.url));
|
|
2951
|
+
vt(
|
|
2952
|
+
() => [r.data, r.url],
|
|
2861
2953
|
() => {
|
|
2862
|
-
|
|
2954
|
+
Z.value && te();
|
|
2863
2955
|
}
|
|
2864
2956
|
);
|
|
2865
|
-
let
|
|
2866
|
-
function
|
|
2867
|
-
return
|
|
2868
|
-
var
|
|
2957
|
+
let K = Q(!0);
|
|
2958
|
+
function te() {
|
|
2959
|
+
return ae(this, null, function* () {
|
|
2960
|
+
var h;
|
|
2961
|
+
const l = ++O;
|
|
2869
2962
|
try {
|
|
2870
|
-
if (
|
|
2963
|
+
if (K.value = !0, yield ka(), l !== O) return;
|
|
2964
|
+
if (!s.value) {
|
|
2871
2965
|
console.error("未找到meta2d元素!");
|
|
2872
2966
|
return;
|
|
2873
2967
|
}
|
|
2874
|
-
let
|
|
2875
|
-
if (
|
|
2876
|
-
|
|
2968
|
+
let v = null;
|
|
2969
|
+
if (r.data ? v = r.data : r.url && (v = yield ke()), l !== O) return;
|
|
2970
|
+
if (!v || !v.data) {
|
|
2971
|
+
K.value = !1, console.log("图纸数据为空"), n("load-error");
|
|
2877
2972
|
return;
|
|
2878
2973
|
}
|
|
2879
|
-
const
|
|
2974
|
+
const y = v.options || {
|
|
2880
2975
|
background: "#eee",
|
|
2881
|
-
disableAnchor: (
|
|
2976
|
+
disableAnchor: (i == null ? void 0 : i.value) || !1
|
|
2882
2977
|
};
|
|
2883
|
-
if (
|
|
2978
|
+
if (L(), !s.value) {
|
|
2884
2979
|
console.error("Meta2D 容器元素不可用");
|
|
2885
2980
|
return;
|
|
2886
2981
|
}
|
|
2887
|
-
|
|
2888
|
-
disableAnchor: (
|
|
2889
|
-
rotateCursor: "rotate.cur",
|
|
2982
|
+
if (c.value = new Va(s.value, D(d({}, y), {
|
|
2983
|
+
disableAnchor: (i == null ? void 0 : i.value) || !1,
|
|
2984
|
+
rotateCursor: "/rotate.cur",
|
|
2890
2985
|
// 性能优化:DXF/大图元素多时,用近似宽度计算替代每帧 measureText,降低文本换行开销
|
|
2891
2986
|
measureTextWidth: !1,
|
|
2892
2987
|
// 渲染节流调大 + 自动帧率,减少连续交互时的全量重绘频率
|
|
2893
|
-
interval: Math.max((
|
|
2988
|
+
interval: Math.max((h = y.interval) != null ? h : 30, 40),
|
|
2894
2989
|
autoFPS: !0
|
|
2895
|
-
})),
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2990
|
+
})), y.visibleLevel && c.value.scale(y.visibleLevel), W(), me(), yield _e(v.data), l !== O) return;
|
|
2991
|
+
c.value.render(), se(), clearTimeout(U), U = setTimeout(() => {
|
|
2992
|
+
U = null, window.meta2dTools && window.registerToolsNew && window.registerToolsNew();
|
|
2993
|
+
}, 1e3), n("loaded", c.value);
|
|
2994
|
+
} catch (v) {
|
|
2995
|
+
console.error("初始化编辑器失败:", v);
|
|
2900
2996
|
}
|
|
2901
2997
|
});
|
|
2902
2998
|
}
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2999
|
+
const L = () => {
|
|
3000
|
+
var v, y;
|
|
3001
|
+
if (!c.value) return;
|
|
3002
|
+
const l = c.value, h = l.canvas;
|
|
3003
|
+
Cr(), (v = J.cancel) == null || v.call(J), (y = we.cancel) == null || y.call(we), clearTimeout(U), U = null, clearTimeout($), $ = null, h && (ie && h.getHover !== ie && (h.getHover = ie), ce && h.drawline !== ce && (h.drawline = ce), re && h.pushHistory !== re && (h.pushHistory = re), h.__keydownGuarded && G && (document.removeEventListener("keydown", h.onkeydown), h.onkeydown = G, h.__keydownGuarded = !1, G = null), h.__hoverOverridden = !1, h.__historyLimited = !1, l.destroy(!0)), window.meta2d === l && (window.meta2d = null), c.value = null;
|
|
3004
|
+
};
|
|
3005
|
+
function W() {
|
|
3006
|
+
if (!c.value) return;
|
|
3007
|
+
new cr({}).initPlugin(c.value, "mindNode", {});
|
|
2906
3008
|
}
|
|
2907
|
-
function
|
|
2908
|
-
|
|
3009
|
+
function me() {
|
|
3010
|
+
pr(), Ke(ja()), Ke(qa()), It(Qa()), Ke(tn()), We(an()), Ke(nn()), We(rn()), We(za()), We(Xa()), Ke(Ja()), It(Za()), We(en());
|
|
2909
3011
|
}
|
|
2910
|
-
function
|
|
2911
|
-
var
|
|
2912
|
-
if (
|
|
2913
|
-
if (typeof
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
}),
|
|
2918
|
-
|
|
2919
|
-
|
|
3012
|
+
function _e(l) {
|
|
3013
|
+
var h, v, y;
|
|
3014
|
+
if (c.value) {
|
|
3015
|
+
if (typeof l.locked == "undefined" && (l.locked = 0), l.bkImage && c.value.setBackgroundImage(l.bkImage), l.pens && l.pens.length > 0) {
|
|
3016
|
+
const T = [], k = [];
|
|
3017
|
+
l.pens.forEach((N) => {
|
|
3018
|
+
N.name === "video" && N.streamUrl ? T.push(N) : N.name === "image" && N.image ? N.image = tr(N.image, r.devConfig) : N.lineType === "gisLine" ? N.visible = !r.preview : N.penType === P.TABLE && N.dataType ? k.push(Re(N)) : N.penType === P.GIS_SENSOR_WRAPPER && r.preview && (N.title = "");
|
|
3019
|
+
}), k.length > 0 && Promise.allSettled(k), T.length > 0 && (clearTimeout($), $ = setTimeout(() => {
|
|
3020
|
+
$ = null, T.forEach((N) => {
|
|
3021
|
+
xr(N);
|
|
2920
3022
|
});
|
|
2921
|
-
}, 500);
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2924
|
-
const
|
|
2925
|
-
|
|
3023
|
+
}, 500));
|
|
3024
|
+
const z = ((v = (h = window.meta) == null ? void 0 : h.graph) == null ? void 0 : v.penCountThreshold) || 2e3;
|
|
3025
|
+
l.pens.length > z && l.scale && l.pens.forEach((N) => {
|
|
3026
|
+
const M = N.visibleLevel;
|
|
3027
|
+
M !== void 0 ? (N.visible = l.scale >= M, N.visible || (N.disabled = !0, N.locked = Pe.Disable)) : (N.visible = !0, N.disabled = !1, N.locked = Pe.None);
|
|
2926
3028
|
});
|
|
2927
3029
|
}
|
|
2928
|
-
|
|
3030
|
+
c.value.open(D(d({}, l), { disableAnchor: (i == null ? void 0 : i.value) || !1 })), !r.preview && ((y = l.networks) != null && y.length) && c.value.closeNetwork();
|
|
2929
3031
|
}
|
|
2930
3032
|
}
|
|
2931
|
-
const
|
|
2932
|
-
var
|
|
2933
|
-
const
|
|
3033
|
+
const Re = (l) => ae(this, null, function* () {
|
|
3034
|
+
var v;
|
|
3035
|
+
const h = yield Ue.getCommonApi(dn[l.dataType], {
|
|
2934
3036
|
offset: 0,
|
|
2935
|
-
limit:
|
|
3037
|
+
limit: l.tableSize || 10
|
|
2936
3038
|
});
|
|
2937
|
-
if ((
|
|
2938
|
-
const
|
|
3039
|
+
if ((v = h.data) != null && v.length) {
|
|
3040
|
+
const y = l.tableHeader || [
|
|
2939
3041
|
{ prop: "id", label: "ID" },
|
|
2940
3042
|
{ prop: "guid", label: "标识" },
|
|
2941
3043
|
{ prop: "name", label: "名称" }
|
|
2942
|
-
],
|
|
2943
|
-
const
|
|
2944
|
-
return
|
|
3044
|
+
], T = h.data.map((k) => y.filter((z) => z.isShow).map((z) => {
|
|
3045
|
+
const H = k[z.prop];
|
|
3046
|
+
return z.choices ? z.choices[H] || H : Fa(H) ? H.name : H;
|
|
2945
3047
|
}));
|
|
2946
|
-
|
|
2947
|
-
id:
|
|
2948
|
-
dataY:
|
|
3048
|
+
c.value.setValue({
|
|
3049
|
+
id: l.id,
|
|
3050
|
+
dataY: T
|
|
2949
3051
|
});
|
|
2950
3052
|
} else
|
|
2951
|
-
|
|
2952
|
-
id:
|
|
3053
|
+
c.value.setValue({
|
|
3054
|
+
id: l.id,
|
|
2953
3055
|
dataY: []
|
|
2954
3056
|
});
|
|
2955
|
-
})
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
3057
|
+
});
|
|
3058
|
+
let re = null;
|
|
3059
|
+
const Ne = () => {
|
|
3060
|
+
var v;
|
|
3061
|
+
const l = (v = c.value) == null ? void 0 : v.canvas;
|
|
3062
|
+
if (!l || l.__historyLimited) return;
|
|
3063
|
+
l.__historyLimited = !0;
|
|
3064
|
+
const h = l.pushHistory.bind(l);
|
|
3065
|
+
re = h, l.pushHistory = (y) => {
|
|
3066
|
+
h(y);
|
|
3067
|
+
const T = l.store;
|
|
3068
|
+
if (T != null && T.histories && T.histories.length > Ot) {
|
|
3069
|
+
const k = T.histories.length - Ot;
|
|
3070
|
+
T.histories.splice(0, k), typeof T.historyIndex == "number" && (T.historyIndex = Math.max(0, T.historyIndex - k));
|
|
3071
|
+
}
|
|
3072
|
+
};
|
|
3073
|
+
}, J = Tt((l) => {
|
|
3074
|
+
Ir(c.value, l);
|
|
3075
|
+
}, 300), fe = (l) => {
|
|
3076
|
+
if (!l || typeof l.closest != "function") return !1;
|
|
3077
|
+
const { tagName: h } = l;
|
|
3078
|
+
return h === "INPUT" || h === "TEXTAREA" || h === "SELECT" || l.isContentEditable ? !0 : !!l.closest(
|
|
3079
|
+
'.el-input, .el-input-number, .el-textarea, .el-select, .el-slider, .el-color-picker, .el-date-editor, [contenteditable="true"]'
|
|
3080
|
+
);
|
|
3081
|
+
};
|
|
3082
|
+
let G = null;
|
|
3083
|
+
const ee = () => {
|
|
3084
|
+
var v;
|
|
3085
|
+
const l = (v = c.value) == null ? void 0 : v.canvas;
|
|
3086
|
+
if (!l || l.__keydownGuarded || typeof l.onkeydown != "function") return;
|
|
3087
|
+
l.__keydownGuarded = !0, G = l.onkeydown;
|
|
3088
|
+
const h = G;
|
|
3089
|
+
l.onkeydown = (y) => {
|
|
3090
|
+
fe(y.target) || h(y);
|
|
3091
|
+
}, document.removeEventListener("keydown", h), document.addEventListener("keydown", l.onkeydown);
|
|
3092
|
+
}, se = () => {
|
|
3093
|
+
var l, h;
|
|
3094
|
+
c.value && ((h = (l = c.value.canvas) == null ? void 0 : l.tooltip) != null && h.box && (c.value.canvas.tooltip.box.style.pointerEvents = "none"), c.value.on("scale", we), r.preview || (c.value.on("connectLine", Te), c.value.on("active", pe), c.value.on("inactive", Ee), c.value.on("resizePens", J), document.addEventListener("keydown", le, !0)), ee(), Ce(), Ne());
|
|
3095
|
+
}, pe = (l) => {
|
|
3096
|
+
g.value = (l == null ? void 0 : l.length) > 0;
|
|
3097
|
+
}, Ee = () => {
|
|
3098
|
+
g.value = !1;
|
|
3099
|
+
}, le = (l) => {
|
|
3100
|
+
var k, z, H, N, M;
|
|
3101
|
+
if (f.value <= 0 || !c.value || ((z = (k = c.value.canvas) == null ? void 0 : k.inputDiv) == null ? void 0 : z.contentEditable) === "true" || fe(l.target) || ((N = (H = c.value.store) == null ? void 0 : H.data) == null ? void 0 : N.locked) >= Pe.DisableEdit) return;
|
|
3102
|
+
const h = (M = c.value.store) == null ? void 0 : M.active;
|
|
3103
|
+
if (!(h != null && h.length)) return;
|
|
3104
|
+
const v = f.value * (c.value.store.data.scale || 1);
|
|
3105
|
+
let y = 0, T = 0;
|
|
3106
|
+
switch (l.key) {
|
|
2970
3107
|
case "ArrowLeft":
|
|
2971
|
-
|
|
3108
|
+
y = -v;
|
|
2972
3109
|
break;
|
|
2973
3110
|
case "ArrowRight":
|
|
2974
|
-
|
|
3111
|
+
y = v;
|
|
2975
3112
|
break;
|
|
2976
3113
|
case "ArrowUp":
|
|
2977
|
-
|
|
3114
|
+
T = -v;
|
|
2978
3115
|
break;
|
|
2979
3116
|
case "ArrowDown":
|
|
2980
|
-
|
|
3117
|
+
T = v;
|
|
2981
3118
|
break;
|
|
2982
3119
|
default:
|
|
2983
3120
|
return;
|
|
2984
3121
|
}
|
|
2985
|
-
|
|
3122
|
+
l.preventDefault(), l.stopPropagation(), c.value.translatePens(h, y, T);
|
|
2986
3123
|
};
|
|
2987
|
-
let
|
|
2988
|
-
const
|
|
2989
|
-
const
|
|
2990
|
-
|
|
2991
|
-
var
|
|
2992
|
-
if (
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
3124
|
+
let ie = null, ce = null;
|
|
3125
|
+
const Ce = () => {
|
|
3126
|
+
const l = c.value.canvas;
|
|
3127
|
+
!l || l.__hoverOverridden || (l.__hoverOverridden = !0, ie = l.getHover.bind(l), l.getHover = (h) => {
|
|
3128
|
+
var T;
|
|
3129
|
+
if (ie(h), (l.drawingLineName || l.pencil) && !l.drawingLine && (l.hoverType === Le.Node || l.hoverType === Le.Line || l.hoverType === Le.NodeAnchor)) {
|
|
3130
|
+
l.store.hover && (l.store.hover.calculative.hover = !1, lt(ct(l.store.hover, !0) || l.store.hover, !1), l.store.hover = void 0), l.store.hoverAnchor = void 0, l.hoverType = Le.None, l.externalElements.style.cursor = "crosshair";
|
|
3131
|
+
return;
|
|
3132
|
+
}
|
|
3133
|
+
if (l.hoverType !== Le.Node && l.hoverType !== Le.Line || !l.store.hover) return;
|
|
3134
|
+
const v = ve(h, l.store.data.pens, l.store.data.scale || 1);
|
|
3135
|
+
if (!v || v.id === l.store.hover.id) return;
|
|
3136
|
+
const y = l.store.hover;
|
|
3137
|
+
y.calculative.hover = !1, lt(ct(y, !0) || y, !1), l.store.hover = v, v.calculative.hover = !0, lt(ct(v, !0) || v), l.store.lastHover = v, l.patchFlags = !0, (T = l.initTemplateCanvas) == null || T.call(l, [v]);
|
|
3138
|
+
}, ce = l.drawline.bind(l), l.drawline = (h) => {
|
|
3139
|
+
if (l.drawingLine && !l.dock && (l.drawingLineName === "polyline" || l.drawingLineName === "line")) {
|
|
3140
|
+
const v = l.drawingLine.calculative.worldAnchors;
|
|
3141
|
+
if (v.length >= 2) {
|
|
3142
|
+
const y = v[v.length - 1], T = v[v.length - 2];
|
|
3143
|
+
if (y && T && !y.connectTo) {
|
|
3144
|
+
const k = 8 / (l.store.data.scale || 1), z = Math.abs(y.x - T.x), H = Math.abs(y.y - T.y);
|
|
3145
|
+
z < k && H >= k ? y.x = T.x : H < k && z >= k && (y.y = T.y);
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
ce(h);
|
|
2997
3150
|
});
|
|
2998
|
-
},
|
|
2999
|
-
const
|
|
3000
|
-
if (
|
|
3001
|
-
const
|
|
3002
|
-
return Math.hypot(
|
|
3003
|
-
},
|
|
3004
|
-
var
|
|
3005
|
-
let
|
|
3006
|
-
const
|
|
3007
|
-
for (let
|
|
3008
|
-
const
|
|
3009
|
-
if (!(
|
|
3010
|
-
if (
|
|
3011
|
-
const
|
|
3012
|
-
if (!
|
|
3013
|
-
let
|
|
3014
|
-
for (let
|
|
3015
|
-
const
|
|
3016
|
-
|
|
3151
|
+
}, oe = (l, h, v) => {
|
|
3152
|
+
const y = v.x - h.x, T = v.y - h.y;
|
|
3153
|
+
if (y === 0 && T === 0) return Math.hypot(l.x - h.x, l.y - h.y);
|
|
3154
|
+
const k = Math.max(0, Math.min(1, ((l.x - h.x) * y + (l.y - h.y) * T) / (y * y + T * T)));
|
|
3155
|
+
return Math.hypot(l.x - (h.x + k * y), l.y - (h.y + k * T));
|
|
3156
|
+
}, ve = (l, h, v) => {
|
|
3157
|
+
var H, N, M, Ie;
|
|
3158
|
+
let y = null, T = 1 / 0, k = 1 / 0;
|
|
3159
|
+
const z = 5 / v;
|
|
3160
|
+
for (let X = 0; X < h.length; X++) {
|
|
3161
|
+
const q = h[X];
|
|
3162
|
+
if (!(q.visible === !1 || q.calculative.inView === !1) && q.locked !== Pe.Disable && !q.parentId)
|
|
3163
|
+
if (q.type === Ba.Line) {
|
|
3164
|
+
const F = q.calculative.worldAnchors;
|
|
3165
|
+
if (!F || F.length < 2) continue;
|
|
3166
|
+
let Ae = 1 / 0;
|
|
3167
|
+
for (let ye = 0; ye < F.length - 1; ye++) {
|
|
3168
|
+
const o = oe(l, F[ye], F[ye + 1]);
|
|
3169
|
+
o < Ae && (Ae = o);
|
|
3017
3170
|
}
|
|
3018
|
-
if (
|
|
3019
|
-
(0 <
|
|
3171
|
+
if (Ae > z) continue;
|
|
3172
|
+
(0 < T || T === 0 && Ae < k) && (y = q, T = 0, k = Ae);
|
|
3020
3173
|
} else {
|
|
3021
|
-
if (
|
|
3022
|
-
const
|
|
3023
|
-
if (!
|
|
3024
|
-
const
|
|
3025
|
-
(
|
|
3174
|
+
if (q.type) continue;
|
|
3175
|
+
const F = q.calculative.worldRect;
|
|
3176
|
+
if (!F || !Ka(l, F)) continue;
|
|
3177
|
+
const Ae = F.width * F.height, ye = l.x - ((N = (H = F.center) == null ? void 0 : H.x) != null ? N : F.x + F.width / 2), o = l.y - ((Ie = (M = F.center) == null ? void 0 : M.y) != null ? Ie : F.y + F.height / 2), u = ye * ye + o * o;
|
|
3178
|
+
(Ae < T || Ae === T && u < k) && (y = q, T = Ae, k = u);
|
|
3026
3179
|
}
|
|
3027
3180
|
}
|
|
3028
|
-
return
|
|
3029
|
-
},
|
|
3030
|
-
var
|
|
3181
|
+
return y;
|
|
3182
|
+
}, we = Tt((l) => {
|
|
3183
|
+
var h, v, y, T, k, z;
|
|
3031
3184
|
try {
|
|
3032
|
-
if (!
|
|
3033
|
-
|
|
3034
|
-
let
|
|
3035
|
-
const
|
|
3036
|
-
for (let
|
|
3037
|
-
const
|
|
3038
|
-
if ([
|
|
3039
|
-
if (((
|
|
3040
|
-
let
|
|
3041
|
-
|
|
3042
|
-
} else if (((
|
|
3043
|
-
let
|
|
3044
|
-
|
|
3185
|
+
if (!c.value) return;
|
|
3186
|
+
wt.emit("graph-scale", l);
|
|
3187
|
+
let H = c.value.store.data.pens;
|
|
3188
|
+
const N = ((v = (h = window.meta) == null ? void 0 : h.graph) == null ? void 0 : v.penCountThreshold) || 2e3, M = H.length > N;
|
|
3189
|
+
for (let Ie = 0; Ie < H.length; Ie++) {
|
|
3190
|
+
const X = H[Ie];
|
|
3191
|
+
if ([P.VIDEO_STREAM, P.MP4].includes(X.penType)) {
|
|
3192
|
+
if (((T = (y = Oe[X.id]) == null ? void 0 : y.children) == null ? void 0 : T.length) === 3) {
|
|
3193
|
+
let q = Oe[X.id].children[0], F = Oe[X.id].children[2];
|
|
3194
|
+
q.style.width = (F.duration > 0 ? F.currentTime / F.duration : 0) * X.calculative.worldRect.width + "px";
|
|
3195
|
+
} else if (((z = (k = Oe[X.id]) == null ? void 0 : k.children) == null ? void 0 : z.length) === 2) {
|
|
3196
|
+
let q = Oe[X.id].children[0], F = Oe[X.id].children[1];
|
|
3197
|
+
q.style.width = (F.duration > 0 ? F.currentTime / F.duration : 0) * X.calculative.worldRect.width + "px";
|
|
3045
3198
|
}
|
|
3046
3199
|
}
|
|
3047
|
-
if (
|
|
3048
|
-
const
|
|
3049
|
-
|
|
3050
|
-
id:
|
|
3051
|
-
visible:
|
|
3052
|
-
disabled: !
|
|
3053
|
-
locked:
|
|
3200
|
+
if (M) {
|
|
3201
|
+
const q = X.visibleLevel !== void 0 ? l >= X.visibleLevel : !0;
|
|
3202
|
+
c.value._setValue({
|
|
3203
|
+
id: X.id,
|
|
3204
|
+
visible: q,
|
|
3205
|
+
disabled: !q,
|
|
3206
|
+
locked: q ? Pe.None : Pe.Disable
|
|
3054
3207
|
});
|
|
3055
3208
|
}
|
|
3056
3209
|
}
|
|
3057
|
-
|
|
3058
|
-
} catch (
|
|
3059
|
-
console.error("处理缩放失败:",
|
|
3210
|
+
c.value.render();
|
|
3211
|
+
} catch (H) {
|
|
3212
|
+
console.error("处理缩放失败:", H);
|
|
3060
3213
|
}
|
|
3061
|
-
}, 500),
|
|
3062
|
-
|
|
3063
|
-
if (f != null && f.start || (E == null ? void 0 : E.penType) !== b.GIS_SENSOR)
|
|
3064
|
-
return;
|
|
3065
|
-
const x = (G = d == null ? void 0 : d.calculative) == null ? void 0 : G.worldAnchors;
|
|
3066
|
-
if (x.length !== 2 || x != null && x.some((N) => !N.connectTo))
|
|
3067
|
-
return;
|
|
3068
|
-
const [g, V] = x;
|
|
3069
|
-
if (g.connectTo === V.connectTo)
|
|
3070
|
-
return;
|
|
3071
|
-
const X = window.meta2d.findOne(g.connectTo), se = window.meta2d.findOne(V.connectTo);
|
|
3072
|
-
let B = X == null ? void 0 : X.bindData, K = se == null ? void 0 : se.bindData;
|
|
3073
|
-
if (!B || !K)
|
|
3074
|
-
return;
|
|
3075
|
-
const J = yield ye.postPDApi("setchannelpaired/", {
|
|
3076
|
-
data: [
|
|
3077
|
-
{
|
|
3078
|
-
channel1: B.guid,
|
|
3079
|
-
channel2: K.guid
|
|
3080
|
-
}
|
|
3081
|
-
]
|
|
3082
|
-
}), Z = yield ye.postCommonApi("sgpoint", {
|
|
3083
|
-
ln__in: `${B.guid},${K.guid}`,
|
|
3084
|
-
group_number__in: 6
|
|
3085
|
-
// 一次接线图配对时确认组号
|
|
3086
|
-
});
|
|
3087
|
-
J.success && Z.success ? (l.value.setValue({
|
|
3088
|
-
id: d.id,
|
|
3089
|
-
color: "#00d200",
|
|
3090
|
-
lineDash: [3, 3],
|
|
3091
|
-
lineWidth: 2,
|
|
3092
|
-
lineType: "gisLine"
|
|
3093
|
-
}), ie.success("配对成功")) : ie.error("配对失败", J.detail || Z.detail);
|
|
3214
|
+
}, 500), Te = (y) => ae(this, [y], function* ({ line: l, lineAnchor: h, pen: v }) {
|
|
3215
|
+
console.log("🚀 ~ handleConnectLine ~ line:", l), h != null && h.start || (v == null || v.penType, P.GIS_SENSOR);
|
|
3094
3216
|
});
|
|
3095
|
-
function
|
|
3096
|
-
return
|
|
3097
|
-
if (!
|
|
3098
|
-
return
|
|
3217
|
+
function ke() {
|
|
3218
|
+
return ae(this, null, function* () {
|
|
3219
|
+
if (!r.url)
|
|
3220
|
+
return he.error("图纸路径为空!"), null;
|
|
3099
3221
|
try {
|
|
3100
|
-
return (yield
|
|
3101
|
-
local:
|
|
3222
|
+
return (yield Ue.getGraphApi(r.url, {
|
|
3223
|
+
local: r.local
|
|
3102
3224
|
})) || null;
|
|
3103
|
-
} catch (
|
|
3225
|
+
} catch (l) {
|
|
3104
3226
|
return null;
|
|
3105
3227
|
}
|
|
3106
3228
|
});
|
|
3107
3229
|
}
|
|
3108
|
-
const
|
|
3109
|
-
|
|
3230
|
+
const De = () => {
|
|
3231
|
+
c.value && (c.value.resize(), c.value.fitView(!0, 10));
|
|
3110
3232
|
};
|
|
3111
|
-
return
|
|
3112
|
-
var
|
|
3113
|
-
|
|
3114
|
-
}),
|
|
3115
|
-
|
|
3116
|
-
ri(), ni(), ne && ((d = l.value) != null && d.canvas) && (l.value.canvas.getHover = ne, ne = null), document.removeEventListener("keydown", Ie, !0), l.value && (i.preview ? (Ta(), l.value.destroy(!0)) : (l.value.off("scale", U), l.value.off("active", ce), l.value.off("inactive", Ae))), window.removeEventListener("resize", he);
|
|
3233
|
+
return oa(() => {
|
|
3234
|
+
var l, h;
|
|
3235
|
+
Z.value && (l = s.value) != null && l.clientHeight && (h = s.value) != null && h.clientWidth && te(), window.addEventListener("resize", De);
|
|
3236
|
+
}), sa(() => {
|
|
3237
|
+
r.preview && Ga(), c.value && (c.value.off("scale", we), c.value.off("connectLine", Te), c.value.off("active", pe), c.value.off("inactive", Ee), c.value.off("resizePens", J)), L(), br(), document.removeEventListener("keydown", le, !0), window.removeEventListener("resize", De), ie = null, ce = null, re = null;
|
|
3117
3238
|
}), e({
|
|
3118
|
-
stage:
|
|
3119
|
-
}), (
|
|
3120
|
-
const
|
|
3121
|
-
return ue(),
|
|
3239
|
+
stage: c
|
|
3240
|
+
}), (l, h) => {
|
|
3241
|
+
const v = gt("el-input-number");
|
|
3242
|
+
return ue(), xe("div", {
|
|
3122
3243
|
ref_key: "meta2dRef",
|
|
3123
|
-
ref:
|
|
3244
|
+
ref: s,
|
|
3124
3245
|
class: "meta2d-editor"
|
|
3125
3246
|
}, [
|
|
3126
|
-
|
|
3247
|
+
ze(K) ? je("", !0) : (ue(), et(Dr, {
|
|
3127
3248
|
key: 0,
|
|
3128
3249
|
class: "meta2d-empty",
|
|
3129
3250
|
description: "图纸不存在"
|
|
3130
3251
|
})),
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
modelValue:
|
|
3135
|
-
"onUpdate:modelValue":
|
|
3252
|
+
g.value && !r.preview ? (ue(), xe("div", Lr, [
|
|
3253
|
+
h[1] || (h[1] = ge("span", { class: "move-step-label" }, "移动步长", -1)),
|
|
3254
|
+
$e(v, {
|
|
3255
|
+
modelValue: f.value,
|
|
3256
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => f.value = y),
|
|
3136
3257
|
min: 0.1,
|
|
3137
3258
|
max: 200,
|
|
3138
3259
|
step: 0.5,
|
|
@@ -3141,17 +3262,17 @@ const ii = (n) => {
|
|
|
3141
3262
|
"controls-position": "right",
|
|
3142
3263
|
class: "move-step-input"
|
|
3143
3264
|
}, null, 8, ["modelValue"]),
|
|
3144
|
-
|
|
3145
|
-
])) :
|
|
3265
|
+
h[2] || (h[2] = ge("span", { class: "move-step-tip" }, "方向键按步长移动", -1))
|
|
3266
|
+
])) : je("", !0)
|
|
3146
3267
|
], 512);
|
|
3147
3268
|
};
|
|
3148
3269
|
}
|
|
3149
|
-
}),
|
|
3270
|
+
}), Mr = /* @__PURE__ */ ot(Or, [["__scopeId", "data-v-7453d72e"]]), Fr = {
|
|
3150
3271
|
key: 0,
|
|
3151
3272
|
class: "back-btn"
|
|
3152
3273
|
};
|
|
3153
|
-
var
|
|
3154
|
-
const
|
|
3274
|
+
var aa, na;
|
|
3275
|
+
const Ur = /* @__PURE__ */ Object.assign({
|
|
3155
3276
|
name: "Meta2dPreview"
|
|
3156
3277
|
}, {
|
|
3157
3278
|
__name: "index",
|
|
@@ -3175,22 +3296,22 @@ const pi = /* @__PURE__ */ Object.assign({
|
|
|
3175
3296
|
// 图纸语言
|
|
3176
3297
|
lang: {
|
|
3177
3298
|
type: String,
|
|
3178
|
-
default: ((
|
|
3299
|
+
default: ((na = (aa = window.meta) == null ? void 0 : aa.app) == null ? void 0 : na.lang) || "zh-cn"
|
|
3179
3300
|
},
|
|
3180
3301
|
// 配置选项
|
|
3181
3302
|
config: {
|
|
3182
3303
|
type: Object,
|
|
3183
3304
|
default: () => ({
|
|
3184
|
-
socketUrl:
|
|
3185
|
-
stationIdKey:
|
|
3305
|
+
socketUrl: Ct,
|
|
3306
|
+
stationIdKey: Dt,
|
|
3186
3307
|
enableToken: !0,
|
|
3187
|
-
userTokenKey:
|
|
3308
|
+
userTokenKey: kt,
|
|
3188
3309
|
userToken: void 0,
|
|
3189
3310
|
messageDelay: 200,
|
|
3190
3311
|
debounceDelay: 100,
|
|
3191
3312
|
enableAutoFit: !0,
|
|
3192
3313
|
enableWebSocket: !0,
|
|
3193
|
-
graphSocket:
|
|
3314
|
+
graphSocket: St.GRAPH.SOCKET
|
|
3194
3315
|
})
|
|
3195
3316
|
},
|
|
3196
3317
|
showMap: {
|
|
@@ -3208,11 +3329,11 @@ const pi = /* @__PURE__ */ Object.assign({
|
|
|
3208
3329
|
// 外部依赖注入
|
|
3209
3330
|
apiInstance: {
|
|
3210
3331
|
type: Object,
|
|
3211
|
-
default: () =>
|
|
3332
|
+
default: () => Ue
|
|
3212
3333
|
},
|
|
3213
3334
|
mittInstance: {
|
|
3214
3335
|
type: Object,
|
|
3215
|
-
default: () =>
|
|
3336
|
+
default: () => wt
|
|
3216
3337
|
},
|
|
3217
3338
|
// 自定义回调
|
|
3218
3339
|
customCallbacks: {
|
|
@@ -3238,577 +3359,589 @@ const pi = /* @__PURE__ */ Object.assign({
|
|
|
3238
3359
|
}
|
|
3239
3360
|
},
|
|
3240
3361
|
emits: ["error", "loaded", "custom-msg", "socket-msg", "view-history"],
|
|
3241
|
-
setup(
|
|
3242
|
-
const
|
|
3243
|
-
let
|
|
3244
|
-
const
|
|
3245
|
-
|
|
3246
|
-
const
|
|
3247
|
-
var
|
|
3248
|
-
return (
|
|
3249
|
-
}),
|
|
3250
|
-
var
|
|
3251
|
-
return (
|
|
3252
|
-
}),
|
|
3253
|
-
socketUrl:
|
|
3254
|
-
stationIdKey:
|
|
3362
|
+
setup(a, { expose: e, emit: t }) {
|
|
3363
|
+
const n = t, r = a;
|
|
3364
|
+
let i = Q(!1), s = Q(""), c = Q(""), f = Q(!1);
|
|
3365
|
+
const g = Q(!1);
|
|
3366
|
+
Da("isComponent", g);
|
|
3367
|
+
const O = Q(null), U = Q(null), $ = Q(null), Z = Q(""), K = Q(""), te = Q(!1), L = Ge(() => {
|
|
3368
|
+
var o;
|
|
3369
|
+
return (o = $.value) == null ? void 0 : o.stage;
|
|
3370
|
+
}), W = Ge(() => {
|
|
3371
|
+
var o;
|
|
3372
|
+
return (o = L.value) == null ? void 0 : o.store;
|
|
3373
|
+
}), me = Ge(() => d({
|
|
3374
|
+
socketUrl: Ct,
|
|
3375
|
+
stationIdKey: Dt,
|
|
3255
3376
|
enableToken: !0,
|
|
3256
|
-
userTokenKey:
|
|
3377
|
+
userTokenKey: kt,
|
|
3257
3378
|
userToken: void 0,
|
|
3258
3379
|
messageDelay: 200,
|
|
3259
3380
|
debounceDelay: 100,
|
|
3260
3381
|
enableAutoFit: !0,
|
|
3261
3382
|
fitPadding: 10,
|
|
3262
3383
|
enableWebSocket: !0,
|
|
3263
|
-
graphSocket:
|
|
3264
|
-
},
|
|
3265
|
-
const
|
|
3266
|
-
error:
|
|
3384
|
+
graphSocket: St.GRAPH.SOCKET
|
|
3385
|
+
}, r.config)), _e = () => r.apiInstance || Ue, Re = () => r.mittInstance || wt, re = (o, u = "") => {
|
|
3386
|
+
const w = {
|
|
3387
|
+
error: o,
|
|
3267
3388
|
message: u,
|
|
3268
3389
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3269
3390
|
};
|
|
3270
|
-
|
|
3271
|
-
},
|
|
3272
|
-
|
|
3273
|
-
},
|
|
3274
|
-
|
|
3275
|
-
},
|
|
3276
|
-
|
|
3277
|
-
},
|
|
3278
|
-
|
|
3279
|
-
},
|
|
3280
|
-
if (!
|
|
3391
|
+
n("error", w), r.errorHandler.callback ? r.errorHandler.callback(w) : r.errorHandler.showMessage && he && he.error(`${u}: ${o.message || o}`);
|
|
3392
|
+
}, Ne = () => {
|
|
3393
|
+
s.value ? (K.value = s.value, te.value = f.value) : c.value && (Z.value = c.value, k(Z.value)), i.value = !1;
|
|
3394
|
+
}, J = {}, fe = Q(!1), G = Q({ left: 0, top: 0 }), ee = Q(!1), se = () => {
|
|
3395
|
+
ee.value = !1, fe.value = !1, G.value = { left: 0, top: 0 }, Ce.value = {};
|
|
3396
|
+
}, pe = () => {
|
|
3397
|
+
ee.value = !0;
|
|
3398
|
+
}, Ee = (o) => {
|
|
3399
|
+
n("view-history", o);
|
|
3400
|
+
}, le = (o, u) => {
|
|
3401
|
+
if (!O.value)
|
|
3281
3402
|
return {
|
|
3282
|
-
left:
|
|
3403
|
+
left: o + 20,
|
|
3283
3404
|
top: u + 20
|
|
3284
3405
|
};
|
|
3285
|
-
const
|
|
3286
|
-
let
|
|
3287
|
-
if (
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3406
|
+
const w = O.value.getBoundingClientRect(), R = o - w.left, x = u - w.top;
|
|
3407
|
+
let b = 300, E = 150;
|
|
3408
|
+
if (U.value) {
|
|
3409
|
+
const C = U.value.$el || U.value;
|
|
3410
|
+
C && C.offsetWidth && (b = C.offsetWidth, E = C.offsetHeight);
|
|
3290
3411
|
}
|
|
3291
|
-
let
|
|
3292
|
-
return
|
|
3293
|
-
left: Math.max(0, Math.min(
|
|
3294
|
-
top: Math.max(0, Math.min(
|
|
3412
|
+
let m = R + 20, I = x + 20;
|
|
3413
|
+
return m + b > w.width && (m = R - b - 20), I + E > w.height && (I = x - E - 20), {
|
|
3414
|
+
left: Math.max(0, Math.min(m, w.width - b)),
|
|
3415
|
+
top: Math.max(0, Math.min(I, w.height - E))
|
|
3295
3416
|
};
|
|
3296
|
-
},
|
|
3297
|
-
|
|
3298
|
-
},
|
|
3299
|
-
var u,
|
|
3417
|
+
}, ie = (o) => {
|
|
3418
|
+
fe.value && (G.value.left || (G.value = le(o.clientX, o.clientY)));
|
|
3419
|
+
}, ce = (o) => {
|
|
3420
|
+
var u, w, R, x, b, E;
|
|
3300
3421
|
try {
|
|
3301
|
-
if (!
|
|
3302
|
-
if ((u =
|
|
3303
|
-
return
|
|
3304
|
-
const
|
|
3305
|
-
if ((
|
|
3306
|
-
return
|
|
3307
|
-
switch (
|
|
3308
|
-
case
|
|
3309
|
-
case
|
|
3310
|
-
if ((
|
|
3311
|
-
const
|
|
3312
|
-
|
|
3422
|
+
if (!o) return;
|
|
3423
|
+
if ((u = o == null ? void 0 : o.includes) != null && u.call(o, "token 必传"))
|
|
3424
|
+
return he.warning(o);
|
|
3425
|
+
const m = typeof o == "string" ? JSON.parse(o) : o;
|
|
3426
|
+
if ((m == null ? void 0 : m.data) === "服务错误" || (R = (w = m == null ? void 0 : m.data) == null ? void 0 : w.includes) != null && R.call(w, "token is expired"))
|
|
3427
|
+
return he.warning(m.data);
|
|
3428
|
+
switch (n("socket-msg", m), m.action) {
|
|
3429
|
+
case dt.ACPOINT.YCVALUE:
|
|
3430
|
+
case dt.ACPOINT.YXVALUE:
|
|
3431
|
+
if ((x = m == null ? void 0 : m.data) != null && x.point_id) {
|
|
3432
|
+
const I = L.value.find(m.data.point_id);
|
|
3433
|
+
I && (J[m.data.point_id] = m.action === dt.ACPOINT.YXVALUE ? Qe(m.data.value) ? m.data.value : 0 : Qe(m.data.value_disp || m.data.value) ? m.data.value_disp || m.data.value : 0, F(I, m.data));
|
|
3313
3434
|
}
|
|
3314
3435
|
break;
|
|
3315
3436
|
default:
|
|
3316
|
-
if (((
|
|
3317
|
-
const
|
|
3318
|
-
clearTimeout(
|
|
3319
|
-
|
|
3320
|
-
}),
|
|
3321
|
-
const
|
|
3322
|
-
|
|
3437
|
+
if (((b = m.data) == null ? void 0 : b.length) > 0) {
|
|
3438
|
+
const I = setTimeout(() => {
|
|
3439
|
+
clearTimeout(I), L.value && (m.data.forEach((C) => {
|
|
3440
|
+
J[C.dataId || C.point_id] = C.value_disp || C.value;
|
|
3441
|
+
}), m.data.forEach((C) => {
|
|
3442
|
+
const S = L.value.find(C.dataId || C.point_id);
|
|
3443
|
+
F(S, C);
|
|
3323
3444
|
}));
|
|
3324
|
-
},
|
|
3325
|
-
|
|
3445
|
+
}, me.value.messageDelay);
|
|
3446
|
+
r.customCallbacks.onWebSocketMessage && r.customCallbacks.onWebSocketMessage(m), (E = window.customSocketFn) == null || E.call(window, o);
|
|
3326
3447
|
}
|
|
3327
3448
|
break;
|
|
3328
3449
|
}
|
|
3329
3450
|
return !0;
|
|
3330
|
-
} catch (
|
|
3331
|
-
return
|
|
3451
|
+
} catch (m) {
|
|
3452
|
+
return re(m, "WebSocket消息处理"), !0;
|
|
3332
3453
|
}
|
|
3333
|
-
},
|
|
3334
|
-
let
|
|
3335
|
-
const
|
|
3454
|
+
}, Ce = Q({});
|
|
3455
|
+
let oe = {}, ve = null, we = null, Te = null;
|
|
3456
|
+
const ke = /* @__PURE__ */ new Set(), De = /* @__PURE__ */ new Map(), l = (o) => ae(this, null, function* () {
|
|
3336
3457
|
try {
|
|
3337
|
-
if (
|
|
3338
|
-
switch (
|
|
3339
|
-
case
|
|
3340
|
-
case
|
|
3341
|
-
case
|
|
3342
|
-
|
|
3458
|
+
if (o.msgName)
|
|
3459
|
+
switch (o.msgName) {
|
|
3460
|
+
case ne.CHANGE_GRAPH:
|
|
3461
|
+
case ne.NOTIFY_DIALOG:
|
|
3462
|
+
case ne.GIS_PROPS_PANEL:
|
|
3463
|
+
h(o);
|
|
3343
3464
|
break;
|
|
3344
3465
|
}
|
|
3345
3466
|
else
|
|
3346
|
-
|
|
3347
|
-
|
|
3467
|
+
h(o);
|
|
3468
|
+
n("custom-msg", o), r.customCallbacks.onCustomMessage && r.customCallbacks.onCustomMessage(o);
|
|
3348
3469
|
} catch (u) {
|
|
3349
|
-
|
|
3470
|
+
re(u, "自定义消息处理");
|
|
3350
3471
|
}
|
|
3351
|
-
}),
|
|
3352
|
-
var
|
|
3472
|
+
}), h = (o) => {
|
|
3473
|
+
var R, x, b, E;
|
|
3353
3474
|
let u;
|
|
3354
|
-
if (
|
|
3475
|
+
if (o.params)
|
|
3355
3476
|
try {
|
|
3356
|
-
u = JSON.parse(
|
|
3357
|
-
} catch (
|
|
3358
|
-
u =
|
|
3477
|
+
u = JSON.parse(o.params);
|
|
3478
|
+
} catch (m) {
|
|
3479
|
+
u = o.params;
|
|
3359
3480
|
}
|
|
3360
|
-
switch (
|
|
3361
|
-
case
|
|
3362
|
-
(u == null ? void 0 : u.data) !== "图纸id" && (u != null && u.data) ? (
|
|
3481
|
+
switch (o.msgName) {
|
|
3482
|
+
case ne.CHANGE_GRAPH:
|
|
3483
|
+
(u == null ? void 0 : u.data) !== "图纸id" && (u != null && u.data) ? (s.value = K.value, f.value = te.value, i.value = u.isBack, (R = u == null ? void 0 : u.data) != null && R.startsWith("/") ? (K.value = u == null ? void 0 : u.data, te.value = !0) : (te.value = !1, c.value = k(u.data))) : u ? (te.value = !1, c.value = Z.value, i.value = !0, k(u)) : console.warn("切换图纸信息为空");
|
|
3363
3484
|
break;
|
|
3364
|
-
case
|
|
3365
|
-
u.msg !== "通知内容" ?
|
|
3485
|
+
case ne.NOTIFY_DIALOG:
|
|
3486
|
+
u != null && u.msg && u.msg !== "通知内容" ? Ua(d({
|
|
3366
3487
|
message: u.msg
|
|
3367
3488
|
}, u)) : console.warn("通知内容为空");
|
|
3368
3489
|
break;
|
|
3369
|
-
case
|
|
3370
|
-
|
|
3371
|
-
const I =
|
|
3372
|
-
I && I.penType ===
|
|
3373
|
-
}),
|
|
3374
|
-
|
|
3375
|
-
}, 200);
|
|
3490
|
+
case ne.GIS_PROPS_PANEL:
|
|
3491
|
+
o.eventName === "enter" ? (fe.value = !0, o.pen.penType === P.GIS_SENSOR ? Ce.value = ((x = o == null ? void 0 : o.pen) == null ? void 0 : x.bindData) || {} : o.pen.penType === P.GIS_SENSOR_WRAPPER && ((E = (b = o.pen) == null ? void 0 : b.children) == null || E.forEach((m) => {
|
|
3492
|
+
const I = L.value.findOne(m);
|
|
3493
|
+
I && I.penType === P.GIS_SENSOR && (Ce.value = I.bindData || {});
|
|
3494
|
+
})), o.e && (G.value = le(o.e.clientX, o.e.clientY))) : (clearTimeout(we), we = setTimeout(() => {
|
|
3495
|
+
ee.value || (fe.value = !1, G.value = { left: 0, top: 0 }, Ce.value = {});
|
|
3496
|
+
}, 200));
|
|
3376
3497
|
break;
|
|
3377
3498
|
}
|
|
3378
|
-
},
|
|
3379
|
-
|
|
3499
|
+
}, v = (o) => {
|
|
3500
|
+
o != null && o.on && (y(o), Object.values(ne).forEach((u) => {
|
|
3501
|
+
const w = (R) => {
|
|
3502
|
+
l(D(d({}, R), { msgName: u }));
|
|
3503
|
+
};
|
|
3504
|
+
De.set(u, w), o.on(u, w);
|
|
3505
|
+
}));
|
|
3506
|
+
}, y = (o) => {
|
|
3507
|
+
o != null && o.off && (De.forEach((u, w) => {
|
|
3508
|
+
o.off(w, u);
|
|
3509
|
+
}), De.clear());
|
|
3510
|
+
}, T = (o) => {
|
|
3511
|
+
var u, w, R, x, b, E, m, I, C;
|
|
3380
3512
|
try {
|
|
3381
|
-
|
|
3382
|
-
const
|
|
3383
|
-
|
|
3384
|
-
var
|
|
3385
|
-
|
|
3386
|
-
}) : (
|
|
3387
|
-
var
|
|
3388
|
-
(
|
|
3389
|
-
}),
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
(Te) => X(k(c({}, Te), {
|
|
3393
|
-
msgName: ee
|
|
3394
|
-
}))
|
|
3395
|
-
);
|
|
3396
|
-
}), s && (s.socketFn = R), i.customCallbacks.onStageLoaded && i.customCallbacks.onStageLoaded(s), i.isInitData && Z(s), window.addEventListener("mousemove", E);
|
|
3397
|
-
} catch (C) {
|
|
3398
|
-
ne(C, "图纸加载完成处理");
|
|
3513
|
+
n("loaded", o);
|
|
3514
|
+
const S = mt(), p = me.value, _ = at.getSession(p.stationIdKey), V = at.getSession(p.userTokenKey);
|
|
3515
|
+
p.enableWebSocket && _ && V && ((R = (w = (u = o.store) == null ? void 0 : u.data) == null ? void 0 : w.networks) != null && R.length ? (E = (b = (x = o.store) == null ? void 0 : x.data) == null ? void 0 : b.networks) == null || E.forEach((de) => {
|
|
3516
|
+
var Be;
|
|
3517
|
+
de.protocol === "websocket" && ((Be = de.url) != null && Be.includes("station_id") || (de.url = `${de.url}?station_id=${_}`), p.enableToken ? de.protocols = p.userToken || V : de.protocols = void 0);
|
|
3518
|
+
}) : (I = (m = o.store) == null ? void 0 : m.data) != null && I.websocket ? ((C = o.store.data.websocket) != null && C.includes("station_id") || (o.store.data.websocket = `${o.store.data.websocket}?station_id=${_}`), p.enableToken ? o.store.data.websocketProtocols = p.userToken || V : o.store.data.websocketProtocols = void 0, o.closeSocket(), o.connectSocket()) : (o.store.data.websocket = `${p.socketUrl}?station_id=${_}`, p.enableToken ? o.store.data.websocketProtocols = V : o.store.data.websocketProtocols = void 0, o.connectWebsocket())), (r.showMap || S.showMap === "true") && o.showMap(), o.setRule({ rule: !1 }), o.setOptions({ disableRuleLine: !0 }), o.setGrid({ grid: !1 }), o.lock(Pe.DisableEdit), X().forEach((de) => {
|
|
3519
|
+
var Be;
|
|
3520
|
+
(Be = de == null ? void 0 : de.events) != null && Be.length ? M({ id: de.id, locked: 1 }, !1) : M({ id: de.id, locked: 10 }, !1);
|
|
3521
|
+
}), o.render(), p.enableAutoFit && o.fitView(!0, p.fitPadding), v(o), o && (o.socketFn = ce), r.customCallbacks.onStageLoaded && r.customCallbacks.onStageLoaded(o), r.isInitData && H(o), window.addEventListener("mousemove", ie);
|
|
3522
|
+
} catch (S) {
|
|
3523
|
+
re(S, "图纸加载完成处理");
|
|
3399
3524
|
}
|
|
3400
|
-
},
|
|
3525
|
+
}, k = da((o) => ae(this, null, function* () {
|
|
3401
3526
|
var u;
|
|
3402
3527
|
try {
|
|
3403
|
-
if (window.isFactory =
|
|
3404
|
-
|
|
3528
|
+
if (window.isFactory = r.isFactory, r.url) {
|
|
3529
|
+
te.value = r.local, K.value = r.url;
|
|
3405
3530
|
return;
|
|
3406
3531
|
}
|
|
3407
|
-
const
|
|
3408
|
-
if (
|
|
3409
|
-
const
|
|
3410
|
-
if (
|
|
3411
|
-
const
|
|
3412
|
-
if ((u =
|
|
3413
|
-
yield
|
|
3532
|
+
const w = mt();
|
|
3533
|
+
if (o = o || r.gid || w.id, w.local === "true" && (te.value = !0), o) {
|
|
3534
|
+
const R = _e();
|
|
3535
|
+
if (R && R.getCommonApi) {
|
|
3536
|
+
const x = yield R.getCommonApi(r.isFactory ? "graph" : "floorplan", { guid: o });
|
|
3537
|
+
if ((u = x.data) != null && u.length)
|
|
3538
|
+
yield z(x.data[0].path);
|
|
3414
3539
|
else {
|
|
3415
|
-
const
|
|
3416
|
-
|
|
3540
|
+
const b = "未找到图纸!";
|
|
3541
|
+
re(new Error(b), "获取图纸数据");
|
|
3417
3542
|
}
|
|
3418
3543
|
} else
|
|
3419
|
-
|
|
3544
|
+
re(new Error("API实例不可用"), "初始化图纸数据!");
|
|
3420
3545
|
} else
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
} catch (
|
|
3424
|
-
|
|
3546
|
+
te.value = r.local, yield z(r.url);
|
|
3547
|
+
r.customCallbacks.onGraphLoaded && r.customCallbacks.onGraphLoaded(K.value);
|
|
3548
|
+
} catch (w) {
|
|
3549
|
+
re(w, "获取图纸数据失败");
|
|
3550
|
+
}
|
|
3551
|
+
})), z = (o) => ae(this, null, function* () {
|
|
3552
|
+
if (!o) {
|
|
3553
|
+
K.value = "";
|
|
3554
|
+
return;
|
|
3425
3555
|
}
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
$.value = s;
|
|
3556
|
+
const u = o.split(".");
|
|
3557
|
+
if (o.includes(r.lang) || u.length !== 3) {
|
|
3558
|
+
K.value = o;
|
|
3430
3559
|
return;
|
|
3431
3560
|
}
|
|
3432
|
-
const
|
|
3561
|
+
const w = `${u[0]}.${r.lang}.${u[2]}`;
|
|
3433
3562
|
try {
|
|
3434
|
-
const
|
|
3563
|
+
const R = yield Ue.getGraphApi(w, { local: r.local }).catch(() => {
|
|
3435
3564
|
console.warn("多语言图纸不存在,使用默认图纸");
|
|
3436
3565
|
});
|
|
3437
|
-
|
|
3438
|
-
} catch (
|
|
3439
|
-
|
|
3566
|
+
K.value = R ? w : o;
|
|
3567
|
+
} catch (R) {
|
|
3568
|
+
K.value = o;
|
|
3440
3569
|
}
|
|
3441
|
-
}),
|
|
3442
|
-
var u,
|
|
3443
|
-
if (
|
|
3444
|
-
let
|
|
3445
|
-
|
|
3446
|
-
const
|
|
3447
|
-
for (let
|
|
3448
|
-
const
|
|
3449
|
-
|
|
3450
|
-
if (
|
|
3451
|
-
switch (
|
|
3452
|
-
case
|
|
3453
|
-
|
|
3454
|
-
nodeName:
|
|
3455
|
-
penId:
|
|
3456
|
-
penName:
|
|
3570
|
+
}), H = (o) => ae(this, null, function* () {
|
|
3571
|
+
var u, w, R, x;
|
|
3572
|
+
if (o) {
|
|
3573
|
+
let b = [], E = [], m = [];
|
|
3574
|
+
oe = {};
|
|
3575
|
+
const I = o.store.data.pens;
|
|
3576
|
+
for (let S = 0; S < I.length; S++) {
|
|
3577
|
+
const p = I[S];
|
|
3578
|
+
p.bindDataId ? (u = p.form) != null && u.length ? p.form.forEach((_) => {
|
|
3579
|
+
if (_.dataIds.dataId)
|
|
3580
|
+
switch (_.dataIds.dataType) {
|
|
3581
|
+
case Y.YC:
|
|
3582
|
+
b.push(D(d({}, _), {
|
|
3583
|
+
nodeName: _.dataIds.name,
|
|
3584
|
+
penId: p.id,
|
|
3585
|
+
penName: p.penName
|
|
3457
3586
|
}));
|
|
3458
3587
|
break;
|
|
3459
|
-
case
|
|
3460
|
-
|
|
3461
|
-
nodeName:
|
|
3462
|
-
penId:
|
|
3463
|
-
penName:
|
|
3588
|
+
case Y.YX:
|
|
3589
|
+
E.push(D(d({}, _), {
|
|
3590
|
+
nodeName: _.dataIds.name,
|
|
3591
|
+
penId: p.id,
|
|
3592
|
+
penName: p.penName
|
|
3464
3593
|
}));
|
|
3465
3594
|
break;
|
|
3466
|
-
case
|
|
3467
|
-
|
|
3468
|
-
nodeName:
|
|
3469
|
-
penId:
|
|
3470
|
-
penName:
|
|
3595
|
+
case Y.SG:
|
|
3596
|
+
E.push(D(d({}, _), {
|
|
3597
|
+
nodeName: _.dataIds.name,
|
|
3598
|
+
penId: p.id,
|
|
3599
|
+
penName: p.penName
|
|
3471
3600
|
}));
|
|
3472
3601
|
break;
|
|
3473
|
-
case
|
|
3474
|
-
|
|
3475
|
-
nodeName:
|
|
3476
|
-
penId:
|
|
3477
|
-
penName:
|
|
3602
|
+
case Y.POINT:
|
|
3603
|
+
m.push(D(d({}, _), {
|
|
3604
|
+
nodeName: _.dataIds.name,
|
|
3605
|
+
penId: p.id,
|
|
3606
|
+
penName: p.penName
|
|
3478
3607
|
}));
|
|
3479
3608
|
break;
|
|
3480
3609
|
}
|
|
3481
|
-
}) : (
|
|
3482
|
-
id:
|
|
3610
|
+
}) : (p.penType === P.GIS_SENSOR || p.penType === P.GIS_DB_VALUE) && p.bindData && (oe[p.bindData.ied_id] || (oe[p.bindData.ied_id] = []), M({
|
|
3611
|
+
id: p.id,
|
|
3483
3612
|
title: void 0
|
|
3484
|
-
}),
|
|
3485
|
-
penId:
|
|
3486
|
-
penType:
|
|
3487
|
-
},
|
|
3488
|
-
if (
|
|
3489
|
-
switch (
|
|
3490
|
-
case
|
|
3491
|
-
|
|
3613
|
+
}), oe[p.bindData.ied_id].push(d({
|
|
3614
|
+
penId: p.id,
|
|
3615
|
+
penType: p.penType
|
|
3616
|
+
}, p.bindData))) : (w = p.statusBindData) != null && w.length && p.statusBindData.forEach((_) => {
|
|
3617
|
+
if (_.dataId)
|
|
3618
|
+
switch (_.dataType) {
|
|
3619
|
+
case Y.YX:
|
|
3620
|
+
E.push({
|
|
3492
3621
|
showChild: 0,
|
|
3493
3622
|
value: 0,
|
|
3494
|
-
nodeName:
|
|
3495
|
-
penId:
|
|
3496
|
-
penName:
|
|
3497
|
-
dataId:
|
|
3623
|
+
nodeName: _.dataName,
|
|
3624
|
+
penId: p.id,
|
|
3625
|
+
penName: p.penName,
|
|
3626
|
+
dataId: _.dataId
|
|
3498
3627
|
});
|
|
3499
3628
|
break;
|
|
3500
|
-
case
|
|
3501
|
-
|
|
3629
|
+
case Y.SG:
|
|
3630
|
+
E.push({
|
|
3502
3631
|
showChild: 0,
|
|
3503
3632
|
value: 0,
|
|
3504
|
-
nodeName:
|
|
3505
|
-
penId:
|
|
3506
|
-
penName:
|
|
3507
|
-
dataId:
|
|
3633
|
+
nodeName: _.dataName,
|
|
3634
|
+
penId: p.id,
|
|
3635
|
+
penName: p.penName,
|
|
3636
|
+
dataId: _.dataId
|
|
3508
3637
|
});
|
|
3509
3638
|
break;
|
|
3510
3639
|
}
|
|
3511
3640
|
});
|
|
3512
3641
|
}
|
|
3513
|
-
let
|
|
3514
|
-
if (
|
|
3515
|
-
const
|
|
3516
|
-
if (
|
|
3517
|
-
const
|
|
3518
|
-
point_id:
|
|
3519
|
-
var
|
|
3520
|
-
return ((
|
|
3642
|
+
let C = [];
|
|
3643
|
+
if (b.length) {
|
|
3644
|
+
const S = _e();
|
|
3645
|
+
if (S && S.postCommonApi) {
|
|
3646
|
+
const p = yield S.postCommonApi("queryrealtimepoint", {
|
|
3647
|
+
point_id: b.map((_) => {
|
|
3648
|
+
var V;
|
|
3649
|
+
return ((V = _ == null ? void 0 : _.dataIds) == null ? void 0 : V.dataId) || _.dataId;
|
|
3521
3650
|
}).join(",")
|
|
3522
3651
|
});
|
|
3523
|
-
(
|
|
3524
|
-
|
|
3525
|
-
}),
|
|
3652
|
+
(R = p == null ? void 0 : p.data) != null && R.length && (p.data.forEach((_) => {
|
|
3653
|
+
J[_.guid] = _.value_disp || _.value;
|
|
3654
|
+
}), C = [...C, ...p.data]);
|
|
3526
3655
|
}
|
|
3527
3656
|
}
|
|
3528
|
-
if (
|
|
3529
|
-
const
|
|
3530
|
-
if (
|
|
3531
|
-
const
|
|
3532
|
-
point_id:
|
|
3533
|
-
var
|
|
3534
|
-
return ((
|
|
3657
|
+
if (E.length) {
|
|
3658
|
+
const S = _e();
|
|
3659
|
+
if (S && S.postCommonApi) {
|
|
3660
|
+
const p = yield S.postCommonApi("queryrealtimepoint", {
|
|
3661
|
+
point_id: E.map((_) => {
|
|
3662
|
+
var V;
|
|
3663
|
+
return ((V = _ == null ? void 0 : _.dataIds) == null ? void 0 : V.dataId) || _.dataId;
|
|
3535
3664
|
}).join(",")
|
|
3536
3665
|
});
|
|
3537
|
-
(
|
|
3538
|
-
|
|
3539
|
-
}),
|
|
3666
|
+
(x = p == null ? void 0 : p.data) != null && x.length && (p.data.forEach((_) => {
|
|
3667
|
+
J[_.guid] = ht(_.value) ? Number(_.value) : _.value;
|
|
3668
|
+
}), C = [...C, ...p.data]);
|
|
3540
3669
|
}
|
|
3541
3670
|
}
|
|
3542
|
-
|
|
3543
|
-
const
|
|
3544
|
-
|
|
3545
|
-
value:
|
|
3546
|
-
value_disp:
|
|
3547
|
-
alarm_value:
|
|
3548
|
-
point_id:
|
|
3671
|
+
C.length && C.forEach((S) => {
|
|
3672
|
+
const p = o.find(S.guid);
|
|
3673
|
+
F(p, D(d({}, S), {
|
|
3674
|
+
value: ht(S.value) ? Qe(Number(S.value)) ? Number(S.value) : 0 : S.value,
|
|
3675
|
+
value_disp: S.value_disp,
|
|
3676
|
+
alarm_value: S.alarm_value,
|
|
3677
|
+
point_id: S.guid
|
|
3549
3678
|
}));
|
|
3550
|
-
}),
|
|
3551
|
-
|
|
3552
|
-
}, 3e3)) :
|
|
3679
|
+
}), oe && Object.keys(oe).length ? (ve && clearInterval(ve), N(), ve = setInterval(() => {
|
|
3680
|
+
N();
|
|
3681
|
+
}, 3e3)) : ve && clearInterval(ve);
|
|
3553
3682
|
}
|
|
3554
|
-
}),
|
|
3555
|
-
var
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
(s = _ == null ? void 0 : _.data) != null && s.length && (u.forEach((P) => {
|
|
3566
|
-
const D = _.data.find((I) => I.ied_id === P), S = g[P];
|
|
3567
|
-
S != null && S.length && S.forEach((I) => {
|
|
3568
|
-
const p = D.result.find((T) => T.ln_id === I.ln_id);
|
|
3569
|
-
if (p) {
|
|
3570
|
-
const T = et(p.amp_peak) ? We(Number(p.amp_peak)) ? Number(p.amp_peak) : 0 : p.amp_peak;
|
|
3571
|
-
I.penType === b.GIS_SENSOR ? N(
|
|
3572
|
-
{
|
|
3573
|
-
id: I.penId,
|
|
3574
|
-
showChild: p.status === "告警" ? 2 : p.status === "正常" ? 1 : 0,
|
|
3575
|
-
bindData: k(c({}, I), {
|
|
3576
|
-
name: p.name || I.name,
|
|
3577
|
-
status: p.status,
|
|
3578
|
-
value: T
|
|
3579
|
-
})
|
|
3580
|
-
},
|
|
3581
|
-
!1
|
|
3582
|
-
) : N(
|
|
3583
|
-
{
|
|
3584
|
-
id: I.penId,
|
|
3585
|
-
text: `${T} dBm`
|
|
3586
|
-
},
|
|
3587
|
-
!1
|
|
3588
|
-
);
|
|
3589
|
-
}
|
|
3683
|
+
}), N = () => ae(this, null, function* () {
|
|
3684
|
+
var o;
|
|
3685
|
+
try {
|
|
3686
|
+
if (oe) {
|
|
3687
|
+
const u = Object.keys(oe);
|
|
3688
|
+
if (u.length) {
|
|
3689
|
+
const w = yield Ue.postPDApi("querychannelstatus/", {
|
|
3690
|
+
data: u.map((R) => ({
|
|
3691
|
+
ied_id: R,
|
|
3692
|
+
ln_list: oe[R].map((x) => x.ln_id)
|
|
3693
|
+
}))
|
|
3590
3694
|
});
|
|
3591
|
-
|
|
3695
|
+
(o = w == null ? void 0 : w.data) != null && o.length && (u.forEach((R) => {
|
|
3696
|
+
const x = w.data.find((E) => E.ied_id === R), b = oe[R];
|
|
3697
|
+
b != null && b.length && b.forEach((E) => {
|
|
3698
|
+
var I;
|
|
3699
|
+
const m = (I = x == null ? void 0 : x.result) == null ? void 0 : I.find((C) => C.ln_id === E.ln_id);
|
|
3700
|
+
if (m) {
|
|
3701
|
+
const C = ht(m.amp_peak) ? Qe(Number(m.amp_peak)) ? Number(m.amp_peak) : 0 : m.amp_peak;
|
|
3702
|
+
E.penType === P.GIS_SENSOR ? M(
|
|
3703
|
+
{
|
|
3704
|
+
id: E.penId,
|
|
3705
|
+
showChild: m.status === "告警" ? 2 : m.status === "正常" ? 1 : 0,
|
|
3706
|
+
bindData: D(d({}, E), {
|
|
3707
|
+
name: m.name || E.name,
|
|
3708
|
+
status: m.status,
|
|
3709
|
+
value: C
|
|
3710
|
+
})
|
|
3711
|
+
},
|
|
3712
|
+
!1
|
|
3713
|
+
) : M(
|
|
3714
|
+
{
|
|
3715
|
+
id: E.penId,
|
|
3716
|
+
text: `${C} dBm`
|
|
3717
|
+
},
|
|
3718
|
+
!1
|
|
3719
|
+
);
|
|
3720
|
+
}
|
|
3721
|
+
});
|
|
3722
|
+
}), L.value.render());
|
|
3723
|
+
}
|
|
3592
3724
|
}
|
|
3725
|
+
} catch (u) {
|
|
3726
|
+
console.warn("局放状态获取失败", u);
|
|
3593
3727
|
}
|
|
3594
|
-
}),
|
|
3595
|
-
if (
|
|
3596
|
-
return
|
|
3597
|
-
},
|
|
3598
|
-
var
|
|
3599
|
-
return ((u = (
|
|
3600
|
-
},
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
if (!
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
_.set(I, T);
|
|
3728
|
+
}), M = (o, u = !0) => {
|
|
3729
|
+
if (L.value)
|
|
3730
|
+
return L.value.setValue(o, { render: u });
|
|
3731
|
+
}, Ie = () => L.value, X = () => {
|
|
3732
|
+
var o, u;
|
|
3733
|
+
return ((u = (o = W.value) == null ? void 0 : o.data) == null ? void 0 : u.pens) || [];
|
|
3734
|
+
}, q = () => P, F = /* @__PURE__ */ (() => {
|
|
3735
|
+
const o = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), w = (x) => {
|
|
3736
|
+
var E;
|
|
3737
|
+
if (!((E = x.children) != null && E.length)) return [];
|
|
3738
|
+
const b = x.id || "";
|
|
3739
|
+
if (!b) return [];
|
|
3740
|
+
if (!u.has(b) && W.value) {
|
|
3741
|
+
const m = Wa(x, W.value);
|
|
3742
|
+
u.set(b, m);
|
|
3610
3743
|
}
|
|
3611
|
-
return
|
|
3612
|
-
},
|
|
3613
|
-
if (
|
|
3614
|
-
const
|
|
3615
|
-
|
|
3744
|
+
return u.get(b) || [];
|
|
3745
|
+
}, R = () => {
|
|
3746
|
+
if (o.size === 0 || !L.value || !W.value) return;
|
|
3747
|
+
const x = [], b = [], E = W.value.animates;
|
|
3748
|
+
o.forEach(({ pen: m, dataItem: I, formKey: C }) => {
|
|
3616
3749
|
switch (C) {
|
|
3617
3750
|
case "showChild":
|
|
3618
|
-
|
|
3751
|
+
M({ id: m.id, showChild: +I.value }, !1);
|
|
3619
3752
|
break;
|
|
3620
3753
|
case "text":
|
|
3621
|
-
|
|
3754
|
+
M({ id: m.id, text: I.value_disp || I.value }, !1);
|
|
3622
3755
|
break;
|
|
3623
3756
|
case "light_plate":
|
|
3624
3757
|
{
|
|
3625
|
-
const
|
|
3626
|
-
|
|
3758
|
+
const S = I.value === -1 || Nt(I) ? "#999999" : Ea[I.value !== void 0 ? I.value : I.alarm_value], p = I.value === -1 || Nt(I) ? "#cccccc" : _a[I.value !== void 0 ? I.value : I.alarm_value];
|
|
3759
|
+
M({ id: m.id, textColor: S, background: p }, !1);
|
|
3627
3760
|
}
|
|
3628
3761
|
break;
|
|
3629
3762
|
case "point_value":
|
|
3630
|
-
|
|
3631
|
-
|
|
3763
|
+
m.penType === P.POINT_VALUE && w(m).forEach((p) => {
|
|
3764
|
+
p.name === "text" && M({ id: p.id, text: I.value }, !1);
|
|
3632
3765
|
});
|
|
3633
3766
|
break;
|
|
3634
3767
|
case "online_state":
|
|
3635
3768
|
{
|
|
3636
|
-
let
|
|
3637
|
-
|
|
3638
|
-
|
|
3769
|
+
let S = I.value ? void 0 : "contrast(0%)";
|
|
3770
|
+
M({ id: m.id, filter: S }, !1), w(m).forEach((_) => {
|
|
3771
|
+
M({ id: _.id, filter: S }, !1);
|
|
3639
3772
|
});
|
|
3640
3773
|
}
|
|
3641
3774
|
break;
|
|
3642
3775
|
case "charged_state":
|
|
3643
3776
|
{
|
|
3644
|
-
const
|
|
3645
|
-
|
|
3646
|
-
|
|
3777
|
+
const S = I.value === sn.OFFLINE ? "contrast(0%)" : void 0;
|
|
3778
|
+
S !== m.filter && (M({ id: m.id, filter: S }, !1), w(m).forEach((_) => {
|
|
3779
|
+
M({ id: _.id, filter: S }, !1);
|
|
3647
3780
|
}));
|
|
3648
3781
|
}
|
|
3649
3782
|
break;
|
|
3650
3783
|
case "electric_direction":
|
|
3651
|
-
|
|
3784
|
+
I.value === ln.STOP ? E != null && E.has(m) && b.push(m) : !!I.value !== m.animateReverse && (M(
|
|
3652
3785
|
{
|
|
3653
|
-
id:
|
|
3654
|
-
animateReverse: !!
|
|
3786
|
+
id: m.id,
|
|
3787
|
+
animateReverse: !!I.value
|
|
3655
3788
|
},
|
|
3656
3789
|
!1
|
|
3657
|
-
),
|
|
3790
|
+
), E != null && E.has(m) || x.push(m));
|
|
3658
3791
|
break;
|
|
3659
3792
|
case "electric_size":
|
|
3660
3793
|
{
|
|
3661
|
-
const
|
|
3662
|
-
|
|
3794
|
+
const S = cn[I.value];
|
|
3795
|
+
S !== void 0 && S !== m.lineWidth && M(
|
|
3663
3796
|
{
|
|
3664
|
-
id:
|
|
3665
|
-
lineWidth:
|
|
3797
|
+
id: m.id,
|
|
3798
|
+
lineWidth: S
|
|
3666
3799
|
},
|
|
3667
3800
|
!1
|
|
3668
3801
|
);
|
|
3669
3802
|
}
|
|
3670
3803
|
break;
|
|
3671
3804
|
default:
|
|
3672
|
-
|
|
3805
|
+
M(
|
|
3673
3806
|
{
|
|
3674
|
-
id:
|
|
3675
|
-
[C]:
|
|
3807
|
+
id: m.id,
|
|
3808
|
+
[C]: I.value
|
|
3676
3809
|
},
|
|
3677
3810
|
!1
|
|
3678
3811
|
);
|
|
3679
3812
|
break;
|
|
3680
3813
|
}
|
|
3681
|
-
}),
|
|
3814
|
+
}), b.length > 0 && L.value.stopAnimate(b), x.length > 0 && L.value.startAnimate(x), o.clear(), L.value.render();
|
|
3682
3815
|
};
|
|
3683
|
-
return (
|
|
3684
|
-
|
|
3685
|
-
var
|
|
3686
|
-
const
|
|
3687
|
-
if ((
|
|
3688
|
-
if (!
|
|
3689
|
-
const C = [...
|
|
3690
|
-
if (
|
|
3691
|
-
const
|
|
3816
|
+
return (x, b) => {
|
|
3817
|
+
x != null && x.length && (x.forEach((E) => {
|
|
3818
|
+
var I;
|
|
3819
|
+
const m = E.form;
|
|
3820
|
+
if ((I = E.statusBindData) != null && I.length) {
|
|
3821
|
+
if (!J[b.guid]) return;
|
|
3822
|
+
const C = [...E.statusBindData], S = C.findIndex((p) => p.dataId === b.guid);
|
|
3823
|
+
if (S !== -1) {
|
|
3824
|
+
const p = C[S];
|
|
3692
3825
|
C.find(
|
|
3693
|
-
(
|
|
3694
|
-
) ||
|
|
3695
|
-
pen:
|
|
3826
|
+
(V) => p.sort < V.sort && J[V.dataId]
|
|
3827
|
+
) || o.set(E.id, {
|
|
3828
|
+
pen: E,
|
|
3696
3829
|
formKey: "showChild",
|
|
3697
|
-
dataItem:
|
|
3830
|
+
dataItem: D(d({}, b), { value: S })
|
|
3698
3831
|
});
|
|
3699
3832
|
}
|
|
3700
|
-
} else
|
|
3833
|
+
} else m != null && m.length && m.forEach((C) => {
|
|
3701
3834
|
if (!(Array.isArray(C.dataIds) ? C.dataIds : [C.dataIds]).some(
|
|
3702
|
-
(
|
|
3835
|
+
(V) => (V == null ? void 0 : V.dataId) && ((V == null ? void 0 : V.dataId) === b.dataId || (V == null ? void 0 : V.dataId) === b.point_id)
|
|
3703
3836
|
)) return;
|
|
3704
|
-
const
|
|
3705
|
-
|
|
3706
|
-
pen:
|
|
3707
|
-
dataItem:
|
|
3837
|
+
const _ = `${E.id}-${C.key}`;
|
|
3838
|
+
o.set(_, {
|
|
3839
|
+
pen: E,
|
|
3840
|
+
dataItem: b,
|
|
3708
3841
|
formKey: C.key
|
|
3709
3842
|
});
|
|
3710
3843
|
});
|
|
3711
|
-
}),
|
|
3712
|
-
|
|
3713
|
-
},
|
|
3844
|
+
}), Te && clearTimeout(Te), Te = setTimeout(() => {
|
|
3845
|
+
R(), Te = null;
|
|
3846
|
+
}, me.value.debounceDelay));
|
|
3714
3847
|
};
|
|
3715
|
-
})(),
|
|
3716
|
-
if (
|
|
3717
|
-
for (let u = 0; u <
|
|
3718
|
-
const
|
|
3719
|
-
|
|
3720
|
-
const
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3848
|
+
})(), Ae = (o) => {
|
|
3849
|
+
if (L.value) {
|
|
3850
|
+
for (let u = 0; u < o.length; u++) {
|
|
3851
|
+
const w = o[u];
|
|
3852
|
+
J[w.dataId || w.point_id] = w.value_disp || w.value;
|
|
3853
|
+
const R = L.value.find(w.dataId), x = setTimeout(() => {
|
|
3854
|
+
ke.delete(x), F(R, w);
|
|
3855
|
+
}, me.value.messageDelay);
|
|
3856
|
+
ke.add(x);
|
|
3724
3857
|
}
|
|
3725
|
-
|
|
3858
|
+
L.value.render(), r.customCallbacks.onBatchUpdate && r.customCallbacks.onBatchUpdate(o);
|
|
3726
3859
|
}
|
|
3727
|
-
},
|
|
3728
|
-
if (!
|
|
3729
|
-
const
|
|
3730
|
-
for (let
|
|
3731
|
-
const
|
|
3732
|
-
let
|
|
3733
|
-
u ?
|
|
3860
|
+
}, ye = (o, u = !1) => {
|
|
3861
|
+
if (!L.value) return;
|
|
3862
|
+
const w = X();
|
|
3863
|
+
for (let R = 0; R < w.length; R++) {
|
|
3864
|
+
const x = w[R];
|
|
3865
|
+
let b = !1;
|
|
3866
|
+
u ? b = o === x.dataProp : b = o === 5 ? !0 : x.dataProp <= o, M({ id: x.id, visible: b }, !1);
|
|
3734
3867
|
}
|
|
3735
|
-
|
|
3868
|
+
L.value.fitView(), L.value.render(), r.customCallbacks.onLevelChange && r.customCallbacks.onLevelChange(o, u);
|
|
3736
3869
|
};
|
|
3737
|
-
return
|
|
3738
|
-
() => [
|
|
3870
|
+
return vt(
|
|
3871
|
+
() => [r.gid, r.url, r.data, r.lang, r.local, r.isFactory],
|
|
3739
3872
|
() => {
|
|
3740
|
-
|
|
3873
|
+
k();
|
|
3741
3874
|
}
|
|
3742
|
-
),
|
|
3743
|
-
() =>
|
|
3744
|
-
(
|
|
3745
|
-
|
|
3875
|
+
), vt(
|
|
3876
|
+
() => r.showMap,
|
|
3877
|
+
(o) => {
|
|
3878
|
+
L.value && (o ? L.value.showMap() : L.value.hideMap());
|
|
3746
3879
|
}
|
|
3747
|
-
),
|
|
3748
|
-
const
|
|
3749
|
-
|
|
3750
|
-
const u =
|
|
3751
|
-
|
|
3752
|
-
}),
|
|
3753
|
-
|
|
3754
|
-
const
|
|
3755
|
-
|
|
3880
|
+
), oa(() => {
|
|
3881
|
+
const o = Re();
|
|
3882
|
+
o && o.on && o.on(me.value.graphSocket, ce);
|
|
3883
|
+
const u = mt();
|
|
3884
|
+
Z.value = r.gid || u.id, k();
|
|
3885
|
+
}), sa(() => {
|
|
3886
|
+
oe = null, ve && clearInterval(ve), ve = null, clearTimeout(we), clearTimeout(Te), ke.forEach((u) => clearTimeout(u)), ke.clear(), y(L.value);
|
|
3887
|
+
const o = Re();
|
|
3888
|
+
o && o.off && o.off(me.value.graphSocket, ce), window.removeEventListener("mousemove", ie);
|
|
3756
3889
|
}), e({
|
|
3757
|
-
setValue:
|
|
3758
|
-
getStage:
|
|
3759
|
-
getAllPens:
|
|
3760
|
-
getCustomPenType:
|
|
3761
|
-
batchUpdatePen:
|
|
3762
|
-
handleLineCross:
|
|
3763
|
-
changeVisibleByLevel:
|
|
3764
|
-
}), (
|
|
3890
|
+
setValue: M,
|
|
3891
|
+
getStage: Ie,
|
|
3892
|
+
getAllPens: X,
|
|
3893
|
+
getCustomPenType: q,
|
|
3894
|
+
batchUpdatePen: Ae,
|
|
3895
|
+
handleLineCross: Ha,
|
|
3896
|
+
changeVisibleByLevel: ye
|
|
3897
|
+
}), (o, u) => (ue(), xe("div", {
|
|
3765
3898
|
ref_key: "previewRef",
|
|
3766
|
-
ref:
|
|
3899
|
+
ref: O,
|
|
3767
3900
|
class: "meta2d-preview"
|
|
3768
3901
|
}, [
|
|
3769
|
-
|
|
3902
|
+
$e(Mr, {
|
|
3770
3903
|
ref_key: "graphRef",
|
|
3771
|
-
ref:
|
|
3772
|
-
url:
|
|
3773
|
-
local:
|
|
3774
|
-
data:
|
|
3775
|
-
"dev-config":
|
|
3904
|
+
ref: $,
|
|
3905
|
+
url: K.value,
|
|
3906
|
+
local: te.value,
|
|
3907
|
+
data: r.data,
|
|
3908
|
+
"dev-config": r.devConfig,
|
|
3776
3909
|
preview: "",
|
|
3777
|
-
onLoaded:
|
|
3910
|
+
onLoaded: T
|
|
3778
3911
|
}, null, 8, ["url", "local", "data", "dev-config"]),
|
|
3779
|
-
|
|
3780
|
-
|
|
3912
|
+
ze(i) ? (ue(), xe("div", Fr, [
|
|
3913
|
+
$e(ze(ua), {
|
|
3781
3914
|
type: "primary",
|
|
3782
|
-
onClick:
|
|
3915
|
+
onClick: Ne
|
|
3783
3916
|
}, {
|
|
3784
|
-
default:
|
|
3785
|
-
|
|
3917
|
+
default: _t(() => [...u[0] || (u[0] = [
|
|
3918
|
+
ra("返回", -1)
|
|
3786
3919
|
])]),
|
|
3787
3920
|
_: 1
|
|
3788
3921
|
})
|
|
3789
|
-
])) :
|
|
3790
|
-
|
|
3922
|
+
])) : je("", !0),
|
|
3923
|
+
fe.value ? (ue(), et(lr, {
|
|
3791
3924
|
key: 1,
|
|
3792
3925
|
ref_key: "panelRef",
|
|
3793
|
-
ref:
|
|
3794
|
-
data:
|
|
3795
|
-
style:
|
|
3796
|
-
top:
|
|
3797
|
-
left:
|
|
3926
|
+
ref: U,
|
|
3927
|
+
data: Ce.value,
|
|
3928
|
+
style: ia({
|
|
3929
|
+
top: G.value.top + "px",
|
|
3930
|
+
left: G.value.left + "px",
|
|
3798
3931
|
position: "absolute"
|
|
3799
3932
|
}),
|
|
3800
|
-
onClose:
|
|
3801
|
-
onEnter:
|
|
3802
|
-
onViewHistory:
|
|
3803
|
-
}, null, 8, ["data", "style"])) :
|
|
3933
|
+
onClose: se,
|
|
3934
|
+
onEnter: pe,
|
|
3935
|
+
onViewHistory: Ee
|
|
3936
|
+
}, null, 8, ["data", "style"])) : je("", !0)
|
|
3804
3937
|
], 512));
|
|
3805
3938
|
}
|
|
3806
|
-
}),
|
|
3807
|
-
|
|
3808
|
-
const
|
|
3809
|
-
|
|
3810
|
-
},
|
|
3939
|
+
}), nt = /* @__PURE__ */ ot(Ur, [["__scopeId", "data-v-2a591df2"]]);
|
|
3940
|
+
nt.name || (nt.name = "SyGraph");
|
|
3941
|
+
const Gr = (a) => {
|
|
3942
|
+
a.component(nt.name || "SyGraph", nt);
|
|
3943
|
+
}, hi = { install: Gr };
|
|
3811
3944
|
export {
|
|
3812
|
-
|
|
3813
|
-
|
|
3945
|
+
nt as SyGraph,
|
|
3946
|
+
hi as default
|
|
3814
3947
|
};
|