feat 历史报告

This commit is contained in:
Ironsp
2026-09-14 16:17:53 +08:00
parent f53a3da87c
commit 2a775ab5e3
4 changed files with 306 additions and 81 deletions

View File

@@ -10,7 +10,7 @@ defineProps<{
<view class="device-header">
<view class="device-info">
<text class="device-code">
备ID: {{ deviceCode }}
设备ID: {{ deviceCode }}
</text>
<text class="device-time">
{{ time }}

View File

@@ -2,6 +2,7 @@
import storage from '@/utils/storage'
const props = defineProps<{
id?: number
title: string
deviceCode: string
status: string
@@ -15,6 +16,7 @@ const props = defineProps<{
function goToDetail() {
const key = `report_${Date.now()}`
storage.set(key, {
id: props.id,
title: props.title,
deviceCode: props.deviceCode,
status: props.status,
@@ -24,8 +26,13 @@ function goToDetail() {
areaCount: props.areaCount,
passRate: props.passRate,
})
const query = [`key=${key}`]
if (props.id != null)
query.push(`id=${props.id}`)
uni.navigateTo({
url: `/pages/report/detail/index?key=${key}`,
url: `/pages/report/detail/index?${query.join('&')}`,
})
}
</script>