@syhr/sy-graph 1.1.0-rc.2 → 1.1.0-rc.3
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/README.md +186 -61
- package/dist-graph/sy-graph.cjs +3 -3
- package/dist-graph/sy-graph.css +1 -1
- package/dist-graph/sy-graph.mjs +924 -841
- package/dist-graph/sy-graph.umd.js +4 -4
- package/package.json +8 -6
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 Yt = Object.defineProperty, Wt = Object.defineProperties;
|
|
2
|
+
var __$t__ = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var qe = Object.getOwnPropertySymbols;
|
|
4
|
+
var jt = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ge = (r, e, t) => e in r ? Yt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, l = (r, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
jt.call(e, t) && Ge(r, t, e[t]);
|
|
8
|
+
if (qe)
|
|
9
|
+
for (var t of qe(e))
|
|
10
|
+
zt.call(e, t) && Ge(r, t, e[t]);
|
|
11
11
|
return r;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, x = (r, e) => Wt(r, __$t__(e));
|
|
13
|
+
var ne = (r, e, t) => Ge(r, typeof e != "symbol" ? e + "" : e, t);
|
|
14
14
|
var Y = (r, e, t) => new Promise((a, n) => {
|
|
15
15
|
var o = (w) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
n(
|
|
17
|
+
h(t.next(w));
|
|
18
|
+
} catch (b) {
|
|
19
|
+
n(b);
|
|
20
20
|
}
|
|
21
21
|
}, i = (w) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
n(
|
|
23
|
+
h(t.throw(w));
|
|
24
|
+
} catch (b) {
|
|
25
|
+
n(b);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, h = (w) => w.done ? a(w.value) : Promise.resolve(w.value).then(o, i);
|
|
28
|
+
h((t = t.apply(r, e)).next());
|
|
29
29
|
});
|
|
30
|
-
import { openBlock as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
30
|
+
import { openBlock as Q, createElementBlock as ce, createElementVNode as se, toDisplayString as Ye, useCssVars as Xt, computed as he, resolveComponent as Qe, normalizeStyle as yt, createBlock as Pe, withCtx as Tt, createVNode as We, unref as ke, createCommentVNode as Oe, ref as j, shallowRef as qt, watch as $e, nextTick as Qt, onMounted as St, onUnmounted as bt, createTextVNode as Jt } from "vue";
|
|
31
|
+
import Zt from "qs";
|
|
32
|
+
import ea from "axios";
|
|
33
|
+
import ta from "mitt";
|
|
34
|
+
import aa from "dayjs";
|
|
35
35
|
import "crypto-js";
|
|
36
|
-
import { SM4 as
|
|
37
|
-
import { throttle as
|
|
38
|
-
import { ElMessage as W, ElButton 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 pe, SM2 as na } from "gm-crypto";
|
|
37
|
+
import { throttle as Ct, isObject as ra, debounce as ia } from "lodash-es";
|
|
38
|
+
import { ElMessage as W, ElButton as oa, ElNotification as sa } from "element-plus";
|
|
39
|
+
import { clearLineCross as la, handleLineCross as ca } from "@meta2d/utils";
|
|
40
|
+
import { Meta2d as da, register as _e, registerAnchors as Je, registerCanvasDraw as we, LockState as ve, getAllChildren as ua } from "@meta2d/core";
|
|
41
|
+
import { mindBoxPlugin as ma } from "@meta2d/plugin-mind-core";
|
|
42
|
+
import { collapseChildPlugin as ha } from "@meta2d/plugin-mind-collapse";
|
|
43
|
+
import { formPens as fa } from "@meta2d/form-diagram";
|
|
44
|
+
import { classPens as pa } from "@meta2d/class-diagram";
|
|
45
|
+
import { chartsPens as Aa } from "@meta2d/le5le-charts";
|
|
46
|
+
import { videos as de } from "@meta2d/core/src/diagrams";
|
|
47
|
+
import { flowPens as ga, flowAnchors as _a } from "@meta2d/flow-diagram";
|
|
48
|
+
import { ftaPens as wa, ftaAnchors as va, ftaPensbyCtx as Ea } from "@meta2d/fta-diagram";
|
|
49
|
+
import { sequencePens as Ia, sequencePensbyCtx as ya } from "@meta2d/sequence-diagram";
|
|
50
|
+
import { activityDiagram as Ta, activityDiagramByCtx as Sa } from "@meta2d/activity-diagram";
|
|
51
|
+
import { Loading as ba } from "@element-plus/icons-vue";
|
|
52
|
+
const Ca = {
|
|
53
53
|
OFFLINE: 0
|
|
54
54
|
// 离线
|
|
55
|
-
},
|
|
55
|
+
}, xa = {
|
|
56
56
|
STOP: 2
|
|
57
57
|
// 停止
|
|
58
|
-
},
|
|
58
|
+
}, Na = {
|
|
59
59
|
1: 1,
|
|
60
60
|
2: 2,
|
|
61
61
|
3: 3,
|
|
62
62
|
4: 4,
|
|
63
63
|
5: 5
|
|
64
|
-
},
|
|
64
|
+
}, k = {
|
|
65
65
|
AREA: 1,
|
|
66
66
|
// 区域
|
|
67
67
|
BAY: 2,
|
|
@@ -84,22 +84,25 @@ const va = {
|
|
|
84
84
|
// ld 逻辑设备
|
|
85
85
|
LN: 11,
|
|
86
86
|
// ln 逻辑节点
|
|
87
|
-
SG: 12
|
|
87
|
+
SG: 12,
|
|
88
88
|
// 定值
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
|
|
89
|
+
GIS_SENSOR: 13
|
|
90
|
+
// 局放
|
|
91
|
+
}, Ra = {
|
|
92
|
+
[k.AREA]: "area",
|
|
93
|
+
[k.BAY]: "bay",
|
|
94
|
+
[k.DEVICE]: "device",
|
|
95
|
+
[k.COMPONENT]: "component",
|
|
96
|
+
[k.POINT]: "patrolpoint",
|
|
97
|
+
[k.YX]: "yxpoint",
|
|
98
|
+
[k.YC]: "ycpoint",
|
|
99
|
+
[k.YK]: "ykpoint",
|
|
100
|
+
[k.AUX_DEVICE]: "acdevice",
|
|
101
|
+
[k.LD]: "ld",
|
|
102
|
+
[k.LN]: "ln",
|
|
103
|
+
[k.SG]: "sgpoint",
|
|
104
|
+
[k.GIS_SENSOR]: "gisuhfsensor"
|
|
105
|
+
}, B = {
|
|
103
106
|
CUSTOM_MSG: "CUSTOM_MSG",
|
|
104
107
|
OPEN_CAMERA: "OPEN_CAMERA",
|
|
105
108
|
// 打开摄像机弹窗
|
|
@@ -115,14 +118,14 @@ const va = {
|
|
|
115
118
|
// 通知弹窗
|
|
116
119
|
GIS_PROPS_PANEL: "GIS_PROPS_PANEL"
|
|
117
120
|
// 属性面板
|
|
118
|
-
},
|
|
121
|
+
}, Se = {
|
|
119
122
|
Emit: 7
|
|
120
|
-
},
|
|
123
|
+
}, be = {
|
|
121
124
|
NONE: "none",
|
|
122
125
|
WUJIE: "wujie",
|
|
123
126
|
QIANKUN: "qiankun",
|
|
124
127
|
MICROAPP: "microapp"
|
|
125
|
-
},
|
|
128
|
+
}, S = {
|
|
126
129
|
TEXT: "TEXT",
|
|
127
130
|
// 未特殊定义
|
|
128
131
|
NORMAL: "NORMAL",
|
|
@@ -161,11 +164,11 @@ const va = {
|
|
|
161
164
|
// 光字牌
|
|
162
165
|
VIDEO_STREAM: "VIDEO_STREAM"
|
|
163
166
|
// 视频流
|
|
164
|
-
},
|
|
167
|
+
}, Ze = {
|
|
165
168
|
GRAPH: {
|
|
166
169
|
SOCKET: "GRAPH_SOCKET"
|
|
167
170
|
}
|
|
168
|
-
},
|
|
171
|
+
}, He = {
|
|
169
172
|
AC: {
|
|
170
173
|
ALARM: "ac.channel.alarm",
|
|
171
174
|
// 智辅告警
|
|
@@ -427,165 +430,169 @@ const va = {
|
|
|
427
430
|
// 超声停障
|
|
428
431
|
}
|
|
429
432
|
};
|
|
430
|
-
var
|
|
433
|
+
var Le = {};
|
|
431
434
|
/*!
|
|
432
435
|
* vite-plugin-qiankun.js v1.0.14
|
|
433
436
|
* (c) 2021-2022 Teng Mao Qing
|
|
434
437
|
* Released under the MIT License.
|
|
435
438
|
*/
|
|
436
|
-
Object.defineProperty(
|
|
437
|
-
var
|
|
438
|
-
|
|
439
|
+
Object.defineProperty(Le, "__esModule", { value: !0 });
|
|
440
|
+
var me = typeof window != "undefined" ? window.proxy || window : {}, xt = function(r) {
|
|
441
|
+
me != null && me.__POWERED_BY_QIANKUN__ && (window.moudleQiankunAppLifeCycles || (window.moudleQiankunAppLifeCycles = {}), me.qiankunName && (window.moudleQiankunAppLifeCycles[me.qiankunName] = r));
|
|
439
442
|
};
|
|
440
|
-
|
|
441
|
-
var
|
|
442
|
-
|
|
443
|
-
function
|
|
444
|
-
return window.__POWERED_BY_WUJIE__ || window.$wujie ?
|
|
443
|
+
Le.default = xt;
|
|
444
|
+
var Ve = Le.qiankunWindow = me;
|
|
445
|
+
Le.renderWithQiankun = xt;
|
|
446
|
+
function Pa() {
|
|
447
|
+
return window.__POWERED_BY_WUJIE__ || window.$wujie ? be.WUJIE : window.__POWERED_BY_QIANKUN__ || Ve != null && Ve.__POWERED_BY_QIANKUN__ ? be.QIANKUN : window.__MICRO_APP_ENVIRONMENT__ || window.microApp ? be.MICROAPP : be.NONE;
|
|
445
448
|
}
|
|
446
|
-
const
|
|
447
|
-
|
|
448
|
-
const
|
|
449
|
-
var
|
|
450
|
-
(
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
449
|
+
const Re = "/", Nt = window.meta.app.encrypt;
|
|
450
|
+
Pa();
|
|
451
|
+
const ka = location.protocol === "https:", Oa = location.hostname, Da = ka ? "wss:" : "ws:", La = location.port, Ma = location.origin, et = `${Da}//${location.host}/ws`;
|
|
452
|
+
var lt, ct, dt, ut, mt, ht, ft, pt, At, gt, _t, wt;
|
|
453
|
+
(ct = (lt = window.meta) == null ? void 0 : lt.graph) != null && ct.savePath, (ut = (dt = window.meta) == null ? void 0 : dt.graph) != null && ut.graphPenPath, (ht = (mt = window.meta) == null ? void 0 : mt.graph) != null && ht.templatePath, (pt = (ft = window.meta) == null ? void 0 : ft.graph) != null && pt.graphImgUploadPath, (gt = (At = window.meta) == null ? void 0 : At.graph) != null && gt.threeSavePath, (wt = (_t = window.meta) == null ? void 0 : _t.graph) != null && wt.threeModelPath;
|
|
454
|
+
var vt;
|
|
455
|
+
const R = ea.create({
|
|
456
|
+
baseURL: Ma,
|
|
457
|
+
timeout: ((vt = window.meta.axios) == null ? void 0 : vt.timeout) || 6e4,
|
|
454
458
|
withCredentials: !1,
|
|
455
|
-
paramsSerializer: (r) =>
|
|
459
|
+
paramsSerializer: (r) => Zt.stringify(r)
|
|
456
460
|
});
|
|
457
|
-
|
|
461
|
+
R.interceptors.request.use(
|
|
458
462
|
(r) => (r.headers["x-token"] = "ewoglCJhbGcilDogpc3", r),
|
|
459
463
|
(r) => Promise.reject(r)
|
|
460
464
|
);
|
|
461
|
-
|
|
465
|
+
R.interceptors.response.use(
|
|
462
466
|
(r) => {
|
|
463
467
|
const { data: e } = r;
|
|
464
468
|
return Promise.resolve(e);
|
|
465
469
|
},
|
|
466
470
|
(r) => Promise.reject(r)
|
|
467
471
|
);
|
|
468
|
-
function
|
|
472
|
+
function Fa(r, e = {}, t = {}) {
|
|
469
473
|
return new Promise((a) => {
|
|
470
|
-
|
|
474
|
+
R.get(r, l({ params: e }, t)).then((n) => a({ res: n, err: null })).catch((n) => a({ res: null, err: n }));
|
|
471
475
|
});
|
|
472
476
|
}
|
|
473
|
-
function
|
|
477
|
+
function Ua(r, e = {}, t = {}) {
|
|
474
478
|
return new Promise((a) => {
|
|
475
|
-
|
|
479
|
+
R.post(r, e, t).then((n) => a({ res: n, err: null })).catch((n) => a({ res: null, err: n }));
|
|
476
480
|
});
|
|
477
481
|
}
|
|
478
|
-
function
|
|
479
|
-
return
|
|
482
|
+
function Ga(r, e = {}, t = {}) {
|
|
483
|
+
return R.get(r, l({ params: e }, t));
|
|
480
484
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
485
|
+
function Ha(r, e = {}, t = {}) {
|
|
486
|
+
return R.post(r, e, t);
|
|
483
487
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
488
|
+
function Va(r, e = {}) {
|
|
489
|
+
return R.get(`/filehandle/${r}`, { params: e });
|
|
486
490
|
}
|
|
487
|
-
function
|
|
488
|
-
return
|
|
491
|
+
function Ba(r, e = {}, t = {}) {
|
|
492
|
+
return R.post(`/filehandle/${r}`, e, t);
|
|
489
493
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
494
|
+
function Ka(r, e = {}) {
|
|
495
|
+
return R.get(`/user/${r}`, { params: e });
|
|
492
496
|
}
|
|
493
|
-
function
|
|
494
|
-
return
|
|
497
|
+
function Ya(r, e = {}, t = {}) {
|
|
498
|
+
return R.post(`/user/${r}`, e, t);
|
|
495
499
|
}
|
|
496
|
-
function
|
|
497
|
-
return
|
|
500
|
+
function Wa(r, e = {}) {
|
|
501
|
+
return R.get(`${r}`, e.local ? { params: e, baseURL: Re } : { params: e });
|
|
498
502
|
}
|
|
499
|
-
function
|
|
500
|
-
return
|
|
503
|
+
function $a(r, e = {}) {
|
|
504
|
+
return R.get(`/media/${r}/`, { params: e });
|
|
501
505
|
}
|
|
502
|
-
function
|
|
503
|
-
return
|
|
506
|
+
function ja(r, e = {}, t = {}) {
|
|
507
|
+
return R.post(`/media/${r}/`, e, t);
|
|
504
508
|
}
|
|
505
|
-
function
|
|
506
|
-
return
|
|
509
|
+
function za(r, e = {}) {
|
|
510
|
+
return R.get(
|
|
507
511
|
`/${window.meta.app.isFactory ? window.meta.factory.singo_prefix || "acproxy/common" : "common"}/${r}/`,
|
|
508
512
|
{ params: e }
|
|
509
513
|
);
|
|
510
514
|
}
|
|
511
|
-
function
|
|
512
|
-
return
|
|
515
|
+
function Xa(r, e = {}, t = {}) {
|
|
516
|
+
return R.post(
|
|
513
517
|
`/${window.meta.app.isFactory ? window.meta.factory.singo_prefix || "acproxy/common" : "common"}/${r}/`,
|
|
514
518
|
e,
|
|
515
519
|
t
|
|
516
520
|
);
|
|
517
521
|
}
|
|
518
|
-
function
|
|
519
|
-
return
|
|
522
|
+
function qa(r, e = {}) {
|
|
523
|
+
return R.get(`/history/${r}`, { params: e });
|
|
520
524
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
525
|
+
function Qa(r, e = {}, t = {}) {
|
|
526
|
+
return R.post(`/history/${r}`, e, t);
|
|
523
527
|
}
|
|
524
|
-
function
|
|
525
|
-
return
|
|
528
|
+
function Ja(r, e = {}) {
|
|
529
|
+
return R.get(`/scada/${r}`, { params: e });
|
|
526
530
|
}
|
|
527
|
-
function
|
|
528
|
-
return
|
|
531
|
+
function Za(r, e = {}, t = {}) {
|
|
532
|
+
return R.post(`/scada/${r}`, e, t);
|
|
529
533
|
}
|
|
530
|
-
function
|
|
531
|
-
return
|
|
534
|
+
function en(r, e = {}) {
|
|
535
|
+
return R.get(`/common/factory/${r}`, { params: e });
|
|
532
536
|
}
|
|
533
|
-
function
|
|
534
|
-
return
|
|
537
|
+
function tn(r, e = {}, t = {}) {
|
|
538
|
+
return R.post(`/common/factory/${r}`, e, t);
|
|
535
539
|
}
|
|
536
|
-
function
|
|
537
|
-
return
|
|
540
|
+
function an(r, e = {}) {
|
|
541
|
+
return R.get(`/factory/${r}`, { params: e });
|
|
538
542
|
}
|
|
539
|
-
function
|
|
540
|
-
return
|
|
543
|
+
function nn(r, e = {}, t = {}) {
|
|
544
|
+
return R.post(`/factory/${r}`, e, t);
|
|
541
545
|
}
|
|
542
|
-
function
|
|
543
|
-
return
|
|
546
|
+
function rn(r, e = {}) {
|
|
547
|
+
return R.get(`/pd/${r}`, { params: e });
|
|
544
548
|
}
|
|
545
|
-
function
|
|
546
|
-
return
|
|
549
|
+
function on(r, e = {}, t = {}) {
|
|
550
|
+
return R.post(`/pd/${r}`, e, t);
|
|
547
551
|
}
|
|
548
552
|
const le = {
|
|
549
|
-
getApi:
|
|
550
|
-
postApi:
|
|
551
|
-
getFileApi:
|
|
552
|
-
postFileApi:
|
|
553
|
-
getBaseApi:
|
|
554
|
-
postBaseApi:
|
|
555
|
-
getUserApi:
|
|
556
|
-
postUserApi:
|
|
557
|
-
getGraphApi:
|
|
558
|
-
getMediaApi:
|
|
559
|
-
postMediaApi:
|
|
560
|
-
getScadaApi:
|
|
561
|
-
postScadaApi:
|
|
562
|
-
getCommonApi:
|
|
563
|
-
postCommonApi:
|
|
564
|
-
getHistoryApi:
|
|
565
|
-
postHistoryApi:
|
|
566
|
-
getFactoryApi:
|
|
567
|
-
postFactoryApi:
|
|
568
|
-
getCommonFactoryApi:
|
|
569
|
-
postCommonFactoryApi:
|
|
570
|
-
getPDApi:
|
|
571
|
-
postPDApi:
|
|
572
|
-
},
|
|
573
|
-
function
|
|
553
|
+
getApi: Fa,
|
|
554
|
+
postApi: Ua,
|
|
555
|
+
getFileApi: Va,
|
|
556
|
+
postFileApi: Ba,
|
|
557
|
+
getBaseApi: Ga,
|
|
558
|
+
postBaseApi: Ha,
|
|
559
|
+
getUserApi: Ka,
|
|
560
|
+
postUserApi: Ya,
|
|
561
|
+
getGraphApi: Wa,
|
|
562
|
+
getMediaApi: $a,
|
|
563
|
+
postMediaApi: ja,
|
|
564
|
+
getScadaApi: Ja,
|
|
565
|
+
postScadaApi: Za,
|
|
566
|
+
getCommonApi: za,
|
|
567
|
+
postCommonApi: Xa,
|
|
568
|
+
getHistoryApi: qa,
|
|
569
|
+
postHistoryApi: Qa,
|
|
570
|
+
getFactoryApi: an,
|
|
571
|
+
postFactoryApi: nn,
|
|
572
|
+
getCommonFactoryApi: en,
|
|
573
|
+
postCommonFactoryApi: tn,
|
|
574
|
+
getPDApi: rn,
|
|
575
|
+
postPDApi: on
|
|
576
|
+
}, je = ta(), sn = [65535, -99999];
|
|
577
|
+
function Be(r) {
|
|
574
578
|
if (typeof r != "string") return !1;
|
|
575
579
|
const e = /^-?\d+(\.\d+)?$/;
|
|
576
580
|
return r.trim() !== "" && e.test(r.trim());
|
|
577
581
|
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
582
|
+
function ze(r) {
|
|
583
|
+
return !["null", "undefined"].includes(r) && r !== void 0 && r !== null && r !== "";
|
|
580
584
|
}
|
|
581
|
-
|
|
585
|
+
function Ce(r) {
|
|
586
|
+
return typeof r == "number" && !sn.includes(r);
|
|
587
|
+
}
|
|
588
|
+
const tt = () => {
|
|
582
589
|
var a;
|
|
583
590
|
const r = {}, e = ((a = window.location.href.split("?")) == null ? void 0 : a[1]) || "", t = new URLSearchParams(e);
|
|
584
591
|
for (const [n, o] of t.entries())
|
|
585
592
|
r[n] = o;
|
|
586
593
|
return r;
|
|
587
594
|
};
|
|
588
|
-
function
|
|
595
|
+
function Ke(r) {
|
|
589
596
|
return Object.prototype.toString.call(r).slice(8, -1);
|
|
590
597
|
}
|
|
591
598
|
(function() {
|
|
@@ -602,7 +609,7 @@ function Xe(r) {
|
|
|
602
609
|
};
|
|
603
610
|
}
|
|
604
611
|
})();
|
|
605
|
-
function
|
|
612
|
+
function ln() {
|
|
606
613
|
var r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = [
|
|
607
614
|
-1,
|
|
608
615
|
-1,
|
|
@@ -734,52 +741,52 @@ function en() {
|
|
|
734
741
|
-1
|
|
735
742
|
];
|
|
736
743
|
this.encode = function(t) {
|
|
737
|
-
var a, n, o, i,
|
|
744
|
+
var a, n, o, i, h, w;
|
|
738
745
|
for (o = t.length, n = 0, a = ""; n < o; ) {
|
|
739
746
|
if (i = t.charCodeAt(n++) & 255, n == o) {
|
|
740
747
|
a += r.charAt(i >> 2), a += r.charAt((i & 3) << 4), a += "==";
|
|
741
748
|
break;
|
|
742
749
|
}
|
|
743
|
-
if (
|
|
744
|
-
a += r.charAt(i >> 2), a += r.charAt((i & 3) << 4 | (
|
|
750
|
+
if (h = t.charCodeAt(n++), n == o) {
|
|
751
|
+
a += r.charAt(i >> 2), a += r.charAt((i & 3) << 4 | (h & 240) >> 4), a += r.charAt((h & 15) << 2), a += "=";
|
|
745
752
|
break;
|
|
746
753
|
}
|
|
747
|
-
w = t.charCodeAt(n++), a += r.charAt(i >> 2), a += r.charAt((i & 3) << 4 | (
|
|
754
|
+
w = t.charCodeAt(n++), a += r.charAt(i >> 2), a += r.charAt((i & 3) << 4 | (h & 240) >> 4), a += r.charAt((h & 15) << 2 | (w & 192) >> 6), a += r.charAt(w & 63);
|
|
748
755
|
}
|
|
749
756
|
return a;
|
|
750
757
|
}, this.decode = function(t) {
|
|
751
|
-
var a, n, o, i,
|
|
752
|
-
for (w = t.length,
|
|
758
|
+
var a, n, o, i, h, w, b;
|
|
759
|
+
for (w = t.length, h = 0, b = ""; h < w; ) {
|
|
753
760
|
do
|
|
754
|
-
a = e[t.charCodeAt(
|
|
755
|
-
while (
|
|
761
|
+
a = e[t.charCodeAt(h++) & 255];
|
|
762
|
+
while (h < w && a == -1);
|
|
756
763
|
if (a == -1) break;
|
|
757
764
|
do
|
|
758
|
-
n = e[t.charCodeAt(
|
|
759
|
-
while (
|
|
765
|
+
n = e[t.charCodeAt(h++) & 255];
|
|
766
|
+
while (h < w && n == -1);
|
|
760
767
|
if (n == -1) break;
|
|
761
|
-
|
|
768
|
+
b += String.fromCharCode(a << 2 | (n & 48) >> 4);
|
|
762
769
|
do {
|
|
763
|
-
if (o = t.charCodeAt(
|
|
770
|
+
if (o = t.charCodeAt(h++) & 255, o == 61) return b;
|
|
764
771
|
o = e[o];
|
|
765
|
-
} while (
|
|
772
|
+
} while (h < w && o == -1);
|
|
766
773
|
if (o == -1) break;
|
|
767
|
-
|
|
774
|
+
b += String.fromCharCode((n & 15) << 4 | (o & 60) >> 2);
|
|
768
775
|
do {
|
|
769
|
-
if (i = t.charCodeAt(
|
|
776
|
+
if (i = t.charCodeAt(h++) & 255, i == 61) return b;
|
|
770
777
|
i = e[i];
|
|
771
|
-
} while (
|
|
778
|
+
} while (h < w && i == -1);
|
|
772
779
|
if (i == -1) break;
|
|
773
|
-
|
|
780
|
+
b += String.fromCharCode((o & 3) << 6 | i);
|
|
774
781
|
}
|
|
775
|
-
return
|
|
782
|
+
return b;
|
|
776
783
|
}, this.utf16to8 = function(t) {
|
|
777
784
|
var a, n, o, i;
|
|
778
785
|
for (a = "", o = t.length, n = 0; n < o; n++)
|
|
779
786
|
i = t.charCodeAt(n), i >= 1 && i <= 127 ? a += t.charAt(n) : i > 2047 ? (a += String.fromCharCode(224 | i >> 12 & 15), a += String.fromCharCode(128 | i >> 6 & 63), a += String.fromCharCode(128 | i >> 0 & 63)) : (a += String.fromCharCode(192 | i >> 6 & 31), a += String.fromCharCode(128 | i >> 0 & 63));
|
|
780
787
|
return a;
|
|
781
788
|
}, this.utf8to16 = function(t) {
|
|
782
|
-
var a, n, o, i,
|
|
789
|
+
var a, n, o, i, h, w;
|
|
783
790
|
for (a = "", o = t.length, n = 0; n < o; )
|
|
784
791
|
switch (i = t.charCodeAt(n++), i >> 4) {
|
|
785
792
|
case 0:
|
|
@@ -794,10 +801,10 @@ function en() {
|
|
|
794
801
|
break;
|
|
795
802
|
case 12:
|
|
796
803
|
case 13:
|
|
797
|
-
|
|
804
|
+
h = t.charCodeAt(n++), a += String.fromCharCode((i & 31) << 6 | h & 63);
|
|
798
805
|
break;
|
|
799
806
|
case 14:
|
|
800
|
-
|
|
807
|
+
h = t.charCodeAt(n++), w = t.charCodeAt(n++), a += String.fromCharCode((i & 15) << 12 | (h & 63) << 6 | (w & 63) << 0);
|
|
801
808
|
break;
|
|
802
809
|
}
|
|
803
810
|
return a;
|
|
@@ -809,7 +816,7 @@ function en() {
|
|
|
809
816
|
return a;
|
|
810
817
|
};
|
|
811
818
|
}
|
|
812
|
-
function
|
|
819
|
+
function cn() {
|
|
813
820
|
var r = 0, e = new Object();
|
|
814
821
|
this.add = function(t, a) {
|
|
815
822
|
this.containsKey(t) || r++, e[t] = a;
|
|
@@ -840,8 +847,8 @@ function tn() {
|
|
|
840
847
|
r = 0, e = new Object();
|
|
841
848
|
};
|
|
842
849
|
}
|
|
843
|
-
function
|
|
844
|
-
if (this.connect = !1, this.ready_func_ = null, this.callbacks_ = new
|
|
850
|
+
function dn(r) {
|
|
851
|
+
if (this.connect = !1, this.ready_func_ = null, this.callbacks_ = new cn(), this.module_ = "JS_IActiveXCtrl", "WebSocket" in window)
|
|
845
852
|
this.ws = new WebSocket("ws://127.0.0.1:7321");
|
|
846
853
|
else
|
|
847
854
|
throw "WebSocket not supported";
|
|
@@ -995,21 +1002,21 @@ function an(r) {
|
|
|
995
1002
|
this.exec("Arm_Seed", [parseInt(e), a, t], n);
|
|
996
1003
|
}, this.Arm_LimitSeedCount = function({ Handle: e, SeedCount: t }, a) {
|
|
997
1004
|
this.exec("Arm_LimitSeedCount", [parseInt(e), parseInt(t)], a);
|
|
998
|
-
}, this.Arm_GenMotherKey = function({ Handle: e, SeedLen: t, SeedForPID: a, SonCount: n, StartUserID: o, AdminTryCount: i, UserPin:
|
|
1005
|
+
}, this.Arm_GenMotherKey = function({ Handle: e, SeedLen: t, SeedForPID: a, SonCount: n, StartUserID: o, AdminTryCount: i, UserPin: h, UserTryCount: w, UpdateRSAPriKey: b }, ae) {
|
|
999
1006
|
this.exec(
|
|
1000
1007
|
"Arm_GenMotherKey",
|
|
1001
1008
|
[
|
|
1002
1009
|
parseInt(e),
|
|
1003
1010
|
parseInt(t),
|
|
1004
1011
|
a,
|
|
1005
|
-
|
|
1012
|
+
h,
|
|
1006
1013
|
parseInt(w),
|
|
1007
1014
|
parseInt(i),
|
|
1008
|
-
|
|
1015
|
+
b,
|
|
1009
1016
|
parseInt(o),
|
|
1010
1017
|
parseInt(n)
|
|
1011
1018
|
],
|
|
1012
|
-
|
|
1019
|
+
ae
|
|
1013
1020
|
);
|
|
1014
1021
|
}, this.Arm_RequestInit = function({ Handle: e }, t) {
|
|
1015
1022
|
this.exec("Arm_RequestInit", [parseInt(e)], t);
|
|
@@ -1019,7 +1026,7 @@ function an(r) {
|
|
|
1019
1026
|
this.exec("Arm_InitSon", [parseInt(e), t], a);
|
|
1020
1027
|
}, this.Arm_SetUpdatePriKey = function({ Handle: e, UpdatePriKey: t }, a) {
|
|
1021
1028
|
this.exec("Arm_SetUpdatePriKey", [parseInt(e), t], a);
|
|
1022
|
-
}, this.Arm_MakeUpdatePacket = function({ Handle: e, HID: t, Func: a, FileID: n, FileType: o, Offset: i, DataLen:
|
|
1029
|
+
}, this.Arm_MakeUpdatePacket = function({ Handle: e, HID: t, Func: a, FileID: n, FileType: o, Offset: i, DataLen: h, DataBuffer: w, UpRSAPubKey: b }, ae) {
|
|
1023
1030
|
this.exec(
|
|
1024
1031
|
"Arm_MakeUpdatePacket",
|
|
1025
1032
|
[
|
|
@@ -1030,26 +1037,26 @@ function an(r) {
|
|
|
1030
1037
|
parseInt(n),
|
|
1031
1038
|
parseInt(i),
|
|
1032
1039
|
w,
|
|
1033
|
-
|
|
1034
|
-
parseInt(
|
|
1040
|
+
b,
|
|
1041
|
+
parseInt(h)
|
|
1035
1042
|
],
|
|
1036
|
-
|
|
1043
|
+
ae
|
|
1037
1044
|
);
|
|
1038
|
-
}, this.Arm_MakeUpdatePacketFromMother = function({ Handle: e, HID: t, Func: a, FileID: n, FileType: o, Offset: i, DataLen:
|
|
1045
|
+
}, this.Arm_MakeUpdatePacketFromMother = function({ Handle: e, HID: t, Func: a, FileID: n, FileType: o, Offset: i, DataLen: h, DataBuffer: w }, b) {
|
|
1039
1046
|
this.exec(
|
|
1040
1047
|
"Arm_MakeUpdatePacketFromMother",
|
|
1041
|
-
[parseInt(e), t, a, o, parseInt(n), parseInt(i), w, parseInt(
|
|
1042
|
-
|
|
1048
|
+
[parseInt(e), t, a, o, parseInt(n), parseInt(i), w, parseInt(h)],
|
|
1049
|
+
b
|
|
1043
1050
|
);
|
|
1044
1051
|
}, this.Arm_Update = function({ Handle: e, UpdateData: t }, a) {
|
|
1045
1052
|
this.exec("Arm_Update", [parseInt(e), t], a);
|
|
1046
1053
|
}, this.Arm_Set_DATA_FILE_ATTR = function({ Size: e, ReadPriv: t, WritePriv: a }, n) {
|
|
1047
1054
|
this.exec("Arm_Set_DATA_FILE_ATTR", [parseInt(e), parseInt(t), parseInt(a)], n);
|
|
1048
|
-
}, this.Arm_Set_PRIKEY_FILE_ATTR = function({ Count: e, Size: t, Type: a, Priv: n, IsReset: o, IsDecOnRAM: i },
|
|
1055
|
+
}, this.Arm_Set_PRIKEY_FILE_ATTR = function({ Count: e, Size: t, Type: a, Priv: n, IsReset: o, IsDecOnRAM: i }, h) {
|
|
1049
1056
|
this.exec(
|
|
1050
1057
|
"Arm_Set_PRIKEY_FILE_ATTR",
|
|
1051
1058
|
[a, parseInt(t), parseInt(e), parseInt(n), parseInt(i), parseInt(o)],
|
|
1052
|
-
|
|
1059
|
+
h
|
|
1053
1060
|
);
|
|
1054
1061
|
}, this.Arm_Set_KEY_FILE_ATTR = function({ Size: e, PrivEnc: t }, a) {
|
|
1055
1062
|
this.exec("Arm_Set_KEY_FILE_ATTR", [parseInt(e), parseInt(t)], a);
|
|
@@ -1077,33 +1084,33 @@ function an(r) {
|
|
|
1077
1084
|
this.exec("Arm_Clear_EXE_FILE_INFO", [e], t);
|
|
1078
1085
|
};
|
|
1079
1086
|
}
|
|
1080
|
-
const
|
|
1087
|
+
const un = {
|
|
1081
1088
|
HID: 0
|
|
1082
|
-
},
|
|
1089
|
+
}, xe = {
|
|
1083
1090
|
PRODUCT_ID: 0,
|
|
1084
1091
|
// 产品ID
|
|
1085
1092
|
USER_ID: 1,
|
|
1086
1093
|
// 用户ID
|
|
1087
1094
|
HARDWARE_ID: 2
|
|
1088
1095
|
// 硬件ID
|
|
1089
|
-
},
|
|
1096
|
+
}, at = {
|
|
1090
1097
|
USER: 0
|
|
1091
1098
|
// 普通用户
|
|
1092
1099
|
};
|
|
1093
|
-
class
|
|
1100
|
+
class Rt {
|
|
1094
1101
|
// 加密随机数
|
|
1095
1102
|
constructor() {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1103
|
+
ne(this, "Base64", new ln());
|
|
1104
|
+
ne(this, "AtlCtrl", null);
|
|
1105
|
+
ne(this, "ArmCount", 0);
|
|
1099
1106
|
// 加密锁数量
|
|
1100
|
-
|
|
1107
|
+
ne(this, "ArmIndex", 0);
|
|
1101
1108
|
// 加密锁索引
|
|
1102
|
-
|
|
1109
|
+
ne(this, "ArmHandle", 0);
|
|
1103
1110
|
// 加密锁句柄
|
|
1104
|
-
|
|
1111
|
+
ne(this, "ArmRandom", "");
|
|
1105
1112
|
try {
|
|
1106
|
-
this.AtlCtrl = new
|
|
1113
|
+
this.AtlCtrl = new dn("{39E9B272-82A7-4177-A19D-6723C1BDB0CC}");
|
|
1107
1114
|
} catch (e) {
|
|
1108
1115
|
console.error(e), this.AtlCtrl = null;
|
|
1109
1116
|
}
|
|
@@ -1136,11 +1143,11 @@ class yt {
|
|
|
1136
1143
|
});
|
|
1137
1144
|
}
|
|
1138
1145
|
// 修改用户PIN码
|
|
1139
|
-
armChangePIN(e, t, a = 255, n =
|
|
1146
|
+
armChangePIN(e, t, a = 255, n = at.USER, o = this.ArmHandle) {
|
|
1140
1147
|
if (this.AtlCtrl)
|
|
1141
|
-
return new Promise((i,
|
|
1142
|
-
this.AtlCtrl.Arm_ChangePIN({ Handle: o, NewPIN: e, OldPIN: t, TryCount: a, PinFlag: n }, (w,
|
|
1143
|
-
w &&
|
|
1148
|
+
return new Promise((i, h) => {
|
|
1149
|
+
this.AtlCtrl.Arm_ChangePIN({ Handle: o, NewPIN: e, OldPIN: t, TryCount: a, PinFlag: n }, (w, b) => {
|
|
1150
|
+
w && b == 0 ? (this.ArmPin = e, i(b)) : h(b);
|
|
1144
1151
|
});
|
|
1145
1152
|
});
|
|
1146
1153
|
}
|
|
@@ -1172,19 +1179,19 @@ class yt {
|
|
|
1172
1179
|
});
|
|
1173
1180
|
}
|
|
1174
1181
|
// 读取加密锁信息(产品ID/用户ID/硬件ID)
|
|
1175
|
-
armGetDongleInfo(e = 0, t =
|
|
1182
|
+
armGetDongleInfo(e = 0, t = xe.HARDWARE_ID) {
|
|
1176
1183
|
if (this.AtlCtrl)
|
|
1177
1184
|
return this.ArmIndex = e, new Promise((a, n) => {
|
|
1178
1185
|
this.AtlCtrl.Arm_GetDongleInfo({ Index: e, DongleInfoNum: t }, (o, i) => {
|
|
1179
1186
|
if (o) {
|
|
1180
1187
|
switch (t) {
|
|
1181
|
-
case
|
|
1188
|
+
case xe.USER_ID:
|
|
1182
1189
|
this.ArmUid = i;
|
|
1183
1190
|
break;
|
|
1184
|
-
case
|
|
1191
|
+
case xe.PRODUCT_ID:
|
|
1185
1192
|
this.ArmPid = i;
|
|
1186
1193
|
break;
|
|
1187
|
-
case
|
|
1194
|
+
case xe.HARDWARE_ID:
|
|
1188
1195
|
this.ArmHid = i;
|
|
1189
1196
|
break;
|
|
1190
1197
|
}
|
|
@@ -1220,8 +1227,8 @@ class yt {
|
|
|
1220
1227
|
if (o && i.length > 0)
|
|
1221
1228
|
try {
|
|
1222
1229
|
i = this.Base64.decode(i), a(i);
|
|
1223
|
-
} catch (
|
|
1224
|
-
console.error(
|
|
1230
|
+
} catch (h) {
|
|
1231
|
+
console.error(h), a(i);
|
|
1225
1232
|
}
|
|
1226
1233
|
else
|
|
1227
1234
|
n(i);
|
|
@@ -1265,7 +1272,7 @@ class yt {
|
|
|
1265
1272
|
});
|
|
1266
1273
|
}
|
|
1267
1274
|
// 切换通讯协议
|
|
1268
|
-
armSwitchProtocol(e =
|
|
1275
|
+
armSwitchProtocol(e = un.HID, t = this.ArmHandle) {
|
|
1269
1276
|
if (this.AtlCtrl)
|
|
1270
1277
|
return new Promise((a, n) => {
|
|
1271
1278
|
this.AtlCtrl.Arm_SwitchProtocol({ Handle: t, ProtocolFlag: e }, (o, i) => {
|
|
@@ -1274,11 +1281,11 @@ class yt {
|
|
|
1274
1281
|
});
|
|
1275
1282
|
}
|
|
1276
1283
|
// 验证加密锁PIN码
|
|
1277
|
-
armVerifyPIN(e, t =
|
|
1284
|
+
armVerifyPIN(e, t = at.USER, a = this.ArmHandle) {
|
|
1278
1285
|
if (this.AtlCtrl)
|
|
1279
1286
|
return new Promise((n, o) => {
|
|
1280
|
-
this.AtlCtrl.Arm_VerifyPIN({ Handle: a, UserPin: e, UserType: t }, (i,
|
|
1281
|
-
i &&
|
|
1287
|
+
this.AtlCtrl.Arm_VerifyPIN({ Handle: a, UserPin: e, UserType: t }, (i, h) => {
|
|
1288
|
+
i && h == 0 ? (this.ArmPin = e, n(h)) : o(h);
|
|
1282
1289
|
});
|
|
1283
1290
|
});
|
|
1284
1291
|
}
|
|
@@ -1286,8 +1293,8 @@ class yt {
|
|
|
1286
1293
|
armReadData(e = 0, t = 128, a = this.ArmHandle) {
|
|
1287
1294
|
if (this.AtlCtrl)
|
|
1288
1295
|
return new Promise((n, o) => {
|
|
1289
|
-
this.AtlCtrl.Arm_ReadData({ Handle: a, Offset: e, ReadLength: t }, (i,
|
|
1290
|
-
i ? (this.ArmData =
|
|
1296
|
+
this.AtlCtrl.Arm_ReadData({ Handle: a, Offset: e, ReadLength: t }, (i, h) => {
|
|
1297
|
+
i ? (this.ArmData = h, n(h)) : o(h);
|
|
1291
1298
|
});
|
|
1292
1299
|
});
|
|
1293
1300
|
}
|
|
@@ -1295,8 +1302,8 @@ class yt {
|
|
|
1295
1302
|
armWriteData(e, t = 0, a = this.ArmHandle) {
|
|
1296
1303
|
if (this.AtlCtrl)
|
|
1297
1304
|
return new Promise((n, o) => {
|
|
1298
|
-
this.AtlCtrl.Arm_WriteData({ Handle: a, Offset: t, DataInput: e }, (i,
|
|
1299
|
-
i &&
|
|
1305
|
+
this.AtlCtrl.Arm_WriteData({ Handle: a, Offset: t, DataInput: e }, (i, h) => {
|
|
1306
|
+
i && h == 0 ? n(h) : o(h);
|
|
1300
1307
|
});
|
|
1301
1308
|
});
|
|
1302
1309
|
}
|
|
@@ -1319,18 +1326,18 @@ class yt {
|
|
|
1319
1326
|
});
|
|
1320
1327
|
}
|
|
1321
1328
|
}
|
|
1322
|
-
const
|
|
1323
|
-
let
|
|
1324
|
-
function
|
|
1329
|
+
const Pt = "0123456789abcdeffedcba9876543210", kt = "4b0de988570c3a0f", mn = window.ENCRYPT;
|
|
1330
|
+
let fe = mn && new Rt();
|
|
1331
|
+
function Ot(r = 16, e = "0123456789abcdefghijklmnopqrstuvwxyz") {
|
|
1325
1332
|
let t = "", a = e.length;
|
|
1326
1333
|
for (; r > 0; )
|
|
1327
1334
|
t += e[Math.floor(Math.random() * a)], r--;
|
|
1328
1335
|
return t;
|
|
1329
1336
|
}
|
|
1330
|
-
function
|
|
1337
|
+
function Dt() {
|
|
1331
1338
|
return Y(this, null, function* () {
|
|
1332
|
-
return
|
|
1333
|
-
|
|
1339
|
+
return fe || (fe = new Rt()), new Promise((r, e) => {
|
|
1340
|
+
fe.armEnum().then((t) => {
|
|
1334
1341
|
r(+t);
|
|
1335
1342
|
}).catch((t) => {
|
|
1336
1343
|
W({
|
|
@@ -1341,16 +1348,16 @@ function Ct() {
|
|
|
1341
1348
|
});
|
|
1342
1349
|
});
|
|
1343
1350
|
}
|
|
1344
|
-
|
|
1351
|
+
Ct(
|
|
1345
1352
|
() => Y(void 0, null, function* () {
|
|
1346
|
-
const r = yield
|
|
1353
|
+
const r = yield Dt(), e = {};
|
|
1347
1354
|
if (typeof r != "number" || r <= 0)
|
|
1348
1355
|
W({
|
|
1349
1356
|
type: "warning",
|
|
1350
1357
|
ElMessage: "未找到U盘锁,请检查U盘锁!"
|
|
1351
1358
|
}), e.resetToken();
|
|
1352
1359
|
else {
|
|
1353
|
-
const t = yield
|
|
1360
|
+
const t = yield fn();
|
|
1354
1361
|
if (!e.token) return;
|
|
1355
1362
|
t.length ? t.includes(e.ukeyHid) || (W({
|
|
1356
1363
|
type: "error",
|
|
@@ -1364,10 +1371,10 @@ Et(
|
|
|
1364
1371
|
5e3,
|
|
1365
1372
|
{ trailing: !1 }
|
|
1366
1373
|
);
|
|
1367
|
-
function
|
|
1374
|
+
function hn(r = 0) {
|
|
1368
1375
|
return Y(this, null, function* () {
|
|
1369
|
-
return
|
|
1370
|
-
|
|
1376
|
+
return fe ? new Promise((e, t) => {
|
|
1377
|
+
fe.armGetDongleInfo(r).then((a) => {
|
|
1371
1378
|
a ? e(a) : (W({
|
|
1372
1379
|
type: "warning",
|
|
1373
1380
|
ElMessage: "U盘锁信息为空,请检查U盘锁!"
|
|
@@ -1381,34 +1388,34 @@ function on(r = 0) {
|
|
|
1381
1388
|
});
|
|
1382
1389
|
});
|
|
1383
1390
|
}
|
|
1384
|
-
function
|
|
1391
|
+
function fn() {
|
|
1385
1392
|
return Y(this, null, function* () {
|
|
1386
|
-
if (!
|
|
1393
|
+
if (!fe)
|
|
1387
1394
|
return W({
|
|
1388
1395
|
type: "warning",
|
|
1389
1396
|
ElMessage: "未找到U盘锁程序,请检查后台程序!"
|
|
1390
1397
|
});
|
|
1391
|
-
const r = yield
|
|
1398
|
+
const r = yield Dt();
|
|
1392
1399
|
let e = [];
|
|
1393
1400
|
for (let t = 0; t < r; t++) {
|
|
1394
|
-
const a = yield
|
|
1401
|
+
const a = yield hn(t);
|
|
1395
1402
|
e.push(a);
|
|
1396
1403
|
}
|
|
1397
1404
|
return e;
|
|
1398
1405
|
});
|
|
1399
1406
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
const
|
|
1403
|
-
function
|
|
1404
|
-
const a =
|
|
1405
|
-
t = n ===
|
|
1407
|
+
Ot(16);
|
|
1408
|
+
Ot(16);
|
|
1409
|
+
const Lt = window.meta.app.inspect ? pe.constants.CBC : pe.constants.ECB, { publicKey: ur, privateKey: mr } = na.generateKeyPair();
|
|
1410
|
+
function pn(r, e, t = {}) {
|
|
1411
|
+
const a = Mt(kt), n = t.mode || Lt;
|
|
1412
|
+
t = n === pe.constants.ECB ? l({
|
|
1406
1413
|
mode: n,
|
|
1407
1414
|
// ECB
|
|
1408
1415
|
inputEncoding: "utf8",
|
|
1409
1416
|
outputEncoding: "hex"
|
|
1410
1417
|
}, t) : l({
|
|
1411
|
-
iv:
|
|
1418
|
+
iv: Pt,
|
|
1412
1419
|
mode: n,
|
|
1413
1420
|
// ECB
|
|
1414
1421
|
inputEncoding: "utf8",
|
|
@@ -1416,47 +1423,63 @@ function Qe(r, e, t = {}) {
|
|
|
1416
1423
|
}, t);
|
|
1417
1424
|
let o = "";
|
|
1418
1425
|
try {
|
|
1419
|
-
o =
|
|
1426
|
+
o = pe.encrypt(r, a, t);
|
|
1420
1427
|
} catch (i) {
|
|
1421
1428
|
console.log("err: ", i);
|
|
1422
1429
|
}
|
|
1423
1430
|
return o;
|
|
1424
1431
|
}
|
|
1425
|
-
function
|
|
1426
|
-
const a =
|
|
1427
|
-
return t = n ===
|
|
1432
|
+
function An(r, e, t = {}) {
|
|
1433
|
+
const a = Mt(kt), n = t.mode || Lt;
|
|
1434
|
+
return t = n === pe.constants.ECB ? l({
|
|
1428
1435
|
mode: n,
|
|
1429
1436
|
inputEncoding: "hex",
|
|
1430
1437
|
outputEncoding: "utf8"
|
|
1431
1438
|
}, t) : l({
|
|
1432
|
-
iv:
|
|
1439
|
+
iv: Pt,
|
|
1433
1440
|
mode: n,
|
|
1434
1441
|
inputEncoding: "hex",
|
|
1435
1442
|
outputEncoding: "utf8"
|
|
1436
|
-
}, t),
|
|
1443
|
+
}, t), pe.decrypt(r, a, t);
|
|
1437
1444
|
}
|
|
1438
|
-
function
|
|
1445
|
+
function Mt(r) {
|
|
1439
1446
|
return [...r].map((e) => e.charCodeAt().toString(16)).join("");
|
|
1440
1447
|
}
|
|
1441
|
-
|
|
1448
|
+
function Ne(r) {
|
|
1449
|
+
return r = Nt && ze(r) ? An(r) : r, ze(r) ? JSON.parse(r) : r;
|
|
1450
|
+
}
|
|
1451
|
+
function nt(r) {
|
|
1452
|
+
return r = Nt && ze(r) ? pn(r) : r, JSON.stringify(r);
|
|
1453
|
+
}
|
|
1454
|
+
function ue(r, e, t, a) {
|
|
1455
|
+
const n = new StorageEvent("storage", {
|
|
1456
|
+
url: window.location.href,
|
|
1457
|
+
key: r,
|
|
1458
|
+
oldValue: e,
|
|
1459
|
+
newValue: t,
|
|
1460
|
+
storageArea: a
|
|
1461
|
+
});
|
|
1462
|
+
window.dispatchEvent(n);
|
|
1463
|
+
}
|
|
1464
|
+
const rt = {
|
|
1442
1465
|
getLocal: (r) => {
|
|
1443
1466
|
try {
|
|
1444
|
-
|
|
1445
|
-
return
|
|
1467
|
+
const e = window.localStorage.getItem(r);
|
|
1468
|
+
return Ne(e);
|
|
1446
1469
|
} catch (e) {
|
|
1447
1470
|
console.error(e);
|
|
1448
1471
|
}
|
|
1449
1472
|
},
|
|
1450
1473
|
setLocal: (r, e) => {
|
|
1451
1474
|
try {
|
|
1452
|
-
|
|
1453
|
-
|
|
1475
|
+
const t = window.localStorage.getItem(r), a = nt(e);
|
|
1476
|
+
window.localStorage.setItem(r, a), ue(r, t, a, window.localStorage);
|
|
1454
1477
|
} catch (t) {
|
|
1455
1478
|
console.error(t);
|
|
1456
1479
|
}
|
|
1457
1480
|
},
|
|
1458
1481
|
eachLocal: (r) => {
|
|
1459
|
-
if (!r ||
|
|
1482
|
+
if (!r || Ke(r) !== "Function")
|
|
1460
1483
|
return console.error("传递参数非函数类型!");
|
|
1461
1484
|
for (let e = 0, t = window.localStorage.length; e < t; e++) {
|
|
1462
1485
|
const a = window.localStorage.key(e);
|
|
@@ -1464,29 +1487,30 @@ const Ze = {
|
|
|
1464
1487
|
}
|
|
1465
1488
|
},
|
|
1466
1489
|
clearLocal: () => {
|
|
1467
|
-
window.localStorage.clear();
|
|
1490
|
+
window.localStorage.clear(), ue(null, null, null, window.localStorage);
|
|
1468
1491
|
},
|
|
1469
1492
|
removeLocal: (r) => {
|
|
1470
|
-
window.localStorage.
|
|
1493
|
+
const e = window.localStorage.getItem(r);
|
|
1494
|
+
window.localStorage.removeItem(r), ue(r, e, null, window.localStorage);
|
|
1471
1495
|
},
|
|
1472
1496
|
getSession: (r) => {
|
|
1473
1497
|
try {
|
|
1474
|
-
|
|
1475
|
-
return
|
|
1498
|
+
const e = window.sessionStorage.getItem(r);
|
|
1499
|
+
return Ne(e);
|
|
1476
1500
|
} catch (e) {
|
|
1477
1501
|
console.error(e);
|
|
1478
1502
|
}
|
|
1479
1503
|
},
|
|
1480
1504
|
setSession: (r, e) => {
|
|
1481
1505
|
try {
|
|
1482
|
-
|
|
1483
|
-
|
|
1506
|
+
const t = window.sessionStorage.getItem(r), a = nt(e);
|
|
1507
|
+
window.sessionStorage.setItem(r, a), ue(r, t, a, window.sessionStorage);
|
|
1484
1508
|
} catch (t) {
|
|
1485
1509
|
console.error(t);
|
|
1486
1510
|
}
|
|
1487
1511
|
},
|
|
1488
1512
|
eachSession: (r) => {
|
|
1489
|
-
if (!r ||
|
|
1513
|
+
if (!r || Ke(r) !== "Function")
|
|
1490
1514
|
return console.error("传递参数非函数类型!");
|
|
1491
1515
|
for (let e = 0, t = window.sessionStorage.length; e < t; e++) {
|
|
1492
1516
|
const a = window.sessionStorage.key(e);
|
|
@@ -1494,28 +1518,46 @@ const Ze = {
|
|
|
1494
1518
|
}
|
|
1495
1519
|
},
|
|
1496
1520
|
clearSession: () => {
|
|
1497
|
-
window.sessionStorage.clear();
|
|
1521
|
+
window.sessionStorage.clear(), ue(null, null, null, window.sessionStorage);
|
|
1498
1522
|
},
|
|
1499
1523
|
removeSession: (r) => {
|
|
1500
|
-
window.sessionStorage.
|
|
1524
|
+
const e = window.sessionStorage.getItem(r);
|
|
1525
|
+
window.sessionStorage.removeItem(r), ue(r, e, null, window.sessionStorage);
|
|
1526
|
+
},
|
|
1527
|
+
// 监听storage变化
|
|
1528
|
+
onStorageChange: (r) => {
|
|
1529
|
+
if (!r || Ke(r) !== "Function")
|
|
1530
|
+
return console.error("传递参数非函数类型!");
|
|
1531
|
+
const e = (t) => {
|
|
1532
|
+
r({
|
|
1533
|
+
url: t.url,
|
|
1534
|
+
key: t.key,
|
|
1535
|
+
newValue: t.newValue ? Ne(t.newValue) : null,
|
|
1536
|
+
oldValue: t.oldValue ? Ne(t.oldValue) : null,
|
|
1537
|
+
storageArea: t.storageArea
|
|
1538
|
+
});
|
|
1539
|
+
};
|
|
1540
|
+
return window.addEventListener("storage", e), () => {
|
|
1541
|
+
window.removeEventListener("storage", e);
|
|
1542
|
+
};
|
|
1501
1543
|
}
|
|
1502
|
-
},
|
|
1544
|
+
}, it = (r) => {
|
|
1503
1545
|
const { quality: e, value: t, function_id: a } = r;
|
|
1504
1546
|
return (e >> 7 & 1) === 1 || e === 0 && a === 2 && t === 1;
|
|
1505
|
-
},
|
|
1547
|
+
}, ot = "USER_TOKEN", st = "STATION_ID", gn = [
|
|
1506
1548
|
{ key: 0, value: "离线" },
|
|
1507
1549
|
{ key: 1, value: "在线" }
|
|
1508
|
-
],
|
|
1550
|
+
], _n = [
|
|
1509
1551
|
{ key: 0, value: "反向" },
|
|
1510
1552
|
{ key: 1, value: "正向" },
|
|
1511
1553
|
{ key: 2, value: "停止" }
|
|
1512
|
-
],
|
|
1554
|
+
], wn = [
|
|
1513
1555
|
{ key: 1, value: 1 },
|
|
1514
1556
|
{ key: 2, value: 2 },
|
|
1515
1557
|
{ key: 3, value: 3 },
|
|
1516
1558
|
{ key: 4, value: 4 },
|
|
1517
1559
|
{ key: 5, value: 5 }
|
|
1518
|
-
],
|
|
1560
|
+
], vn = "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", re = window.meta.graph.penFormMap ? window.meta.graph.penFormMap : {
|
|
1519
1561
|
NORMAL: [
|
|
1520
1562
|
{
|
|
1521
1563
|
name: "颜色",
|
|
@@ -1599,7 +1641,7 @@ const Ze = {
|
|
|
1599
1641
|
]
|
|
1600
1642
|
}
|
|
1601
1643
|
]
|
|
1602
|
-
},
|
|
1644
|
+
}, Ft = window.meta.graph.lightPlateColorMap ? window.meta.graph.lightPlateColorMap : {
|
|
1603
1645
|
0: "#00d200",
|
|
1604
1646
|
// 正常
|
|
1605
1647
|
1: "#e2ac06",
|
|
@@ -1610,7 +1652,7 @@ const Ze = {
|
|
|
1610
1652
|
// 严重
|
|
1611
1653
|
4: "#ff0000"
|
|
1612
1654
|
// 危急
|
|
1613
|
-
},
|
|
1655
|
+
}, Ut = window.meta.graph.lightPlateTextMap ? window.meta.graph.lightPlateTextMap : {
|
|
1614
1656
|
0: "#fff",
|
|
1615
1657
|
// 正常
|
|
1616
1658
|
1: "#fff",
|
|
@@ -1621,14 +1663,14 @@ const Ze = {
|
|
|
1621
1663
|
// 严重
|
|
1622
1664
|
4: "#fff"
|
|
1623
1665
|
// 危急
|
|
1624
|
-
},
|
|
1666
|
+
}, D = {
|
|
1625
1667
|
form: [
|
|
1626
1668
|
{
|
|
1627
1669
|
name: "带电状态",
|
|
1628
1670
|
key: "charged_state",
|
|
1629
1671
|
type: "select",
|
|
1630
1672
|
dataIds: {},
|
|
1631
|
-
options:
|
|
1673
|
+
options: gn.map((r) => ({
|
|
1632
1674
|
label: r.value,
|
|
1633
1675
|
value: r.key
|
|
1634
1676
|
}))
|
|
@@ -1638,7 +1680,7 @@ const Ze = {
|
|
|
1638
1680
|
key: "electric_direction",
|
|
1639
1681
|
type: "select",
|
|
1640
1682
|
dataIds: {},
|
|
1641
|
-
options:
|
|
1683
|
+
options: _n.map((r) => ({
|
|
1642
1684
|
label: r.value,
|
|
1643
1685
|
value: r.key
|
|
1644
1686
|
}))
|
|
@@ -1648,7 +1690,7 @@ const Ze = {
|
|
|
1648
1690
|
key: "electric_size",
|
|
1649
1691
|
type: "select",
|
|
1650
1692
|
dataIds: {},
|
|
1651
|
-
options:
|
|
1693
|
+
options: wn.map((r) => ({
|
|
1652
1694
|
label: r.value,
|
|
1653
1695
|
value: r.key
|
|
1654
1696
|
}))
|
|
@@ -1666,27 +1708,27 @@ const Ze = {
|
|
|
1666
1708
|
// 默认按照名称批量匹配
|
|
1667
1709
|
visibleLevel: window.visibleLevel
|
|
1668
1710
|
// 默认显示数据类型为设备层级
|
|
1669
|
-
},
|
|
1670
|
-
penType:
|
|
1671
|
-
},
|
|
1672
|
-
form: [...
|
|
1711
|
+
}, m = x(l({
|
|
1712
|
+
penType: S.NORMAL
|
|
1713
|
+
}, D), {
|
|
1714
|
+
form: [...re[S.NORMAL], ...D.form]
|
|
1673
1715
|
});
|
|
1674
|
-
|
|
1716
|
+
k.YX, k.YX, k.YX, S.POINT_VALUE, D.anchors, window.visibleLevel, D.form, D.form, window.dataType, window.dataProp, window.visibleLevel, D.form, window.dataType, window.dataProp, window.visibleLevel, D.form, window.dataType, window.dataProp, window.visibleLevel, Ut[0], S.LIGHT_PLATE, Ft[0], D.anchors, window.visibleLevel, [...re[S.LIGHT_PLATE], ...D.form], Re + "", S.SENSOR, D.anchors, window.visibleLevel, [...re[S.LIGHT_PLATE], ...D.form], x(l({
|
|
1675
1717
|
width: 100,
|
|
1676
1718
|
height: 30,
|
|
1677
1719
|
name: "text",
|
|
1678
1720
|
penName: "文本",
|
|
1679
1721
|
text: "文本",
|
|
1680
1722
|
disableAnchor: !0,
|
|
1681
|
-
penType:
|
|
1682
|
-
},
|
|
1683
|
-
form: [...
|
|
1723
|
+
penType: S.TEXT
|
|
1724
|
+
}, D), {
|
|
1725
|
+
form: [...re[S.TEXT], ...D.form]
|
|
1684
1726
|
}), l({
|
|
1685
1727
|
width: 100,
|
|
1686
1728
|
height: 100,
|
|
1687
1729
|
name: "square",
|
|
1688
1730
|
penName: "正方形"
|
|
1689
|
-
},
|
|
1731
|
+
}, m), x(l({
|
|
1690
1732
|
type: 1,
|
|
1691
1733
|
name: "line",
|
|
1692
1734
|
width: 100,
|
|
@@ -1696,7 +1738,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1696
1738
|
penName: "line",
|
|
1697
1739
|
background: "#FFF000",
|
|
1698
1740
|
color: "#FFF000"
|
|
1699
|
-
},
|
|
1741
|
+
}, m), {
|
|
1700
1742
|
lineAnimateType: 1,
|
|
1701
1743
|
// 定义动画效果,用作展示潮流
|
|
1702
1744
|
anchors: [
|
|
@@ -1709,74 +1751,74 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1709
1751
|
borderRadius: 0,
|
|
1710
1752
|
name: "rectangle",
|
|
1711
1753
|
penName: "矩形"
|
|
1712
|
-
},
|
|
1754
|
+
}, m), l({
|
|
1713
1755
|
width: 100,
|
|
1714
1756
|
height: 100,
|
|
1715
1757
|
name: "circle",
|
|
1716
1758
|
penName: "圆"
|
|
1717
|
-
},
|
|
1759
|
+
}, m), l({
|
|
1718
1760
|
width: 100,
|
|
1719
1761
|
height: 100,
|
|
1720
1762
|
name: "triangle",
|
|
1721
1763
|
penName: "三角形"
|
|
1722
|
-
},
|
|
1764
|
+
}, m), l({
|
|
1723
1765
|
width: 100,
|
|
1724
1766
|
height: 100,
|
|
1725
1767
|
name: "diamond",
|
|
1726
1768
|
penName: "菱形"
|
|
1727
|
-
},
|
|
1769
|
+
}, m), l({
|
|
1728
1770
|
width: 100,
|
|
1729
1771
|
height: 100,
|
|
1730
1772
|
name: "pentagon",
|
|
1731
1773
|
penName: "五边形"
|
|
1732
|
-
},
|
|
1774
|
+
}, m), l({
|
|
1733
1775
|
width: 100,
|
|
1734
1776
|
height: 100,
|
|
1735
1777
|
name: "hexagon",
|
|
1736
1778
|
penName: "六边形"
|
|
1737
|
-
},
|
|
1779
|
+
}, m), l({
|
|
1738
1780
|
width: 100,
|
|
1739
1781
|
height: 100,
|
|
1740
1782
|
name: "pentagram",
|
|
1741
1783
|
penName: "五角星"
|
|
1742
|
-
},
|
|
1784
|
+
}, m), l({
|
|
1743
1785
|
width: 120,
|
|
1744
1786
|
height: 60,
|
|
1745
1787
|
name: "leftArrow",
|
|
1746
1788
|
penName: "左箭头"
|
|
1747
|
-
},
|
|
1789
|
+
}, m), l({
|
|
1748
1790
|
width: 120,
|
|
1749
1791
|
height: 60,
|
|
1750
1792
|
penName: "右箭头",
|
|
1751
1793
|
name: "rightArrow"
|
|
1752
|
-
},
|
|
1794
|
+
}, m), l({
|
|
1753
1795
|
width: 150,
|
|
1754
1796
|
height: 60,
|
|
1755
1797
|
name: "twowayArrow",
|
|
1756
1798
|
penName: "双向箭头"
|
|
1757
|
-
},
|
|
1799
|
+
}, m), l({
|
|
1758
1800
|
width: 100,
|
|
1759
1801
|
height: 100,
|
|
1760
1802
|
name: "cloud",
|
|
1761
1803
|
penName: "云"
|
|
1762
|
-
},
|
|
1804
|
+
}, m), l({
|
|
1763
1805
|
textTop: -0.1,
|
|
1764
1806
|
width: 100,
|
|
1765
1807
|
height: 100,
|
|
1766
1808
|
name: "message",
|
|
1767
1809
|
penName: "消息框"
|
|
1768
|
-
},
|
|
1810
|
+
}, m), l({
|
|
1769
1811
|
width: 80,
|
|
1770
1812
|
height: 100,
|
|
1771
1813
|
name: "file",
|
|
1772
1814
|
penName: "文件"
|
|
1773
|
-
},
|
|
1815
|
+
}, m), x(l({
|
|
1774
1816
|
width: 60,
|
|
1775
1817
|
height: 100,
|
|
1776
1818
|
name: "cube",
|
|
1777
1819
|
penName: "立方体",
|
|
1778
1820
|
z: 0.25
|
|
1779
|
-
},
|
|
1821
|
+
}, m), {
|
|
1780
1822
|
props: {
|
|
1781
1823
|
custom: [
|
|
1782
1824
|
{
|
|
@@ -1808,7 +1850,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1808
1850
|
height: 100,
|
|
1809
1851
|
name: "people",
|
|
1810
1852
|
penName: "人"
|
|
1811
|
-
},
|
|
1853
|
+
}, m), x(l({
|
|
1812
1854
|
name: "rectangle",
|
|
1813
1855
|
penName: "按钮",
|
|
1814
1856
|
width: 80,
|
|
@@ -1826,9 +1868,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1826
1868
|
//鼠标经过
|
|
1827
1869
|
hoverColor: "#40a9ff",
|
|
1828
1870
|
hoverTextColor: "#fff"
|
|
1829
|
-
},
|
|
1830
|
-
penType:
|
|
1831
|
-
}),
|
|
1871
|
+
}, m), {
|
|
1872
|
+
penType: S.BUTTON
|
|
1873
|
+
}), x(l({
|
|
1832
1874
|
name: "rectangle",
|
|
1833
1875
|
penName: "输入框",
|
|
1834
1876
|
height: 50,
|
|
@@ -1843,9 +1885,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1843
1885
|
hoverTextColor: "#000000FF",
|
|
1844
1886
|
activeTextColor: "#000000FF",
|
|
1845
1887
|
textLeft: 10
|
|
1846
|
-
},
|
|
1847
|
-
penType:
|
|
1848
|
-
}),
|
|
1888
|
+
}, m), {
|
|
1889
|
+
penType: S.INPUT
|
|
1890
|
+
}), x(l({
|
|
1849
1891
|
name: "rectangle",
|
|
1850
1892
|
penName: "选择器",
|
|
1851
1893
|
height: 50,
|
|
@@ -1870,9 +1912,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1870
1912
|
text: "选项3"
|
|
1871
1913
|
}
|
|
1872
1914
|
]
|
|
1873
|
-
},
|
|
1874
|
-
penType:
|
|
1875
|
-
}),
|
|
1915
|
+
}, m), {
|
|
1916
|
+
penType: S.SELECT
|
|
1917
|
+
}), x(l({
|
|
1876
1918
|
name: "slider",
|
|
1877
1919
|
penName: "进度条",
|
|
1878
1920
|
width: 300,
|
|
@@ -1887,21 +1929,21 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1887
1929
|
background: "#D4D6D9",
|
|
1888
1930
|
textColor: "#222",
|
|
1889
1931
|
unit: "%"
|
|
1890
|
-
},
|
|
1891
|
-
penType:
|
|
1892
|
-
}),
|
|
1932
|
+
}, m), {
|
|
1933
|
+
penType: S.SLIDER
|
|
1934
|
+
}), x(l({
|
|
1893
1935
|
name: "time",
|
|
1894
1936
|
penName: "时间",
|
|
1895
1937
|
width: 300,
|
|
1896
1938
|
height: 40,
|
|
1897
|
-
text: `${
|
|
1939
|
+
text: `${aa().format("YYYY-MM-DD HH:mm:ss")}`,
|
|
1898
1940
|
lineWidth: 0,
|
|
1899
1941
|
fontSize: 20,
|
|
1900
1942
|
// 绘画帧时长
|
|
1901
1943
|
interval: 67,
|
|
1902
1944
|
fillZero: !0
|
|
1903
|
-
},
|
|
1904
|
-
penType:
|
|
1945
|
+
}, m), {
|
|
1946
|
+
penType: S.TIME,
|
|
1905
1947
|
form: [
|
|
1906
1948
|
{
|
|
1907
1949
|
key: "timeFormat",
|
|
@@ -1913,10 +1955,10 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1913
1955
|
name: "是否补0",
|
|
1914
1956
|
type: "switch"
|
|
1915
1957
|
},
|
|
1916
|
-
...
|
|
1958
|
+
...m.form
|
|
1917
1959
|
],
|
|
1918
1960
|
timeFormat: "`${year}-${month}-${day} ${hours}:${minutes}:${seconds} 星期${week}`"
|
|
1919
|
-
}),
|
|
1961
|
+
}), x(l({
|
|
1920
1962
|
name: "switch",
|
|
1921
1963
|
penName: "开关",
|
|
1922
1964
|
height: 30,
|
|
@@ -1927,10 +1969,10 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1927
1969
|
disableOffColor: "#E5E5E5",
|
|
1928
1970
|
disableOnColor: "#A3D3FF",
|
|
1929
1971
|
locked: 0
|
|
1930
|
-
},
|
|
1931
|
-
penType:
|
|
1972
|
+
}, m), {
|
|
1973
|
+
penType: S.SWITCH
|
|
1932
1974
|
//disable: true,
|
|
1933
|
-
}),
|
|
1975
|
+
}), x(l({
|
|
1934
1976
|
name: "radio",
|
|
1935
1977
|
penName: "单选框",
|
|
1936
1978
|
direction: "horizontal",
|
|
@@ -1938,9 +1980,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1938
1980
|
height: 30,
|
|
1939
1981
|
checked: "",
|
|
1940
1982
|
options: [{ text: "选项一" }, { text: "选项二" }, { text: "选项三", isForbidden: !0 }]
|
|
1941
|
-
},
|
|
1942
|
-
penType:
|
|
1943
|
-
}),
|
|
1983
|
+
}, m), {
|
|
1984
|
+
penType: S.RADIO
|
|
1985
|
+
}), x(l({
|
|
1944
1986
|
name: "checkbox",
|
|
1945
1987
|
penName: "多选框",
|
|
1946
1988
|
width: 30,
|
|
@@ -1948,9 +1990,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1948
1990
|
checked: !0,
|
|
1949
1991
|
// isForbidden: true,
|
|
1950
1992
|
value: "选项一"
|
|
1951
|
-
},
|
|
1952
|
-
penType:
|
|
1953
|
-
}),
|
|
1993
|
+
}, m), {
|
|
1994
|
+
penType: S.CHECKBOX
|
|
1995
|
+
}), x(l({
|
|
1954
1996
|
name: "table2",
|
|
1955
1997
|
penName: "表格",
|
|
1956
1998
|
width: 80,
|
|
@@ -1966,8 +2008,8 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
1966
2008
|
hasHeader: !0,
|
|
1967
2009
|
color: "#333",
|
|
1968
2010
|
textColor: "#444"
|
|
1969
|
-
},
|
|
1970
|
-
penType:
|
|
2011
|
+
}, m), {
|
|
2012
|
+
penType: S.TABLE,
|
|
1971
2013
|
replaceMode: 2,
|
|
1972
2014
|
data: [
|
|
1973
2015
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2018,7 +2060,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2018
2060
|
textColor: "#000"
|
|
2019
2061
|
}
|
|
2020
2062
|
]
|
|
2021
|
-
}),
|
|
2063
|
+
}), x(l({
|
|
2022
2064
|
name: "table2",
|
|
2023
2065
|
penName: "斑马纹表格",
|
|
2024
2066
|
width: 80,
|
|
@@ -2034,8 +2076,8 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2034
2076
|
hasHeader: !0,
|
|
2035
2077
|
color: "#333",
|
|
2036
2078
|
textColor: "#444"
|
|
2037
|
-
},
|
|
2038
|
-
penType:
|
|
2079
|
+
}, m), {
|
|
2080
|
+
penType: S.TABLE,
|
|
2039
2081
|
replaceMode: 2,
|
|
2040
2082
|
data: [
|
|
2041
2083
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2086,7 +2128,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2086
2128
|
textColor: "#000"
|
|
2087
2129
|
}
|
|
2088
2130
|
]
|
|
2089
|
-
}),
|
|
2131
|
+
}), x(l({
|
|
2090
2132
|
name: "table2",
|
|
2091
2133
|
penName: "滚动表格",
|
|
2092
2134
|
width: 80,
|
|
@@ -2104,8 +2146,8 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2104
2146
|
hasHeader: !0,
|
|
2105
2147
|
color: "#333",
|
|
2106
2148
|
textColor: "#444"
|
|
2107
|
-
},
|
|
2108
|
-
penType:
|
|
2149
|
+
}, m), {
|
|
2150
|
+
penType: S.TABLE,
|
|
2109
2151
|
replaceMode: 2,
|
|
2110
2152
|
data: [
|
|
2111
2153
|
["设备 ID", "设备名称", "数据协议", "级别"],
|
|
@@ -2166,95 +2208,95 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2166
2208
|
textColor: "#000"
|
|
2167
2209
|
}
|
|
2168
2210
|
]
|
|
2169
|
-
}),
|
|
2211
|
+
}), x(l({
|
|
2170
2212
|
name: "svg",
|
|
2171
2213
|
width: 100,
|
|
2172
2214
|
height: 100,
|
|
2173
|
-
image:
|
|
2215
|
+
image: Re + "/icon/audio.svg",
|
|
2174
2216
|
audioId: "",
|
|
2175
2217
|
penName: "音频",
|
|
2176
2218
|
datable: !0,
|
|
2177
|
-
penType:
|
|
2178
|
-
},
|
|
2179
|
-
form: [...
|
|
2219
|
+
penType: S.AUDIO
|
|
2220
|
+
}, D), {
|
|
2221
|
+
form: [...re[S.AUDIO], ...D.form],
|
|
2180
2222
|
events: [
|
|
2181
2223
|
{
|
|
2182
2224
|
name: "enter",
|
|
2183
|
-
action:
|
|
2184
|
-
value:
|
|
2225
|
+
action: Se.Emit,
|
|
2226
|
+
value: B.OPEN_AUDIO,
|
|
2185
2227
|
where: {
|
|
2186
2228
|
type: ""
|
|
2187
2229
|
},
|
|
2188
2230
|
params: JSON.stringify({
|
|
2189
|
-
action:
|
|
2231
|
+
action: B.OPEN_AUDIO,
|
|
2190
2232
|
data: ""
|
|
2191
2233
|
// 音频id
|
|
2192
2234
|
})
|
|
2193
2235
|
},
|
|
2194
2236
|
{
|
|
2195
2237
|
name: "leave",
|
|
2196
|
-
action:
|
|
2197
|
-
value:
|
|
2238
|
+
action: Se.Emit,
|
|
2239
|
+
value: B.CLOSE_AUDIO,
|
|
2198
2240
|
where: {
|
|
2199
2241
|
type: ""
|
|
2200
2242
|
},
|
|
2201
2243
|
params: JSON.stringify({
|
|
2202
|
-
action:
|
|
2244
|
+
action: B.CLOSE_AUDIO,
|
|
2203
2245
|
data: ""
|
|
2204
2246
|
// 音频id
|
|
2205
2247
|
})
|
|
2206
2248
|
}
|
|
2207
2249
|
]
|
|
2208
|
-
}),
|
|
2250
|
+
}), x(l({
|
|
2209
2251
|
name: "svg",
|
|
2210
2252
|
width: 100,
|
|
2211
2253
|
height: 100,
|
|
2212
|
-
image:
|
|
2254
|
+
image: Re + "/icon/camera.svg",
|
|
2213
2255
|
cameraId: "",
|
|
2214
2256
|
penName: "摄像机",
|
|
2215
2257
|
datable: !0,
|
|
2216
2258
|
events: [
|
|
2217
2259
|
{
|
|
2218
2260
|
name: "enter",
|
|
2219
|
-
action:
|
|
2220
|
-
value:
|
|
2261
|
+
action: Se.Emit,
|
|
2262
|
+
value: B.OPEN_CAMERA,
|
|
2221
2263
|
where: {
|
|
2222
2264
|
type: ""
|
|
2223
2265
|
},
|
|
2224
2266
|
params: JSON.stringify({
|
|
2225
|
-
action:
|
|
2267
|
+
action: B.OPEN_CAMERA,
|
|
2226
2268
|
data: ""
|
|
2227
2269
|
// 摄像机id
|
|
2228
2270
|
})
|
|
2229
2271
|
},
|
|
2230
2272
|
{
|
|
2231
2273
|
name: "leave",
|
|
2232
|
-
action:
|
|
2233
|
-
value:
|
|
2274
|
+
action: Se.Emit,
|
|
2275
|
+
value: B.CLOSE_CAMERA,
|
|
2234
2276
|
where: {
|
|
2235
2277
|
type: ""
|
|
2236
2278
|
},
|
|
2237
2279
|
params: JSON.stringify({
|
|
2238
|
-
action:
|
|
2280
|
+
action: B.CLOSE_CAMERA,
|
|
2239
2281
|
data: ""
|
|
2240
2282
|
// 摄像机id
|
|
2241
2283
|
})
|
|
2242
2284
|
}
|
|
2243
2285
|
],
|
|
2244
|
-
penType:
|
|
2245
|
-
},
|
|
2246
|
-
form: [...
|
|
2247
|
-
}),
|
|
2286
|
+
penType: S.CAMERA
|
|
2287
|
+
}, D), {
|
|
2288
|
+
form: [...re[S.CAMERA], ...D.form]
|
|
2289
|
+
}), x(l({
|
|
2248
2290
|
name: "video",
|
|
2249
2291
|
width: 100,
|
|
2250
2292
|
height: 100,
|
|
2251
2293
|
video: "https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",
|
|
2252
2294
|
autoPlay: !0,
|
|
2253
2295
|
penName: "MP4",
|
|
2254
|
-
penType:
|
|
2255
|
-
},
|
|
2256
|
-
form: [...
|
|
2257
|
-
}),
|
|
2296
|
+
penType: S.MP4
|
|
2297
|
+
}, D), {
|
|
2298
|
+
form: [...re[S.MP4], ...D.form]
|
|
2299
|
+
}), x(l({
|
|
2258
2300
|
name: "video",
|
|
2259
2301
|
width: 100,
|
|
2260
2302
|
height: 100,
|
|
@@ -2262,9 +2304,9 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2262
2304
|
datable: !0,
|
|
2263
2305
|
video: "https://video.699pic.com/videos/17/69/11/a_aa3jeKZ0D63g1556176911_10s.mp4",
|
|
2264
2306
|
autoPlay: !0,
|
|
2265
|
-
penType:
|
|
2266
|
-
},
|
|
2267
|
-
form: [...
|
|
2307
|
+
penType: S.VIDEO_STREAM
|
|
2308
|
+
}, D), {
|
|
2309
|
+
form: [...re[S.VIDEO_STREAM], ...D.form]
|
|
2268
2310
|
}), l({
|
|
2269
2311
|
text: "开始/结束",
|
|
2270
2312
|
width: 120,
|
|
@@ -2272,92 +2314,92 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2272
2314
|
borderRadius: 0.5,
|
|
2273
2315
|
name: "rectangle",
|
|
2274
2316
|
penName: "开始/结束"
|
|
2275
|
-
},
|
|
2317
|
+
}, m), l({
|
|
2276
2318
|
text: "流程",
|
|
2277
2319
|
width: 120,
|
|
2278
2320
|
height: 40,
|
|
2279
2321
|
name: "rectangle",
|
|
2280
2322
|
penName: "流程"
|
|
2281
|
-
},
|
|
2323
|
+
}, m), l({
|
|
2282
2324
|
text: "判定",
|
|
2283
2325
|
width: 120,
|
|
2284
2326
|
height: 60,
|
|
2285
2327
|
name: "diamond",
|
|
2286
2328
|
penName: "判定"
|
|
2287
|
-
},
|
|
2329
|
+
}, m), l({
|
|
2288
2330
|
text: "数据",
|
|
2289
2331
|
width: 120,
|
|
2290
2332
|
height: 50,
|
|
2291
2333
|
name: "flowData",
|
|
2292
2334
|
penName: "数据",
|
|
2293
2335
|
offsetX: 0.14
|
|
2294
|
-
},
|
|
2336
|
+
}, m), l({
|
|
2295
2337
|
text: "准备",
|
|
2296
2338
|
width: 120,
|
|
2297
2339
|
height: 50,
|
|
2298
2340
|
name: "hexagon",
|
|
2299
2341
|
penName: "准备"
|
|
2300
|
-
},
|
|
2342
|
+
}, m), l({
|
|
2301
2343
|
text: "子流程",
|
|
2302
2344
|
width: 120,
|
|
2303
2345
|
height: 50,
|
|
2304
2346
|
name: "flowSubprocess",
|
|
2305
2347
|
penName: "子流程"
|
|
2306
|
-
},
|
|
2348
|
+
}, m), l({
|
|
2307
2349
|
text: "数据库",
|
|
2308
2350
|
width: 80,
|
|
2309
2351
|
height: 120,
|
|
2310
2352
|
name: "flowDb",
|
|
2311
2353
|
penName: "数据库"
|
|
2312
|
-
},
|
|
2354
|
+
}, m), l({
|
|
2313
2355
|
text: "文档",
|
|
2314
2356
|
width: 120,
|
|
2315
2357
|
height: 100,
|
|
2316
2358
|
name: "flowDocument",
|
|
2317
2359
|
penName: "文档"
|
|
2318
|
-
},
|
|
2360
|
+
}, m), l({
|
|
2319
2361
|
text: "内部存储",
|
|
2320
2362
|
width: 120,
|
|
2321
2363
|
height: 80,
|
|
2322
2364
|
name: "flowInternalStorage",
|
|
2323
2365
|
penName: "内部存储"
|
|
2324
|
-
},
|
|
2366
|
+
}, m), l({
|
|
2325
2367
|
text: "外部存储",
|
|
2326
2368
|
width: 120,
|
|
2327
2369
|
height: 80,
|
|
2328
2370
|
name: "flowExternStorage",
|
|
2329
2371
|
penName: "外部存储"
|
|
2330
|
-
},
|
|
2372
|
+
}, m), l({
|
|
2331
2373
|
text: "队列",
|
|
2332
2374
|
width: 100,
|
|
2333
2375
|
height: 100,
|
|
2334
2376
|
name: "flowQueue",
|
|
2335
2377
|
penName: "队列"
|
|
2336
|
-
},
|
|
2378
|
+
}, m), l({
|
|
2337
2379
|
text: "手动输入",
|
|
2338
2380
|
width: 120,
|
|
2339
2381
|
height: 80,
|
|
2340
2382
|
name: "flowManually",
|
|
2341
2383
|
penName: "手动输入"
|
|
2342
|
-
},
|
|
2384
|
+
}, m), l({
|
|
2343
2385
|
text: "展示",
|
|
2344
2386
|
width: 120,
|
|
2345
2387
|
height: 80,
|
|
2346
2388
|
name: "flowDisplay",
|
|
2347
2389
|
penName: "展示"
|
|
2348
|
-
},
|
|
2390
|
+
}, m), l({
|
|
2349
2391
|
text: "并行模式",
|
|
2350
2392
|
width: 120,
|
|
2351
2393
|
height: 50,
|
|
2352
2394
|
name: "flowParallel",
|
|
2353
2395
|
penName: "并行模式"
|
|
2354
|
-
},
|
|
2396
|
+
}, m), l({
|
|
2355
2397
|
text: "注释",
|
|
2356
2398
|
width: 100,
|
|
2357
2399
|
height: 100,
|
|
2358
2400
|
name: "flowComment",
|
|
2359
2401
|
penName: "注释"
|
|
2360
|
-
},
|
|
2402
|
+
}, m), l({
|
|
2361
2403
|
text: "",
|
|
2362
2404
|
width: 30,
|
|
2363
2405
|
height: 30,
|
|
@@ -2365,25 +2407,25 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2365
2407
|
penName: "开始",
|
|
2366
2408
|
background: "#555",
|
|
2367
2409
|
lineWidth: 0
|
|
2368
|
-
},
|
|
2410
|
+
}, m), l({
|
|
2369
2411
|
width: 30,
|
|
2370
2412
|
height: 30,
|
|
2371
2413
|
name: "activityFinal",
|
|
2372
2414
|
penName: "结束"
|
|
2373
|
-
},
|
|
2415
|
+
}, m), l({
|
|
2374
2416
|
text: "活动",
|
|
2375
2417
|
width: 120,
|
|
2376
2418
|
height: 50,
|
|
2377
2419
|
borderRadius: 0.25,
|
|
2378
2420
|
name: "rectangle",
|
|
2379
2421
|
penName: "活动"
|
|
2380
|
-
},
|
|
2422
|
+
}, m), l({
|
|
2381
2423
|
text: "决策/合并",
|
|
2382
2424
|
width: 120,
|
|
2383
2425
|
height: 50,
|
|
2384
2426
|
name: "diamond",
|
|
2385
2427
|
penName: "决策/合并"
|
|
2386
|
-
},
|
|
2428
|
+
}, m), l({
|
|
2387
2429
|
text: "垂直泳道",
|
|
2388
2430
|
width: 200,
|
|
2389
2431
|
height: 500,
|
|
@@ -2393,7 +2435,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2393
2435
|
textTop: 20,
|
|
2394
2436
|
// textHeight: ,
|
|
2395
2437
|
lineTop: 0.08
|
|
2396
|
-
},
|
|
2438
|
+
}, m), l({
|
|
2397
2439
|
text: "水平泳道",
|
|
2398
2440
|
width: 500,
|
|
2399
2441
|
height: 200,
|
|
@@ -2403,7 +2445,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2403
2445
|
textLeft: 0.04,
|
|
2404
2446
|
textAlign: "left",
|
|
2405
2447
|
lineLeft: 0.08
|
|
2406
|
-
},
|
|
2448
|
+
}, m), l({
|
|
2407
2449
|
text: "垂直分岔/汇合",
|
|
2408
2450
|
width: 10,
|
|
2409
2451
|
height: 150,
|
|
@@ -2411,7 +2453,7 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2411
2453
|
penName: "垂直分岔/汇合",
|
|
2412
2454
|
fillStyle: "#555",
|
|
2413
2455
|
strokeStyle: "transparent"
|
|
2414
|
-
},
|
|
2456
|
+
}, m), l({
|
|
2415
2457
|
text: "水平分岔/汇合",
|
|
2416
2458
|
width: 150,
|
|
2417
2459
|
height: 10,
|
|
@@ -2419,76 +2461,76 @@ O.YX, O.YX, O.YX, b.POINT_VALUE, R.anchors, window.visibleLevel, R.form, R.form,
|
|
|
2419
2461
|
penName: "水平分岔/汇合",
|
|
2420
2462
|
fillStyle: "#555",
|
|
2421
2463
|
strokeStyle: "transparent"
|
|
2422
|
-
},
|
|
2464
|
+
}, m), l({
|
|
2423
2465
|
name: "andGate",
|
|
2424
2466
|
penName: "与门",
|
|
2425
2467
|
width: 100,
|
|
2426
2468
|
height: 150
|
|
2427
|
-
},
|
|
2469
|
+
}, m), l({
|
|
2428
2470
|
name: "basicEvent",
|
|
2429
2471
|
penName: "基本事件",
|
|
2430
2472
|
width: 100,
|
|
2431
2473
|
height: 150
|
|
2432
|
-
},
|
|
2474
|
+
}, m), l({
|
|
2433
2475
|
name: "unexpandedEvent",
|
|
2434
2476
|
penName: "未展开事件",
|
|
2435
2477
|
width: 100,
|
|
2436
2478
|
height: 150
|
|
2437
|
-
},
|
|
2479
|
+
}, m), l({
|
|
2438
2480
|
name: "priorityAndGate",
|
|
2439
2481
|
penName: "优先AND门",
|
|
2440
2482
|
width: 100,
|
|
2441
2483
|
height: 150
|
|
2442
|
-
},
|
|
2484
|
+
}, m), l({
|
|
2443
2485
|
name: "forbiddenGate",
|
|
2444
2486
|
penName: "禁止门",
|
|
2445
2487
|
width: 100,
|
|
2446
2488
|
height: 150
|
|
2447
|
-
},
|
|
2489
|
+
}, m), l({
|
|
2448
2490
|
name: "event",
|
|
2449
2491
|
penName: "事件",
|
|
2450
2492
|
width: 100,
|
|
2451
2493
|
height: 150
|
|
2452
|
-
},
|
|
2494
|
+
}, m), l({
|
|
2453
2495
|
name: "switchEvent",
|
|
2454
2496
|
penName: "开关事件",
|
|
2455
2497
|
width: 100,
|
|
2456
2498
|
height: 150
|
|
2457
|
-
},
|
|
2499
|
+
}, m), l({
|
|
2458
2500
|
name: "conditionalEvent",
|
|
2459
2501
|
penName: "条件事件",
|
|
2460
2502
|
width: 150,
|
|
2461
2503
|
height: 100
|
|
2462
|
-
},
|
|
2504
|
+
}, m), l({
|
|
2463
2505
|
name: "transferSymbol",
|
|
2464
2506
|
penName: "转移符号",
|
|
2465
2507
|
width: 100,
|
|
2466
2508
|
height: 150
|
|
2467
|
-
},
|
|
2509
|
+
}, m), l({
|
|
2468
2510
|
name: "orGate",
|
|
2469
2511
|
penName: "或门",
|
|
2470
2512
|
width: 100,
|
|
2471
2513
|
height: 150
|
|
2472
|
-
},
|
|
2514
|
+
}, m), l({
|
|
2473
2515
|
name: "xorGate",
|
|
2474
2516
|
penName: "异或门",
|
|
2475
2517
|
width: 100,
|
|
2476
2518
|
height: 150
|
|
2477
|
-
},
|
|
2519
|
+
}, m), l({
|
|
2478
2520
|
name: "votingGate",
|
|
2479
2521
|
penName: "表决门",
|
|
2480
2522
|
width: 100,
|
|
2481
2523
|
height: 150
|
|
2482
|
-
},
|
|
2483
|
-
const
|
|
2524
|
+
}, m);
|
|
2525
|
+
const En = (r, e = { isDev: !1, devServerUrl: "", devServerPort: 8443 }) => r.replace(
|
|
2484
2526
|
/(https?:\/\/)(\b(?:\d{1,3}\.){3}\d{1,3}\b)(:(\d+))?/,
|
|
2485
|
-
`$1${e.isDev ? e.devServerUrl :
|
|
2486
|
-
),
|
|
2527
|
+
`$1${e.isDev ? e.devServerUrl : Oa}:${e.isDev ? e.devServerPort : La}`
|
|
2528
|
+
), Me = (r, e) => {
|
|
2487
2529
|
const t = r.__vccOpts || r;
|
|
2488
2530
|
for (const [a, n] of e)
|
|
2489
2531
|
t[a] = n;
|
|
2490
2532
|
return t;
|
|
2491
|
-
},
|
|
2533
|
+
}, In = { class: "props-panel__title" }, yn = { class: "props-panel__value" }, Tn = { class: "props-panel__value-num" }, Sn = /* @__PURE__ */ Object.assign({ name: "PropsPanle" }, {
|
|
2492
2534
|
__name: "PropsPanle",
|
|
2493
2535
|
props: {
|
|
2494
2536
|
/**
|
|
@@ -2512,25 +2554,25 @@ const mn = (r, e = { isDev: !1, devServerUrl: "", devServerPort: 8443 }) => r.re
|
|
|
2512
2554
|
const o = () => {
|
|
2513
2555
|
a("close");
|
|
2514
2556
|
};
|
|
2515
|
-
return (i,
|
|
2516
|
-
var w,
|
|
2517
|
-
return
|
|
2557
|
+
return (i, h) => {
|
|
2558
|
+
var w, b;
|
|
2559
|
+
return Q(), ce("div", {
|
|
2518
2560
|
class: "props-panel",
|
|
2519
2561
|
onMouseleave: o
|
|
2520
2562
|
}, [
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2563
|
+
se("div", In, Ye(((w = t == null ? void 0 : t.data) == null ? void 0 : w.name) || "—"), 1),
|
|
2564
|
+
h[1] || (h[1] = se("div", { class: "props-panel__label" }, "脉冲峰值", -1)),
|
|
2565
|
+
se("div", yn, [
|
|
2566
|
+
se("span", Tn, Ye(n((b = t == null ? void 0 : t.data) == null ? void 0 : b.value)), 1),
|
|
2567
|
+
h[0] || (h[0] = se("span", { class: "props-panel__unit" }, "dBm", -1))
|
|
2526
2568
|
])
|
|
2527
2569
|
], 32);
|
|
2528
2570
|
};
|
|
2529
2571
|
}
|
|
2530
|
-
}),
|
|
2531
|
-
class
|
|
2572
|
+
}), bn = /* @__PURE__ */ Me(Sn, [["__scopeId", "data-v-343ad322"]]);
|
|
2573
|
+
class Cn {
|
|
2532
2574
|
constructor(e) {
|
|
2533
|
-
|
|
2575
|
+
ne(this, "editor");
|
|
2534
2576
|
this.editor = e;
|
|
2535
2577
|
}
|
|
2536
2578
|
/**
|
|
@@ -2542,22 +2584,22 @@ class _n {
|
|
|
2542
2584
|
initPlugin(e, t, a = {}) {
|
|
2543
2585
|
e.installPenPlugins({ name: t }, [
|
|
2544
2586
|
{
|
|
2545
|
-
plugin:
|
|
2587
|
+
plugin: ma,
|
|
2546
2588
|
options: a
|
|
2547
2589
|
},
|
|
2548
2590
|
{
|
|
2549
|
-
plugin:
|
|
2591
|
+
plugin: ha,
|
|
2550
2592
|
options: a
|
|
2551
2593
|
}
|
|
2552
2594
|
]);
|
|
2553
2595
|
}
|
|
2554
2596
|
}
|
|
2555
|
-
const
|
|
2556
|
-
function
|
|
2557
|
-
return localStorage.removeItem(
|
|
2597
|
+
const xn = "original_meta2d";
|
|
2598
|
+
function Nn() {
|
|
2599
|
+
return localStorage.removeItem(xn);
|
|
2558
2600
|
}
|
|
2559
|
-
let
|
|
2560
|
-
const
|
|
2601
|
+
let Ee = {};
|
|
2602
|
+
const Rn = (r) => {
|
|
2561
2603
|
const e = document.querySelectorAll("video");
|
|
2562
2604
|
let t = null;
|
|
2563
2605
|
if (e.forEach((n) => {
|
|
@@ -2625,15 +2667,15 @@ const En = (r) => {
|
|
|
2625
2667
|
videoBufferDelay: 1
|
|
2626
2668
|
// 缓存延迟(延迟超过会触发丢帧)
|
|
2627
2669
|
});
|
|
2628
|
-
return r.autoPlay && r.streamUrl && a.play(r.streamUrl),
|
|
2629
|
-
},
|
|
2630
|
-
Object.keys(
|
|
2631
|
-
|
|
2632
|
-
}),
|
|
2633
|
-
},
|
|
2670
|
+
return r.autoPlay && r.streamUrl && a.play(r.streamUrl), Ee[r.id] = a, a;
|
|
2671
|
+
}, Pn = () => {
|
|
2672
|
+
Object.keys(Ee).forEach((r) => {
|
|
2673
|
+
Ee[r].destroy(), Ee[r] = null;
|
|
2674
|
+
}), Ee = {};
|
|
2675
|
+
}, kn = { class: "sy-empty" }, On = {
|
|
2634
2676
|
key: 1,
|
|
2635
2677
|
class: "sy-empty-picture"
|
|
2636
|
-
},
|
|
2678
|
+
}, Dn = { class: "sy-empty-description" }, Ln = /* @__PURE__ */ Object.assign({
|
|
2637
2679
|
name: "SyEmpty"
|
|
2638
2680
|
}, {
|
|
2639
2681
|
__name: "index",
|
|
@@ -2656,13 +2698,13 @@ const En = (r) => {
|
|
|
2656
2698
|
}
|
|
2657
2699
|
},
|
|
2658
2700
|
setup(r) {
|
|
2659
|
-
|
|
2701
|
+
Xt((n) => ({
|
|
2660
2702
|
a7383bac: a.value.width,
|
|
2661
2703
|
v736d2d7a: a.value.height
|
|
2662
2704
|
}));
|
|
2663
|
-
const e = r, t =
|
|
2705
|
+
const e = r, t = he(() => ({
|
|
2664
2706
|
"font-size": e.imageSize ? `${e.imageSize}px` : "80px"
|
|
2665
|
-
})), a =
|
|
2707
|
+
})), a = he(() => e.imageSize ? {
|
|
2666
2708
|
width: e.imageSize * 1.2 + "px",
|
|
2667
2709
|
height: e.imageSize + "px"
|
|
2668
2710
|
} : {
|
|
@@ -2670,35 +2712,35 @@ const En = (r) => {
|
|
|
2670
2712
|
height: "144px"
|
|
2671
2713
|
});
|
|
2672
2714
|
return (n, o) => {
|
|
2673
|
-
const i =
|
|
2674
|
-
return
|
|
2675
|
-
r.image !== "empty" ? (
|
|
2715
|
+
const i = Qe("SyIcon"), h = Qe("el-icon");
|
|
2716
|
+
return Q(), ce("div", kn, [
|
|
2717
|
+
r.image !== "empty" ? (Q(), ce("span", {
|
|
2676
2718
|
key: 0,
|
|
2677
2719
|
class: "sy-empty-image",
|
|
2678
|
-
style:
|
|
2720
|
+
style: yt(t.value)
|
|
2679
2721
|
}, [
|
|
2680
|
-
r.image !== "loading" ? (
|
|
2722
|
+
r.image !== "loading" ? (Q(), Pe(i, {
|
|
2681
2723
|
key: 0,
|
|
2682
2724
|
name: r.image,
|
|
2683
2725
|
gradient: ""
|
|
2684
|
-
}, null, 8, ["name"])) : (
|
|
2726
|
+
}, null, 8, ["name"])) : (Q(), Pe(h, {
|
|
2685
2727
|
key: 1,
|
|
2686
2728
|
class: "is-loading",
|
|
2687
2729
|
style: { color: "#1671d4" }
|
|
2688
2730
|
}, {
|
|
2689
|
-
default:
|
|
2690
|
-
|
|
2731
|
+
default: Tt(() => [
|
|
2732
|
+
We(ke(ba))
|
|
2691
2733
|
]),
|
|
2692
2734
|
_: 1
|
|
2693
2735
|
}))
|
|
2694
|
-
], 4)) : r.onlyText ?
|
|
2695
|
-
|
|
2696
|
-
|
|
2736
|
+
], 4)) : r.onlyText ? Oe("", !0) : (Q(), ce("span", On)),
|
|
2737
|
+
se("div", Dn, [
|
|
2738
|
+
se("p", null, Ye(r.description), 1)
|
|
2697
2739
|
])
|
|
2698
2740
|
]);
|
|
2699
2741
|
};
|
|
2700
2742
|
}
|
|
2701
|
-
}),
|
|
2743
|
+
}), Mn = /* @__PURE__ */ Me(Ln, [["__scopeId", "data-v-247a0fc9"]]), Fn = /* @__PURE__ */ Object.assign({
|
|
2702
2744
|
name: "Meta2dEditor"
|
|
2703
2745
|
}, {
|
|
2704
2746
|
__name: "index",
|
|
@@ -2731,27 +2773,27 @@ const En = (r) => {
|
|
|
2731
2773
|
},
|
|
2732
2774
|
emits: ["loaded", "load-error"],
|
|
2733
2775
|
setup(r, { expose: e, emit: t }) {
|
|
2734
|
-
const a = t, n = r, o =
|
|
2735
|
-
|
|
2776
|
+
const a = t, n = r, o = j(null), i = qt(), h = he(() => !!(n.data || n.url));
|
|
2777
|
+
$e(
|
|
2736
2778
|
() => [n.data, n.url],
|
|
2737
2779
|
() => {
|
|
2738
|
-
|
|
2780
|
+
h.value && b();
|
|
2739
2781
|
}
|
|
2740
2782
|
);
|
|
2741
|
-
let w =
|
|
2742
|
-
function
|
|
2783
|
+
let w = j(!0);
|
|
2784
|
+
function b() {
|
|
2743
2785
|
return Y(this, null, function* () {
|
|
2744
2786
|
try {
|
|
2745
|
-
if (w.value = !0, yield
|
|
2787
|
+
if (w.value = !0, yield Qt(), !o.value) {
|
|
2746
2788
|
console.error("未找到meta2d元素!");
|
|
2747
2789
|
return;
|
|
2748
2790
|
}
|
|
2749
|
-
let
|
|
2750
|
-
if (n.data ?
|
|
2791
|
+
let g = null;
|
|
2792
|
+
if (n.data ? g = n.data : n.url && (g = yield Ie()), !g || !g.data) {
|
|
2751
2793
|
w.value = !1, console.log("图纸数据为空"), a("load-error");
|
|
2752
2794
|
return;
|
|
2753
2795
|
}
|
|
2754
|
-
const
|
|
2796
|
+
const C = g.options || {
|
|
2755
2797
|
background: "#eee",
|
|
2756
2798
|
disableAnchor: !1
|
|
2757
2799
|
};
|
|
@@ -2759,102 +2801,125 @@ const En = (r) => {
|
|
|
2759
2801
|
console.error("Meta2D 容器元素不可用");
|
|
2760
2802
|
return;
|
|
2761
2803
|
}
|
|
2762
|
-
i.value = new
|
|
2804
|
+
i.value = new da(o.value, l({}, C)), C.visibleLevel && i.value.scale(C.visibleLevel), ae(), J(), yield Z(g.data), i.value.render(), ie(), setTimeout(() => {
|
|
2763
2805
|
window.meta2dTools && window.registerToolsNew();
|
|
2764
2806
|
}, 1e3), a("loaded", i.value);
|
|
2765
|
-
} catch (
|
|
2766
|
-
console.error("初始化编辑器失败:",
|
|
2807
|
+
} catch (g) {
|
|
2808
|
+
console.error("初始化编辑器失败:", g);
|
|
2767
2809
|
}
|
|
2768
2810
|
});
|
|
2769
2811
|
}
|
|
2770
|
-
function
|
|
2812
|
+
function ae() {
|
|
2771
2813
|
if (!i.value) return;
|
|
2772
|
-
new
|
|
2814
|
+
new Cn({}).initPlugin(i.value, "mindNode", {});
|
|
2773
2815
|
}
|
|
2774
|
-
function
|
|
2775
|
-
|
|
2816
|
+
function J() {
|
|
2817
|
+
_e(pa()), _e(ga()), Je(_a()), _e(Ia()), we(ya()), _e(Ta()), we(Sa()), we(fa()), we(Aa()), _e(wa()), Je(va()), we(Ea());
|
|
2776
2818
|
}
|
|
2777
|
-
function
|
|
2778
|
-
var
|
|
2819
|
+
function Z(g) {
|
|
2820
|
+
var C;
|
|
2779
2821
|
if (i.value) {
|
|
2780
|
-
if (typeof
|
|
2781
|
-
const
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
}),
|
|
2785
|
-
|
|
2786
|
-
|
|
2822
|
+
if (typeof g.locked == "undefined" && (g.locked = 0), g.bkImage && i.value.setBackgroundImage(g.bkImage), g.pens && g.pens.length > 0) {
|
|
2823
|
+
const L = [];
|
|
2824
|
+
g.pens.forEach((T) => {
|
|
2825
|
+
T.name === "video" && T.streamUrl ? L.push(T) : T.name === "image" && T.image ? T.image = En(T.image, n.devConfig) : T.penType === S.TABLE && T.dataType && P(T);
|
|
2826
|
+
}), L.length > 0 && setTimeout(() => {
|
|
2827
|
+
L.forEach((T) => {
|
|
2828
|
+
Rn(T);
|
|
2787
2829
|
});
|
|
2788
2830
|
}, 500);
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2791
|
-
const
|
|
2792
|
-
|
|
2831
|
+
const X = window.meta.graph.penCountThreshold || 2e3;
|
|
2832
|
+
g.pens.length > X && g.scale && g.pens.forEach((T) => {
|
|
2833
|
+
const F = T.visibleLevel;
|
|
2834
|
+
F !== void 0 ? (T.visible = g.scale >= F, T.visible || (T.disabled = !0, T.locked = ve.Disable)) : (T.visible = !0, T.disabled = !1, T.locked = ve.None);
|
|
2793
2835
|
});
|
|
2794
2836
|
}
|
|
2795
|
-
i.value.open(
|
|
2837
|
+
i.value.open(g), !n.preview && ((C = g.networks) != null && C.length) && i.value.closeNetwork();
|
|
2796
2838
|
}
|
|
2797
2839
|
}
|
|
2798
|
-
const
|
|
2799
|
-
var
|
|
2800
|
-
const
|
|
2840
|
+
const P = (g) => Y(this, null, function* () {
|
|
2841
|
+
var L;
|
|
2842
|
+
const C = yield le.getCommonApi(Ra[g.dataType], {
|
|
2801
2843
|
offset: 0,
|
|
2802
|
-
limit:
|
|
2844
|
+
limit: g.tableSize || 10
|
|
2803
2845
|
});
|
|
2804
|
-
if ((
|
|
2805
|
-
const
|
|
2846
|
+
if ((L = C.data) != null && L.length) {
|
|
2847
|
+
const X = g.tableHeader || [
|
|
2806
2848
|
{ prop: "id", label: "ID" },
|
|
2807
2849
|
{ prop: "guid", label: "标识" },
|
|
2808
2850
|
{ prop: "name", label: "名称" }
|
|
2809
|
-
],
|
|
2810
|
-
const
|
|
2811
|
-
return
|
|
2851
|
+
], K = C.data.map((T) => X.filter((F) => F.isShow).map((F) => {
|
|
2852
|
+
const H = T[F.prop];
|
|
2853
|
+
return F.choices ? F.choices[H] || H : ra(H) ? H.name : H;
|
|
2812
2854
|
}));
|
|
2813
2855
|
i.value.setValue({
|
|
2814
|
-
id:
|
|
2815
|
-
dataY:
|
|
2856
|
+
id: g.id,
|
|
2857
|
+
dataY: K
|
|
2816
2858
|
});
|
|
2817
2859
|
} else
|
|
2818
2860
|
i.value.setValue({
|
|
2819
|
-
id:
|
|
2861
|
+
id: g.id,
|
|
2820
2862
|
dataY: []
|
|
2821
2863
|
});
|
|
2822
|
-
}),
|
|
2823
|
-
i.value && i.value.on("scale",
|
|
2824
|
-
},
|
|
2825
|
-
var
|
|
2864
|
+
}), ie = () => {
|
|
2865
|
+
i.value && (i.value.on("scale", ee), n.preview || i.value.on("connectLine", Ae));
|
|
2866
|
+
}, ee = ia((g) => {
|
|
2867
|
+
var C, L, X, K;
|
|
2826
2868
|
try {
|
|
2827
2869
|
if (!i.value) return;
|
|
2828
|
-
|
|
2829
|
-
let
|
|
2830
|
-
const
|
|
2831
|
-
for (let
|
|
2832
|
-
const
|
|
2833
|
-
if ([
|
|
2834
|
-
if (((
|
|
2835
|
-
let
|
|
2836
|
-
|
|
2837
|
-
} else if (((
|
|
2838
|
-
let
|
|
2839
|
-
|
|
2870
|
+
je.emit("graph-scale", g);
|
|
2871
|
+
let T = i.value.store.data.pens;
|
|
2872
|
+
const F = window.meta.graph.penCountThreshold || 2e3, H = T.length > F;
|
|
2873
|
+
for (let M = 0; M < T.length; M++) {
|
|
2874
|
+
const O = T[M];
|
|
2875
|
+
if ([S.VIDEO_STREAM, S.MP4].includes(O.penType)) {
|
|
2876
|
+
if (((L = (C = de[O.id]) == null ? void 0 : C.children) == null ? void 0 : L.length) === 3) {
|
|
2877
|
+
let z = de[O.id].children[0], q = de[O.id].children[2];
|
|
2878
|
+
z.style.width = q.currentTime / q.duration * O.calculative.worldRect.width + "px";
|
|
2879
|
+
} else if (((K = (X = de[O.id]) == null ? void 0 : X.children) == null ? void 0 : K.length) === 2) {
|
|
2880
|
+
let z = de[O.id].children[0], q = de[O.id].children[1];
|
|
2881
|
+
z.style.width = q.currentTime / q.duration * O.calculative.worldRect.width + "px";
|
|
2840
2882
|
}
|
|
2841
2883
|
}
|
|
2842
|
-
if (
|
|
2843
|
-
const
|
|
2884
|
+
if (H) {
|
|
2885
|
+
const z = O.visibleLevel !== void 0 ? g >= O.visibleLevel : !0;
|
|
2844
2886
|
i.value._setValue({
|
|
2845
|
-
id:
|
|
2846
|
-
visible:
|
|
2847
|
-
disabled: !
|
|
2848
|
-
locked:
|
|
2887
|
+
id: O.id,
|
|
2888
|
+
visible: z,
|
|
2889
|
+
disabled: !z,
|
|
2890
|
+
locked: z ? ve.None : ve.Disable
|
|
2849
2891
|
});
|
|
2850
2892
|
}
|
|
2851
2893
|
}
|
|
2852
2894
|
i.value.render();
|
|
2853
|
-
} catch (
|
|
2854
|
-
console.error("处理缩放失败:",
|
|
2895
|
+
} catch (T) {
|
|
2896
|
+
console.error("处理缩放失败:", T);
|
|
2855
2897
|
}
|
|
2856
|
-
}, 500)
|
|
2857
|
-
|
|
2898
|
+
}, 500), Ae = (X) => Y(this, [X], function* ({ line: g, lineAnchor: C, pen: L }) {
|
|
2899
|
+
var ye;
|
|
2900
|
+
if (C != null && C.start || (L == null ? void 0 : L.penType) !== S.GIS_SENSOR)
|
|
2901
|
+
return;
|
|
2902
|
+
const K = (ye = g == null ? void 0 : g.calculative) == null ? void 0 : ye.worldAnchors;
|
|
2903
|
+
if (K.length !== 2 || K != null && K.some((ge) => !ge.connectTo))
|
|
2904
|
+
return;
|
|
2905
|
+
const [T, F] = K;
|
|
2906
|
+
if (T.connectTo === F.connectTo)
|
|
2907
|
+
return;
|
|
2908
|
+
const H = window.meta2d.findOne(T.connectTo), M = window.meta2d.findOne(F.connectTo);
|
|
2909
|
+
let O = H == null ? void 0 : H.bindData, z = M == null ? void 0 : M.bindData;
|
|
2910
|
+
if (!O || !z)
|
|
2911
|
+
return;
|
|
2912
|
+
const q = yield le.postPDApi("setchannelpaired/", {
|
|
2913
|
+
data: [
|
|
2914
|
+
{
|
|
2915
|
+
channel1: O.guid,
|
|
2916
|
+
channel2: z.guid
|
|
2917
|
+
}
|
|
2918
|
+
]
|
|
2919
|
+
});
|
|
2920
|
+
q.success ? W.success("配对成功") : W.error("配对失败", q.detail);
|
|
2921
|
+
});
|
|
2922
|
+
function Ie() {
|
|
2858
2923
|
return Y(this, null, function* () {
|
|
2859
2924
|
if (!n.url)
|
|
2860
2925
|
return W.error("图纸路径为空!"), null;
|
|
@@ -2862,38 +2927,39 @@ const En = (r) => {
|
|
|
2862
2927
|
return (yield le.getGraphApi(n.url, {
|
|
2863
2928
|
local: n.local
|
|
2864
2929
|
})) || null;
|
|
2865
|
-
} catch (
|
|
2930
|
+
} catch (g) {
|
|
2866
2931
|
return null;
|
|
2867
2932
|
}
|
|
2868
2933
|
});
|
|
2869
2934
|
}
|
|
2870
|
-
const
|
|
2871
|
-
i.value && i.value.resize();
|
|
2935
|
+
const te = () => {
|
|
2936
|
+
i.value && (i.value.resize(), i.value.fitView(!0, 10));
|
|
2872
2937
|
};
|
|
2873
|
-
return
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2938
|
+
return St(() => {
|
|
2939
|
+
var g, C;
|
|
2940
|
+
h.value && (g = o.value) != null && g.clientHeight && (C = o.value) != null && C.clientWidth && b(), window.addEventListener("resize", te);
|
|
2941
|
+
}), bt(() => {
|
|
2942
|
+
Pn(), Nn(), i.value && (n.preview ? (la(), i.value.destroy(!0)) : i.value.off("scale", ee)), window.removeEventListener("resize", te);
|
|
2877
2943
|
}), e({
|
|
2878
2944
|
stage: i
|
|
2879
|
-
}), (
|
|
2945
|
+
}), (g, C) => (Q(), ce("div", {
|
|
2880
2946
|
ref_key: "meta2dRef",
|
|
2881
2947
|
ref: o,
|
|
2882
2948
|
class: "meta2d-editor"
|
|
2883
2949
|
}, [
|
|
2884
|
-
|
|
2950
|
+
ke(w) ? Oe("", !0) : (Q(), Pe(Mn, {
|
|
2885
2951
|
key: 0,
|
|
2886
2952
|
class: "meta2d-empty",
|
|
2887
2953
|
description: "图纸不存在"
|
|
2888
2954
|
}))
|
|
2889
2955
|
], 512));
|
|
2890
2956
|
}
|
|
2891
|
-
}),
|
|
2957
|
+
}), Un = /* @__PURE__ */ Me(Fn, [["__scopeId", "data-v-9753d97b"]]), Gn = {
|
|
2892
2958
|
key: 0,
|
|
2893
2959
|
class: "back-btn"
|
|
2894
2960
|
};
|
|
2895
|
-
var
|
|
2896
|
-
const
|
|
2961
|
+
var Et, It;
|
|
2962
|
+
const Hn = /* @__PURE__ */ Object.assign({
|
|
2897
2963
|
name: "Meta2dPreview"
|
|
2898
2964
|
}, {
|
|
2899
2965
|
__name: "index",
|
|
@@ -2917,22 +2983,22 @@ const Rn = /* @__PURE__ */ Object.assign({
|
|
|
2917
2983
|
// 图纸语言
|
|
2918
2984
|
lang: {
|
|
2919
2985
|
type: String,
|
|
2920
|
-
default: ((
|
|
2986
|
+
default: ((It = (Et = window.meta) == null ? void 0 : Et.app) == null ? void 0 : It.lang) || "zh-cn"
|
|
2921
2987
|
},
|
|
2922
2988
|
// 配置选项
|
|
2923
2989
|
config: {
|
|
2924
2990
|
type: Object,
|
|
2925
2991
|
default: () => ({
|
|
2926
|
-
socketUrl:
|
|
2927
|
-
stationIdKey:
|
|
2992
|
+
socketUrl: et,
|
|
2993
|
+
stationIdKey: st,
|
|
2928
2994
|
enableToken: !0,
|
|
2929
|
-
userTokenKey:
|
|
2930
|
-
|
|
2995
|
+
userTokenKey: ot,
|
|
2996
|
+
userToken: void 0,
|
|
2931
2997
|
messageDelay: 200,
|
|
2932
2998
|
debounceDelay: 100,
|
|
2933
2999
|
enableAutoFit: !0,
|
|
2934
3000
|
enableWebSocket: !0,
|
|
2935
|
-
graphSocket:
|
|
3001
|
+
graphSocket: Ze.GRAPH.SOCKET
|
|
2936
3002
|
})
|
|
2937
3003
|
},
|
|
2938
3004
|
showMap: {
|
|
@@ -2954,7 +3020,7 @@ const Rn = /* @__PURE__ */ Object.assign({
|
|
|
2954
3020
|
},
|
|
2955
3021
|
mittInstance: {
|
|
2956
3022
|
type: Object,
|
|
2957
|
-
default: () =>
|
|
3023
|
+
default: () => je
|
|
2958
3024
|
},
|
|
2959
3025
|
// 自定义回调
|
|
2960
3026
|
customCallbacks: {
|
|
@@ -2982,314 +3048,325 @@ const Rn = /* @__PURE__ */ Object.assign({
|
|
|
2982
3048
|
emits: ["error", "loaded", "custom-msg", "socket-msg"],
|
|
2983
3049
|
setup(r, { expose: e, emit: t }) {
|
|
2984
3050
|
const a = t, n = r;
|
|
2985
|
-
let o =
|
|
2986
|
-
const w =
|
|
3051
|
+
let o = j(!1), i = j(""), h = j(!1);
|
|
3052
|
+
const w = j(null), b = j(null), ae = j(null), J = j(""), Z = j(!1), P = he(() => {
|
|
2987
3053
|
var s;
|
|
2988
|
-
return (s =
|
|
2989
|
-
}),
|
|
3054
|
+
return (s = ae.value) == null ? void 0 : s.stage;
|
|
3055
|
+
}), ie = he(() => {
|
|
2990
3056
|
var s;
|
|
2991
|
-
return (s =
|
|
2992
|
-
}),
|
|
2993
|
-
socketUrl:
|
|
2994
|
-
stationIdKey:
|
|
3057
|
+
return (s = P.value) == null ? void 0 : s.store;
|
|
3058
|
+
}), ee = he(() => l({
|
|
3059
|
+
socketUrl: et,
|
|
3060
|
+
stationIdKey: st,
|
|
2995
3061
|
enableToken: !0,
|
|
2996
|
-
userTokenKey:
|
|
3062
|
+
userTokenKey: ot,
|
|
2997
3063
|
userToken: void 0,
|
|
2998
3064
|
messageDelay: 200,
|
|
2999
3065
|
debounceDelay: 100,
|
|
3000
3066
|
enableAutoFit: !0,
|
|
3001
3067
|
fitPadding: 10,
|
|
3002
3068
|
enableWebSocket: !0,
|
|
3003
|
-
graphSocket:
|
|
3004
|
-
}, n.config)),
|
|
3005
|
-
const
|
|
3069
|
+
graphSocket: Ze.GRAPH.SOCKET
|
|
3070
|
+
}, n.config)), Ae = () => n.apiInstance || le, Ie = () => n.mittInstance || je, te = (s, d = "") => {
|
|
3071
|
+
const p = {
|
|
3006
3072
|
error: s,
|
|
3007
3073
|
message: d,
|
|
3008
3074
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
3009
3075
|
};
|
|
3010
|
-
a("error",
|
|
3011
|
-
},
|
|
3012
|
-
i.value && (
|
|
3013
|
-
},
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3076
|
+
a("error", p), n.errorHandler.callback ? n.errorHandler.callback(p) : n.errorHandler.showMessage && W && W.error(`${d}: ${s.message || s}`);
|
|
3077
|
+
}, g = () => {
|
|
3078
|
+
i.value && (J.value = i.value, Z.value = h.value);
|
|
3079
|
+
}, C = {}, L = j(!1), X = j({ left: 0, top: 0 }), K = (s, d) => {
|
|
3080
|
+
if (!w.value)
|
|
3081
|
+
return {
|
|
3082
|
+
left: s + 20,
|
|
3083
|
+
top: d + 20
|
|
3084
|
+
};
|
|
3085
|
+
const p = w.value.getBoundingClientRect(), y = s - p.left, N = d - p.top;
|
|
3086
|
+
let E = 300, I = 150;
|
|
3087
|
+
if (b.value) {
|
|
3088
|
+
const A = b.value.$el || b.value;
|
|
3089
|
+
A && A.offsetWidth && (E = A.offsetWidth, I = A.offsetHeight);
|
|
3090
|
+
}
|
|
3091
|
+
let u = y + 20, _ = N + 20;
|
|
3092
|
+
return u + E > p.width && (u = y - E - 20), _ + I > p.height && (_ = N - I - 20), {
|
|
3093
|
+
left: Math.max(0, Math.min(u, p.width - E)),
|
|
3094
|
+
top: Math.max(0, Math.min(_, p.height - I))
|
|
3095
|
+
};
|
|
3096
|
+
}, T = (s) => {
|
|
3097
|
+
L.value && (X.value = K(s.clientX, s.clientY));
|
|
3098
|
+
}, F = (s) => {
|
|
3099
|
+
var d, p, y, N, E, I;
|
|
3020
3100
|
try {
|
|
3021
3101
|
if (!s) return;
|
|
3022
3102
|
if ((d = s == null ? void 0 : s.includes) != null && d.call(s, "token 必传"))
|
|
3023
3103
|
return W.warning(s);
|
|
3024
|
-
const
|
|
3025
|
-
if ((
|
|
3026
|
-
return W.warning(
|
|
3027
|
-
switch (a("socket-msg",
|
|
3028
|
-
case
|
|
3029
|
-
case
|
|
3030
|
-
if ((N =
|
|
3031
|
-
const
|
|
3032
|
-
|
|
3104
|
+
const u = typeof s == "string" ? JSON.parse(s) : s;
|
|
3105
|
+
if ((u == null ? void 0 : u.data) === "服务错误" || (y = (p = u == null ? void 0 : u.data) == null ? void 0 : p.includes) != null && y.call(p, "token is expired"))
|
|
3106
|
+
return W.warning(u.data);
|
|
3107
|
+
switch (a("socket-msg", u), u.action) {
|
|
3108
|
+
case He.ACPOINT.YCVALUE:
|
|
3109
|
+
case He.ACPOINT.YXVALUE:
|
|
3110
|
+
if ((N = u == null ? void 0 : u.data) != null && N.point_id) {
|
|
3111
|
+
const _ = P.value.find(u.data.point_id);
|
|
3112
|
+
_ && (C[u.data.point_id] = u.action === He.ACPOINT.YXVALUE ? Ce(u.data.value) ? u.data.value : 0 : Ce(u.data.value_disp || u.data.value) ? u.data.value_disp || u.data.value : 0, Te(_, u.data));
|
|
3033
3113
|
}
|
|
3034
3114
|
break;
|
|
3035
3115
|
default:
|
|
3036
|
-
if (((
|
|
3037
|
-
const
|
|
3038
|
-
clearTimeout(
|
|
3039
|
-
|
|
3040
|
-
}),
|
|
3041
|
-
const
|
|
3042
|
-
|
|
3116
|
+
if (((E = u.data) == null ? void 0 : E.length) > 0) {
|
|
3117
|
+
const _ = setTimeout(() => {
|
|
3118
|
+
clearTimeout(_), P.value && (u.data.forEach((A) => {
|
|
3119
|
+
C[A.dataId || A.point_id] = A.value_disp || A.value;
|
|
3120
|
+
}), u.data.forEach((A) => {
|
|
3121
|
+
const v = P.value.find(A.dataId || A.point_id);
|
|
3122
|
+
Te(v, A);
|
|
3043
3123
|
}));
|
|
3044
|
-
},
|
|
3045
|
-
n.customCallbacks.onWebSocketMessage && n.customCallbacks.onWebSocketMessage(
|
|
3124
|
+
}, ee.value.messageDelay);
|
|
3125
|
+
n.customCallbacks.onWebSocketMessage && n.customCallbacks.onWebSocketMessage(u), (I = window.customSocketFn) == null || I.call(window, s);
|
|
3046
3126
|
}
|
|
3047
3127
|
break;
|
|
3048
3128
|
}
|
|
3049
3129
|
return !0;
|
|
3050
|
-
} catch (
|
|
3051
|
-
return
|
|
3130
|
+
} catch (u) {
|
|
3131
|
+
return te(u, "WebSocket消息处理"), !0;
|
|
3052
3132
|
}
|
|
3053
|
-
},
|
|
3054
|
-
let
|
|
3055
|
-
const
|
|
3133
|
+
}, H = j({});
|
|
3134
|
+
let M = {}, O = null;
|
|
3135
|
+
const z = (s) => Y(this, null, function* () {
|
|
3056
3136
|
try {
|
|
3057
3137
|
if (s.msgName)
|
|
3058
3138
|
switch (s.msgName) {
|
|
3059
|
-
case
|
|
3060
|
-
case
|
|
3061
|
-
case
|
|
3062
|
-
|
|
3139
|
+
case B.CHANGE_GRAPH:
|
|
3140
|
+
case B.NOTIFY_DIALOG:
|
|
3141
|
+
case B.GIS_PROPS_PANEL:
|
|
3142
|
+
q(s);
|
|
3063
3143
|
break;
|
|
3064
3144
|
}
|
|
3065
3145
|
else
|
|
3066
|
-
|
|
3146
|
+
q(s);
|
|
3067
3147
|
a("custom-msg", s), n.customCallbacks.onCustomMessage && n.customCallbacks.onCustomMessage(s);
|
|
3068
3148
|
} catch (d) {
|
|
3069
|
-
|
|
3149
|
+
te(d, "自定义消息处理");
|
|
3070
3150
|
}
|
|
3071
|
-
}),
|
|
3072
|
-
var
|
|
3151
|
+
}), q = (s) => {
|
|
3152
|
+
var y, N;
|
|
3073
3153
|
let d;
|
|
3074
3154
|
if (s.params)
|
|
3075
3155
|
try {
|
|
3076
3156
|
d = JSON.parse(s.params);
|
|
3077
|
-
} catch (
|
|
3157
|
+
} catch (E) {
|
|
3078
3158
|
d = s.params;
|
|
3079
3159
|
}
|
|
3080
3160
|
switch (s.msgName) {
|
|
3081
|
-
case
|
|
3082
|
-
(d == null ? void 0 : d.data) !== "图纸id" ? (i.value =
|
|
3161
|
+
case B.CHANGE_GRAPH:
|
|
3162
|
+
(d == null ? void 0 : d.data) !== "图纸id" ? (i.value = J.value, h.value = Z.value, o.value = d.isBack, (y = d == null ? void 0 : d.data) != null && y.startsWith("/") ? (J.value = d == null ? void 0 : d.data, Z.value = !0) : (Z.value = !1, ge(d.data))) : console.warn("切换图纸信息为空");
|
|
3083
3163
|
break;
|
|
3084
|
-
case
|
|
3085
|
-
d.msg !== "通知内容" ?
|
|
3164
|
+
case B.NOTIFY_DIALOG:
|
|
3165
|
+
d.msg !== "通知内容" ? sa(l({
|
|
3086
3166
|
message: d.msg
|
|
3087
3167
|
}, d)) : console.warn("通知内容为空");
|
|
3088
3168
|
break;
|
|
3089
|
-
case
|
|
3090
|
-
s.eventName === "enter" ? (
|
|
3091
|
-
left: s.e.clientX + 20,
|
|
3092
|
-
top: s.e.clientY + 20
|
|
3093
|
-
})) : (D.value = !1, S.value = {});
|
|
3169
|
+
case B.GIS_PROPS_PANEL:
|
|
3170
|
+
s.eventName === "enter" ? (L.value = !0, H.value = ((N = s == null ? void 0 : s.pen) == null ? void 0 : N.bindData) || {}, s.e && (X.value = K(s.e.clientX, s.e.clientY))) : (L.value = !1, H.value = {});
|
|
3094
3171
|
break;
|
|
3095
3172
|
}
|
|
3096
|
-
},
|
|
3097
|
-
var d,
|
|
3173
|
+
}, ye = (s) => {
|
|
3174
|
+
var d, p, y, N, E, I, u, _, A;
|
|
3098
3175
|
try {
|
|
3099
3176
|
a("loaded", s);
|
|
3100
|
-
const
|
|
3101
|
-
c.enableWebSocket &&
|
|
3102
|
-
var
|
|
3103
|
-
|
|
3104
|
-
}) : (
|
|
3105
|
-
var
|
|
3106
|
-
(
|
|
3107
|
-
}), s.render(), c.enableAutoFit && s.fitView(!0, c.fitPadding), Object.values(
|
|
3177
|
+
const v = tt(), c = ee.value, f = rt.getSession(c.stationIdKey), G = rt.getSession(c.userTokenKey);
|
|
3178
|
+
c.enableWebSocket && f && G && ((y = (p = (d = s.store) == null ? void 0 : d.data) == null ? void 0 : p.networks) != null && y.length ? (I = (E = (N = s.store) == null ? void 0 : N.data) == null ? void 0 : E.networks) == null || I.forEach((V) => {
|
|
3179
|
+
var oe;
|
|
3180
|
+
V.protocol === "websocket" && ((oe = V.url) != null && oe.includes("station_id") || (V.url = `${V.url}?station_id=${f}`), c.enableToken ? V.protocols = c.userToken || G : V.protocols = void 0);
|
|
3181
|
+
}) : (_ = (u = s.store) == null ? void 0 : u.data) != null && _.websocket ? ((A = s.store.data.websocket) != null && A.includes("station_id") || (s.store.data.websocket = `${s.store.data.websocket}?station_id=${f}`), c.enableToken ? s.store.data.websocketProtocols = c.userToken || G : s.store.data.websocketProtocols = void 0, s.closeSocket(), s.connectSocket()) : (s.store.data.websocket = `${c.socketUrl}?station_id=${f}`, c.enableToken ? s.store.data.websocketProtocols = G : s.store.data.websocketProtocols = void 0, s.connectWebsocket())), (n.showMap || v.showMap === "true") && s.showMap(), s.setRule({ rule: !1 }), s.setOptions({ disableRuleLine: !0 }), s.setGrid({ grid: !1 }), s.lock(ve.DisableEdit), Ue().forEach((V) => {
|
|
3182
|
+
var oe;
|
|
3183
|
+
(oe = V == null ? void 0 : V.events) != null && oe.length ? U({ id: V.id, locked: 1 }, !1) : U({ id: V.id, locked: 10 }, !1);
|
|
3184
|
+
}), s.render(), c.enableAutoFit && s.fitView(!0, c.fitPadding), Object.values(B).forEach((V) => {
|
|
3108
3185
|
s.on(
|
|
3109
|
-
|
|
3110
|
-
(
|
|
3111
|
-
msgName:
|
|
3186
|
+
V,
|
|
3187
|
+
(oe) => z(x(l({}, oe), {
|
|
3188
|
+
msgName: V
|
|
3112
3189
|
}))
|
|
3113
3190
|
);
|
|
3114
|
-
}), s && (s.socketFn =
|
|
3115
|
-
} catch (
|
|
3116
|
-
|
|
3191
|
+
}), s && (s.socketFn = F), n.customCallbacks.onStageLoaded && n.customCallbacks.onStageLoaded(s), n.isInitData && Gt(s), window.addEventListener("mousemove", T);
|
|
3192
|
+
} catch (v) {
|
|
3193
|
+
te(v, "图纸加载完成处理");
|
|
3117
3194
|
}
|
|
3118
|
-
},
|
|
3195
|
+
}, ge = Ct((s) => Y(this, null, function* () {
|
|
3119
3196
|
var d;
|
|
3120
3197
|
try {
|
|
3121
3198
|
if (n.url) {
|
|
3122
|
-
|
|
3199
|
+
Z.value = n.local, yield Fe(n.url);
|
|
3123
3200
|
return;
|
|
3124
3201
|
}
|
|
3125
|
-
const
|
|
3126
|
-
if (s = s || n.gid ||
|
|
3127
|
-
const
|
|
3128
|
-
if (
|
|
3129
|
-
const N = yield
|
|
3202
|
+
const p = tt();
|
|
3203
|
+
if (s = s || n.gid || p.id, p.local === "true" && (Z.value = !0), s) {
|
|
3204
|
+
const y = Ae();
|
|
3205
|
+
if (y && y.getCommonApi) {
|
|
3206
|
+
const N = yield y.getCommonApi(n.isFactory ? "graph" : "floorplan", { guid: s });
|
|
3130
3207
|
if ((d = N.data) != null && d.length)
|
|
3131
|
-
yield
|
|
3208
|
+
yield Fe(N.data[0].path);
|
|
3132
3209
|
else {
|
|
3133
|
-
const
|
|
3134
|
-
|
|
3210
|
+
const E = "未找到图纸!";
|
|
3211
|
+
te(new Error(E), "获取图纸数据");
|
|
3135
3212
|
}
|
|
3136
3213
|
} else
|
|
3137
|
-
|
|
3214
|
+
te(new Error("API实例不可用"), "初始化图纸数据!");
|
|
3138
3215
|
} else
|
|
3139
|
-
|
|
3140
|
-
n.customCallbacks.onGraphLoaded && n.customCallbacks.onGraphLoaded(
|
|
3141
|
-
} catch (
|
|
3142
|
-
|
|
3216
|
+
Z.value = n.local, yield Fe(n.url);
|
|
3217
|
+
n.customCallbacks.onGraphLoaded && n.customCallbacks.onGraphLoaded(J.value);
|
|
3218
|
+
} catch (p) {
|
|
3219
|
+
te(p, "获取图纸数据失败");
|
|
3143
3220
|
}
|
|
3144
|
-
})),
|
|
3221
|
+
})), Fe = (s) => Y(this, null, function* () {
|
|
3145
3222
|
const d = s.split(".");
|
|
3146
3223
|
if (s.includes(n.lang) || d.length !== 3) {
|
|
3147
|
-
|
|
3224
|
+
J.value = s;
|
|
3148
3225
|
return;
|
|
3149
3226
|
}
|
|
3150
|
-
const
|
|
3227
|
+
const p = `${d[0]}.${n.lang}.${d[2]}`;
|
|
3151
3228
|
try {
|
|
3152
|
-
const
|
|
3229
|
+
const y = yield le.getGraphApi(p, { local: n.local }).catch(() => {
|
|
3153
3230
|
console.warn("多语言图纸不存在,使用默认图纸");
|
|
3154
3231
|
});
|
|
3155
|
-
|
|
3156
|
-
} catch (
|
|
3157
|
-
|
|
3232
|
+
J.value = y ? p : s;
|
|
3233
|
+
} catch (y) {
|
|
3234
|
+
J.value = s;
|
|
3158
3235
|
}
|
|
3159
|
-
}),
|
|
3160
|
-
var d,
|
|
3236
|
+
}), Gt = (s) => Y(this, null, function* () {
|
|
3237
|
+
var d, p, y, N;
|
|
3161
3238
|
if (s) {
|
|
3162
|
-
let
|
|
3163
|
-
|
|
3164
|
-
const
|
|
3165
|
-
for (let
|
|
3166
|
-
const c = v
|
|
3167
|
-
c.bindDataId ? (d = c.form) != null && d.length ? c.form.forEach((
|
|
3168
|
-
if (
|
|
3169
|
-
switch (
|
|
3170
|
-
case
|
|
3171
|
-
|
|
3172
|
-
nodeName:
|
|
3239
|
+
let E = [], I = [], u = [];
|
|
3240
|
+
M = {};
|
|
3241
|
+
const _ = s.store.data.pens;
|
|
3242
|
+
for (let v = 0; v < _.length; v++) {
|
|
3243
|
+
const c = _[v];
|
|
3244
|
+
c.bindDataId ? (d = c.form) != null && d.length ? c.form.forEach((f) => {
|
|
3245
|
+
if (f.dataIds.dataId)
|
|
3246
|
+
switch (f.dataIds.dataType) {
|
|
3247
|
+
case k.YC:
|
|
3248
|
+
E.push(x(l({}, f), {
|
|
3249
|
+
nodeName: f.dataIds.name,
|
|
3173
3250
|
penId: c.id,
|
|
3174
3251
|
penName: c.penName
|
|
3175
3252
|
}));
|
|
3176
3253
|
break;
|
|
3177
|
-
case
|
|
3178
|
-
|
|
3179
|
-
nodeName:
|
|
3254
|
+
case k.YX:
|
|
3255
|
+
I.push(x(l({}, f), {
|
|
3256
|
+
nodeName: f.dataIds.name,
|
|
3180
3257
|
penId: c.id,
|
|
3181
3258
|
penName: c.penName
|
|
3182
3259
|
}));
|
|
3183
3260
|
break;
|
|
3184
|
-
case
|
|
3185
|
-
|
|
3186
|
-
nodeName:
|
|
3261
|
+
case k.SG:
|
|
3262
|
+
I.push(x(l({}, f), {
|
|
3263
|
+
nodeName: f.dataIds.name,
|
|
3187
3264
|
penId: c.id,
|
|
3188
3265
|
penName: c.penName
|
|
3189
3266
|
}));
|
|
3190
3267
|
break;
|
|
3191
|
-
case
|
|
3192
|
-
|
|
3193
|
-
nodeName:
|
|
3268
|
+
case k.POINT:
|
|
3269
|
+
u.push(x(l({}, f), {
|
|
3270
|
+
nodeName: f.dataIds.name,
|
|
3194
3271
|
penId: c.id,
|
|
3195
3272
|
penName: c.penName
|
|
3196
3273
|
}));
|
|
3197
3274
|
break;
|
|
3198
3275
|
}
|
|
3199
|
-
}) : c.penType ===
|
|
3276
|
+
}) : c.penType === S.GIS_SENSOR && c.bindData && (M[c.bindData.ied_id] || (M[c.bindData.ied_id] = []), U({
|
|
3200
3277
|
id: c.id,
|
|
3201
3278
|
title: void 0
|
|
3202
|
-
}),
|
|
3279
|
+
}), M[c.bindData.ied_id].push(l({
|
|
3203
3280
|
penId: c.id
|
|
3204
|
-
}, c.bindData))) : (
|
|
3205
|
-
if (
|
|
3206
|
-
switch (
|
|
3207
|
-
case
|
|
3208
|
-
|
|
3281
|
+
}, c.bindData))) : (p = c.statusBindData) != null && p.length && c.statusBindData.forEach((f) => {
|
|
3282
|
+
if (f.dataId)
|
|
3283
|
+
switch (f.dataType) {
|
|
3284
|
+
case k.YX:
|
|
3285
|
+
I.push({
|
|
3209
3286
|
showChild: 0,
|
|
3210
3287
|
value: 0,
|
|
3211
|
-
nodeName:
|
|
3288
|
+
nodeName: f.dataName,
|
|
3212
3289
|
penId: c.id,
|
|
3213
3290
|
penName: c.penName,
|
|
3214
|
-
dataId:
|
|
3291
|
+
dataId: f.dataId
|
|
3215
3292
|
});
|
|
3216
3293
|
break;
|
|
3217
|
-
case
|
|
3218
|
-
|
|
3294
|
+
case k.SG:
|
|
3295
|
+
I.push({
|
|
3219
3296
|
showChild: 0,
|
|
3220
3297
|
value: 0,
|
|
3221
|
-
nodeName:
|
|
3298
|
+
nodeName: f.dataName,
|
|
3222
3299
|
penId: c.id,
|
|
3223
3300
|
penName: c.penName,
|
|
3224
|
-
dataId:
|
|
3301
|
+
dataId: f.dataId
|
|
3225
3302
|
});
|
|
3226
3303
|
break;
|
|
3227
3304
|
}
|
|
3228
3305
|
});
|
|
3229
3306
|
}
|
|
3230
3307
|
let A = [];
|
|
3231
|
-
if (
|
|
3232
|
-
const
|
|
3233
|
-
if (
|
|
3234
|
-
const c = yield
|
|
3235
|
-
point_id:
|
|
3236
|
-
var
|
|
3237
|
-
return ((
|
|
3308
|
+
if (E.length) {
|
|
3309
|
+
const v = Ae();
|
|
3310
|
+
if (v && v.postCommonApi) {
|
|
3311
|
+
const c = yield v.postCommonApi("queryrealtimepoint", {
|
|
3312
|
+
point_id: E.map((f) => {
|
|
3313
|
+
var G;
|
|
3314
|
+
return ((G = f == null ? void 0 : f.dataIds) == null ? void 0 : G.dataId) || f.dataId;
|
|
3238
3315
|
}).join(",")
|
|
3239
3316
|
});
|
|
3240
|
-
(
|
|
3241
|
-
f
|
|
3317
|
+
(y = c == null ? void 0 : c.data) != null && y.length && (c.data.forEach((f) => {
|
|
3318
|
+
C[f.guid] = f.value_disp || f.value;
|
|
3242
3319
|
}), A = [...A, ...c.data]);
|
|
3243
3320
|
}
|
|
3244
3321
|
}
|
|
3245
|
-
if (
|
|
3246
|
-
const
|
|
3247
|
-
if (
|
|
3248
|
-
const c = yield
|
|
3249
|
-
point_id:
|
|
3250
|
-
var
|
|
3251
|
-
return ((
|
|
3322
|
+
if (I.length) {
|
|
3323
|
+
const v = Ae();
|
|
3324
|
+
if (v && v.postCommonApi) {
|
|
3325
|
+
const c = yield v.postCommonApi("queryrealtimepoint", {
|
|
3326
|
+
point_id: I.map((f) => {
|
|
3327
|
+
var G;
|
|
3328
|
+
return ((G = f == null ? void 0 : f.dataIds) == null ? void 0 : G.dataId) || f.dataId;
|
|
3252
3329
|
}).join(",")
|
|
3253
3330
|
});
|
|
3254
|
-
(N = c == null ? void 0 : c.data) != null && N.length && (c.data.forEach((
|
|
3255
|
-
f
|
|
3331
|
+
(N = c == null ? void 0 : c.data) != null && N.length && (c.data.forEach((f) => {
|
|
3332
|
+
C[f.guid] = Be(f.value) ? Number(f.value) : f.value;
|
|
3256
3333
|
}), A = [...A, ...c.data]);
|
|
3257
3334
|
}
|
|
3258
3335
|
}
|
|
3259
|
-
A.length && A.forEach((
|
|
3260
|
-
const c = s.find(
|
|
3261
|
-
|
|
3262
|
-
value:
|
|
3263
|
-
value_disp:
|
|
3264
|
-
alarm_value:
|
|
3265
|
-
point_id:
|
|
3336
|
+
A.length && A.forEach((v) => {
|
|
3337
|
+
const c = s.find(v.guid);
|
|
3338
|
+
Te(c, x(l({}, v), {
|
|
3339
|
+
value: Be(v.value) ? Ce(Number(v.value)) ? Number(v.value) : 0 : v.value,
|
|
3340
|
+
value_disp: v.value_disp,
|
|
3341
|
+
alarm_value: v.alarm_value,
|
|
3342
|
+
point_id: v.guid
|
|
3266
3343
|
}));
|
|
3267
|
-
}),
|
|
3268
|
-
|
|
3269
|
-
}, 3e3)) :
|
|
3344
|
+
}), M && Object.keys(M).length ? (O && clearInterval(O), Xe(), O = setInterval(() => {
|
|
3345
|
+
Xe();
|
|
3346
|
+
}, 3e3)) : O && clearInterval(O);
|
|
3270
3347
|
}
|
|
3271
|
-
}),
|
|
3348
|
+
}), Xe = () => Y(this, null, function* () {
|
|
3272
3349
|
var s;
|
|
3273
|
-
if (
|
|
3274
|
-
const d = Object.keys(
|
|
3350
|
+
if (M) {
|
|
3351
|
+
const d = Object.keys(M);
|
|
3275
3352
|
if (d.length) {
|
|
3276
|
-
const
|
|
3277
|
-
data: d.map((
|
|
3278
|
-
ied_id:
|
|
3279
|
-
ln_list:
|
|
3353
|
+
const p = yield le.postPDApi("querychannelstatus/", {
|
|
3354
|
+
data: d.map((y) => ({
|
|
3355
|
+
ied_id: y,
|
|
3356
|
+
ln_list: M[y].map((N) => N.ln_id)
|
|
3280
3357
|
}))
|
|
3281
3358
|
});
|
|
3282
|
-
(s =
|
|
3283
|
-
const N =
|
|
3284
|
-
|
|
3285
|
-
const
|
|
3286
|
-
|
|
3359
|
+
(s = p == null ? void 0 : p.data) != null && s.length && d.forEach((y) => {
|
|
3360
|
+
const N = p.data.find((I) => I.ied_id === y), E = M[y];
|
|
3361
|
+
E != null && E.length && E.forEach((I) => {
|
|
3362
|
+
const u = N.result.find((_) => _.ln_id === I.ln_id);
|
|
3363
|
+
u && U(
|
|
3287
3364
|
{
|
|
3288
|
-
id:
|
|
3289
|
-
showChild:
|
|
3290
|
-
bindData:
|
|
3291
|
-
status:
|
|
3292
|
-
value:
|
|
3365
|
+
id: I.penId,
|
|
3366
|
+
showChild: u.status === "告警" ? 2 : u.status === "正常" ? 1 : 0,
|
|
3367
|
+
bindData: x(l({}, I), {
|
|
3368
|
+
status: u.status,
|
|
3369
|
+
value: Be(u.amp_peak) ? Ce(Number(u.amp_peak)) ? Number(u.amp_peak) : 0 : u.amp_peak
|
|
3293
3370
|
})
|
|
3294
3371
|
},
|
|
3295
3372
|
!1
|
|
@@ -3298,77 +3375,77 @@ const Rn = /* @__PURE__ */ Object.assign({
|
|
|
3298
3375
|
});
|
|
3299
3376
|
}
|
|
3300
3377
|
}
|
|
3301
|
-
}),
|
|
3302
|
-
if (
|
|
3303
|
-
return
|
|
3304
|
-
},
|
|
3378
|
+
}), U = (s, d = !0) => {
|
|
3379
|
+
if (P.value)
|
|
3380
|
+
return P.value.setValue(s, { render: d });
|
|
3381
|
+
}, Ht = () => P.value, Ue = () => {
|
|
3305
3382
|
var s, d;
|
|
3306
|
-
return ((d = (s =
|
|
3307
|
-
},
|
|
3383
|
+
return ((d = (s = ie.value) == null ? void 0 : s.data) == null ? void 0 : d.pens) || [];
|
|
3384
|
+
}, Vt = () => S, Te = /* @__PURE__ */ (() => {
|
|
3308
3385
|
let s = null;
|
|
3309
|
-
const d = /* @__PURE__ */ new Map(),
|
|
3310
|
-
var
|
|
3311
|
-
if (!((
|
|
3312
|
-
const
|
|
3313
|
-
if (!
|
|
3314
|
-
if (!
|
|
3315
|
-
const
|
|
3316
|
-
|
|
3386
|
+
const d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), y = (E) => {
|
|
3387
|
+
var u;
|
|
3388
|
+
if (!((u = E.children) != null && u.length)) return [];
|
|
3389
|
+
const I = E.id || "";
|
|
3390
|
+
if (!I) return [];
|
|
3391
|
+
if (!p.has(I) && ie.value) {
|
|
3392
|
+
const _ = ua(E, ie.value);
|
|
3393
|
+
p.set(I, _);
|
|
3317
3394
|
}
|
|
3318
|
-
return
|
|
3395
|
+
return p.get(I) || [];
|
|
3319
3396
|
}, N = () => {
|
|
3320
|
-
if (d.size === 0 || !
|
|
3321
|
-
const
|
|
3322
|
-
d.forEach(({ pen:
|
|
3323
|
-
switch (
|
|
3397
|
+
if (d.size === 0 || !P.value || !ie.value) return;
|
|
3398
|
+
const E = [], I = [], u = ie.value.animates;
|
|
3399
|
+
d.forEach(({ pen: _, dataItem: A, formKey: v }) => {
|
|
3400
|
+
switch (v) {
|
|
3324
3401
|
case "showChild":
|
|
3325
|
-
|
|
3402
|
+
U({ id: _.id, showChild: +A.value }, !1);
|
|
3326
3403
|
break;
|
|
3327
3404
|
case "text":
|
|
3328
|
-
|
|
3405
|
+
U({ id: _.id, text: A.value_disp || A.value }, !1);
|
|
3329
3406
|
break;
|
|
3330
3407
|
case "light_plate":
|
|
3331
3408
|
{
|
|
3332
|
-
const c = A.value === -1 ||
|
|
3333
|
-
|
|
3409
|
+
const c = A.value === -1 || it(A) ? "#999999" : Ut[A.value !== void 0 ? A.value : A.alarm_value], f = A.value === -1 || it(A) ? "#cccccc" : Ft[A.value !== void 0 ? A.value : A.alarm_value];
|
|
3410
|
+
U({ id: _.id, textColor: c, background: f }, !1);
|
|
3334
3411
|
}
|
|
3335
3412
|
break;
|
|
3336
3413
|
case "point_value":
|
|
3337
|
-
|
|
3338
|
-
|
|
3414
|
+
_.penType === S.POINT_VALUE && y(_).forEach((f) => {
|
|
3415
|
+
f.name === "text" && U({ id: f.id, text: A.value }, !1);
|
|
3339
3416
|
});
|
|
3340
3417
|
break;
|
|
3341
3418
|
case "online_state":
|
|
3342
3419
|
{
|
|
3343
3420
|
let c = A.value ? void 0 : "contrast(0%)";
|
|
3344
|
-
|
|
3345
|
-
|
|
3421
|
+
U({ id: _.id, filter: c }, !1), y(_).forEach((G) => {
|
|
3422
|
+
U({ id: G.id, filter: c }, !1);
|
|
3346
3423
|
});
|
|
3347
3424
|
}
|
|
3348
3425
|
break;
|
|
3349
3426
|
case "charged_state":
|
|
3350
3427
|
{
|
|
3351
|
-
const c = A.value ===
|
|
3352
|
-
c !==
|
|
3353
|
-
|
|
3428
|
+
const c = A.value === Ca.OFFLINE ? "contrast(0%)" : void 0;
|
|
3429
|
+
c !== _.filter && (U({ id: _.id, filter: c }, !1), y(_).forEach((G) => {
|
|
3430
|
+
U({ id: G.id, filter: c }, !1);
|
|
3354
3431
|
}));
|
|
3355
3432
|
}
|
|
3356
3433
|
break;
|
|
3357
3434
|
case "electric_direction":
|
|
3358
|
-
A.value ===
|
|
3435
|
+
A.value === xa.STOP ? u != null && u.has(_) && I.push(_) : !!A.value !== _.animateReverse && (U(
|
|
3359
3436
|
{
|
|
3360
|
-
id:
|
|
3437
|
+
id: _.id,
|
|
3361
3438
|
animateReverse: !!A.value
|
|
3362
3439
|
},
|
|
3363
3440
|
!1
|
|
3364
|
-
),
|
|
3441
|
+
), u != null && u.has(_) || E.push(_));
|
|
3365
3442
|
break;
|
|
3366
3443
|
case "electric_size":
|
|
3367
3444
|
{
|
|
3368
|
-
const c =
|
|
3369
|
-
c !== void 0 && c !==
|
|
3445
|
+
const c = Na[A.value];
|
|
3446
|
+
c !== void 0 && c !== _.lineWidth && U(
|
|
3370
3447
|
{
|
|
3371
|
-
id:
|
|
3448
|
+
id: _.id,
|
|
3372
3449
|
lineWidth: c
|
|
3373
3450
|
},
|
|
3374
3451
|
!1
|
|
@@ -3376,137 +3453,143 @@ const Rn = /* @__PURE__ */ Object.assign({
|
|
|
3376
3453
|
}
|
|
3377
3454
|
break;
|
|
3378
3455
|
default:
|
|
3379
|
-
|
|
3456
|
+
U(
|
|
3380
3457
|
{
|
|
3381
|
-
id:
|
|
3382
|
-
[
|
|
3458
|
+
id: _.id,
|
|
3459
|
+
[v]: A.value
|
|
3383
3460
|
},
|
|
3384
3461
|
!1
|
|
3385
3462
|
);
|
|
3386
3463
|
break;
|
|
3387
3464
|
}
|
|
3388
|
-
}),
|
|
3465
|
+
}), I.length > 0 && P.value.stopAnimate(I), E.length > 0 && P.value.startAnimate(E), d.clear(), P.value.render();
|
|
3389
3466
|
};
|
|
3390
|
-
return (
|
|
3391
|
-
|
|
3467
|
+
return (E, I) => {
|
|
3468
|
+
E != null && E.length && (E.forEach((u) => {
|
|
3392
3469
|
var A;
|
|
3393
|
-
const
|
|
3394
|
-
if ((A =
|
|
3395
|
-
if (!
|
|
3396
|
-
const
|
|
3470
|
+
const _ = u.form;
|
|
3471
|
+
if ((A = u.statusBindData) != null && A.length) {
|
|
3472
|
+
if (!C[I.guid]) return;
|
|
3473
|
+
const v = [...u.statusBindData], c = v.findIndex((f) => f.dataId === I.guid);
|
|
3397
3474
|
if (c !== -1) {
|
|
3398
|
-
const
|
|
3399
|
-
|
|
3400
|
-
(
|
|
3401
|
-
) || d.set(
|
|
3402
|
-
pen:
|
|
3475
|
+
const f = v[c];
|
|
3476
|
+
v.find(
|
|
3477
|
+
($) => f.sort < $.sort && C[$.dataId]
|
|
3478
|
+
) || d.set(u.id, {
|
|
3479
|
+
pen: u,
|
|
3403
3480
|
formKey: "showChild",
|
|
3404
|
-
dataItem:
|
|
3481
|
+
dataItem: x(l({}, I), { value: c })
|
|
3405
3482
|
});
|
|
3406
3483
|
}
|
|
3407
|
-
} else
|
|
3408
|
-
if (!(Array.isArray(
|
|
3409
|
-
(
|
|
3484
|
+
} else _ != null && _.length && _.forEach((v) => {
|
|
3485
|
+
if (!(Array.isArray(v.dataIds) ? v.dataIds : [v.dataIds]).some(
|
|
3486
|
+
($) => ($ == null ? void 0 : $.dataId) && (($ == null ? void 0 : $.dataId) === I.dataId || ($ == null ? void 0 : $.dataId) === I.point_id)
|
|
3410
3487
|
)) return;
|
|
3411
|
-
const
|
|
3412
|
-
d.set(
|
|
3413
|
-
pen:
|
|
3414
|
-
dataItem:
|
|
3415
|
-
formKey:
|
|
3488
|
+
const G = `${u.id}-${v.key}`;
|
|
3489
|
+
d.set(G, {
|
|
3490
|
+
pen: u,
|
|
3491
|
+
dataItem: I,
|
|
3492
|
+
formKey: v.key
|
|
3416
3493
|
});
|
|
3417
3494
|
});
|
|
3418
3495
|
}), s && clearTimeout(s), s = setTimeout(() => {
|
|
3419
3496
|
N(), s = null;
|
|
3420
|
-
},
|
|
3497
|
+
}, ee.value.debounceDelay));
|
|
3421
3498
|
};
|
|
3422
|
-
})(),
|
|
3423
|
-
if (
|
|
3499
|
+
})(), Bt = (s) => {
|
|
3500
|
+
if (P.value) {
|
|
3424
3501
|
for (let d = 0; d < s.length; d++) {
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3427
|
-
const
|
|
3502
|
+
const p = s[d];
|
|
3503
|
+
C[p.dataId || p.point_id] = p.value_disp || p.value;
|
|
3504
|
+
const y = P.value.find(p.dataId);
|
|
3428
3505
|
setTimeout(() => {
|
|
3429
|
-
|
|
3430
|
-
},
|
|
3506
|
+
Te(y, p);
|
|
3507
|
+
}, ee.value.messageDelay);
|
|
3431
3508
|
}
|
|
3432
|
-
|
|
3509
|
+
P.value.render(), n.customCallbacks.onBatchUpdate && n.customCallbacks.onBatchUpdate(s);
|
|
3433
3510
|
}
|
|
3434
|
-
},
|
|
3435
|
-
if (!
|
|
3436
|
-
const
|
|
3437
|
-
for (let
|
|
3438
|
-
const N =
|
|
3439
|
-
let
|
|
3440
|
-
d ?
|
|
3511
|
+
}, Kt = (s, d = !1) => {
|
|
3512
|
+
if (!P.value) return;
|
|
3513
|
+
const p = Ue();
|
|
3514
|
+
for (let y = 0; y < p.length; y++) {
|
|
3515
|
+
const N = p[y];
|
|
3516
|
+
let E = !1;
|
|
3517
|
+
d ? E = s === N.dataProp : E = s === 5 ? !0 : N.dataProp <= s, U({ id: N.id, visible: E }, !1);
|
|
3441
3518
|
}
|
|
3442
|
-
|
|
3519
|
+
P.value.fitView(), P.value.render(), n.customCallbacks.onLevelChange && n.customCallbacks.onLevelChange(s, d);
|
|
3443
3520
|
};
|
|
3444
|
-
return
|
|
3521
|
+
return $e(
|
|
3445
3522
|
() => [n.gid, n.url, n.data, n.lang, n.local, n.isFactory],
|
|
3446
3523
|
() => {
|
|
3447
|
-
|
|
3524
|
+
ge();
|
|
3448
3525
|
}
|
|
3449
|
-
),
|
|
3526
|
+
), $e(
|
|
3450
3527
|
() => n.showMap,
|
|
3451
3528
|
(s) => {
|
|
3452
|
-
|
|
3529
|
+
P.value && (s ? P.value.showMap() : P.value.hideMap());
|
|
3453
3530
|
}
|
|
3454
|
-
),
|
|
3455
|
-
const s =
|
|
3456
|
-
s && s.on && s.on(
|
|
3457
|
-
}),
|
|
3458
|
-
|
|
3459
|
-
const s =
|
|
3460
|
-
s && s.off && s.off(
|
|
3531
|
+
), St(() => {
|
|
3532
|
+
const s = Ie();
|
|
3533
|
+
s && s.on && s.on(ee.value.graphSocket, F), ge();
|
|
3534
|
+
}), bt(() => {
|
|
3535
|
+
M = null;
|
|
3536
|
+
const s = Ie();
|
|
3537
|
+
s && s.off && s.off(ee.value.graphSocket, F), window.removeEventListener("mousemove", T);
|
|
3461
3538
|
}), e({
|
|
3462
|
-
setValue:
|
|
3463
|
-
getStage:
|
|
3464
|
-
getAllPens:
|
|
3465
|
-
getCustomPenType:
|
|
3466
|
-
batchUpdatePen:
|
|
3467
|
-
handleLineCross:
|
|
3468
|
-
changeVisibleByLevel:
|
|
3469
|
-
}), (s, d) => (
|
|
3470
|
-
|
|
3539
|
+
setValue: U,
|
|
3540
|
+
getStage: Ht,
|
|
3541
|
+
getAllPens: Ue,
|
|
3542
|
+
getCustomPenType: Vt,
|
|
3543
|
+
batchUpdatePen: Bt,
|
|
3544
|
+
handleLineCross: ca,
|
|
3545
|
+
changeVisibleByLevel: Kt
|
|
3546
|
+
}), (s, d) => (Q(), ce("div", {
|
|
3547
|
+
ref_key: "previewRef",
|
|
3548
|
+
ref: w,
|
|
3549
|
+
class: "meta2d-preview"
|
|
3550
|
+
}, [
|
|
3551
|
+
We(Un, {
|
|
3471
3552
|
ref_key: "graphRef",
|
|
3472
|
-
ref:
|
|
3473
|
-
url:
|
|
3474
|
-
local:
|
|
3553
|
+
ref: ae,
|
|
3554
|
+
url: J.value,
|
|
3555
|
+
local: Z.value,
|
|
3475
3556
|
data: n.data,
|
|
3476
3557
|
"dev-config": n.devConfig,
|
|
3477
3558
|
preview: "",
|
|
3478
|
-
onLoaded:
|
|
3559
|
+
onLoaded: ye
|
|
3479
3560
|
}, null, 8, ["url", "local", "data", "dev-config"]),
|
|
3480
|
-
|
|
3481
|
-
|
|
3561
|
+
ke(o) ? (Q(), ce("div", Gn, [
|
|
3562
|
+
We(ke(oa), {
|
|
3482
3563
|
type: "primary",
|
|
3483
|
-
onClick:
|
|
3564
|
+
onClick: g
|
|
3484
3565
|
}, {
|
|
3485
|
-
default:
|
|
3486
|
-
|
|
3566
|
+
default: Tt(() => [...d[1] || (d[1] = [
|
|
3567
|
+
Jt("返回", -1)
|
|
3487
3568
|
])]),
|
|
3488
3569
|
_: 1
|
|
3489
3570
|
})
|
|
3490
|
-
])) :
|
|
3491
|
-
|
|
3571
|
+
])) : Oe("", !0),
|
|
3572
|
+
L.value ? (Q(), Pe(bn, {
|
|
3492
3573
|
key: 1,
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3574
|
+
ref_key: "panelRef",
|
|
3575
|
+
ref: b,
|
|
3576
|
+
data: H.value,
|
|
3577
|
+
style: yt({
|
|
3578
|
+
top: X.value.top + "px",
|
|
3579
|
+
left: X.value.left + "px",
|
|
3580
|
+
position: "absolute",
|
|
3498
3581
|
pointerEvents: "none"
|
|
3499
3582
|
}),
|
|
3500
|
-
onClose: d[0] || (d[0] = (
|
|
3501
|
-
}, null, 8, ["data", "style"])) :
|
|
3502
|
-
]));
|
|
3583
|
+
onClose: d[0] || (d[0] = (p) => L.value = !1)
|
|
3584
|
+
}, null, 8, ["data", "style"])) : Oe("", !0)
|
|
3585
|
+
], 512));
|
|
3503
3586
|
}
|
|
3504
|
-
}),
|
|
3505
|
-
|
|
3506
|
-
const
|
|
3507
|
-
r.component(
|
|
3508
|
-
},
|
|
3587
|
+
}), De = /* @__PURE__ */ Me(Hn, [["__scopeId", "data-v-f95a5793"]]);
|
|
3588
|
+
De.name || (De.name = "SyGraph");
|
|
3589
|
+
const Vn = (r) => {
|
|
3590
|
+
r.component(De.name || "SyGraph", De);
|
|
3591
|
+
}, hr = { install: Vn };
|
|
3509
3592
|
export {
|
|
3510
|
-
|
|
3511
|
-
|
|
3593
|
+
De as SyGraph,
|
|
3594
|
+
hr as default
|
|
3512
3595
|
};
|