调整消息推送
This commit is contained in:
@@ -24,7 +24,9 @@
|
||||
<!-- <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"></uni-icons></view>
|
||||
<view class="ml10" v-if="type === '0' || item.status != '1'">
|
||||
<uni-icons type="search" size="25" color="#376cf3"></uni-icons
|
||||
></view>
|
||||
</view>
|
||||
<view class="content-item-footer">{{ item.subTitle }}</view>
|
||||
</view>
|
||||
@@ -112,8 +114,8 @@ export default {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = this.type
|
||||
this.store.params.deviceId = this.deviceId
|
||||
this.store.params.startTime = this.$util.getBeforeDays()
|
||||
this.store.params.endTime = this.$util.getToday()
|
||||
this.store.params.startTime = this.$util.getBeforeDays()
|
||||
this.store.params.endTime = this.$util.getToday()
|
||||
this.store.loadedCallback = () => {
|
||||
this.store.data.forEach((item) => {
|
||||
if (this.type === '3') {
|
||||
|
||||
@@ -91,7 +91,8 @@
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
<view class="star-icon" v-else>
|
||||
<uni-icons type="search" size="25"></uni-icons>
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</template>
|
||||
</Cn-device-card>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
><picker
|
||||
@change="lineChange"
|
||||
@cancel="selectProject = false"
|
||||
:value="lineId"
|
||||
:value="lineKey"
|
||||
:range="lineList"
|
||||
range-key="name"
|
||||
>
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
{ name: '电压总谐波畸变率(%)', A: '/', B: '/', C: '/' },
|
||||
],
|
||||
disabled: false,
|
||||
countdown: 60,
|
||||
countdown: 30,
|
||||
lineId: '00B78D00A87A1',
|
||||
lineKey: 0,
|
||||
lineList: [],
|
||||
@@ -607,7 +607,7 @@ export default {
|
||||
if (this.countdown <= 0) {
|
||||
clearInterval(this.numTimer) // 清除定时器
|
||||
this.disabled = false // 启用按钮
|
||||
this.countdown = 60 // 重置倒计时
|
||||
this.countdown = 30 // 重置倒计时
|
||||
this.numTimer = null // 清空定时器标识
|
||||
}
|
||||
}, 1000)
|
||||
@@ -643,7 +643,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.countdown = 60 // 重置倒计时
|
||||
this.countdown = 30 // 重置倒计时
|
||||
this.disabled = false
|
||||
this.connection = false
|
||||
this.clear()
|
||||
@@ -870,7 +870,7 @@ export default {
|
||||
async lineChange(e) {
|
||||
await this.clear()
|
||||
this.disabled = false
|
||||
this.countdown = 60
|
||||
this.countdown = 30
|
||||
|
||||
this.lineKey = e.detail.value
|
||||
this.lineId = this.lineList[e.detail.value].lineId
|
||||
|
||||
@@ -70,14 +70,17 @@
|
||||
<Cn-device-card :device="item" :key="index">
|
||||
<template v-slot:title>
|
||||
<!-- 卡片标题 -->
|
||||
|
||||
|
||||
<switch
|
||||
v-if="transfer || share"
|
||||
:checked="checkList.indexOf(item.equipmentId) > -1"
|
||||
style="transform: scale(0.8); position: relative; left: 20rpx"
|
||||
@change="switchChange(item)"
|
||||
/>
|
||||
<view class="star-icon" v-else> <uni-icons type="search" size="25"></uni-icons> </view>
|
||||
<view class="star-icon" v-else>
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</template>
|
||||
</Cn-device-card>
|
||||
</uni-swipe-action-item>
|
||||
@@ -373,6 +376,7 @@ export default {
|
||||
/deep/ .button-group--right {
|
||||
padding: 0 0 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.star-icon {
|
||||
font-size: 40rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -15,15 +15,13 @@
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
<view class="header-item" @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">
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
<view class="header-item" @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-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
@@ -178,7 +176,12 @@ export default {
|
||||
url: '/pages/device/list?type=' + type,
|
||||
})
|
||||
},
|
||||
jumpMessage() {
|
||||
jumpMessage(type) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message1',
|
||||
})
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
<template>
|
||||
<view class="index-zhuyonghu">
|
||||
<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-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-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @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-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
</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/gateway2.png" text="网关注册" @click="registerGateway"></Cn-grid-item> -->
|
||||
<Cn-grid-item src="/static/feedback2.png" text="问题反馈" @click="submitFeedBack"></Cn-grid-item>
|
||||
</Cn-grid>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=' + type
|
||||
})
|
||||
},
|
||||
submitFeedBack() {
|
||||
uni.navigateTo({url: '/pages/home/feedback'})
|
||||
},
|
||||
registerDevice() {
|
||||
this.$util.toast('此功能仅对正式用户开放')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
<template>
|
||||
<view class="index-zhuyonghu">
|
||||
<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-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-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @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-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
</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/gateway2.png" text="网关注册" @click="registerGateway"></Cn-grid-item> -->
|
||||
<Cn-grid-item src="/static/feedback2.png" text="问题反馈" @click="submitFeedBack"></Cn-grid-item>
|
||||
</Cn-grid>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/list?type=' + type
|
||||
})
|
||||
},
|
||||
submitFeedBack() {
|
||||
uni.navigateTo({url: '/pages/home/feedback'})
|
||||
},
|
||||
registerDevice() {
|
||||
this.$util.toast('此功能仅对正式用户开放')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item" @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">
|
||||
<view class="header-item" @click="jumpMessage(0, false)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
@@ -48,11 +48,11 @@
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<view class="header-item" @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">
|
||||
<view class="header-item" @click="jumpMessage(0, true)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
@@ -79,12 +79,17 @@ export default {
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
jumpMessage(){
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message',
|
||||
url: '/pages/index/message1',
|
||||
})
|
||||
},
|
||||
eningerNum(){
|
||||
eningerNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/list',
|
||||
})
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('0')">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('1')">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="canneng-index-title mt20">常用功能</view>
|
||||
|
||||
@@ -1,122 +1,123 @@
|
||||
<template>
|
||||
<view class="index-zhuanzhi">
|
||||
<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-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-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @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">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<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-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @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-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @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">
|
||||
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage">
|
||||
<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-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
projectWarning() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
eningerNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/list',
|
||||
})
|
||||
},
|
||||
jumpMessage(){
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message',
|
||||
})
|
||||
},
|
||||
projectNum(now) {
|
||||
console.log(now)
|
||||
if (now) {
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list?engineeringName=' + engineering.name + '&engineeringId=' + engineering.id,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list',
|
||||
})
|
||||
}
|
||||
},
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/list?type=' + type,
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.index-zhuanzhi {
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="index-zhuanzhi">
|
||||
<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-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-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @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-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @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-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20"></view>
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @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-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @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-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @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-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
devCount: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
projectWarning() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/zhuanzhi/warning',
|
||||
})
|
||||
},
|
||||
eningerNum() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/engineering/list',
|
||||
})
|
||||
},
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
url: '/pages/index/message1',
|
||||
})
|
||||
},
|
||||
projectNum(now) {
|
||||
console.log(now)
|
||||
if (now) {
|
||||
let engineering = uni.getStorageSync('engineering')
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list?engineeringName=' + engineering.name + '&engineeringId=' + engineering.id,
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/list',
|
||||
})
|
||||
}
|
||||
},
|
||||
jump(type) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/list?type=' + type,
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.index-zhuanzhi {
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -176,10 +176,10 @@ export default {
|
||||
// console.log(`12312`,res)
|
||||
// Object.assign(this.devCount, res.data)
|
||||
this.devCount = res.data
|
||||
this.devCount.currentOffLineDevs.forEach((item) => {
|
||||
this.devCount.currentOffLineDevs?.forEach((item) => {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.offLineDevs.forEach((item) => {
|
||||
this.devCount.offLineDevs?.forEach((item) => {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.engineeringListLength = this.engineeringList.length
|
||||
|
||||
@@ -11,14 +11,9 @@
|
||||
/>
|
||||
<!-- 角标 -->
|
||||
<view class="badge-container">
|
||||
<span
|
||||
v-for="(item, index) in items"
|
||||
:key="index"
|
||||
class="badge"
|
||||
:style="{ left: getBadgeRightPosition(index) }"
|
||||
v-if="badgeCounts[index] > 0"
|
||||
>
|
||||
{{ badgeCounts[index] > 99 ? '99+' : badgeCounts[index] }}
|
||||
<span v-for="(item, index) in items" :key="index" class="badge">
|
||||
<uni-badge :text="badgeCounts[index] > 99 ? '99+' : badgeCounts[index]" />
|
||||
<!-- {{ badgeCounts[index] > 99 ? '99+' : badgeCounts[index] }} -->
|
||||
</span>
|
||||
</view>
|
||||
<!-- 筛选条件 -->
|
||||
@@ -74,7 +69,7 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
items: ['暂态事件', '稳态事件', '运行告警', '运行事件'],
|
||||
items: ['暂态事件', '稳态事件'], //'运行告警', '运行事件'
|
||||
badgeCounts: [0, 0, 0, 0],
|
||||
current: 0,
|
||||
colorIndex: 0,
|
||||
@@ -123,7 +118,7 @@ export default {
|
||||
const params = uni.getStorageSync('messageParams')
|
||||
this.getDevCount()
|
||||
this.$nextTick(() => {
|
||||
if (params.type != '') {
|
||||
if (params.type !== '') {
|
||||
this.current = params.type - 0
|
||||
}
|
||||
if (params.name != '') {
|
||||
@@ -236,7 +231,11 @@ export default {
|
||||
|
||||
// 根据索引动态计算右侧偏移位置,使徽章对准每个标签的右上角
|
||||
getBadgeRightPosition(index) {
|
||||
return (index + 1) * (this.width / 4) + 'px'
|
||||
if (this.items == 4) {
|
||||
return (index + 1) * (this.width / 4) + 'px'
|
||||
} else {
|
||||
return (index + 0) * (this.width / 2) + 'px'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -282,25 +281,36 @@ export default {
|
||||
}
|
||||
.badge-container {
|
||||
position: absolute;
|
||||
top: 10rpx; /* 徽章向上偏移,与控件重叠 */
|
||||
top: -10rpx; /* 徽章向上偏移,与控件重叠 */
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
pointer-events: none; /* 确保徽章不干扰点击事件 */
|
||||
}
|
||||
/deep/ .uni-badge--error {
|
||||
background-color: #ff3b30;
|
||||
}
|
||||
|
||||
.badge {
|
||||
position: absolute;
|
||||
flex: 1;
|
||||
// position: absolute;
|
||||
// min-width: 18px;
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
background-color: #ff3b30; /* 红色徽章 */
|
||||
color: white;
|
||||
font-size: 22rpx;
|
||||
line-height: 16px;
|
||||
// height: 16px;
|
||||
// padding: 0 4px;
|
||||
// background-color: #ff3b30; /* 红色徽章 */
|
||||
// color: white;
|
||||
// font-size: 22rpx;
|
||||
// line-height: 16px;
|
||||
// text-align: center;
|
||||
// border-radius: 9px;
|
||||
//
|
||||
text-align: center;
|
||||
border-radius: 9px;
|
||||
transform: translateX(-150%); /* 使徽章中心对齐右上角 */
|
||||
// transform: translateX(-110%); /* 使徽章中心对齐右上角 */
|
||||
.uni-badge--x {
|
||||
left: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
>
|
||||
<!-- <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"></uni-icons></view>
|
||||
<view class="ml10" v-if="type === '0' || item.status != '1'">
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-item-footer">{{ item.subTitle }}</view>
|
||||
</view>
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
<text class="event-id">{{ item.date }}发生告警终端{{ item.warnNums }}台</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action"> <uni-icons type="search" size="25"></uni-icons> </view>
|
||||
<view class="event-action">
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-load-more
|
||||
|
||||
@@ -50,11 +50,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
<uni-icons type="search" size="25"></uni-icons>
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<view class="event-detail textBox">
|
||||
<text>{{ item.statisticsDate }}发生 {{ item.overLimitDesc }} </text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -191,4 +192,14 @@ export default {
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
display: none;
|
||||
}
|
||||
.textBox {
|
||||
max-height: 110rpx;
|
||||
overflow: hidden;
|
||||
/* 下面是溢出显示省略号关键样式 */
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3; /* 控制最多显示几行,你可以改 2/3/4 */
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -87,7 +87,10 @@
|
||||
<text>监测点名称:{{ item.lineName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action"> <uni-icons type="search" size="25" color="#376cf3"></uni-icons> </view>
|
||||
<view class="event-action">
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
@@ -293,5 +296,4 @@ export default {
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user