feat 报告详情
This commit is contained in:
2
src/auto-imports.d.ts
vendored
2
src/auto-imports.d.ts
vendored
@@ -113,6 +113,7 @@ declare global {
|
|||||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||||
const shallowRef: typeof import('vue')['shallowRef']
|
const shallowRef: typeof import('vue')['shallowRef']
|
||||||
|
const storage: typeof import('./utils/storage')['default']
|
||||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||||
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||||
const templateRef: typeof import('@vueuse/core')['templateRef']
|
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||||
@@ -434,6 +435,7 @@ declare module 'vue' {
|
|||||||
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
|
||||||
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
|
||||||
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
readonly shallowRef: UnwrapRef<typeof import('vue')['shallowRef']>
|
||||||
|
readonly storage: UnwrapRef<typeof import('./utils/storage')['default']>
|
||||||
readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
|
readonly syncRef: UnwrapRef<typeof import('@vueuse/core')['syncRef']>
|
||||||
readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
|
readonly syncRefs: UnwrapRef<typeof import('@vueuse/core')['syncRefs']>
|
||||||
readonly templateRef: UnwrapRef<typeof import('@vueuse/core')['templateRef']>
|
readonly templateRef: UnwrapRef<typeof import('@vueuse/core')['templateRef']>
|
||||||
|
|||||||
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@@ -22,8 +22,10 @@ declare module 'vue' {
|
|||||||
HomeWarning_list: typeof import('./components/home/warning_list.vue')['default']
|
HomeWarning_list: typeof import('./components/home/warning_list.vue')['default']
|
||||||
MessageList: typeof import('./components/message/list.vue')['default']
|
MessageList: typeof import('./components/message/list.vue')['default']
|
||||||
ProjectItem: typeof import('./components/project/item.vue')['default']
|
ProjectItem: typeof import('./components/project/item.vue')['default']
|
||||||
|
ReportDetailMetrics: typeof import('./components/report/detailMetrics.vue')['default']
|
||||||
ReportDeviceHeader: typeof import('./components/report/deviceHeader.vue')['default']
|
ReportDeviceHeader: typeof import('./components/report/deviceHeader.vue')['default']
|
||||||
ReportItem: typeof import('./components/report/item.vue')['default']
|
ReportItem: typeof import('./components/report/item.vue')['default']
|
||||||
|
ReportStatsCard: typeof import('./components/report/statsCard.vue')['default']
|
||||||
SettingsProjectForm: typeof import('./components/settings/projectForm.vue')['default']
|
SettingsProjectForm: typeof import('./components/settings/projectForm.vue')['default']
|
||||||
SettingsProjectSettings: typeof import('./components/settings/projectSettings.vue')['default']
|
SettingsProjectSettings: typeof import('./components/settings/projectSettings.vue')['default']
|
||||||
SettingsRadioConfig: typeof import('./components/settings/radioConfig.vue')['default']
|
SettingsRadioConfig: typeof import('./components/settings/radioConfig.vue')['default']
|
||||||
|
|||||||
110
src/components/report/detailMetrics.vue
Normal file
110
src/components/report/detailMetrics.vue
Normal 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>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import storage from '@/utils/storage'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title: string
|
title: string
|
||||||
deviceCode: string
|
deviceCode: string
|
||||||
@@ -11,7 +13,8 @@ const props = defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
function goToDetail() {
|
function goToDetail() {
|
||||||
const data = encodeURIComponent(JSON.stringify({
|
const key = `report_${Date.now()}`
|
||||||
|
storage.set(key, {
|
||||||
title: props.title,
|
title: props.title,
|
||||||
deviceCode: props.deviceCode,
|
deviceCode: props.deviceCode,
|
||||||
status: props.status,
|
status: props.status,
|
||||||
@@ -20,10 +23,9 @@ function goToDetail() {
|
|||||||
duration: props.duration,
|
duration: props.duration,
|
||||||
areaCount: props.areaCount,
|
areaCount: props.areaCount,
|
||||||
passRate: props.passRate,
|
passRate: props.passRate,
|
||||||
}))
|
})
|
||||||
console.log('22222222222data', data)
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/report/detail/index?data=${data}`,
|
url: `/pages/report/detail/index?key=${key}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
88
src/components/report/statsCard.vue
Normal file
88
src/components/report/statsCard.vue
Normal 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>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import storage from '@/utils/storage'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
deviceName: string
|
deviceName: string
|
||||||
tags: string[]
|
tags: string[]
|
||||||
@@ -9,15 +11,16 @@ const props = defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
function goToDetail() {
|
function goToDetail() {
|
||||||
const data = encodeURIComponent(JSON.stringify({
|
const key = `warning_${Date.now()}`
|
||||||
|
storage.set(key, {
|
||||||
deviceName: props.deviceName,
|
deviceName: props.deviceName,
|
||||||
tags: props.tags,
|
tags: props.tags,
|
||||||
time: props.time,
|
time: props.time,
|
||||||
trigger: props.trigger,
|
trigger: props.trigger,
|
||||||
status: props.status || '未处理',
|
status: props.status || '未处理',
|
||||||
}))
|
})
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/warning/detail/index?data=${data}`,
|
url: `/pages/warning/detail/index?key=${key}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import storage from '@/utils/storage'
|
||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
layout: false,
|
layout: false,
|
||||||
style: {
|
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) => {
|
onLoad((options) => {
|
||||||
if (options?.data) {
|
if (options?.key) {
|
||||||
console.log('222222222222', options.data)
|
const data = storage.get(options.key)
|
||||||
|
if (data) {
|
||||||
reportData.value = JSON.parse(options.data)
|
reportData.value = data
|
||||||
// reportData.value = JSON.parse(decodeURIComponent(options.data))
|
storage.remove(options.key)
|
||||||
console.log('2222222222223333333', reportData.value)
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
@@ -30,6 +46,24 @@ onLoad((options) => {
|
|||||||
:time="reportData.time"
|
:time="reportData.time"
|
||||||
:status="reportData.status"
|
: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>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -43,5 +77,8 @@ onLoad((options) => {
|
|||||||
.content {
|
.content {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
padding-top: 72px;
|
padding-top: 72px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ definePage({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const startDate = ref('')
|
const datetimerange = ref([])
|
||||||
const endDate = ref('')
|
|
||||||
const reportStatus = ref('')
|
const reportStatus = ref('')
|
||||||
const area = ref('')
|
const area = ref('')
|
||||||
const project = ref('')
|
const project = ref('')
|
||||||
@@ -73,11 +72,7 @@ function handleQuery() {
|
|||||||
作业日期
|
作业日期
|
||||||
</text>
|
</text>
|
||||||
<view class="date-range">
|
<view class="date-range">
|
||||||
<uni-easyinput v-model="startDate" placeholder="开始时间" />
|
<uni-datetime-picker v-model="datetimerange" type="datetimerange" range-separator="至" />
|
||||||
<text class="date-separator">
|
|
||||||
至
|
|
||||||
</text>
|
|
||||||
<uni-easyinput v-model="endDate" placeholder="请选择时间" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import storage from '@/utils/storage'
|
||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
layout: false,
|
layout: false,
|
||||||
style: {
|
style: {
|
||||||
@@ -9,10 +11,9 @@ definePage({
|
|||||||
const warningData = ref<any>(null)
|
const warningData = ref<any>(null)
|
||||||
|
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
if (options?.data) {
|
if (options?.key) {
|
||||||
console.log('111111111111111', options.data)
|
warningData.value = storage.get(options.key)
|
||||||
warningData.value = JSON.parse(decodeURIComponent(options.data))
|
storage.remove(options.key)
|
||||||
console.log('11111111111111111222222', warningData.value)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user