Files
app-govern/pages/message/steady.vue

107 lines
2.9 KiB
Vue
Raw Normal View History

2023-09-18 14:19:09 +08:00
<template>
<view class="content">
<uni-list :border="false">
2023-09-18 19:23:27 +08:00
<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"
/>
2023-09-18 14:19:09 +08:00
</uni-list>
<uni-load-more status="nomore"></uni-load-more>
</view>
</template>
<script>
2023-09-18 19:23:27 +08:00
import list from '@/common/js/list'
2023-09-18 15:55:34 +08:00
2023-09-18 14:19:09 +08:00
export default {
2023-09-18 15:55:34 +08:00
mixins: [list],
data() {
2023-09-18 14:19:09 +08:00
return {
2023-09-18 15:55:34 +08:00
loading: true,
2023-09-18 14:19:09 +08:00
}
},
2023-09-18 15:55:34 +08:00
onShow() {
this.init()
2023-09-18 14:19:09 +08:00
},
methods: {
2023-09-18 19:23:27 +08:00
async init() {
let dictData = await this.$util.getDictData('app_event')
2023-09-18 15:55:34 +08:00
console.log(dictData)
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
this.store.params.type = 1
this.store.firstCallBack = (res) => {
2023-09-18 19:23:27 +08:00
this.store.data.forEach((item) => {
item.title = item.equipmentName + dictData.find((item2) => item2.code === item.tag).name
2023-09-18 15:55:34 +08:00
})
console.log(this.store.data)
this.loading = false
}
this.store.reload()
},
jump(item) {
2023-09-18 19:23:27 +08:00
let str = JSON.stringify(item).replace(/%/g, '百分比')
uni.navigateTo({ url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str) })
2023-09-18 15:55:34 +08:00
},
2023-09-18 19:23:27 +08:00
},
2023-09-18 14:19:09 +08:00
}
</script>
<style lang="scss">
.content {
padding-top: 20rpx;
}
/deep/ .uni-list-item {
background-color: $uni-theme-white !important;
}
/deep/ .uni-badge {
background-color: unset !important;
color: #dd524d !important;
font-size: 28rpx !important;
}
</style>