2023-10-24 15:02:42 +08:00
|
|
|
<!DOCTYPE html>
|
2023-10-28 14:26:40 +08:00
|
|
|
<html lang="en">
|
2023-10-24 15:02:42 +08:00
|
|
|
|
|
|
|
<head>
|
2023-10-28 14:26:40 +08:00
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>温湿度</title>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: Arial, sans-serif;
|
|
|
|
background-color: #f0f0f0;
|
|
|
|
}
|
2023-10-24 15:02:42 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
.tablecenter {
|
|
|
|
display: flex;
|
|
|
|
/* justify-content: center; */
|
|
|
|
/* align-items: center; */
|
|
|
|
height: 100vh;
|
|
|
|
}
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
table {
|
|
|
|
border-collapse: collapse;
|
|
|
|
width: 100%;
|
|
|
|
/* width: 700px; */
|
|
|
|
height: 20px;
|
|
|
|
background-color: #fff;
|
|
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
|
|
|
}
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
th,
|
|
|
|
td {
|
|
|
|
padding: 10px;
|
|
|
|
text-align: center;
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
height: 10px;
|
|
|
|
}
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
th {
|
|
|
|
background-color: #f0f0f0;
|
2023-10-25 14:04:49 +08:00
|
|
|
}
|
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
tr {
|
|
|
|
height: 10px;
|
|
|
|
}
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
tbody tr:nth-child(even) {
|
|
|
|
background-color: #f9f9f9;
|
|
|
|
}
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
tbody tr:hover {
|
|
|
|
background-color: #e0e0e0;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div class="tablecenter">
|
|
|
|
<table id="arpTable">
|
|
|
|
<thead>
|
|
|
|
<th>用户</th>
|
|
|
|
<th>操作</th>
|
|
|
|
<th>时间</th>
|
|
|
|
</thead>
|
|
|
|
<tbody id="greenTableBody">
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function loadBlackData() {
|
|
|
|
var blackData;
|
|
|
|
fetch("../cgi-bin/record_of_operations_history.cgi")
|
|
|
|
.then(resp => resp.json())
|
|
|
|
.then(data => {
|
|
|
|
blackData = data;
|
|
|
|
greenTableBody.innerHTML = "";
|
|
|
|
data.forEach(rowData => {
|
|
|
|
let tr = document.createElement("tr");
|
|
|
|
let td1 = document.createElement("td");
|
|
|
|
let td2 = document.createElement("td");
|
|
|
|
let td3 = document.createElement("td");
|
|
|
|
|
|
|
|
td1.innerText = rowData.oper_user_name;
|
|
|
|
td2.innerText = rowData.operation_detail;
|
|
|
|
td3.innerText = rowData.operation_time;
|
2023-10-25 14:04:49 +08:00
|
|
|
|
2023-10-28 14:26:40 +08:00
|
|
|
tr.append(td1, td2, td3);
|
|
|
|
greenTableBody.append(tr);
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
window.onload = function () {
|
|
|
|
loadBlackData();
|
2023-10-25 14:04:49 +08:00
|
|
|
}
|
|
|
|
</script>
|
2023-10-24 15:02:42 +08:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|