|
...
|
...
|
@@ -41,6 +41,10 @@ |
|
|
|
<!-- 操作按钮区域 -->
|
|
|
|
<div class="table-operator">
|
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
|
|
|
<a-button @click="callRobot" type="primary" icon="reddit">机器人召唤送物</a-button>
|
|
|
|
<a-button @click="callRobotReturnToCabin" type="primary" icon="api">机器人返回舱位点</a-button>
|
|
|
|
<a-button @click="callRobotGoCharge" type="primary" icon="api">机器人返回充电桩</a-button>
|
|
|
|
<!-- <a-button @click="callRobotMoveShow" type="primary" icon="api">机器人取消任务</a-button> -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- table区域-begin -->
|
|
...
|
...
|
@@ -67,12 +71,125 @@ |
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
|
|
|
<a>删除</a>
|
|
|
|
</a-popconfirm>
|
|
|
|
<!-- <a-divider type="vertical" />
|
|
|
|
<a @click="callRobot">召唤机器人</a> -->
|
|
|
|
</span>
|
|
|
|
</a-table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<tbl-depot-in-modal ref="modalForm" @ok="modalFormOk"></tbl-depot-in-modal>
|
|
|
|
<!-- 召唤机器人送物 -->
|
|
|
|
<a-modal v-model="showRobot" title="机器人任务" on-ok="handleOk" width="800px">
|
|
|
|
<template slot="footer">
|
|
|
|
<a-button key="back" @click="handleCancel">
|
|
|
|
取消
|
|
|
|
</a-button>
|
|
|
|
<a-button key="submit" type="primary" :loading="loading" @click="handleOk">
|
|
|
|
确定
|
|
|
|
</a-button>
|
|
|
|
</template>
|
|
|
|
<a-form-model ref="form" :model="model" :rules="validatorRules" >
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择机器人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime" rule = "{ required: true, message: '请选择机器人!' }">
|
|
|
|
<a-select size="small" v-model="model.robotName" placeholder="请选择机器人" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in robotOptions" :key="index" :value="item.id">
|
|
|
|
<img :src="item.img" style="float: left; height: 20px; margin-top: 2px; margin-right: 10px;">
|
|
|
|
<span style="float: left">{{ item.value }}</span>
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
|
|
|
|
<a-col :span="24" v-if="model.robotName === 'SCSK08C0450100861'">
|
|
|
|
<a-form-model-item label="选择召唤点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.via" placeholder="请选择召唤点" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in pointOptions" :key="index" :value="item.pointId">
|
|
|
|
{{ item.pointName }}
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择目标点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.pointId" placeholder="请选择目标点" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in pointOptions" :key="index" :value="item.pointId">
|
|
|
|
{{ item.pointName }}
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<!-- <a-col :span="24">
|
|
|
|
<a-form-model-item label="选择机器人任务流" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.templateId" placeholder="请选择机器人任务流" allowClear style="width: 100%" @change="handleChange">
|
|
|
|
<a-select-option v-for="(item,index) in templateIdOptions" :key="index" :value="item.id">{{ item.value }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
v-if="model.templateId === 'dock_cabin_and_move_target_with_wait_action'"
|
|
|
|
-->
|
|
|
|
<a-col :span="24" v-if="model.robotName === 'SCWM00JS48YF01635'">
|
|
|
|
<a-form-model-item label="输入超时时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="overtime">
|
|
|
|
<a-input-number :min="0" placeholder="请输入超时时间(秒)" style="width: 250px;" v-model="model.overtime"></a-input-number>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-form-model>
|
|
|
|
</a-modal>
|
|
|
|
<!-- 机器人返回舱位 -->
|
|
|
|
<a-modal v-model="showRobot1" title="机器人返回舱位" on-ok="handleOk1" width="800px">
|
|
|
|
<template slot="footer">
|
|
|
|
<a-button key="back" @click="handleCancel1">
|
|
|
|
取消
|
|
|
|
</a-button>
|
|
|
|
<a-button key="submit" type="primary" :loading="loading" @click="handleOk1">
|
|
|
|
确定
|
|
|
|
</a-button>
|
|
|
|
</template>
|
|
|
|
<a-form-model ref="form" :model="model" :rules="validatorRules" >
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择机器人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.robotName" placeholder="请选择机器人" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in robotOptions" :key="index" :value="item.id">
|
|
|
|
<img :src="item.img" style="float: left; height: 16px; margin-top: 2px;">
|
|
|
|
<span style="float: left">{{ item.value }}</span>
|
|
|
|
</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择机器人舱位点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.cabinId" placeholder="请选择机器人舱位点" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in cabinOptions" :key="index" :value="item.cabinId">{{ item.cabinName }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-form-model>
|
|
|
|
</a-modal>
|
|
|
|
<a-modal v-model="callRobotMoveShowDialog" title="选择机器人动作" on-ok="handleOk2" width="800px">
|
|
|
|
<template slot="footer">
|
|
|
|
<a-button key="back" @click="handleCancel2">
|
|
|
|
取消
|
|
|
|
</a-button>
|
|
|
|
<a-button key="submit" type="primary" :loading="loading" @click="handleOk2">
|
|
|
|
确定
|
|
|
|
</a-button>
|
|
|
|
</template>
|
|
|
|
<a-form-model ref="form" :model="model" :rules="validatorRules" >
|
|
|
|
<a-row>
|
|
|
|
<a-col :span="24">
|
|
|
|
<a-form-model-item label="选择机器人动作" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operTime">
|
|
|
|
<a-select size="small" v-model="model.option" placeholder="请选择机器人" allowClear>
|
|
|
|
<a-select-option v-for="(item,index) in cancleMoveOptions" :key="index" :value="item.id">{{ item.value }}</a-select-option>
|
|
|
|
</a-select>
|
|
|
|
</a-form-model-item>
|
|
|
|
</a-col>
|
|
|
|
</a-row>
|
|
|
|
</a-form-model>
|
|
|
|
</a-modal>
|
|
|
|
</a-card>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
...
|
...
|
@@ -81,7 +198,9 @@ import { mixinDevice } from '@/utils/mixin' |
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
|
import TblDepotInModal from './modules/TblDepotInModal'
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
|
|
|
|
import { httpAction} from '@/api/manage'
|
|
|
|
import {getRobotPoints,getRobotGoCharge} from '@/api/RobotPoints'
|
|
|
|
import {getRobotCabins} from '@/api/RobotCabin'
|
|
|
|
export default {
|
|
|
|
name: 'TblDepotInList',
|
|
|
|
mixins: [JeecgListMixin, mixinDevice],
|
|
...
|
...
|
@@ -93,6 +212,42 @@ export default { |
|
|
|
deleteFlg: false,
|
|
|
|
description: 'tbl_depot管理页面',
|
|
|
|
toggleSearchStatus: true,
|
|
|
|
showRobot:false,
|
|
|
|
showRobot1:false,
|
|
|
|
callRobotMoveShowDialog: false,
|
|
|
|
loading: false,
|
|
|
|
labelCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 5 },
|
|
|
|
},
|
|
|
|
wrapperCol: {
|
|
|
|
xs: { span: 24 },
|
|
|
|
sm: { span: 16 },
|
|
|
|
},
|
|
|
|
robotOptions:[
|
|
|
|
{id:"SCWM00JS48YF01635",value:"开放收物上舱",img:require("../../assets/kaifangcang.png")},
|
|
|
|
{id:"SCSK08C0450100861",value:"送物上舱",img:require("../../assets/songwushangcang.png")}
|
|
|
|
],
|
|
|
|
cancleMoveOptions:[
|
|
|
|
{id:"BACK_DEFAULT_ORIGIN",value:"取消后回充"},
|
|
|
|
{id:"DONT_BACK_DEFAULT_ORIGIN",value:"取消后停留在原地"}
|
|
|
|
],
|
|
|
|
cabinOptions:[],
|
|
|
|
pointOptions:[],
|
|
|
|
templateIdOptions:[
|
|
|
|
{id:"docking_cabin_and_move_target",value:"上舱移动到目的地"},
|
|
|
|
{id:"dock_cabin_to_move_and_lift_down",value:"上舱移动到目的地并放下上舱"},
|
|
|
|
{id:"dock_cabin_and_move_target_with_wait_action",value:"上舱移动到目的地,超时返回"},
|
|
|
|
{id:"docking_cabin_and_docking_down",value:"上舱移动到另外一个舱位并放下"},
|
|
|
|
{id:"move_target_and_lift_down",value:"上舱移动到目的地并放下上舱"},
|
|
|
|
],
|
|
|
|
validatorRules: {
|
|
|
|
robotName: [{ required: true, message: '请选择机器人!' }],
|
|
|
|
pointId: [{ required: true, message: '请选择目标点位!' }],
|
|
|
|
templateId: [{ required: true, message: '请选择机器人任务!' }],
|
|
|
|
},
|
|
|
|
model:{},
|
|
|
|
confirmLoading: false,
|
|
|
|
// 表头
|
|
|
|
columns: [
|
|
|
|
{
|
|
...
|
...
|
@@ -159,6 +314,9 @@ export default { |
|
|
|
deleteBatch: '/depot/tblDepot/deleteBatch',
|
|
|
|
exportXlsUrl: '/depot/tblDepot/exportXls',
|
|
|
|
importExcelUrl: 'depot/tblDepot/importExcel',
|
|
|
|
callRobotMove: '/robotPoints/tblRobotPoints/movetoTarget',
|
|
|
|
callRobotReturnToCabin: '/robotPoints/tblRobotPoints/returnToCabin',
|
|
|
|
cancleRobotMove: '/robotPoints/tblRobotPoints/cancleMove',
|
|
|
|
},
|
|
|
|
dictOptions: {},
|
|
|
|
superFieldList: [],
|
|
...
|
...
|
@@ -174,6 +332,7 @@ export default { |
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
...mapGetters(["nickname", "avatar", "userInfo"]),
|
|
|
|
delete() {
|
|
|
|
if (this.nickname() === '管理员') {
|
|
...
|
...
|
@@ -181,6 +340,11 @@ export default { |
|
|
|
}
|
|
|
|
},
|
|
|
|
initDictConfig() { },
|
|
|
|
|
|
|
|
handleChange(value) {
|
|
|
|
console.log(this.model.cabinId);
|
|
|
|
|
|
|
|
},
|
|
|
|
getSuperFieldList() {
|
|
|
|
let fieldList = []
|
|
|
|
fieldList.push({ type: 'string', value: 'partNumber', text: '零件编号', dictCode: '' })
|
|
...
|
...
|
@@ -192,6 +356,139 @@ export default { |
|
|
|
fieldList.push({ type: 'date', value: 'operTime', text: '出入库时间' })
|
|
|
|
this.superFieldList = fieldList
|
|
|
|
},
|
|
|
|
callRobot(){
|
|
|
|
this.showRobot = true;
|
|
|
|
this.getRobotPoints()
|
|
|
|
},
|
|
|
|
getRobotPoints(){
|
|
|
|
getRobotPoints().then((res)=>{
|
|
|
|
if(res.success){
|
|
|
|
this.pointOptions = res.result
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getRobotCabins(){
|
|
|
|
getRobotCabins().then((res)=>{
|
|
|
|
console.log(res)
|
|
|
|
if(res.success){
|
|
|
|
this.cabinOptions = res.result
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
callRobotReturnToCabin(){
|
|
|
|
this.showRobot1 = true
|
|
|
|
this.getRobotCabins()
|
|
|
|
},
|
|
|
|
callRobotGoCharge(){
|
|
|
|
getRobotGoCharge().then((res)=>{
|
|
|
|
// console.log('res===',res)
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success(res.message)
|
|
|
|
this.$emit('ok')
|
|
|
|
} else {
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
callRobotMoveShow(){
|
|
|
|
this.callRobotMoveShowDialog = true
|
|
|
|
},
|
|
|
|
|
|
|
|
handleOk(e) {
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
this.model.templateId = 'dock_cabin_and_move_target_with_wait_action'
|
|
|
|
this.confirmLoading = true
|
|
|
|
let httpurl = ''
|
|
|
|
let method = ''
|
|
|
|
httpurl += this.url.callRobotMove
|
|
|
|
method = 'post'
|
|
|
|
console.log(this.model)
|
|
|
|
// return
|
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success(res.message)
|
|
|
|
this.$emit('ok')
|
|
|
|
} else {
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
this.showRobot = false
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.handleCancel()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleCancel(e) {
|
|
|
|
this.showRobot = false;
|
|
|
|
this.model = {}
|
|
|
|
},
|
|
|
|
handleOk1(e) {
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
this.confirmLoading = true
|
|
|
|
let httpurl = ''
|
|
|
|
let method = ''
|
|
|
|
httpurl += this.url.callRobotReturnToCabin
|
|
|
|
method = 'post'
|
|
|
|
console.log(this.model)
|
|
|
|
// return
|
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success(res.message)
|
|
|
|
this.$emit('ok')
|
|
|
|
} else {
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
// this.showRobot1 = false
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.handleCancel1()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleOk2(e) {
|
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
this.confirmLoading = true
|
|
|
|
let httpurl = ''
|
|
|
|
let method = ''
|
|
|
|
httpurl += this.url.cancleRobotMove
|
|
|
|
method = 'post'
|
|
|
|
// console.log(this.model)
|
|
|
|
// return
|
|
|
|
httpAction(httpurl, this.model, method)
|
|
|
|
.then((res) => {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success(res.message)
|
|
|
|
this.$emit('ok')
|
|
|
|
} else {
|
|
|
|
this.$message.warning(res.message)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
// this.showRobot1 = false
|
|
|
|
this.confirmLoading = false
|
|
|
|
this.handleCancel2()
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
handleCancel1(e) {
|
|
|
|
this.showRobot1 = false;
|
|
|
|
this.model ={}
|
|
|
|
},
|
|
|
|
handleCancel2(e) {
|
|
|
|
this.callRobotMoveShowDialog = false;
|
|
|
|
this.model ={}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
...
|
...
|
|