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