feat 报告详情

This commit is contained in:
Ironsp
2026-09-03 14:32:00 +08:00
parent 607b5f8c91
commit 95634bd82a
9 changed files with 265 additions and 25 deletions

View File

@@ -0,0 +1,110 @@
<script setup lang="ts">
defineProps<{
avgSpeed: string
avgFrequency: string
avgAmplitude: string
avgTemperature: string
avgCompaction: string
exceptionCount: string
}>()
</script>
<template>
<view class="detail-card">
<text class="detail-title">
详细指标
</text>
<view class="detail-list">
<view class="detail-row">
<text class="detail-label">
平均行驶速度
</text>
<text class="detail-value">
{{ avgSpeed }}
</text>
</view>
<view class="detail-row">
<text class="detail-label">
平均振动频率
</text>
<text class="detail-value">
{{ avgFrequency }}
</text>
</view>
<view class="detail-row">
<text class="detail-label">
平均振幅
</text>
<text class="detail-value">
{{ avgAmplitude }}
</text>
</view>
<view class="detail-row">
<text class="detail-label">
平均摊铺温度
</text>
<text class="detail-value">
{{ avgTemperature }}
</text>
</view>
<view class="detail-row">
<text class="detail-label">
平均压实度
</text>
<text class="detail-value">
{{ avgCompaction }}
</text>
</view>
<view class="detail-row">
<text class="detail-label">
异常次数
</text>
<text class="detail-value">
{{ exceptionCount }}
</text>
</view>
</view>
</view>
</template>
<style scoped>
.detail-card {
background-color: #ffffff;
border-radius: 12px;
padding: 16px;
}
.detail-title {
font-size: 22px;
font-weight: bold;
color: #333;
margin-bottom: 16px;
display: block;
}
.detail-list {
display: flex;
flex-direction: column;
}
.detail-row {
display: flex;
justify-content: space-between;
padding: 12px 0;
border-bottom: 1px solid #f5f5f5;
}
.detail-row:last-child {
border-bottom: none;
}
.detail-label {
font-size: 18px;
color: #333;
}
.detail-value {
font-size: 18px;
color: #333;
}
</style>

View File

@@ -1,4 +1,6 @@
<script setup lang="ts">
import storage from '@/utils/storage'
const props = defineProps<{
title: string
deviceCode: string
@@ -11,7 +13,8 @@ const props = defineProps<{
}>()
function goToDetail() {
const data = encodeURIComponent(JSON.stringify({
const key = `report_${Date.now()}`
storage.set(key, {
title: props.title,
deviceCode: props.deviceCode,
status: props.status,
@@ -20,10 +23,9 @@ function goToDetail() {
duration: props.duration,
areaCount: props.areaCount,
passRate: props.passRate,
}))
console.log('22222222222data', data)
})
uni.navigateTo({
url: `/pages/report/detail/index?data=${data}`,
url: `/pages/report/detail/index?key=${key}`,
})
}
</script>

View File

@@ -0,0 +1,88 @@
<script setup lang="ts">
defineProps<{
duration: string
areaCount: string
passCount: string
passRate: string
}>()
</script>
<template>
<view class="stats-card">
<text class="stats-title">
作业统计汇报
</text>
<view class="stats-grid">
<view class="stat-item">
<text class="stat-label">
作业时长
</text>
<text class="stat-value">
{{ duration }}
</text>
</view>
<view class="stat-item">
<text class="stat-label">
压实面积
</text>
<text class="stat-value">
{{ areaCount }}
</text>
</view>
<view class="stat-item">
<text class="stat-label">
碾压遍数
</text>
<text class="stat-value">
{{ passCount }}
</text>
</view>
<view class="stat-item">
<text class="stat-label">
合格率 (%)
</text>
<text class="stat-value">
{{ passRate }}
</text>
</view>
</view>
</view>
</template>
<style scoped>
.stats-card {
background-color: #ffffff;
border-radius: 12px;
padding: 16px;
}
.stats-title {
font-size: 22px;
font-weight: bold;
color: #333;
margin-bottom: 16px;
display: block;
}
.stats-grid {
display: flex;
justify-content: space-between;
}
.stat-item {
display: flex;
flex-direction: column;
}
.stat-label {
font-size: 14px;
color: #666;
margin-bottom: 8px;
}
.stat-value {
font-size: 22px;
font-weight: bold;
color: #333;
}
</style>

View File

@@ -1,4 +1,6 @@
<script setup lang="ts">
import storage from '@/utils/storage'
const props = defineProps<{
deviceName: string
tags: string[]
@@ -9,15 +11,16 @@ const props = defineProps<{
}>()
function goToDetail() {
const data = encodeURIComponent(JSON.stringify({
const key = `warning_${Date.now()}`
storage.set(key, {
deviceName: props.deviceName,
tags: props.tags,
time: props.time,
trigger: props.trigger,
status: props.status || '未处理',
}))
})
uni.navigateTo({
url: `/pages/warning/detail/index?data=${data}`,
url: `/pages/warning/detail/index?key=${key}`,
})
}
</script>