add 驱动修改

This commit is contained in:
周俊杰
2023-12-27 08:59:48 +08:00
parent 4dd5dc8fcd
commit d3049de57f
39 changed files with 2080 additions and 1090 deletions

View File

@@ -1,73 +1,74 @@
import request from '@/utils/request'
export function add(data) {
return request({
url: 'api/instruction',
method: 'post',
data
})
return request({
url: 'api/instruction',
method: 'post',
data
})
}
export function del(ids) {
return request({
url: 'api/instruction/',
method: 'delete',
data: ids
})
return request({
url: 'api/instruction/',
method: 'delete',
data: ids
})
}
export function edit(data) {
return request({
url: 'api/instruction',
method: 'put',
data
})
return request({
url: 'api/instruction',
method: 'put',
data
})
}
export function finish(instruction_id) {
return request({
url: 'api/instruction/finish/' + instruction_id,
method: 'post',
data: instruction_id
})
return request({
url: 'api/instruction/finish/' + instruction_id,
method: 'post',
data: instruction_id
})
}
export function cancel(instruction_id) {
return request({
url: 'api/instruction/cancel/' + instruction_id,
method: 'post',
data: instruction_id
})
return request({
url: 'api/instruction/cancel/' + instruction_id,
method: 'post',
data: instruction_id
})
}
export function queryUnFinish() {
return request({
url: 'api/instruction/unfinish/',
method: 'get'
})
return request({
url: 'api/instruction/unfinish/',
method: 'get'
})
}
export function queryByTaskId(task_id) {
return request({
url: 'api/instruction/queryByTaskId/' + task_id,
method: 'post',
data: task_id
})
return request({
url: 'api/instruction/queryByTaskId/' + task_id,
method: 'post',
data: task_id
})
}
export function reload() {
return request({
url: 'api/instruction/reload',
method: 'get'
})
return request({
url: 'api/instruction/reload',
method: 'get'
})
}
export function sendToAGV(instruction_id) {
return request({
url: 'api/instruction/sendToAGV',
method: 'post',
data: instruction_id
})
return request({
url: 'api/instruction/sendToAGV',
method: 'post',
data: instruction_id
})
}
export default { add, edit, del, finish, cancel, queryUnFinish, queryByTaskId, reload, sendToAGV }
export default { add, edit, del, finish, cancel, queryUnFinish, queryByTaskId, reload, sendToAGV }

View File

@@ -80,6 +80,17 @@
>
导出FX5UCSV
</el-button>
<el-button
slot="left"
class="filter-item"
type="warning"
icon="el-icon-download"
size="mini"
:loading="downLoadcsvLoading"
@click="doExportCSVUA()"
>
导出CSVUA
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
@@ -194,6 +205,15 @@ export default {
this.downLoadcsvLoadingSmart = false
})
},
doExportCSVUA() {
this.downLoadcsvLoading = true
download(this.crud.url + '/downloadCSVUA', this.crud.getQueryParams()).then(result => {
downloadFile(result, crud.title + '数据', 'csv')
this.downLoadcsvLoading = false
}).catch(() => {
this.downLoadcsvLoading = false
})
},
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true

View File

@@ -32,7 +32,6 @@
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<el-select
v-model="query.status"
@@ -143,23 +142,27 @@
<span v-if="scope.row.send_status=='2' ">失败</span>
</template>
</el-table-column>
<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="start_point_code" label="取货点" />
<el-table-column prop="next_point_code" label="放货点" />
<!-- <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="当前执行设备" width="130" />
<el-table-column prop="carno" 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="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="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"
@@ -173,15 +176,10 @@
<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-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>
</el-dropdown>
</template>

View File

@@ -117,6 +117,22 @@
/>
</el-select>
</el-form-item>
<el-form-item label="移动方向">
<el-select
v-model="form.task_direction"
style="width: 370px;"
filterable
placeholder="请选择"
@change="isDisabled=false"
>
<el-option
v-for="item in dict.task_direction"
:key="item.id"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="路由方案">
<el-select
v-model="form.route_plan_code"
@@ -313,7 +329,7 @@ import { getDicts } from '@/api/system/dict'
export default {
name: 'Task',
components: { pagination, crudOperation },
dicts: ['task_status', 'task_type'],
dicts: ['task_status', 'task_type','task_direction'],
mixins: [presenter(), header(), crud()],
cruds() {
return CRUD({ title: '任务', url: 'api/task', idField: 'task_id', sort: 'task_id,desc',
@@ -379,6 +395,7 @@ export default {
statusList: [],
routeList: [],
task_type: [],
task_direction: [],
fromYList: [],
fromZList: [],
toYList: [],
@@ -395,6 +412,7 @@ export default {
vehicle_code: null,
vehicle_type: null,
task_type: '1',
task_direction: null,
task_status: null,
priority: 1,
start_point_code: null,

View File

@@ -14,11 +14,14 @@
:show-close="false"
:modal="false"
>
<el-table
:data="arr"
style="width: 100%"
max-height="500px"
>
<el-table :data="arr" style="width: 100%" max-height="500px">
<el-table-column label="长字符串字段">
<template slot-scope="scope">
<span style="white-space: normal;">{{ scope.row.longStringField }}</span>
</template>
</el-table-column>
<!-- 其他表格列 -->
</el-table>
<el-table-column
prop="name"
label="监控项"
@@ -470,9 +473,10 @@ export default {
const obj = { name: '行走列', value: data[val] }
this.arr.push(obj)
} else if (val === 'task1') {
const obj = { name: '前工位任务', value: data[val] }
const obj = { name: '前工位任务', value: data[val] }
this.arr.push(obj)
} else if (val === 'task2') {
}
else if (val === 'task2') {
const obj = { name: '后工位任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'labeling_qty') {
@@ -539,6 +543,13 @@ export default {
const obj = { name: '模式名称', value: data[val] }
this.arr.push(obj)
}
else if (val==='requireSucess1'){
const obj = { name: '请求成功标记', value: data[val] }
this.arr.push(obj)
}
// const obj = { name: '请求成功标记', value: data[requireSucess1] }
// this.arr.push(obj)
}
}
// console.log('arr:', this.arr)