|
@@ -1,4 +1,4 @@
|
|
-left_toolbar<template>
|
|
|
|
|
|
+<template>
|
|
<div id="baseEditer">
|
|
<div id="baseEditer">
|
|
<div id="fengMap"></div>
|
|
<div id="fengMap"></div>
|
|
<div class="canvas-container" ref="graphy">
|
|
<div class="canvas-container" ref="graphy">
|
|
@@ -8,19 +8,9 @@ left_toolbar<template>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { SFengParser } from "@saga-web/feng-map";
|
|
import { SFengParser } from "@saga-web/feng-map";
|
|
-import { SPoint } from "@saga-web/draw/lib";
|
|
|
|
-import {
|
|
|
|
- SFloorParser,
|
|
|
|
- SImageItem,
|
|
|
|
- STextItem,
|
|
|
|
- SLineItem,
|
|
|
|
- SPolylineItem
|
|
|
|
-} from "@saga-web/big";
|
|
|
|
-import { SPolygonItem } from "./mapClass/SPolygonItem";
|
|
|
|
|
|
+import { SFloorParser } from "@saga-web/big";
|
|
import { FloorView } from "./../lib/FloorView";
|
|
import { FloorView } from "./../lib/FloorView";
|
|
-import { FloorScene } from "./../lib/FloorScene";
|
|
|
|
import { EditScence } from "./mapClass/EditScence";
|
|
import { EditScence } from "./mapClass/EditScence";
|
|
-import { SRelationState } from "@saga-web/big/lib/enums/SRelationState";
|
|
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
cmd: {
|
|
cmd: {
|
|
@@ -52,7 +42,6 @@ export default {
|
|
init() {
|
|
init() {
|
|
document.getElementById(`canvas`).focus();
|
|
document.getElementById(`canvas`).focus();
|
|
this.clearGraphy();
|
|
this.clearGraphy();
|
|
- // this.scene = new FloorScene();
|
|
|
|
this.scene = new EditScence();
|
|
this.scene = new EditScence();
|
|
// 选择绑定选额item事件
|
|
// 选择绑定选额item事件
|
|
this.scene.selectContainer.connect("listChange", this, this.listChange);
|
|
this.scene.selectContainer.connect("listChange", this, this.listChange);
|
|
@@ -64,20 +53,18 @@ export default {
|
|
null
|
|
null
|
|
);
|
|
);
|
|
this.fmap.parseData("1001724_29", 6, res => {
|
|
this.fmap.parseData("1001724_29", 6, res => {
|
|
- console.log(res);
|
|
|
|
this.fParser = new SFloorParser(null);
|
|
this.fParser = new SFloorParser(null);
|
|
- console.log(this.fParser);
|
|
|
|
this.fParser.parseData(res);
|
|
this.fParser.parseData(res);
|
|
- this.fParser.spaceList.forEach(t => {
|
|
|
|
- t.connect("click", this, this.spaceClick);
|
|
|
|
- t.selectable = true;
|
|
|
|
- this.scene.addItem(t);
|
|
|
|
- });
|
|
|
|
this.fParser.wallList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.wallList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.virtualWallList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.virtualWallList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.doorList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.doorList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.columnList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.columnList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.casementList.forEach(t => this.scene.addItem(t));
|
|
this.fParser.casementList.forEach(t => this.scene.addItem(t));
|
|
|
|
+ this.fParser.spaceList.forEach(t => {
|
|
|
|
+ t.selectable = true
|
|
|
|
+ // t.connect("click", this, this.spaceClick);
|
|
|
|
+ this.scene.addItem(t);
|
|
|
|
+ });
|
|
this.view.scene = this.scene;
|
|
this.view.scene = this.scene;
|
|
this.view.fitSceneToView();
|
|
this.view.fitSceneToView();
|
|
});
|
|
});
|
|
@@ -86,17 +73,6 @@ export default {
|
|
listChange(itemList) {
|
|
listChange(itemList) {
|
|
this.$emit("changeFocusItem", itemList.itemList);
|
|
this.$emit("changeFocusItem", itemList.itemList);
|
|
},
|
|
},
|
|
- // 引入折线
|
|
|
|
- // DirectRelationItem() {
|
|
|
|
- // const data = {
|
|
|
|
- // PointList: [
|
|
|
|
- // { X: -138.71000000089407, Y: -17.5 },
|
|
|
|
- // { X: -130.31000000052154, Y: -17.5 }
|
|
|
|
- // ]
|
|
|
|
- // };
|
|
|
|
- // const directRelationItem = new DirectRelationItem(null, data);
|
|
|
|
- // this.scene.addItem(directRelationItem);
|
|
|
|
- // },
|
|
|
|
clearGraphy() {
|
|
clearGraphy() {
|
|
if (this.view) {
|
|
if (this.view) {
|
|
this.view.scene = null;
|
|
this.view.scene = null;
|
|
@@ -104,25 +80,6 @@ export default {
|
|
}
|
|
}
|
|
this.view = new FloorView("canvas");
|
|
this.view = new FloorView("canvas");
|
|
document.getElementById("canvas").focus();
|
|
document.getElementById("canvas").focus();
|
|
- },
|
|
|
|
- spaceClick(space, event) {
|
|
|
|
- console.log(this.scene.selectContainer);
|
|
|
|
- // const item = new SImageItem(null, {
|
|
|
|
- // Width: 32,
|
|
|
|
- // Height: 32,
|
|
|
|
- // Url: "https://dss2.bdstatic.com/6Ot1bjeh1BF3odCf/it/u=1569891320,3644984535&fm=85&app=52&f=JPEG?w=121&h=75&s=891B0FD8964406EF8091EA200300E056"
|
|
|
|
- // })
|
|
|
|
- // const item = new SImageItem(null);
|
|
|
|
- // item.moveTo(event[0].x, event[0].y)
|
|
|
|
- // item.url = 'https://dss2.bdstatic.com/6Ot1bjeh1BF3odCf/it/u=1569891320,3644984535&fm=85&app=52&f=JPEG?w=121&h=75&s=891B0FD8964406EF8091EA200300E056'
|
|
|
|
- // item.font.size = 12;
|
|
|
|
- // item.zOrder = 999;
|
|
|
|
- // item.connect('mousedown', this, this.iconClick)
|
|
|
|
- // this.scene.addItem(item)
|
|
|
|
- // setInterval(() => { item.text += '魔' }, 1000)
|
|
|
|
- },
|
|
|
|
- iconClick(item, event) {
|
|
|
|
- console.log(2222222222222);
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|