赞太列表
This commit is contained in:
@@ -1,30 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<Cn-page :loading="loading">
|
<Cn-page :loading="loading">
|
||||||
<view class="content" slot="body">
|
<view class="content" slot="body">
|
||||||
<uni-card
|
<uni-list :border="false">
|
||||||
:title="item.equipmentName"
|
<uni-list-item
|
||||||
:extra="item.status === '1' ? '' : '未读'"
|
isDot
|
||||||
:sub-title="item.startTime"
|
show-badge
|
||||||
|
badgeType="error"
|
||||||
|
:badge-text="item.status == 1 ? '' : '未读'"
|
||||||
|
:title="item.showName"
|
||||||
|
:note="item.startTime"
|
||||||
@click="jump(item)"
|
@click="jump(item)"
|
||||||
|
clickable
|
||||||
v-for="(item, index) in store.data"
|
v-for="(item, index) in store.data"
|
||||||
:key="index"
|
/>
|
||||||
>
|
</uni-list>
|
||||||
<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>
|
|
||||||
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
|
<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>
|
<uni-load-more v-if="store.data && store.data.length > 0" :status="store.status"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import list from "@/common/js/list";
|
import list from '@/common/js/list'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [list],
|
mixins: [list],
|
||||||
@@ -43,8 +39,8 @@ export default {
|
|||||||
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
this.store = this.DataSource('/cs-harmonic-boot/event/queryEventList')
|
||||||
this.store.params.type = 2
|
this.store.params.type = 2
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach(item => {
|
this.store.data.forEach((item) => {
|
||||||
item.title = item.equipmentName + dictData.find(item2 => item2.code === item.tag)?.name
|
item.title = item.equipmentName
|
||||||
})
|
})
|
||||||
console.log(this.store.data)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
@@ -55,12 +51,19 @@ export default {
|
|||||||
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
||||||
uni.navigateTo({ url: '/pages/message/runDetail?detail=' + encodeURIComponent(str) })
|
uni.navigateTo({ url: '/pages/message/runDetail?detail=' + encodeURIComponent(str) })
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang="scss">
|
||||||
.index {}
|
.content {
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
/deep/ .uni-list-item {
|
/deep/ .uni-list-item {
|
||||||
background-color: $uni-theme-white !important;
|
background-color: $uni-theme-white !important;
|
||||||
}
|
}
|
||||||
|
/deep/ .uni-badge {
|
||||||
|
background-color: unset !important;
|
||||||
|
color: #dd524d !important;
|
||||||
|
font-size: 28rpx !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -7,24 +7,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="detail-content">
|
<view class="detail-content">
|
||||||
<view class="detail-content-title mb20">基础信息</view>
|
<view class="detail-content-title mb20">基础信息</view>
|
||||||
<view class="mb10">{{ detail.title }}</view>
|
<view class="mb10" style="font-size: 28rpx;"> {{ detail.showName }}</view>
|
||||||
<view>
|
<view class="mb5"> 设备名称:{{ detail.title }}</view>
|
||||||
{{ detail.engineeringName + '' + detail.projectName }}
|
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||||
</view>
|
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||||
<view v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
<view v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||||
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
||||||
</view>
|
</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>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
@@ -43,7 +32,9 @@ export default {
|
|||||||
console.log(options.detail)
|
console.log(options.detail)
|
||||||
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
if (this.detail.status != 1) {
|
||||||
updateStatus([this.detail.id])
|
updateStatus([this.detail.id])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {},
|
methods: {},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,16 +3,13 @@
|
|||||||
<view class="content" slot="body">
|
<view class="content" slot="body">
|
||||||
<uni-card
|
<uni-card
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
:extra="item.status === '1' ? '' : '未读'"
|
:extra="item.status == '1' ? '' : '未读'"
|
||||||
:sub-title="item.startTime"
|
:sub-title="item.startTime"
|
||||||
@click="jump(item)"
|
@click="jump(item)"
|
||||||
v-for="(item, index) in store.data"
|
v-for="(item, index) in store.data"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<view class="term-list-bottom">
|
<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">
|
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
|
||||||
{{ item2.showName + ':' + item2.value + (item2.unit || '') }}
|
{{ item2.showName + ':' + item2.value + (item2.unit || '') }}
|
||||||
</view>
|
</view>
|
||||||
@@ -45,7 +42,7 @@ export default {
|
|||||||
this.store.params.type = 0
|
this.store.params.type = 0
|
||||||
this.store.firstCallBack = (res) => {
|
this.store.firstCallBack = (res) => {
|
||||||
this.store.data.forEach((item) => {
|
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)
|
console.log(this.store.data)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<Cn-page :loading='loading'>
|
<Cn-page :loading="loading">
|
||||||
<view class='detail' slot='body'>
|
<view class="detail" slot="body">
|
||||||
<view class="detail-content" style="font-size: 32rpx">
|
<view class="detail-content" style="font-size: 32rpx">
|
||||||
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
||||||
<view>{{ detail.startTime }}</view>
|
<view>{{ detail.startTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-content">
|
<view class="detail-content">
|
||||||
<view class="detail-content-title mb20">基础信息</view>
|
<view class="detail-content-title mb20">基础信息</view>
|
||||||
<view class="mb10">{{detail.title}}</view>
|
<view class="mb10" style="font-size: 28rpx">{{ detail.title }}</view>
|
||||||
<view>
|
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||||
{{ detail.engineeringName + '' + detail.projectName }}
|
|
||||||
</view>
|
|
||||||
<view v-for="(item,textIndex) in detail.dataSet" :key="textIndex">
|
|
||||||
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
{{ item.showName + ':' + item.value + (item.unit || '') }}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="mb5"> 设备名称:{{ detail.title }}</view>
|
||||||
|
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||||
|
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||||
|
|
||||||
<!-- <view class="space-between">请您评价本次事件是否对设备造成影响
|
<!-- <view class="space-between">请您评价本次事件是否对设备造成影响
|
||||||
|
|
||||||
</view> -->
|
</view> -->
|
||||||
@@ -30,25 +31,27 @@
|
|||||||
</Cn-page>
|
</Cn-page>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {updateStatus} from "@/common/api/message";
|
import { updateStatus } from '@/common/api/message'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
detail: {}
|
detail: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log(options.detail)
|
console.log(options.detail)
|
||||||
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
if (this.detail.status != 1) {
|
||||||
updateStatus([this.detail.id])
|
updateStatus([this.detail.id])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang="scss">
|
||||||
.detail {
|
.detail {
|
||||||
padding: 20rpx 0;
|
padding: 20rpx 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user