Files
amlhc/.planning/quick/260425-w2i-5-10/260425-w2i-PLAN.md
T

25 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
description: "在控制台页面新增区域转移概率统计:1-49分5区,统计特码所在区下一期特码出现在各区的概率"
status: in-progress
---
# Quick Task 260425-w2i: 区域转移概率统计
## Plan
1. **Model** — Add `getZoneTransition($periods)` method to `app\admin\model\History`
- Query latest `$periods` periods ordered by openTime ASC
- Divide numbers 1-49 into 5 zones: 1-10, 11-20, 21-30, 31-40, 41-49
- For each consecutive pair of periods, record (current_zone → next_zone)
- Return: `{zones: ['1-10','11-20','21-30','31-40','41-49'], matrix: [[count...]], probabilities: [[prob...]], total_transitions: N}`
2. **Controller** — Add `zoneTransition()` method to `app\admin\controller\History`
- Accept `periods` param (default 100, range 10-500)
- Add to `$noNeedRight` list
- Call model method, return JSON response
3. **Dashboard** — Include `zoneTransition` in `getDashboardData()` response
4. **Frontend JS** — Add zone transition heatmap/table in `public/assets/js/backend/dashboard.js`
- Render as a 5×5 matrix table with color-coded cells showing count and percentage
- Append below existing heatmap section