From 8f8e3d6384b7e917dc880d8d1d30346ad099be53 Mon Sep 17 00:00:00 2001 From: jinchao <383321154@qq.com> Date: Tue, 17 Jun 2025 12:22:55 +0800 Subject: [PATCH] =?UTF-8?q?V0.22.4.250617=5Falpha:=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=87=E9=9B=86=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E9=87=87?= =?UTF-8?q?=E9=9B=86=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Release/database/XNSim.db | Bin 1224704 -> 1224704 bytes XNSimHtml/components/data-collection.js | 92 +++++++++++++++++++++--- 2 files changed, 83 insertions(+), 9 deletions(-) diff --git a/Release/database/XNSim.db b/Release/database/XNSim.db index ce1090bedf8f7a06a4ef49380ff817dbb7284e8f..85138196417dbdd26510fec6a991a1029d6dd99e 100644 GIT binary patch delta 485 zcmZp8;MMTJYl1Z6=7}=SjGG%1S`!$zCNM2|&uqt=FrEDaQz8>@!uE_0Oy78>Xa8m5 zWHPba4y0!?F*EX~ZDnUp;%B;~F#QZ4v!%MJfuXUHxtW25xusrCe!7u?k*ThMnXaLE zh=H+{sil>Xp`N9IdDQemZf5!EvfRvE?O*trftUq|S%H`hh}nUd1Bf}Nf8pm6km6=< zVBovUSH;J{o5*vM`#ZNh*Hlgej(YZn&58m^?DdT`cAS!m;EZ@@Mn-xj2wM|# z3NjK6jeyo#85=yCy5U*xx|i+kFK4&CT)6e++(l0p&3oFl03!0VYsK>^yAAa)#oq7f zc{XF;^Ci0=20UB4`01P#5KT{ZtgU~)XEv9S-jn_7o=w^LWLMjZeUqQIE`7GJ?fI-0 zh&G`9CwuolZQb^4_7-A*fLL&Qy@XKXbO5cK;`jgn delta 222 zcmZp8;MMTJYl1Z6`iU~mjO!Z{S`!$zCNM2|&uq(^J)QjnQ{wil4@}>9CI;|MPx#Bk zxxM5s(*!1F1_6ex?9560OjE?BpW$P+R5vv+G%__dvNSR@(96kBH!?6X)ip5FH8c+~ zFtjo?wK6u)GcqxXnqJ7wEI(bAo0+Tq3qLauvj8zG5VHX>I}mdKG3WFz{9FPOTpaZb ze0TY(_&9hId2Vul=a%Q1%4xt+zgbZrnWMd4f(wYbftUw~d4ZS@i1~q70Eh***GmXB GP6q%p{6uH~ diff --git a/XNSimHtml/components/data-collection.js b/XNSimHtml/components/data-collection.js index bf7b0f3..e5db94b 100644 --- a/XNSimHtml/components/data-collection.js +++ b/XNSimHtml/components/data-collection.js @@ -498,11 +498,44 @@ class DataCollection extends HTMLElement { .left-panel { width: 320px; min-width: 280px; + flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; height: 100%; } + .right-panel { + flex: 1 1 0; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + min-width: 0; + min-height: 200px; + background: #fff; + border-radius: 8px; + box-shadow: 0 2px 8px rgba(0,0,0,0.06); + margin-bottom: 16px; + } + .loading-spinner { + border: 6px solid #f3f3f3; + border-top: 6px solid #1890ff; + border-radius: 50%; + width: 48px; + height: 48px; + animation: spin 1s linear infinite; + margin-bottom: 12px; + } + @keyframes spin { + 0% { transform: rotate(0deg);} + 100% { transform: rotate(360deg);} + } + .loading-text { + color: #1890ff; + font-size: 16px; + font-weight: bold; + margin-top: 0; + } .panel-section { background: #fff; border-radius: 8px; @@ -607,9 +640,15 @@ class DataCollection extends HTMLElement { display: flex; align-items: center; } + .input-row-abs { + position: relative; + width: 100%; + display: flex; + align-items: center; + } .input-box { width: 100%; - padding: 0 8px; + padding-right: 36px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; @@ -628,6 +667,22 @@ class DataCollection extends HTMLElement { background-color: #f5f5f5; cursor: not-allowed; } + .input-unit { + position: absolute; + right: 8px; + top: 50%; + transform: translateY(-50%); + font-size: 16px; + color: #888; + white-space: nowrap; + } + .action-btn.icon-btn { + position: absolute; + right: 4px; + top: 50%; + transform: translateY(-50%); + margin-left: 0; + } .tree-section { background: #fff; border-radius: 8px; @@ -726,7 +781,7 @@ class DataCollection extends HTMLElement {
- +
@@ -735,18 +790,24 @@ class DataCollection extends HTMLElement {
-
采集频率 (Hz)
- +
采集频率
+
+ + Hz +
-
采集时长 (秒)
- +
采集时长
+
+ + +
输出文件
-
+
-
@@ -774,6 +835,12 @@ class DataCollection extends HTMLElement {
+
+ ${this.collectStatus === 2 ? ` +
+
数据采集中...
+ ` : ''} +
`; @@ -789,7 +856,6 @@ class DataCollection extends HTMLElement { itemEl.ondblclick = (e) => { const name = itemEl.getAttribute('data-interfacename'); const struct = itemEl.getAttribute('data-modelstructname'); - console.log('双击接口:', name, struct); // 添加调试日志 this.handleInterfaceDblClick(name, struct); }; }); @@ -971,6 +1037,7 @@ class DataCollection extends HTMLElement { console.error('加载采集数据失败:', error); alert('加载采集数据失败: ' + error.message); } + this.render(); } else { throw new Error(result.message); } @@ -998,6 +1065,12 @@ class DataCollection extends HTMLElement { const result = await response.json(); if (result.success) { + // 关闭所有浮动窗口 + this.chartWindows.forEach((window, windowId) => { + window.dispatchEvent(new CustomEvent('close')); + window.remove(); + }); + this.chartWindows.clear(); // 更新采集状态 this.collectStatus = 2; // 设置为采集中 // 更新按钮状态 @@ -1007,6 +1080,7 @@ class DataCollection extends HTMLElement { loadScriptBtn.disabled = true; // 禁用下载按钮 if (downloadBtn) downloadBtn.disabled = true; + this.render(); } else { throw new Error(result.message); }