调整app页面图标样式
This commit is contained in:
@@ -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