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

@@ -1,4 +1,6 @@
<script setup lang="ts">
import storage from '@/utils/storage'
definePage({
layout: false,
style: {
@@ -6,15 +8,29 @@ definePage({
},
})
const reportData = ref<any>(null)
const reportData = ref<any>({
deviceCode: 'ABC123',
time: '2025-12-15 08:30-14:30',
status: '已完成',
duration: '6H',
areaCount: '2580m²',
passCount: '355',
passRate: '96.8%',
avgSpeed: '3.8km/h',
avgFrequency: '34Hz',
avgAmplitude: '2.1mm',
avgTemperature: '42℃',
avgCompaction: '96%',
exceptionCount: '2',
})
onLoad((options) => {
if (options?.data) {
console.log('222222222222', options.data)
reportData.value = JSON.parse(options.data)
// reportData.value = JSON.parse(decodeURIComponent(options.data))
console.log('2222222222223333333', reportData.value)
if (options?.key) {
const data = storage.get(options.key)
if (data) {
reportData.value = data
storage.remove(options.key)
}
}
})
</script>
@@ -30,6 +46,24 @@ onLoad((options) => {
:time="reportData.time"
:status="reportData.status"
/>
<report-stats-card
v-if="reportData"
:duration="reportData.duration"
:area-count="reportData.areaCount"
:pass-count="reportData.passCount"
:pass-rate="reportData.passRate"
/>
<report-detail-metrics
v-if="reportData"
:avg-speed="reportData.avgSpeed"
:avg-frequency="reportData.avgFrequency"
:avg-amplitude="reportData.avgAmplitude"
:avg-temperature="reportData.avgTemperature"
:avg-compaction="reportData.avgCompaction"
:exception-count="reportData.exceptionCount"
/>
</view>
</view>
</template>
@@ -43,5 +77,8 @@ onLoad((options) => {
.content {
padding: 16px;
padding-top: 72px;
display: flex;
flex-direction: column;
gap: 12px;
}
</style>

View File

@@ -6,8 +6,7 @@ definePage({
},
})
const startDate = ref('')
const endDate = ref('')
const datetimerange = ref([])
const reportStatus = ref('')
const area = ref('')
const project = ref('')
@@ -73,11 +72,7 @@ function handleQuery() {
作业日期
</text>
<view class="date-range">
<uni-easyinput v-model="startDate" placeholder="开始时间" />
<text class="date-separator">
至
</text>
<uni-easyinput v-model="endDate" placeholder="请选择时间" />
<uni-datetime-picker v-model="datetimerange" type="datetimerange" range-separator="至" />
</view>
</view>

View File

@@ -1,4 +1,6 @@
<script setup lang="ts">
import storage from '@/utils/storage'
definePage({
layout: false,
style: {
@@ -9,10 +11,9 @@ definePage({
const warningData = ref<any>(null)
onLoad((options) => {
if (options?.data) {
console.log('111111111111111', options.data)
warningData.value = JSON.parse(decodeURIComponent(options.data))
console.log('11111111111111111222222', warningData.value)
if (options?.key) {
warningData.value = storage.get(options.key)
storage.remove(options.key)
}
})
</script>