|
@@ -128,6 +128,10 @@ export default {
|
|
this.scene.addItem(imgItem)
|
|
this.scene.addItem(imgItem)
|
|
this.view.scene = this.scene
|
|
this.view.scene = this.scene
|
|
this.view.fitSceneToView()
|
|
this.view.fitSceneToView()
|
|
|
|
+ this.view.minScale = this.view.scale
|
|
|
|
+ if (this.$refs.canvasFun) {
|
|
|
|
+ this.$refs.canvasFun.everyScale = this.view.scale
|
|
|
|
+ }
|
|
this.loading = false
|
|
this.loading = false
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -150,6 +154,10 @@ export default {
|
|
fParser.casementList.forEach(t => this.scene.addItem(t))
|
|
fParser.casementList.forEach(t => this.scene.addItem(t))
|
|
this.view.scene = this.scene
|
|
this.view.scene = this.scene
|
|
this.view.fitSceneToView()
|
|
this.view.fitSceneToView()
|
|
|
|
+ this.view.minScale = this.view.scale
|
|
|
|
+ if (this.$refs.canvasFun) {
|
|
|
|
+ this.$refs.canvasFun.everyScale = this.view.scale
|
|
|
|
+ }
|
|
this.loading = false
|
|
this.loading = false
|
|
//console.log('success')
|
|
//console.log('success')
|
|
})
|
|
})
|
|
@@ -167,8 +175,6 @@ export default {
|
|
},
|
|
},
|
|
listChange(item, ev) {
|
|
listChange(item, ev) {
|
|
let name = ev[0][0].data.Name
|
|
let name = ev[0][0].data.Name
|
|
- console.log(item, ev)
|
|
|
|
-
|
|
|
|
if (name.slice(name.length - 2, name.length) == '机房') {
|
|
if (name.slice(name.length - 2, name.length) == '机房') {
|
|
this.$refs.boxRoom.open({ name: name, type: this.type })
|
|
this.$refs.boxRoom.open({ name: name, type: this.type })
|
|
}
|
|
}
|
|
@@ -196,6 +202,7 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let scale = this.view.scale
|
|
let scale = this.view.scale
|
|
|
|
+ console.log(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
|
|
this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
|
|
this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
|
|
},
|
|
},
|
|
// 读取数据
|
|
// 读取数据
|
|
@@ -214,24 +221,31 @@ export default {
|
|
this.canvasHeight = this.$refs.graphy.offsetHeight - 100
|
|
this.canvasHeight = this.$refs.graphy.offsetHeight - 100
|
|
} else {
|
|
} else {
|
|
this.canvasWidth = this.$refs.graphy.offsetWidth
|
|
this.canvasWidth = this.$refs.graphy.offsetWidth
|
|
- this.canvasHeight = 900 + 'px'
|
|
|
|
|
|
+ this.canvasHeight = 900
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ 'view.scale': {
|
|
|
|
+ handler(n) {
|
|
|
|
+ if (this.$refs.canvasFun) {
|
|
|
|
+ let s = (n * 10) / this.view.minScale
|
|
|
|
+ this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- watch: {},
|
|
|
|
mounted() {
|
|
mounted() {
|
|
this.mapSize()
|
|
this.mapSize()
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.urlMsg = {
|
|
this.urlMsg = {
|
|
- // categoryId: this.$cookie.get('categoryId') || 'LCGN',
|
|
|
|
categoryId: this.$cookie.get('categoryId'),
|
|
categoryId: this.$cookie.get('categoryId'),
|
|
ProjectID: this.plazaId,
|
|
ProjectID: this.plazaId,
|
|
BuildingID: '1',
|
|
BuildingID: '1',
|
|
FloorID: this.$cookie.get('floorMapId') || 'f1',
|
|
FloorID: this.$cookie.get('floorMapId') || 'f1',
|
|
fmapID: this.fmapID
|
|
fmapID: this.fmapID
|
|
}
|
|
}
|
|
- //console.log('this.urlMsg', this.urlMsg)
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|