|
@@ -94,7 +94,7 @@ import { FloorView } from '@/lib/FloorView'
|
|
|
import { FloorScene } from '@/lib/FloorScene'
|
|
|
import RoomBox from '@/views/room/index'
|
|
|
import canvasFun from '@/components/floorMap/canvasFun'
|
|
|
-import { readGroup, queryStatis } from '@/api/public'
|
|
|
+import { readGroup, queryStatis, graphQuery } from '@/api/public'
|
|
|
import { queryShops, queryAssetAll } from '@/api/equipmentList.js'
|
|
|
import { STopologyParser } from '@/lib/parsers/STopologyParser'
|
|
|
import { mapGetters, mapActions } from 'vuex'
|
|
@@ -288,7 +288,17 @@ export default {
|
|
|
if (this.canvasID != `canvas${this.id}`) {
|
|
|
this.canvasID = `canvas${this.id}`
|
|
|
}
|
|
|
- this.parserData(floorid)
|
|
|
+ this.getGraphDetail().then(res => {
|
|
|
+ if (res.Content.length == 1) {
|
|
|
+ const data = res.Content[0];
|
|
|
+ if (data.MaxY && data.MinX) {
|
|
|
+ window.fengmapData.maxY = data.MaxY;
|
|
|
+ window.fengmapData.minX = data.MinX;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.parserData(floorid);
|
|
|
+ });
|
|
|
+ // this.parserData(floorid);
|
|
|
} else if (this.haveFengMap == 0) {
|
|
|
this.view.scene = this.scene
|
|
|
this.readGraph()
|
|
@@ -650,6 +660,14 @@ export default {
|
|
|
}
|
|
|
return readGroup(data)
|
|
|
},
|
|
|
+ // 获取图最大最小值
|
|
|
+ getGraphDetail(){
|
|
|
+ const categoryId = this.categoryId ? this.categoryId : this.$cookie.get('categoryId');
|
|
|
+ const data = {
|
|
|
+ Filters:`categoryId='${categoryId}';projectId='${this.urlMsg.ProjectID}';BuildingID='1';FloorID='${this.floorid}';isPub=true`
|
|
|
+ };
|
|
|
+ return graphQuery(data);
|
|
|
+ },
|
|
|
// 地图尺寸
|
|
|
mapSize() {
|
|
|
this.canvasWidth = this.$refs.graphy.offsetWidth
|