@nywqs/scada-engine 1.1.20 → 1.1.21
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 +159 -3
- package/dist/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +617 -586
- package/dist/scada-engine.umd.js +11 -11
- package/package.json +1 -1
package/dist/scada-engine.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var so = Object.defineProperty;
|
|
2
2
|
var io = (r, l, o) => l in r ? so(r, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[l] = o;
|
|
3
3
|
var Me = (r, l, o) => io(r, typeof l != "symbol" ? l + "" : l, o);
|
|
4
|
-
import { reactive as Ce, createApp as ao, h as ro, defineComponent as R, createElementBlock as v, openBlock as f, createElementVNode as e, renderSlot as uo, createCommentVNode as E, createVNode as
|
|
4
|
+
import { reactive as Ce, createApp as ao, h as ro, defineComponent as R, createElementBlock as v, openBlock as f, createElementVNode as e, renderSlot as uo, createCommentVNode as E, createVNode as pe, unref as Se, computed as U, withDirectives as L, normalizeClass as ie, Fragment as Z, renderList as le, toDisplayString as S, vShow as Ee, ref as $, createStaticVNode as re, vModelSelect as be, vModelText as se, vModelCheckbox as He, createTextVNode as Te, watch as ne, withModifiers as Ie, nextTick as it, onMounted as ce, onUnmounted as ke, createBlock as _e, inject as tt, vModelDynamic as co, provide as vt, resolveDynamicComponent as po, normalizeStyle as fo, onBeforeUnmount as vo } from "vue";
|
|
5
5
|
import { ObjectExt as go, Node as gt, Markup as mo, Graph as Pe, NodeView as mt, Shape as ho } from "@antv/x6";
|
|
6
6
|
import { Selection as ht } from "@antv/x6-plugin-selection";
|
|
7
7
|
import { Snapline as yo } from "@antv/x6-plugin-snapline";
|
|
8
8
|
import * as yt from "echarts";
|
|
9
9
|
/*!
|
|
10
|
-
* @nywqs/scada-engine v1.1.
|
|
10
|
+
* @nywqs/scada-engine v1.1.21
|
|
11
11
|
* Copyright (c) 2025 leoncheng
|
|
12
12
|
* Licensed under proprietary license - see LICENSE file
|
|
13
13
|
* Contact: nywqs@outlook.com
|
|
@@ -501,42 +501,42 @@ const ko = {
|
|
|
501
501
|
onClick: i[3] || (i[3] = (c) => a("alignLeft")),
|
|
502
502
|
title: "左对齐"
|
|
503
503
|
}, [
|
|
504
|
-
|
|
504
|
+
pe(Se(wo), { class: "icon-svg" })
|
|
505
505
|
]),
|
|
506
506
|
e("button", {
|
|
507
507
|
class: "toolbar-btn",
|
|
508
508
|
onClick: i[4] || (i[4] = (c) => a("alignCenter")),
|
|
509
509
|
title: "水平居中"
|
|
510
510
|
}, [
|
|
511
|
-
|
|
511
|
+
pe(Se(xo), { class: "icon-svg" })
|
|
512
512
|
]),
|
|
513
513
|
e("button", {
|
|
514
514
|
class: "toolbar-btn",
|
|
515
515
|
onClick: i[5] || (i[5] = (c) => a("alignRight")),
|
|
516
516
|
title: "右对齐"
|
|
517
517
|
}, [
|
|
518
|
-
|
|
518
|
+
pe(Se(Co), { class: "icon-svg" })
|
|
519
519
|
]),
|
|
520
520
|
e("button", {
|
|
521
521
|
class: "toolbar-btn",
|
|
522
522
|
onClick: i[6] || (i[6] = (c) => a("alignTop")),
|
|
523
523
|
title: "顶部对齐"
|
|
524
524
|
}, [
|
|
525
|
-
|
|
525
|
+
pe(Se(zo), { class: "icon-svg" })
|
|
526
526
|
]),
|
|
527
527
|
e("button", {
|
|
528
528
|
class: "toolbar-btn",
|
|
529
529
|
onClick: i[7] || (i[7] = (c) => a("alignMiddle")),
|
|
530
530
|
title: "垂直居中"
|
|
531
531
|
}, [
|
|
532
|
-
|
|
532
|
+
pe(Se(Eo), { class: "icon-svg" })
|
|
533
533
|
]),
|
|
534
534
|
e("button", {
|
|
535
535
|
class: "toolbar-btn",
|
|
536
536
|
onClick: i[8] || (i[8] = (c) => a("alignBottom")),
|
|
537
537
|
title: "底部对齐"
|
|
538
538
|
}, [
|
|
539
|
-
|
|
539
|
+
pe(Se(Io), { class: "icon-svg" })
|
|
540
540
|
])
|
|
541
541
|
])) : E("", !0),
|
|
542
542
|
o.selectedNodesCount >= 3 ? (f(), v("div", Uo)) : E("", !0),
|
|
@@ -546,14 +546,14 @@ const ko = {
|
|
|
546
546
|
onClick: i[9] || (i[9] = (c) => a("distributeHorizontal")),
|
|
547
547
|
title: "横向分布"
|
|
548
548
|
}, [
|
|
549
|
-
|
|
549
|
+
pe(Se(Vo), { class: "icon-svg" })
|
|
550
550
|
]),
|
|
551
551
|
e("button", {
|
|
552
552
|
class: "toolbar-btn",
|
|
553
553
|
onClick: i[10] || (i[10] = (c) => a("distributeVertical")),
|
|
554
554
|
title: "纵向分布"
|
|
555
555
|
}, [
|
|
556
|
-
|
|
556
|
+
pe(Se(Po), { class: "icon-svg" })
|
|
557
557
|
])
|
|
558
558
|
])) : E("", !0)
|
|
559
559
|
]),
|
|
@@ -603,12 +603,12 @@ const ko = {
|
|
|
603
603
|
])
|
|
604
604
|
]));
|
|
605
605
|
}
|
|
606
|
-
}),
|
|
606
|
+
}), j = (r, l) => {
|
|
607
607
|
const o = r.__vccOpts || r;
|
|
608
608
|
for (const [a, t] of l)
|
|
609
609
|
o[a] = t;
|
|
610
610
|
return o;
|
|
611
|
-
}, kt = /* @__PURE__ */
|
|
611
|
+
}, kt = /* @__PURE__ */ j(Ho, [["__scopeId", "data-v-9bbedc41"]]), ot = [
|
|
612
612
|
{
|
|
613
613
|
key: "animationEnabled",
|
|
614
614
|
label: "启用动画",
|
|
@@ -3346,11 +3346,11 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3346
3346
|
}, [
|
|
3347
3347
|
g[2] || (g[2] = e("h4", { class: "section-title" }, "基础组件", -1)),
|
|
3348
3348
|
e("span", {
|
|
3349
|
-
class:
|
|
3349
|
+
class: ie(["toggle-icon", { collapsed: a.basic }])
|
|
3350
3350
|
}, "▼", 2)
|
|
3351
3351
|
]),
|
|
3352
3352
|
L(e("div", el, [
|
|
3353
|
-
(f(!0), v(
|
|
3353
|
+
(f(!0), v(Z, null, le(i.value, (p) => (f(), v("div", {
|
|
3354
3354
|
key: p.metadata.id,
|
|
3355
3355
|
class: "component-item",
|
|
3356
3356
|
onClick: (n) => d(p),
|
|
@@ -3370,11 +3370,11 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3370
3370
|
}, [
|
|
3371
3371
|
g[3] || (g[3] = e("h4", { class: "section-title" }, "IoT组件", -1)),
|
|
3372
3372
|
e("span", {
|
|
3373
|
-
class:
|
|
3373
|
+
class: ie(["toggle-icon", { collapsed: a.iot }])
|
|
3374
3374
|
}, "▼", 2)
|
|
3375
3375
|
]),
|
|
3376
3376
|
L(e("div", sl, [
|
|
3377
|
-
(f(!0), v(
|
|
3377
|
+
(f(!0), v(Z, null, le(c.value, (p) => (f(), v("div", {
|
|
3378
3378
|
key: p.metadata.id,
|
|
3379
3379
|
class: "component-item",
|
|
3380
3380
|
onClick: (n) => d(p),
|
|
@@ -3390,7 +3390,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3390
3390
|
])
|
|
3391
3391
|
]));
|
|
3392
3392
|
}
|
|
3393
|
-
}), Ut = /* @__PURE__ */
|
|
3393
|
+
}), Ut = /* @__PURE__ */ j(dl, [["__scopeId", "data-v-7e281fd3"]]), ul = { class: "canvas-area" }, cl = /* @__PURE__ */ R({
|
|
3394
3394
|
__name: "CanvasArea",
|
|
3395
3395
|
setup(r, { expose: l }) {
|
|
3396
3396
|
const o = $();
|
|
@@ -3404,7 +3404,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3404
3404
|
}, null, 512)
|
|
3405
3405
|
]));
|
|
3406
3406
|
}
|
|
3407
|
-
}), pl = /* @__PURE__ */
|
|
3407
|
+
}), pl = /* @__PURE__ */ j(cl, [["__scopeId", "data-v-a869f6aa"]]), fl = { class: "canvas-config-panel" }, vl = { class: "panel-content" }, gl = { class: "config-section" }, ml = { class: "config-item" }, hl = {
|
|
3408
3408
|
key: 0,
|
|
3409
3409
|
class: "config-item"
|
|
3410
3410
|
}, yl = { class: "number-input-group" }, bl = {
|
|
@@ -3468,7 +3468,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3468
3468
|
onChange: i,
|
|
3469
3469
|
class: "config-select"
|
|
3470
3470
|
}, [...s[23] || (s[23] = [
|
|
3471
|
-
|
|
3471
|
+
re('<option value="1920*1080" data-v-be44eb59>1920*1080</option><option value="1366*768" data-v-be44eb59>1366*768</option><option value="1280*720" data-v-be44eb59>1280*720</option><option value="800*600" data-v-be44eb59>800*600</option><option value="custom" data-v-be44eb59>自定义</option>', 5)
|
|
3472
3472
|
])], 544), [
|
|
3473
3473
|
[be, l.value.size.preset]
|
|
3474
3474
|
])
|
|
@@ -3489,7 +3489,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3489
3489
|
class: "config-number"
|
|
3490
3490
|
}, null, 544), [
|
|
3491
3491
|
[
|
|
3492
|
-
|
|
3492
|
+
se,
|
|
3493
3493
|
a.value,
|
|
3494
3494
|
void 0,
|
|
3495
3495
|
{ number: !0 }
|
|
@@ -3517,7 +3517,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3517
3517
|
class: "config-number"
|
|
3518
3518
|
}, null, 544), [
|
|
3519
3519
|
[
|
|
3520
|
-
|
|
3520
|
+
se,
|
|
3521
3521
|
t.value,
|
|
3522
3522
|
void 0,
|
|
3523
3523
|
{ number: !0 }
|
|
@@ -3544,7 +3544,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3544
3544
|
class: "config-slider"
|
|
3545
3545
|
}, null, 512), [
|
|
3546
3546
|
[
|
|
3547
|
-
|
|
3547
|
+
se,
|
|
3548
3548
|
l.value.zoom.scale,
|
|
3549
3549
|
void 0,
|
|
3550
3550
|
{ number: !0 }
|
|
@@ -3566,7 +3566,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3566
3566
|
class: "config-number"
|
|
3567
3567
|
}, null, 512), [
|
|
3568
3568
|
[
|
|
3569
|
-
|
|
3569
|
+
se,
|
|
3570
3570
|
l.value.offset.x,
|
|
3571
3571
|
void 0,
|
|
3572
3572
|
{ number: !0 }
|
|
@@ -3591,7 +3591,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3591
3591
|
class: "config-number"
|
|
3592
3592
|
}, null, 512), [
|
|
3593
3593
|
[
|
|
3594
|
-
|
|
3594
|
+
se,
|
|
3595
3595
|
l.value.offset.y,
|
|
3596
3596
|
void 0,
|
|
3597
3597
|
{ number: !0 }
|
|
@@ -3613,7 +3613,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3613
3613
|
"onUpdate:modelValue": s[14] || (s[14] = (b) => l.value.background.color = b),
|
|
3614
3614
|
class: "config-color"
|
|
3615
3615
|
}, null, 512), [
|
|
3616
|
-
[
|
|
3616
|
+
[se, l.value.background.color]
|
|
3617
3617
|
])
|
|
3618
3618
|
]),
|
|
3619
3619
|
e("div", zl, [
|
|
@@ -3723,7 +3723,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3723
3723
|
class: "config-number"
|
|
3724
3724
|
}, null, 512), [
|
|
3725
3725
|
[
|
|
3726
|
-
|
|
3726
|
+
se,
|
|
3727
3727
|
l.value.grid.size,
|
|
3728
3728
|
void 0,
|
|
3729
3729
|
{ number: !0 }
|
|
@@ -3739,7 +3739,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3739
3739
|
])
|
|
3740
3740
|
]));
|
|
3741
3741
|
}
|
|
3742
|
-
}), Gt = /* @__PURE__ */
|
|
3742
|
+
}), Gt = /* @__PURE__ */ j(Fl, [["__scopeId", "data-v-be44eb59"]]), jl = { class: "tab-pane" }, Hl = { class: "property-section" }, ql = { class: "property-item-inline" }, Jl = ["value"], Yl = { class: "property-item-inline" }, Xl = ["value"], Kl = { class: "property-item-inline" }, Ql = ["value"], Zl = { class: "property-section" }, en = { class: "property-row" }, tn = { class: "property-item" }, on = ["value"], ln = { class: "property-item" }, nn = ["value"], sn = { class: "property-row" }, an = { class: "property-item" }, rn = ["value"], dn = { class: "property-item" }, un = ["value"], cn = { class: "property-section" }, pn = { class: "property-item-inline" }, fn = ["value"], vn = { class: "property-item-inline" }, gn = { class: "color-input-wrapper" }, mn = ["value"], hn = { class: "color-value" }, yn = { class: "property-item-inline" }, bn = { class: "color-input-wrapper" }, kn = ["value"], xn = { class: "color-value" }, $n = { class: "property-item-inline" }, wn = ["value"], _n = { class: "property-item-inline" }, Cn = ["value"], Sn = {
|
|
3743
3743
|
key: 0,
|
|
3744
3744
|
class: "property-section"
|
|
3745
3745
|
}, In = {
|
|
@@ -3794,7 +3794,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3794
3794
|
a("update-dynamic-prop", d.path, p);
|
|
3795
3795
|
};
|
|
3796
3796
|
return (d, u) => {
|
|
3797
|
-
var g, p, n, h, m, s, b, P, O, w, x, y, _, C, W,
|
|
3797
|
+
var g, p, n, h, m, s, b, P, O, w, x, y, _, C, W, Y, J;
|
|
3798
3798
|
return f(), v("div", jl, [
|
|
3799
3799
|
e("div", Hl, [
|
|
3800
3800
|
u[13] || (u[13] = e("h4", null, "基础信息", -1)),
|
|
@@ -3913,14 +3913,14 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3913
3913
|
min: "0",
|
|
3914
3914
|
max: "1",
|
|
3915
3915
|
step: "0.1",
|
|
3916
|
-
value: ((
|
|
3916
|
+
value: ((J = (Y = r.nodeAttrs) == null ? void 0 : Y.body) == null ? void 0 : J.opacity) !== void 0 ? r.nodeAttrs.body.opacity : 1,
|
|
3917
3917
|
onInput: u[9] || (u[9] = (T) => d.$emit("update-opacity", T))
|
|
3918
3918
|
}, null, 40, Cn)
|
|
3919
3919
|
])
|
|
3920
3920
|
]),
|
|
3921
3921
|
t.value.length > 0 ? (f(), v("div", Sn, [
|
|
3922
3922
|
u[25] || (u[25] = e("h4", null, "组件属性", -1)),
|
|
3923
|
-
(f(!0), v(
|
|
3923
|
+
(f(!0), v(Z, null, le(t.value, (T) => (f(), v("div", {
|
|
3924
3924
|
key: T.key,
|
|
3925
3925
|
class: "property-item-inline"
|
|
3926
3926
|
}, [
|
|
@@ -3932,13 +3932,13 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3932
3932
|
key: 0,
|
|
3933
3933
|
type: "text",
|
|
3934
3934
|
value: i(T),
|
|
3935
|
-
onInput: (
|
|
3935
|
+
onInput: (A) => c(T, A),
|
|
3936
3936
|
placeholder: T.defaultValue
|
|
3937
3937
|
}, null, 40, Dn)) : T.type === "number" ? (f(), v("input", {
|
|
3938
3938
|
key: 1,
|
|
3939
3939
|
type: "number",
|
|
3940
3940
|
value: i(T),
|
|
3941
|
-
onInput: (
|
|
3941
|
+
onInput: (A) => c(T, A),
|
|
3942
3942
|
min: T.min,
|
|
3943
3943
|
max: T.max,
|
|
3944
3944
|
step: T.step
|
|
@@ -3946,32 +3946,32 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
3946
3946
|
e("input", {
|
|
3947
3947
|
type: "color",
|
|
3948
3948
|
value: i(T),
|
|
3949
|
-
onInput: (
|
|
3949
|
+
onInput: (A) => c(T, A)
|
|
3950
3950
|
}, null, 40, zn),
|
|
3951
3951
|
e("span", Tn, S(i(T)), 1)
|
|
3952
3952
|
])) : T.type === "boolean" ? (f(), v("div", Vn, [
|
|
3953
3953
|
e("input", {
|
|
3954
3954
|
type: "checkbox",
|
|
3955
3955
|
checked: i(T),
|
|
3956
|
-
onChange: (
|
|
3956
|
+
onChange: (A) => c(T, A)
|
|
3957
3957
|
}, null, 40, An),
|
|
3958
3958
|
e("span", Pn, S(i(T) ? "是" : "否"), 1)
|
|
3959
3959
|
])) : T.type === "select" ? (f(), v("select", {
|
|
3960
3960
|
key: 4,
|
|
3961
3961
|
value: i(T),
|
|
3962
|
-
onChange: (
|
|
3962
|
+
onChange: (A) => c(T, A)
|
|
3963
3963
|
}, [
|
|
3964
|
-
(f(!0), v(
|
|
3965
|
-
key:
|
|
3966
|
-
value:
|
|
3967
|
-
}, S(
|
|
3964
|
+
(f(!0), v(Z, null, le(T.options, (A) => (f(), v("option", {
|
|
3965
|
+
key: A.value,
|
|
3966
|
+
value: A.value
|
|
3967
|
+
}, S(A.label), 9, On))), 128))
|
|
3968
3968
|
], 40, Mn)) : E("", !0)
|
|
3969
3969
|
]))), 128))
|
|
3970
3970
|
])) : E("", !0)
|
|
3971
3971
|
]);
|
|
3972
3972
|
};
|
|
3973
3973
|
}
|
|
3974
|
-
}), Ft = /* @__PURE__ */
|
|
3974
|
+
}), Ft = /* @__PURE__ */ j(Rn, [["__scopeId", "data-v-e63074f3"]]), Ln = { class: "tab-pane" }, Wn = { class: "property-section" }, Bn = { class: "property-item-inline" }, Un = ["value"], Gn = {
|
|
3975
3975
|
key: 0,
|
|
3976
3976
|
class: "property-section"
|
|
3977
3977
|
}, Fn = { class: "property-item-inline" }, jn = ["value"], Hn = { class: "property-item-inline" }, qn = ["value"], Jn = { class: "property-item-inline" }, Yn = ["value"], Xn = { class: "property-item-inline" }, Kn = ["value"], Qn = { class: "property-item-inline" }, Zn = ["value"], es = { class: "property-item-inline" }, ts = ["value"], os = {
|
|
@@ -4001,7 +4001,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4001
4001
|
enabled: !0,
|
|
4002
4002
|
retryCount: 3
|
|
4003
4003
|
});
|
|
4004
|
-
|
|
4004
|
+
ne(() => o.selectedNode, (p) => {
|
|
4005
4005
|
if (p) {
|
|
4006
4006
|
const n = p.getData();
|
|
4007
4007
|
n != null && n.dataSource ? t.value = { ...n.dataSource } : t.value = {
|
|
@@ -4050,7 +4050,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4050
4050
|
value: t.value.type,
|
|
4051
4051
|
onChange: i
|
|
4052
4052
|
}, [...n[23] || (n[23] = [
|
|
4053
|
-
|
|
4053
|
+
re('<option value="none" data-v-5b515f8a>无数据源</option><option value="mqtt" data-v-5b515f8a>MQTT</option><option value="websocket" data-v-5b515f8a>WebSocket</option><option value="http" data-v-5b515f8a>HTTP</option><option value="sse" data-v-5b515f8a>SSE</option><option value="static" data-v-5b515f8a>静态数据</option>', 6)
|
|
4054
4054
|
])], 40, Un)
|
|
4055
4055
|
])
|
|
4056
4056
|
]),
|
|
@@ -4302,7 +4302,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4302
4302
|
])) : E("", !0)
|
|
4303
4303
|
]));
|
|
4304
4304
|
}
|
|
4305
|
-
}), Js = /* @__PURE__ */
|
|
4305
|
+
}), Js = /* @__PURE__ */ j(qs, [["__scopeId", "data-v-5b515f8a"]]), Ys = { class: "edge-properties-tab" }, Xs = { class: "property-section" }, Ks = { class: "property-item" }, Qs = { class: "color-input-wrapper" }, Zs = ["value"], ei = ["value"], ti = { class: "property-item" }, oi = { class: "number-input-wrapper" }, li = ["value"], ni = { class: "property-item" }, si = ["value"], ii = { class: "property-item" }, ai = { class: "slider-wrapper" }, ri = ["value"], di = { class: "slider-value" }, ui = { class: "property-item" }, ci = ["value"], pi = {
|
|
4306
4306
|
key: 0,
|
|
4307
4307
|
class: "property-item"
|
|
4308
4308
|
}, fi = { class: "number-input-wrapper" }, vi = ["value"], gi = { class: "property-section" }, mi = { class: "property-item" }, hi = ["value"], yi = { class: "property-item" }, bi = ["value"], ki = { class: "property-section" }, xi = { class: "property-item" }, $i = ["value"], wi = { class: "property-item" }, _i = ["value"], Ci = /* @__PURE__ */ R({
|
|
@@ -4418,7 +4418,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4418
4418
|
});
|
|
4419
4419
|
};
|
|
4420
4420
|
return (_, C) => {
|
|
4421
|
-
var W,
|
|
4421
|
+
var W, Y, J, T, A, B, ge, xe;
|
|
4422
4422
|
return f(), v("div", Ys, [
|
|
4423
4423
|
e("div", Xs, [
|
|
4424
4424
|
C[10] || (C[10] = e("h4", { class: "section-title" }, "线条样式", -1)),
|
|
@@ -4434,7 +4434,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4434
4434
|
e("input", {
|
|
4435
4435
|
type: "text",
|
|
4436
4436
|
class: "color-text",
|
|
4437
|
-
value: ((
|
|
4437
|
+
value: ((Y = t.value.line) == null ? void 0 : Y.stroke) || "#10b981",
|
|
4438
4438
|
onInput: i
|
|
4439
4439
|
}, null, 40, ei)
|
|
4440
4440
|
])
|
|
@@ -4448,7 +4448,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4448
4448
|
min: "1",
|
|
4449
4449
|
max: "20",
|
|
4450
4450
|
step: "1",
|
|
4451
|
-
value: ((
|
|
4451
|
+
value: ((J = t.value.line) == null ? void 0 : J.strokeWidth) || 2,
|
|
4452
4452
|
onInput: c
|
|
4453
4453
|
}, null, 40, li),
|
|
4454
4454
|
C[1] || (C[1] = e("span", { class: "input-unit" }, "px", -1))
|
|
@@ -4518,7 +4518,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4518
4518
|
value: p("source"),
|
|
4519
4519
|
onChange: h
|
|
4520
4520
|
}, [...C[11] || (C[11] = [
|
|
4521
|
-
|
|
4521
|
+
re('<option value="none" data-v-e47f1784>无</option><option value="block" data-v-e47f1784>实心箭头</option><option value="classic" data-v-e47f1784>经典箭头</option><option value="diamond" data-v-e47f1784>菱形</option><option value="circle" data-v-e47f1784>圆形</option>', 5)
|
|
4522
4522
|
])], 40, hi)
|
|
4523
4523
|
]),
|
|
4524
4524
|
e("div", yi, [
|
|
@@ -4528,7 +4528,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4528
4528
|
value: p("target"),
|
|
4529
4529
|
onChange: m
|
|
4530
4530
|
}, [...C[13] || (C[13] = [
|
|
4531
|
-
|
|
4531
|
+
re('<option value="none" data-v-e47f1784>无</option><option value="block" data-v-e47f1784>实心箭头</option><option value="classic" data-v-e47f1784>经典箭头</option><option value="diamond" data-v-e47f1784>菱形</option><option value="circle" data-v-e47f1784>圆形</option>', 5)
|
|
4532
4532
|
])], 40, bi)
|
|
4533
4533
|
])
|
|
4534
4534
|
]),
|
|
@@ -4538,7 +4538,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4538
4538
|
C[17] || (C[17] = e("label", { class: "property-label" }, "路由方式", -1)),
|
|
4539
4539
|
e("select", {
|
|
4540
4540
|
class: "property-select",
|
|
4541
|
-
value: ((B = (
|
|
4541
|
+
value: ((B = (A = r.selectedEdge) == null ? void 0 : A.getRouter()) == null ? void 0 : B.name) || "manhattan",
|
|
4542
4542
|
onChange: s
|
|
4543
4543
|
}, [...C[16] || (C[16] = [
|
|
4544
4544
|
e("option", { value: "manhattan" }, "曼哈顿", -1),
|
|
@@ -4550,7 +4550,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4550
4550
|
C[19] || (C[19] = e("label", { class: "property-label" }, "连接器类型", -1)),
|
|
4551
4551
|
e("select", {
|
|
4552
4552
|
class: "property-select",
|
|
4553
|
-
value: ((xe = (
|
|
4553
|
+
value: ((xe = (ge = r.selectedEdge) == null ? void 0 : ge.getConnector()) == null ? void 0 : xe.name) || "rounded",
|
|
4554
4554
|
onChange: b
|
|
4555
4555
|
}, [...C[18] || (C[18] = [
|
|
4556
4556
|
e("option", { value: "rounded" }, "圆角", -1),
|
|
@@ -4568,7 +4568,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4568
4568
|
]);
|
|
4569
4569
|
};
|
|
4570
4570
|
}
|
|
4571
|
-
}), Si = /* @__PURE__ */
|
|
4571
|
+
}), Si = /* @__PURE__ */ j(Ci, [["__scopeId", "data-v-e47f1784"]]), Ii = { class: "event-card" }, Di = { class: "header-left" }, Ei = { class: "collapse-icon" }, Ni = { class: "event-title" }, zi = { class: "event-card-body" }, Ti = { class: "event-field" }, Vi = ["value"], Ai = { class: "event-field" }, Pi = ["value"], Mi = { class: "event-field" }, Oi = ["value"], Ri = { class: "condition-config" }, Li = ["value"], Wi = ["value"], Bi = ["value"], Ui = ["value"], Gi = {
|
|
4572
4572
|
key: 0,
|
|
4573
4573
|
class: "config-section"
|
|
4574
4574
|
}, Fi = {
|
|
@@ -4623,7 +4623,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4623
4623
|
value: r.event.type,
|
|
4624
4624
|
onChange: o[3] || (o[3] = (p) => l.$emit("update-field", "type", p))
|
|
4625
4625
|
}, [...o[13] || (o[13] = [
|
|
4626
|
-
|
|
4626
|
+
re('<option value="click" data-v-af7c633a>单击</option><option value="dblclick" data-v-af7c633a>双击</option><option value="mouseenter" data-v-af7c633a>鼠标移入</option><option value="mouseleave" data-v-af7c633a>鼠标移出</option><option value="focus" data-v-af7c633a>获取焦点</option><option value="blur" data-v-af7c633a>失去焦点</option><option value="input" data-v-af7c633a>输入</option><option value="change" data-v-af7c633a>值变化</option>', 8)
|
|
4627
4627
|
])], 40, Pi)
|
|
4628
4628
|
]),
|
|
4629
4629
|
e("div", Mi, [
|
|
@@ -4650,7 +4650,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4650
4650
|
onChange: o[5] || (o[5] = (p) => l.$emit("update-condition", "attribute", p))
|
|
4651
4651
|
}, [
|
|
4652
4652
|
o[17] || (o[17] = e("option", { value: "" }, "选择属性", -1)),
|
|
4653
|
-
(f(!0), v(
|
|
4653
|
+
(f(!0), v(Z, null, le(r.nodeProperties, (p) => (f(), v("option", {
|
|
4654
4654
|
key: p.key,
|
|
4655
4655
|
value: p.key
|
|
4656
4656
|
}, S(p.label), 9, Wi))), 128))
|
|
@@ -4661,7 +4661,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4661
4661
|
value: ((t = r.event.condition) == null ? void 0 : t.operator) || "==",
|
|
4662
4662
|
onChange: o[6] || (o[6] = (p) => l.$emit("update-condition", "operator", p))
|
|
4663
4663
|
}, [...o[18] || (o[18] = [
|
|
4664
|
-
|
|
4664
|
+
re('<option value="==" data-v-af7c633a>等于</option><option value="!=" data-v-af7c633a>不等于</option><option value=">" data-v-af7c633a>大于</option><option value=">=" data-v-af7c633a>大于等于</option><option value="<" data-v-af7c633a>小于</option><option value="<=" data-v-af7c633a>小于等于</option><option value="contains" data-v-af7c633a>包含</option>', 7)
|
|
4665
4665
|
])], 40, Bi),
|
|
4666
4666
|
o[22] || (o[22] = e("div", { class: "condition-label" }, "值", -1)),
|
|
4667
4667
|
e("input", {
|
|
@@ -4716,7 +4716,7 @@ const K = new Xo(), Ko = { class: "component-library" }, Qo = { class: "library-
|
|
|
4716
4716
|
]);
|
|
4717
4717
|
};
|
|
4718
4718
|
}
|
|
4719
|
-
}), jt = /* @__PURE__ */
|
|
4719
|
+
}), jt = /* @__PURE__ */ j(Ki, [["__scopeId", "data-v-af7c633a"]]);
|
|
4720
4720
|
var he = /* @__PURE__ */ ((r) => (r.BOOLEAN = "boolean", r.NUMBER = "number", r.STRING = "string", r))(he || {}), ye = /* @__PURE__ */ ((r) => (r.READ = "read", r.WRITE = "write", r.READ_WRITE = "readWrite", r))(ye || {}), Re = /* @__PURE__ */ ((r) => (r.ONLINE = "online", r.OFFLINE = "offline", r.ERROR = "error", r.MAINTENANCE = "maintenance", r))(Re || {}), Le = /* @__PURE__ */ ((r) => (r.PLC = "plc", r.SENSOR = "sensor", r.ACTUATOR = "actuator", r.METER = "meter", r.CAMERA = "camera", r.OTHER = "other", r))(Le || {});
|
|
4721
4721
|
const lt = [
|
|
4722
4722
|
// 1号温控设备
|
|
@@ -5114,21 +5114,21 @@ const Ht = (r) => lt.find((l) => l.id === r), Qi = (r, l) => {
|
|
|
5114
5114
|
placeholder: "搜索设备...",
|
|
5115
5115
|
class: "search-input"
|
|
5116
5116
|
}, null, 512), [
|
|
5117
|
-
[
|
|
5117
|
+
[se, d.value]
|
|
5118
5118
|
])
|
|
5119
5119
|
]),
|
|
5120
5120
|
e("div", na, [
|
|
5121
|
-
(f(!0), v(
|
|
5121
|
+
(f(!0), v(Z, null, le(g.value, (y) => {
|
|
5122
5122
|
var _;
|
|
5123
5123
|
return f(), v("div", {
|
|
5124
5124
|
key: y.id,
|
|
5125
|
-
class:
|
|
5125
|
+
class: ie(["device-item", { active: ((_ = i.value) == null ? void 0 : _.id) === y.id, offline: y.status === "offline" }]),
|
|
5126
5126
|
onClick: (C) => n(y)
|
|
5127
5127
|
}, [
|
|
5128
5128
|
e("div", ia, [
|
|
5129
5129
|
e("div", aa, [
|
|
5130
5130
|
e("span", {
|
|
5131
|
-
class:
|
|
5131
|
+
class: ie(["status-dot", y.status])
|
|
5132
5132
|
}, null, 2),
|
|
5133
5133
|
Te(" " + S(y.name), 1)
|
|
5134
5134
|
]),
|
|
@@ -5155,15 +5155,15 @@ const Ht = (r) => lt.find((l) => l.id === r), Qi = (r, l) => {
|
|
|
5155
5155
|
placeholder: "搜索点位...",
|
|
5156
5156
|
class: "search-input"
|
|
5157
5157
|
}, null, 512), [
|
|
5158
|
-
[
|
|
5158
|
+
[se, u.value]
|
|
5159
5159
|
])
|
|
5160
5160
|
])) : E("", !0),
|
|
5161
5161
|
e("div", ma, [
|
|
5162
|
-
i.value ? p.value.length === 0 ? (f(), v("div", ya, " 暂无点位 ")) : (f(!0), v(
|
|
5162
|
+
i.value ? p.value.length === 0 ? (f(), v("div", ya, " 暂无点位 ")) : (f(!0), v(Z, { key: 2 }, le(p.value, (y) => {
|
|
5163
5163
|
var _;
|
|
5164
5164
|
return f(), v("div", {
|
|
5165
5165
|
key: y.id,
|
|
5166
|
-
class:
|
|
5166
|
+
class: ie(["point-item", {
|
|
5167
5167
|
active: ((_ = c.value) == null ? void 0 : _.id) === y.id,
|
|
5168
5168
|
disabled: !y.enabled
|
|
5169
5169
|
}]),
|
|
@@ -5173,7 +5173,7 @@ const Ht = (r) => lt.find((l) => l.id === r), Qi = (r, l) => {
|
|
|
5173
5173
|
e("div", xa, [
|
|
5174
5174
|
Te(S(y.name) + " ", 1),
|
|
5175
5175
|
e("span", {
|
|
5176
|
-
class:
|
|
5176
|
+
class: ie(["access-mode", y.accessMode])
|
|
5177
5177
|
}, S(b(y.accessMode)), 3)
|
|
5178
5178
|
]),
|
|
5179
5179
|
e("div", $a, [
|
|
@@ -5185,7 +5185,7 @@ const Ht = (r) => lt.find((l) => l.id === r), Qi = (r, l) => {
|
|
|
5185
5185
|
x[6] || (x[6] = Te(" 当前值: ", -1)),
|
|
5186
5186
|
e("span", Ia, S(O(y)), 1),
|
|
5187
5187
|
e("span", {
|
|
5188
|
-
class:
|
|
5188
|
+
class: ie(["quality", y.quality])
|
|
5189
5189
|
}, S(y.quality), 3)
|
|
5190
5190
|
])) : E("", !0)
|
|
5191
5191
|
])
|
|
@@ -5208,7 +5208,7 @@ const Ht = (r) => lt.find((l) => l.id === r), Qi = (r, l) => {
|
|
|
5208
5208
|
])
|
|
5209
5209
|
])) : E("", !0);
|
|
5210
5210
|
}
|
|
5211
|
-
}), za = /* @__PURE__ */
|
|
5211
|
+
}), za = /* @__PURE__ */ j(Na, [["__scopeId", "data-v-7884b850"]]);
|
|
5212
5212
|
var ze = /* @__PURE__ */ ((r) => (r.DIRECT = "direct", r.BOOLEAN = "boolean", r.RANGE = "range", r.ENUM = "enum", r))(ze || {}), We = /* @__PURE__ */ ((r) => (r.BOOLEAN = "boolean", r.NUMBER = "number", r.STRING = "string", r))(We || {});
|
|
5213
5213
|
const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa = {
|
|
5214
5214
|
key: 0,
|
|
@@ -5254,7 +5254,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5254
5254
|
valueType: ""
|
|
5255
5255
|
// 默认未选择,强制用户选择
|
|
5256
5256
|
});
|
|
5257
|
-
|
|
5257
|
+
ne(() => o.modelValue, (O) => {
|
|
5258
5258
|
O && (t.value = { ...O });
|
|
5259
5259
|
}, { deep: !0 });
|
|
5260
5260
|
const i = () => {
|
|
@@ -5353,7 +5353,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5353
5353
|
"onUpdate:modelValue": w[1] || (w[1] = (x) => t.value.type = x),
|
|
5354
5354
|
onChange: u
|
|
5355
5355
|
}, [...w[10] || (w[10] = [
|
|
5356
|
-
|
|
5356
|
+
re('<option value="" data-v-ef9e0ee1>请选择映射类型</option><option value="direct" data-v-ef9e0ee1>直接映射(无转换)</option><option value="boolean" data-v-ef9e0ee1>布尔映射</option><option value="range" data-v-ef9e0ee1>范围映射</option><option value="enum" data-v-ef9e0ee1>枚举映射</option>', 5)
|
|
5357
5357
|
])], 544), [
|
|
5358
5358
|
[be, t.value.type]
|
|
5359
5359
|
]),
|
|
@@ -5379,7 +5379,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5379
5379
|
placeholder: "自定义单位,如: °C, MPa, %",
|
|
5380
5380
|
onInput: s
|
|
5381
5381
|
}, null, 544), [
|
|
5382
|
-
[
|
|
5382
|
+
[se, t.value.customUnit]
|
|
5383
5383
|
])
|
|
5384
5384
|
]))
|
|
5385
5385
|
])
|
|
@@ -5393,7 +5393,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5393
5393
|
placeholder: "例如: 运行、#00ff00",
|
|
5394
5394
|
onInput: s
|
|
5395
5395
|
}, null, 544), [
|
|
5396
|
-
[
|
|
5396
|
+
[se, t.value.trueValue]
|
|
5397
5397
|
])
|
|
5398
5398
|
]),
|
|
5399
5399
|
e("div", ja, [
|
|
@@ -5404,13 +5404,13 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5404
5404
|
placeholder: "例如: 停止、#ff0000",
|
|
5405
5405
|
onInput: s
|
|
5406
5406
|
}, null, 544), [
|
|
5407
|
-
[
|
|
5407
|
+
[se, t.value.falseValue]
|
|
5408
5408
|
])
|
|
5409
5409
|
])
|
|
5410
5410
|
])) : E("", !0),
|
|
5411
5411
|
t.value.type === "range" ? (f(), v("div", Ha, [
|
|
5412
5412
|
e("div", qa, [
|
|
5413
|
-
(f(!0), v(
|
|
5413
|
+
(f(!0), v(Z, null, le(t.value.rangeRules, (x, y) => (f(), v("div", {
|
|
5414
5414
|
key: y,
|
|
5415
5415
|
class: "range-rule"
|
|
5416
5416
|
}, [
|
|
@@ -5421,7 +5421,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5421
5421
|
onInput: s
|
|
5422
5422
|
}, null, 40, Ja), [
|
|
5423
5423
|
[
|
|
5424
|
-
|
|
5424
|
+
se,
|
|
5425
5425
|
x.min,
|
|
5426
5426
|
void 0,
|
|
5427
5427
|
{ number: !0 }
|
|
@@ -5435,7 +5435,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5435
5435
|
onInput: s
|
|
5436
5436
|
}, null, 40, Ya), [
|
|
5437
5437
|
[
|
|
5438
|
-
|
|
5438
|
+
se,
|
|
5439
5439
|
x.max,
|
|
5440
5440
|
void 0,
|
|
5441
5441
|
{ number: !0 }
|
|
@@ -5448,7 +5448,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5448
5448
|
placeholder: "映射值",
|
|
5449
5449
|
onInput: s
|
|
5450
5450
|
}, null, 40, Xa), [
|
|
5451
|
-
[
|
|
5451
|
+
[se, x.value]
|
|
5452
5452
|
]),
|
|
5453
5453
|
e("button", {
|
|
5454
5454
|
class: "btn-remove-rule",
|
|
@@ -5464,7 +5464,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5464
5464
|
])) : E("", !0),
|
|
5465
5465
|
t.value.type === "enum" ? (f(), v("div", Qa, [
|
|
5466
5466
|
e("div", Za, [
|
|
5467
|
-
(f(!0), v(
|
|
5467
|
+
(f(!0), v(Z, null, le(t.value.enumMappings, (x, y, _) => (f(), v("div", {
|
|
5468
5468
|
key: _,
|
|
5469
5469
|
class: "enum-mapping"
|
|
5470
5470
|
}, [
|
|
@@ -5481,7 +5481,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5481
5481
|
placeholder: "映射值",
|
|
5482
5482
|
onInput: s
|
|
5483
5483
|
}, null, 40, tr), [
|
|
5484
|
-
[
|
|
5484
|
+
[se, t.value.enumMappings[y]]
|
|
5485
5485
|
]),
|
|
5486
5486
|
e("button", {
|
|
5487
5487
|
class: "btn-remove-rule",
|
|
@@ -5498,7 +5498,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5498
5498
|
t.value.type !== "direct" ? (f(), v("div", lr, [
|
|
5499
5499
|
w[25] || (w[25] = e("label", null, "映射预览", -1)),
|
|
5500
5500
|
e("div", nr, [
|
|
5501
|
-
t.value.type === "boolean" ? (f(), v(
|
|
5501
|
+
t.value.type === "boolean" ? (f(), v(Z, { key: 0 }, [
|
|
5502
5502
|
e("div", sr, [
|
|
5503
5503
|
w[19] || (w[19] = e("span", { class: "preview-input" }, "true", -1)),
|
|
5504
5504
|
w[20] || (w[20] = e("span", { class: "preview-arrow" }, "→", -1)),
|
|
@@ -5509,14 +5509,14 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5509
5509
|
w[22] || (w[22] = e("span", { class: "preview-arrow" }, "→", -1)),
|
|
5510
5510
|
e("span", rr, S(t.value.falseValue || "false"), 1)
|
|
5511
5511
|
])
|
|
5512
|
-
], 64)) : t.value.type === "range" ? (f(!0), v(
|
|
5512
|
+
], 64)) : t.value.type === "range" ? (f(!0), v(Z, { key: 1 }, le(t.value.rangeRules, (x, y) => (f(), v("div", {
|
|
5513
5513
|
key: y,
|
|
5514
5514
|
class: "preview-item"
|
|
5515
5515
|
}, [
|
|
5516
5516
|
e("span", dr, "[" + S(x.min) + " ~ " + S(x.max) + "]", 1),
|
|
5517
5517
|
w[23] || (w[23] = e("span", { class: "preview-arrow" }, "→", -1)),
|
|
5518
5518
|
e("span", ur, S(x.value), 1)
|
|
5519
|
-
]))), 128)) : t.value.type === "enum" ? (f(!0), v(
|
|
5519
|
+
]))), 128)) : t.value.type === "enum" ? (f(!0), v(Z, { key: 2 }, le(t.value.enumMappings, (x, y) => (f(), v("div", {
|
|
5520
5520
|
key: y,
|
|
5521
5521
|
class: "preview-item"
|
|
5522
5522
|
}, [
|
|
@@ -5540,7 +5540,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5540
5540
|
])
|
|
5541
5541
|
])) : E("", !0);
|
|
5542
5542
|
}
|
|
5543
|
-
}), vr = /* @__PURE__ */
|
|
5543
|
+
}), vr = /* @__PURE__ */ j(fr, [["__scopeId", "data-v-ef9e0ee1"]]), gr = { class: "event-card" }, mr = { class: "header-left" }, hr = { class: "collapse-icon" }, yr = { class: "event-title" }, br = { class: "event-card-body" }, kr = { class: "property-item" }, xr = {
|
|
5544
5544
|
key: 0,
|
|
5545
5545
|
class: "selected-point"
|
|
5546
5546
|
}, $r = { class: "point-main" }, wr = { class: "device-name" }, _r = { class: "point-name" }, Cr = { class: "point-details" }, Sr = { class: "point-code" }, Ir = {
|
|
@@ -5569,9 +5569,9 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5569
5569
|
type: ze.DIRECT,
|
|
5570
5570
|
valueType: We.NUMBER
|
|
5571
5571
|
});
|
|
5572
|
-
|
|
5572
|
+
ne(() => o.binding.devicePointId, (m) => {
|
|
5573
5573
|
t.value = m || "";
|
|
5574
|
-
}),
|
|
5574
|
+
}), ne(() => o.binding.mapping, (m) => {
|
|
5575
5575
|
m && (d.value = m);
|
|
5576
5576
|
}, { deep: !0 });
|
|
5577
5577
|
const u = U(() => {
|
|
@@ -5646,7 +5646,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5646
5646
|
s[9] || (s[9] = e("span", { class: "selector-arrow" }, "›", -1))
|
|
5647
5647
|
])
|
|
5648
5648
|
]),
|
|
5649
|
-
|
|
5649
|
+
pe(za, {
|
|
5650
5650
|
visible: i.value,
|
|
5651
5651
|
"onUpdate:visible": s[3] || (s[3] = (b) => i.value = b),
|
|
5652
5652
|
modelValue: t.value,
|
|
@@ -5660,7 +5660,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5660
5660
|
onChange: s[5] || (s[5] = (b) => m.$emit("update-field", "targetProperty", b))
|
|
5661
5661
|
}, [
|
|
5662
5662
|
s[11] || (s[11] = e("option", { value: "" }, "选择属性", -1)),
|
|
5663
|
-
(f(!0), v(
|
|
5663
|
+
(f(!0), v(Z, null, le(r.nodeProperties, (b) => (f(), v("option", {
|
|
5664
5664
|
key: b.key,
|
|
5665
5665
|
value: b.key
|
|
5666
5666
|
}, S(b.label), 9, zr))), 128))
|
|
@@ -5679,7 +5679,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5679
5679
|
s[13] || (s[13] = e("span", { class: "selector-arrow" }, "›", -1))
|
|
5680
5680
|
])
|
|
5681
5681
|
]),
|
|
5682
|
-
|
|
5682
|
+
pe(vr, {
|
|
5683
5683
|
visible: c.value,
|
|
5684
5684
|
"onUpdate:visible": s[7] || (s[7] = (b) => c.value = b),
|
|
5685
5685
|
modelValue: d.value,
|
|
@@ -5691,7 +5691,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5691
5691
|
])
|
|
5692
5692
|
]));
|
|
5693
5693
|
}
|
|
5694
|
-
}), qt = /* @__PURE__ */
|
|
5694
|
+
}), qt = /* @__PURE__ */ j(Or, [["__scopeId", "data-v-3731c19a"]]), Rr = { class: "dialog-content" }, Lr = { class: "dialog-header" }, Wr = { class: "dialog-body" }, Br = { class: "group-row" }, Ur = { class: "group-field" }, Gr = ["value", "onChange"], Fr = ["value"], jr = { class: "group-field group-field-value" }, Hr = ["value", "onInput"], qr = ["value", "onInput"], Jr = {
|
|
5695
5695
|
key: 2,
|
|
5696
5696
|
class: "color-input-wrapper"
|
|
5697
5697
|
}, Yr = ["value", "onInput"], Xr = { class: "color-value" }, Kr = ["value", "onChange"], Qr = ["onClick"], Zr = {
|
|
@@ -5736,7 +5736,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5736
5736
|
class: "btn-add-group",
|
|
5737
5737
|
onClick: u[1] || (u[1] = (g) => d.$emit("add-group"))
|
|
5738
5738
|
}, "新增一组"),
|
|
5739
|
-
(f(!0), v(
|
|
5739
|
+
(f(!0), v(Z, null, le(r.attributeGroups, (g, p) => (f(), v("div", {
|
|
5740
5740
|
key: p,
|
|
5741
5741
|
class: "attribute-group"
|
|
5742
5742
|
}, [
|
|
@@ -5748,7 +5748,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5748
5748
|
onChange: (n) => i(p, "property", n)
|
|
5749
5749
|
}, [
|
|
5750
5750
|
u[5] || (u[5] = e("option", { value: "" }, "选择目标属性", -1)),
|
|
5751
|
-
(f(!0), v(
|
|
5751
|
+
(f(!0), v(Z, null, le(r.nodeProperties, (n) => (f(), v("option", {
|
|
5752
5752
|
key: n.key,
|
|
5753
5753
|
value: n.key
|
|
5754
5754
|
}, S(n.label), 9, Fr))), 128))
|
|
@@ -5806,7 +5806,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
5806
5806
|
])
|
|
5807
5807
|
]));
|
|
5808
5808
|
}
|
|
5809
|
-
}), Jt = /* @__PURE__ */
|
|
5809
|
+
}), Jt = /* @__PURE__ */ j(td, [["__scopeId", "data-v-90af9944"]]), od = { class: "dialog-content dialog-large" }, ld = { class: "dialog-header" }, nd = { class: "dialog-body dialog-body-split" }, sd = { class: "code-editor-section" }, id = ["value"], ad = { class: "code-preview-section" }, rd = { class: "section-header" }, dd = { class: "preview-status" }, ud = {
|
|
5810
5810
|
key: 0,
|
|
5811
5811
|
class: "status-success"
|
|
5812
5812
|
}, cd = {
|
|
@@ -6010,7 +6010,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6010
6010
|
t.value.logs.length > 0 ? (f(), v("div", hd, [
|
|
6011
6011
|
p[9] || (p[9] = e("div", { class: "console-title" }, "控制台输出:", -1)),
|
|
6012
6012
|
e("div", yd, [
|
|
6013
|
-
(f(!0), v(
|
|
6013
|
+
(f(!0), v(Z, null, le(t.value.logs, (m, s) => (f(), v("div", {
|
|
6014
6014
|
key: s,
|
|
6015
6015
|
class: "log-item"
|
|
6016
6016
|
}, S(m), 1))), 128))
|
|
@@ -6034,7 +6034,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6034
6034
|
]);
|
|
6035
6035
|
};
|
|
6036
6036
|
}
|
|
6037
|
-
}), Yt = /* @__PURE__ */
|
|
6037
|
+
}), Yt = /* @__PURE__ */ j(xd, [["__scopeId", "data-v-add3567b"]]), $d = { class: "dialog-container" }, wd = { class: "dialog-header" }, _d = { class: "dialog-body" }, Cd = {
|
|
6038
6038
|
key: 0,
|
|
6039
6039
|
class: "empty-state"
|
|
6040
6040
|
}, Sd = {
|
|
@@ -6064,7 +6064,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6064
6064
|
hour: "2-digit",
|
|
6065
6065
|
minute: "2-digit"
|
|
6066
6066
|
});
|
|
6067
|
-
return
|
|
6067
|
+
return ce(() => {
|
|
6068
6068
|
i();
|
|
6069
6069
|
}), (p, n) => (f(), v("div", {
|
|
6070
6070
|
class: "dialog-overlay",
|
|
@@ -6083,11 +6083,11 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6083
6083
|
e("p", null, "暂无已保存的流程", -1),
|
|
6084
6084
|
e("p", { class: "hint" }, "请先在流程编辑器中创建并保存流程", -1)
|
|
6085
6085
|
])])) : (f(), v("div", Sd, [
|
|
6086
|
-
(f(!0), v(
|
|
6086
|
+
(f(!0), v(Z, null, le(a.value, (h) => {
|
|
6087
6087
|
var m;
|
|
6088
6088
|
return f(), v("div", {
|
|
6089
6089
|
key: h.id,
|
|
6090
|
-
class:
|
|
6090
|
+
class: ie(["workflow-item", { selected: ((m = t.value) == null ? void 0 : m.id) === h.id }]),
|
|
6091
6091
|
onClick: (s) => c(h)
|
|
6092
6092
|
}, [
|
|
6093
6093
|
e("div", Dd, [
|
|
@@ -6122,7 +6122,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6122
6122
|
])
|
|
6123
6123
|
]));
|
|
6124
6124
|
}
|
|
6125
|
-
}), Rd = /* @__PURE__ */
|
|
6125
|
+
}), Rd = /* @__PURE__ */ j(Od, [["__scopeId", "data-v-c9a88e33"]]), Oe = {
|
|
6126
6126
|
SCADA_EDITOR_DATA: "scada_editor_data",
|
|
6127
6127
|
SCADA_PREVIEW_DATA: "scada_preview_data"
|
|
6128
6128
|
}, dt = (r, l) => {
|
|
@@ -6181,7 +6181,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6181
6181
|
}, ct = () => Date.now(), Gd = (r = 50, l = 50, o = 400, a = 300) => ({
|
|
6182
6182
|
x: Math.random() * o + r,
|
|
6183
6183
|
y: Math.random() * a + l
|
|
6184
|
-
}),
|
|
6184
|
+
}), ve = (r, l = "info", o = 3e3) => {
|
|
6185
6185
|
const a = document.createElement("div");
|
|
6186
6186
|
a.className = `scada-toast scada-toast-${l}`, a.textContent = r, Object.assign(a.style, {
|
|
6187
6187
|
position: "fixed",
|
|
@@ -6233,26 +6233,26 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6233
6233
|
emits: ["updateNode", "deleteNode", "updateEdge", "deleteEdge"],
|
|
6234
6234
|
setup(r, { emit: l }) {
|
|
6235
6235
|
const o = r, a = l, t = $("basic"), i = $([]), c = $(/* @__PURE__ */ new Set()), d = $([]), u = $(/* @__PURE__ */ new Set());
|
|
6236
|
-
|
|
6236
|
+
ne(() => o.selectedNode, (D) => {
|
|
6237
6237
|
var z, M;
|
|
6238
6238
|
if ((z = D == null ? void 0 : D.data) != null && z.events) {
|
|
6239
|
-
const
|
|
6240
|
-
|
|
6241
|
-
X.id || (X.id =
|
|
6242
|
-
}), i.value =
|
|
6239
|
+
const q = JSON.parse(JSON.stringify(D.data.events));
|
|
6240
|
+
q.forEach((X) => {
|
|
6241
|
+
X.id || (X.id = A());
|
|
6242
|
+
}), i.value = q;
|
|
6243
6243
|
} else
|
|
6244
6244
|
i.value = [];
|
|
6245
6245
|
c.value.clear(), (M = D == null ? void 0 : D.data) != null && M.bindings ? d.value = JSON.parse(JSON.stringify(D.data.bindings)) : d.value = [], u.value.clear();
|
|
6246
6246
|
}, { immediate: !0 });
|
|
6247
6247
|
const g = $(0), p = $(0);
|
|
6248
6248
|
let n = null, h = { x: 0, y: 0 }, m = { width: 0, height: 0 };
|
|
6249
|
-
|
|
6249
|
+
ne(() => o.selectedNode, (D) => {
|
|
6250
6250
|
if (n && (clearInterval(n), n = null), D) {
|
|
6251
6251
|
const z = D.getPosition(), M = D.getSize();
|
|
6252
6252
|
z && typeof z.x == "number" && typeof z.y == "number" ? h = z : (h = { x: 0, y: 0 }, console.warn("节点位置数据异常:", z)), M && typeof M.width == "number" && typeof M.height == "number" ? m = M : (m = { width: 0, height: 0 }, console.warn("节点尺寸数据异常:", M)), n = setInterval(() => {
|
|
6253
6253
|
if (o.selectedNode) {
|
|
6254
|
-
const
|
|
6255
|
-
|
|
6254
|
+
const q = o.selectedNode.getPosition(), X = o.selectedNode.getSize();
|
|
6255
|
+
q && typeof q.x == "number" && typeof q.y == "number" && (q.x !== h.x || q.y !== h.y) && (h = q, g.value++), X && typeof X.width == "number" && typeof X.height == "number" && (X.width !== m.width || X.height !== m.height) && (m = X, p.value++);
|
|
6256
6256
|
}
|
|
6257
6257
|
}, 50);
|
|
6258
6258
|
}
|
|
@@ -6269,10 +6269,10 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6269
6269
|
var z;
|
|
6270
6270
|
return ((z = o.selectedNode) == null ? void 0 : z.getAttrs()) || {};
|
|
6271
6271
|
}), O = (D, z) => {
|
|
6272
|
-
const M = Number(z.target.value),
|
|
6272
|
+
const M = Number(z.target.value), q = o.selectedNode.getPosition(), X = D === "x" ? { x: M, y: q.y } : { x: q.x, y: M };
|
|
6273
6273
|
a("updateNode", { position: X });
|
|
6274
6274
|
}, w = (D, z) => {
|
|
6275
|
-
const M = Number(z.target.value),
|
|
6275
|
+
const M = Number(z.target.value), q = o.selectedNode.getSize(), X = D === "width" ? { width: M, height: q.height } : { width: q.width, height: M };
|
|
6276
6276
|
a("updateNode", { size: X });
|
|
6277
6277
|
}, x = (D) => {
|
|
6278
6278
|
const z = D.target.value;
|
|
@@ -6289,23 +6289,23 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6289
6289
|
}, W = (D) => {
|
|
6290
6290
|
const z = Number(D.target.value);
|
|
6291
6291
|
a("updateNode", { attrs: { body: { opacity: z } } });
|
|
6292
|
-
},
|
|
6292
|
+
}, Y = (D) => {
|
|
6293
6293
|
const z = D.target.value, M = { ...o.selectedNode.data, componentName: z };
|
|
6294
6294
|
a("updateNode", { data: M });
|
|
6295
|
-
},
|
|
6295
|
+
}, J = (D, z) => {
|
|
6296
6296
|
if (!o.selectedNode) return;
|
|
6297
6297
|
const M = D.split(".");
|
|
6298
6298
|
if (M[0] === "attrs") {
|
|
6299
|
-
const
|
|
6300
|
-
a("updateNode", { attrs: { [
|
|
6299
|
+
const q = M.slice(1).join("/");
|
|
6300
|
+
a("updateNode", { attrs: { [q]: z } });
|
|
6301
6301
|
} else if (M[0] === "data") {
|
|
6302
|
-
const
|
|
6303
|
-
let X =
|
|
6302
|
+
const q = JSON.parse(JSON.stringify(o.selectedNode.data || {}));
|
|
6303
|
+
let X = q;
|
|
6304
6304
|
for (let we = 1; we < M.length - 1; we++) {
|
|
6305
6305
|
const Ze = M[we];
|
|
6306
6306
|
X[Ze] || (X[Ze] = {}), X = X[Ze];
|
|
6307
6307
|
}
|
|
6308
|
-
X[M[M.length - 1]] = z, console.log("[PropertyPanel] 更新属性:", D, "=", z), console.log("[PropertyPanel] 节点类型:", o.selectedNode.shape), D === "data.presetId" && o.selectedNode.shape === "echarts-vue" && console.log("[PropertyPanel] 检测到预设切换,只更新 presetId"), a("updateNode", { data:
|
|
6308
|
+
X[M[M.length - 1]] = z, console.log("[PropertyPanel] 更新属性:", D, "=", z), console.log("[PropertyPanel] 节点类型:", o.selectedNode.shape), D === "data.presetId" && o.selectedNode.shape === "echarts-vue" && console.log("[PropertyPanel] 检测到预设切换,只更新 presetId"), a("updateNode", { data: q });
|
|
6309
6309
|
}
|
|
6310
6310
|
}, T = (D) => {
|
|
6311
6311
|
if (!o.selectedNode) return;
|
|
@@ -6314,9 +6314,9 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6314
6314
|
dataSource: D
|
|
6315
6315
|
};
|
|
6316
6316
|
a("updateNode", { data: z });
|
|
6317
|
-
},
|
|
6317
|
+
}, A = Ud, B = () => {
|
|
6318
6318
|
const D = {
|
|
6319
|
-
id:
|
|
6319
|
+
id: A(),
|
|
6320
6320
|
// 生成唯一ID
|
|
6321
6321
|
name: "",
|
|
6322
6322
|
type: "click",
|
|
@@ -6326,11 +6326,11 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6326
6326
|
params: {}
|
|
6327
6327
|
};
|
|
6328
6328
|
i.value.push(D), $e();
|
|
6329
|
-
},
|
|
6329
|
+
}, ge = (D) => {
|
|
6330
6330
|
i.value.splice(D, 1), $e();
|
|
6331
6331
|
}, xe = (D, z, M) => {
|
|
6332
|
-
const
|
|
6333
|
-
i.value[D][z] =
|
|
6332
|
+
const q = M.target.value;
|
|
6333
|
+
i.value[D][z] = q, $e();
|
|
6334
6334
|
}, Ve = (D, z, M) => {
|
|
6335
6335
|
const X = M.target.value;
|
|
6336
6336
|
i.value[D].condition || (i.value[D].condition = {}), i.value[D].condition[z] = X, $e();
|
|
@@ -6339,7 +6339,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6339
6339
|
i.value[D].params || (i.value[D].params = {}), i.value[D].params[z] = X, $e();
|
|
6340
6340
|
}, $e = () => {
|
|
6341
6341
|
i.value.forEach((z) => {
|
|
6342
|
-
z.id || (z.id =
|
|
6342
|
+
z.id || (z.id = A());
|
|
6343
6343
|
});
|
|
6344
6344
|
const D = { ...o.selectedNode.data, events: i.value };
|
|
6345
6345
|
a("updateNode", { data: D });
|
|
@@ -6362,43 +6362,43 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6362
6362
|
a("updateNode", { data: D });
|
|
6363
6363
|
}, N = (D) => {
|
|
6364
6364
|
u.value.has(D) ? u.value.delete(D) : u.value.add(D);
|
|
6365
|
-
},
|
|
6365
|
+
}, V = (D) => u.value.has(D), G = $(!1), te = $(-1), H = $([]), Q = (D) => {
|
|
6366
6366
|
var M;
|
|
6367
|
-
|
|
6367
|
+
te.value = D;
|
|
6368
6368
|
const z = i.value[D];
|
|
6369
|
-
(M = z.params) != null && M.attributeGroups && Array.isArray(z.params.attributeGroups) ?
|
|
6369
|
+
(M = z.params) != null && M.attributeGroups && Array.isArray(z.params.attributeGroups) ? H.value = JSON.parse(JSON.stringify(z.params.attributeGroups)) : H.value = [{
|
|
6370
6370
|
target: "current",
|
|
6371
6371
|
property: "",
|
|
6372
6372
|
value: ""
|
|
6373
|
-
}],
|
|
6374
|
-
},
|
|
6375
|
-
|
|
6376
|
-
},
|
|
6377
|
-
|
|
6373
|
+
}], G.value = !0;
|
|
6374
|
+
}, ae = () => {
|
|
6375
|
+
G.value = !1;
|
|
6376
|
+
}, de = () => {
|
|
6377
|
+
H.value.push({
|
|
6378
6378
|
target: "current",
|
|
6379
6379
|
property: "",
|
|
6380
6380
|
value: ""
|
|
6381
6381
|
});
|
|
6382
|
-
},
|
|
6383
|
-
|
|
6384
|
-
},
|
|
6385
|
-
|
|
6386
|
-
},
|
|
6387
|
-
for (const D of
|
|
6382
|
+
}, F = (D) => {
|
|
6383
|
+
H.value.splice(D, 1);
|
|
6384
|
+
}, oe = (D, z, M) => {
|
|
6385
|
+
H.value[D][z] = M;
|
|
6386
|
+
}, ee = () => {
|
|
6387
|
+
for (const D of H.value)
|
|
6388
6388
|
if (!D.property) {
|
|
6389
6389
|
alert("请为每组配置选择目标属性");
|
|
6390
6390
|
return;
|
|
6391
6391
|
}
|
|
6392
|
-
i.value[
|
|
6393
|
-
},
|
|
6392
|
+
i.value[te.value].params || (i.value[te.value].params = {}), i.value[te.value].params.attributeGroups = JSON.parse(JSON.stringify(H.value)), $e(), ae();
|
|
6393
|
+
}, fe = $(!1), ue = $(""), Ae = $(-1), Zt = (D) => {
|
|
6394
6394
|
var M;
|
|
6395
6395
|
Ae.value = D;
|
|
6396
6396
|
const z = i.value[D];
|
|
6397
|
-
|
|
6397
|
+
ue.value = ((M = z.params) == null ? void 0 : M.code) || "", fe.value = !0;
|
|
6398
6398
|
}, nt = () => {
|
|
6399
|
-
|
|
6399
|
+
fe.value = !1;
|
|
6400
6400
|
}, eo = () => {
|
|
6401
|
-
i.value[Ae.value].params || (i.value[Ae.value].params = {}), i.value[Ae.value].params.code =
|
|
6401
|
+
i.value[Ae.value].params || (i.value[Ae.value].params = {}), i.value[Ae.value].params.code = ue.value, $e(), nt();
|
|
6402
6402
|
}, Ke = $(!1), je = $(-1), to = (D) => {
|
|
6403
6403
|
je.value = D, Ke.value = !0;
|
|
6404
6404
|
}, st = () => {
|
|
@@ -6423,11 +6423,11 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6423
6423
|
}, no = () => {
|
|
6424
6424
|
a("deleteEdge");
|
|
6425
6425
|
};
|
|
6426
|
-
return (D, z) => (f(), v(
|
|
6426
|
+
return (D, z) => (f(), v(Z, null, [
|
|
6427
6427
|
e("div", Fd, [
|
|
6428
6428
|
!r.selectedNode && !r.selectedEdge ? (f(), _e(Gt, { key: 0 })) : r.selectedEdge ? (f(), v("div", jd, [
|
|
6429
6429
|
z[5] || (z[5] = e("h3", { class: "panel-title" }, "连线属性", -1)),
|
|
6430
|
-
|
|
6430
|
+
pe(Si, {
|
|
6431
6431
|
"selected-edge": r.selectedEdge,
|
|
6432
6432
|
onUpdateEdge: lo,
|
|
6433
6433
|
onDeleteEdge: no
|
|
@@ -6436,24 +6436,24 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6436
6436
|
z[10] || (z[10] = e("h3", { class: "panel-title" }, "节点属性", -1)),
|
|
6437
6437
|
e("div", qd, [
|
|
6438
6438
|
e("button", {
|
|
6439
|
-
class:
|
|
6439
|
+
class: ie(["tab-btn", { active: t.value === "basic" }]),
|
|
6440
6440
|
onClick: z[0] || (z[0] = (M) => t.value = "basic")
|
|
6441
6441
|
}, " 基础 ", 2),
|
|
6442
6442
|
e("button", {
|
|
6443
|
-
class:
|
|
6443
|
+
class: ie(["tab-btn", { active: t.value === "data" }]),
|
|
6444
6444
|
onClick: z[1] || (z[1] = (M) => t.value = "data")
|
|
6445
6445
|
}, " 数据 ", 2),
|
|
6446
6446
|
e("button", {
|
|
6447
|
-
class:
|
|
6447
|
+
class: ie(["tab-btn", { active: t.value === "binding" }]),
|
|
6448
6448
|
onClick: z[2] || (z[2] = (M) => t.value = "binding")
|
|
6449
6449
|
}, " 绑定 ", 2),
|
|
6450
6450
|
e("button", {
|
|
6451
|
-
class:
|
|
6451
|
+
class: ie(["tab-btn", { active: t.value === "event" }]),
|
|
6452
6452
|
onClick: z[3] || (z[3] = (M) => t.value = "event")
|
|
6453
6453
|
}, " 事件 ", 2)
|
|
6454
6454
|
]),
|
|
6455
6455
|
e("div", Jd, [
|
|
6456
|
-
L(
|
|
6456
|
+
L(pe(Ft, {
|
|
6457
6457
|
"selected-node": r.selectedNode,
|
|
6458
6458
|
"node-position": s.value,
|
|
6459
6459
|
"node-size": b.value,
|
|
@@ -6465,12 +6465,12 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6465
6465
|
onUpdateStroke: _,
|
|
6466
6466
|
onUpdateStrokeWidth: C,
|
|
6467
6467
|
onUpdateOpacity: W,
|
|
6468
|
-
onUpdateComponentName:
|
|
6469
|
-
onUpdateDynamicProp:
|
|
6468
|
+
onUpdateComponentName: Y,
|
|
6469
|
+
onUpdateDynamicProp: J
|
|
6470
6470
|
}, null, 8, ["selected-node", "node-position", "node-size", "node-attrs"]), [
|
|
6471
6471
|
[Ee, t.value === "basic"]
|
|
6472
6472
|
]),
|
|
6473
|
-
L(
|
|
6473
|
+
L(pe(Js, {
|
|
6474
6474
|
"selected-node": r.selectedNode,
|
|
6475
6475
|
onUpdateDataSource: T
|
|
6476
6476
|
}, null, 8, ["selected-node"]), [
|
|
@@ -6489,20 +6489,20 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6489
6489
|
e("span", null, "暂无事件,点击上方按钮添加", -1)
|
|
6490
6490
|
])])) : E("", !0),
|
|
6491
6491
|
e("div", Qd, [
|
|
6492
|
-
(f(!0), v(
|
|
6493
|
-
key:
|
|
6492
|
+
(f(!0), v(Z, null, le(i.value, (M, q) => (f(), _e(jt, {
|
|
6493
|
+
key: q,
|
|
6494
6494
|
event: M,
|
|
6495
|
-
index:
|
|
6496
|
-
"is-collapsed": Ue(
|
|
6495
|
+
index: q,
|
|
6496
|
+
"is-collapsed": Ue(q),
|
|
6497
6497
|
"node-properties": Qe(),
|
|
6498
|
-
onToggleCollapse: (X) => Xe(
|
|
6499
|
-
onRemove: (X) =>
|
|
6500
|
-
onUpdateField: (X, we) => xe(
|
|
6501
|
-
onUpdateCondition: (X, we) => Ve(
|
|
6502
|
-
onUpdateParams: (X, we) => Be(
|
|
6503
|
-
onOpenAttributeConfig: (X) =>
|
|
6504
|
-
onOpenCustomCode: (X) => Zt(
|
|
6505
|
-
onOpenWorkflowSelector: (X) => to(
|
|
6498
|
+
onToggleCollapse: (X) => Xe(q),
|
|
6499
|
+
onRemove: (X) => ge(q),
|
|
6500
|
+
onUpdateField: (X, we) => xe(q, X, we),
|
|
6501
|
+
onUpdateCondition: (X, we) => Ve(q, X, we),
|
|
6502
|
+
onUpdateParams: (X, we) => Be(q, X, we),
|
|
6503
|
+
onOpenAttributeConfig: (X) => Q(q),
|
|
6504
|
+
onOpenCustomCode: (X) => Zt(q),
|
|
6505
|
+
onOpenWorkflowSelector: (X) => to(q)
|
|
6506
6506
|
}, null, 8, ["event", "index", "is-collapsed", "node-properties", "onToggleCollapse", "onRemove", "onUpdateField", "onUpdateCondition", "onUpdateParams", "onOpenAttributeConfig", "onOpenCustomCode", "onOpenWorkflowSelector"]))), 128))
|
|
6507
6507
|
])
|
|
6508
6508
|
])
|
|
@@ -6522,16 +6522,16 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6522
6522
|
e("span", null, "暂无绑定,点击上方按钮添加", -1)
|
|
6523
6523
|
])])) : E("", !0),
|
|
6524
6524
|
e("div", ou, [
|
|
6525
|
-
(f(!0), v(
|
|
6526
|
-
key:
|
|
6525
|
+
(f(!0), v(Z, null, le(d.value, (M, q) => (f(), _e(qt, {
|
|
6526
|
+
key: q,
|
|
6527
6527
|
binding: M,
|
|
6528
|
-
index:
|
|
6529
|
-
"is-collapsed":
|
|
6528
|
+
index: q,
|
|
6529
|
+
"is-collapsed": V(q),
|
|
6530
6530
|
"node-properties": Qe(),
|
|
6531
6531
|
"event-list": i.value,
|
|
6532
|
-
onToggleCollapse: (X) => N(
|
|
6533
|
-
onRemove: (X) => Fe(
|
|
6534
|
-
onUpdateField: (X, we) => k(
|
|
6532
|
+
onToggleCollapse: (X) => N(q),
|
|
6533
|
+
onRemove: (X) => Fe(q),
|
|
6534
|
+
onUpdateField: (X, we) => k(q, X, we)
|
|
6535
6535
|
}, null, 8, ["binding", "index", "is-collapsed", "node-properties", "event-list", "onToggleCollapse", "onRemove", "onUpdateField"]))), 128))
|
|
6536
6536
|
])
|
|
6537
6537
|
])
|
|
@@ -6541,20 +6541,20 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6541
6541
|
])
|
|
6542
6542
|
])) : E("", !0)
|
|
6543
6543
|
]),
|
|
6544
|
-
|
|
6544
|
+
G.value ? (f(), _e(Jt, {
|
|
6545
6545
|
key: 0,
|
|
6546
|
-
"attribute-groups":
|
|
6546
|
+
"attribute-groups": H.value,
|
|
6547
6547
|
"node-properties": Qe(),
|
|
6548
|
-
onClose:
|
|
6549
|
-
onSave:
|
|
6550
|
-
onAddGroup:
|
|
6551
|
-
onRemoveGroup:
|
|
6552
|
-
onUpdateGroup:
|
|
6548
|
+
onClose: ae,
|
|
6549
|
+
onSave: ee,
|
|
6550
|
+
onAddGroup: de,
|
|
6551
|
+
onRemoveGroup: F,
|
|
6552
|
+
onUpdateGroup: oe
|
|
6553
6553
|
}, null, 8, ["attribute-groups", "node-properties"])) : E("", !0),
|
|
6554
|
-
|
|
6554
|
+
fe.value ? (f(), _e(Yt, {
|
|
6555
6555
|
key: 1,
|
|
6556
|
-
code:
|
|
6557
|
-
"onUpdate:code": z[4] || (z[4] = (M) =>
|
|
6556
|
+
code: ue.value,
|
|
6557
|
+
"onUpdate:code": z[4] || (z[4] = (M) => ue.value = M),
|
|
6558
6558
|
"selected-node": r.selectedNode,
|
|
6559
6559
|
onClose: nt,
|
|
6560
6560
|
onSave: eo
|
|
@@ -6566,7 +6566,7 @@ const Ta = { class: "mapping-configurator" }, Va = { class: "config-item" }, Aa
|
|
|
6566
6566
|
})) : E("", !0)
|
|
6567
6567
|
], 64));
|
|
6568
6568
|
}
|
|
6569
|
-
}), Kt = /* @__PURE__ */
|
|
6569
|
+
}), Kt = /* @__PURE__ */ j(lu, [["__scopeId", "data-v-78ade73d"]]);
|
|
6570
6570
|
function et(r) {
|
|
6571
6571
|
const l = r.replace(/-/g, "+").replace(/_/g, "/"), o = l.length % 4 ? "=".repeat(4 - l.length % 4) : "", a = l + o, t = (typeof atob < "u" ? atob : (c) => Buffer.from(c, "base64").toString("binary"))(a), i = new Uint8Array(t.length);
|
|
6572
6572
|
for (let c = 0; c < t.length; c++) i[c] = t.charCodeAt(c);
|
|
@@ -6662,7 +6662,7 @@ const ru = {
|
|
|
6662
6662
|
},
|
|
6663
6663
|
setup(r) {
|
|
6664
6664
|
const l = r, o = $(null), a = $(!1);
|
|
6665
|
-
|
|
6665
|
+
ne(
|
|
6666
6666
|
() => [l.authCode, l.publicKeyPem],
|
|
6667
6667
|
async () => {
|
|
6668
6668
|
if (!l.authCode || !l.publicKeyPem) {
|
|
@@ -6699,11 +6699,11 @@ const ru = {
|
|
|
6699
6699
|
])
|
|
6700
6700
|
])
|
|
6701
6701
|
])) : (f(), v("footer", ru, [...c[0] || (c[0] = [
|
|
6702
|
-
|
|
6702
|
+
re('<div class="footer-content" data-v-7fd5ce26><div class="footer-left" data-v-7fd5ce26><span class="copyright" style="color:#94a3b8 !important;" data-v-7fd5ce26>© 2025 leoncheng</span><span class="divider" style="color:#475569 !important;" data-v-7fd5ce26>|</span><span class="license" style="color:#94a3b8 !important;" data-v-7fd5ce26>仅供学习研究使用,禁止商业用途</span></div><div class="footer-right" data-v-7fd5ce26><div class="contact-item" data-v-7fd5ce26><span class="icon" data-v-7fd5ce26>📧</span><span class="text" style="color:#94a3b8 !important;" data-v-7fd5ce26>nywqs@outlook.com</span></div><span class="divider" style="color:#475569 !important;" data-v-7fd5ce26>|</span><div class="contact-item" data-v-7fd5ce26><span class="icon" data-v-7fd5ce26>📱</span><span class="text" style="color:#94a3b8 !important;" data-v-7fd5ce26>18637762001</span></div></div></div>', 1)
|
|
6703
6703
|
])]));
|
|
6704
6704
|
};
|
|
6705
6705
|
}
|
|
6706
|
-
}), Cu = /* @__PURE__ */
|
|
6706
|
+
}), Cu = /* @__PURE__ */ j(_u, [["__scopeId", "data-v-7fd5ce26"]]);
|
|
6707
6707
|
var De = /* @__PURE__ */ ((r) => (r.START = "start", r.END = "end", r.GET_PROPERTY = "getProperty", r.SET_PROPERTY = "setProperty", r.CONDITION = "condition", r.HTTP_REQUEST = "httpRequest", r.CUSTOM_CODE = "customCode", r.TIMER = "timer", r.CLEAR_TIMER = "clearTimer", r))(De || {});
|
|
6708
6708
|
const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class: "element-list" }, Eu = ["onClick"], Nu = { class: "element-icon" }, zu = { class: "element-info" }, Tu = { class: "element-name" }, Vu = { class: "element-type" }, Au = {
|
|
6709
6709
|
key: 0,
|
|
@@ -6756,15 +6756,15 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6756
6756
|
type: "text",
|
|
6757
6757
|
placeholder: "搜索图元名称或ID..."
|
|
6758
6758
|
}, null, 512), [
|
|
6759
|
-
[
|
|
6759
|
+
[se, t.value]
|
|
6760
6760
|
])
|
|
6761
6761
|
]),
|
|
6762
6762
|
e("div", Du, [
|
|
6763
|
-
(f(!0), v(
|
|
6763
|
+
(f(!0), v(Z, null, le(c.value, (h) => {
|
|
6764
6764
|
var m, s;
|
|
6765
6765
|
return f(), v("div", {
|
|
6766
6766
|
key: h.id,
|
|
6767
|
-
class:
|
|
6767
|
+
class: ie(["element-item", { active: ((m = i.value) == null ? void 0 : m.id) === h.id }]),
|
|
6768
6768
|
onClick: (b) => d(h)
|
|
6769
6769
|
}, [
|
|
6770
6770
|
e("div", Nu, S(h.icon), 1),
|
|
@@ -6795,7 +6795,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6795
6795
|
])
|
|
6796
6796
|
])) : E("", !0);
|
|
6797
6797
|
}
|
|
6798
|
-
}), Qt = /* @__PURE__ */
|
|
6798
|
+
}), Qt = /* @__PURE__ */ j(Ru, [["__scopeId", "data-v-882704dd"]]), Lu = { class: "node-config" }, Wu = { class: "config-group" }, Bu = { class: "element-selector" }, Uu = { class: "config-group" }, Gu = ["disabled"], Fu = ["value"], ju = /* @__PURE__ */ R({
|
|
6799
6799
|
__name: "GetPropertyConfig",
|
|
6800
6800
|
props: {
|
|
6801
6801
|
modelValue: {}
|
|
@@ -6816,12 +6816,12 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6816
6816
|
}, h = (m) => {
|
|
6817
6817
|
t.elementId = m.id, i.value = m.name, t.propertyName = "", p();
|
|
6818
6818
|
};
|
|
6819
|
-
return
|
|
6819
|
+
return ce(() => {
|
|
6820
6820
|
if (u && (d.value = u.getElements()), t.elementId) {
|
|
6821
6821
|
const m = d.value.find((s) => s.id === t.elementId);
|
|
6822
6822
|
m && (i.value = m.name);
|
|
6823
6823
|
}
|
|
6824
|
-
}), (m, s) => (f(), v(
|
|
6824
|
+
}), (m, s) => (f(), v(Z, null, [
|
|
6825
6825
|
e("div", Lu, [
|
|
6826
6826
|
e("div", Wu, [
|
|
6827
6827
|
s[3] || (s[3] = e("label", null, "图元选择", -1)),
|
|
@@ -6832,7 +6832,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6832
6832
|
placeholder: "点击选择按钮从画布中选择图元",
|
|
6833
6833
|
readonly: ""
|
|
6834
6834
|
}, null, 512), [
|
|
6835
|
-
[
|
|
6835
|
+
[se, i.value]
|
|
6836
6836
|
]),
|
|
6837
6837
|
e("button", {
|
|
6838
6838
|
class: "btn-select",
|
|
@@ -6848,7 +6848,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6848
6848
|
disabled: !t.elementId
|
|
6849
6849
|
}, [
|
|
6850
6850
|
s[4] || (s[4] = e("option", { value: "" }, "请先选择图元", -1)),
|
|
6851
|
-
(f(!0), v(
|
|
6851
|
+
(f(!0), v(Z, null, le(g.value, (b) => (f(), v("option", {
|
|
6852
6852
|
key: b.key,
|
|
6853
6853
|
value: b.key
|
|
6854
6854
|
}, S(b.label), 9, Fu))), 128))
|
|
@@ -6857,7 +6857,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6857
6857
|
])
|
|
6858
6858
|
])
|
|
6859
6859
|
]),
|
|
6860
|
-
|
|
6860
|
+
pe(Qt, {
|
|
6861
6861
|
visible: c.value,
|
|
6862
6862
|
elements: d.value,
|
|
6863
6863
|
onClose: s[2] || (s[2] = (b) => c.value = !1),
|
|
@@ -6865,7 +6865,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6865
6865
|
}, null, 8, ["visible", "elements"])
|
|
6866
6866
|
], 64));
|
|
6867
6867
|
}
|
|
6868
|
-
}), Hu = /* @__PURE__ */
|
|
6868
|
+
}), Hu = /* @__PURE__ */ j(ju, [["__scopeId", "data-v-fa65eb56"]]), qu = { class: "node-config" }, Ju = { class: "config-group" }, Yu = { class: "element-selector" }, Xu = { class: "config-group" }, Ku = ["disabled"], Qu = ["value"], Zu = { class: "config-group" }, ec = /* @__PURE__ */ R({
|
|
6869
6869
|
__name: "SetPropertyConfig",
|
|
6870
6870
|
props: {
|
|
6871
6871
|
modelValue: {}
|
|
@@ -6887,12 +6887,12 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6887
6887
|
}, h = (m) => {
|
|
6888
6888
|
t.elementId = m.id, i.value = m.name, t.propertyName = "", p();
|
|
6889
6889
|
};
|
|
6890
|
-
return
|
|
6890
|
+
return ce(() => {
|
|
6891
6891
|
if (u && (d.value = u.getElements()), t.elementId) {
|
|
6892
6892
|
const m = d.value.find((s) => s.id === t.elementId);
|
|
6893
6893
|
m && (i.value = m.name);
|
|
6894
6894
|
}
|
|
6895
|
-
}), (m, s) => (f(), v(
|
|
6895
|
+
}), (m, s) => (f(), v(Z, null, [
|
|
6896
6896
|
e("div", qu, [
|
|
6897
6897
|
e("div", Ju, [
|
|
6898
6898
|
s[4] || (s[4] = e("label", null, "图元选择", -1)),
|
|
@@ -6903,7 +6903,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6903
6903
|
placeholder: "点击选择按钮从画布中选择图元",
|
|
6904
6904
|
readonly: ""
|
|
6905
6905
|
}, null, 512), [
|
|
6906
|
-
[
|
|
6906
|
+
[se, i.value]
|
|
6907
6907
|
]),
|
|
6908
6908
|
e("button", {
|
|
6909
6909
|
class: "btn-select",
|
|
@@ -6919,7 +6919,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6919
6919
|
disabled: !t.elementId
|
|
6920
6920
|
}, [
|
|
6921
6921
|
s[5] || (s[5] = e("option", { value: "" }, "请先选择图元", -1)),
|
|
6922
|
-
(f(!0), v(
|
|
6922
|
+
(f(!0), v(Z, null, le(g.value, (b) => (f(), v("option", {
|
|
6923
6923
|
key: b.key,
|
|
6924
6924
|
value: b.key
|
|
6925
6925
|
}, S(b.label), 9, Qu))), 128))
|
|
@@ -6935,11 +6935,11 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6935
6935
|
placeholder: "请输入属性值",
|
|
6936
6936
|
onInput: p
|
|
6937
6937
|
}, null, 544), [
|
|
6938
|
-
[
|
|
6938
|
+
[se, t.value]
|
|
6939
6939
|
])
|
|
6940
6940
|
])
|
|
6941
6941
|
]),
|
|
6942
|
-
|
|
6942
|
+
pe(Qt, {
|
|
6943
6943
|
visible: c.value,
|
|
6944
6944
|
elements: d.value,
|
|
6945
6945
|
onClose: s[3] || (s[3] = (b) => c.value = !1),
|
|
@@ -6947,7 +6947,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
6947
6947
|
}, null, 8, ["visible", "elements"])
|
|
6948
6948
|
], 64));
|
|
6949
6949
|
}
|
|
6950
|
-
}), tc = /* @__PURE__ */
|
|
6950
|
+
}), tc = /* @__PURE__ */ j(ec, [["__scopeId", "data-v-42e029d4"]]), oc = { class: "node-config" }, lc = { class: "config-group" }, nc = { class: "config-group" }, sc = { class: "branches-section" }, ic = { class: "branch-list" }, ac = { class: "branch-header" }, rc = { class: "branch-number" }, dc = ["onClick"], uc = {
|
|
6951
6951
|
key: 0,
|
|
6952
6952
|
class: "branch-config"
|
|
6953
6953
|
}, cc = { class: "config-row" }, pc = ["onUpdate:modelValue"], fc = {
|
|
@@ -7033,7 +7033,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7033
7033
|
}, "添加分支")
|
|
7034
7034
|
]),
|
|
7035
7035
|
e("div", ic, [
|
|
7036
|
-
(f(!0), v(
|
|
7036
|
+
(f(!0), v(Z, null, le(c.branches, (m, s) => (f(), v("div", {
|
|
7037
7037
|
key: m.id,
|
|
7038
7038
|
class: "branch-item"
|
|
7039
7039
|
}, [
|
|
@@ -7054,7 +7054,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7054
7054
|
placeholder: "如: >10, =A, True",
|
|
7055
7055
|
onInput: d
|
|
7056
7056
|
}, null, 40, pc), [
|
|
7057
|
-
[
|
|
7057
|
+
[se, m.label]
|
|
7058
7058
|
])
|
|
7059
7059
|
]),
|
|
7060
7060
|
c.dataType !== "boolean" ? (f(), v("div", fc, [
|
|
@@ -7063,7 +7063,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7063
7063
|
"onUpdate:modelValue": (b) => m.operator = b,
|
|
7064
7064
|
onChange: d
|
|
7065
7065
|
}, [...h[8] || (h[8] = [
|
|
7066
|
-
|
|
7066
|
+
re('<option value="eq" data-v-15975920>等于 (==)</option><option value="ne" data-v-15975920>不等于 (!=)</option><option value="gt" data-v-15975920>大于 (>)</option><option value="gte" data-v-15975920>大于等于 (>=)</option><option value="lt" data-v-15975920>小于 (<)</option><option value="lte" data-v-15975920>小于等于 (<=)</option><option value="contains" data-v-15975920>包含</option><option value="notContains" data-v-15975920>不包含</option>', 8)
|
|
7067
7067
|
])], 40, vc), [
|
|
7068
7068
|
[be, m.operator]
|
|
7069
7069
|
])
|
|
@@ -7085,7 +7085,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7085
7085
|
])
|
|
7086
7086
|
]));
|
|
7087
7087
|
}
|
|
7088
|
-
}), bc = /* @__PURE__ */
|
|
7088
|
+
}), bc = /* @__PURE__ */ j(yc, [["__scopeId", "data-v-15975920"]]), kc = { class: "node-config" }, xc = { class: "config-group" }, $c = { class: "config-group" }, wc = { class: "config-group" }, _c = { class: "config-group" }, Cc = { class: "config-group" }, Sc = /* @__PURE__ */ R({
|
|
7089
7089
|
__name: "HttpRequestConfig",
|
|
7090
7090
|
props: {
|
|
7091
7091
|
modelValue: {}
|
|
@@ -7106,7 +7106,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7106
7106
|
} catch {
|
|
7107
7107
|
}
|
|
7108
7108
|
};
|
|
7109
|
-
return
|
|
7109
|
+
return ne(() => o.modelValue.headers, (u) => {
|
|
7110
7110
|
u && (i.value = JSON.stringify(u, null, 2));
|
|
7111
7111
|
}), (u, g) => (f(), v("div", kc, [
|
|
7112
7112
|
e("div", xc, [
|
|
@@ -7117,7 +7117,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7117
7117
|
placeholder: "请输入请求URL",
|
|
7118
7118
|
onInput: c
|
|
7119
7119
|
}, null, 544), [
|
|
7120
|
-
[
|
|
7120
|
+
[se, t.url]
|
|
7121
7121
|
])
|
|
7122
7122
|
]),
|
|
7123
7123
|
e("div", $c, [
|
|
@@ -7142,7 +7142,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7142
7142
|
placeholder: '{"Content-Type": "application/json"}',
|
|
7143
7143
|
onInput: d
|
|
7144
7144
|
}, null, 544), [
|
|
7145
|
-
[
|
|
7145
|
+
[se, i.value]
|
|
7146
7146
|
])
|
|
7147
7147
|
]),
|
|
7148
7148
|
e("div", _c, [
|
|
@@ -7153,7 +7153,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7153
7153
|
placeholder: "请输入请求体内容",
|
|
7154
7154
|
onInput: c
|
|
7155
7155
|
}, null, 544), [
|
|
7156
|
-
[
|
|
7156
|
+
[se, t.body]
|
|
7157
7157
|
])
|
|
7158
7158
|
]),
|
|
7159
7159
|
e("div", Cc, [
|
|
@@ -7164,12 +7164,12 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7164
7164
|
placeholder: "请输入输出变量名",
|
|
7165
7165
|
onInput: c
|
|
7166
7166
|
}, null, 544), [
|
|
7167
|
-
[
|
|
7167
|
+
[se, t.outputVariable]
|
|
7168
7168
|
])
|
|
7169
7169
|
])
|
|
7170
7170
|
]));
|
|
7171
7171
|
}
|
|
7172
|
-
}), Ic = /* @__PURE__ */
|
|
7172
|
+
}), Ic = /* @__PURE__ */ j(Sc, [["__scopeId", "data-v-4c312eea"]]), Dc = { class: "node-config" }, Ec = { class: "config-group" }, Nc = /* @__PURE__ */ R({
|
|
7173
7173
|
__name: "CustomCodeConfig",
|
|
7174
7174
|
props: {
|
|
7175
7175
|
modelValue: {}
|
|
@@ -7190,7 +7190,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7190
7190
|
placeholder: "请输入JavaScript代码",
|
|
7191
7191
|
onInput: i
|
|
7192
7192
|
}, null, 544), [
|
|
7193
|
-
[
|
|
7193
|
+
[se, t.code]
|
|
7194
7194
|
])
|
|
7195
7195
|
]),
|
|
7196
7196
|
d[2] || (d[2] = e("div", { class: "code-hint" }, [
|
|
@@ -7202,7 +7202,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7202
7202
|
], -1))
|
|
7203
7203
|
]));
|
|
7204
7204
|
}
|
|
7205
|
-
}), zc = /* @__PURE__ */
|
|
7205
|
+
}), zc = /* @__PURE__ */ j(Nc, [["__scopeId", "data-v-f7115383"]]), Tc = { class: "node-config" }, Vc = { class: "config-group" }, Ac = { class: "config-group" }, Pc = /* @__PURE__ */ R({
|
|
7206
7206
|
__name: "TimerConfig",
|
|
7207
7207
|
props: {
|
|
7208
7208
|
modelValue: {}
|
|
@@ -7226,7 +7226,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7226
7226
|
onInput: i
|
|
7227
7227
|
}, null, 544), [
|
|
7228
7228
|
[
|
|
7229
|
-
|
|
7229
|
+
se,
|
|
7230
7230
|
t.interval,
|
|
7231
7231
|
void 0,
|
|
7232
7232
|
{ number: !0 }
|
|
@@ -7249,7 +7249,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7249
7249
|
])
|
|
7250
7250
|
]));
|
|
7251
7251
|
}
|
|
7252
|
-
}), Mc = /* @__PURE__ */
|
|
7252
|
+
}), Mc = /* @__PURE__ */ j(Pc, [["__scopeId", "data-v-323381bc"]]), Oc = { class: "node-config" }, Rc = { class: "config-group" }, Lc = ["value"], Wc = {
|
|
7253
7253
|
key: 0,
|
|
7254
7254
|
class: "timer-hint warning"
|
|
7255
7255
|
}, Bc = {
|
|
@@ -7280,9 +7280,9 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7280
7280
|
}
|
|
7281
7281
|
}), n;
|
|
7282
7282
|
};
|
|
7283
|
-
|
|
7283
|
+
ce(() => {
|
|
7284
7284
|
i.value = d();
|
|
7285
|
-
}),
|
|
7285
|
+
}), ne(() => o.modelValue, () => {
|
|
7286
7286
|
i.value = d();
|
|
7287
7287
|
}, { deep: !0 });
|
|
7288
7288
|
const u = () => {
|
|
@@ -7296,7 +7296,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7296
7296
|
onChange: u
|
|
7297
7297
|
}, [
|
|
7298
7298
|
p[1] || (p[1] = e("option", { value: "" }, "请选择要清除的定时器", -1)),
|
|
7299
|
-
(f(!0), v(
|
|
7299
|
+
(f(!0), v(Z, null, le(i.value, (n) => (f(), v("option", {
|
|
7300
7300
|
key: n.id,
|
|
7301
7301
|
value: n.id
|
|
7302
7302
|
}, S(n.label), 9, Lc))), 128))
|
|
@@ -7311,7 +7311,7 @@ const Su = { class: "dialog-body" }, Iu = { class: "search-box" }, Du = { class:
|
|
|
7311
7311
|
])]))
|
|
7312
7312
|
]));
|
|
7313
7313
|
}
|
|
7314
|
-
}), Gc = /* @__PURE__ */
|
|
7314
|
+
}), Gc = /* @__PURE__ */ j(Uc, [["__scopeId", "data-v-d102fb63"]]), Fc = {
|
|
7315
7315
|
[De.GET_PROPERTY]: Hu,
|
|
7316
7316
|
[De.SET_PROPERTY]: tc,
|
|
7317
7317
|
[De.CONDITION]: bc,
|
|
@@ -7345,7 +7345,7 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7345
7345
|
return ((h = (n = (p = o.selectedCell) == null ? void 0 : p.cell) == null ? void 0 : n.model) == null ? void 0 : h.graph) || null;
|
|
7346
7346
|
});
|
|
7347
7347
|
const i = $({}), c = U(() => o.selectedCell ? jc(o.selectedCell.nodeType) : null);
|
|
7348
|
-
|
|
7348
|
+
ne(() => o.selectedCell, (p) => {
|
|
7349
7349
|
if (p != null && p.cell) {
|
|
7350
7350
|
const n = p.cell.getData();
|
|
7351
7351
|
i.value = (n == null ? void 0 : n.config) || {};
|
|
@@ -7366,25 +7366,25 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7366
7366
|
}
|
|
7367
7367
|
a("update:config", p);
|
|
7368
7368
|
}, g = (p) => {
|
|
7369
|
-
var
|
|
7370
|
-
if (!((
|
|
7369
|
+
var J, T;
|
|
7370
|
+
if (!((J = o.selectedCell) != null && J.cell)) return;
|
|
7371
7371
|
const n = o.selectedCell.cell, h = (T = n.model) == null ? void 0 : T.graph;
|
|
7372
7372
|
if (!h) return;
|
|
7373
7373
|
const m = [];
|
|
7374
|
-
h.getConnectedEdges(n, { outgoing: !0 }).forEach((
|
|
7375
|
-
const B =
|
|
7376
|
-
B &&
|
|
7374
|
+
h.getConnectedEdges(n, { outgoing: !0 }).forEach((A) => {
|
|
7375
|
+
const B = A.getSourcePortId(), ge = A.getTargetCell(), xe = A.getTargetPortId();
|
|
7376
|
+
B && ge && m.push({
|
|
7377
7377
|
sourcePortId: B,
|
|
7378
|
-
targetCell:
|
|
7378
|
+
targetCell: ge,
|
|
7379
7379
|
targetPortId: xe
|
|
7380
7380
|
});
|
|
7381
7381
|
});
|
|
7382
7382
|
const b = m.length > 0 ? m[0].targetCell : null, P = m.length > 0 ? m[0].targetPortId : "port-in";
|
|
7383
|
-
n.getPorts().forEach((
|
|
7384
|
-
|
|
7383
|
+
n.getPorts().forEach((A) => {
|
|
7384
|
+
A.group === "out" && n.removePort(A.id);
|
|
7385
7385
|
});
|
|
7386
|
-
const w = 30, x = 60, y = Math.max(p.length, 1), _ = Math.max(x, y * w), C = n.size(), W = n.position(),
|
|
7387
|
-
|
|
7386
|
+
const w = 30, x = 60, y = Math.max(p.length, 1), _ = Math.max(x, y * w), C = n.size(), W = n.position(), Y = _ - C.height;
|
|
7387
|
+
Y !== 0 && n.position(W.x, W.y - Y / 2), n.resize(C.width, _), p.forEach((A, B) => {
|
|
7388
7388
|
n.addPort({
|
|
7389
7389
|
id: `port-out-${B}`,
|
|
7390
7390
|
group: "out",
|
|
@@ -7397,14 +7397,14 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7397
7397
|
fill: "#1e293b"
|
|
7398
7398
|
},
|
|
7399
7399
|
portLabel: {
|
|
7400
|
-
text:
|
|
7400
|
+
text: A.label || `分支${B + 1}`,
|
|
7401
7401
|
fontSize: 10,
|
|
7402
7402
|
fill: "#94a3b8"
|
|
7403
7403
|
}
|
|
7404
7404
|
}
|
|
7405
7405
|
});
|
|
7406
7406
|
}), setTimeout(() => {
|
|
7407
|
-
b && p.forEach((
|
|
7407
|
+
b && p.forEach((A, B) => {
|
|
7408
7408
|
h.addEdge({
|
|
7409
7409
|
source: { cell: n, port: `port-out-${B}` },
|
|
7410
7410
|
target: { cell: b, port: P },
|
|
@@ -7412,7 +7412,7 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7412
7412
|
{
|
|
7413
7413
|
attrs: {
|
|
7414
7414
|
label: {
|
|
7415
|
-
text:
|
|
7415
|
+
text: A.label || `分支${B + 1}`,
|
|
7416
7416
|
fill: "#e2e8f0",
|
|
7417
7417
|
fontSize: 12
|
|
7418
7418
|
},
|
|
@@ -7466,7 +7466,7 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7466
7466
|
])]))
|
|
7467
7467
|
]));
|
|
7468
7468
|
}
|
|
7469
|
-
}), tp = /* @__PURE__ */
|
|
7469
|
+
}), tp = /* @__PURE__ */ j(ep, [["__scopeId", "data-v-8304acbc"]]), op = { class: "toolbar" }, lp = { class: "toolbar-right" }, np = /* @__PURE__ */ R({
|
|
7470
7470
|
__name: "WorkflowToolbar",
|
|
7471
7471
|
props: {
|
|
7472
7472
|
showClose: { type: Boolean }
|
|
@@ -7501,7 +7501,7 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7501
7501
|
])
|
|
7502
7502
|
]));
|
|
7503
7503
|
}
|
|
7504
|
-
}), sp = /* @__PURE__ */
|
|
7504
|
+
}), sp = /* @__PURE__ */ j(np, [["__scopeId", "data-v-b3e0a4fc"]]), ip = { class: "menu-header" }, ap = { class: "menu-list" }, rp = ["onClick"], dp = { class: "menu-item-info" }, up = { class: "menu-item-name" }, cp = { class: "menu-item-desc" }, pp = /* @__PURE__ */ R({
|
|
7505
7505
|
__name: "AddNodeMenu",
|
|
7506
7506
|
props: {
|
|
7507
7507
|
visible: { type: Boolean },
|
|
@@ -7535,13 +7535,13 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7535
7535
|
}, "×")
|
|
7536
7536
|
]),
|
|
7537
7537
|
e("div", ap, [
|
|
7538
|
-
(f(!0), v(
|
|
7538
|
+
(f(!0), v(Z, null, le(t.value, (u) => (f(), v("div", {
|
|
7539
7539
|
key: u.type,
|
|
7540
7540
|
class: "menu-item",
|
|
7541
7541
|
onClick: (g) => i(u)
|
|
7542
7542
|
}, [
|
|
7543
7543
|
e("div", {
|
|
7544
|
-
class:
|
|
7544
|
+
class: ie(["menu-item-icon", `node-icon-${u.type}`])
|
|
7545
7545
|
}, S(u.icon), 3),
|
|
7546
7546
|
e("div", dp, [
|
|
7547
7547
|
e("div", up, S(u.name), 1),
|
|
@@ -7552,7 +7552,7 @@ const Hc = { class: "property-panel" }, qc = {
|
|
|
7552
7552
|
], 4)) : E("", !0)
|
|
7553
7553
|
]));
|
|
7554
7554
|
}
|
|
7555
|
-
}), fp = /* @__PURE__ */
|
|
7555
|
+
}), fp = /* @__PURE__ */ j(pp, [["__scopeId", "data-v-aa6fccf8"]]);
|
|
7556
7556
|
class vp {
|
|
7557
7557
|
constructor() {
|
|
7558
7558
|
Me(this, "graph", null);
|
|
@@ -7841,13 +7841,13 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
7841
7841
|
y.preventDefault();
|
|
7842
7842
|
const W = i.value.cell;
|
|
7843
7843
|
console.log("删除选中的节点:", i.value.label);
|
|
7844
|
-
const
|
|
7845
|
-
|
|
7846
|
-
const
|
|
7847
|
-
|
|
7848
|
-
const xe =
|
|
7849
|
-
|
|
7850
|
-
source: { cell:
|
|
7844
|
+
const Y = t.getIncomingEdges(W), J = t.getOutgoingEdges(W);
|
|
7845
|
+
Y && Y.length > 0 && J && J.length > 0 && Y.forEach((T) => {
|
|
7846
|
+
const A = T.getSourceCell(), B = T.getSourcePortId();
|
|
7847
|
+
J.forEach((ge) => {
|
|
7848
|
+
const xe = ge.getTargetCell(), Ve = ge.getTargetPortId();
|
|
7849
|
+
A && xe && t && (t.addEdge({
|
|
7850
|
+
source: { cell: A, port: B },
|
|
7851
7851
|
target: { cell: xe, port: Ve }
|
|
7852
7852
|
}), console.log("已连接前后节点"));
|
|
7853
7853
|
});
|
|
@@ -7961,10 +7961,10 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
7961
7961
|
if (!t || !u) return;
|
|
7962
7962
|
const y = u.getSourceCell(), _ = u.getTargetCell();
|
|
7963
7963
|
if (!y || !_) return;
|
|
7964
|
-
const C = y.position(), W = _.position(),
|
|
7964
|
+
const C = y.position(), W = _.position(), Y = (C.x + W.x) / 2, J = (C.y + W.y) / 2, T = t.addNode({
|
|
7965
7965
|
shape: x.type,
|
|
7966
|
-
x:
|
|
7967
|
-
y:
|
|
7966
|
+
x: Y,
|
|
7967
|
+
y: J,
|
|
7968
7968
|
label: x.name,
|
|
7969
7969
|
data: {
|
|
7970
7970
|
nodeType: x.type
|
|
@@ -8026,35 +8026,35 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8026
8026
|
}, b = () => {
|
|
8027
8027
|
if (!t)
|
|
8028
8028
|
return console.log("画布不存在"), { errors: ["画布不存在"], warnings: [] };
|
|
8029
|
-
const x = [], y = [], _ = t.getNodes(), C = _.filter((
|
|
8030
|
-
var
|
|
8031
|
-
return ((
|
|
8029
|
+
const x = [], y = [], _ = t.getNodes(), C = _.filter((Y) => {
|
|
8030
|
+
var J;
|
|
8031
|
+
return ((J = Y.getData()) == null ? void 0 : J.nodeType) === "start";
|
|
8032
8032
|
});
|
|
8033
|
-
return C.length === 0 ? x.push("流程中缺少开始节点") : C.length > 1 && y.push("流程中有多个开始节点"), _.filter((
|
|
8034
|
-
var
|
|
8035
|
-
return ((
|
|
8036
|
-
}).length === 0 && y.push("流程中缺少结束节点"), _.forEach((
|
|
8037
|
-
const
|
|
8038
|
-
(T === "getProperty" || T === "setProperty") && (
|
|
8039
|
-
}), _.forEach((
|
|
8040
|
-
var
|
|
8041
|
-
const
|
|
8042
|
-
if (
|
|
8043
|
-
const B = t.getOutgoingEdges(
|
|
8033
|
+
return C.length === 0 ? x.push("流程中缺少开始节点") : C.length > 1 && y.push("流程中有多个开始节点"), _.filter((Y) => {
|
|
8034
|
+
var J;
|
|
8035
|
+
return ((J = Y.getData()) == null ? void 0 : J.nodeType) === "end";
|
|
8036
|
+
}).length === 0 && y.push("流程中缺少结束节点"), _.forEach((Y) => {
|
|
8037
|
+
const J = Y.getData(), T = J == null ? void 0 : J.nodeType, A = (J == null ? void 0 : J.config) || {}, B = Y.getAttrByPath("label/text") || "未命名节点";
|
|
8038
|
+
(T === "getProperty" || T === "setProperty") && (A.elementId || x.push(`节点「${B}」未配置图元`), A.propertyName || x.push(`节点「${B}」未配置属性`), T === "setProperty" && !A.value && y.push(`节点「${B}」未配置属性值`)), T === "httpRequest" && (A.url || x.push(`节点「${B}」未配置请求URL`)), T === "condition" && (!A.branches || A.branches.length === 0) && x.push(`节点「${B}」未配置条件分支`), T === "timer" && (!A.interval || A.interval <= 0) && x.push(`节点「${B}」未配置有效的时间间隔`), T === "clearTimer" && (A.timerId || x.push(`节点「${B}」未选择定时器`)), T === "customCode" && (A.code || y.push(`节点「${B}」未编写代码`));
|
|
8039
|
+
}), _.forEach((Y) => {
|
|
8040
|
+
var A;
|
|
8041
|
+
const J = (A = Y.getData()) == null ? void 0 : A.nodeType, T = Y.getAttrByPath("label/text") || "未命名节点";
|
|
8042
|
+
if (J === "start" && t) {
|
|
8043
|
+
const B = t.getOutgoingEdges(Y);
|
|
8044
8044
|
(!B || B.length === 0) && x.push(`开始节点「${T}」没有连接到下一个节点`);
|
|
8045
8045
|
}
|
|
8046
|
-
if (
|
|
8047
|
-
const B = t.getOutgoingEdges(
|
|
8046
|
+
if (J === "end" && t) {
|
|
8047
|
+
const B = t.getOutgoingEdges(Y);
|
|
8048
8048
|
B && B.length > 0 && y.push(`结束节点「${T}」不应该有输出连线`);
|
|
8049
8049
|
}
|
|
8050
|
-
if (
|
|
8051
|
-
const B = t.getIncomingEdges(
|
|
8052
|
-
(!B || B.length === 0) && y.push(`节点「${T}」没有输入连线`),
|
|
8050
|
+
if (J !== "start" && J !== "end" && t) {
|
|
8051
|
+
const B = t.getIncomingEdges(Y), ge = t.getOutgoingEdges(Y);
|
|
8052
|
+
(!B || B.length === 0) && y.push(`节点「${T}」没有输入连线`), J !== "clearTimer" && (!ge || ge.length === 0) && y.push(`节点「${T}」没有输出连线`);
|
|
8053
8053
|
}
|
|
8054
|
-
}), t && _.forEach((
|
|
8055
|
-
var
|
|
8056
|
-
const
|
|
8057
|
-
|
|
8054
|
+
}), t && _.forEach((Y) => {
|
|
8055
|
+
var ge;
|
|
8056
|
+
const J = t.getIncomingEdges(Y), T = t.getOutgoingEdges(Y), A = (ge = Y.getData()) == null ? void 0 : ge.nodeType, B = Y.getAttrByPath("label/text") || "未命名节点";
|
|
8057
|
+
A !== "start" && (!J || J.length === 0) && (!T || T.length === 0) && y.push(`节点「${B}」是孤立节点`);
|
|
8058
8058
|
}), { errors: x, warnings: y };
|
|
8059
8059
|
}, P = () => {
|
|
8060
8060
|
const { errors: x, warnings: y } = b();
|
|
@@ -8074,45 +8074,45 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8074
8074
|
if (!t) return;
|
|
8075
8075
|
const { errors: x, warnings: y } = b();
|
|
8076
8076
|
if (x.length > 0) {
|
|
8077
|
-
let
|
|
8077
|
+
let A = `流程验证失败,无法保存!
|
|
8078
8078
|
|
|
8079
8079
|
`;
|
|
8080
|
-
|
|
8080
|
+
A += `错误:
|
|
8081
8081
|
` + x.map((B) => " • " + B).join(`
|
|
8082
|
-
`), y.length > 0 && (
|
|
8082
|
+
`), y.length > 0 && (A += `
|
|
8083
8083
|
|
|
8084
8084
|
警告:
|
|
8085
8085
|
` + y.map((B) => " • " + B).join(`
|
|
8086
|
-
`)), alert(
|
|
8086
|
+
`)), alert(A);
|
|
8087
8087
|
return;
|
|
8088
8088
|
}
|
|
8089
8089
|
if (y.length > 0) {
|
|
8090
|
-
let
|
|
8090
|
+
let A = `流程存在以下警告:
|
|
8091
8091
|
|
|
8092
8092
|
`;
|
|
8093
|
-
if (
|
|
8094
|
-
`),
|
|
8093
|
+
if (A += y.map((B) => " • " + B).join(`
|
|
8094
|
+
`), A += `
|
|
8095
8095
|
|
|
8096
|
-
是否继续保存?`, !confirm(
|
|
8096
|
+
是否继续保存?`, !confirm(A))
|
|
8097
8097
|
return;
|
|
8098
8098
|
}
|
|
8099
8099
|
const _ = prompt("请输入流程名称:", "未命名流程");
|
|
8100
8100
|
if (!_ || !_.trim())
|
|
8101
8101
|
return;
|
|
8102
|
-
const C = t.toJSON(), W = t.getNodes().map((
|
|
8103
|
-
id:
|
|
8104
|
-
shape:
|
|
8105
|
-
position:
|
|
8106
|
-
size:
|
|
8107
|
-
attrs:
|
|
8108
|
-
data:
|
|
8102
|
+
const C = t.toJSON(), W = t.getNodes().map((A) => ({
|
|
8103
|
+
id: A.id,
|
|
8104
|
+
shape: A.shape,
|
|
8105
|
+
position: A.getPosition(),
|
|
8106
|
+
size: A.getSize(),
|
|
8107
|
+
attrs: A.getAttrs(),
|
|
8108
|
+
data: A.getData()
|
|
8109
8109
|
// 关键:保存节点的data数据,包含所有配置
|
|
8110
|
-
})),
|
|
8111
|
-
id:
|
|
8112
|
-
source:
|
|
8113
|
-
target:
|
|
8114
|
-
attrs:
|
|
8115
|
-
data:
|
|
8110
|
+
})), Y = t.getEdges().map((A) => ({
|
|
8111
|
+
id: A.id,
|
|
8112
|
+
source: A.getSourceCellId(),
|
|
8113
|
+
target: A.getTargetCellId(),
|
|
8114
|
+
attrs: A.getAttrs(),
|
|
8115
|
+
data: A.getData()
|
|
8116
8116
|
})), T = {
|
|
8117
8117
|
id: "workflow_" + Date.now(),
|
|
8118
8118
|
name: _.trim(),
|
|
@@ -8121,20 +8121,20 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8121
8121
|
// 保留原始数据结构
|
|
8122
8122
|
nodes: W,
|
|
8123
8123
|
// 覆盖为详细节点数据
|
|
8124
|
-
edges:
|
|
8124
|
+
edges: Y
|
|
8125
8125
|
// 覆盖为详细连线数据
|
|
8126
8126
|
},
|
|
8127
8127
|
createdAt: Date.now(),
|
|
8128
8128
|
updatedAt: Date.now()
|
|
8129
8129
|
};
|
|
8130
8130
|
try {
|
|
8131
|
-
const
|
|
8131
|
+
const A = localStorage.getItem("saved-workflows"), B = A ? JSON.parse(A) : [];
|
|
8132
8132
|
B.push(T), localStorage.setItem("saved-workflows", JSON.stringify(B)), alert("✓ 流程保存成功!"), console.log("流程已保存:", T);
|
|
8133
|
-
} catch (
|
|
8134
|
-
console.error("保存流程失败:",
|
|
8133
|
+
} catch (A) {
|
|
8134
|
+
console.error("保存流程失败:", A), alert("保存失败,请重试");
|
|
8135
8135
|
}
|
|
8136
8136
|
};
|
|
8137
|
-
|
|
8137
|
+
ce(() => {
|
|
8138
8138
|
p(), window.addEventListener("resize", w);
|
|
8139
8139
|
});
|
|
8140
8140
|
const w = () => {
|
|
@@ -8151,7 +8151,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8151
8151
|
};
|
|
8152
8152
|
document.removeEventListener("keydown", x), t && t.dispose();
|
|
8153
8153
|
}), (x, y) => (f(), v("div", gp, [
|
|
8154
|
-
|
|
8154
|
+
pe(sp, {
|
|
8155
8155
|
"show-close": r.showClose,
|
|
8156
8156
|
onClear: s,
|
|
8157
8157
|
onValidate: P,
|
|
@@ -8166,12 +8166,12 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8166
8166
|
ref: a
|
|
8167
8167
|
}, null, 512)
|
|
8168
8168
|
]),
|
|
8169
|
-
|
|
8169
|
+
pe(tp, {
|
|
8170
8170
|
"selected-cell": i.value,
|
|
8171
8171
|
"onUpdate:label": h
|
|
8172
8172
|
}, null, 8, ["selected-cell"])
|
|
8173
8173
|
]),
|
|
8174
|
-
|
|
8174
|
+
pe(fp, {
|
|
8175
8175
|
visible: c.value,
|
|
8176
8176
|
position: d.value,
|
|
8177
8177
|
"node-types": o.value,
|
|
@@ -8180,7 +8180,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8180
8180
|
}, null, 8, ["visible", "position", "node-types"])
|
|
8181
8181
|
]));
|
|
8182
8182
|
}
|
|
8183
|
-
}), bp = /* @__PURE__ */
|
|
8183
|
+
}), bp = /* @__PURE__ */ j(yp, [["__scopeId", "data-v-649349a2"]]), kp = {
|
|
8184
8184
|
key: 0,
|
|
8185
8185
|
class: "workflow-dialog-overlay"
|
|
8186
8186
|
}, xp = { class: "workflow-dialog" }, $p = /* @__PURE__ */ R({
|
|
@@ -8192,7 +8192,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8192
8192
|
emits: ["update:visible", "close"],
|
|
8193
8193
|
setup(r, { emit: l }) {
|
|
8194
8194
|
const o = r, a = l;
|
|
8195
|
-
|
|
8195
|
+
ne(() => o.visible, (c) => {
|
|
8196
8196
|
c ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
|
|
8197
8197
|
});
|
|
8198
8198
|
const t = () => {
|
|
@@ -8202,7 +8202,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8202
8202
|
};
|
|
8203
8203
|
return typeof window < "u" && window.addEventListener("keydown", i), (c, d) => r.visible ? (f(), v("div", kp, [
|
|
8204
8204
|
e("div", xp, [
|
|
8205
|
-
|
|
8205
|
+
pe(bp, {
|
|
8206
8206
|
"scada-graph": r.scadaGraph,
|
|
8207
8207
|
"show-close": !0,
|
|
8208
8208
|
onClose: t
|
|
@@ -8210,7 +8210,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8210
8210
|
])
|
|
8211
8211
|
])) : E("", !0);
|
|
8212
8212
|
}
|
|
8213
|
-
}), wp = /* @__PURE__ */
|
|
8213
|
+
}), wp = /* @__PURE__ */ j($p, [["__scopeId", "data-v-4e7f6ab7"]]), _p = /* @__PURE__ */ R({
|
|
8214
8214
|
__name: "EChartsGauge",
|
|
8215
8215
|
props: {
|
|
8216
8216
|
node: {}
|
|
@@ -8243,17 +8243,17 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8243
8243
|
};
|
|
8244
8244
|
g && g.config ? (Object.assign(p.series[0], g.config), console.log("[EChartsGauge] 最终配置:", p)) : console.warn("[EChartsGauge] 预设未找到或配置为空"), a.setOption(p, !0);
|
|
8245
8245
|
};
|
|
8246
|
-
return
|
|
8246
|
+
return ne(() => {
|
|
8247
8247
|
var d;
|
|
8248
8248
|
return (d = l.node) == null ? void 0 : d.data;
|
|
8249
8249
|
}, (d, u) => {
|
|
8250
8250
|
console.log("[EChartsGauge] data 变化:", d), console.log("[EChartsGauge] 旧数据:", u), c();
|
|
8251
|
-
}, { deep: !0 }),
|
|
8251
|
+
}, { deep: !0 }), ne(() => {
|
|
8252
8252
|
var d, u;
|
|
8253
8253
|
return (u = (d = l.node) == null ? void 0 : d.data) == null ? void 0 : u.presetId;
|
|
8254
8254
|
}, (d, u) => {
|
|
8255
8255
|
console.log("[EChartsGauge] presetId 变化:", u, "->", d), d !== u && c();
|
|
8256
|
-
}),
|
|
8256
|
+
}), ne(() => {
|
|
8257
8257
|
var d;
|
|
8258
8258
|
return (d = l.node) == null ? void 0 : d.size;
|
|
8259
8259
|
}, () => {
|
|
@@ -8264,7 +8264,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8264
8264
|
height: d.height
|
|
8265
8265
|
});
|
|
8266
8266
|
}
|
|
8267
|
-
}, { deep: !0 }),
|
|
8267
|
+
}, { deep: !0 }), ce(() => {
|
|
8268
8268
|
setTimeout(() => {
|
|
8269
8269
|
i(), l.node && typeof l.node.on == "function" && l.node.on("change:data", ({ current: d }) => {
|
|
8270
8270
|
console.log("[EChartsGauge] X6 data 变化事件:", d), c();
|
|
@@ -8279,7 +8279,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8279
8279
|
style: { width: "100%", height: "100%" }
|
|
8280
8280
|
}, null, 512));
|
|
8281
8281
|
}
|
|
8282
|
-
}), Cp = /* @__PURE__ */
|
|
8282
|
+
}), Cp = /* @__PURE__ */ j(_p, [["__scopeId", "data-v-9a90f768"]]), Sp = /* @__PURE__ */ R({
|
|
8283
8283
|
__name: "EChartsLine",
|
|
8284
8284
|
props: {
|
|
8285
8285
|
node: {}
|
|
@@ -8355,7 +8355,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8355
8355
|
};
|
|
8356
8356
|
g && g.config && Object.assign(p.series[0], g.config), a.setOption(p, !0);
|
|
8357
8357
|
};
|
|
8358
|
-
return
|
|
8358
|
+
return ce(() => {
|
|
8359
8359
|
setTimeout(() => {
|
|
8360
8360
|
i(), l.node && typeof l.node.on == "function" && l.node.on("change:data", ({ current: d }) => {
|
|
8361
8361
|
c();
|
|
@@ -8388,9 +8388,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8388
8388
|
const u = a();
|
|
8389
8389
|
t.value = u.state === !0 || u.state === "on", i.value = u.color || "#fbbf24";
|
|
8390
8390
|
};
|
|
8391
|
-
return
|
|
8391
|
+
return ne(() => l.node, () => {
|
|
8392
8392
|
d();
|
|
8393
|
-
}, { deep: !0 }),
|
|
8393
|
+
}, { deep: !0 }), ce(() => {
|
|
8394
8394
|
d(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
8395
8395
|
d();
|
|
8396
8396
|
});
|
|
@@ -8607,11 +8607,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8607
8607
|
}, null, -1))
|
|
8608
8608
|
])),
|
|
8609
8609
|
e("div", {
|
|
8610
|
-
class:
|
|
8610
|
+
class: ie(["status-text", { "is-on": t.value }])
|
|
8611
8611
|
}, S(t.value ? "开启" : "关闭"), 3)
|
|
8612
8612
|
]));
|
|
8613
8613
|
}
|
|
8614
|
-
}), qp = /* @__PURE__ */
|
|
8614
|
+
}), qp = /* @__PURE__ */ j(Hp, [["__scopeId", "data-v-7237b5fc"]]), Jp = { class: "switch-3d-container" }, Yp = {
|
|
8615
8615
|
viewBox: "0 0 120 80",
|
|
8616
8616
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8617
8617
|
}, Xp = ["id"], Kp = ["id"], Qp = ["id"], Zp = ["id"], e0 = ["fill"], t0 = ["fill"], o0 = ["fill"], l0 = ["transform"], n0 = ["fill"], s0 = ["fill", "filter"], i0 = ["opacity"], a0 = ["fill", "filter"], r0 = ["opacity"], d0 = /* @__PURE__ */ R({
|
|
@@ -8624,9 +8624,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8624
8624
|
const d = a();
|
|
8625
8625
|
t.value = d.state === !0 || d.state === "on";
|
|
8626
8626
|
};
|
|
8627
|
-
return
|
|
8627
|
+
return ne(() => l.node, () => {
|
|
8628
8628
|
c();
|
|
8629
|
-
}, { deep: !0 }),
|
|
8629
|
+
}, { deep: !0 }), ce(() => {
|
|
8630
8630
|
c(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
8631
8631
|
c();
|
|
8632
8632
|
});
|
|
@@ -8716,7 +8716,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8716
8716
|
stroke: "#0f172a",
|
|
8717
8717
|
"stroke-width": "1"
|
|
8718
8718
|
}, null, 8, e0),
|
|
8719
|
-
u[6] || (u[6] =
|
|
8719
|
+
u[6] || (u[6] = re('<g data-v-09d0019e><circle cx="30" cy="35" r="3" fill="#0f172a" data-v-09d0019e></circle><circle cx="30" cy="35" r="1.5" fill="#475569" data-v-09d0019e></circle><line x1="28" y1="35" x2="32" y2="35" stroke="#1e293b" stroke-width="0.5" data-v-09d0019e></line><circle cx="90" cy="35" r="3" fill="#0f172a" data-v-09d0019e></circle><circle cx="90" cy="35" r="1.5" fill="#475569" data-v-09d0019e></circle><line x1="88" y1="35" x2="92" y2="35" stroke="#1e293b" stroke-width="0.5" data-v-09d0019e></line><circle cx="30" cy="65" r="3" fill="#0f172a" data-v-09d0019e></circle><circle cx="30" cy="65" r="1.5" fill="#475569" data-v-09d0019e></circle><line x1="28" y1="65" x2="32" y2="65" stroke="#1e293b" stroke-width="0.5" data-v-09d0019e></line><circle cx="90" cy="65" r="3" fill="#0f172a" data-v-09d0019e></circle><circle cx="90" cy="65" r="1.5" fill="#475569" data-v-09d0019e></circle><line x1="88" y1="65" x2="92" y2="65" stroke="#1e293b" stroke-width="0.5" data-v-09d0019e></line></g>', 1)),
|
|
8720
8720
|
e("rect", {
|
|
8721
8721
|
x: "40",
|
|
8722
8722
|
y: "38",
|
|
@@ -8765,7 +8765,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8765
8765
|
stroke: "#94a3b8",
|
|
8766
8766
|
"stroke-width": "1"
|
|
8767
8767
|
}, null, 8, n0),
|
|
8768
|
-
u[5] || (u[5] =
|
|
8768
|
+
u[5] || (u[5] = re('<g opacity="0.3" data-v-09d0019e><line x1="-4" y1="43" x2="-4" y2="57" stroke="#64748b" stroke-width="0.5" data-v-09d0019e></line><line x1="0" y1="43" x2="0" y2="57" stroke="#64748b" stroke-width="0.5" data-v-09d0019e></line><line x1="4" y1="43" x2="4" y2="57" stroke="#64748b" stroke-width="0.5" data-v-09d0019e></line></g><rect x="-6" y="42" width="4" height="8" rx="2" fill="#ffffff" opacity="0.4" data-v-09d0019e></rect>', 2))
|
|
8769
8769
|
], 8, l0),
|
|
8770
8770
|
e("g", null, [
|
|
8771
8771
|
e("circle", {
|
|
@@ -8797,14 +8797,14 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8797
8797
|
opacity: t.value ? 0.6 : 0.1
|
|
8798
8798
|
}, null, 8, r0)
|
|
8799
8799
|
]),
|
|
8800
|
-
u[8] || (u[8] =
|
|
8800
|
+
u[8] || (u[8] = re('<g data-v-09d0019e><rect x="15" y="47" width="8" height="6" rx="1" fill="#64748b" stroke="#475569" stroke-width="0.5" data-v-09d0019e></rect><circle cx="19" cy="50" r="1.5" fill="#94a3b8" data-v-09d0019e></circle><rect x="97" y="47" width="8" height="6" rx="1" fill="#64748b" stroke="#475569" stroke-width="0.5" data-v-09d0019e></rect><circle cx="101" cy="50" r="1.5" fill="#94a3b8" data-v-09d0019e></circle></g><rect x="50" y="67" width="20" height="6" rx="1" fill="#0f172a" opacity="0.7" data-v-09d0019e></rect><text x="60" y="71" font-size="3" fill="#64748b" text-anchor="middle" font-family="monospace" data-v-09d0019e>KCD1-101</text>', 3))
|
|
8801
8801
|
])),
|
|
8802
8802
|
e("div", {
|
|
8803
|
-
class:
|
|
8803
|
+
class: ie(["status-text", { "is-on": t.value }])
|
|
8804
8804
|
}, S(t.value ? "开启" : "关闭"), 3)
|
|
8805
8805
|
]));
|
|
8806
8806
|
}
|
|
8807
|
-
}), u0 = /* @__PURE__ */
|
|
8807
|
+
}), u0 = /* @__PURE__ */ j(d0, [["__scopeId", "data-v-09d0019e"]]), c0 = { class: "motor-3d-container" }, p0 = {
|
|
8808
8808
|
viewBox: "0 0 120 100",
|
|
8809
8809
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8810
8810
|
}, f0 = ["id"], v0 = ["id"], g0 = ["id"], m0 = ["fill"], h0 = ["fill"], y0 = ["fill"], b0 = ["transform"], k0 = ["fill", "filter"], x0 = ["opacity"], $0 = {
|
|
@@ -8832,9 +8832,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8832
8832
|
const n = a();
|
|
8833
8833
|
t.value = n.state === "running" || n.state === !0, i.value = n.speed || 1500, c.value = n.power || 7.5;
|
|
8834
8834
|
};
|
|
8835
|
-
return
|
|
8835
|
+
return ne(() => l.node, () => {
|
|
8836
8836
|
p();
|
|
8837
|
-
}, { deep: !0 }),
|
|
8837
|
+
}, { deep: !0 }), ce(() => {
|
|
8838
8838
|
p(), t.value && g(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
8839
8839
|
const n = t.value;
|
|
8840
8840
|
p(), t.value && !n ? g() : !t.value && n && u && (cancelAnimationFrame(u), u = null);
|
|
@@ -8905,7 +8905,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8905
8905
|
rx: "3",
|
|
8906
8906
|
fill: `url(#motor-body-${o.value})`
|
|
8907
8907
|
}, null, 8, m0),
|
|
8908
|
-
h[4] || (h[4] =
|
|
8908
|
+
h[4] || (h[4] = re('<rect x="20" y="70" width="80" height="3" fill="#1e293b" opacity="0.3" data-v-14ee96e9></rect><circle cx="30" cy="82" r="3" fill="#334155" data-v-14ee96e9></circle><circle cx="30" cy="82" r="1.5" fill="#64748b" data-v-14ee96e9></circle><circle cx="90" cy="82" r="3" fill="#334155" data-v-14ee96e9></circle><circle cx="90" cy="82" r="1.5" fill="#64748b" data-v-14ee96e9></circle>', 5)),
|
|
8909
8909
|
e("ellipse", {
|
|
8910
8910
|
cx: "60",
|
|
8911
8911
|
cy: "45",
|
|
@@ -8915,7 +8915,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8915
8915
|
stroke: "#334155",
|
|
8916
8916
|
"stroke-width": "1"
|
|
8917
8917
|
}, null, 8, h0),
|
|
8918
|
-
h[5] || (h[5] =
|
|
8918
|
+
h[5] || (h[5] = re('<g opacity="0.3" data-v-14ee96e9><line x1="30" y1="30" x2="30" y2="60" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="40" y1="25" x2="40" y2="65" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="50" y1="22" x2="50" y2="68" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="60" y1="20" x2="60" y2="70" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="70" y1="22" x2="70" y2="68" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="80" y1="25" x2="80" y2="65" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line><line x1="90" y1="30" x2="90" y2="60" stroke="#1e293b" stroke-width="1" data-v-14ee96e9></line></g><rect x="25" y="40" width="2" height="10" fill="#475569" opacity="0.6" data-v-14ee96e9></rect><rect x="30" y="38" width="2" height="14" fill="#475569" opacity="0.6" data-v-14ee96e9></rect><rect x="35" y="36" width="2" height="18" fill="#475569" opacity="0.6" data-v-14ee96e9></rect>', 4)),
|
|
8919
8919
|
e("rect", {
|
|
8920
8920
|
x: "95",
|
|
8921
8921
|
y: "42",
|
|
@@ -8929,9 +8929,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8929
8929
|
e("g", {
|
|
8930
8930
|
transform: `rotate(${d.value} 105 45)`
|
|
8931
8931
|
}, [...h[3] || (h[3] = [
|
|
8932
|
-
|
|
8932
|
+
re('<g opacity="0.8" data-v-14ee96e9><rect x="103" y="40" width="4" height="10" rx="1" fill="#94a3b8" data-v-14ee96e9></rect><rect x="100" y="43" width="10" height="4" rx="1" fill="#94a3b8" data-v-14ee96e9></rect><line x1="102" y1="42" x2="108" y2="48" stroke="#94a3b8" stroke-width="3" stroke-linecap="round" data-v-14ee96e9></line><line x1="108" y1="42" x2="102" y2="48" stroke="#94a3b8" stroke-width="3" stroke-linecap="round" data-v-14ee96e9></line></g>', 1)
|
|
8933
8933
|
])], 8, b0),
|
|
8934
|
-
h[6] || (h[6] =
|
|
8934
|
+
h[6] || (h[6] = re('<circle cx="105" cy="45" r="3" fill="#334155" stroke="#64748b" stroke-width="1" data-v-14ee96e9></circle><rect x="45" y="15" width="15" height="10" rx="1" fill="#334155" stroke="#475569" stroke-width="0.5" data-v-14ee96e9></rect><circle cx="48" cy="20" r="1" fill="#dc2626" data-v-14ee96e9></circle><circle cx="52" cy="20" r="1" fill="#22c55e" data-v-14ee96e9></circle><circle cx="56" cy="20" r="1" fill="#3b82f6" data-v-14ee96e9></circle>', 5)),
|
|
8935
8935
|
e("circle", {
|
|
8936
8936
|
cx: "15",
|
|
8937
8937
|
cy: "45",
|
|
@@ -8958,11 +8958,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8958
8958
|
e("text", $0, S(c.value) + "kW " + S(i.value) + "rpm ", 1)
|
|
8959
8959
|
])),
|
|
8960
8960
|
e("div", {
|
|
8961
|
-
class:
|
|
8961
|
+
class: ie(["status-text", { "is-running": t.value }])
|
|
8962
8962
|
}, S(t.value ? "运行中" : "已停止"), 3)
|
|
8963
8963
|
]));
|
|
8964
8964
|
}
|
|
8965
|
-
}), _0 = /* @__PURE__ */
|
|
8965
|
+
}), _0 = /* @__PURE__ */ j(w0, [["__scopeId", "data-v-14ee96e9"]]), C0 = { class: "valve-3d-container" }, S0 = {
|
|
8966
8966
|
viewBox: "0 0 100 120",
|
|
8967
8967
|
xmlns: "http://www.w3.org/2000/svg"
|
|
8968
8968
|
}, I0 = ["id"], D0 = ["id"], E0 = ["fill"], N0 = ["fill"], z0 = ["fill"], T0 = ["fill"], V0 = { transform: "translate(50, 60)" }, A0 = ["fill", "transform"], P0 = ["transform"], M0 = ["fill"], O0 = ["fill"], R0 = {
|
|
@@ -8989,9 +8989,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
8989
8989
|
const u = a();
|
|
8990
8990
|
t.value = u.state === "open" || u.state === !0, i.value = u.openness !== void 0 ? u.openness : t.value ? 100 : 0;
|
|
8991
8991
|
};
|
|
8992
|
-
return
|
|
8992
|
+
return ne(() => l.node, () => {
|
|
8993
8993
|
d();
|
|
8994
|
-
}, { deep: !0 }),
|
|
8994
|
+
}, { deep: !0 }), ce(() => {
|
|
8995
8995
|
d(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
8996
8996
|
d();
|
|
8997
8997
|
});
|
|
@@ -9084,7 +9084,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9084
9084
|
stroke: "#475569",
|
|
9085
9085
|
"stroke-width": "1"
|
|
9086
9086
|
}, null, 8, z0),
|
|
9087
|
-
g[5] || (g[5] =
|
|
9087
|
+
g[5] || (g[5] = re('<ellipse cx="50" cy="50" rx="25" ry="15" fill="#94a3b8" stroke="#475569" stroke-width="1" data-v-9c6b9014></ellipse><g data-v-9c6b9014><circle cx="30" cy="55" r="2" fill="#334155" data-v-9c6b9014></circle><circle cx="30" cy="65" r="2" fill="#334155" data-v-9c6b9014></circle><circle cx="70" cy="55" r="2" fill="#334155" data-v-9c6b9014></circle><circle cx="70" cy="65" r="2" fill="#334155" data-v-9c6b9014></circle></g>', 2)),
|
|
9088
9088
|
e("rect", {
|
|
9089
9089
|
x: "40",
|
|
9090
9090
|
y: "10",
|
|
@@ -9146,7 +9146,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9146
9146
|
stroke: "#991b1b",
|
|
9147
9147
|
"stroke-width": "1"
|
|
9148
9148
|
}, null, 8, M0),
|
|
9149
|
-
g[2] || (g[2] =
|
|
9149
|
+
g[2] || (g[2] = re('<circle cx="50" cy="25" r="12" fill="none" stroke="#7f1d1d" stroke-width="2" data-v-9c6b9014></circle><circle cx="50" cy="25" r="5" fill="#7f1d1d" data-v-9c6b9014></circle><line x1="50" y1="25" x2="50" y2="12" stroke="#7f1d1d" stroke-width="2" data-v-9c6b9014></line><line x1="50" y1="25" x2="50" y2="38" stroke="#7f1d1d" stroke-width="2" data-v-9c6b9014></line><line x1="50" y1="25" x2="37" y2="25" stroke="#7f1d1d" stroke-width="2" data-v-9c6b9014></line><line x1="50" y1="25" x2="63" y2="25" stroke="#7f1d1d" stroke-width="2" data-v-9c6b9014></line><rect x="63" y="23" width="8" height="4" rx="2" fill="#991b1b" data-v-9c6b9014></rect>', 7))
|
|
9150
9150
|
], 8, P0),
|
|
9151
9151
|
e("g", null, [
|
|
9152
9152
|
e("rect", {
|
|
@@ -9163,11 +9163,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9163
9163
|
e("text", L0, S(i.value) + "% ", 1)
|
|
9164
9164
|
])),
|
|
9165
9165
|
e("div", {
|
|
9166
|
-
class:
|
|
9166
|
+
class: ie(["status-text", { "is-open": t.value }])
|
|
9167
9167
|
}, S(t.value ? "开启" : "关闭") + " - " + S(i.value) + "% ", 3)
|
|
9168
9168
|
]));
|
|
9169
9169
|
}
|
|
9170
|
-
}), B0 = /* @__PURE__ */
|
|
9170
|
+
}), B0 = /* @__PURE__ */ j(W0, [["__scopeId", "data-v-9c6b9014"]]), U0 = { class: "tank-3d-container" }, G0 = {
|
|
9171
9171
|
viewBox: "0 0 100 140",
|
|
9172
9172
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9173
9173
|
}, F0 = ["id"], j0 = ["id"], H0 = ["stop-color"], q0 = ["stop-color"], J0 = ["id"], Y0 = ["fill"], X0 = ["y", "height", "fill", "filter"], K0 = ["cy", "fill"], Q0 = ["fill"], Z0 = ["height"], ef = {
|
|
@@ -9193,9 +9193,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9193
9193
|
const m = a();
|
|
9194
9194
|
t.value = Math.max(0, Math.min(100, m.level || 50)), i.value = m.capacity || 100, c.value = m.temperature || 25, d.value = m.pressure || 101, u.value = m.liquidColor || "#3b82f6";
|
|
9195
9195
|
};
|
|
9196
|
-
return
|
|
9196
|
+
return ne(() => l.node, () => {
|
|
9197
9197
|
h();
|
|
9198
|
-
}, { deep: !0 }),
|
|
9198
|
+
}, { deep: !0 }), ce(() => {
|
|
9199
9199
|
h(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
9200
9200
|
h();
|
|
9201
9201
|
});
|
|
@@ -9283,7 +9283,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9283
9283
|
stroke: "#475569",
|
|
9284
9284
|
"stroke-width": "1"
|
|
9285
9285
|
}, null, 8, Y0),
|
|
9286
|
-
s[4] || (s[4] =
|
|
9286
|
+
s[4] || (s[4] = re('<g opacity="0.6" data-v-13c65d9d><line x1="15" y1="30" x2="20" y2="30" stroke="#94a3b8" stroke-width="1" data-v-13c65d9d></line><text x="12" y="32" font-size="5" fill="#94a3b8" text-anchor="end" data-v-13c65d9d>100%</text><line x1="15" y1="52.5" x2="20" y2="52.5" stroke="#94a3b8" stroke-width="1" data-v-13c65d9d></line><text x="12" y="54.5" font-size="5" fill="#94a3b8" text-anchor="end" data-v-13c65d9d>75%</text><line x1="15" y1="75" x2="20" y2="75" stroke="#94a3b8" stroke-width="1" data-v-13c65d9d></line><text x="12" y="77" font-size="5" fill="#94a3b8" text-anchor="end" data-v-13c65d9d>50%</text><line x1="15" y1="97.5" x2="20" y2="97.5" stroke="#94a3b8" stroke-width="1" data-v-13c65d9d></line><text x="12" y="99.5" font-size="5" fill="#94a3b8" text-anchor="end" data-v-13c65d9d>25%</text><line x1="15" y1="110" x2="20" y2="110" stroke="#94a3b8" stroke-width="1" data-v-13c65d9d></line><text x="12" y="112" font-size="5" fill="#94a3b8" text-anchor="end" data-v-13c65d9d>0%</text></g>', 1)),
|
|
9287
9287
|
e("rect", {
|
|
9288
9288
|
x: "20",
|
|
9289
9289
|
y: n.value,
|
|
@@ -9311,7 +9311,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9311
9311
|
stroke: "#475569",
|
|
9312
9312
|
"stroke-width": "1"
|
|
9313
9313
|
}, null, 8, Q0),
|
|
9314
|
-
s[5] || (s[5] =
|
|
9314
|
+
s[5] || (s[5] = re('<g data-v-13c65d9d><rect x="23" y="110" width="4" height="15" fill="#475569" data-v-13c65d9d></rect><rect x="73" y="110" width="4" height="15" fill="#475569" data-v-13c65d9d></rect><rect x="20" y="123" width="10" height="3" rx="1" fill="#64748b" data-v-13c65d9d></rect><rect x="70" y="123" width="10" height="3" rx="1" fill="#64748b" data-v-13c65d9d></rect></g><rect x="45" y="12" width="10" height="8" rx="1" fill="#64748b" stroke="#475569" stroke-width="0.5" data-v-13c65d9d></rect><ellipse cx="50" cy="12" rx="5" ry="3" fill="#94a3b8" data-v-13c65d9d></ellipse><rect x="75" y="105" width="8" height="4" rx="1" fill="#64748b" stroke="#475569" stroke-width="0.5" data-v-13c65d9d></rect><rect x="82" y="30" width="6" height="80" rx="1" fill="#334155" opacity="0.7" data-v-13c65d9d></rect>', 5)),
|
|
9315
9315
|
e("rect", {
|
|
9316
9316
|
x: "84",
|
|
9317
9317
|
y: "32",
|
|
@@ -9372,7 +9372,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9372
9372
|
e("div", lf, " 液位: " + S(t.value) + "% | 容量: " + S(g.value) + "m³ ", 1)
|
|
9373
9373
|
]));
|
|
9374
9374
|
}
|
|
9375
|
-
}), sf = /* @__PURE__ */
|
|
9375
|
+
}), sf = /* @__PURE__ */ j(nf, [["__scopeId", "data-v-13c65d9d"]]), af = { class: "pump-3d-container" }, rf = {
|
|
9376
9376
|
viewBox: "0 0 140 100",
|
|
9377
9377
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9378
9378
|
}, df = ["id"], uf = ["id"], cf = ["id"], pf = {
|
|
@@ -9424,9 +9424,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9424
9424
|
const m = a();
|
|
9425
9425
|
t.value = m.state === "running" || m.state === !0, i.value = m.speed || 2900, c.value = m.power || 5.5, d.value = t.value ? m.flowRate || 15 : 0, u.value = t.value ? (m.pressure || 3.5).toFixed(1) : 0;
|
|
9426
9426
|
};
|
|
9427
|
-
return
|
|
9427
|
+
return ne(() => l.node, () => {
|
|
9428
9428
|
h();
|
|
9429
|
-
}, { deep: !0 }),
|
|
9429
|
+
}, { deep: !0 }), ce(() => {
|
|
9430
9430
|
h(), t.value && n(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
9431
9431
|
const m = t.value;
|
|
9432
9432
|
h(), t.value && !m ? n() : !t.value && m && p && (cancelAnimationFrame(p), p = null);
|
|
@@ -9626,7 +9626,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9626
9626
|
e("g", {
|
|
9627
9627
|
transform: `rotate(${g.value} 60 50)`
|
|
9628
9628
|
}, [...s[9] || (s[9] = [
|
|
9629
|
-
|
|
9629
|
+
re('<circle cx="60" cy="50" r="15" fill="#475569" opacity="0.6" data-v-71be9db7></circle><path d="M 60 50 L 70 35 Q 75 40 70 50 Z" fill="#64748b" data-v-71be9db7></path><path d="M 60 50 L 75 50 Q 75 55 65 60 Z" fill="#64748b" data-v-71be9db7></path><path d="M 60 50 L 60 65 Q 55 65 50 60 Z" fill="#64748b" data-v-71be9db7></path><path d="M 60 50 L 45 50 Q 45 45 50 40 Z" fill="#64748b" data-v-71be9db7></path>', 5)
|
|
9630
9630
|
])], 8, yf),
|
|
9631
9631
|
s[19] || (s[19] = e("circle", {
|
|
9632
9632
|
cx: "60",
|
|
@@ -9724,11 +9724,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9724
9724
|
e("text", Sf, S(c.value) + "kW " + S(i.value) + "rpm ", 1)
|
|
9725
9725
|
])),
|
|
9726
9726
|
e("div", {
|
|
9727
|
-
class:
|
|
9727
|
+
class: ie(["status-text", { "is-running": t.value }])
|
|
9728
9728
|
}, S(t.value ? "运行中" : "已停止") + " | " + S(d.value) + "m³/h ", 3)
|
|
9729
9729
|
]));
|
|
9730
9730
|
}
|
|
9731
|
-
}), Df = /* @__PURE__ */
|
|
9731
|
+
}), Df = /* @__PURE__ */ j(If, [["__scopeId", "data-v-71be9db7"]]), Ef = { class: "conveyor-3d-container" }, Nf = {
|
|
9732
9732
|
viewBox: "0 0 200 80",
|
|
9733
9733
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9734
9734
|
}, zf = ["id"], Tf = ["id"], Vf = ["id"], Af = ["fill", "transform"], Pf = ["transform"], Mf = ["fill", "transform"], Of = ["transform"], Rf = ["fill"], Lf = ["x1", "x2"], Wf = ["x", "fill"], Bf = ["fill", "opacity"], Uf = {
|
|
@@ -9762,9 +9762,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9762
9762
|
const m = a();
|
|
9763
9763
|
t.value = m.state === "running" || m.state === !0, i.value = m.speed || 10, c.value = m.direction || "forward";
|
|
9764
9764
|
};
|
|
9765
|
-
return
|
|
9765
|
+
return ne(() => l.node, () => {
|
|
9766
9766
|
h();
|
|
9767
|
-
}, { deep: !0 }),
|
|
9767
|
+
}, { deep: !0 }), ce(() => {
|
|
9768
9768
|
h(), n(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
9769
9769
|
h();
|
|
9770
9770
|
});
|
|
@@ -9849,7 +9849,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9849
9849
|
"stroke-width": "2",
|
|
9850
9850
|
transform: `rotate(${d.value}, 25, 50)`
|
|
9851
9851
|
}, null, 8, Af),
|
|
9852
|
-
(f(), v(
|
|
9852
|
+
(f(), v(Z, null, le(8, (b) => e("g", {
|
|
9853
9853
|
key: `left-${b}`
|
|
9854
9854
|
}, [
|
|
9855
9855
|
e("line", {
|
|
@@ -9871,7 +9871,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9871
9871
|
"stroke-width": "2",
|
|
9872
9872
|
transform: `rotate(${d.value}, 175, 50)`
|
|
9873
9873
|
}, null, 8, Mf),
|
|
9874
|
-
(f(), v(
|
|
9874
|
+
(f(), v(Z, null, le(8, (b) => e("g", {
|
|
9875
9875
|
key: `right-${b}`
|
|
9876
9876
|
}, [
|
|
9877
9877
|
e("line", {
|
|
@@ -9891,7 +9891,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9891
9891
|
height: "24",
|
|
9892
9892
|
fill: `url(#belt-gradient-${o.value})`
|
|
9893
9893
|
}, null, 8, Rf),
|
|
9894
|
-
(f(), v(
|
|
9894
|
+
(f(), v(Z, null, le(10, (b) => e("g", {
|
|
9895
9895
|
key: `line-${b}`
|
|
9896
9896
|
}, [
|
|
9897
9897
|
e("line", {
|
|
@@ -9916,7 +9916,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9916
9916
|
"stroke-width": "1",
|
|
9917
9917
|
opacity: "0.9"
|
|
9918
9918
|
}, null, 8, Wf)) : E("", !0),
|
|
9919
|
-
s[4] || (s[4] =
|
|
9919
|
+
s[4] || (s[4] = re('<g data-v-eb26bad8><rect x="20" y="68" width="4" height="8" fill="#475569" data-v-eb26bad8></rect><rect x="96" y="68" width="4" height="8" fill="#475569" data-v-eb26bad8></rect><rect x="172" y="68" width="4" height="8" fill="#475569" data-v-eb26bad8></rect><rect x="18" y="74" width="8" height="2" rx="1" fill="#64748b" data-v-eb26bad8></rect><rect x="94" y="74" width="8" height="2" rx="1" fill="#64748b" data-v-eb26bad8></rect><rect x="170" y="74" width="8" height="2" rx="1" fill="#64748b" data-v-eb26bad8></rect></g><rect x="180" y="52" width="15" height="18" rx="2" fill="#334155" stroke="#475569" stroke-width="1" data-v-eb26bad8></rect><circle cx="187.5" cy="61" r="3" fill="#64748b" data-v-eb26bad8></circle>', 3)),
|
|
9920
9920
|
e("circle", {
|
|
9921
9921
|
cx: "15",
|
|
9922
9922
|
cy: "55",
|
|
@@ -9929,11 +9929,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9929
9929
|
e("text", Gf, S(i.value) + " m/min ", 1)
|
|
9930
9930
|
])),
|
|
9931
9931
|
e("div", {
|
|
9932
|
-
class:
|
|
9932
|
+
class: ie(["status-text", { "is-running": t.value }])
|
|
9933
9933
|
}, S(t.value ? "运行中" : "停止") + " | " + S(i.value) + " m/min ", 3)
|
|
9934
9934
|
]));
|
|
9935
9935
|
}
|
|
9936
|
-
}), jf = /* @__PURE__ */
|
|
9936
|
+
}), jf = /* @__PURE__ */ j(Ff, [["__scopeId", "data-v-eb26bad8"]]), Hf = { class: "alarm-light-3d-container" }, qf = {
|
|
9937
9937
|
viewBox: "0 0 80 100",
|
|
9938
9938
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9939
9939
|
}, Jf = ["id"], Yf = ["stop-color"], Xf = ["stop-color"], Kf = ["stop-color"], Qf = ["id"], Zf = ["stop-color"], e1 = ["stop-color"], t1 = ["stop-color"], o1 = ["id"], l1 = ["fill", "opacity"], n1 = ["transform"], s1 = ["fill", "opacity"], i1 = ["fill"], a1 = ["fill"], r1 = ["fill"], d1 = ["fill"], u1 = {
|
|
@@ -9957,9 +9957,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
9957
9957
|
const s = a();
|
|
9958
9958
|
t.value = s.state === "active" || s.state === !0, i.value = s.mode || "rotating", c.value = s.color || "#ef4444";
|
|
9959
9959
|
};
|
|
9960
|
-
return
|
|
9960
|
+
return ne(() => l.node, () => {
|
|
9961
9961
|
m();
|
|
9962
|
-
}, { deep: !0 }),
|
|
9962
|
+
}, { deep: !0 }), ce(() => {
|
|
9963
9963
|
m(), h(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
9964
9964
|
m();
|
|
9965
9965
|
});
|
|
@@ -10153,11 +10153,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10153
10153
|
e("text", u1, " AL-" + S(i.value.toUpperCase()), 1)
|
|
10154
10154
|
])),
|
|
10155
10155
|
e("div", {
|
|
10156
|
-
class:
|
|
10156
|
+
class: ie(["status-text", { "is-active": t.value }])
|
|
10157
10157
|
}, S(n.value), 3)
|
|
10158
10158
|
]));
|
|
10159
10159
|
}
|
|
10160
|
-
}), p1 = /* @__PURE__ */
|
|
10160
|
+
}), p1 = /* @__PURE__ */ j(c1, [["__scopeId", "data-v-80aba40a"]]), f1 = { class: "temperature-sensor-3d-container" }, v1 = {
|
|
10161
10161
|
viewBox: "0 0 80 120",
|
|
10162
10162
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10163
10163
|
}, g1 = ["id"], m1 = ["id"], h1 = ["stop-color"], y1 = ["stop-color"], b1 = ["id"], k1 = ["stop-color"], x1 = ["stop-color"], $1 = ["fill"], w1 = ["y", "height", "fill"], _1 = ["fill"], C1 = ["fill"], S1 = ["fill", "opacity"], I1 = {
|
|
@@ -10179,9 +10179,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10179
10179
|
const b = a();
|
|
10180
10180
|
t.value = Math.round(b.temperature ?? 25), i.value = b.maxTemp || 100, c.value = b.minTemp || 0, d.value = b.alarmHighLimit || 80, u.value = b.alarmLowLimit || 10;
|
|
10181
10181
|
};
|
|
10182
|
-
return
|
|
10182
|
+
return ne(() => l.node, () => {
|
|
10183
10183
|
s();
|
|
10184
|
-
}, { deep: !0 }),
|
|
10184
|
+
}, { deep: !0 }), ce(() => {
|
|
10185
10185
|
s(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
10186
10186
|
s();
|
|
10187
10187
|
});
|
|
@@ -10253,7 +10253,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10253
10253
|
stroke: "#475569",
|
|
10254
10254
|
"stroke-width": "1.5"
|
|
10255
10255
|
}, null, 8, $1),
|
|
10256
|
-
P[2] || (P[2] =
|
|
10256
|
+
P[2] || (P[2] = re('<rect x="35" y="20" width="10" height="50" rx="5" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1" opacity="0.8" data-v-1b4c4bcc></rect><g opacity="0.6" data-v-1b4c4bcc><line x1="32" y1="25" x2="35" y2="25" stroke="#64748b" stroke-width="0.8" data-v-1b4c4bcc></line><text x="29" y="27" font-size="5" fill="#64748b" text-anchor="end" data-v-1b4c4bcc>100</text><line x1="32" y1="35" x2="35" y2="35" stroke="#64748b" stroke-width="0.8" data-v-1b4c4bcc></line><text x="29" y="37" font-size="5" fill="#64748b" text-anchor="end" data-v-1b4c4bcc>75</text><line x1="32" y1="45" x2="35" y2="45" stroke="#64748b" stroke-width="0.8" data-v-1b4c4bcc></line><text x="29" y="47" font-size="5" fill="#64748b" text-anchor="end" data-v-1b4c4bcc>50</text><line x1="32" y1="55" x2="35" y2="55" stroke="#64748b" stroke-width="0.8" data-v-1b4c4bcc></line><text x="29" y="57" font-size="5" fill="#64748b" text-anchor="end" data-v-1b4c4bcc>25</text><line x1="32" y1="65" x2="35" y2="65" stroke="#64748b" stroke-width="0.8" data-v-1b4c4bcc></line><text x="29" y="67" font-size="5" fill="#64748b" text-anchor="end" data-v-1b4c4bcc>0</text></g>', 2)),
|
|
10257
10257
|
e("rect", {
|
|
10258
10258
|
x: "37",
|
|
10259
10259
|
y: p.value,
|
|
@@ -10270,7 +10270,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10270
10270
|
stroke: "#991b1b",
|
|
10271
10271
|
"stroke-width": "1.5"
|
|
10272
10272
|
}, null, 8, _1),
|
|
10273
|
-
P[3] || (P[3] =
|
|
10273
|
+
P[3] || (P[3] = re('<ellipse cx="37" cy="72" rx="3" ry="4" fill="#ffffff" opacity="0.4" data-v-1b4c4bcc></ellipse><path d="M 40,85 Q 45,90 45,95 L 45,105" stroke="#1e293b" stroke-width="3" fill="none" stroke-linecap="round" data-v-1b4c4bcc></path><path d="M 40,85 Q 35,90 35,95 L 35,105" stroke="#ef4444" stroke-width="3" fill="none" stroke-linecap="round" data-v-1b4c4bcc></path><rect x="32" y="103" width="6" height="8" rx="1" fill="#fbbf24" stroke="#b45309" stroke-width="0.5" data-v-1b4c4bcc></rect><rect x="42" y="103" width="6" height="8" rx="1" fill="#1e293b" stroke="#475569" stroke-width="0.5" data-v-1b4c4bcc></rect><rect x="50" y="35" width="25" height="18" rx="2" fill="#0f172a" stroke="#334155" stroke-width="1" data-v-1b4c4bcc></rect>', 6)),
|
|
10274
10274
|
e("text", {
|
|
10275
10275
|
x: "62.5",
|
|
10276
10276
|
y: "47",
|
|
@@ -10305,11 +10305,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10305
10305
|
}, " PT100 ", -1))
|
|
10306
10306
|
])),
|
|
10307
10307
|
e("div", {
|
|
10308
|
-
class:
|
|
10308
|
+
class: ie(["status-text", { "is-alarm": m.value }])
|
|
10309
10309
|
}, S(t.value) + "°C " + S(m.value ? "- 超限" : ""), 3)
|
|
10310
10310
|
]));
|
|
10311
10311
|
}
|
|
10312
|
-
}), E1 = /* @__PURE__ */
|
|
10312
|
+
}), E1 = /* @__PURE__ */ j(D1, [["__scopeId", "data-v-1b4c4bcc"]]), N1 = { class: "cylinder-3d-container" }, z1 = {
|
|
10313
10313
|
viewBox: "0 0 60 140",
|
|
10314
10314
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10315
10315
|
}, T1 = ["id"], V1 = ["id"], A1 = ["id"], P1 = ["fill"], M1 = ["fill"], O1 = ["fill"], R1 = ["y", "height", "fill"], L1 = ["cy"], W1 = ["cy"], B1 = ["x", "fill"], U1 = ["x", "fill"], G1 = {
|
|
@@ -10341,9 +10341,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10341
10341
|
const x = a();
|
|
10342
10342
|
d.value = x.action || "stop", i.value = x.stroke || 50, c.value = x.speed || 200, typeof x.position == "number" && (t.value = Math.max(0, Math.min(i.value, x.position)));
|
|
10343
10343
|
};
|
|
10344
|
-
return
|
|
10344
|
+
return ne(() => l.node, () => {
|
|
10345
10345
|
w();
|
|
10346
|
-
}, { deep: !0 }),
|
|
10346
|
+
}, { deep: !0 }), ce(() => {
|
|
10347
10347
|
w(), g = Date.now(), O(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
10348
10348
|
w();
|
|
10349
10349
|
});
|
|
@@ -10431,7 +10431,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10431
10431
|
stroke: "#334155",
|
|
10432
10432
|
"stroke-width": "1"
|
|
10433
10433
|
}, null, 8, M1),
|
|
10434
|
-
y[3] || (y[3] =
|
|
10434
|
+
y[3] || (y[3] = re('<g opacity="0.2" data-v-7429604c><line x1="15" y1="55" x2="45" y2="55" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line><line x1="15" y1="65" x2="45" y2="65" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line><line x1="15" y1="75" x2="45" y2="75" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line><line x1="15" y1="85" x2="45" y2="85" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line><line x1="15" y1="95" x2="45" y2="95" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line><line x1="15" y1="105" x2="45" y2="105" stroke="#1e293b" stroke-width="0.5" data-v-7429604c></line></g>', 1)),
|
|
10435
10435
|
e("ellipse", {
|
|
10436
10436
|
cx: "30",
|
|
10437
10437
|
cy: "50",
|
|
@@ -10556,11 +10556,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10556
10556
|
e("text", F1, S(t.value) + "mm ", 1)
|
|
10557
10557
|
])),
|
|
10558
10558
|
e("div", {
|
|
10559
|
-
class:
|
|
10559
|
+
class: ie(["status-text", P.value])
|
|
10560
10560
|
}, S(b.value), 3)
|
|
10561
10561
|
]));
|
|
10562
10562
|
}
|
|
10563
|
-
}), H1 = /* @__PURE__ */
|
|
10563
|
+
}), H1 = /* @__PURE__ */ j(j1, [["__scopeId", "data-v-7429604c"]]), q1 = { class: "pipe-3d-container" }, J1 = ["viewBox"], Y1 = ["id"], X1 = ["id"], K1 = ["stop-color"], Q1 = ["stop-color"], Z1 = ["stop-color"], ev = { key: 0 }, tv = ["y", "width", "height", "fill"], ov = ["y", "width", "height"], lv = ["x", "y", "width", "height", "fill"], nv = ["cy", "rx", "ry"], sv = ["cx", "cy", "rx", "ry"], iv = ["cy"], av = ["cy"], rv = ["cx", "cy"], dv = ["cx", "cy"], uv = { key: 1 }, cv = ["x", "width", "height", "fill"], pv = ["x", "width", "height"], fv = ["x", "y", "width", "height", "fill"], vv = ["cx", "rx", "ry"], gv = ["cx", "cy", "rx", "ry"], mv = ["cx"], hv = ["cx"], yv = ["cx", "cy"], bv = ["cx", "cy"], kv = { key: 2 }, xv = ["id"], $v = ["fill"], wv = ["x1", "y1", "x2", "y2", "stroke", "marker-end"], _v = ["x1", "y1", "x2", "y2", "stroke", "marker-end"], Cv = /* @__PURE__ */ R({
|
|
10564
10564
|
__name: "Pipe3D",
|
|
10565
10565
|
props: {
|
|
10566
10566
|
node: {}
|
|
@@ -10578,9 +10578,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10578
10578
|
const x = a();
|
|
10579
10579
|
t.value = x.state === "flowing" || x.state === !0, i.value = x.flowRate || 10, c.value = x.direction || "horizontal", d.value = x.fluidColor || "#3b82f6", u.value = x.diameter || 40, g.value = x.length || 200;
|
|
10580
10580
|
};
|
|
10581
|
-
return
|
|
10581
|
+
return ne(() => l.node, () => {
|
|
10582
10582
|
w();
|
|
10583
|
-
}, { deep: !0 }),
|
|
10583
|
+
}, { deep: !0 }), ce(() => {
|
|
10584
10584
|
w(), O(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
10585
10585
|
w();
|
|
10586
10586
|
});
|
|
@@ -10818,11 +10818,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10818
10818
|
])) : E("", !0)
|
|
10819
10819
|
], 8, J1)),
|
|
10820
10820
|
e("div", {
|
|
10821
|
-
class:
|
|
10821
|
+
class: ie(["status-text", { "is-flowing": t.value }])
|
|
10822
10822
|
}, S(t.value ? "流动中" : "停止") + " | " + S(i.value) + " m³/h ", 3)
|
|
10823
10823
|
]));
|
|
10824
10824
|
}
|
|
10825
|
-
}), Sv = /* @__PURE__ */
|
|
10825
|
+
}), Sv = /* @__PURE__ */ j(Cv, [["__scopeId", "data-v-5c3ec02f"]]), Iv = { class: "filter-3d-container" }, Dv = {
|
|
10826
10826
|
viewBox: "0 0 120 100",
|
|
10827
10827
|
xmlns: "http://www.w3.org/2000/svg"
|
|
10828
10828
|
}, Ev = ["id"], Nv = ["id"], zv = ["stop-color"], Tv = ["stop-color"], Vv = ["fill"], Av = ["fill"], Pv = { opacity: "0.5" }, Mv = ["x1", "x2"], Ov = ["y1", "y2"], Rv = ["y", "height"], Lv = { transform: "translate(80, 30)" }, Wv = ["fill"], Bv = ["fill", "opacity"], Uv = {
|
|
@@ -10848,9 +10848,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10848
10848
|
const m = a();
|
|
10849
10849
|
t.value = Math.max(0, Math.min(100, m.clogLevel || 20)), i.value = m.pressureDrop || 5, c.value = m.diameter || 50, d.value = m.alarmThreshold || 70;
|
|
10850
10850
|
};
|
|
10851
|
-
return
|
|
10851
|
+
return ne(() => l.node, () => {
|
|
10852
10852
|
h();
|
|
10853
|
-
}, { deep: !0 }),
|
|
10853
|
+
}, { deep: !0 }), ce(() => {
|
|
10854
10854
|
h(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
10855
10855
|
h();
|
|
10856
10856
|
});
|
|
@@ -10935,7 +10935,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10935
10935
|
"stroke-width": "1"
|
|
10936
10936
|
}, null, 8, Av),
|
|
10937
10937
|
e("g", Pv, [
|
|
10938
|
-
(f(), v(
|
|
10938
|
+
(f(), v(Z, null, le(8, (b) => e("line", {
|
|
10939
10939
|
key: `v-${b}`,
|
|
10940
10940
|
x1: 50 + b * 2.5,
|
|
10941
10941
|
y1: "30",
|
|
@@ -10944,7 +10944,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
10944
10944
|
stroke: "#1e293b",
|
|
10945
10945
|
"stroke-width": "0.5"
|
|
10946
10946
|
}, null, 8, Mv)), 64)),
|
|
10947
|
-
(f(), v(
|
|
10947
|
+
(f(), v(Z, null, le(8, (b) => e("line", {
|
|
10948
10948
|
key: `h-${b}`,
|
|
10949
10949
|
x1: "50",
|
|
10950
10950
|
y1: 30 + b * 5,
|
|
@@ -11025,11 +11025,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11025
11025
|
e("text", Gv, " FLT-" + S(c.value), 1)
|
|
11026
11026
|
])),
|
|
11027
11027
|
e("div", {
|
|
11028
|
-
class:
|
|
11028
|
+
class: ie(["status-text", { "is-alarm": n.value }])
|
|
11029
11029
|
}, " 堵塞度: " + S(t.value) + "% | 压差: " + S(i.value) + " kPa ", 3)
|
|
11030
11030
|
]));
|
|
11031
11031
|
}
|
|
11032
|
-
}), jv = /* @__PURE__ */
|
|
11032
|
+
}), jv = /* @__PURE__ */ j(Fv, [["__scopeId", "data-v-1bb1c80a"]]), Hv = { class: "heat-exchanger-3d-container" }, qv = {
|
|
11033
11033
|
viewBox: "0 0 140 120",
|
|
11034
11034
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11035
11035
|
}, Jv = ["id"], Yv = ["id"], Xv = ["id"], Kv = ["fill"], Qv = { opacity: "0.6" }, Zv = ["y1", "y2"], eg = ["y", "fill"], tg = ["y", "fill"], og = ["x", "fill"], lg = ["x", "fill"], ng = { transform: "translate(70, 60)" }, sg = ["fill"], ig = { transform: "translate(95, 50)" }, ag = {
|
|
@@ -11087,9 +11087,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11087
11087
|
const x = a();
|
|
11088
11088
|
t.value = x.state === "working" || x.state === !0, i.value = x.hotTempIn || 80, c.value = x.hotTempOut || 50, d.value = x.coldTempIn || 20, u.value = x.coldTempOut || 40, g.value = x.heatTransferArea || 10;
|
|
11089
11089
|
};
|
|
11090
|
-
return
|
|
11090
|
+
return ne(() => l.node, () => {
|
|
11091
11091
|
w();
|
|
11092
|
-
}, { deep: !0 }),
|
|
11092
|
+
}, { deep: !0 }), ce(() => {
|
|
11093
11093
|
w(), O(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
11094
11094
|
w();
|
|
11095
11095
|
});
|
|
@@ -11184,7 +11184,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11184
11184
|
"stroke-width": "2"
|
|
11185
11185
|
}, null, -1)),
|
|
11186
11186
|
e("g", Qv, [
|
|
11187
|
-
(f(), v(
|
|
11187
|
+
(f(), v(Z, null, le(8, (_) => e("line", {
|
|
11188
11188
|
key: `tube-${_}`,
|
|
11189
11189
|
x1: "25",
|
|
11190
11190
|
y1: 35 + _ * 7,
|
|
@@ -11374,11 +11374,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11374
11374
|
e("text", vg, " HEX-" + S(g.value) + "m² ", 1)
|
|
11375
11375
|
])),
|
|
11376
11376
|
e("div", {
|
|
11377
|
-
class:
|
|
11377
|
+
class: ie(["status-text", { "is-working": t.value }])
|
|
11378
11378
|
}, S(t.value ? "运行中" : "停止") + " | 效率: " + S(p.value) + "% ", 3)
|
|
11379
11379
|
]));
|
|
11380
11380
|
}
|
|
11381
|
-
}), mg = /* @__PURE__ */
|
|
11381
|
+
}), mg = /* @__PURE__ */ j(gg, [["__scopeId", "data-v-ed672204"]]), hg = { class: "tee-3d-container" }, yg = {
|
|
11382
11382
|
viewBox: "0 0 100 100",
|
|
11383
11383
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11384
11384
|
}, bg = ["id"], kg = ["id"], xg = ["stop-color"], $g = ["stop-color"], wg = ["fill"], _g = ["fill"], Cg = ["fill"], Sg = { key: 0 }, Ig = ["fill"], Dg = ["x", "fill"], Eg = ["x", "fill"], Ng = ["y", "fill"], zg = ["y", "fill"], Tg = { key: 1 }, Vg = ["id"], Ag = ["fill"], Pg = ["stroke", "marker-end"], Mg = ["stroke", "marker-end"], Og = ["stroke", "marker-end"], Rg = { transform: "translate(50, 50)" }, Lg = ["fill"], Wg = /* @__PURE__ */ R({
|
|
@@ -11395,9 +11395,9 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11395
11395
|
const b = a();
|
|
11396
11396
|
t.value = b.state === "flowing" || b.state === !0, i.value = b.fluidColor || "#3b82f6", c.value = b.topFlowEnabled !== !1, d.value = b.bottomFlowEnabled !== !1;
|
|
11397
11397
|
};
|
|
11398
|
-
return
|
|
11398
|
+
return ne(() => l.node, () => {
|
|
11399
11399
|
s();
|
|
11400
|
-
}, { deep: !0 }),
|
|
11400
|
+
}, { deep: !0 }), ce(() => {
|
|
11401
11401
|
s(), m(), l.node && typeof l.node.on == "function" && l.node.on("change:data", () => {
|
|
11402
11402
|
s();
|
|
11403
11403
|
});
|
|
@@ -11534,7 +11534,7 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11534
11534
|
opacity: "0.4"
|
|
11535
11535
|
}, null, 8, zg)
|
|
11536
11536
|
])) : E("", !0),
|
|
11537
|
-
P[6] || (P[6] =
|
|
11537
|
+
P[6] || (P[6] = re('<g data-v-cd328987><ellipse cx="0" cy="50" rx="3" ry="10" fill="#64748b" stroke="#334155" stroke-width="1" data-v-cd328987></ellipse><circle cx="0" cy="45" r="1" fill="#1e293b" data-v-cd328987></circle><circle cx="0" cy="55" r="1" fill="#1e293b" data-v-cd328987></circle><ellipse cx="100" cy="50" rx="3" ry="10" fill="#64748b" stroke="#334155" stroke-width="1" data-v-cd328987></ellipse><circle cx="100" cy="45" r="1" fill="#1e293b" data-v-cd328987></circle><circle cx="100" cy="55" r="1" fill="#1e293b" data-v-cd328987></circle><ellipse cx="50" cy="0" rx="10" ry="3" fill="#64748b" stroke="#334155" stroke-width="1" data-v-cd328987></ellipse><circle cx="45" cy="0" r="1" fill="#1e293b" data-v-cd328987></circle><circle cx="55" cy="0" r="1" fill="#1e293b" data-v-cd328987></circle><ellipse cx="50" cy="100" rx="10" ry="3" fill="#64748b" stroke="#334155" stroke-width="1" data-v-cd328987></ellipse><circle cx="45" cy="100" r="1" fill="#1e293b" data-v-cd328987></circle><circle cx="55" cy="100" r="1" fill="#1e293b" data-v-cd328987></circle></g>', 1)),
|
|
11538
11538
|
t.value ? (f(), v("g", Tg, [
|
|
11539
11539
|
e("defs", null, [
|
|
11540
11540
|
e("marker", {
|
|
@@ -11599,11 +11599,11 @@ const ft = new vp(), gp = { class: "workflow-editor" }, mp = { class: "editor-ma
|
|
|
11599
11599
|
])
|
|
11600
11600
|
])),
|
|
11601
11601
|
e("div", {
|
|
11602
|
-
class:
|
|
11602
|
+
class: ie(["status-text", { "is-flowing": t.value }])
|
|
11603
11603
|
}, S(t.value ? "流动中" : "关闭"), 3)
|
|
11604
11604
|
]));
|
|
11605
11605
|
}
|
|
11606
|
-
}), Bg = /* @__PURE__ */
|
|
11606
|
+
}), Bg = /* @__PURE__ */ j(Wg, [["__scopeId", "data-v-cd328987"]]);
|
|
11607
11607
|
class Ug {
|
|
11608
11608
|
constructor() {
|
|
11609
11609
|
Me(this, "animations", /* @__PURE__ */ new Map());
|
|
@@ -11752,22 +11752,24 @@ const Ne = new Ug(), Gg = {
|
|
|
11752
11752
|
authCode: { default: "" },
|
|
11753
11753
|
customFooter: { default: void 0 },
|
|
11754
11754
|
previewMode: { type: Boolean, default: !1 },
|
|
11755
|
-
onSave: { type: Function, default: void 0 }
|
|
11755
|
+
onSave: { type: Function, default: void 0 },
|
|
11756
|
+
deviceData: { default: () => ({}) },
|
|
11757
|
+
dataSource: { default: () => ({}) }
|
|
11756
11758
|
},
|
|
11757
11759
|
emits: ["preview"],
|
|
11758
11760
|
setup(r, { expose: l, emit: o }) {
|
|
11759
11761
|
const a = r, t = o, i = $(null), c = $(null), d = $(null), u = $(0), g = $(null), p = $(!1);
|
|
11760
11762
|
let n = null;
|
|
11761
11763
|
const h = () => {
|
|
11762
|
-
var
|
|
11763
|
-
const k = (
|
|
11764
|
+
var ee, fe;
|
|
11765
|
+
const k = (fe = (ee = i.value) == null ? void 0 : ee.containerRef) == null ? void 0 : fe.parentElement;
|
|
11764
11766
|
if (!k) return 1;
|
|
11765
|
-
const I = K.getConfig(), N = I.size.width,
|
|
11766
|
-
return Math.min(
|
|
11767
|
+
const I = K.getConfig(), N = I.size.width, V = I.size.height, G = k.clientWidth, te = k.clientHeight, H = 40, Q = G - H, ae = te - H, de = Q / N, F = ae / V;
|
|
11768
|
+
return Math.min(de, F, 1);
|
|
11767
11769
|
};
|
|
11768
|
-
|
|
11769
|
-
var
|
|
11770
|
-
if (!((
|
|
11770
|
+
ce(() => {
|
|
11771
|
+
var ae, de;
|
|
11772
|
+
if (!((ae = i.value) != null && ae.containerRef)) return;
|
|
11771
11773
|
const k = K.getConfig();
|
|
11772
11774
|
Pe.registerEdge("animated-edge", {
|
|
11773
11775
|
inherit: "edge",
|
|
@@ -12175,19 +12177,19 @@ const Ne = new Ug(), Gg = {
|
|
|
12175
12177
|
]
|
|
12176
12178
|
}
|
|
12177
12179
|
}), console.log("[Vue Shape] 所有3D仿真组件节点注册成功");
|
|
12178
|
-
const I = i.value.containerRef, N = k.size.width,
|
|
12179
|
-
I.style.width = `${N}px`, I.style.height = `${
|
|
12180
|
-
},
|
|
12181
|
-
|
|
12182
|
-
const
|
|
12183
|
-
const
|
|
12184
|
-
|
|
12180
|
+
const I = i.value.containerRef, N = k.size.width, V = k.size.height, G = (F) => {
|
|
12181
|
+
I.style.width = `${N}px`, I.style.height = `${V}px`, I.style.transform = `scale(${F})`, I.style.transformOrigin = "center center", K.updateByPath("zoom.scale", Number(F.toFixed(2)));
|
|
12182
|
+
}, te = h();
|
|
12183
|
+
G(te);
|
|
12184
|
+
const H = () => {
|
|
12185
|
+
const F = h();
|
|
12186
|
+
G(F);
|
|
12185
12187
|
};
|
|
12186
|
-
if (window.addEventListener("resize",
|
|
12188
|
+
if (window.addEventListener("resize", H), n = new Pe({
|
|
12187
12189
|
container: I,
|
|
12188
12190
|
// 使用配置中的画布尺寸
|
|
12189
12191
|
width: N,
|
|
12190
|
-
height:
|
|
12192
|
+
height: V,
|
|
12191
12193
|
background: k.background.image ? {
|
|
12192
12194
|
color: k.background.color || "#1e293b",
|
|
12193
12195
|
image: k.background.image,
|
|
@@ -12247,8 +12249,8 @@ const Ne = new Ug(), Gg = {
|
|
|
12247
12249
|
zIndex: 0
|
|
12248
12250
|
});
|
|
12249
12251
|
},
|
|
12250
|
-
validateConnection({ targetMagnet:
|
|
12251
|
-
return !!
|
|
12252
|
+
validateConnection({ targetMagnet: F }) {
|
|
12253
|
+
return !!F;
|
|
12252
12254
|
}
|
|
12253
12255
|
}
|
|
12254
12256
|
}), a.previewMode || n.use(
|
|
@@ -12274,81 +12276,81 @@ const Ne = new Ug(), Gg = {
|
|
|
12274
12276
|
clean: !0
|
|
12275
12277
|
})
|
|
12276
12278
|
), !a.previewMode) {
|
|
12277
|
-
const
|
|
12278
|
-
if (((
|
|
12279
|
+
const F = Ld(Oe.SCADA_EDITOR_DATA);
|
|
12280
|
+
if (((de = F == null ? void 0 : F.cells) == null ? void 0 : de.length) > 0)
|
|
12279
12281
|
try {
|
|
12280
|
-
const
|
|
12281
|
-
var
|
|
12282
|
-
return
|
|
12282
|
+
const oe = F.cells.map((ee) => {
|
|
12283
|
+
var fe;
|
|
12284
|
+
return ee.position && typeof ee.position == "object" && (typeof ee.position.x != "number" || typeof ee.position.y != "number") && (ee.position = { x: 100, y: 100 }), (ee.shape === "edge" || ee.shape === "animated-edge") && (ee.router === "manhattan" || ((fe = ee.router) == null ? void 0 : fe.name) === "manhattan") && (ee.router = {
|
|
12283
12285
|
name: "orth",
|
|
12284
12286
|
args: {
|
|
12285
12287
|
padding: 10
|
|
12286
12288
|
}
|
|
12287
|
-
}),
|
|
12289
|
+
}), ee;
|
|
12288
12290
|
});
|
|
12289
|
-
n.fromJSON({ cells:
|
|
12290
|
-
var
|
|
12291
|
-
const
|
|
12292
|
-
(
|
|
12291
|
+
n.fromJSON({ cells: oe }), n.getEdges().forEach((ee) => {
|
|
12292
|
+
var ue;
|
|
12293
|
+
const fe = ee.getData();
|
|
12294
|
+
(ue = fe == null ? void 0 : fe.animation) != null && ue.enabled && y(ee, fe.animation);
|
|
12293
12295
|
});
|
|
12294
|
-
} catch (
|
|
12295
|
-
console.error("恢复画布数据失败,清空缓存:",
|
|
12296
|
+
} catch (oe) {
|
|
12297
|
+
console.error("恢复画布数据失败,清空缓存:", oe), sessionStorage.removeItem(Oe.SCADA_EDITOR_DATA);
|
|
12296
12298
|
}
|
|
12297
12299
|
}
|
|
12298
|
-
n.on("selection:changed", ({ selected:
|
|
12299
|
-
var
|
|
12300
|
-
const
|
|
12301
|
-
if (u.value =
|
|
12302
|
-
const
|
|
12303
|
-
if (
|
|
12304
|
-
c.value =
|
|
12305
|
-
else if (
|
|
12306
|
-
d.value =
|
|
12307
|
-
const Ae =
|
|
12308
|
-
|
|
12300
|
+
n.on("selection:changed", ({ selected: F }) => {
|
|
12301
|
+
var ee, fe;
|
|
12302
|
+
const oe = F ? F.filter((ue) => ue.isNode()) : [];
|
|
12303
|
+
if (u.value = oe.length, F && F.length > 0) {
|
|
12304
|
+
const ue = F[0];
|
|
12305
|
+
if (ue.isNode())
|
|
12306
|
+
c.value = ue, d.value = null;
|
|
12307
|
+
else if (ue.isEdge()) {
|
|
12308
|
+
d.value = ue, c.value = null;
|
|
12309
|
+
const Ae = ue.getAttrs();
|
|
12310
|
+
ue.data = { ...ue.data, originalAttrs: Ae }, ue.attr("line/stroke", "#3b82f6");
|
|
12309
12311
|
}
|
|
12310
12312
|
} else {
|
|
12311
|
-
if (d.value && ((
|
|
12312
|
-
const
|
|
12313
|
-
d.value.attr("line/stroke", ((
|
|
12313
|
+
if (d.value && ((ee = d.value.data) != null && ee.originalAttrs)) {
|
|
12314
|
+
const ue = d.value.data.originalAttrs;
|
|
12315
|
+
d.value.attr("line/stroke", ((fe = ue.line) == null ? void 0 : fe.stroke) || "#10b981");
|
|
12314
12316
|
}
|
|
12315
12317
|
c.value = null, d.value = null;
|
|
12316
12318
|
}
|
|
12317
|
-
}), n.on("edge:click", ({ edge:
|
|
12318
|
-
n.select(
|
|
12319
|
+
}), n.on("edge:click", ({ edge: F }) => {
|
|
12320
|
+
n.select(F);
|
|
12319
12321
|
}), n.on("blank:click", () => {
|
|
12320
12322
|
d.value = null, c.value = null;
|
|
12321
12323
|
}), n.on("node:change:position", () => {
|
|
12322
12324
|
}), n.on("node:change:size", () => {
|
|
12323
|
-
}), n.on("node:change:data", ({ node:
|
|
12324
|
-
const
|
|
12325
|
-
if (
|
|
12326
|
-
if (
|
|
12327
|
-
const
|
|
12328
|
-
type:
|
|
12329
|
-
duration:
|
|
12330
|
-
loop:
|
|
12325
|
+
}), n.on("node:change:data", ({ node: F }) => {
|
|
12326
|
+
const oe = F.getData();
|
|
12327
|
+
if (oe.animation)
|
|
12328
|
+
if (oe.animation.enabled === !0) {
|
|
12329
|
+
const ee = {
|
|
12330
|
+
type: oe.animation.type || "none",
|
|
12331
|
+
duration: oe.animation.duration || 1e3,
|
|
12332
|
+
loop: oe.animation.loop !== !1
|
|
12331
12333
|
};
|
|
12332
|
-
Ne.startAnimation(
|
|
12334
|
+
Ne.startAnimation(F, ee);
|
|
12333
12335
|
} else
|
|
12334
|
-
Ne.stopAnimation(
|
|
12335
|
-
}), n.on("edge:change:data", ({ edge:
|
|
12336
|
-
const
|
|
12337
|
-
|
|
12336
|
+
Ne.stopAnimation(F.id);
|
|
12337
|
+
}), n.on("edge:change:data", ({ edge: F }) => {
|
|
12338
|
+
const oe = F.getData();
|
|
12339
|
+
oe != null && oe.animation && y(F, oe.animation);
|
|
12338
12340
|
});
|
|
12339
|
-
const
|
|
12340
|
-
if (
|
|
12341
|
+
const Q = (F) => {
|
|
12342
|
+
if (F.key === "Delete" && n) {
|
|
12341
12343
|
if (c.value) {
|
|
12342
|
-
const
|
|
12343
|
-
Ne.stopAnimation(
|
|
12344
|
+
const oe = c.value.id;
|
|
12345
|
+
Ne.stopAnimation(oe), n.removeNode(oe), c.value = null;
|
|
12344
12346
|
} else if (d.value) {
|
|
12345
|
-
const
|
|
12346
|
-
n.removeEdge(
|
|
12347
|
+
const oe = d.value.id;
|
|
12348
|
+
n.removeEdge(oe), d.value = null;
|
|
12347
12349
|
}
|
|
12348
12350
|
}
|
|
12349
12351
|
};
|
|
12350
|
-
document.addEventListener("keydown",
|
|
12351
|
-
document.removeEventListener("keydown",
|
|
12352
|
+
document.addEventListener("keydown", Q), ke(() => {
|
|
12353
|
+
document.removeEventListener("keydown", Q), window.removeEventListener("resize", H);
|
|
12352
12354
|
});
|
|
12353
12355
|
}), ke(() => {
|
|
12354
12356
|
if (n) {
|
|
@@ -12358,7 +12360,7 @@ const Ne = new Ug(), Gg = {
|
|
|
12358
12360
|
};
|
|
12359
12361
|
dt(Oe.SCADA_EDITOR_DATA, k), n.dispose();
|
|
12360
12362
|
}
|
|
12361
|
-
}),
|
|
12363
|
+
}), ne(
|
|
12362
12364
|
() => K.getConfig(),
|
|
12363
12365
|
(k) => {
|
|
12364
12366
|
var N;
|
|
@@ -12373,8 +12375,8 @@ const Ne = new Ug(), Gg = {
|
|
|
12373
12375
|
const I = (N = i.value) == null ? void 0 : N.containerRef;
|
|
12374
12376
|
if (I) {
|
|
12375
12377
|
n.resize(k.size.width, k.size.height), I.style.width = `${k.size.width}px`, I.style.height = `${k.size.height}px`;
|
|
12376
|
-
const
|
|
12377
|
-
I.style.transform = `scale(${
|
|
12378
|
+
const V = h(), G = k.zoom.scale > V ? k.zoom.scale : V;
|
|
12379
|
+
I.style.transform = `scale(${G})`, I.style.transformOrigin = "center center";
|
|
12378
12380
|
}
|
|
12379
12381
|
k.grid.enabled ? (n.drawGrid({
|
|
12380
12382
|
type: k.grid.type || "dot",
|
|
@@ -12388,22 +12390,22 @@ const Ne = new Ug(), Gg = {
|
|
|
12388
12390
|
{ deep: !0 }
|
|
12389
12391
|
);
|
|
12390
12392
|
const m = $({}), s = (k, I) => (m.value[k] || (m.value[k] = 0), m.value[k]++, `${I}_${m.value[k]}`), b = (k) => {
|
|
12391
|
-
var
|
|
12393
|
+
var Q, ae, de, F;
|
|
12392
12394
|
if (!n) return;
|
|
12393
12395
|
const I = Je.getComponent(k);
|
|
12394
12396
|
if (!I) {
|
|
12395
12397
|
console.error(`未找到组件配置: ${k}`);
|
|
12396
12398
|
return;
|
|
12397
12399
|
}
|
|
12398
|
-
const N = s(k, I.metadata.name),
|
|
12400
|
+
const N = s(k, I.metadata.name), V = {
|
|
12399
12401
|
enabled: !1,
|
|
12400
12402
|
// 默认禁用动画,用户需要手动启用
|
|
12401
12403
|
type: "none",
|
|
12402
12404
|
duration: 1e3,
|
|
12403
12405
|
loop: !0
|
|
12404
|
-
},
|
|
12405
|
-
x:
|
|
12406
|
-
y:
|
|
12406
|
+
}, G = Gd(50, 50, 400, 300), te = {
|
|
12407
|
+
x: G.x,
|
|
12408
|
+
y: G.y,
|
|
12407
12409
|
shape: I.shape,
|
|
12408
12410
|
width: I.width,
|
|
12409
12411
|
height: I.height,
|
|
@@ -12417,19 +12419,19 @@ const Ne = new Ug(), Gg = {
|
|
|
12417
12419
|
componentName: N,
|
|
12418
12420
|
// 添加默认名称
|
|
12419
12421
|
props: I.props,
|
|
12420
|
-
animation:
|
|
12422
|
+
animation: V,
|
|
12421
12423
|
// 添加默认动画配置
|
|
12422
12424
|
// 保存原始样式用于恢复选中效果
|
|
12423
|
-
originalStroke: ((
|
|
12424
|
-
originalStrokeWidth: ((
|
|
12425
|
+
originalStroke: ((ae = (Q = I.attrs) == null ? void 0 : Q.body) == null ? void 0 : ae.stroke) || "#2563eb",
|
|
12426
|
+
originalStrokeWidth: ((F = (de = I.attrs) == null ? void 0 : de.body) == null ? void 0 : F.strokeWidth) || 2
|
|
12425
12427
|
}
|
|
12426
|
-
},
|
|
12427
|
-
console.log("[Node] 添加节点:", I.shape,
|
|
12428
|
+
}, H = n.addNode(te);
|
|
12429
|
+
console.log("[Node] 添加节点:", I.shape, H.id, te), n.cleanSelection(), n.select(H);
|
|
12428
12430
|
}, P = (k) => {
|
|
12429
12431
|
if (c.value && (k.attrs && Object.keys(k.attrs).forEach((I) => {
|
|
12430
12432
|
const N = k.attrs[I];
|
|
12431
|
-
typeof N == "object" ? Object.keys(N).forEach((
|
|
12432
|
-
c.value.attr(`${I}/${
|
|
12433
|
+
typeof N == "object" ? Object.keys(N).forEach((V) => {
|
|
12434
|
+
c.value.attr(`${I}/${V}`, N[V]);
|
|
12433
12435
|
}) : c.value.attr(I, N);
|
|
12434
12436
|
}), k.position && (typeof k.position.x == "number" && typeof k.position.y == "number" ? c.value.setPosition(k.position) : console.error("position 数据格式错误:", k.position)), k.size && (typeof k.size.width == "number" && typeof k.size.height == "number" ? c.value.setSize(k.size) : console.error("size 数据格式错误:", k.size)), k.data)) {
|
|
12435
12437
|
const I = { ...k.data };
|
|
@@ -12443,11 +12445,11 @@ const Ne = new Ug(), Gg = {
|
|
|
12443
12445
|
if (d.value) {
|
|
12444
12446
|
if (k.attrs) {
|
|
12445
12447
|
Object.keys(k.attrs).forEach((N) => {
|
|
12446
|
-
const
|
|
12447
|
-
typeof
|
|
12448
|
-
var
|
|
12449
|
-
d.value.attr(`${N}/${
|
|
12450
|
-
}) : d.value.attr(N,
|
|
12448
|
+
const V = k.attrs[N];
|
|
12449
|
+
typeof V == "object" ? Object.keys(V).forEach((G) => {
|
|
12450
|
+
var te, H;
|
|
12451
|
+
d.value.attr(`${N}/${G}`, V[G]), (H = (te = d.value.data) == null ? void 0 : te.originalAttrs) != null && H[N] && (d.value.data.originalAttrs[N][G] = V[G]);
|
|
12452
|
+
}) : d.value.attr(N, V);
|
|
12451
12453
|
});
|
|
12452
12454
|
const I = d.value.getAttrs();
|
|
12453
12455
|
d.value.data = { ...d.value.data, originalAttrs: I }, d.value.attr("line/stroke", "#3b82f6");
|
|
@@ -12479,17 +12481,17 @@ const Ne = new Ug(), Gg = {
|
|
|
12479
12481
|
stroke: k.attr("line/stroke") || "#10b981",
|
|
12480
12482
|
strokeWidth: 1
|
|
12481
12483
|
});
|
|
12482
|
-
const
|
|
12484
|
+
const V = () => {
|
|
12483
12485
|
k.attr("circle/atConnectionRatio", 0, { silent: !0 }), k.transition("attrs/circle/atConnectionRatio", 1, {
|
|
12484
12486
|
delay: 0,
|
|
12485
12487
|
duration: N,
|
|
12486
12488
|
timing: "linear",
|
|
12487
12489
|
complete: () => {
|
|
12488
|
-
|
|
12490
|
+
V();
|
|
12489
12491
|
}
|
|
12490
12492
|
});
|
|
12491
12493
|
};
|
|
12492
|
-
|
|
12494
|
+
V();
|
|
12493
12495
|
}, _ = () => {
|
|
12494
12496
|
n && confirm("确定要清空画布吗?") && (Ne.clearAll(), n.clearCells(), c.value = null, Wd(Oe.SCADA_EDITOR_DATA));
|
|
12495
12497
|
}, C = () => {
|
|
@@ -12500,46 +12502,46 @@ const Ne = new Ug(), Gg = {
|
|
|
12500
12502
|
if (!n) return;
|
|
12501
12503
|
const k = K.getConfig().zoom.scale, I = Math.max(0.1, k - 0.1);
|
|
12502
12504
|
K.setZoom(I);
|
|
12503
|
-
},
|
|
12505
|
+
}, Y = () => {
|
|
12504
12506
|
if (!n) return;
|
|
12505
12507
|
const k = n.getSelectedCells().filter((N) => N.isNode());
|
|
12506
12508
|
if (k.length < 2) {
|
|
12507
|
-
|
|
12509
|
+
ve("请选择至少两个节点", "warning");
|
|
12508
12510
|
return;
|
|
12509
12511
|
}
|
|
12510
12512
|
const I = Math.min(...k.map((N) => N.getPosition().x));
|
|
12511
12513
|
k.forEach((N) => {
|
|
12512
12514
|
N.setPosition({ x: I, y: N.getPosition().y });
|
|
12513
12515
|
});
|
|
12514
|
-
},
|
|
12516
|
+
}, J = () => {
|
|
12515
12517
|
if (!n) return;
|
|
12516
|
-
const k = n.getSelectedCells().filter((
|
|
12518
|
+
const k = n.getSelectedCells().filter((V) => V.isNode());
|
|
12517
12519
|
if (k.length < 2) {
|
|
12518
|
-
|
|
12520
|
+
ve("请选择至少两个节点", "warning");
|
|
12519
12521
|
return;
|
|
12520
12522
|
}
|
|
12521
|
-
const I = k.map((
|
|
12522
|
-
k.forEach((
|
|
12523
|
-
const
|
|
12524
|
-
|
|
12523
|
+
const I = k.map((V) => V.getPosition().x + V.getSize().width / 2), N = I.reduce((V, G) => V + G, 0) / I.length;
|
|
12524
|
+
k.forEach((V) => {
|
|
12525
|
+
const G = N - V.getSize().width / 2;
|
|
12526
|
+
V.setPosition({ x: G, y: V.getPosition().y });
|
|
12525
12527
|
});
|
|
12526
12528
|
}, T = () => {
|
|
12527
12529
|
if (!n) return;
|
|
12528
12530
|
const k = n.getSelectedCells().filter((N) => N.isNode());
|
|
12529
12531
|
if (k.length < 2) {
|
|
12530
|
-
|
|
12532
|
+
ve("请选择至少两个节点", "warning");
|
|
12531
12533
|
return;
|
|
12532
12534
|
}
|
|
12533
12535
|
const I = Math.max(...k.map((N) => N.getPosition().x + N.getSize().width));
|
|
12534
12536
|
k.forEach((N) => {
|
|
12535
|
-
const
|
|
12536
|
-
N.setPosition({ x:
|
|
12537
|
+
const V = I - N.getSize().width;
|
|
12538
|
+
N.setPosition({ x: V, y: N.getPosition().y });
|
|
12537
12539
|
});
|
|
12538
|
-
},
|
|
12540
|
+
}, A = () => {
|
|
12539
12541
|
if (!n) return;
|
|
12540
12542
|
const k = n.getSelectedCells().filter((N) => N.isNode());
|
|
12541
12543
|
if (k.length < 2) {
|
|
12542
|
-
|
|
12544
|
+
ve("请选择至少两个节点", "warning");
|
|
12543
12545
|
return;
|
|
12544
12546
|
}
|
|
12545
12547
|
const I = Math.min(...k.map((N) => N.getPosition().y));
|
|
@@ -12548,57 +12550,57 @@ const Ne = new Ug(), Gg = {
|
|
|
12548
12550
|
});
|
|
12549
12551
|
}, B = () => {
|
|
12550
12552
|
if (!n) return;
|
|
12551
|
-
const k = n.getSelectedCells().filter((
|
|
12553
|
+
const k = n.getSelectedCells().filter((V) => V.isNode());
|
|
12552
12554
|
if (k.length < 2) {
|
|
12553
|
-
|
|
12555
|
+
ve("请选择至少两个节点", "warning");
|
|
12554
12556
|
return;
|
|
12555
12557
|
}
|
|
12556
|
-
const I = k.map((
|
|
12557
|
-
k.forEach((
|
|
12558
|
-
const
|
|
12559
|
-
|
|
12558
|
+
const I = k.map((V) => V.getPosition().y + V.getSize().height / 2), N = I.reduce((V, G) => V + G, 0) / I.length;
|
|
12559
|
+
k.forEach((V) => {
|
|
12560
|
+
const G = N - V.getSize().height / 2;
|
|
12561
|
+
V.setPosition({ x: V.getPosition().x, y: G });
|
|
12560
12562
|
});
|
|
12561
|
-
},
|
|
12563
|
+
}, ge = () => {
|
|
12562
12564
|
if (!n) return;
|
|
12563
12565
|
const k = n.getSelectedCells().filter((N) => N.isNode());
|
|
12564
12566
|
if (k.length < 2) {
|
|
12565
|
-
|
|
12567
|
+
ve("请选择至少两个节点", "warning");
|
|
12566
12568
|
return;
|
|
12567
12569
|
}
|
|
12568
12570
|
const I = Math.max(...k.map((N) => N.getPosition().y + N.getSize().height));
|
|
12569
12571
|
k.forEach((N) => {
|
|
12570
|
-
const
|
|
12571
|
-
N.setPosition({ x: N.getPosition().x, y:
|
|
12572
|
+
const V = I - N.getSize().height;
|
|
12573
|
+
N.setPosition({ x: N.getPosition().x, y: V });
|
|
12572
12574
|
});
|
|
12573
12575
|
}, xe = () => {
|
|
12574
12576
|
if (!n) return;
|
|
12575
|
-
const k = n.getSelectedCells().filter((
|
|
12577
|
+
const k = n.getSelectedCells().filter((H) => H.isNode());
|
|
12576
12578
|
if (k.length < 3) {
|
|
12577
|
-
|
|
12579
|
+
ve("请选择至少三个节点", "warning");
|
|
12578
12580
|
return;
|
|
12579
12581
|
}
|
|
12580
|
-
const I = k.sort((
|
|
12581
|
-
I.forEach((
|
|
12582
|
-
if (
|
|
12583
|
-
const
|
|
12584
|
-
|
|
12582
|
+
const I = k.sort((H, Q) => H.getPosition().x - Q.getPosition().x), N = I[0], te = (I[I.length - 1].getPosition().x - N.getPosition().x) / (I.length - 1);
|
|
12583
|
+
I.forEach((H, Q) => {
|
|
12584
|
+
if (Q === 0 || Q === I.length - 1) return;
|
|
12585
|
+
const ae = N.getPosition().x + te * Q;
|
|
12586
|
+
H.setPosition({ x: ae, y: H.getPosition().y });
|
|
12585
12587
|
});
|
|
12586
12588
|
}, Ve = () => {
|
|
12587
12589
|
if (!n) return;
|
|
12588
|
-
const k = n.getSelectedCells().filter((
|
|
12590
|
+
const k = n.getSelectedCells().filter((H) => H.isNode());
|
|
12589
12591
|
if (k.length < 3) {
|
|
12590
|
-
|
|
12592
|
+
ve("请选择至少三个节点", "warning");
|
|
12591
12593
|
return;
|
|
12592
12594
|
}
|
|
12593
|
-
const I = k.sort((
|
|
12594
|
-
I.forEach((
|
|
12595
|
-
if (
|
|
12596
|
-
const
|
|
12597
|
-
|
|
12595
|
+
const I = k.sort((H, Q) => H.getPosition().y - Q.getPosition().y), N = I[0], te = (I[I.length - 1].getPosition().y - N.getPosition().y) / (I.length - 1);
|
|
12596
|
+
I.forEach((H, Q) => {
|
|
12597
|
+
if (Q === 0 || Q === I.length - 1) return;
|
|
12598
|
+
const ae = N.getPosition().y + te * Q;
|
|
12599
|
+
H.setPosition({ x: H.getPosition().x, y: ae });
|
|
12598
12600
|
});
|
|
12599
12601
|
}, Be = async () => {
|
|
12600
12602
|
if (!n) {
|
|
12601
|
-
|
|
12603
|
+
ve("画布未初始化", "error");
|
|
12602
12604
|
return;
|
|
12603
12605
|
}
|
|
12604
12606
|
try {
|
|
@@ -12619,58 +12621,58 @@ const Ne = new Ug(), Gg = {
|
|
|
12619
12621
|
zoom: K.getConfig().zoom
|
|
12620
12622
|
},
|
|
12621
12623
|
cells: n.toJSON().cells
|
|
12622
|
-
}, I = new Blob([JSON.stringify(k, null, 2)], { type: "application/json" }), N = URL.createObjectURL(I),
|
|
12623
|
-
|
|
12624
|
+
}, I = new Blob([JSON.stringify(k, null, 2)], { type: "application/json" }), N = URL.createObjectURL(I), V = document.createElement("a"), G = `scada-canvas-${(/* @__PURE__ */ new Date()).getTime()}.json`;
|
|
12625
|
+
V.href = N, V.download = G, V.click(), URL.revokeObjectURL(N), ve("保存成功", "success");
|
|
12624
12626
|
} catch (k) {
|
|
12625
|
-
console.error("保存失败", k),
|
|
12627
|
+
console.error("保存失败", k), ve("保存失败,请查看控制台", "error");
|
|
12626
12628
|
}
|
|
12627
12629
|
}, $e = () => {
|
|
12628
12630
|
g.value && g.value.click();
|
|
12629
12631
|
}, Xe = (k) => {
|
|
12630
|
-
var
|
|
12631
|
-
const N = (
|
|
12632
|
+
var G;
|
|
12633
|
+
const N = (G = k.target.files) == null ? void 0 : G[0];
|
|
12632
12634
|
if (!N) {
|
|
12633
|
-
|
|
12635
|
+
ve("请选择文件", "error");
|
|
12634
12636
|
return;
|
|
12635
12637
|
}
|
|
12636
|
-
const
|
|
12637
|
-
|
|
12638
|
-
var
|
|
12638
|
+
const V = new FileReader();
|
|
12639
|
+
V.onload = (te) => {
|
|
12640
|
+
var H;
|
|
12639
12641
|
try {
|
|
12640
|
-
const
|
|
12641
|
-
if (!
|
|
12642
|
-
|
|
12642
|
+
const Q = JSON.parse((H = te.target) == null ? void 0 : H.result);
|
|
12643
|
+
if (!Q.cells) {
|
|
12644
|
+
ve("无效的JSON文件格式", "error");
|
|
12643
12645
|
return;
|
|
12644
12646
|
}
|
|
12645
12647
|
if (!confirm("导入将清空当前画布,是否继续?"))
|
|
12646
12648
|
return;
|
|
12647
12649
|
if (n) {
|
|
12648
|
-
if (n.clearCells(), n.fromJSON({ cells:
|
|
12649
|
-
var
|
|
12650
|
-
const
|
|
12651
|
-
(
|
|
12652
|
-
}),
|
|
12650
|
+
if (n.clearCells(), n.fromJSON({ cells: Q.cells }), n.getEdges().forEach((ae) => {
|
|
12651
|
+
var F;
|
|
12652
|
+
const de = ae.getData();
|
|
12653
|
+
(F = de == null ? void 0 : de.animation) != null && F.enabled && y(ae, de.animation);
|
|
12654
|
+
}), Q.config && K.updateConfig(Q.config), Q.workflows && Array.isArray(Q.workflows) && Q.workflows.length > 0)
|
|
12653
12655
|
try {
|
|
12654
|
-
const
|
|
12655
|
-
let
|
|
12656
|
-
|
|
12657
|
-
const
|
|
12658
|
-
|
|
12659
|
-
...
|
|
12656
|
+
const ae = localStorage.getItem("saved-workflows"), de = ae ? JSON.parse(ae) : [];
|
|
12657
|
+
let F = 0, oe = 0;
|
|
12658
|
+
Q.workflows.forEach((ee) => {
|
|
12659
|
+
const fe = de.findIndex((ue) => ue.id === ee.id);
|
|
12660
|
+
fe >= 0 ? (de[fe] = {
|
|
12661
|
+
...ee,
|
|
12660
12662
|
updatedAt: Date.now()
|
|
12661
|
-
},
|
|
12662
|
-
}), localStorage.setItem("saved-workflows", JSON.stringify(
|
|
12663
|
-
} catch (
|
|
12664
|
-
console.error("导入流程数据失败:",
|
|
12663
|
+
}, oe++) : (de.push(ee), F++);
|
|
12664
|
+
}), localStorage.setItem("saved-workflows", JSON.stringify(de)), ve(`导入成功 画布已加载,流程: 新增${F}个,更新${oe}个`, "success");
|
|
12665
|
+
} catch (ae) {
|
|
12666
|
+
console.error("导入流程数据失败:", ae), ve("画布导入成功, 但流程数据导入失败", "warning");
|
|
12665
12667
|
}
|
|
12666
12668
|
else
|
|
12667
|
-
|
|
12669
|
+
ve("导入成功", "success");
|
|
12668
12670
|
g.value && (g.value.value = "");
|
|
12669
12671
|
}
|
|
12670
|
-
} catch (
|
|
12671
|
-
console.error("导入失败",
|
|
12672
|
+
} catch (Q) {
|
|
12673
|
+
console.error("导入失败", Q), ve("导入失败,JSON格式错误", "error"), g.value && (g.value.value = "");
|
|
12672
12674
|
}
|
|
12673
|
-
},
|
|
12675
|
+
}, V.readAsText(N);
|
|
12674
12676
|
}, Ue = () => {
|
|
12675
12677
|
if (console.log("🎬 [ScadaCanvas] handlePreview 被调用"), !n) {
|
|
12676
12678
|
console.error("⚠️ [ScadaCanvas] graph 不存在");
|
|
@@ -12690,7 +12692,7 @@ const Ne = new Ug(), Gg = {
|
|
|
12690
12692
|
p.value = !0;
|
|
12691
12693
|
}, Fe = () => {
|
|
12692
12694
|
if (!n) {
|
|
12693
|
-
|
|
12695
|
+
ve("画布未初始化", "error");
|
|
12694
12696
|
return;
|
|
12695
12697
|
}
|
|
12696
12698
|
try {
|
|
@@ -12706,44 +12708,44 @@ const Ne = new Ug(), Gg = {
|
|
|
12706
12708
|
zoom: K.getConfig().zoom
|
|
12707
12709
|
},
|
|
12708
12710
|
cells: n.toJSON().cells,
|
|
12709
|
-
nodes: n.getNodes().map((
|
|
12710
|
-
id:
|
|
12711
|
-
type:
|
|
12712
|
-
position:
|
|
12713
|
-
size:
|
|
12714
|
-
label:
|
|
12715
|
-
data:
|
|
12711
|
+
nodes: n.getNodes().map((V) => ({
|
|
12712
|
+
id: V.id,
|
|
12713
|
+
type: V.shape,
|
|
12714
|
+
position: V.getPosition(),
|
|
12715
|
+
size: V.getSize(),
|
|
12716
|
+
label: V.attr("label/text"),
|
|
12717
|
+
data: V.getData()
|
|
12716
12718
|
})),
|
|
12717
|
-
edges: n.getEdges().map((
|
|
12718
|
-
id:
|
|
12719
|
-
source:
|
|
12720
|
-
target:
|
|
12719
|
+
edges: n.getEdges().map((V) => ({
|
|
12720
|
+
id: V.id,
|
|
12721
|
+
source: V.getSourceCellId(),
|
|
12722
|
+
target: V.getTargetCellId()
|
|
12721
12723
|
})),
|
|
12722
12724
|
workflows: []
|
|
12723
12725
|
// 收集所有被引用的流程
|
|
12724
12726
|
}, I = /* @__PURE__ */ new Set();
|
|
12725
|
-
if (n.getNodes().forEach((
|
|
12726
|
-
const
|
|
12727
|
-
|
|
12728
|
-
var
|
|
12729
|
-
|
|
12727
|
+
if (n.getNodes().forEach((V) => {
|
|
12728
|
+
const G = V.getData();
|
|
12729
|
+
G != null && G.events && Array.isArray(G.events) && G.events.forEach((te) => {
|
|
12730
|
+
var H;
|
|
12731
|
+
te.action === "callProcess" && ((H = te.params) != null && H.processId) && I.add(te.params.processId);
|
|
12730
12732
|
});
|
|
12731
12733
|
}), I.size > 0)
|
|
12732
12734
|
try {
|
|
12733
|
-
const
|
|
12734
|
-
if (
|
|
12735
|
-
const
|
|
12736
|
-
k.workflows =
|
|
12737
|
-
(
|
|
12735
|
+
const V = localStorage.getItem("saved-workflows");
|
|
12736
|
+
if (V) {
|
|
12737
|
+
const G = JSON.parse(V);
|
|
12738
|
+
k.workflows = G.filter(
|
|
12739
|
+
(te) => I.has(te.id)
|
|
12738
12740
|
);
|
|
12739
12741
|
}
|
|
12740
|
-
} catch (
|
|
12741
|
-
console.error("加载流程数据失败:",
|
|
12742
|
+
} catch (V) {
|
|
12743
|
+
console.error("加载流程数据失败:", V);
|
|
12742
12744
|
}
|
|
12743
12745
|
const N = Bd(k, "scada-export");
|
|
12744
|
-
|
|
12746
|
+
ve(`已导出为 ${N}`, "success");
|
|
12745
12747
|
} catch (k) {
|
|
12746
|
-
console.error("导出失败", k),
|
|
12748
|
+
console.error("导出失败", k), ve("导出失败,请查看控制台", "error");
|
|
12747
12749
|
}
|
|
12748
12750
|
};
|
|
12749
12751
|
return l({
|
|
@@ -12768,17 +12770,17 @@ const Ne = new Ug(), Gg = {
|
|
|
12768
12770
|
clearAll: _,
|
|
12769
12771
|
// === 对齐和分布 ===
|
|
12770
12772
|
/** 左对齐选中节点 */
|
|
12771
|
-
alignLeft:
|
|
12773
|
+
alignLeft: Y,
|
|
12772
12774
|
/** 水平居中选中节点 */
|
|
12773
|
-
alignCenter:
|
|
12775
|
+
alignCenter: J,
|
|
12774
12776
|
/** 右对齐选中节点 */
|
|
12775
12777
|
alignRight: T,
|
|
12776
12778
|
/** 顶部对齐选中节点 */
|
|
12777
|
-
alignTop:
|
|
12779
|
+
alignTop: A,
|
|
12778
12780
|
/** 垂直居中选中节点 */
|
|
12779
12781
|
alignMiddle: B,
|
|
12780
12782
|
/** 底部对齐选中节点 */
|
|
12781
|
-
alignBottom:
|
|
12783
|
+
alignBottom: ge,
|
|
12782
12784
|
/** 横向分布选中节点 */
|
|
12783
12785
|
distributeHorizontal: xe,
|
|
12784
12786
|
/** 纵向分布选中节点 */
|
|
@@ -12830,9 +12832,9 @@ const Ne = new Ug(), Gg = {
|
|
|
12830
12832
|
if (!n) return !1;
|
|
12831
12833
|
try {
|
|
12832
12834
|
return n.clearCells(), n.fromJSON({ cells: k.cells }), k.config && K.updateConfig(k.config), n.getEdges().forEach((I) => {
|
|
12833
|
-
var
|
|
12835
|
+
var V;
|
|
12834
12836
|
const N = I.getData();
|
|
12835
|
-
(
|
|
12837
|
+
(V = N == null ? void 0 : N.animation) != null && V.enabled && y(I, N.animation);
|
|
12836
12838
|
}), !0;
|
|
12837
12839
|
} catch (I) {
|
|
12838
12840
|
return console.error("加载画布数据失败:", I), !1;
|
|
@@ -12881,6 +12883,35 @@ const Ne = new Ug(), Gg = {
|
|
|
12881
12883
|
setBackgroundColor: (k) => {
|
|
12882
12884
|
K.updateBackground({ color: k });
|
|
12883
12885
|
},
|
|
12886
|
+
// === 数据集成 ===
|
|
12887
|
+
/** 更新设备数据 */
|
|
12888
|
+
updateDeviceData: (k) => {
|
|
12889
|
+
n && (k != null && k.devices) && k.devices.forEach((I) => {
|
|
12890
|
+
var N;
|
|
12891
|
+
(N = I.points) == null || N.forEach((V) => {
|
|
12892
|
+
n && n.getNodes().forEach((G) => {
|
|
12893
|
+
const te = G.getData();
|
|
12894
|
+
te != null && te.bindings && Object.entries(te.bindings).forEach(([H, Q]) => {
|
|
12895
|
+
if (Q.deviceId === I.id && Q.dataPoint === V.id) {
|
|
12896
|
+
const ae = V.value;
|
|
12897
|
+
if (H === "attrs/text/text")
|
|
12898
|
+
G.attr("text/text", ae);
|
|
12899
|
+
else if (H === "attrs/body/fill")
|
|
12900
|
+
G.attr("body/fill", ae);
|
|
12901
|
+
else {
|
|
12902
|
+
const de = H.split(".");
|
|
12903
|
+
let F = G;
|
|
12904
|
+
for (let ee = 0; ee < de.length - 1; ee++)
|
|
12905
|
+
F = F[de[ee]];
|
|
12906
|
+
const oe = de[de.length - 1];
|
|
12907
|
+
F && oe && (F[oe] = ae);
|
|
12908
|
+
}
|
|
12909
|
+
}
|
|
12910
|
+
});
|
|
12911
|
+
});
|
|
12912
|
+
});
|
|
12913
|
+
});
|
|
12914
|
+
},
|
|
12884
12915
|
// === 动画控制 ===
|
|
12885
12916
|
/** 获取动画引擎 */
|
|
12886
12917
|
getAnimationEngine: () => Ne
|
|
@@ -12896,12 +12927,12 @@ const Ne = new Ug(), Gg = {
|
|
|
12896
12927
|
onZoomIn: C,
|
|
12897
12928
|
onZoomOut: W,
|
|
12898
12929
|
onClearAll: _,
|
|
12899
|
-
onAlignLeft:
|
|
12900
|
-
onAlignCenter:
|
|
12930
|
+
onAlignLeft: Y,
|
|
12931
|
+
onAlignCenter: J,
|
|
12901
12932
|
onAlignRight: T,
|
|
12902
|
-
onAlignTop:
|
|
12933
|
+
onAlignTop: A,
|
|
12903
12934
|
onAlignMiddle: B,
|
|
12904
|
-
onAlignBottom:
|
|
12935
|
+
onAlignBottom: ge,
|
|
12905
12936
|
onDistributeHorizontal: xe,
|
|
12906
12937
|
onDistributeVertical: Ve
|
|
12907
12938
|
}, null, 8, ["selected-nodes-count"])),
|
|
@@ -12919,7 +12950,7 @@ const Ne = new Ug(), Gg = {
|
|
|
12919
12950
|
key: 0,
|
|
12920
12951
|
onAddComponent: b
|
|
12921
12952
|
})),
|
|
12922
|
-
|
|
12953
|
+
pe(pl, {
|
|
12923
12954
|
ref_key: "canvasAreaRef",
|
|
12924
12955
|
ref: i
|
|
12925
12956
|
}, null, 512),
|
|
@@ -12934,7 +12965,7 @@ const Ne = new Ug(), Gg = {
|
|
|
12934
12965
|
onDeleteEdge: x
|
|
12935
12966
|
}, null, 8, ["selected-node", "selected-edge"]))
|
|
12936
12967
|
]),
|
|
12937
|
-
|
|
12968
|
+
pe(Cu, {
|
|
12938
12969
|
"auth-code": r.authCode,
|
|
12939
12970
|
"custom-footer": r.customFooter
|
|
12940
12971
|
}, null, 8, ["auth-code", "custom-footer"]),
|
|
@@ -12947,7 +12978,7 @@ const Ne = new Ug(), Gg = {
|
|
|
12947
12978
|
}, null, 8, ["visible", "scada-graph"]))
|
|
12948
12979
|
]));
|
|
12949
12980
|
}
|
|
12950
|
-
}), Hg = /* @__PURE__ */
|
|
12981
|
+
}), Hg = /* @__PURE__ */ j(jg, [["__scopeId", "data-v-8df52ee5"]]), qg = {
|
|
12951
12982
|
ScadaCanvas: Hg,
|
|
12952
12983
|
PropertyPanel: Kt,
|
|
12953
12984
|
Header: kt,
|
|
@@ -13005,6 +13036,6 @@ export {
|
|
|
13005
13036
|
Wd as removeFromSession,
|
|
13006
13037
|
lm as saveToLocal,
|
|
13007
13038
|
dt as saveToSession,
|
|
13008
|
-
|
|
13039
|
+
ve as showMessage,
|
|
13009
13040
|
Ye as sizePresetMap
|
|
13010
13041
|
};
|