From d2fd7bc32a4dde270ba211b70ea7b8dc768f8d2f Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Mon, 28 Apr 2025 19:11:06 +0800 Subject: [PATCH] Refactor the layout --- web/templates/index.html | 57 +- web/templates/index.html.bak | 3881 ++++++++++++++++++++++++++++++++++ 2 files changed, 3925 insertions(+), 13 deletions(-) create mode 100644 web/templates/index.html.bak diff --git a/web/templates/index.html b/web/templates/index.html index f22e0db..c9662fa 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -294,16 +294,6 @@ -
- - -
- - -
- - -
@@ -328,6 +318,14 @@
+
+ + +
+
+ + +
@@ -347,6 +345,14 @@
+
+ + +
+
+ + +
@@ -1556,7 +1562,7 @@ }); // 在笔的末端添加macd_div值标记 - if (bi.macd_div && bi.macd_div !== 0) { + if (bi.macd_div && bi.macd_div !== 0 && $('#showMainMacdDiv').is(':checked')) { console.log(`添加macd_div标记: ${bi.macd_div.toFixed(2)}, 在时间点: ${endTime}`); const macdDivLabel = mainChart.addLineSeries({ @@ -1635,7 +1641,7 @@ }); // 在笔的末端添加macd_div值标记 - if (bi.macd_div && bi.macd_div !== 0) { + if (bi.macd_div && bi.macd_div !== 0 && $('#showElementMacdDiv').is(':checked')) { console.log(`添加元素周期macd_div标记: ${bi.macd_div.toFixed(2)}, 在时间点: ${endTime}`); const macdDivLabel = mainChart.addLineSeries({ @@ -3796,9 +3802,34 @@ updateTables(data); } + function refreshChartOnly() { + // 仅使用当前数据刷新图表显示,不从服务器加载新数据 + if (currentData) { + console.log('仅刷新图表显示,不重新获取数据'); + refreshChart(currentData); + } else { + console.log('没有当前数据,无法刷新显示'); + } + } + + // 绑定MACD显示开关 + $('#showMacd').change(function() { + updateChart(); + }); + + // 绑定主周期MACD背离显示开关 + $('#showMainMacdDiv').change(function() { + refreshChartOnly(); + }); + + // 绑定次周期MACD背离显示开关 + $('#showElementMacdDiv').change(function() { + refreshChartOnly(); + }); + // 绑定分型类型显示开关 $('#showKlcFxType').change(function() { - refreshChart(currentData); + updateChart(); }); // 绑定小周期分型显示开关 diff --git a/web/templates/index.html.bak b/web/templates/index.html.bak new file mode 100644 index 0000000..39d66da --- /dev/null +++ b/web/templates/index.html.bak @@ -0,0 +1,3881 @@ + + + + 缠论分析系统 + + + + + + + + + + + + + + + +
+
+

缠论分析系统

+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+
+ +
+ + +
+ + +
+ + +
+
+ + + +
+ +
+ + +
+ +
+ + +
+
+ + +
+ + +
+ + +
+ + +
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + + 仅影响笔、线段和中枢分析 +
+ +
+ + +
+ + +
+ + +
+
+
+
+ + + +
+
+
+ +
+ + +
+
+
+ + + + + + + + + + + + +
时间开盘价最高价最低价收盘价成交量
+
+
+
+
+ + + + + + + + + + + + +
起始时间结束时间起始价格结束价格方向MACD背离值
+
+
+
+
+ + + + + + + + + + + +
起始时间结束时间起始价格结束价格方向
+
+
+
+
+
已完成中枢
+ + + + + + + + + + +
起始时间结束时间中枢上沿(ZG)中枢下沿(ZD)
+ +
未完成中枢
+ + + + + + + + + +
起始时间中枢上沿(ZG)中枢下沿(ZD)
+
+
+
+
+ + + + + + + + + + + +
时间收盘价MACD信号线直方图
+
+
+ +
+
+
+ + + + + \ No newline at end of file