add关闭点云和小车位置
This commit is contained in:
@@ -4,8 +4,14 @@
|
||||
<gl-map ref="glMap"/>
|
||||
</div>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="10"><button id="v-step-2" class="button_control" :disabled="disabled" @click="addPoint"><p>{{$t('MarkPoint')}}</p></button></el-col>
|
||||
<el-col :span="14">
|
||||
<el-col :span="16">
|
||||
<el-row type="flex">
|
||||
<button id="v-step-2" class="button_control" :disabled="disabled" @click="addPoint"><p>{{$t('MarkPoint')}}</p></button>
|
||||
<button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="closeCloud"><p>{{cloudOff ? $t('EnablePointCloud') : $t('DisablePointCloud')}}</p></button>
|
||||
<div class="car-info">{{$t('CartPosition')}}: <span>{{ carPosition.x }}, {{carPosition.y}}</span></div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-row type="flex" justify="end">
|
||||
<button class="button_control" @click="$router.push('/index/home')"><p>{{$t('AbandonMapbuild')}}</p></button>
|
||||
<button id="v-step-3" class="button_control" style="margin-left: 10px" :disabled="disabled" @click="stopMappingConfirm"><p>{{$t('FinishMapbuild')}}</p></button>
|
||||
@@ -108,6 +114,7 @@ export default {
|
||||
}
|
||||
}
|
||||
return {
|
||||
cloudOff: false,
|
||||
driver: null,
|
||||
driverActive: true,
|
||||
needsConfirmation: true,
|
||||
@@ -134,7 +141,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isTop'])
|
||||
...mapGetters(['isTop', 'carPosition'])
|
||||
},
|
||||
beforeDestroy () {
|
||||
document.removeEventListener('keydown', this.handleKeydown);
|
||||
@@ -424,6 +431,18 @@ export default {
|
||||
this.disabled = false
|
||||
this.loading.close()
|
||||
}
|
||||
},
|
||||
closeCloud () {
|
||||
this.cloudOff = !this.cloudOff
|
||||
if (this.cloudOff) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.glMap.closeWebSocket()
|
||||
})
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.glMap.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -483,9 +502,21 @@ export default {
|
||||
color: #000
|
||||
font-weight: 700
|
||||
}
|
||||
.car-info
|
||||
max-width calc(100% - 3rem)
|
||||
background: rgba(30, 95, 239, 60%);
|
||||
padding: 0 10px;
|
||||
border-radius: 8px;
|
||||
margin-left: 10px;
|
||||
font-size: 0.2rem;
|
||||
line-height: 0.36rem;
|
||||
color: #fff
|
||||
overflow: hidden
|
||||
.enClass
|
||||
.button_control
|
||||
p
|
||||
font-size .18rem
|
||||
line-height .16rem
|
||||
.car-info
|
||||
font-size .16rem
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user