调整app页面图标样式

This commit is contained in:
guanj
2026-04-17 08:50:07 +08:00
parent bac0f83f64
commit 747d3139cf
40 changed files with 1345 additions and 553 deletions

View File

@@ -1,62 +1,76 @@
<template>
<Cn-page :loading="loading">
<view slot="body">
<view class="about">
<view class="about-title">{{ deviceInfo.name }}</view>
<view class="about-text">设备类型{{ deviceInfo.devTypeName }}</view>
<view class="about-text">设备型号{{ deviceInfo.devModelName }}</view>
<view class="about-text"
>设备接入方式{{ deviceInfo.devAccessMethod === 'cloud' ? 'CLD' : 'MQTT' }}</view
>
<!-- <view class="about-text">设备注册时间永久使用</view> -->
<view class="about-text">程序版本{{ deviceInfo.programVersionName }}</view>
<view class="about-text">网络设备ID{{ deviceInfo.ndid }}</view>
</view>
</view>
</Cn-page>
</template>
<script>
import { queryDeivceById } from '@/common/api/device'
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
export default {
data() {
return {
loading: true,
deviceInfo: {},
}
},
methods: {},
onLoad(options) {
queryDeivceById(options.id).then((res) => {
console.log(res)
this.deviceInfo = res.data[0]
queryByCode('Device_Type').then((res) => {
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then((resp) => {
console.log(resp)
this.deviceInfo.devTypeName = resp[0].data.find((item) => item.id === this.deviceInfo.devType)?.name
this.deviceInfo.devModelName = resp[1].data.find(
(item) => item.id === this.deviceInfo.devModel,
)?.name
this.loading = false
})
})
})
},
}
</script>
<style lang="scss">
.about {
padding: 34rpx;
.about-title {
font-size: 34rpx;
font-weight: bold;
color: #333333;
margin-bottom: 34rpx;
}
.about-text {
font-size: 28rpx;
color: #666666;
margin-bottom: 34rpx;
}
}
</style>
<template>
<Cn-page :loading="loading">
<view slot="body">
<view class="about">
<view class="about-title">{{ deviceInfo.name }}</view>
<view class="about-text">设备类型{{ deviceInfo.devTypeName }}</view>
<view class="about-text">设备型号{{ deviceInfo.devModelName }}</view>
<view class="about-text">设备接入方式{{ deviceInfo.devAccessMethod }}</view>
<!-- <view class="about-text">设备注册时间永久使用</view> -->
<view class="about-text">程序版本{{ deviceInfo.programVersionName }}</view>
<view class="about-text">网络设备ID{{ deviceInfo.ndid }}</view>
</view>
</view>
</Cn-page>
</template>
<script>
import { queryDeivceById } from '@/common/api/device'
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
export default {
data() {
return {
loading: true,
deviceInfo: {},
}
},
methods: {},
onLoad(options) {
queryDeivceById(options.id).then((res) => {
this.deviceInfo = res.data[0]
if (this.deviceInfo.devAccessMethod == 'MQTT') {
queryByCode('Device_Type').then((res) => {
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then(
(resp) => {
this.deviceInfo.devTypeName = resp[0].data.find(
(item) => item.id === this.deviceInfo.devType,
)?.name
this.deviceInfo.devModelName = resp[1].data.find(
(item) => item.id === this.deviceInfo.devModel,
)?.name
this.loading = false
},
)
})
} else {
queryByCode('DEV_CLD').then((res) => {
this.deviceInfo.devTypeName = res.data.name
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then(
(resp) => {
this.deviceInfo.devModelName = resp[1].data.find(
(item) => item.id === this.deviceInfo.devModel,
)?.name
this.loading = false
},
)
})
}
})
},
}
</script>
<style lang="scss">
.about {
padding: 34rpx;
.about-title {
font-size: 34rpx;
font-weight: bold;
color: #333333;
margin-bottom: 34rpx;
}
.about-text {
font-size: 28rpx;
color: #666666;
margin-bottom: 34rpx;
}
}
</style>

View File

@@ -159,6 +159,7 @@ export default {
domLoading: true,
loading: true,
deviceInfo: {},
device: {},
navMenuActive: 0,
navHeight: 0,
img: '',
@@ -185,8 +186,8 @@ export default {
],
content: [
{
iconPath: '/static/report.png',
text: '详情',
iconPath: '/static/tongji.png',
text: '事件',
},
// {
// iconPath: '/static/record.png',
@@ -243,8 +244,22 @@ export default {
this.$util.toast('下载成功')
} else if (e.text === '记录') {
uni.navigateTo({ url: '/pages/device/APF/record' })
} else if (e.text === '详情') {
uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
} else if (e.text === '事件') {
// uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
uni.setStorageSync('messageParams', {
engineeringName: this.device.engineeringName,
engineeringId: this.device.engineeringId, //工程ID
projectName: this.device.projectName,
projectId: this.device.projectId, //項目ID
deviceName: this.device.equipmentName,
deviceId: this.device.equipmentId, //设备ID
lineName: '',
lineId: '', //测点ID
type: 0,
})
uni.switchTab({
url: '/pages/index/message1',
})
} else if (e.text === '关于') {
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
} else if (e.text === '移交') {
@@ -526,6 +541,8 @@ export default {
onLoad(options) {
this.pageOptions = options
this.device = JSON.parse(options.device)
console.log('🚀 ~ options:', options)
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
this.devId = options.id
this.isPrimaryUser = options.isPrimaryUser

View File

@@ -12,17 +12,16 @@
style="margin-top: 30rpx"
>
<view class="content-item-header-icon">
<image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image>
<!-- <image mode="aspectFill" :src="staticIcon" style="height: 60rpx; width: 60rpx"></image> -->
<Cn-icon-transient :name="`运行告警`" />
</view>
</uni-badge>
<view class="content-item-header-right">
<view class="content-item-header-right-title">{{ item.equipmentName }}</view>
<!-- <view class="content-item-header-right-des">{{ item.engineeringName }} {{ item.projectName }}</view> -->
<view class="content-item-header-right-des">工程名称{{ item.engineeringName }}</view>
<view class="content-item-header-right-des">项目名称{{ item.projectName }}</view>
<!-- <view class="content-item-header-right-des">监测点名称{{ item.lineName }}</view> -->
<!-- <view class="content-item-header-right-des">暂态类型{{ item.showName }}</view> -->
<!-- <view class="content-item-header-right-des">{{ item.subTitle }}</view> -->
</view>
<view class="ml10" v-if="type === '0' || item.status != '1'">
<uni-icons type="search" size="25" color="#376cf3"></uni-icons
@@ -30,21 +29,7 @@
</view>
<view class="content-item-footer">{{ item.subTitle }}</view>
</view>
<!-- <uni-card
:title="item.equipmentName"
:extra="item.status == '1' ? '' : '未读'"
:sub-title="item.subTitle"
thumbnail="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png"
@click="jump(item)"
v-for="(item, index) in store.data"
:key="index"
>
<view class="term-list-bottom">
<view class="term-list-bottom-item" v-for="(item2, textIndex) in item.dataSet" :key="textIndex">
{{ item2.showName + ':' + (item2.value == 3.1415926 ? '-' : item2.value) + (item2.unit || '') }}
</view>
</view>
</uni-card> -->
<Cn-empty v-if="store.empty" style="padding-top: 400rpx"></Cn-empty>
<uni-load-more
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
@@ -143,17 +128,17 @@ export default {
this.store.reload()
},
jump(item) {
if (this.type === '0') {
// if (this.type === '0') {
let str = JSON.stringify(item).replace(/%/g, '百分比')
uni.navigateTo({ url: '/pages/message/messageDetail?detail=' + encodeURIComponent(str) })
} else {
if (item.status != '1') {
item.status = '1'
updateStatus({
eventIds: [item.id],
})
}
}
// } else {
// if (item.status != '1') {
// item.status = '1'
// updateStatus({
// eventIds: [item.id],
// })
// }
// }
},
},
}
@@ -178,10 +163,11 @@ export default {
display: flex;
align-items: center;
justify-content: center;
width: 100rpx;
height: 100rpx;
width: 110rpx;
height: 110rpx;
border-radius: 8rpx;
background: $uni-theme-color;
// background: $uni-theme-color;
background-color: #376cf320;
}
.content-item-header-right {

View File

@@ -89,8 +89,8 @@ export default {
],
content: [
{
iconPath: '/static/report.png',
text: '详情',
iconPath: '/static/tongji.png',
text: '事件',
},
// {
// iconPath: '/static/record.png',
@@ -128,7 +128,7 @@ export default {
this.$util.toast('下载成功')
} else if (e.text === '记录') {
uni.navigateTo({ url: '/pages/device/DVR/record' })
} else if (e.text === '详情') {
} else if (e.text === '事件') {
uni.navigateTo({ url: '/pages/device/DVR/report' })
} else if (e.text === '关于') {
uni.navigateTo({ url: '/pages/device/DVR/about' })

View File

@@ -4,7 +4,13 @@
<view class="device">
<view class="nav" :style="{ top: navTabHeight + 'px' }">
<view class="nav-menu" @click="selectEngineering"
>{{ select.engineeringName || '全部工程' }}
>{{
select.engineeringName
? select.engineeringName.length > 6
? select.engineeringName.substring(0, 6) + '...'
: select.engineeringName
: '全部工程'
}}
<uni-icons type="bottom" size="14"></uni-icons>
</view>
<picker
@@ -19,7 +25,7 @@
{{
select.projectName
? select.projectName.length > 6
? select.projectName.substring(0, 12) + '...'
? select.projectName.substring(0, 6) + '...'
: select.projectName
: '全部项目'
}}

View File

@@ -22,17 +22,17 @@
></view>
</view>
<view class="info-item">
所属工程<view>{{ engineeringName }}</view>
所属工程<view>{{ device.engineeringName }}</view>
</view>
<view class="info-item">
所属项目<view>{{ equipmentName }}</view>
所属项目<view>{{ device.equipmentName }}</view>
</view>
<view class="info-item status">
通讯状态<view
class="status-normal"
:style="{ color: runStatus == 1 ? '#ff3b30' : '#00ff88' }"
>{{ runStatus == 1 ? '离线' : '在线' }}
:style="{ color: device.runStatus == 1 ? '#ff3b30' : '#00ff88' }"
>{{ device.runStatus == 1 ? '离线' : '在线' }}
</view>
</view>
</view>
@@ -69,7 +69,7 @@
@finished="initChart('echartV3', 'echartsDataV3')"
></l-echart>
</view>
<view class="text"> 电压有效值(kV) </view>
<view class="text" style="left: 20rpx"> 电压有效值(kV) </view>
</view>
<view class="middle" style="width: 100%">
<l-echart
@@ -103,7 +103,7 @@
@finished="initChart('echartA3', 'echartsDataA3')"
></l-echart>
</view>
<view class="text"> 电流有效值(A) </view>
<view class="text" style="right: 20rpx"> 电流有效值(A) </view>
</view>
</view>
</view>
@@ -135,13 +135,15 @@ import { MQTT_IP, MQTT_OPTIONS } from '@/common/js/mqtt.js'
import mqtt from 'mqtt/dist/mqtt.js'
import { getBaseRealData } from '@/common/api/harmonic.js'
import hoverMenu from '@/hover-menu/components/hover-menu/hover-menu.vue'
import { queryTopologyDiagram, deleteDevice, cancelDebug, finishDebug } from '@/common/api/device'
export default {
components: { hoverMenu },
props: {},
data() {
return {
loading: true,
devId: '',
deviceInfo: {},
// 使用上面定义的图表配置项
option: {},
echartsData0: {},
@@ -182,32 +184,25 @@ export default {
lineId: '00B78D00A87A1',
lineKey: 0,
lineList: [],
engineeringName: '',
equipmentName: '',
runStatus: 1,
connection: false,
content: [
{
iconPath: '/static/report.png',
text: '详情',
iconPath: '/static/tongji.png',
text: '事件',
},
{
iconPath: '/static/about.png',
text: '关于',
},
],
isPrimaryUser: 0,
device: {},
}
},
onLoad(options) {
this.device= JSON.parse(options.device)
this.lineKey = 0
this.devId = options.id
this.lineList = JSON.parse(options.lineList)
this.lineList = this.device.lineList
this.lineId = this.lineList[0].lineId
this.engineeringName = options.engineeringName
this.equipmentName = options.equipmentName
this.runStatus = options.runStatus
this.isPrimaryUser = options.isPrimaryUser
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
this.echartsData0 = this.initEcharts0()
this.echartsData1 = this.initEcharts1()
@@ -222,7 +217,7 @@ export default {
this.setMqtt(0)
this.initMqtt()
})
if (this.isPrimaryUser == 1) {
if (this.device.isPrimaryUser == 1) {
this.content.splice(
0,
0,
@@ -230,10 +225,7 @@ export default {
iconPath: '/static/transfer.png',
text: '移交',
},
{
iconPath: '/static/feedback.png',
text: '编辑',
},
{
iconPath: '/static/delate.png',
text: '删除',
@@ -715,21 +707,21 @@ export default {
}
})
// this.client.subscribe(`/zl/devData/${this.devId}/${id}`, (err) => {
// this.client.subscribe(`/zl/devData/${this.device.equipmentId}/${id}`, (err) => {
// if (!err) {
// console.log(`订阅成功:/zl/devData/${this.devId}/${id}`)
// console.log(`订阅成功:/zl/devData/${this.device.equipmentId}/${id}`)
// // 默认推送
// this.client.publish(`/zl/askDevData/${this.devId}/${id}`)
// this.client.publish(`/zl/askTemperData/${this.devId}`)
// this.client.publish(`/zl/askDevData/${this.device.equipmentId}/${id}`)
// this.client.publish(`/zl/askTemperData/${this.device.equipmentId}`)
// if (this.timer) {
// clearInterval(this.timer)
// this.timer = null
// }
// this.timer = setInterval(() => {
// console.log('askDevData')
// this.client.publish(`/zl/askDevData/${this.devId}/${id}`)
// this.client.publish(`/zl/askTemperData/${this.devId}`)
// this.client.publish(`/zl/askDevData/${this.device.equipmentId}/${id}`)
// this.client.publish(`/zl/askTemperData/${this.device.equipmentId}`)
// }, 1000 * 60)
// }
// })
@@ -936,7 +928,7 @@ export default {
success: (res) => {
if (res.confirm) {
console.log('用户点击确定')
deleteDevice(this.devId).then((res) => {
deleteDevice(this.device.equipmentId).then((res) => {
uni.showToast({
title: '删除成功',
icon: 'none',
@@ -952,16 +944,30 @@ export default {
})
} else if (e.text === '记录') {
uni.navigateTo({ url: '/pages/device/APF/record' })
} else if (e.text === '详情') {
uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.devId })
} else if (e.text === '事件') {
uni.setStorageSync('messageParams', {
engineeringName: this.device.engineeringName,
engineeringId: this.device.engineeringId, //工程ID
projectName: this.device.projectName,
projectId: this.device.projectId, //項目ID
deviceName: this.device.equipmentName,
deviceId: this.device.equipmentId, //设备ID
lineName: '',
lineId: '', //测点ID
type: 0,
})
uni.switchTab({
url: '/pages/index/message1',
})
// uni.navigateTo({ url: '/pages/device/APF/report?id=' + this.device.equipmentId })
} else if (e.text === '关于') {
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.device.equipmentId })
} else if (e.text === '移交') {
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.device.equipmentId })
} else if (e.text === '反馈') {
uni.navigateTo({ url: '/pages/device/feedback' })
} else if (e.text === '用户') {
uni.navigateTo({ url: '/pages/device/user?id=' + this.devId + '&isPrimaryUser=' + this.isPrimaryUser })
uni.navigateTo({ url: '/pages/device/user?id=' + this.device.equipmentId + '&isPrimaryUser=' + this.device.isPrimaryUser })
}
// this.$refs.fab.close()
},
@@ -994,9 +1000,9 @@ export default {
margin-bottom: 10rpx;
view {
// font-size: 28rpx;
.nav-menu {
font-size: 32rpx;
}
// .nav-menu {
// font-size: 32rpx;
// }
}
&:last-child {
margin-bottom: 0rpx;
@@ -1058,6 +1064,7 @@ export default {
background-color: #fff;
padding: 0 0rpx 20rpx;
display: flex;
padding-bottom: 55rpx;
.middle {
display: flex;
position: relative;
@@ -1078,10 +1085,10 @@ export default {
.text {
text-align: center;
font-size: 28rpx;
position: absolute;
}
.text_center {
position: absolute;
bottom: 0;
bottom: -5px;
left: 50%;
transform: translateX(-50%) translateY(50%);
}

View File

@@ -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>

View File

@@ -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 {

View File

@@ -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({

View File

@@ -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>

View File

@@ -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({

View File

@@ -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({

View File

@@ -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({

View File

@@ -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>

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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) {

View File

@@ -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>

View File

@@ -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;
}
/* 信息区域 */

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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> -->

View File

@@ -58,8 +58,8 @@
/* 图标区域(按类型区分背景色) */
.event-icon {
position: relative;
width: 120rpx;
height: 120rpx;
width: 110rpx;
height: 110rpx;
border-radius: 12rpx;
display: flex;
justify-content: center;

View File

@@ -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 {

View File

@@ -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>

View File

@@ -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;
}