feat(history): 添加历史数据管理功能和数据分析图表
- 在addons.php中添加example模块路由配置 - 新增application/config.php配置文件,包含应用设置、数据库配置等 - 实现dashboard.js仪表盘功能,包含冷热号码分析、比例分析图表 - 添加history.js历史数据管理功能,支持号码查询和统计分析 - 集成echarts图表库实现数据可视化展示 - 添加号码颜色映射和生肖映射功能 - 实现号码球样式格式化显示 - 添加遗漏号码、走势图、冷热分析等数据分析功能
This commit is contained in:
@@ -35,6 +35,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
{field: 'num6', title: __('Num6'), formatter: Controller.api.formatter.numBall},
|
||||
{field: 'num7', title: __('Num7'), formatter: Controller.api.formatter.numBall},
|
||||
{field: 'openTime', title: __('OpenTime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
{field: 'search_day', title: '每月日号', visible: false, searchable: true, operate: '=', style: 'width:80px;', extend: 'min="1" max="31" placeholder="1-31"'}
|
||||
]
|
||||
]
|
||||
});
|
||||
@@ -660,12 +661,48 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
return map[status] || '';
|
||||
};
|
||||
|
||||
if (!data || data.length === 0) {
|
||||
// 新接口返回 {list: [...], current: {hot: [], cold: [], warm: []}}
|
||||
var listData = data.list || data;
|
||||
var current = data.current || null;
|
||||
|
||||
if (!listData || listData.length === 0) {
|
||||
$('#shc-result', layero).html('<div class="alert alert-info">暂无数据</div>');
|
||||
return;
|
||||
}
|
||||
|
||||
var html = '<div style="padding:0 5px;">';
|
||||
|
||||
// 当前冷热号汇总区域
|
||||
if (current && (current.hot.length > 0 || current.cold.length > 0)) {
|
||||
var renderNumBall = function (item) {
|
||||
var color = getColor(item.num);
|
||||
return '<span style="display:inline-block;width:30px;height:30px;line-height:30px;text-align:center;border-radius:50%;color:#fff;background-color:' + color + ';font-weight:bold;font-size:14px;" title="' + item.num + ' ×' + item.count + '">' + item.num + '</span>';
|
||||
};
|
||||
|
||||
html += '<div style="background:#fafafa;border:1px solid #e0e0e0;border-radius:6px;padding:12px;margin-bottom:12px;">';
|
||||
html += '<div style="font-size:13px;font-weight:bold;margin-bottom:8px;color:#333;"><i class="fa fa-bullseye"></i> 当前热号</div>';
|
||||
html += '<div style="display:flex;flex-wrap:wrap;gap:6px;">';
|
||||
for (var h = 0; h < current.hot.length; h++) {
|
||||
html += renderNumBall(current.hot[h]);
|
||||
}
|
||||
if (current.hot.length === 0) {
|
||||
html += '<span style="color:#999;font-size:12px;">暂无热号</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '<div style="height:8px;"></div>';
|
||||
html += '<div style="font-size:13px;font-weight:bold;margin-bottom:8px;color:#333;"><i class="fa fa-snowflake-o"></i> 当前冷号</div>';
|
||||
html += '<div style="display:flex;flex-wrap:wrap;gap:6px;">';
|
||||
for (var c = 0; c < current.cold.length; c++) {
|
||||
html += renderNumBall(current.cold[c]);
|
||||
}
|
||||
if (current.cold.length === 0) {
|
||||
html += '<span style="color:#999;font-size:12px;">暂无冷号</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
// 历史记录表格
|
||||
html += '<table class="table table-striped table-bordered table-hover" style="font-size:13px;">' +
|
||||
'<thead><tr>' +
|
||||
'<th style="text-align:center;width:120px;">期号</th>' +
|
||||
@@ -676,8 +713,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
'<th style="text-align:center;width:60px;">排名</th>' +
|
||||
'</tr></thead><tbody>';
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var item = data[i];
|
||||
for (var i = 0; i < listData.length; i++) {
|
||||
var item = listData[i];
|
||||
var rowClass = '';
|
||||
if (item.status === 'hot') rowClass = 'style="background:#fff5f5;"';
|
||||
else if (item.status === 'cold') rowClass = 'style="background:#f5f8ff;"';
|
||||
|
||||
Reference in New Issue
Block a user