<template>
|
<view style="padding: 5%;">
|
<!-- <uni-forms ref="formData" :modelValue="formData" label-width="120"> -->
|
<uni-forms label-width="120">
|
<uni-forms-item label="起点">
|
<uni-easyinput type="text" :focus="true" v-model="startpoint" placeholder="请输入起点地址" ref='midInput' />
|
</uni-forms-item>
|
<uni-forms-item label="终点">
|
<uni-easyinput type="text" v-model="endpoint" placeholder="请输入终点地址" ref='midInput' />
|
</uni-forms-item>
|
</uni-forms>
|
|
<button @click="submit" type="primary" size="default" style="margin-top: 2%;">发送任务</button>
|
<u-toast ref="uToast" />
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
istrue: false,
|
startpoint: '',
|
endpoint: ""
|
}
|
},
|
onLoad(res) {
|
// // this.formData.status=res.status
|
// this.formData.outID = res.outID
|
},
|
methods: {
|
submit() {
|
if(this.startpoint.length == 0){
|
this.$refs.uToast.show({
|
title: "请输入起点",
|
type: "error"
|
})
|
return;
|
}
|
if(this.endpoint.length == 0){
|
this.$refs.uToast.show({
|
title: "请输入终点",
|
type: "error"
|
})
|
return;
|
}
|
var postData = {
|
MainData: {
|
"startPoint": this.startpoint,
|
"endPoint": this.endpoint
|
}
|
}
|
this.$u.post('/api/Dt_agvtask/AcrossFloorTask', postData).then(res => {
|
if (res.status) {
|
uni.$showMsg("任务发送成功");
|
this.startpoint = "";
|
this.endpoint = "";
|
} else {
|
this.$refs.uToast.show({
|
title: res.message,
|
type: "error"
|
})
|
}
|
}).catch(err => {
|
this.$refs.uToast.show({
|
title: err.message,
|
type: "error"
|
})
|
})
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
@import '@/common/uni-ui.scss';
|
|
page {
|
display: flex;
|
flex-direction: column;
|
box-sizing: border-box;
|
background-color: #efeff4;
|
min-height: 100%;
|
height: auto;
|
}
|
|
.tips {
|
color: #67c23a;
|
font-size: 14px;
|
line-height: 40px;
|
text-align: center;
|
background-color: #f0f9eb;
|
height: 0;
|
opacity: 0;
|
transform: translateY(-100%);
|
transition: all 0.3s;
|
}
|
|
.tips-ani {
|
transform: translateY(0);
|
height: 40px;
|
opacity: 1;
|
}
|
|
.content {
|
width: 100%;
|
display: flex;
|
}
|
|
.list-picture {
|
width: 100%;
|
height: 145px;
|
}
|
|
.thumb-image {
|
width: 100%;
|
height: 100%;
|
}
|
|
.ellipsis {
|
display: flex;
|
overflow: hidden;
|
}
|
|
.uni-ellipsis-1 {
|
overflow: hidden;
|
white-space: nowrap;
|
text-overflow: ellipsis;
|
}
|
|
.uni-ellipsis-2 {
|
overflow: hidden;
|
text-overflow: ellipsis;
|
display: -webkit-box;
|
-webkit-line-clamp: 2;
|
-webkit-box-orient: vertical;
|
}
|
</style>
|