feat 历史报告
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user