topo-engine 0.1.10 → 0.1.11
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 +31 -4
- package/dist/index.d.ts +14 -0
- package/dist/style.css +63 -11
- package/dist/topo-engine.cjs +433 -8
- package/dist/topo-engine.cjs.map +1 -1
- package/dist/topo-engine.js +434 -9
- package/dist/topo-engine.js.map +1 -1
- package/dist/topo-engine.umd.cjs +433 -8
- package/dist/topo-engine.umd.cjs.map +1 -1
- package/docs/API.md +48 -2
- package/package.json +1 -1
package/dist/topo-engine.cjs
CHANGED
|
@@ -29720,10 +29720,58 @@ const _hoisted_4$2 = { class: "topo-meta" };
|
|
|
29720
29720
|
const _hoisted_5$2 = ["title"];
|
|
29721
29721
|
const _hoisted_6$2 = {
|
|
29722
29722
|
key: 1,
|
|
29723
|
+
class: "topo-legend"
|
|
29724
|
+
};
|
|
29725
|
+
const _hoisted_7$2 = { class: "topo-legend-body" };
|
|
29726
|
+
const _hoisted_8$2 = {
|
|
29727
|
+
class: "topo-legend-icon",
|
|
29728
|
+
viewBox: "0 0 32 20",
|
|
29729
|
+
width: "32",
|
|
29730
|
+
height: "20",
|
|
29731
|
+
"aria-hidden": "true"
|
|
29732
|
+
};
|
|
29733
|
+
const _hoisted_9$2 = ["stroke"];
|
|
29734
|
+
const _hoisted_10$2 = ["fill", "stroke"];
|
|
29735
|
+
const _hoisted_11$2 = ["stroke"];
|
|
29736
|
+
const _hoisted_12$2 = ["stroke"];
|
|
29737
|
+
const _hoisted_13$2 = ["stroke"];
|
|
29738
|
+
const _hoisted_14$2 = ["fill"];
|
|
29739
|
+
const _hoisted_15$1 = ["stroke"];
|
|
29740
|
+
const _hoisted_16$1 = ["stroke"];
|
|
29741
|
+
const _hoisted_17$1 = ["stroke"];
|
|
29742
|
+
const _hoisted_18$1 = ["fill"];
|
|
29743
|
+
const _hoisted_19$1 = ["fill"];
|
|
29744
|
+
const _hoisted_20$1 = ["fill", "stroke"];
|
|
29745
|
+
const _hoisted_21$1 = ["stroke"];
|
|
29746
|
+
const _hoisted_22$1 = ["fill"];
|
|
29747
|
+
const _hoisted_23$1 = ["stroke"];
|
|
29748
|
+
const _hoisted_24$1 = ["stroke"];
|
|
29749
|
+
const _hoisted_25$1 = ["stroke"];
|
|
29750
|
+
const _hoisted_26$1 = ["stroke"];
|
|
29751
|
+
const _hoisted_27$1 = ["fill", "stroke"];
|
|
29752
|
+
const _hoisted_28$1 = ["fill"];
|
|
29753
|
+
const _hoisted_29$1 = ["stroke"];
|
|
29754
|
+
const _hoisted_30$1 = ["fill"];
|
|
29755
|
+
const _hoisted_31$1 = ["fill", "stroke"];
|
|
29756
|
+
const _hoisted_32$1 = ["fill"];
|
|
29757
|
+
const _hoisted_33$1 = ["stroke"];
|
|
29758
|
+
const _hoisted_34$1 = ["fill"];
|
|
29759
|
+
const _hoisted_35$1 = ["fill"];
|
|
29760
|
+
const _hoisted_36$1 = ["fill", "stroke"];
|
|
29761
|
+
const _hoisted_37$1 = ["stroke", "stroke-width"];
|
|
29762
|
+
const _hoisted_38$1 = ["fill"];
|
|
29763
|
+
const _hoisted_39 = ["stroke"];
|
|
29764
|
+
const _hoisted_40 = ["fill"];
|
|
29765
|
+
const _hoisted_41 = ["stroke"];
|
|
29766
|
+
const _hoisted_42 = ["fill"];
|
|
29767
|
+
const _hoisted_43 = ["fill"];
|
|
29768
|
+
const _hoisted_44 = { class: "topo-legend-label" };
|
|
29769
|
+
const _hoisted_45 = {
|
|
29770
|
+
key: 2,
|
|
29723
29771
|
class: "topo-loading"
|
|
29724
29772
|
};
|
|
29725
|
-
const
|
|
29726
|
-
key:
|
|
29773
|
+
const _hoisted_46 = {
|
|
29774
|
+
key: 3,
|
|
29727
29775
|
class: "topo-error"
|
|
29728
29776
|
};
|
|
29729
29777
|
const _sfc_main$2 = {
|
|
@@ -29735,10 +29783,14 @@ const _sfc_main$2 = {
|
|
|
29735
29783
|
customerData: { type: Array, default: null },
|
|
29736
29784
|
/** 主题:'dark'(默认,黑底 SCADA 风)| 'light'(白底);支持 v-model:theme 双向绑定 */
|
|
29737
29785
|
theme: { type: String, default: "light" },
|
|
29738
|
-
/**
|
|
29739
|
-
toolbar: { type: Boolean, default: false }
|
|
29786
|
+
/** 左上角工具条(标题/统计/主题/图例/适应/导出)是否显示,默认不显示 */
|
|
29787
|
+
toolbar: { type: Boolean, default: false },
|
|
29788
|
+
/** 是否显示左下角图例面板,默认 false(关闭);支持 v-model:legend */
|
|
29789
|
+
legend: { type: Boolean, default: false },
|
|
29790
|
+
/** 自定义图例项(可选):[{ label, shape, color?, text?, key? }];不传则按当前图内容自动生成 */
|
|
29791
|
+
legendItems: { type: Array, default: null }
|
|
29740
29792
|
},
|
|
29741
|
-
emits: ["node-select", "customer-select", "loaded", "top-distances", "update:theme"],
|
|
29793
|
+
emits: ["node-select", "customer-select", "loaded", "top-distances", "update:theme", "update:legend"],
|
|
29742
29794
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
29743
29795
|
const props = __props;
|
|
29744
29796
|
const emit = __emit;
|
|
@@ -29748,6 +29800,49 @@ const _sfc_main$2 = {
|
|
|
29748
29800
|
const title = vue.ref("");
|
|
29749
29801
|
const stats = vue.ref({ total: 0, depth: 0, leaves: 0, byCat: {} });
|
|
29750
29802
|
const edgeCount = vue.ref(0);
|
|
29803
|
+
const legendCollapsed = vue.ref(false);
|
|
29804
|
+
const hasCustomerData = vue.ref(false);
|
|
29805
|
+
const hasSwitch = vue.ref(false);
|
|
29806
|
+
const hasFuse = vue.ref(false);
|
|
29807
|
+
const LEGEND_DEFS = [
|
|
29808
|
+
{ cat: "transformer", label: "配电变压器", shape: "transformer" },
|
|
29809
|
+
{ cat: "switch", label: "开关 / 断路器", shape: "switch" },
|
|
29810
|
+
{ cat: "fuse", label: "低压熔丝", shape: "fuse" },
|
|
29811
|
+
{ cat: "bus", label: "低压母线", shape: "bus" },
|
|
29812
|
+
{ cat: "cableTerminal", label: "电缆终端头", shape: "cableTerminal" },
|
|
29813
|
+
{ cat: "junction", label: "密母分接点", shape: "junction" },
|
|
29814
|
+
{ cat: "meterBox", label: "计量箱", shape: "meterBox" },
|
|
29815
|
+
{ cat: "consumer", label: "用户接入点", shape: "consumer" },
|
|
29816
|
+
{ cat: "line", label: "低压导线点", shape: "line" },
|
|
29817
|
+
{ cat: "station", label: "低压配电箱", shape: "station" },
|
|
29818
|
+
{ cat: "other", label: "其它设备", shape: "other" }
|
|
29819
|
+
];
|
|
29820
|
+
const legendPalette = vue.computed(() => THEMES[themeName()] || THEMES.dark);
|
|
29821
|
+
function legendColor(item, role) {
|
|
29822
|
+
if (item && item.color) return item.color;
|
|
29823
|
+
return legendPalette.value[role] || "#888888";
|
|
29824
|
+
}
|
|
29825
|
+
const legendEntries = vue.computed(() => {
|
|
29826
|
+
const custom = props.legendItems;
|
|
29827
|
+
if (Array.isArray(custom) && custom.length) {
|
|
29828
|
+
return custom.map((it, i) => ({ key: it.key || `custom-${i}`, ...it }));
|
|
29829
|
+
}
|
|
29830
|
+
const byCat = stats.value.byCat || {};
|
|
29831
|
+
const include = (d2) => {
|
|
29832
|
+
if (d2.cat === "switch") return hasSwitch.value;
|
|
29833
|
+
if (d2.cat === "fuse") return hasFuse.value;
|
|
29834
|
+
return !!byCat[d2.cat];
|
|
29835
|
+
};
|
|
29836
|
+
const list = LEGEND_DEFS.filter(include).map((d2) => ({ ...d2, key: d2.cat }));
|
|
29837
|
+
if (list.length) {
|
|
29838
|
+
list.push({ key: "edge-trunk", label: "主干导线", shape: "edge", role: "trunkEdge" });
|
|
29839
|
+
list.push({ key: "edge-branch", label: "分支导线", shape: "edge", role: "branchEdge" });
|
|
29840
|
+
}
|
|
29841
|
+
if (hasCustomerData.value) {
|
|
29842
|
+
list.push({ key: "meterUser", label: "客户电表", shape: "meterUser" });
|
|
29843
|
+
}
|
|
29844
|
+
return list;
|
|
29845
|
+
});
|
|
29751
29846
|
let graph = null;
|
|
29752
29847
|
let model = null;
|
|
29753
29848
|
let selectedId = null;
|
|
@@ -30037,6 +30132,9 @@ const _sfc_main$2 = {
|
|
|
30037
30132
|
title.value = String(model.title || "").replace(/\.+$/, "");
|
|
30038
30133
|
stats.value = model.stats;
|
|
30039
30134
|
edgeCount.value = model.edges.length;
|
|
30135
|
+
hasCustomerData.value = model.nodes.some((n) => Array.isArray(n._customers) && n._customers.length);
|
|
30136
|
+
hasSwitch.value = model.nodes.some((n) => n.cat === "switch" && !n.isFuse);
|
|
30137
|
+
hasFuse.value = model.nodes.some((n) => n.cat === "switch" && n.isFuse);
|
|
30040
30138
|
layoutData = computeOrthogonalLayout(model, {
|
|
30041
30139
|
nodeGap: 26,
|
|
30042
30140
|
// 主干相邻节点边界间距
|
|
@@ -30302,6 +30400,11 @@ const _sfc_main$2 = {
|
|
|
30302
30400
|
title: __props.theme === "light" ? "切换到深色主题" : "切换到浅色主题",
|
|
30303
30401
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("update:theme", __props.theme === "light" ? "dark" : "light"))
|
|
30304
30402
|
}, vue.toDisplayString(__props.theme === "light" ? "🌙 深色" : "☀️ 浅色"), 9, _hoisted_5$2),
|
|
30403
|
+
vue.createElementVNode("button", {
|
|
30404
|
+
class: "btn",
|
|
30405
|
+
title: "显示 / 隐藏图例",
|
|
30406
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("update:legend", !__props.legend))
|
|
30407
|
+
}, vue.toDisplayString(__props.legend ? "🗺 图例 ✓" : "🗺 图例"), 1),
|
|
30305
30408
|
vue.createElementVNode("button", {
|
|
30306
30409
|
class: "btn",
|
|
30307
30410
|
onClick: resetView
|
|
@@ -30311,12 +30414,334 @@ const _sfc_main$2 = {
|
|
|
30311
30414
|
onClick: exportPng
|
|
30312
30415
|
}, "导出 PNG")
|
|
30313
30416
|
])) : vue.createCommentVNode("", true),
|
|
30314
|
-
loading.value
|
|
30417
|
+
__props.legend && !loading.value && !error.value && legendEntries.value.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
|
|
30418
|
+
vue.createElementVNode("div", {
|
|
30419
|
+
class: "topo-legend-title",
|
|
30420
|
+
onClick: _cache[2] || (_cache[2] = ($event) => legendCollapsed.value = !legendCollapsed.value)
|
|
30421
|
+
}, [
|
|
30422
|
+
vue.createElementVNode("span", {
|
|
30423
|
+
class: vue.normalizeClass(["topo-legend-arrow", { open: !legendCollapsed.value }])
|
|
30424
|
+
}, "▸", 2),
|
|
30425
|
+
_cache[3] || (_cache[3] = vue.createTextVNode(" 图例 ", -1))
|
|
30426
|
+
]),
|
|
30427
|
+
vue.withDirectives(vue.createElementVNode("div", _hoisted_7$2, [
|
|
30428
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(legendEntries.value, (it) => {
|
|
30429
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
30430
|
+
key: it.key || it.label,
|
|
30431
|
+
class: "topo-legend-row"
|
|
30432
|
+
}, [
|
|
30433
|
+
(vue.openBlock(), vue.createElementBlock("svg", _hoisted_8$2, [
|
|
30434
|
+
it.shape === "transformer" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
30435
|
+
vue.createElementVNode("line", {
|
|
30436
|
+
x1: "2",
|
|
30437
|
+
y1: "10",
|
|
30438
|
+
x2: "8",
|
|
30439
|
+
y2: "10",
|
|
30440
|
+
stroke: legendColor(it, "trunkLine"),
|
|
30441
|
+
"stroke-width": "1.6",
|
|
30442
|
+
"stroke-linecap": "round"
|
|
30443
|
+
}, null, 8, _hoisted_9$2),
|
|
30444
|
+
vue.createElementVNode("circle", {
|
|
30445
|
+
cx: "12",
|
|
30446
|
+
cy: "10",
|
|
30447
|
+
r: "5",
|
|
30448
|
+
fill: legendColor(it, "orange"),
|
|
30449
|
+
stroke: legendColor(it, "trunkLine"),
|
|
30450
|
+
"stroke-width": "1.2"
|
|
30451
|
+
}, null, 8, _hoisted_10$2),
|
|
30452
|
+
vue.createElementVNode("circle", {
|
|
30453
|
+
cx: "22",
|
|
30454
|
+
cy: "10",
|
|
30455
|
+
r: "5",
|
|
30456
|
+
fill: "none",
|
|
30457
|
+
stroke: legendColor(it, "red"),
|
|
30458
|
+
"stroke-width": "2"
|
|
30459
|
+
}, null, 8, _hoisted_11$2),
|
|
30460
|
+
vue.createElementVNode("line", {
|
|
30461
|
+
x1: "27",
|
|
30462
|
+
y1: "10",
|
|
30463
|
+
x2: "31",
|
|
30464
|
+
y2: "10",
|
|
30465
|
+
stroke: legendColor(it, "red"),
|
|
30466
|
+
"stroke-width": "1.6",
|
|
30467
|
+
"stroke-linecap": "round"
|
|
30468
|
+
}, null, 8, _hoisted_12$2)
|
|
30469
|
+
], 64)) : it.shape === "switch" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
30470
|
+
vue.createElementVNode("line", {
|
|
30471
|
+
x1: "2",
|
|
30472
|
+
y1: "10",
|
|
30473
|
+
x2: "7",
|
|
30474
|
+
y2: "10",
|
|
30475
|
+
stroke: legendColor(it, "red"),
|
|
30476
|
+
"stroke-width": "1.6",
|
|
30477
|
+
"stroke-linecap": "round"
|
|
30478
|
+
}, null, 8, _hoisted_13$2),
|
|
30479
|
+
vue.createElementVNode("rect", {
|
|
30480
|
+
x: "7",
|
|
30481
|
+
y: "5",
|
|
30482
|
+
width: "18",
|
|
30483
|
+
height: "10",
|
|
30484
|
+
rx: "2",
|
|
30485
|
+
fill: legendColor(it, "red")
|
|
30486
|
+
}, null, 8, _hoisted_14$2),
|
|
30487
|
+
vue.createElementVNode("line", {
|
|
30488
|
+
x1: "25",
|
|
30489
|
+
y1: "10",
|
|
30490
|
+
x2: "30",
|
|
30491
|
+
y2: "10",
|
|
30492
|
+
stroke: legendColor(it, "red"),
|
|
30493
|
+
"stroke-width": "1.6",
|
|
30494
|
+
"stroke-linecap": "round"
|
|
30495
|
+
}, null, 8, _hoisted_15$1)
|
|
30496
|
+
], 64)) : it.shape === "fuse" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
|
|
30497
|
+
vue.createElementVNode("line", {
|
|
30498
|
+
x1: "2",
|
|
30499
|
+
y1: "10",
|
|
30500
|
+
x2: "6",
|
|
30501
|
+
y2: "10",
|
|
30502
|
+
stroke: legendColor(it, "red"),
|
|
30503
|
+
"stroke-width": "1.6",
|
|
30504
|
+
"stroke-linecap": "round"
|
|
30505
|
+
}, null, 8, _hoisted_16$1),
|
|
30506
|
+
vue.createElementVNode("rect", {
|
|
30507
|
+
x: "6",
|
|
30508
|
+
y: "5",
|
|
30509
|
+
width: "20",
|
|
30510
|
+
height: "10",
|
|
30511
|
+
rx: "2",
|
|
30512
|
+
fill: "none",
|
|
30513
|
+
stroke: legendColor(it, "red"),
|
|
30514
|
+
"stroke-width": "1.6"
|
|
30515
|
+
}, null, 8, _hoisted_17$1),
|
|
30516
|
+
vue.createElementVNode("circle", {
|
|
30517
|
+
cx: "12",
|
|
30518
|
+
cy: "10",
|
|
30519
|
+
r: "2.2",
|
|
30520
|
+
fill: legendColor(it, "red")
|
|
30521
|
+
}, null, 8, _hoisted_18$1),
|
|
30522
|
+
vue.createElementVNode("rect", {
|
|
30523
|
+
x: "16",
|
|
30524
|
+
y: "7",
|
|
30525
|
+
width: "7",
|
|
30526
|
+
height: "6",
|
|
30527
|
+
fill: legendColor(it, "red")
|
|
30528
|
+
}, null, 8, _hoisted_19$1)
|
|
30529
|
+
], 64)) : it.shape === "bus" ? (vue.openBlock(), vue.createElementBlock("rect", {
|
|
30530
|
+
key: 3,
|
|
30531
|
+
x: "5",
|
|
30532
|
+
y: "8",
|
|
30533
|
+
width: "22",
|
|
30534
|
+
height: "4",
|
|
30535
|
+
rx: "2",
|
|
30536
|
+
fill: legendColor(it, "white"),
|
|
30537
|
+
"fill-opacity": "0.5",
|
|
30538
|
+
stroke: legendColor(it, "white"),
|
|
30539
|
+
"stroke-width": "1.2"
|
|
30540
|
+
}, null, 8, _hoisted_20$1)) : it.shape === "cableTerminal" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 4 }, [
|
|
30541
|
+
vue.createElementVNode("line", {
|
|
30542
|
+
x1: "3",
|
|
30543
|
+
y1: "10",
|
|
30544
|
+
x2: "9",
|
|
30545
|
+
y2: "10",
|
|
30546
|
+
stroke: legendColor(it, "red"),
|
|
30547
|
+
"stroke-width": "1.6",
|
|
30548
|
+
"stroke-linecap": "round"
|
|
30549
|
+
}, null, 8, _hoisted_21$1),
|
|
30550
|
+
vue.createElementVNode("polygon", {
|
|
30551
|
+
points: "9,4 20,10 9,16",
|
|
30552
|
+
fill: legendColor(it, "red")
|
|
30553
|
+
}, null, 8, _hoisted_22$1)
|
|
30554
|
+
], 64)) : it.shape === "junction" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 5 }, [
|
|
30555
|
+
vue.createElementVNode("line", {
|
|
30556
|
+
x1: "10",
|
|
30557
|
+
y1: "10",
|
|
30558
|
+
x2: "22",
|
|
30559
|
+
y2: "10",
|
|
30560
|
+
stroke: legendColor(it, "red"),
|
|
30561
|
+
"stroke-width": "1.8",
|
|
30562
|
+
"stroke-linecap": "round"
|
|
30563
|
+
}, null, 8, _hoisted_23$1),
|
|
30564
|
+
vue.createElementVNode("line", {
|
|
30565
|
+
x1: "16",
|
|
30566
|
+
y1: "4",
|
|
30567
|
+
x2: "16",
|
|
30568
|
+
y2: "16",
|
|
30569
|
+
stroke: legendColor(it, "red"),
|
|
30570
|
+
"stroke-width": "1.8",
|
|
30571
|
+
"stroke-linecap": "round"
|
|
30572
|
+
}, null, 8, _hoisted_24$1),
|
|
30573
|
+
vue.createElementVNode("line", {
|
|
30574
|
+
x1: "11",
|
|
30575
|
+
y1: "5",
|
|
30576
|
+
x2: "21",
|
|
30577
|
+
y2: "15",
|
|
30578
|
+
stroke: legendColor(it, "red"),
|
|
30579
|
+
"stroke-width": "1.8",
|
|
30580
|
+
"stroke-linecap": "round"
|
|
30581
|
+
}, null, 8, _hoisted_25$1),
|
|
30582
|
+
vue.createElementVNode("line", {
|
|
30583
|
+
x1: "21",
|
|
30584
|
+
y1: "5",
|
|
30585
|
+
x2: "11",
|
|
30586
|
+
y2: "15",
|
|
30587
|
+
stroke: legendColor(it, "red"),
|
|
30588
|
+
"stroke-width": "1.8",
|
|
30589
|
+
"stroke-linecap": "round"
|
|
30590
|
+
}, null, 8, _hoisted_26$1)
|
|
30591
|
+
], 64)) : it.shape === "meterBox" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 6 }, [
|
|
30592
|
+
vue.createElementVNode("rect", {
|
|
30593
|
+
x: "10",
|
|
30594
|
+
y: "2",
|
|
30595
|
+
width: "16",
|
|
30596
|
+
height: "16",
|
|
30597
|
+
rx: "3",
|
|
30598
|
+
fill: legendColor(it, "meterFill"),
|
|
30599
|
+
stroke: legendColor(it, "meterText"),
|
|
30600
|
+
"stroke-width": "1.4"
|
|
30601
|
+
}, null, 8, _hoisted_27$1),
|
|
30602
|
+
vue.createElementVNode("text", {
|
|
30603
|
+
x: "18",
|
|
30604
|
+
y: "13.5",
|
|
30605
|
+
"text-anchor": "middle",
|
|
30606
|
+
"font-size": "8",
|
|
30607
|
+
"font-weight": "700",
|
|
30608
|
+
fill: legendColor(it, "meterText")
|
|
30609
|
+
}, "JX", 8, _hoisted_28$1)
|
|
30610
|
+
], 64)) : it.shape === "consumer" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 7 }, [
|
|
30611
|
+
vue.createElementVNode("circle", {
|
|
30612
|
+
cx: "16",
|
|
30613
|
+
cy: "10",
|
|
30614
|
+
r: "7",
|
|
30615
|
+
fill: "none",
|
|
30616
|
+
stroke: legendColor(it, "white"),
|
|
30617
|
+
"stroke-width": "2"
|
|
30618
|
+
}, null, 8, _hoisted_29$1),
|
|
30619
|
+
vue.createElementVNode("text", {
|
|
30620
|
+
x: "16",
|
|
30621
|
+
y: "13",
|
|
30622
|
+
"text-anchor": "middle",
|
|
30623
|
+
"font-size": "9",
|
|
30624
|
+
"font-weight": "700",
|
|
30625
|
+
fill: legendColor(it, "white")
|
|
30626
|
+
}, "J", 8, _hoisted_30$1)
|
|
30627
|
+
], 64)) : it.shape === "line" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 8 }, [
|
|
30628
|
+
vue.createElementVNode("circle", {
|
|
30629
|
+
cx: "16",
|
|
30630
|
+
cy: "10",
|
|
30631
|
+
r: "4.6",
|
|
30632
|
+
fill: legendColor(it, "dotFill"),
|
|
30633
|
+
stroke: legendColor(it, "cyan"),
|
|
30634
|
+
"stroke-width": "1.6"
|
|
30635
|
+
}, null, 8, _hoisted_31$1),
|
|
30636
|
+
vue.createElementVNode("circle", {
|
|
30637
|
+
cx: "16",
|
|
30638
|
+
cy: "10",
|
|
30639
|
+
r: "1.5",
|
|
30640
|
+
fill: legendColor(it, "cyan")
|
|
30641
|
+
}, null, 8, _hoisted_32$1)
|
|
30642
|
+
], 64)) : it.shape === "meterUser" ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 9 }, [
|
|
30643
|
+
vue.createElementVNode("rect", {
|
|
30644
|
+
x: "12",
|
|
30645
|
+
y: "2",
|
|
30646
|
+
width: "8",
|
|
30647
|
+
height: "15",
|
|
30648
|
+
rx: "2",
|
|
30649
|
+
fill: "none",
|
|
30650
|
+
stroke: legendColor(it, "meterText"),
|
|
30651
|
+
"stroke-width": "1.2"
|
|
30652
|
+
}, null, 8, _hoisted_33$1),
|
|
30653
|
+
vue.createElementVNode("rect", {
|
|
30654
|
+
x: "13.5",
|
|
30655
|
+
y: "4",
|
|
30656
|
+
width: "5",
|
|
30657
|
+
height: "2.2",
|
|
30658
|
+
rx: "1",
|
|
30659
|
+
fill: legendColor(it, "meterText"),
|
|
30660
|
+
"fill-opacity": "0.6"
|
|
30661
|
+
}, null, 8, _hoisted_34$1),
|
|
30662
|
+
vue.createElementVNode("circle", {
|
|
30663
|
+
cx: "16",
|
|
30664
|
+
cy: "11",
|
|
30665
|
+
r: "1.4",
|
|
30666
|
+
fill: legendColor(it, "meterText")
|
|
30667
|
+
}, null, 8, _hoisted_35$1)
|
|
30668
|
+
], 64)) : it.shape === "station" ? (vue.openBlock(), vue.createElementBlock("rect", {
|
|
30669
|
+
key: 10,
|
|
30670
|
+
x: "6",
|
|
30671
|
+
y: "4",
|
|
30672
|
+
width: "20",
|
|
30673
|
+
height: "12",
|
|
30674
|
+
rx: "2",
|
|
30675
|
+
fill: legendColor(it, "stationFill"),
|
|
30676
|
+
stroke: legendColor(it, "white"),
|
|
30677
|
+
"stroke-width": "1.4"
|
|
30678
|
+
}, null, 8, _hoisted_36$1)) : it.shape === "edge" ? (vue.openBlock(), vue.createElementBlock("line", {
|
|
30679
|
+
key: 11,
|
|
30680
|
+
x1: "3",
|
|
30681
|
+
y1: "10",
|
|
30682
|
+
x2: "29",
|
|
30683
|
+
y2: "10",
|
|
30684
|
+
stroke: legendColor(it, it.role || "trunkEdge"),
|
|
30685
|
+
"stroke-width": it.role === "branchEdge" ? 1.2 : 2.4,
|
|
30686
|
+
"stroke-linecap": "round"
|
|
30687
|
+
}, null, 8, _hoisted_37$1)) : it.shape === "square" ? (vue.openBlock(), vue.createElementBlock("rect", {
|
|
30688
|
+
key: 12,
|
|
30689
|
+
x: "10",
|
|
30690
|
+
y: "4",
|
|
30691
|
+
width: "12",
|
|
30692
|
+
height: "12",
|
|
30693
|
+
rx: "2",
|
|
30694
|
+
fill: it.color || legendColor(it, "cyan")
|
|
30695
|
+
}, null, 8, _hoisted_38$1)) : it.shape === "ring" ? (vue.openBlock(), vue.createElementBlock("circle", {
|
|
30696
|
+
key: 13,
|
|
30697
|
+
cx: "16",
|
|
30698
|
+
cy: "10",
|
|
30699
|
+
r: "6",
|
|
30700
|
+
fill: "none",
|
|
30701
|
+
stroke: it.color || legendColor(it, "cyan"),
|
|
30702
|
+
"stroke-width": "2.4"
|
|
30703
|
+
}, null, 8, _hoisted_39)) : it.shape === "triangle" ? (vue.openBlock(), vue.createElementBlock("polygon", {
|
|
30704
|
+
key: 14,
|
|
30705
|
+
points: "10,16 22,16 16,4",
|
|
30706
|
+
fill: it.color || legendColor(it, "red")
|
|
30707
|
+
}, null, 8, _hoisted_40)) : it.shape === "hline" ? (vue.openBlock(), vue.createElementBlock("line", {
|
|
30708
|
+
key: 15,
|
|
30709
|
+
x1: "3",
|
|
30710
|
+
y1: "10",
|
|
30711
|
+
x2: "29",
|
|
30712
|
+
y2: "10",
|
|
30713
|
+
stroke: it.color || legendColor(it, "cyan"),
|
|
30714
|
+
"stroke-width": "2.4",
|
|
30715
|
+
"stroke-linecap": "round"
|
|
30716
|
+
}, null, 8, _hoisted_41)) : it.shape === "text" ? (vue.openBlock(), vue.createElementBlock("text", {
|
|
30717
|
+
key: 16,
|
|
30718
|
+
x: "16",
|
|
30719
|
+
y: "14",
|
|
30720
|
+
"text-anchor": "middle",
|
|
30721
|
+
"font-size": "11",
|
|
30722
|
+
"font-weight": "700",
|
|
30723
|
+
fill: it.color || legendColor(it, "white")
|
|
30724
|
+
}, vue.toDisplayString(it.text || "JX"), 9, _hoisted_42)) : (vue.openBlock(), vue.createElementBlock("circle", {
|
|
30725
|
+
key: 17,
|
|
30726
|
+
cx: "16",
|
|
30727
|
+
cy: "10",
|
|
30728
|
+
r: "5",
|
|
30729
|
+
fill: it.color || legendColor(it, "cyan")
|
|
30730
|
+
}, null, 8, _hoisted_43))
|
|
30731
|
+
])),
|
|
30732
|
+
vue.createElementVNode("span", _hoisted_44, vue.toDisplayString(it.label), 1)
|
|
30733
|
+
]);
|
|
30734
|
+
}), 128))
|
|
30735
|
+
], 512), [
|
|
30736
|
+
[vue.vShow, !legendCollapsed.value]
|
|
30737
|
+
])
|
|
30738
|
+
])) : vue.createCommentVNode("", true),
|
|
30739
|
+
loading.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_45, "正在解析台区拓扑…")) : error.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_46, vue.toDisplayString(error.value), 1)) : vue.createCommentVNode("", true)
|
|
30315
30740
|
], 8, _hoisted_1$2);
|
|
30316
30741
|
};
|
|
30317
30742
|
}
|
|
30318
30743
|
};
|
|
30319
|
-
const TopoGraph = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
30744
|
+
const TopoGraph = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-0736fa17"]]);
|
|
30320
30745
|
const _hoisted_1$1 = ["data-theme"];
|
|
30321
30746
|
const _hoisted_2$1 = { class: "panel-head" };
|
|
30322
30747
|
const _hoisted_3$1 = {
|
|
@@ -30689,7 +31114,7 @@ const _sfc_main = {
|
|
|
30689
31114
|
}
|
|
30690
31115
|
};
|
|
30691
31116
|
const DistanceTop10 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-438b6017"]]);
|
|
30692
|
-
const VERSION = "0.1.
|
|
31117
|
+
const VERSION = "0.1.11";
|
|
30693
31118
|
const DESCRIPTION = "配电台区单线图拓扑成图引擎";
|
|
30694
31119
|
exports.DESCRIPTION = DESCRIPTION;
|
|
30695
31120
|
exports.DistanceTop10 = DistanceTop10;
|