|
@@ -14,6 +14,7 @@ import { EditScence } from "./mapClass/EditScence";
|
|
|
import bus from "@/bus";
|
|
|
import { saveGroup, readGroup } from "@/api/editer.js";
|
|
|
import { STopologyParser } from "./../lib/parsers/STopologyParser";
|
|
|
+import { uuid } from "@/components/mapClass/until"
|
|
|
export default {
|
|
|
props: {
|
|
|
cmdType: {
|
|
@@ -56,7 +57,7 @@ export default {
|
|
|
this.scene = new EditScence();
|
|
|
this.fmap = new SFengParser(
|
|
|
"fengMap",
|
|
|
- this.mapServerURL+'/1001724_29',
|
|
|
+ this.mapServerURL + '/1001724_29',
|
|
|
this.key,
|
|
|
this.appName,
|
|
|
null
|
|
@@ -176,10 +177,30 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
bus.$on("exportByKey", val => {
|
|
|
- this.fParser.spaceList.forEach(t => {
|
|
|
+ const list = this.fParser.spaceList.map(t => {
|
|
|
if (t.data.Type == val.key) {
|
|
|
- t.selected = true;
|
|
|
+ return {
|
|
|
+ ID: uuid(),
|
|
|
+ Name: t.name,
|
|
|
+ GraphElementType: 'Zone',
|
|
|
+ GraphElementId: "273d633cc5c54a4882794b34843d1a00",
|
|
|
+ AttachObjectIds:[],
|
|
|
+ Pos: { x: t.x, y: t.y },
|
|
|
+ OutLine: t.pointArr,
|
|
|
+ Properties: {
|
|
|
+ strokeColor: '#3d73c0',
|
|
|
+ fillColor: '#eda986'
|
|
|
+ },
|
|
|
+ Num: 123
|
|
|
+ };
|
|
|
}
|
|
|
+ }).filter(item => item);
|
|
|
+ console.log(list)
|
|
|
+ const parserData = new STopologyParser(null);
|
|
|
+ parserData.parseData({ Nodes: list });
|
|
|
+ parserData.zoneLegendList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Nodes.push(t)
|
|
|
});
|
|
|
});
|
|
|
// 设备图例样式对象
|