设备消息
This commit is contained in:
@@ -33,7 +33,7 @@ export default {
|
||||
this.store.params.type = 3
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='index'>
|
||||
<uni-list>
|
||||
<uni-list-item title="登录成功" rightText="9-18" />
|
||||
<uni-list-item title="登录成功" rightText="9-18" />
|
||||
<uni-list-item title="登录成功" note="新用户" rightText="9-18" />
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-card
|
||||
:title="item.equipmentName"
|
||||
: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>
|
||||
</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>
|
||||
@@ -33,7 +44,7 @@ export default {
|
||||
this.store.params.type = 2
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach(item => {
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag).name
|
||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
@@ -42,7 +53,7 @@ export default {
|
||||
},
|
||||
jump(item) {
|
||||
let str = JSON.stringify(item).replace(/%/g,'百分比')
|
||||
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
||||
uni.navigateTo({url: '/pages/message/runDetail?detail=' + encodeURIComponent(str)})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
68
pages/message/runDetail.vue
Normal file
68
pages/message/runDetail.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="detail" slot="body">
|
||||
<view class="detail-content" style="font-size: 32rpx">
|
||||
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
||||
<view>{{ detail.startTime }}</view>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">基础信息</view>
|
||||
<view class="mb10">{{ detail.title }}</view>
|
||||
<view>
|
||||
{{ detail.engineeringName + '' + detail.projectName }}
|
||||
</view>
|
||||
<view v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
||||
</view>
|
||||
<!-- <view class="space-between">请您评价本次事件是否对设备造成影响
|
||||
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">瞬时波形图</view>
|
||||
<image style="width: 100%" src="/static/boxing1.jpeg" mode="widthFix" />
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">RMS波形图</view>
|
||||
<image style="width: 100%" src="/static/boxing2.jpeg" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
detail: {},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options.detail)
|
||||
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||
this.loading = false
|
||||
updateStatus([this.detail.id])
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.detail {
|
||||
padding: 20rpx 0;
|
||||
|
||||
.detail-content {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 26rpx;
|
||||
|
||||
.detail-content-title {
|
||||
font-size: 32rpx;
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,57 +1,27 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-03"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-02"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
show-badge
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-02-01"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-31"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
<uni-list-item
|
||||
badgeType="error"
|
||||
isDot
|
||||
badge-text="未读"
|
||||
title="发生稳态越限监测点10个"
|
||||
note="2023-01-30"
|
||||
clickable
|
||||
@click="jump"
|
||||
/>
|
||||
</uni-list>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
<Cn-page :loading="loading">
|
||||
<view class="content" slot="body">
|
||||
<uni-card
|
||||
:title="item.equipmentName"
|
||||
: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>
|
||||
</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'
|
||||
@@ -73,8 +43,8 @@ export default {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||
this.store.params.type = 1
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
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
|
||||
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
this.store.params.type = 0
|
||||
this.store.firstCallBack = (res) => {
|
||||
this.store.data.forEach((item) => {
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
|
||||
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag)?.name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user