|
|
|
|
@ -21,7 +21,6 @@ |
|
|
|
|
:default-time="['00:00:00', '00:00:00']" |
|
|
|
|
></el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
label="任务编号" |
|
|
|
|
prop="taskCode" |
|
|
|
|
@ -121,6 +120,7 @@ |
|
|
|
|
<div class="layout-full"> |
|
|
|
|
<heavy-table |
|
|
|
|
class="heavy-table tablem" |
|
|
|
|
style="margin-top:22px" |
|
|
|
|
highlight-current-row |
|
|
|
|
:data="cheshiList" |
|
|
|
|
:loading="loading" |
|
|
|
|
@ -130,6 +130,7 @@ |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
@handleUpdate="handleUpdate" |
|
|
|
|
@handleDelete="handleDelete" |
|
|
|
|
@modifyDelete="modifyDelete" |
|
|
|
|
> |
|
|
|
|
<!-- <template v-slot:switchChange="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
@ -159,89 +160,42 @@ |
|
|
|
|
label-width="95px" |
|
|
|
|
> |
|
|
|
|
<el-form-item |
|
|
|
|
label="点位编码" |
|
|
|
|
prop="pointNo" |
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.pointNo" |
|
|
|
|
placeholder="请输入点位编码" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="点位名称" |
|
|
|
|
prop="pointName" |
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.pointName" |
|
|
|
|
placeholder="请输入点位名称" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="所属分组" |
|
|
|
|
prop="pointGroup" |
|
|
|
|
label="任务起点" |
|
|
|
|
prop="fromSide" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.pointGroup" |
|
|
|
|
v-model="form.fromSide" |
|
|
|
|
style="width: 100%;" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in pointGroupNameList" |
|
|
|
|
:key="item.id" |
|
|
|
|
:label="item.groupName" |
|
|
|
|
:value="item.id" |
|
|
|
|
:key="item.pointName" |
|
|
|
|
:label="item.pointName" |
|
|
|
|
:value="item.pointNo" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="是否可用" |
|
|
|
|
prop="isActive" |
|
|
|
|
label="任务终点" |
|
|
|
|
prop="toSide" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.isActive" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
v-model="form.toSide" |
|
|
|
|
style="width: 100%;" |
|
|
|
|
clearable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in dict.type.is_use" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="选择设备" |
|
|
|
|
prop="devName" |
|
|
|
|
> |
|
|
|
|
<el-select |
|
|
|
|
v-model="form.devCode" |
|
|
|
|
placeholder="请选择" |
|
|
|
|
style="width: 100%;" |
|
|
|
|
:value="form.devName" |
|
|
|
|
clearable |
|
|
|
|
filterable |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in devNameArr" |
|
|
|
|
:label="item.devName" |
|
|
|
|
:value="item.devCode" |
|
|
|
|
:key="item.devCode" |
|
|
|
|
v-for="item in pointGroupNameList" |
|
|
|
|
:key="item.pointName" |
|
|
|
|
:label="item.pointName" |
|
|
|
|
:value="item.pointNo" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item |
|
|
|
|
label="交互点位" |
|
|
|
|
prop="handshakePoint" |
|
|
|
|
> |
|
|
|
|
<el-input |
|
|
|
|
v-model="form.handshakePoint" |
|
|
|
|
placeholder="请输入点位编码" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<div |
|
|
|
|
slot="footer" |
|
|
|
|
@ -258,17 +212,14 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getBasePointGroup, updatePoint, addPoint } from '@/api/wcs/base/agvPoint.js' |
|
|
|
|
import { getBasePointGroup, updatePoint, addPoint, queryPointList } from '@/api/wcs/base/agvPoint.js' |
|
|
|
|
import { getWcsDeviceList } from '@/api/wcs/base/wcsDevice.js' |
|
|
|
|
import { getDictLabel } from '@/utils/index' |
|
|
|
|
import { queryTaskManagement, reissueTask, cancelTask } from '@/api/wcs/busFunctions/taskManagement.js' |
|
|
|
|
import { queryTaskManagement, reissueTask, cancelTask, updateBusInDataTask } from '@/api/wcs/busFunctions/taskManagement.js' |
|
|
|
|
import moment from 'moment' |
|
|
|
|
// import { getTableHeader } from '@/api/wms/tableHeader/table' |
|
|
|
|
export default { |
|
|
|
|
name: 'Configuration', |
|
|
|
|
|
|
|
|
|
dicts: ['is_use', 'task_type', 'task_status', 'order_type_dict'], |
|
|
|
|
|
|
|
|
|
data() { |
|
|
|
|
const _that = this |
|
|
|
|
return { |
|
|
|
|
@ -277,7 +228,6 @@ export default { |
|
|
|
|
size: 50, // 页面大小 |
|
|
|
|
total: 0 |
|
|
|
|
}, |
|
|
|
|
// value1: [moment().locale('zh-cn').format('yyyy-MM-DD 00:00:00'), moment().locale('zh-cn').add(1, 'days').format('yyyy-MM-DD 00:00:00')], |
|
|
|
|
value1: [], |
|
|
|
|
//存放设备数组 |
|
|
|
|
devNameArr: [], |
|
|
|
|
@ -365,11 +315,15 @@ export default { |
|
|
|
|
fixed: 'right', |
|
|
|
|
align: 'center', |
|
|
|
|
buttons: [ |
|
|
|
|
// { |
|
|
|
|
// name: '修改任务', |
|
|
|
|
// event: 'handleDelete', |
|
|
|
|
// disable(row, prop) {} |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
name: '修改任务', |
|
|
|
|
event: 'modifyDelete', |
|
|
|
|
disable(row, prop) { |
|
|
|
|
if (row.punchNo !== 'AGV') { |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
name: '重新下发', |
|
|
|
|
event: 'handleUpdate' |
|
|
|
|
@ -444,18 +398,18 @@ export default { |
|
|
|
|
// 表单校验 |
|
|
|
|
rules: { |
|
|
|
|
pointNo: [{ required: true, trigger: 'blur', message: '请输入点位编码' }], |
|
|
|
|
pointName: [{ required: true, trigger: 'blur', message: '请输入点位名称' }], |
|
|
|
|
pointGroup: [{ required: true, trigger: 'change', message: '冲空区' }], |
|
|
|
|
toSide: [{ required: true, trigger: 'blur', message: '请输入任务终点' }], |
|
|
|
|
fromSide: [{ required: true, trigger: 'blur', message: '请输入任务起点' }], |
|
|
|
|
isActive: [{ required: true, trigger: 'change', message: '启用' }], |
|
|
|
|
devCode: [{ required: true, trigger: 'change', message: '请选择设备' }] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
this.getList() |
|
|
|
|
getBasePointGroup().then((res) => { |
|
|
|
|
this.pointGroupNameList = res.data |
|
|
|
|
queryPointList({ pageNum: 1, pageSize: 999 }).then((res) => { |
|
|
|
|
this.pointGroupNameList = res.rows |
|
|
|
|
}) |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
computed: {}, |
|
|
|
|
|
|
|
|
|
@ -472,6 +426,19 @@ export default { |
|
|
|
|
this.getList() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
//修改任务 |
|
|
|
|
modifyDelete(row) { |
|
|
|
|
this.open = true |
|
|
|
|
this.title = '修改任务' |
|
|
|
|
console.log(row) |
|
|
|
|
let data = { |
|
|
|
|
id: row.taskId, |
|
|
|
|
fromSide: row.fromSide, |
|
|
|
|
toSide: row.taskPath, |
|
|
|
|
taskPath: row.taskPath |
|
|
|
|
} |
|
|
|
|
this.form = data |
|
|
|
|
}, |
|
|
|
|
//时间戳 |
|
|
|
|
formatStringToTimestamp(formattedString) { |
|
|
|
|
// 解析格式化时间字符串为Date对象 |
|
|
|
|
@ -603,33 +570,15 @@ export default { |
|
|
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
submitForm() { |
|
|
|
|
this.$refs['form'].validate((valid) => { |
|
|
|
|
this.devNameArr.forEach((item, index) => { |
|
|
|
|
if (item.devName == this.form.devCode) { |
|
|
|
|
this.form.devCode = item.devCode |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// console.log(this.form) |
|
|
|
|
this.form.taskPath = this.$refs['form'].validate((valid) => { |
|
|
|
|
if (valid) { |
|
|
|
|
this.pointGroupNameList.forEach((item, index) => { |
|
|
|
|
if (item.groupName == this.form.pointGroup) { |
|
|
|
|
this.form.pointGroup = item.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if (this.title === '编辑') { |
|
|
|
|
// console.log(this.form) |
|
|
|
|
updatePoint(this.form).then((response) => { |
|
|
|
|
if (this.title === '修改任务') { |
|
|
|
|
updateBusInDataTask(this.form).then((response) => { |
|
|
|
|
this.$modal.msgSuccess('修改成功') |
|
|
|
|
this.open = false |
|
|
|
|
console.log(this.form) |
|
|
|
|
this.getList() |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
addPoint(this.form).then((response) => { |
|
|
|
|
this.$modal.msgSuccess('添加成功') |
|
|
|
|
this.open = false |
|
|
|
|
this.getList() |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|