赞太列表

This commit is contained in:
仲么了
2023-09-22 10:22:56 +08:00
parent 464831f206
commit a17e785d3e
4 changed files with 61 additions and 67 deletions

View File

@@ -1,30 +1,26 @@
<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 +'&#12288;' + 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";
import list from '@/common/js/list'
export default {
mixins: [list],
@@ -43,8 +39,8 @@ export default {
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
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
this.store.data.forEach((item) => {
item.title = item.equipmentName
})
console.log(this.store.data)
this.loading = false
@@ -52,15 +48,22 @@ export default {
this.store.reload()
},
jump(item) {
let str = JSON.stringify(item).replace(/%/g,'百分比')
uni.navigateTo({url: '/pages/message/runDetail?detail=' + encodeURIComponent(str)})
let str = JSON.stringify(item).replace(/%/g, '百分比')
uni.navigateTo({ url: '/pages/message/runDetail?detail=' + encodeURIComponent(str) })
},
}
},
}
</script>
<style lang='scss'>
.index {}
<style lang="scss">
.content {
padding-top: 20rpx;
}
/deep/ .uni-list-item {
background-color: $uni-theme-white !important;
}
</style>
/deep/ .uni-badge {
background-color: unset !important;
color: #dd524d !important;
font-size: 28rpx !important;
}
</style>