From 5e29b1323d051893de577c1a33c8bd30545fde1e Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期一, 17 十一月 2025 13:40:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/jshdasrs' into jshdasrs
---
src/main/webapp/views/basErrLog/logDetl.html | 274 ++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 191 insertions(+), 83 deletions(-)
diff --git a/src/main/webapp/views/basErrLog/logDetl.html b/src/main/webapp/views/basErrLog/logDetl.html
index b04b078..007dd05 100644
--- a/src/main/webapp/views/basErrLog/logDetl.html
+++ b/src/main/webapp/views/basErrLog/logDetl.html
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title></title>
+ <title>鍫嗗灈鏈哄紓甯�</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -10,79 +10,180 @@
<link rel="stylesheet" href="../../static/css/cool.css" media="all">
<link rel="stylesheet" href="../../static/css/common.css" media="all">
<style>
+ body {
+ background: #f5f7fa;
+ font-family: "Microsoft YaHei", sans-serif;
+ margin: 0;
+ padding: 0;
+ }
+
+ /* 椤堕儴鏃堕棿鍖哄煙 */
+ .layui-inline {
+ background: #fff;
+ padding: 16px 20px;
+ border-radius: 10px;
+ box-shadow: 0 3px 12px rgba(0,0,0,0.06);
+ margin: 20px 0 0 20px;
+ display: inline-flex;
+ align-items: center;
+ }
+
+ .layui-form-label {
+ font-weight: bold;
+ }
+
+ /* 鏁翠綋瀹瑰櫒 */
+ #logContainer {
+ display: flex;
+ width: 100%;
+ margin-top: 20px;
+ height: 600px;
+ overflow-y: auto;
+ background: #fff;
+ border-radius: 12px;
+ box-shadow: 0 4px 18px rgba(0,0,0,0.08);
+ padding: 20px;
+ box-sizing: border-box;
+ }
+
+ /* 宸﹀彸鍒� */
+ .log-column {
+ flex: 1;
+ padding: 10px 20px;
+ box-sizing: border-box;
+ }
+
+ .log-column.left {
+ border-right: 1px solid #e5e5e5;
+ }
+
+ /* 鍒楁爣棰� */
+ .column-title {
+ text-align: center;
+ font-size: 20px;
+ font-weight: bold;
+ margin-bottom: 18px;
+ padding-bottom: 10px;
+ border-bottom: 2px solid #eee;
+ }
+
+ .title-red { color: #e74c3c; }
+ .title-green { color: #27ae60; }
+
+ ul li {
+ display: inline-block; /* 鏀规垚琛屽唴鍧楋紝鑷�傚簲瀹藉害 */
+ margin: 6px 6px 6px 0; /* 鍗$墖闂磋窛 */
+ padding: 8px 12px; /* 鍐呰竟璺� */
+ border-radius: 10px;
+ font-size: 14px;
+ box-shadow: 0 2px 6px rgba(0,0,0,0.08);
+ transition: all 0.2s;
+ white-space: nowrap; /* 闃叉鏂囧瓧鎹㈣锛屽崱鐗囧搴﹁嚜閫傚簲鍐呭 */
+ }
+
+ ul li:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 12px rgba(0,0,0,0.12);
+ cursor: default;
+ }
+
+ /* 寮傚父椤� */
+ .error-item {
+ color: #c0392b;
+ background: #fdecea;
+ border: 1px solid #f5c5c5;
+ }
+
+ /* 姝e父椤� */
+ .normal-item {
+ color: #1e8449;
+ background: #eafaf1;
+ border: 1px solid #c7e6d1;
+ }
+
</style>
</head>
<body>
-<div class="layui-inline" style="width:31%;margin-top: 20px">
+<div class="layui-inline">
<label class="layui-form-label">鍙戠敓鏃堕棿锛�</label>
<div class="layui-input-inline">
<input id="createTime" class="layui-input" type="text" disabled="disabled">
</div>
</div>
-<table class="layui-hide" id="logDetlByTime" lay-filter="logDetlByTime"></table>
-</body>
+
+<div id="logContainer">
+ <!-- 寮傚父鍒� -->
+ <div class="log-column left">
+ <h3 class="column-title title-red">寮傚父椤�(Y)</h3>
+ <ul id="errorList"></ul>
+ </div>
+
+ <!-- 姝e父鍒� -->
+ <div class="log-column">
+ <h3 class="column-title title-green">鏃犲紓甯搁」(N)</h3>
+ <ul id="normalList"></ul>
+ </div>
+</div>
+
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
-<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
<script type="text/javascript">
- var tableIns1; // 鍏ㄥ眬鍙橀噺
- var pageCur;
+ var parentUuid;
+
+ /** 鍒楃粨鏋� */
function getCol() {
- var cols = [
- {field: 'crnNo', align: 'center',title: '缂栧彿'}
- ,{field: 'ibDriveFault', align: 'center',title: '琛岃蛋鍙橀鍣ㄦ晠闅�'}
- ,{field: 'ibSupplyFault', align: 'center',title: '鎻愬叡鍙橀鍣ㄦ晠闅�'}
- ,{field: 'ibForkDriveFault', align: 'center',title: '璐у弶鍙橀鍣ㄦ晠闅�'}
- ,{field: 'ibDriveCircuitFault', align: 'center',title: '琛岃蛋鏂矾鍣ㄦ晠闅�'}
- ,{field: 'ibLiftCircuitFault', align: 'center',title: '鎻愬崌鏂矾鍣ㄦ晠闅�'}
- ,{field: 'ibForkCircuitFault', align: 'center',title: '璐у弶鏂矾鍣ㄦ晠闅�'}
- ,{field: 'ibForwardLimit', align: 'center',title: '鍓嶈繘闄愪綅',hide:true}
- ,{field: 'ibReverseLimit', align: 'center',title: '鍚庨��闄愪綅',hide:true}
- ,{field: 'ibDriveStart', align: 'center',title: '琛岃蛋鍘熺偣',hide:true}
- ,{field: 'ibForwardBrakeSpeed', align: 'center',title: '鍓嶈繘寮哄埗浣庨��',hide:true}
- ,{field: 'ibReverseBrakeSpeed', align: 'center',title: '鍚庨��寮哄埗浣庨��',hide:true}
- ,{field: 'ibUpLimit', align: 'center',title: '涓婂崌闄愪綅',hide:true}
- ,{field: 'ibDownLimit', align: 'center',title: '涓嬮檺闄愪綅',hide:true}
- ,{field: 'ibUpOrigin', align: 'center',title: '鎻愬崌鍘熺偣',hide:true}
- ,{field: 'ibUpBrakeSpeed', align: 'center',title: '涓婂崌寮哄埗浣庨��',hide:true}
- ,{field: 'ibDownBrakeSpeed', align: 'center',title: '涓嬮檷寮哄埗浣庨��',hide:true}
- ,{field: 'ibPlatformSignal', align: 'center',title: '杞借揣鍙版帰璐�'}
- ,{field: 'ibForkMidSignal', align: 'center',title: '璐у弶涓綅淇″彿'}
- ,{field: 'ibForkLeftLimit', align: 'center',title: '璐у弶宸︽瀬闄�'}
- // ,{field: 'id', align: 'center',title: ''}
- ,{field: 'ibForkRightLimit', align: 'center',title: '璐у弶鍙虫瀬闄�'}
- ,{field: 'ibFrontOverLimit', align: 'center',title: '鍓嶈秴闄�'}
- ,{field: 'ibRearOverLimit', align: 'center',title: '鍚庤秴闄�'}
- ,{field: 'ibLeftOverLimit', align: 'center',title: '宸﹁秴闄�'}
- ,{field: 'ibRightOverLimit', align: 'center',title: '鍙宠秴闄�'}
- ,{field: 'ibHighOverLimit1', align: 'center',title: '楂樿秴闄�1'}
- ,{field: 'ibHighOverLimit2', align: 'center',title: '楂樿秴闄�2'}
- ,{field: 'ibHighOverLimit3', align: 'center',title: '楂樿秴闄�3'}
- ,{field: 'ibOneExtendLeftLoad1', align: 'center',title: '涓�浼稿乏渚ф帰璐�1',hide:true}
- ,{field: 'ibOneExtendLeftLoad2', align: 'center',title: '涓�浼稿乏渚ф帰璐�2',hide:true}
- ,{field: 'ibOneExtendRightLoad1', align: 'center',title: '涓�浼稿彸渚ф帰璐�1',hide:true}
- ,{field: 'ibOneExtendRightLoad2', align: 'center',title: '涓�浼稿彸渚ф帰璐�2',hide:true}
- ,{field: 'ibTwoExtendLeftLoad1', align: 'center',title: '浜屼几宸︿晶鎺㈣揣1',hide:true}
- ,{field: 'ibTwoExtendLeftLoad2', align: 'center',title: '浜屼几宸︿晶鎺㈣揣2',hide:true}
- ,{field: 'ibTwoExtendRightLoad1', align: 'center',title: '浜屼几鍙充晶鎺㈣揣1',hide:true}
- ,{field: 'ibTwoExtendRightLoad2', align: 'center',title: '浜屼几鍙充晶鎺㈣揣2',hide:true}
- ,{field: 'ibSpeedSignal1', align: 'center',title: '瓒呴�熶俊鍙�1',hide:true}
- ,{field: 'ibSpeedSignal2', align: 'center',title: '瓒呴�熶俊鍙�2',hide:true}
- ,{field: 'ibOverweightSignal1', align: 'center',title: '瓒呴噸淇″彿1',hide:true}
- ,{field: 'ibOverweightSignal2', align: 'center',title: '瓒呴噸淇″彿2',hide:true}
- ,{field: 'ibRopeReleaseSignal1', align: 'center',title: '鏉剧怀淇″彿1',hide:true}
- ,{field: 'ibRopeReleaseSignal2', align: 'center',title: '鏉剧怀淇″彿2',hide:true}
- ,{field: 'ibSafetyClamp', align: 'center',title: '瀹夊叏閽�',hide:true}
- ,{field: 'ibTightener', align: 'center',title: '寮犵揣鍣�',hide:true}
- ,{field: 'ibSpeedLimiter', align: 'center',title: '闄愰�熷櫒',hide:true}
- ,{field: 'ibSafetyDoorOpen', align: 'center',title: '瀹夊叏闂ㄦ墦寮�',hide:true}
- ,{field: 'createTime$', align: 'center',title: '鍒涘缓鏃堕棿'}
+ return [
+ {field: 'crnNo', title: '缂栧彿'},
+ {field: 'ibDriveFault', title: '琛岃蛋鍙橀鍣ㄦ晠闅�'},
+ {field: 'ibSupplyFault', title: '鎻愬叡鍙橀鍣ㄦ晠闅�'},
+ {field: 'ibForkDriveFault', title: '璐у弶鍙橀鍣ㄦ晠闅�'},
+ {field: 'ibDriveCircuitFault', title: '琛岃蛋鏂矾鍣ㄦ晠闅�'},
+ {field: 'ibLiftCircuitFault', title: '鎻愬崌鏂矾鍣ㄦ晠闅�'},
+ {field: 'ibForkCircuitFault', title: '璐у弶鏂矾鍣ㄦ晠闅�'},
+ {field: 'ibForwardLimit', title: '鍓嶈繘闄愪綅'},
+ {field: 'ibReverseLimit', title: '鍚庨��闄愪綅'},
+ {field: 'ibDriveStart', title: '琛岃蛋鍘熺偣'},
+ {field: 'ibForwardBrakeSpeed', title: '鍓嶈繘寮哄埗浣庨��'},
+ {field: 'ibReverseBrakeSpeed', title: '鍚庨��寮哄埗浣庨��'},
+ {field: 'ibUpLimit', title: '涓婂崌闄愪綅'},
+ {field: 'ibDownLimit', title: '涓嬮檺闄愪綅'},
+ {field: 'ibUpOrigin', title: '鎻愬崌鍘熺偣'},
+ {field: 'ibUpBrakeSpeed', title: '涓婂崌寮哄埗浣庨��'},
+ {field: 'ibDownBrakeSpeed', title: '涓嬮檷寮哄埗浣庨��'},
+ {field: 'ibPlatformSignal', title: '杞借揣鍙版帰璐�'},
+ {field: 'ibForkMidSignal', title: '璐у弶涓綅淇″彿'},
+ {field: 'ibForkLeftLimit', title: '璐у弶宸︽瀬闄�'},
+ {field: 'ibForkRightLimit', title: '璐у弶鍙虫瀬闄�'},
+ {field: 'ibFrontOverLimit', title: '鍓嶈秴闄�'},
+ {field: 'ibRearOverLimit', title: '鍚庤秴闄�'},
+ {field: 'ibLeftOverLimit', title: '宸﹁秴闄�'},
+ {field: 'ibRightOverLimit', title: '鍙宠秴闄�'},
+ {field: 'ibHighOverLimit1', title: '楂樿秴闄�1'},
+ {field: 'ibHighOverLimit2', title: '楂樿秴闄�2'},
+ {field: 'ibHighOverLimit3', title: '楂樿秴闄�3'},
+ {field: 'ibOneExtendLeftLoad1', title: '涓�浼稿乏渚ф帰璐�1'},
+ {field: 'ibOneExtendLeftLoad2', title: '涓�浼稿乏渚ф帰璐�2'},
+ {field: 'ibOneExtendRightLoad1', title: '涓�浼稿彸渚ф帰璐�1'},
+ {field: 'ibOneExtendRightLoad2', title: '涓�浼稿彸渚ф帰璐�2'},
+ {field: 'ibTwoExtendLeftLoad1', title: '浜屼几宸︿晶鎺㈣揣1'},
+ {field: 'ibTwoExtendLeftLoad2', title: '浜屼几宸︿晶鎺㈣揣2'},
+ {field: 'ibTwoExtendRightLoad1', title: '浜屼几鍙充晶鎺㈣揣1'},
+ {field: 'ibTwoExtendRightLoad2', title: '浜屼几鍙充晶鎺㈣揣2'},
+ {field: 'ibSpeedSignal1', title: '瓒呴�熶俊鍙�1'},
+ {field: 'ibSpeedSignal2', title: '瓒呴�熶俊鍙�2'},
+ {field: 'ibOverweightSignal1', title: '瓒呴噸淇″彿1'},
+ {field: 'ibOverweightSignal2', title: '瓒呴噸淇″彿2'},
+ {field: 'ibRopeReleaseSignal1', title: '鏉剧怀淇″彿1'},
+ {field: 'ibRopeReleaseSignal2', title: '鏉剧怀淇″彿2'},
+ {field: 'ibSafetyClamp', title: '瀹夊叏閽�'},
+ {field: 'ibTightener', title: '寮犵揣鍣�'},
+ {field: 'ibSpeedLimiter', title: '闄愰�熷櫒'},
+ {field: 'ibSafetyDoorOpen', title: '瀹夊叏闂ㄦ墦寮�'}
];
- return cols;
}
- // 鏍煎紡鍖栨椂闂村嚱鏁�
+
+ /** 鏍煎紡鍖栨椂闂� */
function formatDateTime(isoString) {
const date = new Date(isoString);
const y = date.getFullYear();
@@ -94,40 +195,47 @@
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
}
- // 娓叉煋琛ㄦ牸鍑芥暟
- function renderTable() {
- if(!parentUuid) return; // 娌uid灏变笉娓叉煋
-
- layui.use(['table','form'], function(){
- var table = layui.table;
-
- tableIns1 = table.render({
- elem: '#logDetlByTime',
- url: baseUrl + '/basCrnErrorLog/listByUuid/auth',
- headers: { token: localStorage.getItem('token') },
- where: { uuid: parentUuid },
- page: true,
- limit: 16,
- cols: [getCol()],
- parseData: function(res){ // 杞崲鎺ュ彛杩斿洖鐨勬暟鎹�
- console.log(res);
- return res;
- }
- });
+ /** 娓叉煋鍙屽垪鍗$墖鍒楄〃 */
+ function renderList(data) {
+ const cols = getCol();
+ $("#errorList").empty();
+ $("#normalList").empty();
+ cols.forEach(col => {
+ const field = col.field;
+ const title = col.title;
+ if (data[field] === "Y") {
+ $("#errorList").append(`<li class="error-item">${title}</li>`);
+ } else if (data[field] === "N") {
+ $("#normalList").append(`<li class="normal-item">${title}</li>`);
+ }
});
}
- // 鐖堕〉闈㈣皟鐢� setUuid 鍚庤缃� uuid 骞舵覆鏌撹〃鏍�
+ /** 鏌ヨ鍚庣鏁版嵁 */
+ function renderTable() {
+ if (!parentUuid) return;
+ $.ajax({
+ url: baseUrl + '/basCrnErrorLog/listByUuid/auth',
+ method: 'GET',
+ headers: { token: localStorage.getItem('token') },
+ data: { uuid: parentUuid, curr: 1, limit: 1 },
+ success: function(res) {
+ if (res.code !== 200) return;
+ const record = res.data.records[0];
+ if (record) renderList(record);
+ }
+ });
+ }
+
+ /** 鐖堕〉闈㈣皟鐢� */
function setUuid(uuid){
parentUuid = uuid;
renderTable();
}
- // 鐖堕〉闈㈣皟鐢� setCreateTime 璁剧疆鏃堕棿鏄剧ず
function setCreateTime(value){
$('#createTime').val(formatDateTime(value));
}
-
</script>
+</body>
</html>
-
--
Gitblit v1.9.1