|
@@ -31,31 +31,32 @@ export default {
|
|
|
fParser: null,
|
|
|
loading: true,
|
|
|
view: null,
|
|
|
- isQuerying: false, // 限制重复查询
|
|
|
+ isQuerying: false // 限制重复查询
|
|
|
}
|
|
|
},
|
|
|
components: { RoomBox, canvasFun },
|
|
|
methods: {
|
|
|
init(floorid) {
|
|
|
if (this.isQuerying) {
|
|
|
- console.log("正在查询");
|
|
|
+ console.log('正在查询')
|
|
|
// this.$message.warning('正在查询')
|
|
|
return
|
|
|
}
|
|
|
- this.isQuerying = true;
|
|
|
+ this.isQuerying = true
|
|
|
this.clearGraphy()
|
|
|
this.scene = new FloorScene()
|
|
|
this.scene.selectContainer.connect('listChange', this, this.listChange)
|
|
|
this.fmap = new SFengParser('fengMap', `${this.mapServerURL}/${this.fmapID}`, this.key, this.appName, null)
|
|
|
- if (isNaN(Number(floorid))) {
|
|
|
- console.log('楼层id错误')
|
|
|
- // this.$message.warning("楼层id错误");
|
|
|
- floorid = 1;
|
|
|
- }
|
|
|
- this.fmap.parseData(this.fmapID, Number(floorid), res => {
|
|
|
+ // if (isNaN(Number(floorid))) {
|
|
|
+ // console.log('楼层id错误')
|
|
|
+ // // this.$message.warning("楼层id错误");
|
|
|
+ // floorid = 1
|
|
|
+ // }
|
|
|
+ console.log(floorid)
|
|
|
+ this.fmap.parseData(this.fmapID, 'f1', res => {
|
|
|
if (res.err) {
|
|
|
- console.log(res.err);
|
|
|
- return;
|
|
|
+ console.log(res.err)
|
|
|
+ return
|
|
|
}
|
|
|
this.fParser = new SFloorParser(null)
|
|
|
this.fParser.parseData(res)
|
|
@@ -71,7 +72,7 @@ export default {
|
|
|
this.view.scene = this.scene
|
|
|
this.view.fitSceneToView()
|
|
|
this.loading = false
|
|
|
- this.isQuerying = false;
|
|
|
+ this.isQuerying = false
|
|
|
console.log('success')
|
|
|
})
|
|
|
},
|