添加防抖
This commit is contained in:
@@ -76,7 +76,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
start_agv() {
|
start_agv() {
|
||||||
debounce(() => {
|
uni.$u.throttle(()=>{
|
||||||
if (this.start_point == '' || this.end_point == '') {
|
if (this.start_point == '' || this.end_point == '') {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
@@ -106,28 +106,31 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 5000)
|
||||||
},
|
},
|
||||||
stop_agv() {
|
stop_agv() {
|
||||||
if (this.reqCode == '') {
|
uni.$u.throttle(()=>{
|
||||||
this.$refs.uToast.show({
|
if (this.reqCode == '') {
|
||||||
type: 'error',
|
|
||||||
message: '无任务编号'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const query = {
|
|
||||||
reqCode: this.reqCode
|
|
||||||
};
|
|
||||||
|
|
||||||
emergency_stop_agv(query).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
type: 'success',
|
type: 'error',
|
||||||
message: '成功取消' + res.data
|
message: '无任务编号'
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
const query = {
|
||||||
|
reqCode: this.reqCode
|
||||||
|
};
|
||||||
|
|
||||||
|
emergency_stop_agv(query).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
type: 'success',
|
||||||
|
message: '成功取消' + res.data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},5000)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user