修改了透传设置页面
This commit is contained in:
@@ -36,59 +36,22 @@
|
||||
line-height: 1.6;
|
||||
color: var(--text-primary);
|
||||
background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
|
||||
padding: 20px;
|
||||
padding: 12px;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.container
|
||||
{
|
||||
max-width: 1000px;
|
||||
max-width: 1440px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header
|
||||
{
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
h1:after
|
||||
{
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 4px;
|
||||
background: linear-gradient(to right, var(--primary-color), var(--success-color));
|
||||
bottom: -10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.subtitle
|
||||
{
|
||||
color: var(--text-secondary);
|
||||
font-size: 1rem;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.card
|
||||
{
|
||||
background: var(--card-bg);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
margin-bottom: 25px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid var(--border-color);
|
||||
transition: var(--transition);
|
||||
overflow: hidden;
|
||||
@@ -101,11 +64,11 @@
|
||||
|
||||
.card-header
|
||||
{
|
||||
background: linear-gradient(135deg, var(--primary-color), #5a6ff0);
|
||||
background: linear-gradient(135deg, #2fda54, #5ae077);
|
||||
color: white;
|
||||
padding: 18px 24px;
|
||||
padding: 8px 12px;
|
||||
font-weight: 600;
|
||||
font-size: 1.1rem;
|
||||
font-size: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -118,42 +81,63 @@
|
||||
|
||||
.card-content
|
||||
{
|
||||
padding: 24px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.form-row
|
||||
{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 使主机编号行内排列 */
|
||||
.form-row > .form-group:first-child {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 状态放最右 */
|
||||
.form-row .status-indicator {
|
||||
margin-left: auto;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* 单行显示单选项 */
|
||||
.radio-options { flex-wrap: nowrap; gap: 8px; }
|
||||
.checkbox-group label, .radio-option label { font-size: 0.85rem; margin-bottom: 0; }
|
||||
|
||||
.form-group
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-width: 200px;
|
||||
flex: 0 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.form-row-inline
|
||||
{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
flex-wrap: nowrap;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
padding: 6px 8px;
|
||||
background-color: #f8fafc;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
label
|
||||
{
|
||||
font-size: 0.9rem;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 6px;
|
||||
color: var(--text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -174,11 +158,12 @@
|
||||
|
||||
input[type="text"], input[type="number"], textarea, select
|
||||
{
|
||||
padding: 12px 15px;
|
||||
padding: 6px 8px;
|
||||
border: 2px solid #e0e6ef;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
background-color: #fff;
|
||||
transition: var(--transition);
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus
|
||||
@@ -190,10 +175,10 @@
|
||||
|
||||
textarea
|
||||
{
|
||||
min-height: 100px;
|
||||
min-height: 64px;
|
||||
resize: vertical;
|
||||
width: 100%;
|
||||
line-height: 1.5;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
button
|
||||
@@ -202,7 +187,7 @@
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 12px 24px;
|
||||
padding: 10px 16px;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
@@ -244,21 +229,22 @@
|
||||
{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
gap: 10px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.radio-option
|
||||
{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 10px 15px;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
background-color: #f8fafc;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
border: 2px solid #e0e6ef;
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.radio-option:hover
|
||||
@@ -275,19 +261,19 @@
|
||||
.port-group
|
||||
{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.port-item
|
||||
{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 15px;
|
||||
gap: 6px;
|
||||
padding: 8px 10px;
|
||||
background-color: #f8fafc;
|
||||
border-radius: 8px;
|
||||
border-radius: 6px;
|
||||
display: none; /* 默认隐藏 */
|
||||
}
|
||||
|
||||
@@ -322,7 +308,7 @@
|
||||
{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.input-with-label label
|
||||
@@ -333,15 +319,65 @@
|
||||
|
||||
.message-container
|
||||
{
|
||||
max-height: 400px;
|
||||
max-height: 95vh;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
padding: 8px;
|
||||
background-color: #f8f9fa;
|
||||
font-family: 'Courier New' , monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.message-table
|
||||
{
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.message-table th,
|
||||
.message-table td
|
||||
{
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
padding: 6px 8px;
|
||||
vertical-align: top;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.message-table th
|
||||
{
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #f8f9fa;
|
||||
z-index: 1;
|
||||
text-align: left;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.message-row-sent
|
||||
{
|
||||
background-color: #e8f5e9;
|
||||
}
|
||||
|
||||
.message-row-received
|
||||
{
|
||||
background-color: #e3f2fd;
|
||||
}
|
||||
|
||||
/* 紧凑布局样式 */
|
||||
#btn_set { padding: 6px 10px; font-size: 0.92rem; height: 32px; }
|
||||
#send { padding: 8px 12px; height: 34px; }
|
||||
#txthostnumber { max-width: 300px; width: 300px; }
|
||||
#protocoltype { width: 72px; }
|
||||
#Port_2, #Byte_Speed, #moshi_id { width: 100px; }
|
||||
#tm2, #tm4 { width: 100px; }
|
||||
.form-row { gap: 8px; }
|
||||
.form-row-inline { gap: 8px; }
|
||||
/* 指定 port-group 内的 select 字体大小为 14px */
|
||||
.port-group select, .port-item select { font-size: 12px; }
|
||||
.port-group select option { font-size: 15px; }
|
||||
|
||||
.message-item
|
||||
{
|
||||
@@ -421,20 +457,20 @@
|
||||
{
|
||||
background-color: #e7f3ff;
|
||||
border-left: 4px solid var(--primary-color);
|
||||
padding: 15px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 20px;
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 8px;
|
||||
font-size: 0.88rem;
|
||||
}
|
||||
|
||||
.status-indicator
|
||||
{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 12px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.85rem;
|
||||
gap: 6px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 16px;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -538,14 +574,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
<h1>透传设置界面</h1>
|
||||
<p class="subtitle">配置和管理设备透传参数,实现数据透明传输</p>
|
||||
</header>
|
||||
<!-- 设置透传卡片 -->
|
||||
<!-- 设置发送透传卡片(合并:设置透传 + 发送内容) -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-cogs"></i>设置透传
|
||||
<i class="fas fa-cogs"></i>设置发送透传
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="info-box">
|
||||
@@ -558,101 +590,83 @@
|
||||
</label>
|
||||
<input id="txthostnumber" type="text" placeholder="请输入主机编号" required>
|
||||
</div>
|
||||
<div class="form-group" style="align-self: flex-end;">
|
||||
<div class="form-group" style="align-self: center;">
|
||||
<button id="btn_set">
|
||||
<i class="fas fa-plug"></i>连接设备
|
||||
</button>
|
||||
</div>
|
||||
<div class="status-indicator status-disconnected" id="connection-status" style="margin-left:auto;">
|
||||
<span class="status-dot"></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="result">
|
||||
</div>
|
||||
<div class="status-indicator status-disconnected" id="connection-status">
|
||||
<span class="status-dot"></span><span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 发送内容卡片 -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-paper-plane"></i>发送内容
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div id="result"></div>
|
||||
|
||||
<div style="height: 12px;"></div>
|
||||
|
||||
<div class="form-row-inline">
|
||||
<div class="checkbox-group">
|
||||
<input id="isprotocol" type="checkbox" checked>
|
||||
<label for="isprotocol" style="margin-bottom: 0;">
|
||||
自动加上协议头
|
||||
</label>
|
||||
<label for="isprotocol" style="margin-bottom: 0;">自动加上协议头</label>
|
||||
</div>
|
||||
<div class="form-group" style="flex-direction: row; align-items: center; gap: 8px;
|
||||
flex: 0 1 auto;">
|
||||
<label for="protocoltype" style="margin-bottom: 0;">
|
||||
协议类型:
|
||||
</label>
|
||||
<input id="protocoltype" type="text" value="70" placeholder="默认是70" style="width: 100px;">
|
||||
<div class="form-group" style="flex-direction: row; align-items: center; gap: 8px; flex: 0 1 auto;">
|
||||
<label for="protocoltype" style="margin-bottom: 0;">协议类型:</label>
|
||||
<input id="protocoltype" type="text" value="70" placeholder="默认是70" style="width: 72px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio-options">
|
||||
<div class="radio-option">
|
||||
<input id="readmode" type="radio" name="mode" value="读取模式" checked>
|
||||
<label for="readmode" style="margin-bottom: 0;">
|
||||
读取模式</label>
|
||||
<div class="radio-options" style="flex-wrap:nowrap; margin-left:8px;">
|
||||
<div class="radio-option">
|
||||
<input id="readmode" type="radio" name="mode" value="读取模式" checked>
|
||||
<label for="readmode" style="margin-bottom: 0;">读取模式</label>
|
||||
</div>
|
||||
<div class="radio-option">
|
||||
<input id="setmode" type="radio" name="mode" value="设置模式">
|
||||
<label for="setmode" style="margin-bottom: 0;">设置模式</label>
|
||||
</div>
|
||||
<div class="radio-option">
|
||||
<input id="sendmode" type="radio" name="mode" value="发送模式">
|
||||
<label for="sendmode" style="margin-bottom: 0;">发送模式</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="radio-option">
|
||||
<input id="setmode" type="radio" name="mode" value="设置模式">
|
||||
<label for="setmode" style="margin-bottom: 0;">
|
||||
设置模式</label>
|
||||
</div>
|
||||
<div class="radio-option">
|
||||
<input id="sendmode" type="radio" name="mode" value="发送模式">
|
||||
<label for="sendmode" style="margin-bottom: 0;">
|
||||
发送模式</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="port-group">
|
||||
<div class="port-item visible" id="p1">
|
||||
<!-- 初始显示读取模式 -->
|
||||
<div class="port-item-header">
|
||||
<span><strong>Port 1</strong></span>
|
||||
</div>
|
||||
<div class="port-item-content">
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
端口:</label>
|
||||
<label>端口:</label>
|
||||
<select id="Port_1">
|
||||
<option value="01">轮询</option>
|
||||
<option value="02">主动</option>
|
||||
<option value="03">总线BUS</option>
|
||||
>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="port-item" id="p2">
|
||||
<!-- 初始隐藏设置模式 -->
|
||||
<div class="port-item-header">
|
||||
<span><strong>Port 2</strong></span>
|
||||
</div>
|
||||
<div class="port-item-content">
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
模式:</label>
|
||||
<select id="Port_2" style="width: 120px;">
|
||||
<label>模式:</label>
|
||||
<select id="Port_2" style="width: 100px;">
|
||||
<option value="01">轮询</option>
|
||||
<option value="02">主动</option>
|
||||
<option value="03">总线BUS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
超时:</label>
|
||||
<input type="text" name="timeout" id="tm2" placeholder="超时16进制" style="width: 120px;" />
|
||||
<label>超时:</label>
|
||||
<input type="text" name="timeout" id="tm2" placeholder="超时16进制" style="width: 100px;" />
|
||||
</div>
|
||||
<div class="port-item-content">
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
波特率:</label>
|
||||
<select id="Byte_Speed" style="width: 120px;">
|
||||
<label>波特率:</label>
|
||||
<select id="Byte_Speed" style="width: 100px;">
|
||||
<option value="01">9600</option>
|
||||
<option value="02">14400</option>
|
||||
<option value="03">19200</option>
|
||||
@@ -661,9 +675,8 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
模式:</label>
|
||||
<select id="moshi_id" style="width: 140px;">
|
||||
<label>模式:</label>
|
||||
<select id="moshi_id" style="width: 100px;">
|
||||
<option value="01">正常模式</option>
|
||||
<option value="02">进入透传</option>
|
||||
<option value="03">进入监控</option>
|
||||
@@ -673,14 +686,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="port-item" id="p3">
|
||||
<!-- 初始隐藏发送模式 -->
|
||||
<div class="port-item-header">
|
||||
<span><strong>Port 4</strong></span>
|
||||
</div>
|
||||
<div class="port-item-content">
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
端口:</label>
|
||||
<label>端口:</label>
|
||||
<select id="Port_4">
|
||||
<option value="01">轮询</option>
|
||||
<option value="02">主动</option>
|
||||
@@ -688,13 +699,13 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-with-label">
|
||||
<label>
|
||||
超时:</label>
|
||||
<input type="text" name="timeout" id="tm4" placeholder="超时(16进制)" style="width: 120px;" />
|
||||
<label>超时:</label>
|
||||
<input type="text" name="timeout" id="tm4" placeholder="超时(16进制)" style="width: 100px;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="div_content">
|
||||
<div class="form-group">
|
||||
<label for="content">
|
||||
@@ -703,7 +714,8 @@
|
||||
<textarea id="content" placeholder="请输入16进制内容,例如: 01 02 03 0A 0B"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: flex-end; margin-top: 20px;">
|
||||
|
||||
<div style="display: flex; justify-content: flex-start; margin-top: 8px;">
|
||||
<button id="send">
|
||||
<i class="fas fa-paper-plane"></i>发送内容
|
||||
</button>
|
||||
@@ -713,16 +725,25 @@
|
||||
<!-- 接收数据卡片 -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-download"></i>下位机透传来的数据
|
||||
<i class="fas fa-download"></i>下位机透传数据
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div id="touchuan_content" class="message-container">
|
||||
<div class="message-item message-received">
|
||||
<div class="message-time">
|
||||
12:30:45</div>
|
||||
<div class="message-content">
|
||||
等待连接设备...</div>
|
||||
</div>
|
||||
<table class="message-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 130px;">时间</th>
|
||||
<th style="width: 70px;">间隔</th>
|
||||
<th style="width: 90px;">设备</th>
|
||||
<th style="width: 80px;">地址</th>
|
||||
<th style="width: 90px;">设备类型</th>
|
||||
<th style="width: 120px;">参数</th>
|
||||
<th>原始数据</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="touchuan_tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; margin-top: 15px;">
|
||||
<button id="clear-btn" style="background-color: var(--text-secondary);">
|
||||
@@ -777,36 +798,37 @@
|
||||
const nowMs = Date.now();
|
||||
const nowDate = new Date(nowMs);
|
||||
|
||||
let messageClass = 'message-received';
|
||||
let messageType = '接收';
|
||||
let messageRowClass = 'message-row-received';
|
||||
if (is_sent)
|
||||
{
|
||||
messageClass="message-sent";
|
||||
messageType="发送";
|
||||
messageRowClass="message-row-sent";
|
||||
}
|
||||
|
||||
// 仅对“接收”消息计算与上一条接收消息的时间差(毫秒)
|
||||
let deltaHtml = '';
|
||||
let deltaText = '-';
|
||||
if (!is_sent) {
|
||||
content = extractMiddlePayload(content);
|
||||
if (lastReceivedAtMs !== null) {
|
||||
const deltaMs = nowMs - lastReceivedAtMs;
|
||||
deltaHtml = `<div class="message-delta">+${deltaMs}ms</div>`;
|
||||
// 间隔列:仅显示毫秒数字,不带单位
|
||||
deltaText = `${deltaMs}`;
|
||||
}
|
||||
lastReceivedAtMs = nowMs;
|
||||
}
|
||||
|
||||
let messageItem = `
|
||||
<div class="message-item ${messageClass}">
|
||||
<div class="message-time">
|
||||
<div>${getCurrentTime(nowDate)}</div>
|
||||
${deltaHtml}
|
||||
</div>
|
||||
<div class="message-content">${messageType}: ${content}</div>
|
||||
</div>
|
||||
let messageRow = `
|
||||
<tr class="${messageRowClass}">
|
||||
<td>${getCurrentTime(nowDate)}</td>
|
||||
<td>${deltaText}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>${content}</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
$("#touchuan_content").append(messageItem);
|
||||
|
||||
$("#touchuan_tbody").append(messageRow);
|
||||
// 自动滚动到底部
|
||||
$("#touchuan_content").scrollTop($("#touchuan_content")[0].scrollHeight);
|
||||
}
|
||||
@@ -895,6 +917,20 @@
|
||||
}
|
||||
|
||||
$("#result").html('<i class="fas fa-spinner fa-spin"></i> 正在连接...').removeClass("error success").show();
|
||||
|
||||
// 初始化记录:以“点击连接设备”的时间作为首条记录(不影响接收间隔计算)
|
||||
$("#touchuan_tbody").append(`
|
||||
<tr class="message-row-received">
|
||||
<td>${getCurrentTime(new Date())}</td>
|
||||
<td>-</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>连接设备</td>
|
||||
<td>${hhh}</td>
|
||||
</tr>
|
||||
`);
|
||||
$("#touchuan_content").scrollTop($("#touchuan_content")[0].scrollHeight);
|
||||
|
||||
let mac = "";
|
||||
let jjj = {
|
||||
@@ -1003,11 +1039,16 @@
|
||||
// 清空记录按钮
|
||||
$("#clear-btn").click(function() {
|
||||
lastReceivedAtMs = null;
|
||||
$("#touchuan_content").html(`
|
||||
<div class="message-item message-received">
|
||||
<div class="message-time">${getCurrentTime()}</div>
|
||||
<div class="message-content">记录已清空</div>
|
||||
</div>
|
||||
$("#touchuan_tbody").html(`
|
||||
<tr class="message-row-received">
|
||||
<td>${getCurrentTime()}</td>
|
||||
<td>-</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>记录已清空</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
`);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user