feat 异常警告详情
This commit is contained in:
@@ -1,15 +1,29 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
const props = defineProps<{
|
||||
deviceName: string
|
||||
tags: string[]
|
||||
time: string
|
||||
trigger: string
|
||||
status?: '未处理' | '已处理'
|
||||
index: number
|
||||
}>()
|
||||
|
||||
function goToDetail() {
|
||||
const data = encodeURIComponent(JSON.stringify({
|
||||
deviceName: props.deviceName,
|
||||
tags: props.tags,
|
||||
time: props.time,
|
||||
trigger: props.trigger,
|
||||
status: props.status || '未处理',
|
||||
}))
|
||||
uni.navigateTo({
|
||||
url: `/pages/warning/detail/index?data=${data}`,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="warning-item">
|
||||
<view class="warning-item" @tap="goToDetail">
|
||||
<view class="item-header">
|
||||
<text class="device-name">
|
||||
{{ deviceName }}
|
||||
@@ -41,7 +55,6 @@ defineProps<{
|
||||
background-color: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 16px;
|
||||
/* border-left: 4px solid #ff4d4f; */
|
||||
}
|
||||
|
||||
.item-header {
|
||||
|
||||
Reference in New Issue
Block a user