|
@@ -145,8 +145,13 @@ export default {
|
|
|
eqToSpaceTable,
|
|
|
syInSpaceTable
|
|
|
},
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ if (to.query.RoomID && to.query.zone) {
|
|
|
+ next();
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
- if (this.$route.query.RoomID && this.$route.query.zone && !this.$route.query.isMyTab) {
|
|
|
+ if (this.$route.name === "spaceLedger" && this.$route.query.RoomID && this.$route.query.zone) {
|
|
|
this.getData();
|
|
|
this.setFrame();
|
|
|
this.params = this.$route.query;
|
|
@@ -262,8 +267,7 @@ export default {
|
|
|
watch: {
|
|
|
// 监听路由地址,并判断有RoomID和zone,重新请求空间数据
|
|
|
"$route"(to, from) {
|
|
|
- if (this.$route.query.RoomID && this.$route.query.zone) {
|
|
|
- this.getData();
|
|
|
+ if (this.$route.name === "spaceLedger" && this.$route.query.RoomID && this.$route.query.zone) {
|
|
|
window.location.reload();
|
|
|
}
|
|
|
}
|
|
@@ -328,7 +332,7 @@ export default {
|
|
|
position: absolute;
|
|
|
left: 50%;
|
|
|
top: 50%;
|
|
|
- transform: translate(-50%,-50%);
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
width: 100%;
|
|
|
}
|
|
|
}
|
|
@@ -358,7 +362,7 @@ export default {
|
|
|
.unit {
|
|
|
color: rgb(167, 167, 167);
|
|
|
}
|
|
|
-#floorCanvas{
|
|
|
+#floorCanvas {
|
|
|
position: static;
|
|
|
}
|
|
|
</style>
|