|
@@ -12,10 +12,11 @@ import { SFloorParser } from "@saga-web/big";
|
|
|
import { FloorView } from "./../lib/FloorView";
|
|
|
import { EditScence } from "./mapClass/EditScence";
|
|
|
import bus from "@/bus";
|
|
|
-import { saveGroup, readGroup } from "@/api/editer.js";
|
|
|
+import { saveGroup, readGroup, queryTypeGraph } from "@/api/editer.js";
|
|
|
import { STopologyParser } from "./../lib/parsers/STopologyParser";
|
|
|
import { uuid } from "@/components/mapClass/until";
|
|
|
import { SImageItem } from "@saga-web/graph/lib";
|
|
|
+import { SPainter, SColor, SFont, SPoint } from "@saga-web/draw";
|
|
|
import store from "../store";
|
|
|
|
|
|
let fengmap = null;
|
|
@@ -45,7 +46,8 @@ export default {
|
|
|
view: null,
|
|
|
floorList: {},
|
|
|
urlMsg: {},
|
|
|
- chiceItemList: [] //选中itemlist
|
|
|
+ chiceItemList: [], //选中itemlist
|
|
|
+ hasTypeList: [], // 当前类型下包含的typeid(提取)
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -122,7 +124,8 @@ export default {
|
|
|
this.view.fitSceneToView();
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+ // 获取typeid
|
|
|
+ this.getTypeId()
|
|
|
this.scene.emitChange = this.emitChange;
|
|
|
},
|
|
|
parserData(floor) {
|
|
@@ -219,10 +222,12 @@ export default {
|
|
|
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;
|
|
|
+ if (this.hasTypeList.indexOf(t.data.Type) > -1) {
|
|
|
+ if (map[t.data.Type]) {
|
|
|
+ map[t.data.Type]++;
|
|
|
+ } else {
|
|
|
+ map[t.data.Type] = 1;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
const data = [];
|
|
@@ -263,11 +268,15 @@ export default {
|
|
|
AttachObjectIds: [],
|
|
|
Pos: { x: t.x, y: t.y },
|
|
|
OutLine: t.pointArr[0],
|
|
|
+ SubType: '',
|
|
|
Properties: {
|
|
|
strokeColor: "#3d73c0",
|
|
|
- fillColor: "#eda986"
|
|
|
+ fillColor: "#eda986",
|
|
|
+ font: 0,
|
|
|
+ color: '',
|
|
|
+ TextPos: { X: 0, Y: 0 }
|
|
|
},
|
|
|
- Num: 123
|
|
|
+ Num: 1
|
|
|
};
|
|
|
}
|
|
|
})
|
|
@@ -333,6 +342,15 @@ export default {
|
|
|
FloorID: this.urlMsg.FloorID // 楼层id
|
|
|
};
|
|
|
return readGroup(data);
|
|
|
+ },
|
|
|
+ // 获取typeid
|
|
|
+ getTypeId() {
|
|
|
+ const data = {
|
|
|
+ categoryId: this.urlMsg.categoryId
|
|
|
+ };
|
|
|
+ queryTypeGraph(data).then(res => {
|
|
|
+ this.hasTypeList = res.data.map(t => Number(t));
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
watch: {
|