调整app页面图标样式
This commit is contained in:
@@ -3,29 +3,33 @@
|
||||
<view class="filterCriteria">
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :showDatetime="true"> </Cn-filterCriteria>
|
||||
<view class="choose1">
|
||||
<view>
|
||||
<checkbox-group @change="changeBox"
|
||||
><checkbox value="true" :checked="checkedAll" />全选
|
||||
</checkbox-group></view
|
||||
>
|
||||
<!-- <view class="choose1">
|
||||
<view class="nav-menu nav-menu-btn" @click="selectDevice">申请报告 </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="smallLabel mt20">
|
||||
<view> 共 {{ store.total }} 条事件 | 已选择 {{ checkedTotal }} 条事件 </view>
|
||||
<view style="width: 180rpx">
|
||||
<view class="boxCenter">
|
||||
<view>
|
||||
<checkbox-group @change="changeBox" class="boxCenter"
|
||||
><checkbox value="true" :checked="checkedAll" />全选
|
||||
</checkbox-group></view
|
||||
>
|
||||
已选择 {{ checkedTotal }} 条事件
|
||||
</view>
|
||||
<view class="nav-menu nav-menu-btn" @click="selectDevice">申请报告 </view>
|
||||
<!-- <view style="width: 180rpx">
|
||||
<picker @change="bindPickerChange" :value="sort" :range="array">
|
||||
<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>
|
||||
<!-- 卡片 -->
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@scrolltolower="scrolltolower"
|
||||
class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
@@ -41,16 +45,17 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
:custom-prefix="judgment(item.showName) == 'interrupt' ? 'custom-icon' : '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" />
|
||||
</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>
|
||||
@@ -58,22 +63,35 @@
|
||||
<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">
|
||||
<!-- 选择 -->
|
||||
<checkbox-group @change="changeChild($event, item)"
|
||||
><checkbox value="true" :checked="item.checked" />
|
||||
><checkbox value="true" :disabled="!item.wavePath" :checked="item.checked" />
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth }},持续时间:{{
|
||||
item.evtParamTm
|
||||
}},相别:{{ 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>
|
||||
@@ -134,7 +152,7 @@ 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
|
||||
@@ -158,11 +176,17 @@ export default {
|
||||
changeBox(e) {
|
||||
this.checkedAll = !this.checkedAll
|
||||
if (e.target.value.length > 0) {
|
||||
let total = 0
|
||||
this.store.data = this.store.data.map((item) => {
|
||||
item.checked = true
|
||||
if (item.wavePath != null) {
|
||||
item.checked = true
|
||||
total += 1
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
this.checkedTotal = this.store.total
|
||||
this.checkedTotal = total
|
||||
} else {
|
||||
this.store.data = this.store.data.map((item) => {
|
||||
item.checked = false
|
||||
@@ -266,6 +290,20 @@ export default {
|
||||
|
||||
return true
|
||||
},
|
||||
// 下拉
|
||||
refresherrefresh() {
|
||||
this.triggered = true
|
||||
uni.startPullDownRefresh()
|
||||
setTimeout(() => {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -283,7 +321,7 @@ export default {
|
||||
background-color: #fff;
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
/deep/ .uni-checkbox-input {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
@@ -294,8 +332,8 @@ export default {
|
||||
.nav-menu {
|
||||
height: 40rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// margin-left: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
@@ -315,6 +353,10 @@ export default {
|
||||
}
|
||||
.smallLabel {
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx !important;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
.boxCenter {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,21 +22,21 @@
|
||||
<view class="project-info">
|
||||
<view class="project-name">{{ item.engineeringName }}</view>
|
||||
<view class="project-stats">
|
||||
<view class="stat-item" @click="jump('nowEngineering', item)">
|
||||
<view class="stat-item boxClick" @click="jump('nowEngineering', item)">
|
||||
<text class="stat-value blue">{{ item.devTotal }}</text>
|
||||
<text class="stat-label">设备总数</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('currentOnLineDevs', item)">
|
||||
<view class="stat-item boxClick" @click="jump('currentOnLineDevs', item)">
|
||||
<text class="stat-value green">{{ item.onlineDevTotal }}</text>
|
||||
<text class="stat-label">在线设备</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('currentOffLineDevs', item)">
|
||||
<view class="stat-item boxClick" @click="jump('currentOffLineDevs', item)">
|
||||
<text class="stat-value red">{{ item.offlineDevTotal }}</text>
|
||||
<text class="stat-label">离线设备</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('event', item)">
|
||||
<view class="stat-item boxClick" @click="jump('event', item)">
|
||||
<text class="stat-value red">{{ item.alarmTotal }}</text>
|
||||
<text class="stat-label">告警数量</text>
|
||||
<text class="stat-label">事件数量</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -150,8 +150,15 @@ export default {
|
||||
if (type == 'event') {
|
||||
// 存储参数
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: item.engineeringName,
|
||||
id: item.engineeringId,
|
||||
|
||||
engineeringName: this.device.engineeringName,
|
||||
engineeringId: this.device.engineeringId, //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: '',
|
||||
})
|
||||
uni.switchTab({
|
||||
@@ -204,7 +211,7 @@ export default {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.project-stats {
|
||||
@@ -224,13 +231,14 @@ export default {
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
margin-top: 5rpx;
|
||||
// color: #666666;
|
||||
}
|
||||
|
||||
.blue {
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
<template v-if="devCount.engineeringListLength > 0">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0)">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1)">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -50,7 +50,12 @@
|
||||
<view class="canneng-index-title mt20">常用功能</view>
|
||||
<view style="padding: 20rpx 20rpx 0">
|
||||
<Cn-grid title="" :auto-fill="false">
|
||||
<Cn-grid-item src="/static/device2.png" text="设备注册" @click="registerDevice(4)"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
class="boxClick"
|
||||
src="/static/device2.png"
|
||||
text="设备注册"
|
||||
@click="registerDevice(4)"
|
||||
></Cn-grid-item>
|
||||
<!-- <Cn-grid-item
|
||||
src="/static/device2.png"
|
||||
text="功能调试"
|
||||
@@ -178,8 +183,14 @@ export default {
|
||||
},
|
||||
jumpMessage(type) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
@@ -20,17 +20,17 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
|
||||
@@ -3,29 +3,29 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(2, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(2, false)">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, false)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -34,31 +34,31 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(2, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(2, true)">
|
||||
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, true)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
<view class="header-item boxClick" @click="projectNum(true)">
|
||||
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
@@ -81,8 +81,16 @@ export default {
|
||||
methods: {
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
// name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
// id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
engineeringName: flag ? uni.getStorageSync('engineering').name : '',
|
||||
engineeringId: flag ? uni.getStorageSync('engineering').id : '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
@@ -20,25 +20,25 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value"
|
||||
>{{ devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0 }}
|
||||
</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('0')">
|
||||
<view class="header-item boxClick" @click="jumpMessage('0')">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('1')">
|
||||
<view class="header-item boxClick" @click="jumpMessage('1')">
|
||||
<view class="header-item-value">{{ devCount.currentHarmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
@@ -46,9 +46,19 @@
|
||||
<view class="canneng-index-title mt20">常用功能</view>
|
||||
<view style="padding: 20rpx 20rpx 0">
|
||||
<Cn-grid title="">
|
||||
<Cn-grid-item src="/static/device2.png" text="设备注册" @click="registerDevice"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
src="/static/device2.png"
|
||||
class="boxClick"
|
||||
text="设备注册"
|
||||
@click="registerDevice"
|
||||
></Cn-grid-item>
|
||||
<!-- <Cn-grid-item src="/static/gateway2.png" text="网关注册" @click="registerGateway"></Cn-grid-item> -->
|
||||
<Cn-grid-item src="/static/feedback2.png" text="问题反馈" @click="submitFeedBack"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
src="/static/feedback2.png"
|
||||
class="boxClick"
|
||||
text="问题反馈"
|
||||
@click="submitFeedBack"
|
||||
></Cn-grid-item>
|
||||
</Cn-grid>
|
||||
</view>
|
||||
<uni-popup ref="popup" type="dialog" @maskClick="maskClick">
|
||||
@@ -144,8 +154,14 @@ export default {
|
||||
},
|
||||
jumpMessage(type) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name:'',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, false)">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1, false)">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -32,29 +32,29 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value"
|
||||
>{{ devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0 }}
|
||||
</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, true)">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1, true)">
|
||||
<view class="header-item-value">{{ devCount.currentHarmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
<view class="header-item boxClick" @click="projectNum(true)">
|
||||
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
@@ -87,8 +87,16 @@ export default {
|
||||
},
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
// name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
// id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
engineeringName: flag ? uni.getStorageSync('engineering').name : '',
|
||||
engineeringId: flag ? uni.getStorageSync('engineering').id : '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="dateReport">
|
||||
<!-- {{ height }} -->
|
||||
<!-- <view class="pd20">
|
||||
|
||||
<view class="pd20">
|
||||
<uni-segmented-control
|
||||
:current="curSub"
|
||||
class="subsection"
|
||||
@@ -9,10 +10,10 @@
|
||||
:values="subsectionList"
|
||||
@clickItem="sectionChange"
|
||||
/>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="filterCriteria">
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :report="true"> </Cn-filterCriteria>
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :showDatetime="curSub == 0"> </Cn-filterCriteria>
|
||||
</view>
|
||||
|
||||
<!-- 卡片 -->
|
||||
@@ -22,28 +23,50 @@
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list mt20"
|
||||
v-if="eventList.length != 0"
|
||||
: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 class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<view class="event-tags"
|
||||
<!-- <view class="event-tags"
|
||||
>{{ selectValue.report == 0 ? item.startTime : item.startTime + '至' + item.endTime }}
|
||||
<view class="iconText ml10" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text
|
||||
>统计时间:{{
|
||||
curSub == 0 ? item.startTime : item.startTime + ' 至 ' + item.endTime
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action" v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">
|
||||
<view class="iconText" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>{{ item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc }}</text>
|
||||
<view class="event-detail textBox" @touchmove.stop>
|
||||
<text v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">{{
|
||||
item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc
|
||||
}}</text>
|
||||
<text v-else>数据未生成,暂不支持下载</text>
|
||||
</view>
|
||||
<!-- <view class="downloadReport" @click="download">
|
||||
<uni-icons type="download" size="16" color="#376cf3"></uni-icons>下载报告
|
||||
@@ -83,21 +106,18 @@ export default {
|
||||
status: 'noMore',
|
||||
curSub: 0,
|
||||
subsectionList: ['周报', '月报'],
|
||||
eventList: [
|
||||
{
|
||||
id: '测试监测点',
|
||||
tag: '2026-01-23至2026-01-23',
|
||||
|
||||
status: '1',
|
||||
},
|
||||
],
|
||||
thisSelectValue: {},
|
||||
triggered: true,
|
||||
height: 0,
|
||||
thisMonth01: '',
|
||||
monthFlag: true,
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.thisMonth01 = this.$util.getToday().slice(0, -3) + '-01'
|
||||
this.monthFlag = this.$util.getToday() != this.$util.getToday().slice(0, -3) + '-01'
|
||||
|
||||
// this.setHeight()
|
||||
},
|
||||
methods: {
|
||||
@@ -107,28 +127,33 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 80 || 0
|
||||
this.height = rect?.height + 140 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 30 || 0
|
||||
this.height = rect?.height + 70 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curSub = index.currentIndex
|
||||
this.init()
|
||||
},
|
||||
init() {
|
||||
if (this.selectValue.lineId == '') return
|
||||
|
||||
this.store = this.DataSource('/cs-report-boot/csAppReport/reportList')
|
||||
this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.selectValue.report
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.curSub //this.selectValue.report
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
this.store.params.lineId = this.selectValue.lineId
|
||||
this.store.params.time = this.selectValue.date
|
||||
if (this.curSub == 0) {
|
||||
this.store.params.time = this.selectValue.date
|
||||
} else {
|
||||
this.store.params.time = this.selectValue.range + '-01'
|
||||
}
|
||||
// this.store.params.startTime = this.selectValue.range[0]
|
||||
// this.store.params.endTime = this.selectValue.range[1]
|
||||
this.store.loadedCallback = () => {}
|
||||
@@ -137,11 +162,10 @@ export default {
|
||||
|
||||
select(value) {
|
||||
this.selectValue = value
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 200)
|
||||
this.init()
|
||||
|
||||
},
|
||||
// 下载
|
||||
download(item) {
|
||||
@@ -289,6 +313,34 @@ export default {
|
||||
border-radius: 50%;
|
||||
background-color: $uni-theme-color;
|
||||
text-align: center;
|
||||
line-height: 45rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
/* 列表容器 */
|
||||
.event-list {
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
.event-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.event-tags {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
// @touchmove.stop
|
||||
max-height: 110rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,24 +22,28 @@
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :showQianTree="false"> </Cn-filterCriteria>
|
||||
</view>
|
||||
<view
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="record event-list mt20"
|
||||
: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"
|
||||
:style="{ backgroundColor: item.isComplete == 1 ? '#10b98120' : '#FF000020' }"
|
||||
>
|
||||
<view class="event-icon">
|
||||
<!-- :style="{ backgroundColor: item.isComplete == 1 ? '#10b98120' : '#FF000020' }" -->
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-baogaoguanli"
|
||||
size="40"
|
||||
:color="item.isComplete == 1 ? '#10b981' : '#FF0000'"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`报告`" />
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
@@ -81,10 +85,9 @@
|
||||
<text>{{ item.eventNums }}次</text>
|
||||
</view>
|
||||
<view class="device-body-item">
|
||||
<text>申请状态:</text>
|
||||
<text>报告状态:</text>
|
||||
<text
|
||||
:style="{ color: item.isComplete == 1 ? '#10b981' : '#FF0000' }"
|
||||
style="font-weight: 700"
|
||||
>{{ item.isComplete == 1 ? '已完成' : '未完成' }}</text
|
||||
>
|
||||
</view>
|
||||
@@ -102,7 +105,7 @@
|
||||
:status="store.status"
|
||||
></uni-load-more>
|
||||
<Cn-empty v-else style="top: 30%"></Cn-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -141,6 +144,7 @@ export default {
|
||||
type: 0,
|
||||
lindId: '',
|
||||
},
|
||||
triggered: true,
|
||||
userInfo: {},
|
||||
height: 0,
|
||||
selectValue: {},
|
||||
@@ -274,8 +278,6 @@ export default {
|
||||
},
|
||||
// 刷新
|
||||
reload() {
|
||||
console.log(123, this.curSub)
|
||||
|
||||
switch (this.curSub) {
|
||||
case 0:
|
||||
this.$refs.applyRef.store.reload()
|
||||
@@ -285,6 +287,20 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
// 下拉
|
||||
refresherrefresh() {
|
||||
this.triggered = true
|
||||
uni.startPullDownRefresh()
|
||||
setTimeout(() => {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
}
|
||||
@@ -355,6 +371,12 @@ export default {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.event-list {
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
|
||||
@@ -187,11 +187,18 @@ export default {
|
||||
key: this.$cacheKey.messageCount,
|
||||
data: this.devCount,
|
||||
})
|
||||
// let messagePage =
|
||||
// this.devCount.runCount +
|
||||
// this.devCount.eventCount +
|
||||
// this.devCount.alarmCount +
|
||||
// this.devCount.harmonicCount
|
||||
let messagePage =
|
||||
this.devCount.runCount +
|
||||
this.devCount.eventCount +
|
||||
this.devCount.alarmCount +
|
||||
this.devCount.harmonicCount
|
||||
this.devCount.harmonicCount +
|
||||
(uni.getStorageSync(this.$cacheKey.userInfo).authorities == 'operation_manager'
|
||||
? this.devCount.alarmCount + this.devCount.runCount
|
||||
: 0)
|
||||
console.log('🚀 ~ messagePage:', messagePage)
|
||||
let minePage = this.devCount.feedBackCount
|
||||
|
||||
if (messagePage) {
|
||||
@@ -300,7 +307,6 @@ export default {
|
||||
|
||||
.canneng-index-title {
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ export default {
|
||||
if (params.type !== '') {
|
||||
this.current = params.type - 0
|
||||
}
|
||||
if (params.name != '') {
|
||||
this.$refs.cnFilterCriteria && this.$refs.cnFilterCriteria.external(params.name, params.id)
|
||||
if (params.engineeringName != '') {
|
||||
this.$refs.cnFilterCriteria && this.$refs.cnFilterCriteria.external(params)
|
||||
}
|
||||
// this.refresh()
|
||||
this.$refs.TransientRef && this.$refs.TransientRef.getConfig()
|
||||
@@ -131,8 +131,14 @@ export default {
|
||||
// 页面销毁
|
||||
onHide() {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: '',
|
||||
})
|
||||
},
|
||||
@@ -195,11 +201,13 @@ export default {
|
||||
key: this.$cacheKey.messageCount,
|
||||
data: this.devCount,
|
||||
})
|
||||
|
||||
let messagePage =
|
||||
this.devCount.runCount +
|
||||
this.devCount.eventCount +
|
||||
this.devCount.alarmCount +
|
||||
this.devCount.harmonicCount
|
||||
this.devCount.harmonicCount +
|
||||
(uni.getStorageSync(this.$cacheKey.userInfo).authorities == 'operation_manager'
|
||||
? this.devCount.alarmCount + this.devCount.runCount
|
||||
: 0)
|
||||
let minePage = this.devCount.feedBackCount
|
||||
|
||||
if (messagePage) {
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('transientSetting')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<!-- 调试内容配置 serverSetting-->
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server2.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/tongji.png" />
|
||||
<view class="mine-nav-label">暂态统计配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user