2023-01-11 16:33:13 +08:00
|
|
|
<template>
|
2023-09-06 18:13:08 +08:00
|
|
|
<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>
|
2023-02-27 14:56:08 +08:00
|
|
|
</view>
|
2023-09-06 18:13:08 +08:00
|
|
|
</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>
|
|
|
|
|
|
2023-01-11 16:33:13 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-09-06 18:13:08 +08:00
|
|
|
import list from "@/common/js/list";
|
|
|
|
|
|
2023-02-01 16:59:32 +08:00
|
|
|
export default {
|
2023-09-06 18:13:08 +08:00
|
|
|
mixins: [list],
|
|
|
|
|
data() {
|
2023-02-01 16:59:32 +08:00
|
|
|
return {
|
2023-09-06 18:13:08 +08:00
|
|
|
loading: true,
|
2023-02-01 16:59:32 +08:00
|
|
|
}
|
|
|
|
|
},
|
2023-09-06 18:13:08 +08:00
|
|
|
onShow() {
|
|
|
|
|
this.init()
|
2023-02-01 16:59:32 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
2023-09-06 18:13:08 +08:00
|
|
|
init() {
|
|
|
|
|
let dictData = this.$util.getDictData('app_event')
|
|
|
|
|
console.log(dictData)
|
|
|
|
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
2023-09-18 14:19:09 +08:00
|
|
|
this.store.params.type = 0
|
2023-09-06 18:13:08 +08:00
|
|
|
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,'百分比')
|
2023-09-18 14:19:09 +08:00
|
|
|
uni.navigateTo({url: '/pages/message/transientDetail?detail=' + encodeURIComponent(str)})
|
|
|
|
|
},
|
2023-02-01 16:59:32 +08:00
|
|
|
}
|
|
|
|
|
}
|
2023-01-11 16:33:13 +08:00
|
|
|
</script>
|
|
|
|
|
|
2023-02-07 17:59:54 +08:00
|
|
|
<style lang="scss">
|
2023-02-09 08:50:01 +08:00
|
|
|
.content {
|
2023-02-27 14:56:08 +08:00
|
|
|
// padding-top: 20rpx;
|
2023-02-09 08:50:01 +08:00
|
|
|
}
|
|
|
|
|
|
2023-02-27 14:56:08 +08:00
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-07 17:59:54 +08:00
|
|
|
|
|
|
|
|
/deep/ .uni-list-item {
|
|
|
|
|
background-color: $uni-theme-white !important;
|
|
|
|
|
}
|
2023-09-06 18:13:08 +08:00
|
|
|
|
2023-02-27 14:56:08 +08:00
|
|
|
/deep/ .uni-card__header-extra-text {
|
|
|
|
|
color: #dd524d !important;
|
2023-02-28 08:49:16 +08:00
|
|
|
font-size: 20rpx;
|
2023-02-27 14:56:08 +08:00
|
|
|
}
|
2023-01-11 16:33:13 +08:00
|
|
|
</style>
|