调整app页面图标样式
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -23,24 +24,34 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="30"
|
||||
color="#FF0000"
|
||||
></uni-icons>
|
||||
color="#376cf3"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`运行告警`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.date }}发生告警终端{{ item.warnNums }}台</text>
|
||||
<text class="event-id">{{ item.date }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>告警终端:{{ item.warnNums }}台</text>
|
||||
<text>通讯中断:{{ item.interruptCounts }}次</text>
|
||||
<text>终端告警:{{ item.warnCounts}}次</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
<view class="event-action">
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="event-detail">
|
||||
<text> 告警终端{{ item.warnNums }}台 </text>
|
||||
</view> -->
|
||||
</uni-card>
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||
@@ -76,7 +87,7 @@ export default {
|
||||
methods: {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csAlarm/queryAlarmList')
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
@@ -101,6 +112,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -124,18 +141,18 @@ export default {
|
||||
.event-list {
|
||||
margin-top: 20rpx;
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
.event-header {
|
||||
margin-bottom: 0rpx;
|
||||
}
|
||||
.event-title {
|
||||
margin-bottom: 0rpx;
|
||||
}
|
||||
// .event-header {
|
||||
// margin-bottom: 0rpx;
|
||||
// }
|
||||
// .event-title {
|
||||
// margin-bottom: 0rpx;
|
||||
// }
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #ff000020;
|
||||
// width: 80rpx;
|
||||
// height: 80rpx;
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
/* 信息区域 */
|
||||
|
||||
@@ -13,9 +13,7 @@ export default {
|
||||
store: {
|
||||
type: [Object],
|
||||
},
|
||||
filterValue: {
|
||||
type: [String],
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -238,20 +236,13 @@ export default {
|
||||
store: {
|
||||
handler(val, oldVal) {
|
||||
this.status = val.status
|
||||
this.data = (val.data || []).filter((k) =>
|
||||
this.filterValue == '' ? k : k.showName == this.filterValue,
|
||||
)
|
||||
this.data = (val.data || [])
|
||||
this.gongfunction()
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
filterValue: {
|
||||
handler(val, oldVal) {
|
||||
this.data = (this.store.data || []).filter((k) => (val == '' ? k : k.showName == val))
|
||||
this.gongfunction()
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,9 +13,7 @@ export default {
|
||||
store: {
|
||||
type: [Object],
|
||||
},
|
||||
filterValue: {
|
||||
type: [String],
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -230,20 +228,13 @@ export default {
|
||||
store: {
|
||||
handler(val, oldVal) {
|
||||
this.status = val.status
|
||||
this.data = (val.data || []).filter((k) =>
|
||||
this.filterValue == '' ? k : k.showName == this.filterValue,
|
||||
)
|
||||
this.data = (val.data || [])
|
||||
this.gongfunction()
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
filterValue: {
|
||||
handler(val, oldVal) {
|
||||
this.data = (this.store.data || []).filter((k) => (val == '' ? k : k.showName == val))
|
||||
this.gongfunction()
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,102 +6,68 @@
|
||||
<view>{{ detail.date }}</view>
|
||||
</view>
|
||||
<view class="detail-content" style="padding: 0px">
|
||||
<view class="detail-content-title mb20 pt20 pl20">终端告警列表</view>
|
||||
<view class="detail-content-title pb20 pt20 pl20">终端告警列表</view>
|
||||
</view>
|
||||
|
||||
<!-- <uni-collapse accordion v-model="collapseValue">
|
||||
<uni-collapse-item :title="item.devName" v-for="item in list">
|
||||
<template v-slot:title>
|
||||
<view class="collapseTop">
|
||||
<view class="mb5 name"> {{ item.devName }}</view>
|
||||
<view class="mb5 frequency">
|
||||
<view class="mr20"> 告警次数: {{ item.warnCounts }} 次</view>
|
||||
<view> 通讯中断: {{ item.interruptCounts }} 次</view>
|
||||
</view>
|
||||
<view class="event-list">
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in list" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view
|
||||
class="event-icon"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-bgc' : 'jc-bgc'"
|
||||
>
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="35"
|
||||
color="#FF0000"
|
||||
></uni-icons> -->
|
||||
<!-- <Cn-icon-transient :name="`运行告警`" /> -->
|
||||
<Cn-icon-transient
|
||||
:name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'"
|
||||
/>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.devName }}</text>
|
||||
<text
|
||||
class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
|
||||
>{{ item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text
|
||||
>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>项目名称:{{ item.projectName }} </view></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>工程名称:{{ item.engineeringName }}</view></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>通讯信息:</view>
|
||||
<view style="flex: 1">
|
||||
<view v-if="item.interruptCounts == 0">通讯正常</view>
|
||||
<view v-else>通讯中断{{ item.interruptCounts }}次,具体如下所示:</view
|
||||
><view v-for="date in item.interruptDetails" class="mt15 textBox">{{
|
||||
date
|
||||
}}</view></view
|
||||
></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>告警信息:</view>
|
||||
<view style="flex: 1">
|
||||
<view v-if="item.warnCounts == 0">暂无终端告警信息</view>
|
||||
<view v-else>终端告警{{ item.warnCounts }}次,具体如下所示:</view
|
||||
><view v-for="val in item.warnDetails" class="mt15 textBox">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view></view
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<!-- <text>事件时间:{{ item.startTime }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<view v-if="item.interruptCounts">
|
||||
通讯中断 {{ item.interruptCounts }} 次,详情如下:
|
||||
<view class="textBox">
|
||||
<view
|
||||
v-for="date in String(item.interruptDetails || '').split(',')"
|
||||
class="textBox mb5"
|
||||
>{{ date }}</view
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse> -->
|
||||
<view class="event-list">
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in list" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="35"
|
||||
color="#FF0000"
|
||||
></uni-icons>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.devName }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<!-- <text>事件时间:{{ item.startTime }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.warnCounts">
|
||||
终端告警 {{ item.warnCounts }} 次,详情如下:
|
||||
<view class="textBox">
|
||||
<view v-for="val in item.warnDetails" class="textBox mb5">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view></view
|
||||
>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<uni-collapse>
|
||||
<uni-collapse-item
|
||||
:title="
|
||||
item.interruptCounts == 0 ? '通讯正常' : `通讯中断 ${item.interruptCounts} 次`
|
||||
"
|
||||
>
|
||||
<view
|
||||
v-for="date in String(item.interruptDetails || '').split(',')"
|
||||
class="textBox mb10"
|
||||
>{{ date }}</view
|
||||
>
|
||||
</uni-collapse-item>
|
||||
<uni-collapse-item
|
||||
:title="
|
||||
item.warnCounts == 0 ? '暂无终端告警信息' : `终端告警 ${item.warnCounts} 次`
|
||||
"
|
||||
>
|
||||
<view v-for="val in item.warnDetails" class="textBox mb10">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
@@ -180,18 +146,30 @@ export default {
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
border-bottom: 1px solid #eee;
|
||||
// border-bottom: 1px solid #eee;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
text-indent: 2em;
|
||||
}
|
||||
.event-list {
|
||||
background: #fff;
|
||||
// background: #fff;
|
||||
padding-bottom: 10rpx;
|
||||
.event-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
background-color: #ff000020;
|
||||
// .event-icon {
|
||||
// background-color: #376cf320;
|
||||
// }
|
||||
.zl-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.jc-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.zl-tag {
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-collapse-item__title-box {
|
||||
@@ -204,4 +182,8 @@ export default {
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
max-height: 120rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">基础信息</view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.devName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 设备名称:{{ detail.devName }} </view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5" style="display: flex">
|
||||
越限详情:
|
||||
<view style="flex: 1">{{ detail.overLimitDesc }}</view></view
|
||||
<view style="flex: 1" class="details">{{ detail.overLimitDesc }}</view></view
|
||||
>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20"
|
||||
>指标越限详情<text class="prompt">(仅显示较为严重的10次)</text></view
|
||||
>指标越限详情<text class="prompt">(仅显示最严重的10组数据)</text></view
|
||||
>
|
||||
|
||||
<uni-collapse accordion v-model="collapseValue">
|
||||
@@ -129,13 +129,15 @@ export default {
|
||||
padding: 20rpx 0rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
text {
|
||||
flex: 1;
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
// color: #333;
|
||||
&:first-child {
|
||||
// text-align: left;
|
||||
flex: 1.2;
|
||||
&:nth-child(1) {
|
||||
flex: 1;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,4 +152,8 @@ export default {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.details {
|
||||
max-height: 70px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">基础信息</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5"> 暂态类型:{{ detail.showName }}</view>
|
||||
<view class="mb5"> 持续时间:{{ detail.evtParamTm || '-' }}%</view>
|
||||
<view class="mb5"> 幅值:{{ detail.evtParamVVaDepth || '-' }}s</view>
|
||||
<view class="mb5"> 相别:{{ detail.evtParamPhase || '-' }}</view>
|
||||
<view class="mb5" v-if="detail.evtParamTm"> 持续时间:{{ detail.evtParamTm }}s</view>
|
||||
<view class="mb5" v-if="detail.evtParamVVaDepth"> 幅值:{{ detail.evtParamVVaDepth }}%</view>
|
||||
<view class="mb5" v-if="detail.evtParamPhase"> 相别:{{ detail.evtParamPhase }}</view>
|
||||
<!-- <view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
||||
</view> -->
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
position: relative;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -21,14 +22,22 @@
|
||||
>
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<view class="event-icon" :class="item.devType == 'Direct_Connected_Device' ? 'zl-bgc' : 'jc-bgc'">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons custom-prefix="iconfont" type="icon-shebei" size="35" color="#10B981"></uni-icons>
|
||||
<!-- <uni-icons custom-prefix="iconfont" type="icon-shebei3" size="35" color="#376cf3"></uni-icons> -->
|
||||
<Cn-icon-transient
|
||||
:name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'"
|
||||
/>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text
|
||||
class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
|
||||
>{{ item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
@@ -68,7 +77,7 @@ export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
triggered: true,
|
||||
triggered: true,
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
@@ -78,7 +87,7 @@ export default {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 2
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.sortField = this.sort
|
||||
this.store.params.engineeringid = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
@@ -108,6 +117,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -134,11 +149,19 @@ export default {
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
// width: 90rpx;
|
||||
// height: 90rpx;
|
||||
|
||||
background-color: #10b98120;
|
||||
.zl-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.jc-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.zl-tag {
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
class="box"
|
||||
:class="{ boxClick: item.label == filterValue }"
|
||||
v-for="item in list"
|
||||
@click="filterValue = item.label"
|
||||
@click="
|
||||
filterValue = item.label
|
||||
init()
|
||||
"
|
||||
>
|
||||
<text class="num">{{ item.value }}</text>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
@@ -19,6 +22,7 @@
|
||||
v-if="filterValue == '稳态数量'"
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -36,12 +40,13 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`稳态越限`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
@@ -61,7 +66,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail textBox">
|
||||
<view class="event-detail textBox" @touchmove.stop>
|
||||
<text>{{ item.statisticsDate }}发生 {{ item.overLimitDesc }} </text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -83,10 +88,67 @@
|
||||
:end-date="endData"
|
||||
/>
|
||||
</view>
|
||||
<!-- 越限测点数 -->
|
||||
<scroll-view
|
||||
v-if="filterValue == '越限测点数'"
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`稳态越限`" />
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<text>设备名称:{{ item.devName }}</text>
|
||||
<!-- <text>统计日期:{{ item.statisticsDate }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<uni-calendar
|
||||
:insert="true"
|
||||
:lunar="false"
|
||||
:date="startData"
|
||||
:selected="item.timeList.map((date) => ({ date, info: '' }))"
|
||||
:start-date="startData"
|
||||
:end-date="endData"
|
||||
/>
|
||||
</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>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { queryAppHarmonicCounts, queryAppHarmonicLine } from '../../common/api/harmonic.js'
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
@@ -112,11 +174,11 @@ export default {
|
||||
startData: '',
|
||||
endData: '',
|
||||
selected: [
|
||||
{ date: '2026-04-10', info: '' },
|
||||
{ date: '2026-04-11', info: '' },
|
||||
{ date: '2026-04-12', info: '' },
|
||||
// { date: '2026-04-13', info: '' },
|
||||
// { date: '2026-04-10', info: '' },
|
||||
// { date: '2026-04-11', info: '' },
|
||||
// { date: '2026-04-12', info: '' },
|
||||
],
|
||||
|
||||
triggered: true,
|
||||
status: 'noMore', //more加载前 loading加载中 noMore加载后
|
||||
}
|
||||
@@ -144,8 +206,12 @@ export default {
|
||||
// "time": ""
|
||||
// 查詢
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryHarmonicList')
|
||||
this.store.params.pageSize = 10000
|
||||
if (this.filterValue == '越限测点数') {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryAppHarmonicLine')
|
||||
} else {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryHarmonicList')
|
||||
}
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
@@ -153,12 +219,16 @@ export default {
|
||||
this.store.params.time = this.selectValue.date
|
||||
|
||||
this.store.loadedCallback = () => {
|
||||
this.list[0].value = this.store.copyData.harmonicNums
|
||||
this.list[1].value = this.store.copyData.overDays
|
||||
this.list[2].value = this.store.copyData.overLineNums
|
||||
this.loading = false
|
||||
this.startData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
|
||||
this.endData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
|
||||
// 查询越限日期
|
||||
queryAppHarmonicCounts(this.store.params).then((res) => {
|
||||
this.list[0].value = res.data.harmonicNums
|
||||
this.list[1].value = res.data.overDays
|
||||
this.list[2].value = res.data.overLineNums
|
||||
this.selected = res.data.overDaysList.map((date) => ({ date, info: '' }))
|
||||
})
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
@@ -177,6 +247,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -211,7 +287,7 @@ export default {
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #e6a23c20;
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.event-tags {
|
||||
@@ -223,13 +299,14 @@ export default {
|
||||
}
|
||||
.textBox {
|
||||
max-height: 110rpx;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
// overflow: hidden;
|
||||
/* 下面是溢出显示省略号关键样式 */
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3; /* 控制最多显示几行,你可以改 2/3/4 */
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
// display: -webkit-box;
|
||||
// -webkit-line-clamp: 3; /* 控制最多显示几行,你可以改 2/3/4 */
|
||||
// -webkit-box-orient: vertical;
|
||||
// text-overflow: ellipsis;
|
||||
// word-break: break-all;
|
||||
}
|
||||
/deep/ .uni-calendar-item--checked {
|
||||
background-color: #ffffff00;
|
||||
@@ -250,15 +327,18 @@ export default {
|
||||
/deep/ .uni-calendar-item__weeks-box-text {
|
||||
z-index: 1;
|
||||
}
|
||||
/deep/ .uni-calendar-item--isDay-text {
|
||||
color: #333 !important; /* 改成你想要的颜色 */
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-circle {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 9px;
|
||||
top: 7px;
|
||||
right: 6px;
|
||||
width: 39px;
|
||||
height: 39px;
|
||||
border-radius: 50%;
|
||||
z-index: 0;
|
||||
background-color: #e43d33;
|
||||
background-color: #f43530;
|
||||
}
|
||||
/* 核心:选中圆圈下的 子元素(日期数字) */
|
||||
/deep/ .uni-calendar-item__weeks-box-circle + .uni-calendar-item__weeks-box-text {
|
||||
@@ -268,7 +348,28 @@ export default {
|
||||
/deep/ .uni-calendar__header-btn-box {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-lunar-text {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .uni-calendar__header {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
.event-detail {
|
||||
/deep/ .uni-calendar__header {
|
||||
display: none !important;
|
||||
}
|
||||
/deep/ .uni-calendar__weeks-day {
|
||||
height: 35px;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-item {
|
||||
height: 40px;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-circle {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 8px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
<view class="statistics pd20">
|
||||
<view
|
||||
class="box"
|
||||
:class="{ boxClick: filterValue == item.key }"
|
||||
v-for="item in list"
|
||||
@click="filterValue = item.key"
|
||||
:class="{ boxClick: filterValue == index }"
|
||||
v-for="(item, index) in dataList"
|
||||
@click="
|
||||
filterValue = index
|
||||
init()
|
||||
"
|
||||
>
|
||||
<!-- <text class="num">{{ item.value }}</text> -->
|
||||
<text class="num">{{
|
||||
store &&
|
||||
store.data &&
|
||||
store.data.filter((k) => (item.key == '' ? item : k.showName == item.key)).length
|
||||
}}</text>
|
||||
<text class="num">{{ item.value }}</text>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,6 +44,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -55,9 +55,7 @@
|
||||
<uni-card
|
||||
class="event-item"
|
||||
:class="judgment(item.showName).type"
|
||||
v-for="(item, index) in (store.data || []).filter((k) =>
|
||||
filterValue == '' ? k : k.showName == filterValue,
|
||||
)"
|
||||
v-for="(item, index) in store.data || []"
|
||||
:key="index"
|
||||
@click="jump(item)"
|
||||
>
|
||||
@@ -65,18 +63,19 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
:custom-prefix="'iconfont'"
|
||||
:type="judgment(item.showName).icon"
|
||||
:color="judgment(item.showName).color"
|
||||
:size="judgment(item.showName).size"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="item.showName" />
|
||||
<!-- 0未读 1已读 -->
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<text class="event-tag" :class="`${judgment(item.showName).type}-tag`">{{
|
||||
item.showName
|
||||
}}</text>
|
||||
@@ -84,7 +83,7 @@
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<text>监测点名称:{{ item.lineName }}</text>
|
||||
<text>设备名称:{{ item.equipmentName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
@@ -95,9 +94,22 @@
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth || '-' }}%,持续时间:{{
|
||||
item.evtParamTm || '-'
|
||||
}}s,相别:{{ item.evtParamPhase || '-' }}
|
||||
{{ 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
|
||||
: ''
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -111,14 +123,12 @@
|
||||
<ITIC
|
||||
v-if="subsectionList[curSub] == 'ITIC'"
|
||||
:store="store"
|
||||
:filterValue="filterValue"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
></ITIC>
|
||||
<!-- F47 列表 -->
|
||||
<F47
|
||||
v-if="subsectionList[curSub] == 'F47'"
|
||||
:store="store"
|
||||
:filterValue="filterValue"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
></F47>
|
||||
</view>
|
||||
@@ -128,6 +138,7 @@ import list from '@/common/js/list'
|
||||
import { queryUserPushConfig } from '@/common/api/mine'
|
||||
import ITIC from './comp/ITIC.vue'
|
||||
import F47 from './comp/F47.vue'
|
||||
import { queryAppEventCounts } from '../../common/api/harmonic.js'
|
||||
|
||||
export default {
|
||||
components: { ITIC, F47 },
|
||||
@@ -145,8 +156,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
filterValue: '',
|
||||
list: [
|
||||
filterValue: 0,
|
||||
dataList: [
|
||||
{ value: 0, label: '暂态数量', key: '' },
|
||||
{ value: 0, label: '暂降', key: '电压暂降' },
|
||||
{ value: 0, label: '中断', key: '电压中断' },
|
||||
@@ -169,10 +180,10 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 12 || 0
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 12 || 0
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
@@ -183,17 +194,30 @@ export default {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 0
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
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
|
||||
this.store.params.target =
|
||||
this.filterValue == 0
|
||||
? []
|
||||
: this.filterValue == 1
|
||||
? ['Evt_Sys_DipStr']
|
||||
: this.filterValue == 2
|
||||
? ['Evt_Sys_IntrStr']
|
||||
: ['Evt_Sys_SwlStr']
|
||||
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 = () => {
|
||||
this.filterValue = ''
|
||||
this.loading = false
|
||||
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
|
||||
})
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
@@ -272,6 +296,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.curSub = 0
|
||||
@@ -293,6 +323,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user