消息修改
This commit is contained in:
@@ -1,28 +1,25 @@
|
||||
<template>
|
||||
<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>
|
||||
<uni-list :border="false">
|
||||
<uni-list-item
|
||||
isDot
|
||||
show-badge
|
||||
badgeType="error"
|
||||
:badge-text="item.status == 1 ? '' : '未读'"
|
||||
:title="item.showName"
|
||||
:note="item.startTime"
|
||||
@click="jump(item)"
|
||||
clickable
|
||||
v-for="(item, index) in store.data"
|
||||
/>
|
||||
</uni-list>
|
||||
<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'
|
||||
|
||||
@@ -43,17 +40,17 @@ 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
|
||||
})
|
||||
console.log(this.store.data)
|
||||
// this.store.data.forEach((item) => {
|
||||
// item.title = 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/transientDetail?detail=' + encodeURIComponent(str) })
|
||||
uni.navigateTo({ url: '/pages/message/steadyDetail?detail=' + encodeURIComponent(str) })
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -61,16 +58,31 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
padding-top: 20rpx;
|
||||
// padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.term-list-bottom {
|
||||
.term-list-bottom-item {
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// view:first-of-type{
|
||||
// color: #111;
|
||||
// }
|
||||
}
|
||||
|
||||
.term-list-bottom-item:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .uni-list-item {
|
||||
background-color: $uni-theme-white !important;
|
||||
}
|
||||
|
||||
/deep/ .uni-badge {
|
||||
background-color: unset !important;
|
||||
/deep/ .uni-card__header-extra-text {
|
||||
color: #dd524d !important;
|
||||
font-size: 28rpx !important;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user