diff --git a/WebSite/touchuantest.htm b/WebSite/touchuantest.htm index 925be1d..66f0a99 100644 --- a/WebSite/touchuantest.htm +++ b/WebSite/touchuantest.htm @@ -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 @@
配置和管理设备透传参数,实现数据透明传输
-