opt: 历史任务记录显示起点2终点2,监控大屏2秒刷新

This commit is contained in:
yanps
2024-05-14 09:00:00 +08:00
parent 9bbe7c8b68
commit 4df8527bb4
7 changed files with 125 additions and 105 deletions

View File

@@ -197,7 +197,6 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
//未联机 //未联机
} else if (mode == 0) { } else if (mode == 0) {
this.setIsonline(false); this.setIsonline(false);
this.setIserror(true);
message = "未联机"; message = "未联机";
//有报警 //有报警
} else if (error != 0) { } else if (error != 0) {

View File

@@ -127,7 +127,7 @@ public class ItemProtocol {
Boolean isonline; Boolean isonline;
Boolean isError; Boolean isError = false;
public int getOpcIntegerValue(String protocol) { public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol); Integer value = this.driver.getIntegeregerValue(protocol);

View File

@@ -113,7 +113,7 @@ public class ItemProtocol {
} }
Boolean isonline; Boolean isonline;
Boolean isError; Boolean isError = false;
public int getOpcIntegerValue(String protocol) { public int getOpcIntegerValue(String protocol) {
Integer value = this.driver.getIntegeregerValue(protocol); Integer value = this.driver.getIntegeregerValue(protocol);

View File

@@ -235,6 +235,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
String status = (String) whereJson.get("status"); String status = (String) whereJson.get("status");
String point_code = (String) whereJson.get("point_code"); String point_code = (String) whereJson.get("point_code");
String create_time = (String) whereJson.get("createTime"); String create_time = (String) whereJson.get("createTime");
String type = (String) whereJson.get("type");
String end_time = (String) whereJson.get("end_time"); String end_time = (String) whereJson.get("end_time");
IPage<InstructionMybatis> queryPage = PageUtil.toMybatisPage(page); IPage<InstructionMybatis> queryPage = PageUtil.toMybatisPage(page);
@@ -252,6 +253,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (!StrUtil.isEmpty(status)) { if (!StrUtil.isEmpty(status)) {
wrapper.eq(InstructionMybatis::getInstruction_status, status); wrapper.eq(InstructionMybatis::getInstruction_status, status);
} }
if (!StrUtil.isEmpty(type)) {
wrapper.eq(InstructionMybatis::getInstruction_type, type);
}
if (!StrUtil.isEmpty(point_code)) { if (!StrUtil.isEmpty(point_code)) {
wrapper.and(instructionMybatis -> instructionMybatis.like(InstructionMybatis::getStart_point_code, point_code).or().like(InstructionMybatis::getNext_point_code, point_code)); wrapper.and(instructionMybatis -> instructionMybatis.like(InstructionMybatis::getStart_point_code, point_code).or().like(InstructionMybatis::getNext_point_code, point_code));
} }

View File

@@ -60,6 +60,20 @@
<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-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('task.txt_box.Task_type')">
<el-select
v-model="query.type"
clearable
filterable
size="small"
:placeholder="$t('task.txt_box.Task_type')"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<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.Origin_or_destination')"> <el-form-item :label="$t('task.txt_box.Origin_or_destination')">
<el-input <el-input
v-model="query.point_code" v-model="query.point_code"
@@ -200,7 +214,7 @@ const defaultForm = {
update_time: null update_time: null
} }
export default { export default {
dicts: ['task_status'], dicts: ['task_status', 'task_type'],
name: 'Instruction', name: 'Instruction',
components: { pagination, crudOperation, Search }, components: { pagination, crudOperation, Search },
mixins: [presenter(), header(), form(defaultForm), crud()], mixins: [presenter(), header(), form(defaultForm), crud()],

View File

@@ -293,6 +293,8 @@
<el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" /> <el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" />
<el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" /> <el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" />
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" /> <el-table-column prop="next_point_code" :label="$t('task.select.Destination')" />
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" /> <el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" />
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" /> <el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
<el-table-column prop="remark" :label="$t('task.select.Remark')" /> <el-table-column prop="remark" :label="$t('task.select.Remark')" />

View File

@@ -9,7 +9,7 @@
/> />
</el-select> </el-select>
<el-row> <el-row>
<div id="container" className="container" style="min-height: 100%"/> <div id="container" className="container" style="min-height: 100%" />
</el-row> </el-row>
<!--点击设备显示信息--> <!--点击设备显示信息-->
<el-dialog <el-dialog
@@ -41,10 +41,10 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.bar_code')" label-width="120px"> <el-form-item :label="$t('monitor.click.bar_code')" label-width="120px">
<el-input v-model="form.hand_barcode" :disabled="false"/> <el-input v-model="form.hand_barcode" :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px"> <el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -62,7 +62,7 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible3" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible3" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="80px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="80px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.device_status')" label-width="80px"> <el-form-item :label="$t('monitor.click.device_status')" label-width="80px">
<el-radio-group v-model="form.hasGoodStatus"> <el-radio-group v-model="form.hasGoodStatus">
@@ -72,7 +72,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.material_code')" prop="material_type" label-width="80px"> <el-form-item :label="$t('monitor.click.material_code')" prop="material_type" label-width="80px">
<el-input v-model="form.material_type"/> <el-input v-model="form.material_type" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@@ -85,7 +85,7 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible4" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible4" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.disabled_manipulator')" prop="is_disable" label-width="120px"> <el-form-item :label="$t('monitor.click.disabled_manipulator')" prop="is_disable" label-width="120px">
<el-radio-group v-model="form.is_disable"> <el-radio-group v-model="form.is_disable">
@@ -109,7 +109,7 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible5" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible5" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px"> <el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -127,10 +127,10 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible7" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible7" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.bar_code')" label-width="120px"> <el-form-item :label="$t('monitor.click.bar_code')" label-width="120px">
<el-input v-model="form.hand_barcode" :disabled="false"/> <el-input v-model="form.hand_barcode" :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px"> <el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -148,7 +148,7 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible6" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible6" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item label="申请指令标记" prop="requireSucess" label-width="120px"> <el-form-item label="申请指令标记" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -173,11 +173,11 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible1" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible1" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="80px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="80px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.bar_code')" prop="device_code" label-width="80px"> <el-form-item :label="$t('monitor.click.bar_code')" prop="device_code" label-width="80px">
<el-input v-model="form.barcode" :disabled="false"/> <el-input v-model="form.barcode" :disabled="false" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@@ -190,7 +190,7 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible8" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible8" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.job_command')" prop="toCommand" label-width="120px"> <el-form-item :label="$t('monitor.click.job_command')" prop="toCommand" label-width="120px">
<el-radio-group v-model="form.toCommand"> <el-radio-group v-model="form.toCommand">
@@ -200,13 +200,13 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.keep_out_of_storage')" prop="prohibitInWarehouse" label-width="120px"> <el-form-item :label="$t('monitor.click.keep_out_of_storage')" prop="prohibitInWarehouse" label-width="120px">
<el-switch v-model="form.prohibitInWarehouse"/> <el-switch v-model="form.prohibitInWarehouse" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.no_release')" prop="prohibitOutWarehouse" label-width="120px"> <el-form-item :label="$t('monitor.click.no_release')" prop="prohibitOutWarehouse" label-width="120px">
<el-switch v-model="form.prohibitOutWarehouse"/> <el-switch v-model="form.prohibitOutWarehouse" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.stop_task')" prop="stopReceiveTask" label-width="120px"> <el-form-item :label="$t('monitor.click.stop_task')" prop="stopReceiveTask" label-width="120px">
<el-switch v-model="form.stopReceiveTask"/> <el-switch v-model="form.stopReceiveTask" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.requireSucess')" prop="applySucess" label-width="120px"> <el-form-item :label="$t('monitor.click.requireSucess')" prop="applySucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -223,13 +223,13 @@
<el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible10" width="35%"> <el-dialog :title="$t('monitor.click.device_setup')" :visible.sync="dialogFormVisible10" width="35%">
<el-form :model="form" size="small"> <el-form :model="form" size="small">
<el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px"> <el-form-item :label="$t('monitor.click.equipment_number')" prop="device_code" label-width="120px">
<el-input v-model="form.device_code" :disabled="true"/> <el-input v-model="form.device_code" :disabled="true" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.bar_code')" label-width="120px"> <el-form-item :label="$t('monitor.click.bar_code')" label-width="120px">
<el-input v-model="form.hand_barcode" :disabled="false"/> <el-input v-model="form.hand_barcode" :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.material_code')" label-width="120px"> <el-form-item :label="$t('monitor.click.material_code')" label-width="120px">
<el-input v-model="form.hand_material_barcode" :disabled="false"/> <el-input v-model="form.hand_material_barcode" :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px"> <el-form-item :label="$t('monitor.click.request_flag')" prop="requireSucess" label-width="120px">
<el-radio-group v-model="form.requireSucess"> <el-radio-group v-model="form.requireSucess">
@@ -250,13 +250,13 @@
import crudStage from '@/api/logicflow/stage' import crudStage from '@/api/logicflow/stage'
import bgMonitor from '@/assets/images/bg_monitor.jpg' import bgMonitor from '@/assets/images/bg_monitor.jpg'
import deviceCrud from '@/api/acs/device/device' import deviceCrud from '@/api/acs/device/device'
import {getDeviceByCodes} from '@/api/acs/device/deviceStageMonitor' import { getDeviceByCodes } from '@/api/acs/device/deviceStageMonitor'
import '@logicflow/core/dist/style/index.css' import '@logicflow/core/dist/style/index.css'
import '@logicflow/extension/lib/style/index.css' import '@logicflow/extension/lib/style/index.css'
import {LogicFlow} from '@logicflow/core' import { LogicFlow } from '@logicflow/core'
import {registerCustomElement} from '@/views/system/logicflow/editor/components/node' import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
import i18n from '@/i18n' import i18n from '@/i18n'
import {selectStageList} from '@/api/acs/stage/stage' import { selectStageList } from '@/api/acs/stage/stage'
let data = {} let data = {}
let lf = '' let lf = ''
@@ -351,10 +351,10 @@ export default {
}) })
lf.setTheme( lf.setTheme(
{ {
baseEdge: {strokeWidth: 1}, baseEdge: { strokeWidth: 1 },
baseNode: {strokeWidth: 1}, baseNode: { strokeWidth: 1 },
nodeText: {overflowMode: 'autoWrap', lineHeight: 1.5}, nodeText: { overflowMode: 'autoWrap', lineHeight: 1.5 },
edgeText: {overflowMode: 'autoWrap', lineHeight: 1.5} edgeText: { overflowMode: 'autoWrap', lineHeight: 1.5 }
} }
) )
// 注册自定义元素 // 注册自定义元素
@@ -386,6 +386,7 @@ export default {
// 开始渲染 // 开始渲染
lf.render(data) lf.render(data)
this.initStageData() this.initStageData()
this.changeStage(this.stage_code)
}, },
getStages() { getStages() {
selectStageList().then(data => { selectStageList().then(data => {
@@ -515,9 +516,9 @@ export default {
tempDeviceName = item.data.in_device_name tempDeviceName = item.data.in_device_name
} }
this.arr = [ this.arr = [
{name: i18n.t('monitor.click.equipment_number'), value: item.device_code}, { name: i18n.t('monitor.click.equipment_number'), value: item.device_code },
// { name: tempDeviceName, value: item.device_name } // { name: tempDeviceName, value: item.device_name }
{name: i18n.t('monitor.click.device_name'), value: tempDeviceName} { name: i18n.t('monitor.click.device_name'), value: tempDeviceName }
// { name: i18n.t('monitor.click.device_name'), value: item.device_name } // { name: i18n.t('monitor.click.device_name'), value: item.device_name }
] ]
const data = item.data const data = item.data
@@ -526,215 +527,215 @@ export default {
continue continue
} }
if (val === 'message' && data.isError === true) { if (val === 'message' && data.isError === true) {
const obj = {name: i18n.t('monitor.click.device_information'), value: data[val]} const obj = { name: i18n.t('monitor.click.device_information'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} }
if (val === 'message' && data.isError === 'false') { if (val === 'message' && data.isError === 'false') {
const obj = {name: i18n.t('monitor.click.exception_message'), value: data[val]} const obj = { name: i18n.t('monitor.click.exception_message'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} }
if (val === 'move') { if (val === 'move') {
const obj = {name: i18n.t('monitor.click.photoelectric_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.photoelectric_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'mode') { } else if (val === 'mode') {
const obj = {name: i18n.t('monitor.click.mode'), value: data[val]} const obj = { name: i18n.t('monitor.click.mode'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'error') { } else if (val === 'error') {
const obj = {name: i18n.t('monitor.click.alarm'), value: data[val]} const obj = { name: i18n.t('monitor.click.alarm'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'ip') { } else if (val === 'ip') {
const obj = {name: 'IP', value: data[val]} const obj = { name: 'IP', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'number') { } else if (val === 'number') {
const obj = {name: i18n.t('monitor.click.pallet_quantity'), value: data[val]} const obj = { name: i18n.t('monitor.click.pallet_quantity'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'inst_message') { } else if (val === 'inst_message') {
const obj = {name: i18n.t('monitor.click.instruction_information'), value: data[val]} const obj = { name: i18n.t('monitor.click.instruction_information'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'message') { } else if (val === 'message') {
const obj = {name: i18n.t('monitor.click.note_information'), value: data[val]} const obj = { name: i18n.t('monitor.click.note_information'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'inst_message') { } else if (val === 'inst_message') {
const obj = {name: i18n.t('monitor.click.current_instruction_message'), value: data[val]} const obj = { name: i18n.t('monitor.click.current_instruction_message'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'last_inst_message') { } else if (val === 'last_inst_message') {
const obj = {name: i18n.t('monitor.click.last_instruction_message'), value: data[val]} const obj = { name: i18n.t('monitor.click.last_instruction_message'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'container_type') { } else if (val === 'container_type') {
const obj = {name: '托盘类型', value: data[val]} const obj = { name: '托盘类型', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'barcode') { } else if (val === 'barcode') {
const obj = {name: i18n.t('monitor.click.barcode'), value: data[val]} const obj = { name: i18n.t('monitor.click.barcode'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'barcode_length') { } else if (val === 'barcode_length') {
const obj = {name: i18n.t('monitor.click.barcode_length'), value: data[val]} const obj = { name: i18n.t('monitor.click.barcode_length'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'last_container') { } else if (val === 'last_container') {
const obj = {name: i18n.t('monitor.click.last_container'), value: data[val]} const obj = { name: i18n.t('monitor.click.last_container'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'instruction_code') { } else if (val === 'instruction_code') {
const obj = {name: i18n.t('monitor.click.current_instruction_message'), value: data[val]} const obj = { name: i18n.t('monitor.click.current_instruction_message'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'task_code') { } else if (val === 'task_code') {
const obj = {name: i18n.t('monitor.click.task_number'), value: data[val]} const obj = { name: i18n.t('monitor.click.task_number'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'last_instruction_code') { } else if (val === 'last_instruction_code') {
const obj = {name: i18n.t('monitor.click.last_instruction_message'), value: data[val]} const obj = { name: i18n.t('monitor.click.last_instruction_message'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'action') { } else if (val === 'action') {
const obj = {name: i18n.t('monitor.click.action_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.action_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'io_action') { } else if (val === 'io_action') {
const obj = {name: i18n.t('monitor.click.clearance_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.clearance_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'material') { } else if (val === 'material') {
const obj = {name: i18n.t('monitor.click.materiel'), value: data[val]} const obj = { name: i18n.t('monitor.click.materiel'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'batch') { } else if (val === 'batch') {
const obj = {name: i18n.t('monitor.click.lot'), value: data[val]} const obj = { name: i18n.t('monitor.click.lot'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'requestSucess') { } else if (val === 'requestSucess') {
const obj = {name: i18n.t('monitor.click.request_task'), value: data[val]} const obj = { name: i18n.t('monitor.click.request_task'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'applySucess') { } else if (val === 'applySucess') {
const obj = {name: i18n.t('monitor.click.request_order'), value: data[val]} const obj = { name: i18n.t('monitor.click.request_order'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'requireApplyLabelingSuccess') { } else if (val === 'requireApplyLabelingSuccess') {
const obj = {name: i18n.t('monitor.click.apply_labeling'), value: data[val]} const obj = { name: i18n.t('monitor.click.apply_labeling'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'requireApplyLaStrangulationSuccess') { } else if (val === 'requireApplyLaStrangulationSuccess') {
const obj = {name: i18n.t('monitor.click.apply_for_bundling'), value: data[val]} const obj = { name: i18n.t('monitor.click.apply_for_bundling'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'status') { } else if (val === 'status') {
const obj = {name: i18n.t('monitor.click.device_status'), value: data[val]} const obj = { name: i18n.t('monitor.click.device_status'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'weight') { } else if (val === 'weight') {
const obj = {name: i18n.t('monitor.click.weight'), value: data[val]} const obj = { name: i18n.t('monitor.click.weight'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'move_1') { } else if (val === 'move_1') {
const obj = {name: i18n.t('monitor.click.front_station_photoelectric_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.front_station_photoelectric_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'open') { } else if (val === 'open') {
const obj = {name: i18n.t('monitor.click.open'), value: data[val]} const obj = { name: i18n.t('monitor.click.open'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'close') { } else if (val === 'close') {
const obj = {name: i18n.t('monitor.click.close'), value: data[val]} const obj = { name: i18n.t('monitor.click.close'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'phase') { } else if (val === 'phase') {
const obj = {name: i18n.t('monitor.click.AGV_phase'), value: data[val]} const obj = { name: i18n.t('monitor.click.AGV_phase'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'phase_name') { } else if (val === 'phase_name') {
const obj = {name: i18n.t('monitor.click.description_of_the_AGV_phase'), value: data[val]} const obj = { name: i18n.t('monitor.click.description_of_the_AGV_phase'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'option') { } else if (val === 'option') {
const obj = {name: i18n.t('monitor.click.AGV_action'), value: data[val]} const obj = { name: i18n.t('monitor.click.AGV_action'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'agv_power') { } else if (val === 'agv_power') {
const obj = {name: i18n.t('monitor.click.AGV_power'), value: data[val]} const obj = { name: i18n.t('monitor.click.AGV_power'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'move_2') { } else if (val === 'move_2') {
const obj = {name: i18n.t('monitor.click.station_photoelectric_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.station_photoelectric_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'action_1') { } else if (val === 'action_1') {
const obj = {name: i18n.t('monitor.click.front_station_action_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.front_station_action_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'action_2') { } else if (val === 'action_2') {
const obj = {name: i18n.t('monitor.click.back_station_action_signal'), value: data[val]} const obj = { name: i18n.t('monitor.click.back_station_action_signal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'walk_y') { } else if (val === 'walk_y') {
const obj = {name: i18n.t('monitor.click.walk_y'), value: data[val]} const obj = { name: i18n.t('monitor.click.walk_y'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'task1') { } else if (val === 'task1') {
const obj = {name: i18n.t('monitor.click.previous_station_task'), value: data[val]} const obj = { name: i18n.t('monitor.click.previous_station_task'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'task2') { } else if (val === 'task2') {
const obj = {name: i18n.t('monitor.click.back_station_task'), value: data[val]} const obj = { name: i18n.t('monitor.click.back_station_task'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'task') { } else if (val === 'task') {
const obj = {name: i18n.t('monitor.click.task_number'), value: data[val]} const obj = { name: i18n.t('monitor.click.task_number'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'is_disable') { } else if (val === 'is_disable') {
const obj = {name: i18n.t('monitor.click.disable'), value: data[val]} const obj = { name: i18n.t('monitor.click.disable'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'temperature') { } else if (val === 'temperature') {
const obj = {name: i18n.t('monitor.click.current_temperature'), value: data[val]} const obj = { name: i18n.t('monitor.click.current_temperature'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'finish') { } else if (val === 'finish') {
const obj = {name: i18n.t('monitor.click.oven_finish'), value: data[val]} const obj = { name: i18n.t('monitor.click.oven_finish'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'countdown_house') { } else if (val === 'countdown_house') {
const obj = {name: i18n.t('monitor.click.house'), value: data[val]} const obj = { name: i18n.t('monitor.click.house'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'countdown_min') { } else if (val === 'countdown_min') {
const obj = {name: i18n.t('monitor.click.minutes'), value: data[val]} const obj = { name: i18n.t('monitor.click.minutes'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'countdown_sec') { } else if (val === 'countdown_sec') {
const obj = {name: i18n.t('monitor.click.seconds'), value: data[val]} const obj = { name: i18n.t('monitor.click.seconds'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'door') { } else if (val === 'door') {
const obj = {name: i18n.t('monitor.click.gate_state'), value: data[val]} const obj = { name: i18n.t('monitor.click.gate_state'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'notCreateTaskMessage') { } else if (val === 'notCreateTaskMessage') {
const obj = {name: i18n.t('monitor.click.task_creation_failure'), value: data[val]} const obj = { name: i18n.t('monitor.click.task_creation_failure'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'notCreateInstMessage') { } else if (val === 'notCreateInstMessage') {
const obj = {name: i18n.t('monitor.click.failed_to_create_instruction'), value: data[val]} const obj = { name: i18n.t('monitor.click.failed_to_create_instruction'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'feedMessage') { } else if (val === 'feedMessage') {
const obj = {name: i18n.t('monitor.click.no_electrical_signal_feedback_cause'), value: data[val]} const obj = { name: i18n.t('monitor.click.no_electrical_signal_feedback_cause'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'requireSucess') { } else if (val === 'requireSucess') {
const obj = {name: i18n.t('monitor.click.request_success_flag'), value: data[val]} const obj = { name: i18n.t('monitor.click.request_success_flag'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'applySucess') { } else if (val === 'applySucess') {
const obj = {name: 'applySucess', value: data[val]} const obj = { name: 'applySucess', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'out_finish') { } else if (val === 'out_finish') {
const obj = {name: i18n.t('monitor.click.delivery_completed'), value: data[val]} const obj = { name: i18n.t('monitor.click.delivery_completed'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'inventory_qty') { } else if (val === 'inventory_qty') {
const obj = {name: i18n.t('monitor.click.inventory_quantity'), value: data[val]} const obj = { name: i18n.t('monitor.click.inventory_quantity'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'hand_barcode') { } else if (val === 'hand_barcode') {
const obj = {name: 'hand_barcode', value: data[val]} const obj = { name: 'hand_barcode', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'x') { } else if (val === 'x') {
const obj = {name: 'X', value: data[val]} const obj = { name: 'X', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'y') { } else if (val === 'y') {
const obj = {name: 'Y', value: data[val]} const obj = { name: 'Y', value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'angle') { } else if (val === 'angle') {
const obj = {name: i18n.t('monitor.click.angle'), value: data[val]} const obj = { name: i18n.t('monitor.click.angle'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'electricity') { } else if (val === 'electricity') {
const obj = {name: i18n.t('monitor.click.electric_quantity'), value: data[val]} const obj = { name: i18n.t('monitor.click.electric_quantity'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'status_name') { } else if (val === 'status_name') {
const obj = {name: i18n.t('monitor.click.status'), value: data[val]} const obj = { name: i18n.t('monitor.click.status'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'fault') { } else if (val === 'fault') {
const obj = {name: i18n.t('monitor.click.abnormal'), value: data[val]} const obj = { name: i18n.t('monitor.click.abnormal'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'map_id') { } else if (val === 'map_id') {
const obj = {name: i18n.t('monitor.click.floor'), value: data[val]} const obj = { name: i18n.t('monitor.click.floor'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'power') { } else if (val === 'power') {
const obj = {name: i18n.t('monitor.click.electric_quantity'), value: data[val]} const obj = { name: i18n.t('monitor.click.electric_quantity'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'pallet') { } else if (val === 'pallet') {
const obj = {name: i18n.t('monitor.click.tray'), value: data[val]} const obj = { name: i18n.t('monitor.click.tray'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'load') { } else if (val === 'load') {
const obj = {name: i18n.t('monitor.click.loading_or_not'), value: data[val]} const obj = { name: i18n.t('monitor.click.loading_or_not'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'alarm') { } else if (val === 'alarm') {
const obj = {name: i18n.t('monitor.click.alarm'), value: data[val]} const obj = { name: i18n.t('monitor.click.alarm'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} else if (val === 'task_id') { } else if (val === 'task_id') {
const obj = {name: i18n.t('monitor.click.task_number'), value: data[val]} const obj = { name: i18n.t('monitor.click.task_number'), value: data[val] }
this.arr.push(obj) this.arr.push(obj)
} }
} }
@@ -743,7 +744,7 @@ export default {
}, },
initStatus() { // 初始化所有节点的设备信息通过节点id对应设备编号 initStatus() { // 初始化所有节点的设备信息通过节点id对应设备编号
let resion = {} let resion = {}
resion = lf.getGraphData().nodes.map(item => ({id: item.id, device_code: item.properties.device})) resion = lf.getGraphData().nodes.map(item => ({ id: item.id, device_code: item.properties.device }))
getDeviceByCodes(resion).then(res => { getDeviceByCodes(resion).then(res => {
console.log(res) console.log(res)
this.allDeviceMsg = res // 拿到所有节点的设备数据 this.allDeviceMsg = res // 拿到所有节点的设备数据
@@ -769,7 +770,7 @@ export default {
} }
} }
// 设置动态实时显示设备信息 // 设置动态实时显示设备信息
const {nodes} = lf.getSelectElements() // 获取选中的节点 const { nodes } = lf.getSelectElements() // 获取选中的节点
// console.log(nodes) // console.log(nodes)
if (nodes.length === 1) { // 因为是定时器,没有选中则不用实时更新显示数据 if (nodes.length === 1) { // 因为是定时器,没有选中则不用实时更新显示数据
this.moveShow(nodes[0]) // 监控模式下不可能托选,因此就只有一个数据 this.moveShow(nodes[0]) // 监控模式下不可能托选,因此就只有一个数据
@@ -778,7 +779,7 @@ export default {
}, },
dialogSave() { dialogSave() {
deviceCrud.changeDeviceStatus(this.form).then(res => { deviceCrud.changeDeviceStatus(this.form).then(res => {
this.$notify({title: '操作成功', message: '', type: 'success'}) this.$notify({ title: '操作成功', message: '', type: 'success' })
this.dialogFormVisible = false this.dialogFormVisible = false
this.dialogFormVisible3 = false this.dialogFormVisible3 = false
this.dialogFormVisible4 = false this.dialogFormVisible4 = false