-
This commit is contained in:
@@ -134,19 +134,28 @@ createApp({
|
||||
this.progress = 0
|
||||
this.report = null
|
||||
this.showQrModal = false
|
||||
await fetch(API + '/api/mission/start', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
agv_move: this.agvMoveEnabled,
|
||||
qr_scan: this.qrScanEnabled,
|
||||
front_photo: this.frontPhotoEnabled,
|
||||
back_photo: this.backPhotoEnabled,
|
||||
agv_speed: this.agvSpeed,
|
||||
arm_speed: this.armSpeed,
|
||||
try {
|
||||
const res = await fetch(API + '/api/mission/start', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
agv_move: this.agvMoveEnabled,
|
||||
qr_scan: this.qrScanEnabled,
|
||||
front_photo: this.frontPhotoEnabled,
|
||||
back_photo: this.backPhotoEnabled,
|
||||
agv_speed: this.agvSpeed,
|
||||
arm_speed: this.armSpeed,
|
||||
})
|
||||
})
|
||||
})
|
||||
this.missionState = 'running'
|
||||
const data = await res.json()
|
||||
if (!data.ok) {
|
||||
alert('❌ 启动失败: ' + (data.error || '未知错误'))
|
||||
return
|
||||
}
|
||||
this.missionState = 'running'
|
||||
} catch (e) {
|
||||
alert('❌ 启动请求失败: ' + e.message)
|
||||
}
|
||||
},
|
||||
async startSingleStep() {
|
||||
if (this.missionState !== 'idle') return
|
||||
|
||||
Reference in New Issue
Block a user