【类 型】:fix
【主 题】:起飞高度滑动条调整 ; 任务执行 标签名称修改 【描 述】: [原因]:太短不方便操作 [过程]:加长 ;任务订单 改为 已接订单 [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
b9fb6c0060
commit
c88248308e
@ -4,15 +4,12 @@
|
|||||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
|
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
|
||||||
<!-- 起飞设置弹出框 -->
|
<!-- 起飞设置弹出框 -->
|
||||||
<template v-if="dialogItem == 'takeoffBox'">
|
<template v-if="dialogItem == 'takeoffBox'">
|
||||||
<div class="slider-container">
|
<el-slider class="w-100" v-model="takeoffValue" :show-tooltip="false" show-input :min="1" :max="100">
|
||||||
<span class="m-l-10 m-r-10">高度(米)</span>
|
</el-slider>
|
||||||
<el-slider class="w-70" v-model="takeoffValue" show-input>
|
|
||||||
</el-slider>
|
|
||||||
</div>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
||||||
<el-button size="medium" type="primary"
|
<el-button size="medium" type="primary"
|
||||||
@click="publishFun(`{setPlaneState:{bit:6,state:1,count:1,param:[${takeoffValue}]}`)">确认起飞</el-button>
|
@click="publishFun(`{setPlaneState:{bit:6,state:1,count:1,param:[${takeoffValue}]}`); speakText('确认起飞')">确认起飞</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- 摄像头弹出框 -->
|
<!-- 摄像头弹出框 -->
|
||||||
@ -59,7 +56,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<el-form label-position="left" ref="questForm" :model="questForm" label-width="80px">
|
<el-form label-position="left" ref="questForm" :model="questForm" label-width="80px">
|
||||||
<el-form-item label="订单任务">
|
<el-form-item label="已接订单">
|
||||||
<el-select v-model="questForm.id" :filterable="isMobile" placeholder="请选择,也可输入搜索" :disabled="airLock">
|
<el-select v-model="questForm.id" :filterable="isMobile" placeholder="请选择,也可输入搜索" :disabled="airLock">
|
||||||
<el-option v-for="item in questList" :key="item.id" :label="item.id" :value="item.id"
|
<el-option v-for="item in questList" :key="item.id" :label="item.id" :value="item.id"
|
||||||
:class="Number(item.total_weight) >= Number(plane.weight_max) ? 'danger-color' : ''">
|
:class="Number(item.total_weight) >= Number(plane.weight_max) ? 'danger-color' : ''">
|
||||||
@ -99,7 +96,7 @@
|
|||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt"
|
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt"
|
||||||
@click="reQuest">
|
@click="reQuest">
|
||||||
<font class="m-l-5">取消任务</font>
|
<font class="m-l-5">未送达</font>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" class="f-s-14" type="success" icon="iconfont icon-qiandai" key="bingBut"
|
<el-button size="mini" class="f-s-14" type="success" icon="iconfont icon-qiandai" key="bingBut"
|
||||||
@click="overQuest">
|
@click="overQuest">
|
||||||
@ -128,7 +125,7 @@
|
|||||||
<div class="m-t-5">加锁</div>
|
<div class="m-t-5">加锁</div>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="medium" type="primary" class="butIcon border"
|
<el-button size="medium" type="primary" class="butIcon border"
|
||||||
@click="dialogVisible = true; dialogTitle = '起飞参数设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
@click="dialogVisible = true; dialogTitle = '起飞高度(米)设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
||||||
<i class="iconfont icon-yangshi_icon_tongyong_departure f-s-24"></i>
|
<i class="iconfont icon-yangshi_icon_tongyong_departure f-s-24"></i>
|
||||||
<div class="m-t-5">起飞</div>
|
<div class="m-t-5">起飞</div>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -301,17 +298,17 @@ export default {
|
|||||||
return plane ? plane.planeState.state : null
|
return plane ? plane.planeState.state : null
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 已付款 已承接 未发货 未发起退款 订单列表
|
* @description: 已付款 未送达 未发起退款 订单列表
|
||||||
*/
|
*/
|
||||||
questList () {
|
questList () {
|
||||||
const plane = this.plane
|
const plane = this.plane
|
||||||
return plane ? this.$store.state.orderList.filter((item) => item.shop_id === plane.shop_id && item.status === 'processing' && item.back === 'normal') : []
|
return plane ? this.$store.state.paidOrderList.filter((item) => item.shop_id === plane.shop_id && item.refund_status !== '申请中') : []
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 已发货 订单列表
|
* @description: 已发货 订单列表
|
||||||
*/
|
*/
|
||||||
overQuestList () {
|
overQuestList () {
|
||||||
return this.$store.state.orderList.filter((item) => item.status === 'shipped')
|
return this.$store.state.paidOrderList.filter((item) => item.status === 'shipped')
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 当前选中的订单
|
* @description: 当前选中的订单
|
||||||
@ -468,7 +465,7 @@ export default {
|
|||||||
this.$message.error('操作失败,请重新尝试')
|
this.$message.error('操作失败,请重新尝试')
|
||||||
}
|
}
|
||||||
this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题
|
this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题
|
||||||
this.questAss(this.currentOrder.id, 'status', 'shipped')// 订单改为发货状态 并更新订单列表
|
this.questAss(this.currentOrder.id, 'shipment_status', '已发货')// 订单改为发货状态 并更新订单列表
|
||||||
this.$store.dispatch('fetchLockSite', { id: this.currentOrder.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点
|
this.$store.dispatch('fetchLockSite', { id: this.currentOrder.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点
|
||||||
this.speakText('提交任务,锁定航线。')
|
this.speakText('提交任务,锁定航线。')
|
||||||
} else {
|
} else {
|
||||||
@ -584,13 +581,13 @@ export default {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// 确认执行
|
// 确认执行
|
||||||
this.overQuestList.map((item) => {
|
this.questList.map((item) => {
|
||||||
if (item.runing === this.planesId) { // 找出当前飞机正在执行的任务
|
if (item.runing === this.planesId) { // 找出当前飞机正在执行的任务
|
||||||
/* 插入日志 */
|
/* 插入日志 */
|
||||||
this.$store.dispatch('fetchLog', { content: `订单ID:${item.id} 送餐任务已完成。` })
|
this.$store.dispatch('fetchLog', { content: `订单ID:${item.id} 送餐任务已完成。` })
|
||||||
/* 执行写在这里 */
|
/* 执行写在这里 */
|
||||||
this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置
|
this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置
|
||||||
this.questAss(item.id, 'status', 'completed')// 订单改为已完成状态
|
this.questAss(item.id, 'shipment_status', '已送达')// 订单改为已完成状态
|
||||||
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线
|
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线
|
||||||
this.speakText('任务完成')
|
this.speakText('任务完成')
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ export function questAss (id, state, val) {
|
|||||||
api.post('questAss', data).then(res => {
|
api.post('questAss', data).then(res => {
|
||||||
if (res.data.status === 1) {
|
if (res.data.status === 1) {
|
||||||
Message.success(res.data.msg)
|
Message.success(res.data.msg)
|
||||||
store.dispatch('fetchOrderList')// 更新订单列表
|
store.dispatch('fetchPaidOrderList')// 更新订单列表
|
||||||
} else {
|
} else {
|
||||||
Message.error(res.data.msg)
|
Message.error(res.data.msg)
|
||||||
store.dispatch('fetchOrderList')// 更新订单列表
|
store.dispatch('fetchPaidOrderList')// 更新订单列表
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user