opt: 监控页面设备信息显示优化

This commit is contained in:
yanps
2024-05-15 11:21:23 +08:00
parent 1a0e0fe86c
commit 34a84e5bb6
7 changed files with 63 additions and 53 deletions

View File

@@ -437,6 +437,10 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp
move = LangProcess.msg("universal_two_yes"); move = LangProcess.msg("universal_two_yes");
jo.put("hasGoods", true); jo.put("hasGoods", true);
} }
action = LangProcess.msg("universal_actionMessage1");
if(this.action == 1){
action = LangProcess.msg("universal_actionMessage2");
}
jo.put("device_name", this.getDevice().getDevice_name()); jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode); jo.put("mode", mode);
jo.put("move", move); jo.put("move", move);

View File

@@ -593,7 +593,8 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
@Override @Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject(); Map<String, Object> map = new LinkedHashMap<>();
String mode = ""; String mode = "";
String move = ""; String move = "";
String carrier_direction = ""; String carrier_direction = "";
@@ -609,13 +610,13 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
if (this.getMove() == 0) { if (this.getMove() == 0) {
move = LangProcess.msg("universal_no"); move = LangProcess.msg("universal_no");
jo.put("hasGoods", false); map.put("hasGoods", false);
} else if (this.getMove() == 1) { } else if (this.getMove() == 1) {
move = LangProcess.msg("universal_yes"); move = LangProcess.msg("universal_yes");
jo.put("hasGoods", true); map.put("hasGoods", true);
} else if (this.getMove() == 2) { } else if (this.getMove() == 2) {
move = LangProcess.msg("universal_two_yes"); move = LangProcess.msg("universal_two_yes");
jo.put("hasGoods", true); map.put("hasGoods", true);
} }
if (this.carrier_direction == 1) { if (this.carrier_direction == 1) {
@@ -623,29 +624,30 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
} else if (this.carrier_direction == 2) { } else if (this.carrier_direction == 2) {
carrier_direction = LangProcess.msg("universal_rollback"); carrier_direction = LangProcess.msg("universal_rollback");
} }
String requireSucess = "0"; String requireSucess = LangProcess.msg("universal_actionMessage4");
if (this.requireSucess) { if (this.requireSucess) {
requireSucess = "1"; requireSucess = LangProcess.msg("universal_actionMessage5");
} }
jo.put("device_name", this.getDevice().getDevice_name()); map.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode); map.put("mode", mode);
jo.put("move", move); map.put("move", move);
jo.put("carrier_direction", carrier_direction); map.put("carrier_direction", carrier_direction);
jo.put("task", task); map.put("task", task);
jo.put("last_task", last_task); map.put("last_task", last_task);
jo.put("task_code", task_code); /*map.put("task_code", task_code);*/
jo.put("inst_message", this.inst_message); map.put("isOnline", this.getIsonline());
jo.put("last_inst_message", this.last_inst_message); map.put("isError", this.getIserror());
jo.put("isOnline", this.getIsonline()); map.put("hand_barcode", hand_barcode);
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); map.put("barcode", this.getMove() == 0 ? null : checkInst() == null ? vehicle_code : checkInst().getVehicle_code());
jo.put("isError", this.getIserror()); map.put("is_click", true);
jo.put("message", LangProcess.msg(message)); map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
jo.put("hand_barcode", hand_barcode); map.put("requireSucess", requireSucess);
jo.put("barcode", this.getMove() == 0 ? null : checkInst() == null ? vehicle_code : checkInst().getVehicle_code()); map.put("driver_type", "siemens_conveyor");
jo.put("is_click", true); map.put("message", LangProcess.msg(message));
jo.put("requireSucess", requireSucess); map.put("inst_message", this.inst_message);
jo.put("driver_type", "siemens_conveyor"); map.put("last_inst_message", this.last_inst_message);
jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage)); map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
JSONObject jo = new JSONObject(map);
return jo; return jo;
} }

View File

@@ -311,7 +311,8 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
@Override @Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {
JSONObject jo = new JSONObject(); Map<String, Object> map = new LinkedHashMap<>();
String mode = ""; String mode = "";
String move = ""; String move = "";
String action = ""; String action = "";
@@ -328,20 +329,20 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
if (this.getMove() == 0) { if (this.getMove() == 0) {
move = LangProcess.msg("universal_no"); move = LangProcess.msg("universal_no");
jo.put("hasGoods", false); map.put("hasGoods", false);
} else if (this.getMove() == 1) { } else if (this.getMove() == 1) {
move = LangProcess.msg("universal_yes"); move = LangProcess.msg("universal_yes");
jo.put("hasGoods", true); map.put("hasGoods", true);
} else if (this.getMove() == 2) { } else if (this.getMove() == 2) {
move = LangProcess.msg("universal_two_yes"); move = LangProcess.msg("universal_two_yes");
jo.put("hasGoods", true); map.put("hasGoods", true);
} }
String requireSucess = "0"; String requireSucess = LangProcess.msg("universal_actionMessage4");
if (this.requireSucess) { if (this.requireSucess) {
requireSucess = "1"; requireSucess = LangProcess.msg("universal_actionMessage5");
} }
jo.put("requireSucess", requireSucess); map.put("requireSucess", requireSucess);
if (this.getAction() == 1) { if (this.getAction() == 1) {
action = LangProcess.msg("universal_delivery"); action = LangProcess.msg("universal_delivery");
} else if (this.getAction() == 2) { } else if (this.getAction() == 2) {
@@ -352,21 +353,22 @@ public class RgvDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDr
action = LangProcess.msg("universal_releasing_completed"); action = LangProcess.msg("universal_releasing_completed");
} }
jo.put("device_name", this.getDevice().getDevice_name()); map.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode); map.put("mode", mode);
jo.put("move", move); map.put("move", move);
jo.put("action", action); /*jo.put("action", action);*/
jo.put("task", task); /*jo.put("task", task);*/
jo.put("walk_y", walk_y); /*jo.put("walk_y", this.walk_y);*/
jo.put("isOnline", this.getIsonline()); map.put("isOnline", this.getIsonline());
jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
jo.put("isError", this.getIserror()); map.put("isError", this.getIserror());
jo.put("message", message); map.put("message", message);
jo.put("notCreateTaskMessage", notCreateTaskMessage); /*jo.put("notCreateTaskMessage", notCreateTaskMessage);
jo.put("notCreateInstMessage",notCreateInstMessage); jo.put("notCreateInstMessage",notCreateInstMessage);*/
jo.put("feedMessage", feedMessage); map.put("feedMessage", feedMessage);
jo.put("driver_type", "siemens_conveyor"); map.put("driver_type", "siemens_conveyor");
jo.put("is_click", true); map.put("is_click", true);
JSONObject jo = new JSONObject(map);
return jo; return jo;
} }

View File

@@ -236,7 +236,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
remark = remark + "光电信号(move)为有货状态,"; remark = remark + "光电信号(move)为有货状态,";
} }
if (task != 0) { if (task != 0) {
remark = "universal_remark4"; remark = "任务不等于0";
if (ObjectUtil.isNotEmpty(this.inst)) { if (ObjectUtil.isNotEmpty(this.inst)) {
this.inst = null; this.inst = null;
} }
@@ -1082,7 +1082,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
@Override @Override
public JSONObject getDeviceStatusName() { public JSONObject getDeviceStatusName() {
Map<String, Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
String mode = ""; String mode = "";
String move = ""; String move = "";
String action = ""; String action = "";

View File

@@ -211,11 +211,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
if (mode == 0) { if (mode == 0) {
this.setIsonline(false); this.setIsonline(false);
message = "universal_off-line"; message = LangProcess.msg("universal_off-line");
//有报警 //有报警
} else if (error != 0) { } else if (error != 0) {
this.setIserror(true); this.setIserror(true);
message = "universal_message3"; message = LangProcess.msg("universal_message3");
//无报警 //无报警
} else { } else {
this.setIsonline(true); this.setIsonline(true);

View File

@@ -256,11 +256,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
if (mode == 0) { if (mode == 0) {
this.setIsonline(false); this.setIsonline(false);
message = "universal_off-line"; message = LangProcess.msg("universal_off-line");
//有报警 //有报警
} else if (error != 0) { } else if (error != 0) {
this.setIserror(true); this.setIserror(true);
message = "universal_message3"; message = LangProcess.msg("universal_message3");
//无报警 //无报警
} else { } else {
this.setIsonline(true); this.setIsonline(true);

View File

@@ -654,6 +654,9 @@ export default {
} 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 === 'last_task') {
const obj = { name: '上次任务号', value: data[val] }
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)