AGV-任务执行成功版本
This commit is contained in:
@@ -267,7 +267,7 @@
|
||||
//todo 确认起点
|
||||
confirm_startpoint(point) {
|
||||
this.start_point = point;
|
||||
|
||||
|
||||
},
|
||||
//todo获取车间点
|
||||
get_fab_go_points() {
|
||||
@@ -300,23 +300,35 @@
|
||||
};
|
||||
go_workshop(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.reqCode = res.data.data;
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动成功' + res.data
|
||||
});
|
||||
try {
|
||||
let json = JSON.parse(res.data);
|
||||
this.reqCode = json.data;
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
message: 'agv起动成功' + this.reqCode
|
||||
});
|
||||
} catch (e) {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动失败:' + this.reqCode
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//todo 紧急终止agv
|
||||
stop_agv() {
|
||||
if (this.reqCode == '') {
|
||||
if (this.reqCode === '' || this.reqCode === null || this.reqCode === undefined) {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: '无任务编号'
|
||||
});
|
||||
return;
|
||||
}
|
||||
// const query = {
|
||||
// reqCode: this.reqCode
|
||||
// };
|
||||
|
||||
const query = {
|
||||
reqCode: this.reqCode
|
||||
};
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
<u-text text="起点" size="48"></u-text>
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<uni-data-select v-model="start_point" :localdata="startOptions" placeholder="请选择起点"></uni-data-select>
|
||||
<uni-data-select v-model="start_point" :localdata="startOptions"
|
||||
placeholder="请选择起点"></uni-data-select>
|
||||
</u-col>
|
||||
<u-col span="2">
|
||||
<u-text text="终点" size="48"></u-text>
|
||||
</u-col>
|
||||
<u-col span="4">
|
||||
<uni-data-select v-model="end_point" :localdata="endOptions" placeholder="请选择终点"></uni-data-select>
|
||||
<uni-data-select v-model="end_point" :localdata="endOptions"
|
||||
placeholder="请选择终点"></uni-data-select>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-gap height="20"></u-gap>
|
||||
@@ -42,9 +44,9 @@
|
||||
return {
|
||||
loading: false,
|
||||
start_point: '',
|
||||
startOptions:[],
|
||||
startOptions: [],
|
||||
end_point: '',
|
||||
endOptions:[],
|
||||
endOptions: [],
|
||||
reqCode: ''
|
||||
};
|
||||
},
|
||||
@@ -57,8 +59,8 @@
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
getAllOptions().then(res=>{
|
||||
if(res.code===200){
|
||||
getAllOptions().then(res => {
|
||||
if (res.code === 200) {
|
||||
let _list = [];
|
||||
res.data.forEach(item => {
|
||||
_list.push({
|
||||
@@ -86,11 +88,19 @@
|
||||
};
|
||||
go_workshop(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.reqCode = res.data.data;
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动成功' + res.data
|
||||
});
|
||||
try {
|
||||
let json = JSON.parse(res.data);
|
||||
this.reqCode = json.data;
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
message: 'agv起动成功' + this.reqCode
|
||||
});
|
||||
} catch (e) {
|
||||
this.$refs.uToast.show({
|
||||
type: 'error',
|
||||
message: 'agv起动失败:' + this.reqCode
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -106,7 +116,7 @@
|
||||
reqCode: this.reqCode
|
||||
};
|
||||
|
||||
emergency_stop_agv().then((res) => {
|
||||
emergency_stop_agv(query).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$refs.uToast.show({
|
||||
type: 'success',
|
||||
|
||||
Reference in New Issue
Block a user