AGV 修改,按钮完成时添加询问
This commit is contained in:
@@ -33,7 +33,8 @@
|
||||
size="50" @click="detail_item(item.taskId)"></u-icon></u-col>
|
||||
<u-col span="2"><u-button type="success" text="开始" size="mini"
|
||||
@click="confirm_startpoint(item.agvPosition)"></u-button></u-col>
|
||||
<u-col span="2"><u-button type="error" text="结束" size="mini" @click="final_task(item.taskId)"></u-button></u-col>
|
||||
<u-col span="2"><u-button type="error" text="结束" size="mini"
|
||||
@click="final_task(item.taskId)"></u-button></u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</u-list-item>
|
||||
@@ -343,21 +344,31 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//todo 完成任务
|
||||
final_task(taskid){
|
||||
let query={
|
||||
start_point: this.start_point,
|
||||
end_point: this.end_point,
|
||||
taskId:taskid
|
||||
}
|
||||
FinisBatchingTask(query).then(res=>{
|
||||
if(res.code==200){
|
||||
this.getInitList();
|
||||
|
||||
//todo 完成任务
|
||||
final_task(taskid) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确定完成任务?',
|
||||
showCancel: true,
|
||||
cancelText: '取消',
|
||||
confirmText: '确定',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
let query = {
|
||||
start_point: this.start_point,
|
||||
end_point: this.end_point,
|
||||
taskId: taskid
|
||||
}
|
||||
FinisBatchingTask(query).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.getInitList();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user