This commit is contained in:
2023-03-02 10:11:33 +08:00
parent 93c5555cc0
commit e40c6c9b0f
6 changed files with 36 additions and 14 deletions

View File

@@ -99,16 +99,20 @@
<el-table-column prop="instruction_code" label="指令编号" />
<el-table-column prop="task_code" label="任务号" />
<el-table-column prop="vehicle_code" label="载具号" />
<el-table-column prop="instruction_type" label="指令类型" width="120">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.instruction_type] }}
</template>
</el-table-column>
<el-table-column prop="instruction_status" label="指令状态">
<template slot-scope="scope">
<span v-if="scope.row.instruction_status=='0' ">就绪</span>
<span v-if="scope.row.instruction_status=='1' ">执行中</span>
<span v-if="scope.row.instruction_status=='2' ">完成</span>
<span v-if="scope.row.instruction_status=='3' ">取消</span>
{{ dict.label.task_status[scope.row.instruction_status] }}
</template>
</el-table-column>
<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="matarial" label="物料" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="描述" />
@@ -167,7 +171,7 @@ const defaultForm = {
update_time: null
}
export default {
dicts: ['task_status'],
dicts: ['task_status', 'task_type'],
name: 'Instruction',
components: { pagination, crudOperation, Search },
mixins: [presenter(), header(), form(defaultForm), crud()],

View File

@@ -232,17 +232,21 @@
<el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" label="任务号" />
<el-table-column prop="vehicle_code" label="载具号" />
<el-table-column prop="task_type" label="任务类型" width="120">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.task_type] }}
</template>
</el-table-column>
<el-table-column prop="task_status" label="任务状态">
<template slot-scope="scope">
<span v-if="scope.row.task_status=='0' ">就绪</span>
<span v-if="scope.row.task_status=='1' ">执行中</span>
<span v-if="scope.row.task_status=='2' ">完成</span>
<span v-if="scope.row.task_status=='3' ">取消</span>
{{ dict.label.task_status[scope.row.task_status] }}
</template>
</el-table-column>
<el-table-column prop="priority" 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="start_point_code2" label="终点2" />
<el-table-column prop="matarial" label="物料" />
<el-table-column prop="quantity" label="数量" />
<el-table-column prop="remark" label="备注" />
@@ -288,7 +292,7 @@ const defaultForm = {
export default {
name: 'Task',
components: { pagination, crudOperation, Search },
dicts: ['task_status'],
dicts: ['task_status', 'task_type'],
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({

View File

@@ -89,11 +89,14 @@
<el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" label="任务号(指令编号)" />
<el-table-column prop="vehicle_code" label="载具号" />
<el-table-column prop="task_type" label="任务类型" width="120">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.task_type] }}
</template>
</el-table-column>
<el-table-column prop="task_status" label="状态">
<template slot-scope="scope">
<span v-if="scope.row.task_status=='0' ">就绪</span>
<span v-if="scope.row.task_status=='1' ">执行中</span>
<span v-if="scope.row.task_status=='2' ">完成</span>
{{ dict.label.task_status[scope.row.task_status] }}
</template>
</el-table-column>
<el-table-column prop="priority" label="任务优先级" />
@@ -138,7 +141,7 @@ const defaultForm = {
export default {
name: 'Task',
components: { pagination, crudOperation, Search },
dicts: ['task_status'],
dicts: ['task_status', 'task_type'],
mixins: [presenter(), header(), form(defaultForm), crud()],
cruds() {
return CRUD({ title: '任务', url: 'api/task/getAll', idField: 'task_id', sort: 'task_id,desc', crudMethod: { ...crudTask }, optShow: {