|
@@ -52,30 +52,30 @@ export default {
|
|
|
document.getElementById(`canvas`).focus();
|
|
|
this.clearGraphy();
|
|
|
this.scene = new EditScence();
|
|
|
- // this.fmap = new SFengParser(
|
|
|
- // "fengMap",
|
|
|
- // this.mapServerURL,
|
|
|
- // this.key,
|
|
|
- // this.appName,
|
|
|
- // null
|
|
|
- // );
|
|
|
- // this.fmap.parseData("1001724_29", 6, res => {
|
|
|
- // this.fParser = new SFloorParser(null);
|
|
|
- // this.fParser.parseData(res);
|
|
|
- // this.fParser.wallList.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.columnList.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.fitSceneToView();
|
|
|
- // this.$loading.close(loadings)
|
|
|
- // });
|
|
|
+ this.fmap = new SFengParser(
|
|
|
+ "fengMap",
|
|
|
+ this.mapServerURL,
|
|
|
+ this.key,
|
|
|
+ this.appName,
|
|
|
+ null
|
|
|
+ );
|
|
|
+ this.fmap.parseData("1001724_29", 6, res => {
|
|
|
+ this.fParser = new SFloorParser(null);
|
|
|
+ this.fParser.parseData(res);
|
|
|
+ this.fParser.wallList.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.columnList.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.fitSceneToView();
|
|
|
+ // this.$loading.close(loadings)
|
|
|
+ });
|
|
|
this.scene.emitChange = this.emitChange;
|
|
|
},
|
|
|
// 监听变化
|
|
@@ -122,9 +122,33 @@ export default {
|
|
|
bus.$on("changebackColor", val => {
|
|
|
this.scene.updatedbackColor(val);
|
|
|
});
|
|
|
+<<<<<<< HEAD
|
|
|
bus.$on("deleiteItem", () => {
|
|
|
this.scene.deleiteItem();
|
|
|
});
|
|
|
+=======
|
|
|
+ bus.$on("extractItem", () => {
|
|
|
+ const map = {}
|
|
|
+ this.fParser.spaceList.forEach(t => {
|
|
|
+ if (map[t.data.Type]) {
|
|
|
+ map[t.data.Type]++
|
|
|
+ } else {
|
|
|
+ map[t.data.Type] = 1;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const data = [];
|
|
|
+ for (const key in map) {
|
|
|
+ data.push({
|
|
|
+ key: key,
|
|
|
+ name: key,
|
|
|
+ age: '',
|
|
|
+ number: map[key],
|
|
|
+ address: "提取"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ bus.$emit('exportItem',data)
|
|
|
+ })
|
|
|
+>>>>>>> 21575eaae2b540d7cb1e3e4401e1dbc90a7d279a
|
|
|
}
|
|
|
},
|
|
|
watch: {
|