|
|
|
@ -113,7 +113,7 @@ function zmqTaskCb(msg: SubMsgData) { |
|
|
|
console.log('rootPage', msg) |
|
|
|
console.log('rootPage', msg) |
|
|
|
const { feedback } = msg |
|
|
|
const { feedback } = msg |
|
|
|
const taskId = feedback[0] |
|
|
|
const taskId = feedback[0] |
|
|
|
const deviceSN = feedback[1] |
|
|
|
const id = feedback[1] |
|
|
|
const deviceStatus = feedback[2] || '未知状态' |
|
|
|
const deviceStatus = feedback[2] || '未知状态' |
|
|
|
const finish = feedback[3] || 0 |
|
|
|
const finish = feedback[3] || 0 |
|
|
|
const total = feedback[4] || 0 |
|
|
|
const total = feedback[4] || 0 |
|
|
|
@ -122,8 +122,8 @@ function zmqTaskCb(msg: SubMsgData) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const deviceList = findTask.snList.split(',') |
|
|
|
const deviceList = findTask.snList.split(',') |
|
|
|
const lastDevice = deviceList[deviceList.length - 1] |
|
|
|
const lastDevice = deviceList[deviceList.length - 1] |
|
|
|
console.log(taskId, deviceSN, lastDevice, deviceStatus, finish, total) |
|
|
|
console.log(taskId, id, lastDevice, deviceStatus, finish, total) |
|
|
|
onTaskFinish(taskId, deviceSN === lastDevice && ((total - finish) === 0) ? 3 : 1) |
|
|
|
onTaskFinish(taskId, id === lastDevice && ((total - finish) === 0) ? 3 : 1) |
|
|
|
} catch (error) { |
|
|
|
} catch (error) { |
|
|
|
console.error(error) |
|
|
|
console.error(error) |
|
|
|
} |
|
|
|
} |
|
|
|
|