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");
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("mode", mode);
jo.put("move", move);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -654,6 +654,9 @@ export default {
} else if (val === 'task') {
const obj = { name: i18n.t('monitor.click.task_number'), value: data[val] }
this.arr.push(obj)
} else if (val === 'last_task') {
const obj = { name: '上次任务号', value: data[val] }
this.arr.push(obj)
} else if (val === 'is_disable') {
const obj = { name: i18n.t('monitor.click.disable'), value: data[val] }
this.arr.push(obj)