|
|
@ -55,6 +55,18 @@ |
|
|
|
class="filter-item" |
|
|
|
@keyup.enter.native="crud.toQuery" |
|
|
|
/> |
|
|
|
<el-select |
|
|
|
v-model="query.instruction_type" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
size="small" |
|
|
|
placeholder="指令类型" |
|
|
|
class="filter-item" |
|
|
|
style="width: 190px" |
|
|
|
@change="crud.toQuery" |
|
|
|
> |
|
|
|
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
<rrOperation /> |
|
|
|
</div> |
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|
|
@ -109,7 +121,12 @@ |
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
<el-table-column v-if="false" prop="instruction_id" label="指令标识" /> |
|
|
|
<el-table-column prop="instruction_code" label="指令编号" /> |
|
|
|
<el-table-column prop="instruction_type" label="指令类型" /> |
|
|
|
<el-table-column prop="instruction_type" label="指令类型"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ dict.label.task_type[scope.row.instruction_type] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="link_num" label="关联编号" />--> |
|
|
|
<el-table-column prop="task_code" label="任务号" /> |
|
|
|
<el-table-column prop="vehicle_code" label="载具号" /> |
|
|
|
<el-table-column prop="instruction_status" label="指令状态"> |
|
|
@ -126,34 +143,28 @@ |
|
|
|
<span v-if="scope.row.send_status=='2' ">失败</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="start_point_code" label="起点" min-width="100" show-overflow-tooltip /> |
|
|
|
<!-- <el-table-column prop="start_parent_code" label="父起点点位" min-width="100" show-overflow-tooltip />--> |
|
|
|
<el-table-column prop="next_point_code" label="终点" min-width="100" show-overflow-tooltip /> |
|
|
|
<!-- <el-table-column prop="next_parent_code" label="父终点点位" min-width="100" show-overflow-tooltip />--> |
|
|
|
<el-table-column prop="start_point_code2" label="起点2" min-width="100" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="next_point_code2" label="终点2" min-width="100" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="put_device_code" label="放货位" min-width="100" show-overflow-tooltip /> |
|
|
|
|
|
|
|
<el-table-column prop="start_point_code" label="取货点1" /> |
|
|
|
<el-table-column prop="next_point_code" label="放货点1" /> |
|
|
|
<el-table-column prop="start_point_code2" label="取货点2" /> |
|
|
|
<el-table-column prop="next_point_code2" label="放货点2" /> |
|
|
|
<el-table-column prop="put_point_code" label="中转点" /> |
|
|
|
<el-table-column prop="execute_device_code" label="当前执行设备" /> |
|
|
|
<el-table-column prop="carno" label="车号" /> |
|
|
|
<el-table-column prop="compound_inst" label="复合指令"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.compound_inst==='0' ">否</span> |
|
|
|
<span v-if="scope.row.compound_inst==='1' ">是</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="compound_inst_data" width="200" label="复合路线" /> |
|
|
|
<el-table-column prop="matarial" label="物料" /> |
|
|
|
<el-table-column prop="quantity" label="数量" /> |
|
|
|
<el-table-column prop="weight" label="重量" /> |
|
|
|
<el-table-column prop="agv_jobno" label="AGV任务号" /> |
|
|
|
<el-table-column prop="agv_inst_type" label="AGV任务类型" /> |
|
|
|
<el-table-column prop="agv_system_type" label="AGV系统类型" /> |
|
|
|
<el-table-column prop="start_height" label="取货高度" /> |
|
|
|
<el-table-column prop="next_height" label="放货高度" /> |
|
|
|
<el-table-column prop="remark" label="描述" /> |
|
|
|
<el-table-column prop="create_by" label="创建者" /> |
|
|
|
<el-table-column prop="create_time" label="创建时间" width="135" /> |
|
|
|
<el-table-column prop="update_by" label="修改者" /> |
|
|
|
<el-table-column prop="update_time" label="修改时间" width="135" /> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
v-permission="['admin','instruction:edit','instruction:del']" |
|
|
|
fixed="left" |
|
|
|
label="操作" |
|
|
|
width="80px" |
|
|
|
width="150px" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -162,15 +173,22 @@ |
|
|
|
<i class="el-icon-menu" /> |
|
|
|
</span> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item>--> |
|
|
|
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item>--> |
|
|
|
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">强制取消</el-dropdown-item>--> |
|
|
|
<!-- <el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'d')">初始化</el-dropdown-item>--> |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'a')">完成</el-dropdown-item> |
|
|
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'b')">取消</el-dropdown-item> |
|
|
|
<el-dropdown-item :command="beforeHandleCommand(scope.$index, scope.row,'c')">下发</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!--分页组件--> |
|
|
|
<pagination /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -180,6 +198,7 @@ import crudInstruction from '@/api/acs/instruction/instruction' |
|
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud' |
|
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
import { getDicts } from '@/api/system/dict' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
|
|
|
|
const defaultForm = { |
|
|
|
instruction_id: null, |
|
|
@ -218,9 +237,9 @@ const defaultForm = { |
|
|
|
update_time: null |
|
|
|
} |
|
|
|
export default { |
|
|
|
dicts: ['task_status'], |
|
|
|
dicts: ['task_status', 'task_type'], |
|
|
|
name: 'Instruction', |
|
|
|
components: { crudOperation }, |
|
|
|
components: { crudOperation, pagination }, |
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
|
cruds() { |
|
|
|
return CRUD({ |
|
|
@ -295,10 +314,18 @@ export default { |
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
|
}, |
|
|
|
sendToAGV(index, row) { |
|
|
|
crudInstruction.sendToAGV(row.instruction_id).then(res => { |
|
|
|
forceCancel(index, row) { |
|
|
|
crudInstruction.forceCancel(row.instruction_id).then(res => { |
|
|
|
this.crud.toQuery() |
|
|
|
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.notify('强制取消成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
|
}, |
|
|
|
init(index, row) { |
|
|
|
crudInstruction.init(row.instruction_id).then(res => { |
|
|
|
this.crud.toQuery() |
|
|
|
this.crud.notify('初始化成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err.response.data.message) |
|
|
|
}) |
|
|
@ -326,8 +353,11 @@ export default { |
|
|
|
case 'b':// 取消 |
|
|
|
this.cancel(command.index, command.row) |
|
|
|
break |
|
|
|
case 'c': |
|
|
|
this.sendToAGV(command.index, command.row) |
|
|
|
case 'c':// 强制取消 |
|
|
|
this.forceCancel(command.index, command.row) |
|
|
|
break |
|
|
|
case 'd':// 初始化 |
|
|
|
this.init(command.index, command.row) |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|