2023-02-28 08:49:16 +08:00
|
|
|
|
<template>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<Cn-page :loading="loading">
|
|
|
|
|
|
<view class="detail" slot="body">
|
|
|
|
|
|
<view class="detail-content" style="font-size: 32rpx">
|
2023-09-06 18:13:08 +08:00
|
|
|
|
<!-- <view class="detail-content-title mb20">发生时间</view> -->
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<view>{{ detail.startTime }}</view>
|
2023-09-06 18:13:08 +08:00
|
|
|
|
</view>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<view class="detail-content">
|
2023-09-06 18:13:08 +08:00
|
|
|
|
<view class="detail-content-title mb20">基础信息</view>
|
2023-09-22 13:39:19 +08:00
|
|
|
|
<view class="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
|
|
|
|
|
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
2023-09-27 10:32:40 +08:00
|
|
|
|
<view class="mb5"> 事件名称:{{ detail.showName }}</view>
|
|
|
|
|
|
<view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
|
|
|
|
|
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
|
|
|
|
|
</view>
|
2023-09-06 18:13:08 +08:00
|
|
|
|
</view>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<view class="detail-content">
|
2023-09-06 18:13:08 +08:00
|
|
|
|
<view class="detail-content-title mb20">瞬时波形图</view>
|
2023-09-22 13:39:19 +08:00
|
|
|
|
<image
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:src="detail.instantPics"
|
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
|
v-if="detail.instantPics"
|
|
|
|
|
|
@click="previewImage(detail.instantPics)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<text v-else>暂无</text>
|
2023-09-06 18:13:08 +08:00
|
|
|
|
</view>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<view class="detail-content">
|
2023-09-06 18:13:08 +08:00
|
|
|
|
<view class="detail-content-title mb20">RMS波形图</view>
|
2023-09-22 13:39:19 +08:00
|
|
|
|
<image
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:src="detail.rmsPics"
|
|
|
|
|
|
mode="widthFix"
|
|
|
|
|
|
v-if="detail.rmsPics"
|
|
|
|
|
|
@click="previewImage(detail.rmsPics)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<text v-else>暂无</text>
|
2023-02-28 08:49:16 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</Cn-page>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
import { updateStatus } from '@/common/api/message'
|
2023-09-06 18:13:08 +08:00
|
|
|
|
|
2023-02-28 08:49:16 +08:00
|
|
|
|
export default {
|
2023-09-06 18:13:08 +08:00
|
|
|
|
data() {
|
2023-02-28 08:49:16 +08:00
|
|
|
|
return {
|
2023-09-06 18:13:08 +08:00
|
|
|
|
loading: true,
|
2023-09-22 10:22:56 +08:00
|
|
|
|
detail: {},
|
2023-02-28 08:49:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-09-06 18:13:08 +08:00
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
console.log(options.detail)
|
|
|
|
|
|
this.detail = JSON.parse(decodeURIComponent(options.detail).replace(/百分比/g, '%'))
|
2023-09-22 13:39:19 +08:00
|
|
|
|
this.detail.rmsPics && (this.detail.rmsPics = this.$config.static + this.detail.rmsPics)
|
|
|
|
|
|
this.detail.instantPics && (this.detail.instantPics = this.$config.static + this.detail.instantPics)
|
2023-09-06 18:13:08 +08:00
|
|
|
|
this.loading = false
|
2023-09-22 10:22:56 +08:00
|
|
|
|
if (this.detail.status != 1) {
|
2023-10-09 16:12:27 +08:00
|
|
|
|
updateStatus({
|
|
|
|
|
|
eventIds: [this.detail.id],
|
|
|
|
|
|
})
|
2023-09-22 10:22:56 +08:00
|
|
|
|
}
|
2023-09-06 18:13:08 +08:00
|
|
|
|
},
|
2023-09-22 13:39:19 +08:00
|
|
|
|
methods: {
|
|
|
|
|
|
previewImage(url) {
|
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
|
urls: [url],
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
2023-02-28 08:49:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2023-09-22 10:22:56 +08:00
|
|
|
|
<style lang="scss">
|
2023-02-28 08:49:16 +08:00
|
|
|
|
.detail {
|
|
|
|
|
|
padding: 20rpx 0;
|
|
|
|
|
|
|
|
|
|
|
|
.detail-content {
|
|
|
|
|
|
padding: 20rpx;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.detail-content-title {
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
color: #111;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-09-22 10:22:56 +08:00
|
|
|
|
</style>
|