暂态事件处理

This commit is contained in:
仲么了
2023-09-06 18:13:08 +08:00
parent 1d2974aca7
commit f8d8229cc1
10 changed files with 130 additions and 108 deletions

View File

@@ -1,71 +1,55 @@
<template>
<view class="content">
<uni-card title="NPQS_682发生暂降事件" extra="未读" sub-title="2023-02-27 15:13:29" @click="jump">
<view class="term-list-bottom">
<view class="term-list-bottom-item">
特征增幅88%持续时间0.047s
<Cn-page :loading="loading">
<view class="content" slot="body">
<uni-card :title="item.title" :extra="item.status === '1'?'':'未读'" :sub-title="item.startTime"
@click="jump(item)"
v-for="(item,index) in store.data" :key="index">
<view class="term-list-bottom">
<view class="term-list-bottom-item">
{{ item.engineeringName + '' + item.projectName }}
</view>
<view class="term-list-bottom-item" v-for="(item2,textIndex) in item.dataSet" :key="textIndex">
{{ item2.showName + ':' + item2.value + (item2.unit || '') }}
</view>
</view>
<view class="term-list-bottom-item">
南京市 灿能园区
</view>
<view class="term-list-bottom-item">
电压等级0.38kV
</view>
<view class="term-list-bottom-item">
网路参数00-B7-8D-A8-00-D3
</view>
</view>
</uni-card>
<uni-card title="NPQS_682发生暂降事件" extra="未读" sub-title="2023-02-27 15:13:29" @click="jump">
<view class="term-list-bottom">
<view class="term-list-bottom-item">
特征增幅88%持续时间0.047s
</view>
<view class="term-list-bottom-item">
南京市 灿能园区
</view>
<view class="term-list-bottom-item">
电压等级0.38kV
</view>
<view class="term-list-bottom-item">
网路参数00-B7-8D-A8-00-D3
</view>
</view>
</uni-card>
<uni-card title="NPQS_682发生暂降事件" sub-title="2023-02-27 15:13:29" @click="jump">
<view class="term-list-bottom">
<view class="term-list-bottom-item">
特征增幅88%持续时间0.047s
</view>
<view class="term-list-bottom-item">
南京市 灿能园区
</view>
<view class="term-list-bottom-item">
电压等级0.38kV
</view>
<view class="term-list-bottom-item">
网路参数00-B7-8D-A8-00-D3
</view>
</view>
</uni-card>
<uni-load-more status="nomore"></uni-load-more>
</view>
</uni-card>
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
</view>
</Cn-page>
</template>
<script>
import list from "@/common/js/list";
export default {
data () {
mixins: [list],
data() {
return {
title: '灿能'
loading: true,
}
},
onLoad () {
onShow() {
this.init()
},
methods: {
jump () {
console.log(123);
uni.navigateTo({ url: '/pages/message/incidentDetail' })
init() {
let dictData = this.$util.getDictData('app_event')
console.log(dictData)
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
this.store.firstCallBack = (res) => {
this.store.data.forEach(item => {
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
})
console.log(this.store.data)
this.loading = false
}
this.store.reload()
},
jump(item) {
let str = JSON.stringify(item).replace(/%/g,'百分比')
uni.navigateTo({url: '/pages/message/incidentDetail?detail=' + encodeURIComponent(str)})
}
}
}
@@ -95,6 +79,7 @@ export default {
/deep/ .uni-list-item {
background-color: $uni-theme-white !important;
}
/deep/ .uni-card__header-extra-text {
color: #dd524d !important;
font-size: 20rpx;