feat 异常警告详情
This commit is contained in:
55
src/pages/warning/detail/index.vue
Normal file
55
src/pages/warning/detail/index.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<script setup lang="ts">
|
||||
definePage({
|
||||
layout: false,
|
||||
style: {
|
||||
navigationStyle: 'custom',
|
||||
},
|
||||
})
|
||||
|
||||
const warningData = ref<any>(null)
|
||||
|
||||
onLoad((options) => {
|
||||
if (options?.data) {
|
||||
warningData.value = JSON.parse(decodeURIComponent(options.data))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="page">
|
||||
<back-nav title="警告详情" />
|
||||
|
||||
<view class="content">
|
||||
<view v-if="warningData" class="detail-raw">
|
||||
<text class="raw-text">
|
||||
{{ JSON.stringify(warningData, null, 2) }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background-color: #EAEFF9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16px;
|
||||
padding-top: 72px;
|
||||
}
|
||||
|
||||
.detail-raw {
|
||||
background-color: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.raw-text {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
font-family: monospace;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
@@ -35,6 +35,7 @@ const warnings = [
|
||||
<warning-item
|
||||
v-for="(item, index) in warnings"
|
||||
:key="index"
|
||||
:index="index"
|
||||
:device-name="item.deviceName"
|
||||
:tags="item.tags"
|
||||
:time="item.time"
|
||||
|
||||
Reference in New Issue
Block a user