2026-03-17 14:00:55 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view style="position: relative">
|
|
|
|
|
|
<!-- 暂态 -->
|
|
|
|
|
|
<view class="transientBox">
|
|
|
|
|
|
<view class="statistics pd20">
|
2026-03-30 08:43:13 +08:00
|
|
|
|
<view
|
2026-04-24 09:13:17 +08:00
|
|
|
|
class="box boxClick"
|
|
|
|
|
|
:class="{ boxClick1: filterValue == index }"
|
2026-04-17 08:50:07 +08:00
|
|
|
|
v-for="(item, index) in dataList"
|
|
|
|
|
|
@click="
|
|
|
|
|
|
filterValue = index
|
|
|
|
|
|
init()
|
|
|
|
|
|
"
|
2026-03-30 08:43:13 +08:00
|
|
|
|
>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
<!-- <text class="num">{{ item.value }}</text> -->
|
2026-04-17 08:50:07 +08:00
|
|
|
|
<text class="num">{{ item.value }}</text>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
<text class="label">{{ item.label }}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="smallLabel">
|
|
|
|
|
|
<uni-segmented-control
|
|
|
|
|
|
:current="curSub"
|
|
|
|
|
|
active-color="#376cf3"
|
|
|
|
|
|
:values="subsectionList"
|
|
|
|
|
|
@clickItem="sectionChange"
|
|
|
|
|
|
v-if="subsectionList.length > 1"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<view style="width: 180rpx">
|
|
|
|
|
|
<picker @change="bindPickerChange" :value="sort" :range="array" v-if="curSub == 0">
|
|
|
|
|
|
<view class="uni-input"
|
|
|
|
|
|
>{{ array[sort] }}排序
|
|
|
|
|
|
<uni-icons
|
|
|
|
|
|
custom-prefix="iconfont"
|
|
|
|
|
|
type="icon-paixu1"
|
|
|
|
|
|
size="10"
|
|
|
|
|
|
color="#2563EB"
|
|
|
|
|
|
></uni-icons>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</picker>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 卡片 -->
|
2026-03-30 08:43:13 +08:00
|
|
|
|
<scroll-view
|
|
|
|
|
|
scroll-y="true"
|
|
|
|
|
|
@refresherrefresh="refresherrefresh"
|
2026-04-17 08:50:07 +08:00
|
|
|
|
@scrolltolower="scrolltolower"
|
2026-03-30 08:43:13 +08:00
|
|
|
|
:refresher-triggered="triggered"
|
|
|
|
|
|
refresher-enabled="true"
|
2026-03-17 14:00:55 +08:00
|
|
|
|
class="event-list"
|
|
|
|
|
|
v-if="curSub == 0"
|
|
|
|
|
|
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
|
|
|
|
|
>
|
|
|
|
|
|
<!-- 循环渲染事件项 -->
|
|
|
|
|
|
<uni-card
|
2026-04-24 09:13:17 +08:00
|
|
|
|
class="event-item boxClick"
|
2026-03-30 08:43:13 +08:00
|
|
|
|
:class="judgment(item.showName).type"
|
2026-04-17 08:50:07 +08:00
|
|
|
|
v-for="(item, index) in store.data || []"
|
2026-03-17 14:00:55 +08:00
|
|
|
|
:key="index"
|
|
|
|
|
|
@click="jump(item)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<!-- 头部:图标 + 信息 + 操作 -->
|
|
|
|
|
|
<view class="event-header">
|
|
|
|
|
|
<view class="event-icon">
|
|
|
|
|
|
<!-- 动态图标:根据类型切换 -->
|
2026-04-17 08:50:07 +08:00
|
|
|
|
<!-- <uni-icons
|
2026-03-30 08:43:13 +08:00
|
|
|
|
:custom-prefix="'iconfont'"
|
|
|
|
|
|
:type="judgment(item.showName).icon"
|
|
|
|
|
|
:color="judgment(item.showName).color"
|
|
|
|
|
|
:size="judgment(item.showName).size"
|
2026-04-17 08:50:07 +08:00
|
|
|
|
></uni-icons> -->
|
|
|
|
|
|
<Cn-icon-transient :name="item.showName" />
|
2026-03-17 14:00:55 +08:00
|
|
|
|
<!-- 0未读 1已读 -->
|
|
|
|
|
|
<view class="badge1" v-if="item.status == 0"> </view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="event-info">
|
|
|
|
|
|
<view class="event-title">
|
2026-04-17 08:50:07 +08:00
|
|
|
|
<text class="event-id">{{ item.lineName }}</text>
|
2026-03-30 08:43:13 +08:00
|
|
|
|
<text class="event-tag" :class="`${judgment(item.showName).type}-tag`">{{
|
|
|
|
|
|
item.showName
|
|
|
|
|
|
}}</text>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="event-desc">
|
|
|
|
|
|
<text>工程名称:{{ item.engineeringName }}</text>
|
|
|
|
|
|
<text>项目名称:{{ item.projectName }}</text>
|
2026-04-17 08:50:07 +08:00
|
|
|
|
<text>设备名称:{{ item.equipmentName }}</text>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-04-03 14:48:45 +08:00
|
|
|
|
<view class="event-action">
|
|
|
|
|
|
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
|
|
|
|
|
🔍
|
|
|
|
|
|
</view>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 详情区域 -->
|
|
|
|
|
|
<view class="event-detail">
|
|
|
|
|
|
<text>
|
2026-04-17 08:50:07 +08:00
|
|
|
|
{{ item.startTime ? '发生时间:' + item.startTime : '' }}
|
|
|
|
|
|
{{
|
|
|
|
|
|
item.evtParamVVaDepth != null && item.evtParamVVaDepth !== ''
|
|
|
|
|
|
? ',幅值:' + item.evtParamVVaDepth + '%'
|
|
|
|
|
|
: ''
|
|
|
|
|
|
}}
|
|
|
|
|
|
{{
|
|
|
|
|
|
item.evtParamTm != null && item.evtParamTm !== ''
|
|
|
|
|
|
? ',持续时间:' + item.evtParamTm + 's'
|
|
|
|
|
|
: ''
|
|
|
|
|
|
}}
|
|
|
|
|
|
{{
|
|
|
|
|
|
item.evtParamPhase != null && item.evtParamPhase !== ''
|
|
|
|
|
|
? ',相别:' + item.evtParamPhase
|
|
|
|
|
|
: ''
|
|
|
|
|
|
}}
|
2026-03-17 14:00:55 +08:00
|
|
|
|
</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-card>
|
|
|
|
|
|
<uni-load-more
|
|
|
|
|
|
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
|
|
|
|
|
:status="store.status"
|
|
|
|
|
|
></uni-load-more>
|
|
|
|
|
|
<Cn-empty v-else style="top: 20%"></Cn-empty>
|
2026-03-30 08:43:13 +08:00
|
|
|
|
</scroll-view>
|
2026-03-17 14:00:55 +08:00
|
|
|
|
<!-- ITIC 列表 -->
|
|
|
|
|
|
<ITIC
|
|
|
|
|
|
v-if="subsectionList[curSub] == 'ITIC'"
|
|
|
|
|
|
:store="store"
|
|
|
|
|
|
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
|
|
|
|
|
></ITIC>
|
|
|
|
|
|
<!-- F47 列表 -->
|
|
|
|
|
|
<F47
|
|
|
|
|
|
v-if="subsectionList[curSub] == 'F47'"
|
|
|
|
|
|
:store="store"
|
|
|
|
|
|
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
|
|
|
|
|
></F47>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import list from '@/common/js/list'
|
|
|
|
|
|
import { queryUserPushConfig } from '@/common/api/mine'
|
|
|
|
|
|
import ITIC from './comp/ITIC.vue'
|
|
|
|
|
|
import F47 from './comp/F47.vue'
|
2026-04-17 08:50:07 +08:00
|
|
|
|
import { queryAppEventCounts } from '../../common/api/harmonic.js'
|
2026-03-30 08:43:13 +08:00
|
|
|
|
|
2026-03-17 14:00:55 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
components: { ITIC, F47 },
|
|
|
|
|
|
props: {
|
|
|
|
|
|
navHeight: {
|
|
|
|
|
|
type: Number,
|
|
|
|
|
|
default: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
selectValue: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
// default: () => {},
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
mixins: [list],
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
height: 0,
|
2026-04-17 08:50:07 +08:00
|
|
|
|
filterValue: 0,
|
|
|
|
|
|
dataList: [
|
2026-03-17 14:00:55 +08:00
|
|
|
|
{ value: 0, label: '暂态数量', key: '' },
|
|
|
|
|
|
{ value: 0, label: '暂降', key: '电压暂降' },
|
|
|
|
|
|
{ value: 0, label: '中断', key: '电压中断' },
|
|
|
|
|
|
{ value: 0, label: '暂升', key: '电压暂升' },
|
|
|
|
|
|
],
|
|
|
|
|
|
curSub: 0,
|
|
|
|
|
|
subsectionList: [], //'列表', 'ITIC', 'F47'
|
|
|
|
|
|
status: 'noMore', //more加载前 loading加载中 noMore加载后
|
|
|
|
|
|
sort: 0,
|
2026-03-30 08:43:13 +08:00
|
|
|
|
triggered: true,
|
2026-03-17 14:00:55 +08:00
|
|
|
|
// config: {},
|
|
|
|
|
|
array: ['发生时间', '暂降深度', '持续时间'],
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
mounted() {
|
2026-03-30 08:43:13 +08:00
|
|
|
|
this.getConfig()
|
2026-03-17 14:00:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
2026-04-24 09:13:17 +08:00
|
|
|
|
getHeight() {
|
|
|
|
|
|
uni.createSelectorQuery()
|
|
|
|
|
|
.select('.transientBox')
|
|
|
|
|
|
.boundingClientRect((rect) => {
|
|
|
|
|
|
//
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
|
|
this.height = rect?.height || 0
|
|
|
|
|
|
// #endif
|
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
|
|
|
this.height = rect?.height || 0
|
|
|
|
|
|
// #endif
|
|
|
|
|
|
})
|
|
|
|
|
|
.exec()
|
|
|
|
|
|
},
|
2026-03-17 14:00:55 +08:00
|
|
|
|
// 查詢
|
|
|
|
|
|
init() {
|
|
|
|
|
|
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
|
|
|
|
|
this.store.params.type = 0
|
2026-04-17 08:50:07 +08:00
|
|
|
|
// this.store.params.pageSize = 10000
|
2026-03-17 14:00:55 +08:00
|
|
|
|
this.store.params.sortField = this.sort
|
|
|
|
|
|
this.store.params.engineeringid = this.selectValue.engineeringId
|
|
|
|
|
|
this.store.params.projectId = this.selectValue.projectId
|
|
|
|
|
|
this.store.params.deviceId = this.selectValue.deviceId
|
|
|
|
|
|
this.store.params.lineId = this.selectValue.lineId
|
2026-04-17 08:50:07 +08:00
|
|
|
|
this.store.params.target =
|
|
|
|
|
|
this.filterValue == 0
|
|
|
|
|
|
? []
|
|
|
|
|
|
: this.filterValue == 1
|
|
|
|
|
|
? ['Evt_Sys_DipStr']
|
|
|
|
|
|
: this.filterValue == 2
|
|
|
|
|
|
? ['Evt_Sys_IntrStr']
|
|
|
|
|
|
: ['Evt_Sys_SwlStr']
|
2026-03-17 14:00:55 +08:00
|
|
|
|
this.store.params.startTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
|
|
|
|
|
|
this.store.params.endTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
|
|
|
|
|
|
this.store.loadedCallback = () => {
|
2026-04-24 09:13:17 +08:00
|
|
|
|
this.getHeight()
|
2026-03-17 14:00:55 +08:00
|
|
|
|
this.loading = false
|
2026-04-17 08:50:07 +08:00
|
|
|
|
queryAppEventCounts(this.store.params).then((res) => {
|
|
|
|
|
|
this.dataList[0].value = res.data.allNum
|
|
|
|
|
|
this.dataList[1].value = res.data.eventDown
|
|
|
|
|
|
this.dataList[2].value = res.data.eventOff
|
|
|
|
|
|
this.dataList[3].value = res.data.eventUp
|
|
|
|
|
|
})
|
2026-03-17 14:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
this.store.reload()
|
|
|
|
|
|
},
|
|
|
|
|
|
getConfig() {
|
|
|
|
|
|
queryUserPushConfig().then((res) => {
|
|
|
|
|
|
// this.config = res.data
|
2026-03-30 08:43:13 +08:00
|
|
|
|
let list = [
|
2026-03-17 14:00:55 +08:00
|
|
|
|
'列表',
|
|
|
|
|
|
res.data.iticFunction == 1 ? 'ITIC' : '',
|
|
|
|
|
|
res.data.f47Function == 1 ? 'F47' : '',
|
|
|
|
|
|
].filter((item) => item)
|
2026-03-30 08:43:13 +08:00
|
|
|
|
this.curSub = !list[this.curSub] ? 0 : this.curSub
|
|
|
|
|
|
this.subsectionList = JSON.parse(JSON.stringify(list))
|
2026-03-17 14:00:55 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2026-03-30 08:43:13 +08:00
|
|
|
|
judgment(val, key) {
|
2026-03-17 14:00:55 +08:00
|
|
|
|
switch (val) {
|
|
|
|
|
|
case '电压暂降':
|
2026-03-30 08:43:13 +08:00
|
|
|
|
return {
|
|
|
|
|
|
type: 'sag',
|
|
|
|
|
|
icon: 'icon-a-svg4',
|
|
|
|
|
|
color: '#2563eb',
|
|
|
|
|
|
size: '25',
|
|
|
|
|
|
}
|
2026-03-17 14:00:55 +08:00
|
|
|
|
case '电压暂升':
|
2026-03-30 08:43:13 +08:00
|
|
|
|
return {
|
|
|
|
|
|
type: 'swell',
|
|
|
|
|
|
icon: 'icon-a-svg5',
|
|
|
|
|
|
color: '#e6a23c',
|
|
|
|
|
|
size: '25',
|
|
|
|
|
|
}
|
2026-03-17 14:00:55 +08:00
|
|
|
|
case '电压中断':
|
2026-03-30 08:43:13 +08:00
|
|
|
|
return {
|
|
|
|
|
|
type: 'interrupt',
|
|
|
|
|
|
icon: 'icon-zhongduan2',
|
|
|
|
|
|
color: '#6b7280',
|
|
|
|
|
|
size: '35',
|
|
|
|
|
|
}
|
|
|
|
|
|
case '瞬态':
|
|
|
|
|
|
return {
|
|
|
|
|
|
type: 'transient',
|
|
|
|
|
|
icon: 'icon-shuntaishijian',
|
|
|
|
|
|
color: '#8b5cf6',
|
|
|
|
|
|
size: '40',
|
|
|
|
|
|
}
|
|
|
|
|
|
case '未知':
|
|
|
|
|
|
return {
|
|
|
|
|
|
type: 'unknown',
|
|
|
|
|
|
icon: 'icon-wenhao',
|
|
|
|
|
|
color: '#6b7280',
|
|
|
|
|
|
size: '45',
|
|
|
|
|
|
}
|
2026-03-17 14:00:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-03-30 08:43:13 +08:00
|
|
|
|
|
2026-03-17 14:00:55 +08:00
|
|
|
|
// 点击查看详情
|
|
|
|
|
|
jump(item) {
|
|
|
|
|
|
let str = JSON.stringify(item).replace(/%/g, '百分比')
|
|
|
|
|
|
item.status = '1'
|
|
|
|
|
|
uni.navigateTo({ url: '/pages/message1/comp/transientDetails?detail=' + encodeURIComponent(str) })
|
|
|
|
|
|
},
|
|
|
|
|
|
// 切换排序
|
|
|
|
|
|
bindPickerChange(e) {
|
|
|
|
|
|
this.sort = e.detail.value
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
},
|
|
|
|
|
|
sectionChange(e) {
|
|
|
|
|
|
this.curSub = e.currentIndex
|
|
|
|
|
|
},
|
2026-03-30 08:43:13 +08:00
|
|
|
|
// 下拉
|
|
|
|
|
|
refresherrefresh() {
|
|
|
|
|
|
this.triggered = true
|
|
|
|
|
|
uni.startPullDownRefresh()
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.triggered = false
|
|
|
|
|
|
}, 500)
|
|
|
|
|
|
},
|
2026-04-17 08:50:07 +08:00
|
|
|
|
// 上拉
|
|
|
|
|
|
scrolltolower() {
|
|
|
|
|
|
if (this.store.status != 'noMore') {
|
|
|
|
|
|
this.store.next && this.store.next()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2026-03-17 14:00:55 +08:00
|
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
|
|
|
this.curSub = 0
|
|
|
|
|
|
},
|
|
|
|
|
|
computed: {},
|
|
|
|
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
selectValue: {
|
|
|
|
|
|
handler(val, oldVal) {
|
|
|
|
|
|
if (Object.keys(val).length === 0) return
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
@import './index.scss';
|
2026-04-17 08:50:07 +08:00
|
|
|
|
|
2026-03-30 08:43:13 +08:00
|
|
|
|
/deep/ .uni-scroll-view-refresher {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
2026-03-17 14:00:55 +08:00
|
|
|
|
</style>
|