|
@@ -76,6 +76,18 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
id: "tree1_sub1_item7",
|
|
|
+ shape: "grounding-capacitance-transverse",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub1_item8",
|
|
|
+ shape: "voltage3-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub1_item9",
|
|
|
shape: "arrow-vertical",
|
|
|
direction: "left",
|
|
|
height: 65,
|
|
@@ -130,6 +142,42 @@ export default {
|
|
|
label: "101-0",
|
|
|
direction: "left",
|
|
|
},
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item8",
|
|
|
+ shape: "three-phase-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item9",
|
|
|
+ shape: "earthing-disconnector-transverse-y-break",
|
|
|
+ label: "301-0",
|
|
|
+ direction: "right",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item10",
|
|
|
+ shape: "main-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item11",
|
|
|
+ shape: "main-transformer1",
|
|
|
+ label: "011-0",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item12",
|
|
|
+ shape: "main-transformer2",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub2_item13",
|
|
|
+ shape: "main-transformer3",
|
|
|
+ label: "301",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
@@ -143,6 +191,30 @@ export default {
|
|
|
label: "11-9",
|
|
|
direction: "left",
|
|
|
},
|
|
|
+ {
|
|
|
+ id: "tree1_sub3_item2",
|
|
|
+ shape: "grounding-capacitance-transverse",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub3_item3",
|
|
|
+ shape: "earthing-disconnector-transverse2-break",
|
|
|
+ label: "11-09",
|
|
|
+ direction: "right",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub3_item4",
|
|
|
+ shape: "voltage5-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub3_item5",
|
|
|
+ shape: "grounding-resistance-vertical",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
@@ -153,7 +225,7 @@ export default {
|
|
|
{
|
|
|
id: "tree1_sub4_item1",
|
|
|
shape: "earthing-disconnector-transverse-break",
|
|
|
- label: "11-0",
|
|
|
+ label: "12-0",
|
|
|
direction: "right",
|
|
|
},
|
|
|
{
|
|
@@ -177,7 +249,7 @@ export default {
|
|
|
{
|
|
|
id: "tree1_sub4_item5",
|
|
|
shape: "earthing-disconnector-transverse-break",
|
|
|
- label: "102-03",
|
|
|
+ label: "102-3",
|
|
|
direction: "right",
|
|
|
},
|
|
|
{
|
|
@@ -192,6 +264,42 @@ export default {
|
|
|
label: "102-0",
|
|
|
direction: "left",
|
|
|
},
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item8",
|
|
|
+ shape: "three-phase-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item9",
|
|
|
+ shape: "earthing-disconnector-transverse-yo-break",
|
|
|
+ label: "301-0",
|
|
|
+ direction: "right",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item10",
|
|
|
+ shape: "main-transformer",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item11",
|
|
|
+ shape: "main-transformer1",
|
|
|
+ label: "012-0",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item12",
|
|
|
+ shape: "main-transformer2",
|
|
|
+ label: "",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: "tree1_sub4_item13",
|
|
|
+ shape: "main-transformer3",
|
|
|
+ label: "302",
|
|
|
+ direction: "left",
|
|
|
+ },
|
|
|
],
|
|
|
},
|
|
|
],
|
|
@@ -416,7 +524,7 @@ export default {
|
|
|
shape: "line-vertical",
|
|
|
label: "",
|
|
|
direction: "left",
|
|
|
- height: 177,
|
|
|
+ height: 112,
|
|
|
fill: "#cbaa07",
|
|
|
},
|
|
|
],
|
|
@@ -659,7 +767,7 @@ export default {
|
|
|
shape: "line-vertical",
|
|
|
label: "",
|
|
|
direction: "left",
|
|
|
- height: 177,
|
|
|
+ height: 127,
|
|
|
fill: "#cbaa07",
|
|
|
},
|
|
|
],
|
|
@@ -667,6 +775,435 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
+ data: [{
|
|
|
+ id: "111-01",
|
|
|
+ x: 818,
|
|
|
+ y: 227,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "111-03",
|
|
|
+ x: 818,
|
|
|
+ y: 182,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "111-0",
|
|
|
+ x: 918,
|
|
|
+ y: 137,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "111-3",
|
|
|
+ x: 867,
|
|
|
+ y: 175,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "111",
|
|
|
+ x: 867,
|
|
|
+ y: 220,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "111-1",
|
|
|
+ x: 867,
|
|
|
+ y: 265,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "11-0",
|
|
|
+ x: 830,
|
|
|
+ y: 287,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "101-01",
|
|
|
+ x: 730,
|
|
|
+ y: 332,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "101-0",
|
|
|
+ x: 730,
|
|
|
+ y: 422,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "101-03",
|
|
|
+ x: 830,
|
|
|
+ y: 377,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "301-0",
|
|
|
+ x: 830,
|
|
|
+ y: 487,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "011-0",
|
|
|
+ x: 702,
|
|
|
+ y: 497,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "101-1",
|
|
|
+ x: 778,
|
|
|
+ y: 323,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "101",
|
|
|
+ x: 778,
|
|
|
+ y: 368,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "101-3",
|
|
|
+ x: 778,
|
|
|
+ y: 413,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "12-0",
|
|
|
+ x: 1452, // 830
|
|
|
+ y: 287,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "102-01",
|
|
|
+ x: 1352,
|
|
|
+ y: 332,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "102-0",
|
|
|
+ x: 1352,
|
|
|
+ y: 422,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "right"
|
|
|
+ },{
|
|
|
+ id: "102-03",
|
|
|
+ x: 1452,
|
|
|
+ y: 377,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "012-0",
|
|
|
+ x: 1323,
|
|
|
+ y: 497,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "102-1",
|
|
|
+ x: 1399,
|
|
|
+ y: 323,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "102",
|
|
|
+ x: 1399,
|
|
|
+ y: 368,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "102-3",
|
|
|
+ x: 1399,
|
|
|
+ y: 413,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "11-9",
|
|
|
+ x: 1013,
|
|
|
+ y: 310,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "11-09",
|
|
|
+ x: 1063,
|
|
|
+ y: 318,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "301",
|
|
|
+ x: 753,
|
|
|
+ y: 447,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "302",
|
|
|
+ x: 1374,
|
|
|
+ y: 447,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "318",
|
|
|
+ x: 274,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "317",
|
|
|
+ x: 411,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "316",
|
|
|
+ x: 503,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "315",
|
|
|
+ x: 601,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "314",
|
|
|
+ x: 685,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "31-9",
|
|
|
+ x: 778,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "313",
|
|
|
+ x: 874,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "312",
|
|
|
+ x: 966,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "311",
|
|
|
+ x: 1060,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "323",
|
|
|
+ x: 1193,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "322",
|
|
|
+ x: 1282,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "321",
|
|
|
+ x: 1444,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 0,
|
|
|
+ state2: 1,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "32-9",
|
|
|
+ x: 1544,
|
|
|
+ y: 610,
|
|
|
+ type: "handcart",
|
|
|
+ state1: 1,
|
|
|
+ state2: 0,
|
|
|
+ direction: "left"
|
|
|
+ },{
|
|
|
+ id: "318-0",
|
|
|
+ x: 255,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "317-0",
|
|
|
+ x: 392,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "316-0",
|
|
|
+ x: 484,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "315-0",
|
|
|
+ x: 582,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "314-0",
|
|
|
+ x: 666,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "313-0",
|
|
|
+ x: 855,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "312-0",
|
|
|
+ x: 947,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "311-0",
|
|
|
+ x: 1041,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "323-0",
|
|
|
+ x: 1174,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "322-0",
|
|
|
+ x: 1263,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "321-0",
|
|
|
+ x: 1425,
|
|
|
+ y: 720,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "2C-0",
|
|
|
+ x: 484,
|
|
|
+ y: 860,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "1C-0",
|
|
|
+ x: 582,
|
|
|
+ y: 860,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "316-3",
|
|
|
+ x: 503,
|
|
|
+ y: 728,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "315-3",
|
|
|
+ x: 601,
|
|
|
+ y: 728,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "314-3",
|
|
|
+ x: 685,
|
|
|
+ y: 728,
|
|
|
+ type: "switch",
|
|
|
+ state: 1,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "316-03",
|
|
|
+ x: 521,
|
|
|
+ y: 788,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "315-03",
|
|
|
+ x: 619,
|
|
|
+ y: 788,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ },{
|
|
|
+ id: "314-03",
|
|
|
+ x: 703,
|
|
|
+ y: 788,
|
|
|
+ type: "switch",
|
|
|
+ state: 0,
|
|
|
+ direction: "top"
|
|
|
+ }]
|
|
|
};
|
|
|
},
|
|
|
// 函数
|
|
@@ -676,7 +1213,7 @@ export default {
|
|
|
container: this.$el, // 画布的容器
|
|
|
// width: undefined, // 默认使用容器宽度
|
|
|
// height: undefined, // 默认使用容器高度
|
|
|
- autoResize: true, // boolean | Element | Document 是否监听容器大小改变,并自动更新画布大小 默认监听画布容器,也可以指定监听的元素
|
|
|
+ autoResize: true, // boolean | Element | Document 是否监听容器大小改变,并自动更新画布大小 默认监听画布容器,也可以指定监听的元素
|
|
|
mousewheel: {
|
|
|
enabled: true,
|
|
|
modifiers: [],
|
|
@@ -771,6 +1308,27 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+ this.data.forEach(item => {
|
|
|
+ switch (item.type) {
|
|
|
+ case "switch":
|
|
|
+ item.shape = `switch-${item.state == 0 ? 'break' : 'close'}`
|
|
|
+ break;
|
|
|
+ case "handcart":
|
|
|
+ item.shape = `handcart${item.state1}${item.state2}`
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ let shape = `${item.shape}-${item.direction}`;
|
|
|
+ let node = {
|
|
|
+ id: item.id,
|
|
|
+ x: item.x,
|
|
|
+ y: item.y,
|
|
|
+ shape: shape,
|
|
|
+ movable: false,
|
|
|
+ }
|
|
|
+ data.nodes.push(node);
|
|
|
+ })
|
|
|
this.graph.fromJSON(data);
|
|
|
},
|
|
|
initX6: function () {
|