diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java index 118518e1c..0fa3a318f 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/ItemProtocol.java @@ -117,7 +117,7 @@ public class ItemProtocol { } Boolean isonline; - Boolean isError; + Boolean isError = false; public int getOpcIntegerValue(String protocol) { Integer value = this.driver.getIntegeregerValue(protocol); diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java index eccbc630d..dd1af3069 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/two_conveyor/slit_two_manipulator/SlitTwoManipulatorDeviceDriver.java @@ -769,7 +769,8 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl @Override public JSONObject getDeviceStatusName() { - JSONObject jo = new JSONObject(); + Map map = new LinkedHashMap<>(); + String move_1 = ""; String move_2 = ""; String action = ""; @@ -840,25 +841,26 @@ public class SlitTwoManipulatorDeviceDriver extends AbstractOpcDeviceDriver impl iserror = false; } } - jo.put("requireSucess", requireSucess); - jo.put("device_name", this.getDevice().getDevice_name()); - jo.put("mode", mode); - jo.put("move_1", move_1); - jo.put("move_2", move_2); - jo.put("action", action); - jo.put("walk_y", walk_y); - jo.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); - jo.put("task", this.getTask()); - jo.put("isOnline", this.getIsonline()); - jo.put("isError", this.getIserror()); - jo.put("is_disable1", this.getIs_disable()); - jo.put("is_disable", is_disable); - jo.put("message", message); - jo.put("is_click", true); - jo.put("driver_type", "slit_two_manipulator"); - jo.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage)); - jo.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage)); - jo.put("feedMessage", LangProcess.msg(feedMessage)); + map.put("device_name", this.getDevice().getDevice_name()); + map.put("mode", mode); + map.put("action", action); + map.put("walk_y", walk_y); + map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError()))); + map.put("task", this.getTask()); + map.put("isOnline", this.getIsonline()); + map.put("isError", this.getIserror()); + map.put("is_disable1", this.getIs_disable()); + map.put("is_disable", is_disable); + map.put("is_click", true); + map.put("driver_type", "slit_two_manipulator"); + map.put("requireSucess", requireSucess); + map.put("move_1", move_1); + map.put("move_2", move_2); + map.put("message", message); + map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage)); + map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage)); + map.put("feedMessage", LangProcess.msg(feedMessage)); + JSONObject jo = new JSONObject(map); return jo; } diff --git a/acs2/nladmin-ui/src/views/monitor/logQuery/index.vue b/acs2/nladmin-ui/src/views/monitor/logQuery/index.vue index 31e0157d4..7188811f0 100644 --- a/acs2/nladmin-ui/src/views/monitor/logQuery/index.vue +++ b/acs2/nladmin-ui/src/views/monitor/logQuery/index.vue @@ -16,8 +16,20 @@ - - + + + + + + @@ -54,7 +66,7 @@ export default { page: 0 }, query: { - createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))], + createTime: [new Date(new Date().setTime(new Date().getTime() - 3600 * 1000)), new Date(new Date().setTime(new Date().getTime() + 3600 * 1000))] } }) }, @@ -66,13 +78,27 @@ export default { edit: ['admin', 'param:edit'], del: ['admin', 'param:del'] }, - rules: {} } }, created() { }, methods: { + truncateOrFullText(text) { + if (text.length > 1000) { + return text.slice(0, 1000) + '...' + } + return text + }, + handleClick(content) { + if (content.length > 1000) { + this.$alert(content, '完整内容', { + confirmButtonText: '关闭', + dangerouslyUseHTMLString: true, + customClass: 'full-content-alert' + }) + } + }, // 钩子:在获取表格数据之前执行,false 则代表不获取数据 [CRUD.HOOK.beforeRefresh]() { return true @@ -103,6 +129,18 @@ export default {