feat(h5): 完善隐患随手拍模块 + 新增AI分析模块

新增页面:
- ai-analyses.html: AI分析列表(Tab筛选:全部/人员安全/设备异常/环境风险)
- ai-analysis.html: AI分析详情(设备信息+AI分析描述+建议措施)
- reports.html: 隐患随手拍列表(Tab筛选:全部/待处理/处理中/已处理,FAB悬浮新建按钮)
- report-detail.html: 隐患详情(状态时间线+认领/处理完成操作)

Mock层补全:
- MOCK_AI_ANALYSES (4条AI分析记录,3种类型)
- getAnalysisTypeInfo() / getAIAnalysisById() 辅助函数
- apiGetAIAnalyses() / apiGetAIAnalysisDetail() / apiGetReportDetail()

UI规范统一(frontend-dev skill门控):
- 统一TabBar为tab-bar class,替换所有weui-tabbar
- 随手拍入口统一为reports.html,report.html为新建表单
- 新页面全部实现skeleton骨架屏+空状态+loading状态
- severity/status使用RemixIcon,无emoji
- pulse-dot动画用于待处理状态指示
This commit is contained in:
2026-04-14 17:08:19 +08:00
parent cb0ef8c30c
commit 3301d9557b
12 changed files with 1635 additions and 113 deletions

View File

@@ -113,6 +113,16 @@ function apiGetReports() {
});
}
// 获取随手拍详情
function apiGetReportDetail(id) {
return new Promise((resolve) => {
setTimeout(() => {
const item = MOCK_REPORTS.find(r => r.id === id);
resolve({ code: 0, data: item });
}, 200);
});
}
// 获取施工日志列表
function apiGetLogs() {
return new Promise((resolve) => {
@@ -152,3 +162,26 @@ function apiGetUploadToken(filename, contentType) {
}, 300);
});
}
// 获取 AI 分析列表
function apiGetAIAnalyses(params = {}) {
return new Promise((resolve) => {
setTimeout(() => {
let items = [...MOCK_AI_ANALYSES];
if (params.type && params.type !== 'all') {
items = items.filter(a => a.analysisType === params.type);
}
resolve({ code: 0, data: { total: items.length, items } });
}, 300);
});
}
// 获取 AI 分析详情
function apiGetAIAnalysisDetail(id) {
return new Promise((resolve) => {
setTimeout(() => {
const item = MOCK_AI_ANALYSES.find(a => a.id === id);
resolve({ code: 0, data: item });
}, 200);
});
}