rev:现场测试优化

This commit is contained in:
2025-01-14 10:51:36 +08:00
parent 3b18f47cbf
commit 98d9dfd024
8 changed files with 186 additions and 94 deletions

View File

@@ -54,7 +54,7 @@
style="width: 200px"
@change="crud.toQuery"
>
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('Inst.table.task_status')">
@@ -68,7 +68,7 @@
style="width: 200px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value" />
<el-option v-for="item in dict.task_status" :key="item.id" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('Inst.table.instruction_type')">
@@ -82,7 +82,7 @@
style="width: 200px"
@change="crud.toQuery"
>
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value" />
<el-option v-for="item in dict.task_type" :key="item.id" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('task.txt_box.start_or_end')">
@@ -96,7 +96,7 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<rrOperation />
<rrOperation/>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -123,21 +123,24 @@
>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item :label="$t('Inst.table.start_point_code')">
<el-input v-model="form.start_point_code" style="width: 370px;" />
<el-input v-model="form.start_point_code" style="width: 370px;"/>
</el-form-item>
<el-form-item :label="$t('Inst.table.next_point_code')">
<el-input v-model="form.next_point_code" style="width: 370px;" />
<el-input v-model="form.next_point_code" style="width: 370px;"/>
</el-form-item>
<el-form-item :label="$t('Inst.table.vehicle_code')">
<el-input v-model="form.vehicle_code" style="width: 370px;" />
<el-input v-model="form.vehicle_code" style="width: 370px;"/>
</el-form-item>
<el-form-item :label="$t('Inst.table.remark')" prop="description">
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" />
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">{{ $t('auto.common.Cancel') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('auto.common.Confirm') }}</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{
$t('auto.common.Confirm')
}}
</el-button>
</div>
</el-dialog>
<!--表格渲染-->
@@ -149,15 +152,18 @@
style="width: 100%;"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="instruction_id" label="指令标识" />
<el-table-column prop="instruction_code" :label="$t('Inst.table.instruction_code')" :min-width="flexWidth('instruction_code',crud.data,$t('Inst.table.instruction_code'))" />
<el-table-column prop="instruction_type" :label="$t('Inst.table.instruction_type')" :min-width="flexWidth('instruction_type',crud.data,$t('Inst.table.instruction_type'))">
<el-table-column type="selection" width="55"/>
<el-table-column v-if="false" prop="instruction_id" label="指令标识"/>
<el-table-column prop="instruction_code" :label="$t('Inst.table.instruction_code')"
:min-width="flexWidth('instruction_code',crud.data,$t('Inst.table.instruction_code'))"/>
<el-table-column prop="instruction_type" :label="$t('Inst.table.instruction_type')"
:min-width="flexWidth('instruction_type',crud.data,$t('Inst.table.instruction_type'))">
<template slot-scope="scope">
{{ dict.label.task_type[scope.row.instruction_type] }}
</template>
</el-table-column>
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')" :min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')"
:min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
<template slot-scope="scope">
<span v-if="scope.row.agv_action_type===1 ">{{ $t('task.txt_box.ORDINARY') }}</span>
<span v-if="scope.row.agv_action_type===2 ">{{ $t('task.txt_box.IN_STOCK') }}</span>
@@ -165,42 +171,61 @@
<span v-if="scope.row.agv_action_type===4 ">{{ $t('task.txt_box.IN_OUT_STOCK') }}</span>
</template>
</el-table-column>
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')" :min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))" />
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')"
:min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))"/>
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')"
:min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))"/>
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="task_code" :label="$t('Inst.table.task_code')" :min-width="flexWidth('task_code',crud.data,$t('Inst.table.task_code'))" />
<el-table-column prop="vehicle_code" :label="$t('Inst.table.vehicle_code')" :min-width="flexWidth('vehicle_code',crud.data,$t('Inst.table.vehicle_code'))" />
<el-table-column prop="vehicle_code2" :label="$t('Inst.table.vehicle_code2')" :min-width="flexWidth('vehicle_code2',crud.data,$t('Inst.table.vehicle_code2'))" />
<el-table-column prop="instruction_status" :label="$t('Inst.table.instruction_status')" :min-width="flexWidth('instruction_status',crud.data,$t('Inst.table.instruction_status'))">
<el-table-column prop="task_code" :label="$t('Inst.table.task_code')"
:min-width="flexWidth('task_code',crud.data,$t('Inst.table.task_code'))"/>
<el-table-column prop="vehicle_code" :label="$t('Inst.table.vehicle_code')"
:min-width="flexWidth('vehicle_code',crud.data,$t('Inst.table.vehicle_code'))"/>
<el-table-column prop="vehicle_code2" :label="$t('Inst.table.vehicle_code2')"
:min-width="flexWidth('vehicle_code2',crud.data,$t('Inst.table.vehicle_code2'))"/>
<el-table-column prop="instruction_status" :label="$t('Inst.table.instruction_status')"
:min-width="flexWidth('instruction_status',crud.data,$t('Inst.table.instruction_status'))">
<template slot-scope="scope">
<span v-if="scope.row.instruction_status=='0' ">{{ $t('Inst.table.ready') }}</span>
<span v-if="scope.row.instruction_status=='1' ">{{ $t('Inst.table.Execution') }}</span>
<span v-if="scope.row.instruction_status=='2' ">{{ $t('Inst.table.Finish') }}</span>
</template>
</el-table-column>
<el-table-column prop="send_status" :label="$t('Inst.table.send_status')" :min-width="flexWidth('send_status',crud.data,$t('Inst.table.send_status'))">
<el-table-column prop="send_status" :label="$t('Inst.table.send_status')"
:min-width="flexWidth('send_status',crud.data,$t('Inst.table.send_status'))">
<template slot-scope="scope">
<span v-if="scope.row.send_status=='0' ">{{ $t('Inst.table.undelivered') }}</span>
<span v-if="scope.row.send_status=='1' ">{{ $t('Inst.table.succeed') }}</span>
<span v-if="scope.row.send_status=='2' ">{{ $t('Inst.table.fail') }}</span>
</template>
</el-table-column>
<el-table-column prop="start_point_code" :label="$t('Inst.table.start_point_code')" :min-width="flexWidth('start_point_code',crud.data,$t('Inst.table.start_point_code'))" />
<el-table-column prop="next_point_code" :label="$t('Inst.table.next_point_code')" :min-width="flexWidth('next_point_code',crud.data,$t('Inst.table.next_point_code'))" />
<el-table-column prop="start_point_code2" :label="$t('Inst.table.start_point_code2')" :min-width="flexWidth('start_point_code2',crud.data,$t('Inst.table.start_point_code2'))" />
<el-table-column prop="next_point_code2" :label="$t('Inst.table.next_point_code2')" :min-width="flexWidth('next_point_code2',crud.data,$t('Inst.table.next_point_code2'))" />
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')" :min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))" />
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
<el-table-column prop="carno" :label="$t('Inst.table.carno')" :min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))" />
<el-table-column prop="remark" :label="$t('Inst.table.remark')" :min-width="flexWidth('remark',crud.data,$t('Inst.table.remark'))" />
<el-table-column prop="create_by" :label="$t('Inst.table.create_by')" :min-width="flexWidth('create_by',crud.data,$t('Inst.table.create_by'))" />
<el-table-column prop="create_time" :label="$t('Inst.table.create_time')" :min-width="flexWidth('create_time',crud.data,$t('Inst.table.create_time'))" />
<el-table-column prop="update_by" :label="$t('Inst.table.update_by')" :min-width="flexWidth('update_by',crud.data,$t('Inst.table.update_by'))" />
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')" :min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))" />
<el-table-column prop="start_point_code" :label="$t('Inst.table.start_point_code')"
:min-width="flexWidth('start_point_code',crud.data,$t('Inst.table.start_point_code'))"/>
<el-table-column prop="next_point_code" :label="$t('Inst.table.next_point_code')"
:min-width="flexWidth('next_point_code',crud.data,$t('Inst.table.next_point_code'))"/>
<el-table-column prop="start_point_code2" :label="$t('Inst.table.start_point_code2')"
:min-width="flexWidth('start_point_code2',crud.data,$t('Inst.table.start_point_code2'))"/>
<el-table-column prop="next_point_code2" :label="$t('Inst.table.next_point_code2')"
:min-width="flexWidth('next_point_code2',crud.data,$t('Inst.table.next_point_code2'))"/>
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')"
:min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))"/>
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')"
:min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))"/>
<el-table-column prop="carno" :label="$t('Inst.table.carno')"
:min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))"/>
<el-table-column prop="remark" :label="$t('Inst.table.remark')"
:min-width="flexWidth('remark',crud.data,$t('Inst.table.remark'))"/>
<el-table-column prop="create_by" :label="$t('Inst.table.create_by')"
:min-width="flexWidth('create_by',crud.data,$t('Inst.table.create_by'))"/>
<el-table-column prop="create_time" :label="$t('Inst.table.create_time')"
:min-width="flexWidth('create_time',crud.data,$t('Inst.table.create_time'))"/>
<el-table-column prop="update_by" :label="$t('Inst.table.update_by')"
:min-width="flexWidth('update_by',crud.data,$t('Inst.table.update_by'))"/>
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')"
:min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))"/>
<el-table-column
v-permission="['admin','instruction:edit','instruction:del']"
:label="$t('auto.common.Operate')"
width="150px"
width="200"
align="center"
fixed="right"
>
@@ -212,25 +237,17 @@
>
{{ $t('Inst.table.Finish') }}
</el-button>
<el-dropdown size="mini">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('user.other.More') }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-circle-close"><span @click="handleCommand(scope.$index, scope.row,'b')">
{{ $t('auto.common.Cancel') }}</span>
</el-dropdown-item>
<el-dropdown-item icon="el-icon-error"><span @click="handleCommand(scope.$index, scope.row,'c')">
{{ $t('auto.common.Forced_cancellation') }}</span></el-dropdown-item>
<el-dropdown-item
icon="el-icon-refresh"
><span @click="handleCommand(scope.$index, scope.row,'d')">{{ $t('auto.common.Initialize') }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="text" icon="el-icon-circle-close" @click="handleCommand(scope.$index, scope.row,'b')">
{{ $t('auto.common.Cancel') }}
</el-button>
<el-button type="text" icon="el-icon-error" @click="handleCommand(scope.$index, scope.row,'c')">
{{ $t('auto.common.Forced_cancellation') }}
</el-button>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
<pagination/>
</div>
</div>
</template>

View File

@@ -539,7 +539,9 @@
/>
<el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px">
<template slot-scope="scope">
<span v-if="scope.row.class_type!=null && scope.row.class_type.length===2">{{ dict.label.task_type[scope.row.class_type] }}</span>
<span v-if="scope.row.class_type!=null && scope.row.class_type.length===2">{{
dict.label.task_type[scope.row.class_type]
}}</span>
<span v-else>{{ dict.label.task_type[scope.row.task_type] }}</span>
</template>
</el-table-column>
@@ -592,13 +594,20 @@
{{ getAgvSystemLabel(scope.row.agv_system_type) }}
</template>
</el-table-column>
<el-table-column prop="put_point_code" :label="$t('TaskRecord.table.Transit_point')" :min-width="flexWidth('put_point_code',crud.data,$t('TaskRecord.table.Transit_point'))" />
<el-table-column prop="remark" :label="$t('task.select.Remark')" :min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))" />
<el-table-column prop="create_by" :label="$t('task.select.Creator')" :min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))" />
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" :min-width="flexWidth('create_time',crud.data,$t('task.select.Create_time'))" />
<el-table-column prop="update_by" :label="$t('Inst.table.update_by')" :min-width="flexWidth('update_by',crud.data,$t('Inst.table.update_by'))" />
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')" :min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))" />
<el-table-column v-permission="['admin','task:edit','task:del']" :label="$t('task.select.Operation')" width="150px" align="center" fixed="right">
<el-table-column prop="put_point_code" :label="$t('TaskRecord.table.Transit_point')"
:min-width="flexWidth('put_point_code',crud.data,$t('TaskRecord.table.Transit_point'))"/>
<el-table-column prop="remark" :label="$t('task.select.Remark')"
:min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))"/>
<el-table-column prop="create_by" :label="$t('task.select.Creator')"
:min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))"/>
<el-table-column prop="create_time" :label="$t('task.select.Create_time')"
:min-width="flexWidth('create_time',crud.data,$t('task.select.Create_time'))"/>
<el-table-column prop="update_by" :label="$t('Inst.table.update_by')"
:min-width="flexWidth('update_by',crud.data,$t('Inst.table.update_by'))"/>
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')"
:min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))"/>
<el-table-column v-permission="['admin','task:edit','task:del']" :label="$t('task.select.Operation')"
width="250" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@@ -607,23 +616,18 @@
>
{{ $t('Inst.table.Finish') }}
</el-button>
<el-dropdown size="mini">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">{{ $t('user.other.More') }}</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-circle-close"><span @click="handleCommand(scope.$index, scope.row,'b')">
{{ $t('auto.common.Cancel') }}</span>
</el-dropdown-item>
<el-dropdown-item icon="el-icon-folder-add"><span @click="handleCommand(scope.$index, scope.row,'c')">
{{ $t('task.select.Create_command') }}</span>
</el-dropdown-item>
<el-dropdown-item icon="el-icon-finished"><span @click="handleCommand(scope.$index, scope.row,'d')">
{{ $t('task.select.Forced_Completed') }}
</span></el-dropdown-item>
<el-dropdown-item icon="el-icon-circle-close"><span @click="handleCommand(scope.$index, scope.row,'e')">
{{ $t('task.select.Cancel_Tasks_And_Commands') }}
</span></el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="text" icon="el-icon-d-arrow-right" @click="handleCommand(scope.$index, scope.row,'b')">
{{ $t('auto.common.Cancel') }}
</el-button>
<el-button type="text" icon="el-icon-folder-add" @click="handleCommand(scope.$index, scope.row,'c')">
{{ $t('task.select.Create_command') }}
</el-button>
<el-button type="text" icon="el-icon-finished" @click="handleCommand(scope.$index, scope.row,'d')">
{{ $t('task.select.Forced_Completed') }}
</el-button>
<el-button type="text" icon="el-icon-circle-close" @click="handleCommand(scope.$index, scope.row,'e')">
{{ $t('task.select.Cancel_Tasks_And_Commands') }}
</el-button>
</template>
</el-table-column>
</el-table>
@@ -742,6 +746,7 @@ export default {
vehicle_type: null,
task_type: '1',
storage_task_type: '',
empty_site: '',
task_status: null,
priority: 1,
start_point_code: null,