diff --git a/src/config/getData.js b/src/config/getData.js
index f001f71..c0d886e 100644
--- a/src/config/getData.js
+++ b/src/config/getData.js
@@ -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, {})
\ No newline at end of file
+export const getCalibrationByTaskId = (id) => get('calibration/getCalibrationByTaskId?task_id=' + id, {})
+
+//进入示教模式的时候判断有无任务之后 再调用
+export const cancelTaskByAmrId = (id) => post('api/operate/cancelTaskByAmrId?amrId=' + id, {})
\ No newline at end of file
diff --git a/src/config/mork.js b/src/config/mork.js
index 5ad31fb..d929324 100644
--- a/src/config/mork.js
+++ b/src/config/mork.js
@@ -992,4 +992,14 @@ export const getCalibrationByTaskId = () => {
"data": "1"
}
return res
-}
\ No newline at end of file
+}
+
+export const cancelTaskByAmrId = () => {
+ let res = {
+ code: 200,
+ message: 'ok',
+ mapping_return: '1',
+ mapping_percent: '50'
+ }
+ return res
+ }
\ No newline at end of file
diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js
index 86a6603..f026049 100644
--- a/src/i18n/langs/en.js
+++ b/src/i18n/langs/en.js
@@ -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'
}
diff --git a/src/i18n/langs/zh.js b/src/i18n/langs/zh.js
index df309d5..687beed 100644
--- a/src/i18n/langs/zh.js
+++ b/src/i18n/langs/zh.js
@@ -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: '速度'
}
diff --git a/src/images/new/RF8.png b/src/images/new/RF8.png
new file mode 100644
index 0000000..3cccdc6
Binary files /dev/null and b/src/images/new/RF8.png differ
diff --git a/src/images/new/agv.png b/src/images/new/agv.png
index 1cee3f8..b928d50 100644
Binary files a/src/images/new/agv.png and b/src/images/new/agv.png differ
diff --git a/src/images/new/agv_back.png b/src/images/new/agv_back.png
index d5a4cbe..1cee3f8 100644
Binary files a/src/images/new/agv_back.png and b/src/images/new/agv_back.png differ
diff --git a/src/pages/modules/build/index.vue b/src/pages/modules/build/index.vue
index b6e7747..e267a1c 100644
--- a/src/pages/modules/build/index.vue
+++ b/src/pages/modules/build/index.vue
@@ -2,16 +2,34 @@
+
+
{{$t('Vehiclestatus')}}
+
+ {{ $t('XCoordinate') }}
+ {{ carPosition.x }}
+
+
+ {{ $t('YCoordinate') }}
+ {{ carPosition.y }}
+
+
+ {{ $t('AngleValue') }}
+ {{ carPosition.angle }}
+
+
+ {{ $t('speed') }}
+ {{ vehicleSpeed }}
+
+
-
+
-
- {{$t('CartPosition')}}: {{ carPosition.x }}, {{carPosition.y}}
+
-
+
@@ -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;
diff --git a/src/pages/modules/device/index.vue b/src/pages/modules/device/index.vue
index 6a37c8f..1df3874 100644
--- a/src/pages/modules/device/index.vue
+++ b/src/pages/modules/device/index.vue
@@ -52,7 +52,7 @@
-
+
@@ -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
diff --git a/src/pages/modules/home.vue b/src/pages/modules/home.vue
index 8be0867..fe25a8a 100644
--- a/src/pages/modules/home.vue
+++ b/src/pages/modules/home.vue
@@ -1,16 +1,17 @@
-
+
+
@@ -357,4 +391,6 @@ export default {
font-size .2rem
.contorl_title_2
font-size .16rem
+ .agv_button
+ height 1rem
diff --git a/src/pages/shells/index.vue b/src/pages/shells/index.vue
index 44cee5f..3687353 100644
--- a/src/pages/shells/index.vue
+++ b/src/pages/shells/index.vue
@@ -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,
diff --git a/src/pages/shells/websocket-status.vue b/src/pages/shells/websocket-status.vue
index 086b322..6ef8784 100644
--- a/src/pages/shells/websocket-status.vue
+++ b/src/pages/shells/websocket-status.vue
@@ -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;
diff --git a/src/vuex/modules/data.js b/src/vuex/modules/data.js
index a0bcc16..7a6ef73 100644
--- a/src/vuex/modules/data.js
+++ b/src/vuex/modules/data.js
@@ -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
+ }
}
}