bug
This commit is contained in:
@@ -107,12 +107,11 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['agvObj']),
|
...mapGetters(['agvObj']),
|
||||||
carData () {
|
carData () {
|
||||||
try {
|
let res = ''
|
||||||
return JSON.parse(this.agvObj)
|
if (this.agvObj !== '') {
|
||||||
} catch (error) {
|
res = JSON.parse(this.agvObj)
|
||||||
console.error('解析 JSON 时出错:', error)
|
|
||||||
return {}
|
|
||||||
}
|
}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [canvasZoomDrag],
|
mixins: [canvasZoomDrag],
|
||||||
@@ -124,7 +123,7 @@ export default {
|
|||||||
this.carPositionWatcher = this.$watch(
|
this.carPositionWatcher = this.$watch(
|
||||||
() => this.carData,
|
() => this.carData,
|
||||||
(newVal) => {
|
(newVal) => {
|
||||||
if (newVal && newVal.x !== undefined && newVal.y !== undefined) {
|
if (newVal !== '') {
|
||||||
this.redrawCanvas()
|
this.redrawCanvas()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ export default {
|
|||||||
// state: '未知状态', // 车辆状态
|
// state: '未知状态', // 车辆状态
|
||||||
// stateId: 7, // 车辆状态ID
|
// stateId: 7, // 车辆状态ID
|
||||||
// theta: 0.9073792099952698, // 车辆航向角
|
// theta: 0.9073792099952698, // 车辆航向角
|
||||||
// x: -4.030919075012207, // 车辆x坐标
|
// x: 0.004027, // 车辆x坐标
|
||||||
// y: -1.6574244499206543 // 车辆y坐标
|
// y: -0.001812 // 车辆y坐标
|
||||||
// },
|
// },
|
||||||
loginVisible: false,
|
loginVisible: false,
|
||||||
configVisible: false
|
configVisible: false
|
||||||
@@ -141,7 +141,7 @@ export default {
|
|||||||
wsMessage (res) {
|
wsMessage (res) {
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer)
|
||||||
this.topInfo = res.data
|
this.topInfo = res.data
|
||||||
this.$store.dispatch('setAgvObj', this.topInfo)
|
this.$store.dispatch('setAgvObj', JSON.stringify(this.topInfo))
|
||||||
},
|
},
|
||||||
wsErr () {
|
wsErr () {
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as types from '../types'
|
import * as types from '../types'
|
||||||
import { getStore, setStore } from '@config/utils.js'
|
import { getStore, setStore } from '@config/utils.js'
|
||||||
|
|
||||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.50:8011' : 'http://localhost:8011'
|
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.10.62:8011' : 'http://localhost:8011'
|
||||||
const setTime = '5000'
|
const setTime = '5000'
|
||||||
const username = 'user'
|
const username = 'user'
|
||||||
const password = '123456'
|
const password = '123456'
|
||||||
|
|||||||
Reference in New Issue
Block a user