-
This commit is contained in:
@@ -33,8 +33,8 @@ createApp({
|
||||
frontPhotoEnabled: true,
|
||||
backPhotoEnabled: true,
|
||||
// 速度控制
|
||||
agvSpeed: 0.5,
|
||||
armSpeed: 500,
|
||||
agvSpeed: 1.0,
|
||||
armSpeed: 1000,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -63,10 +63,10 @@ createApp({
|
||||
try {
|
||||
const res = await fetch(API + '/api/status')
|
||||
const data = await res.json()
|
||||
if (!this.armCameraOpened) {
|
||||
this.armPreviewUrl = ''
|
||||
} else if (!this.armPreviewUrl) {
|
||||
this.armPreviewUrl = API + '/api/camera/arm_preview'
|
||||
const opened = data.arm_camera_opened
|
||||
if (opened !== this.armCameraOpened || (opened && !this.armPreviewUrl)) {
|
||||
this.armCameraOpened = opened
|
||||
this.armPreviewUrl = opened ? API + '/api/camera/arm_preview' : ''
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
@@ -94,6 +94,9 @@ createApp({
|
||||
if (data.point_status) this.pointStatus = data.point_status
|
||||
if (data.machine_status) this.machineStatus = data.machine_status
|
||||
this.armCameraOpened = data.arm_camera_opened
|
||||
if (this.armCameraOpened && !this.armPreviewUrl) {
|
||||
this.armPreviewUrl = API + '/api/camera/arm_preview'
|
||||
}
|
||||
|
||||
// 错误弹窗
|
||||
if (data.waiting_error) {
|
||||
@@ -260,7 +263,12 @@ createApp({
|
||||
e.target.style.display = 'none'
|
||||
},
|
||||
onArmPreviewError(e) {
|
||||
e.target.style.display = 'none'
|
||||
// 重新加载:加时间戳避免缓存
|
||||
const url = this.armPreviewUrl
|
||||
if (url) {
|
||||
const sep = url.includes('?') ? '&' : '?'
|
||||
this.armPreviewUrl = url + sep + '_t=' + Date.now()
|
||||
}
|
||||
},
|
||||
// ===== 网格任务显示方法 =====
|
||||
getPointStatus(pr, c) {
|
||||
|
||||
@@ -45,7 +45,7 @@ createApp({
|
||||
agvConnected: false,
|
||||
agvBattery: null,
|
||||
agvPosition: null,
|
||||
agvSpeed: 0.5,
|
||||
agvSpeed: 1.0,
|
||||
agvMoveInterval: null,
|
||||
agvCameraUrl: API + '/api/camera/refresh',
|
||||
agvCameraTimer: null,
|
||||
|
||||
Reference in New Issue
Block a user