赞太列表
This commit is contained in:
@@ -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"
|
||||
<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"
|
||||
: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>
|
||||
<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
|
||||
@@ -55,12 +51,19 @@ export default {
|
||||
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;
|
||||
}
|
||||
/deep/ .uni-badge {
|
||||
background-color: unset !important;
|
||||
color: #dd524d !important;
|
||||
font-size: 28rpx !important;
|
||||
}
|
||||
</style>
|
||||
@@ -7,24 +7,13 @@
|
||||
</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 class="mb10" style="font-size: 28rpx;"> {{ detail.showName }}</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.title }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </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>
|
||||
@@ -43,7 +32,9 @@ export default {
|
||||
console.log(options.detail)
|
||||
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||
this.loading = false
|
||||
if (this.detail.status != 1) {
|
||||
updateStatus([this.detail.id])
|
||||
}
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
|
||||
@@ -3,16 +3,13 @@
|
||||
<view class="content" slot="body">
|
||||
<uni-card
|
||||
:title="item.title"
|
||||
:extra="item.status === '1' ? '' : '未读'"
|
||||
: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>
|
||||
@@ -45,7 +42,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 = dictData.find((item2) => item2.code === item.tag)?.name
|
||||
})
|
||||
console.log(this.store.data)
|
||||
this.loading = false
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view class='detail' slot='body'>
|
||||
<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">
|
||||
<view class="mb10" style="font-size: 28rpx">{{ detail.title }}</view>
|
||||
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
||||
</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.title }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
|
||||
<!-- <view class="space-between">请您评价本次事件是否对设备造成影响
|
||||
|
||||
</view> -->
|
||||
@@ -30,25 +31,27 @@
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import {updateStatus} from "@/common/api/message";
|
||||
import { updateStatus } from '@/common/api/message'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
detail: {}
|
||||
detail: {},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log(options.detail)
|
||||
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||
this.loading = false
|
||||
if (this.detail.status != 1) {
|
||||
updateStatus([this.detail.id])
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.detail {
|
||||
padding: 20rpx 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user