初始提交:5G 基站退服时长智能分析与故障闭环管控系统

Flask + SQLite 后端,免构建 React + ECharts 前端,含合成样例数据。
测试参考数据(FOR-TEST-ONLY)与运行时数据库不入库。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
treeandClaude Opus 5.5 committed 2026-11-18 14:01:48 +08:00
commit f8d1ccc526
39 files changed
+29010

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
import {GlassButton, GlassSegmentedControl, html, useState} from 'vendor';
import {download, useApp, useFetch} from '../api.js';
import {DataTable} from '../components/DataTable.js';
import {Cause, Loading, Section} from '../components/ui.js';
const COLUMNS = [
{key: 'ne_id', title: '基站编号'}, {key: 'site_name', title: '基站名称'}, {key: 'scene', title: '场景'},
{key: 'site_type', title: '站型'}, {key: 'region', title: '片区'}, {key: 'count', title: '退服次数'},
{key: 'total_min', title: '累计时长(分)'}, {key: 'avg_min', title: '平均时长(分)'}, {key: 'max_min', title: '最长单次(分)'},
{key: 'long_min', title: '时长阈值'}, {key: 'freq_count', title: '次数阈值'},
{key: 'top_cause', title: '主要根因', render: v => html`<${Cause} value=${v}/>`},
{key: 'advice', title: '处置建议', wrap: true},
];
export default function Rank() {
const {filters} = useApp();
const [kind, setKind] = useState('long');
const {data} = useFetch('/api/sites/rank', {...filters, kind});
return html`
<${Section}>
<div className="row toolbar">
<${GlassSegmentedControl} aria-label="站点类型" value=${kind} onValueChange=${setKind}
items=${[{value: 'long', label: '超长退服站点'}, {value: 'repeat', label: '高频重复退服站点'}]}/>
${data && html`<span className="hint">共 ${data.rows.length} 个站点</span>`}
<span className="grow"></span>
<${GlassButton} variant="glassProminent" onClick=${() => download('/api/export/long', filters)}>导出清单</${GlassButton}>
</div>
<div className="note gap-bottom">
判定规则:<b>超长退服站点</b>=月均超长退服(单次时长 ≥ 场景超长阈值)≥ 1 次;
<b>高频重复退服站点</b>=月均退服次数 ≥ 场景次数阈值。阈值在「场景与站点分级」中配置,每个入选站点均按主要根因给出处置建议。
</div>
${data ? html`<${DataTable} rowKey="ne_id" columns=${COLUMNS} rows=${data.rows}/>` : html`<${Loading}/>`}
</${Section}>`;
}