多条需求
This commit is contained in:
@@ -72,4 +72,7 @@ export const startCalibrationCamera = (id) => post('calibration/startCalibration
|
||||
// 结束标定顶部相机接口
|
||||
export const endCalibrationCamera = (id, params) => post('calibration/endCalibrationCamera?location=' + id + '¶ms=' + params, {})
|
||||
// 根据task_id查询对应的标定结果
|
||||
export const getCalibrationByTaskId = (id) => get('calibration/getCalibrationByTaskId?task_id=' + id, {})
|
||||
export const getCalibrationByTaskId = (id) => get('calibration/getCalibrationByTaskId?task_id=' + id, {})
|
||||
|
||||
//进入示教模式的时候判断有无任务之后 再调用
|
||||
export const cancelTaskByAmrId = (id) => post('api/operate/cancelTaskByAmrId?amrId=' + id, {})
|
||||
@@ -992,4 +992,14 @@ export const getCalibrationByTaskId = () => {
|
||||
"data": "1"
|
||||
}
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
export const cancelTaskByAmrId = () => {
|
||||
let res = {
|
||||
code: 200,
|
||||
message: 'ok',
|
||||
mapping_return: '1',
|
||||
mapping_percent: '50'
|
||||
}
|
||||
return res
|
||||
}
|
||||
@@ -116,6 +116,7 @@ module.exports = {
|
||||
EnablePointCloud: 'Enable Point Cloud',
|
||||
DisablePointCloud: 'Disable Point Cloud',
|
||||
CartPosition: 'Cart Position',
|
||||
Vehiclestatus: 'Vehicle status',
|
||||
Whetherdrivebackpoint: 'Whether to automatically drive back to the previous point?',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
@@ -162,5 +163,10 @@ module.exports = {
|
||||
service: 'Service',
|
||||
vehicle: ' Vehicle',
|
||||
scheduling: 'Scheduling',
|
||||
taskscurrentlynotcarried: 'There are tasks in progress currently, so mapping cannot be carried out.'
|
||||
taskscurrentlynotcarried: 'There are tasks in progress currently, so mapping cannot be carried out.',
|
||||
batterylevellowsendtasks: 'The current battery level is too low to send tasks.',
|
||||
restartnavigation: 'Restart the navigation software',
|
||||
currtaskongoing: 'There is a task in progress, and mapping cannot be performed.',
|
||||
restartNavigationPrompt: 'Are you sure you want to restart the navigation software?',
|
||||
speed: 'speed'
|
||||
}
|
||||
|
||||
@@ -116,6 +116,7 @@ module.exports = {
|
||||
EnablePointCloud: '开启点云',
|
||||
DisablePointCloud: '关闭点云',
|
||||
CartPosition: '小车位置',
|
||||
Vehiclestatus: '车辆状态',
|
||||
Whetherdrivebackpoint: '是否自动开回上一个点?',
|
||||
yes: '是',
|
||||
no: '否',
|
||||
@@ -162,5 +163,10 @@ module.exports = {
|
||||
service: '服务',
|
||||
vehicle: '车辆',
|
||||
scheduling: '调度',
|
||||
taskscurrentlynotcarried: '当前有任务正在进行,不能建图'
|
||||
taskscurrentlynotcarried: '当前有任务正在进行,不能建图',
|
||||
batterylevellowsendtasks: '当前电量低无法下发任务',
|
||||
restartnavigation: '导航软件重启',
|
||||
currtaskongoing: '当前有任务正在进行,不能建图',
|
||||
restartNavigationPrompt: '是否确定重启导航软件?',
|
||||
speed: '速度'
|
||||
}
|
||||
|
||||
BIN
src/images/new/RF8.png
Normal file
BIN
src/images/new/RF8.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 12 KiB |
@@ -2,16 +2,34 @@
|
||||
<div class="page_container" :class="{'enClass': $i18n.locale === 'en-us'}">
|
||||
<div id="v-step-1" class="map_container">
|
||||
<gl-map ref="glMap" :recordPath="recordPath"/>
|
||||
<div class="vehicle_info">
|
||||
<p class="v_info_p">{{$t('Vehiclestatus')}}</p>
|
||||
<el-row type="flex" justify="space-between" class="v_info_data">
|
||||
<el-col :span="10"><h3>{{ $t('XCoordinate') }}</h3></el-col>
|
||||
<el-col :span="14"><p>{{ carPosition.x }}</p></el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="v_info_data">
|
||||
<el-col :span="10"><h3>{{ $t('YCoordinate') }}</h3></el-col>
|
||||
<el-col :span="14"><p>{{ carPosition.y }}</p></el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="v_info_data">
|
||||
<el-col :span="10"><h3>{{ $t('AngleValue') }}</h3></el-col>
|
||||
<el-col :span="14"><p>{{ carPosition.angle }}</p></el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="v_info_data">
|
||||
<el-col :span="10"><h3>{{ $t('speed') }}</h3></el-col>
|
||||
<el-col :span="14"><p>{{ vehicleSpeed }}</p></el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="18">
|
||||
<el-col :span="12">
|
||||
<el-row type="flex">
|
||||
<button id="v-step-2" class="button_control" :class="{'button_control_gray': autoLoopEnable === '1'}" :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>
|
||||
<!-- <button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="closeCloud"><p>{{cloudOff ? $t('EnablePointCloud') : $t('DisablePointCloud')}}</p></button> -->
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-col :span="12">
|
||||
<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" :class="{'button_control_gray': autoLoopEnable !== '1'}" style="margin-left: 10px" :disabled="disabled" @click="stopMappingConfirm"><p>{{$t('FinishMapbuild')}}</p></button>
|
||||
@@ -158,7 +176,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['isTop', 'carPosition', 'autoLoopEnable', 'autoBackEnable', 'autoBackFinish', 'ready'])
|
||||
...mapGetters(['isTop', 'carPosition', 'autoLoopEnable', 'autoBackEnable', 'autoBackFinish', 'ready', 'vehicleSpeed'])
|
||||
},
|
||||
watch: {
|
||||
autoBackEnable: {
|
||||
@@ -494,7 +512,7 @@ export default {
|
||||
async _teachingRestart () {
|
||||
try {
|
||||
let res = await teachingRestart()
|
||||
console.log(this.retryCount)
|
||||
// console.log(this.retryCount)
|
||||
if (this.retryCount === 2) {
|
||||
this.resShow = false
|
||||
}
|
||||
@@ -632,16 +650,6 @@ 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
|
||||
.button_control
|
||||
p
|
||||
font-size .26rem
|
||||
@@ -652,4 +660,28 @@ export default {
|
||||
line-height .16rem
|
||||
.car-info
|
||||
font-size .16rem
|
||||
.vehicle_info
|
||||
position absolute
|
||||
top 10px
|
||||
right 10px
|
||||
z-index 20
|
||||
min-width 160px
|
||||
border 1px solid rgba(77, 155, 205, 0.6)
|
||||
border-radius 8px
|
||||
padding 6px 12px
|
||||
box-shadow 0 2px 8px rgba(0, 0, 0, 0.3)
|
||||
.v_info_data
|
||||
font-size 12px
|
||||
line-height 13px
|
||||
color #3fc3f7
|
||||
text-align center
|
||||
word-break break-all
|
||||
margin-top 10px
|
||||
.v_info_p
|
||||
font-size 14px
|
||||
font-weight 700
|
||||
color #3fc3f7
|
||||
text-align: center;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.2);
|
||||
padding-bottom: 5px;
|
||||
</style>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="4" style="padding: 0 .1rem;">
|
||||
<el-col :span="4" style="padding-left: .1rem;">
|
||||
<el-row type="flex" justify="center" style="flex-wrap: wrap;height: 100%;align-content: flex-end;">
|
||||
<el-col v-if="activeName === 'rwl'" :span="24" class="button_box"><button class="button_control button_control_s" :class="{'button_control_disabled': !chainId}" :disabled="disabled" @click="_deleteTaskChain"><p>{{$t('Deletetaskchain')}}</p></button></el-col>
|
||||
<el-col v-if="activeName === 'zdy'" :span="24" class="button_box"><button class="button_control" :class="{'button_control_disabled': !newData.length}" @click="newData = []"><p>{{$t('Empty')}}</p></button></el-col>
|
||||
@@ -70,6 +70,7 @@
|
||||
import SaveChain from './save-chain.vue'
|
||||
// import { queryStation, queryTaskChain } from '@/config/mork.js'
|
||||
import { queryStation, queryTaskChain, queryTaskChainDtl, sendTask, saveTask, cancelTask, deleteTaskChain, updateStation } from '@/config/getData.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'ModuleDevice',
|
||||
components: {
|
||||
@@ -93,6 +94,9 @@ export default {
|
||||
saveVisible: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['batteryPower'])
|
||||
},
|
||||
mounted () {
|
||||
this._queryStation()
|
||||
document.addEventListener('click', this.handleGlobalClick)
|
||||
@@ -247,6 +251,11 @@ export default {
|
||||
// 发送任务
|
||||
async _sendTask () {
|
||||
this.disabled = true
|
||||
if (this.batteryPower <= 15) {
|
||||
this.$message.error(this.$t('batterylevellowsendtasks'))
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
if (!this.newData.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<template>
|
||||
<el-row type="flex" class="navs_wraper" justify="start" align="middle">
|
||||
<el-col class="nav_item" v-for="(e, i) in visibleNav" :key="i" :class="'nav_item_' + (i + 1)">
|
||||
<div class="nav_item_i" @click="toPage(e)">
|
||||
<button :disabled="disabled" class="nav_item_i" @click="toPage(e)">
|
||||
<div class="nav_icon"><img :src="require('@/images/new/' + e.icon + '.png')" alt=""></div>
|
||||
<p>{{ e[$langPre.computedProp('title')] }}</p>
|
||||
</div>
|
||||
</button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { cancelTaskByAmrId } from '@/config/getData.js'
|
||||
export default {
|
||||
name: 'MinniHome',
|
||||
data () {
|
||||
@@ -19,7 +20,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['userRole', 'taskSeq']),
|
||||
...mapGetters(['userRole', 'taskSeq', 'vehicleId']),
|
||||
nav () {
|
||||
return [
|
||||
{ title: '操作', zh_title: '操作', en_title: 'Operate', router: '/index/device', icon: 'RF1', isVisible: true },
|
||||
@@ -34,26 +35,48 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async _cancelTaskByAmrId (e) {
|
||||
try {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.6)'
|
||||
})
|
||||
let res = await cancelTaskByAmrId(this.vehicleId)
|
||||
if (res) {
|
||||
this.$confirm(this.$t('Donewmap'), this.$t('Prompt'), {
|
||||
confirmButtonText: this.$t('Confirm'),
|
||||
cancelButtonText: this.$t('Cancel')
|
||||
}).then(() => {
|
||||
this.$router.push(e.router)
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('Mapbuildingcancel')
|
||||
})
|
||||
this.disabled = false
|
||||
})
|
||||
}
|
||||
this.loading.close()
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.$message.error(e)
|
||||
this.loading.close()
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toPage (e) {
|
||||
this.disabled = true
|
||||
if (e.router === '/index/building') {
|
||||
if (this.taskSeq) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '当前有任务正在进行,不能建图'
|
||||
message: this.$t('currtaskongoing')
|
||||
})
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this.$confirm(this.$t('Donewmap'), this.$t('Prompt'), {
|
||||
confirmButtonText: this.$t('Confirm'),
|
||||
cancelButtonText: this.$t('Cancel')
|
||||
}).then(() => {
|
||||
this.$router.push(e.router)
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('Mapbuildingcancel')
|
||||
})
|
||||
})
|
||||
this._cancelTaskByAmrId(e)
|
||||
return
|
||||
}
|
||||
this.$router.push(e.router)
|
||||
@@ -87,8 +110,10 @@ export default {
|
||||
margin-right 2%
|
||||
.nav_item_i
|
||||
_fj(center,,column)
|
||||
width 100%
|
||||
height 100%
|
||||
padding .1rem
|
||||
background-color: transparent;
|
||||
background-image linear-gradient(to bottom,rgba(42, 83, 138, 50%), rgba(57, 101, 181, 50%))
|
||||
border-top: 3px solid #2fb4f2;
|
||||
border-left: 3px solid #40c2f7;
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
<img src="../../images/new/RF6.png" alt="">
|
||||
<p>{{ $t('Synchronizemap') }}</p>
|
||||
</button>
|
||||
<button class="agv_button" @click="teachingRestartConfirm">
|
||||
<img src="../../images/new/RF8.png" alt="">
|
||||
<p>{{ $t('restartnavigation') }}</p>
|
||||
</button>
|
||||
</el-row>
|
||||
<div class="contorl_title">{{$t('Control')}}</div>
|
||||
<el-row type="flex" class="contorl_box">
|
||||
@@ -80,7 +84,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { rebootVehicle, synchronizedMap, backIoStatus, updateReturnStation, queryStation, getReturnStation } from '../../config/getData.js'
|
||||
import { rebootVehicle, synchronizedMap, backIoStatus, updateReturnStation, queryStation, getReturnStation, teachingRestart } from '../../config/getData.js'
|
||||
import { mapGetters, mapActions } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
@@ -162,7 +166,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('shutrestartcancel')
|
||||
message: this.$t('Operationcancelled')
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -197,7 +201,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('Mapbeencancel')
|
||||
message: this.$t('Operationcancelled')
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -274,7 +278,37 @@ export default {
|
||||
this.$message.error(e)
|
||||
this.loading.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
teachingRestartConfirm () {
|
||||
this.$confirm(this.$t('restartNavigationPrompt'), this.$t('Prompt'), {
|
||||
confirmButtonText: this.$t('Confirm'),
|
||||
cancelButtonText: this.$t('Cancel')
|
||||
}).then(() => {
|
||||
this._teachingRestart()
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: this.$t('Operationcancelled')
|
||||
})
|
||||
})
|
||||
},
|
||||
async _teachingRestart () {
|
||||
try {
|
||||
this.loading = this.$loading({
|
||||
lock: true,
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.6)'
|
||||
})
|
||||
let res = await teachingRestart()
|
||||
if (res) {
|
||||
this.$message(res.message)
|
||||
}
|
||||
this.loading.close()
|
||||
} catch (e) {
|
||||
this.$message.error(e)
|
||||
this.loading.close()
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -357,4 +391,6 @@ export default {
|
||||
font-size .2rem
|
||||
.contorl_title_2
|
||||
font-size .16rem
|
||||
.agv_button
|
||||
height 1rem
|
||||
</style>
|
||||
|
||||
@@ -91,6 +91,7 @@ export default {
|
||||
// theta: 0.9073792099952698, // 车辆航向角
|
||||
// x: 10.004027, // 车辆x坐标
|
||||
// y: -10.001812, // 车辆y坐标
|
||||
// VehicleSpeed: 100,
|
||||
// task_seq: '点位1,点位2,work point 3,顶地方的方法顶顶顶点位3',
|
||||
// task_point: '点位2',
|
||||
// task_seq_index: 2,
|
||||
|
||||
@@ -254,13 +254,15 @@ export default {
|
||||
.branches {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .6rem;
|
||||
}
|
||||
.branch-item {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.branch-vehicle {
|
||||
margin-bottom: 0.6rem;
|
||||
}
|
||||
/* 水平线段 */
|
||||
.branch-line-horizontal {
|
||||
position: relative;
|
||||
|
||||
@@ -10,6 +10,9 @@ const state = {
|
||||
autoBackFinish: '',
|
||||
ready: '',
|
||||
taskSeq: '',
|
||||
batteryPower: null,
|
||||
vehicleId: null,
|
||||
vehicleSpeed: null
|
||||
}
|
||||
|
||||
const getters = {
|
||||
@@ -21,7 +24,10 @@ const getters = {
|
||||
autoBackEnable: state => state.autoBackEnable,
|
||||
autoBackFinish: state => state.autoBackFinish,
|
||||
ready: state => state.ready,
|
||||
taskSeq: state => state.taskSeq
|
||||
taskSeq: state => state.taskSeq,
|
||||
batteryPower: state => state.batteryPower,
|
||||
vehicleId: state => state.vehicleId,
|
||||
vehicleSpeed: state => state.vehicleSpeed
|
||||
}
|
||||
|
||||
const actions = {
|
||||
@@ -32,10 +38,12 @@ const actions = {
|
||||
|
||||
const mutations = {
|
||||
[types.SET_AGV_OBJ] (state, data) {
|
||||
state.agvObj = Object.prototype.toString.call(data) === '[object Object]' ? JSON.stringify(data) : ''
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'x') && Object.prototype.hasOwnProperty.call(data, 'y') && Object.prototype.hasOwnProperty.call(data, 'theta')) {
|
||||
state.carPosition = {x: data.x, y: data.y, angle: data.theta}
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'VehicleSpeed')) {
|
||||
state.vehicleSpeed = data.VehicleSpeed
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'exceptionInfo')) {
|
||||
if (Object.prototype.hasOwnProperty.call(data.exceptionInfo, 'exception')) {
|
||||
state.isTop = data.exceptionInfo.exception.length > 0 ? true : false
|
||||
@@ -62,6 +70,12 @@ const mutations = {
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'task_seq')) {
|
||||
state.taskSeq = data.task_seq
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'batteryPower')) {
|
||||
state.batteryPower = data.batteryPower
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(data, 'id')) {
|
||||
state.vehicleId = data.id
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user