调整app页面图标样式
This commit is contained in:
7
.continue/prompts/new-prompt.md
Normal file
7
.continue/prompts/new-prompt.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
name: New prompt
|
||||
description: New prompt
|
||||
invokable: true
|
||||
---
|
||||
|
||||
Please write a thorough suite of unit tests for this code, making sure to cover all relevant edge cases
|
||||
5
.continue/rules/new-rule.md
Normal file
5
.continue/rules/new-rule.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
description: A description of your rule
|
||||
---
|
||||
|
||||
请用中文回答!
|
||||
10
App.vue
10
App.vue
@@ -24,8 +24,14 @@ export default {
|
||||
console.log('收到推送消息:', res.data.payload.path) //监听推送消息
|
||||
if (res.data.payload && res.data.payload.path) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId:'', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: res.data.payload.path.split('type=')[1],
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -13,4 +13,37 @@ export function getBaseRealData(id) {
|
||||
url: '/cs-harmonic-boot/realData/getBaseRealData?lineId='+id,
|
||||
method: 'post',
|
||||
})
|
||||
}
|
||||
// 查询App暂态事件总数
|
||||
export function queryAppEventCounts(params) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/eventUser/queryAppEventCounts',
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
}
|
||||
// 查询App稳态事件总数
|
||||
export function queryAppHarmonicCounts(params) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csHarmonic/queryAppHarmonicCounts',
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
}
|
||||
// 查询App稳态越限监测点
|
||||
export function queryAppHarmonicLine(params) {
|
||||
return request({
|
||||
url: '/cs-harmonic-boot/csHarmonic/queryAppHarmonicLine',
|
||||
method: 'post',
|
||||
data: params,
|
||||
header: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -152,7 +152,7 @@ page {
|
||||
margin: 0 20rpx;
|
||||
display: grid;
|
||||
grid-gap: 20rpx;
|
||||
grid-template-columns: 1fr 1fr 1fr ;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
.header-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -167,7 +167,7 @@ page {
|
||||
font-size: 44rpx;
|
||||
}
|
||||
.header-item-label {
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -277,14 +277,21 @@ page {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
image {
|
||||
will-change: transform;//解决加载时瞬间拉伸问题
|
||||
width: auto;//解决加载时瞬间拉伸问题
|
||||
height: auto;//解决加载时瞬间拉伸问题
|
||||
image-rendering:-moz-crisp-edges;
|
||||
image-rendering:-o-crisp-edges;
|
||||
image-rendering:-webkit-optimize-contrast;
|
||||
will-change: transform; //解决加载时瞬间拉伸问题
|
||||
width: auto; //解决加载时瞬间拉伸问题
|
||||
height: auto; //解决加载时瞬间拉伸问题
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -o-crisp-edges;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: crisp-edges;
|
||||
-ms-interpolation-mode:nearest-neighbor;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
}
|
||||
|
||||
.canneng-index-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.boxClick:active {
|
||||
transform: scale(0.94);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
:extra="device.isPrimaryUser == 1 ? '主设备' : '分享设备'"
|
||||
padding="0"
|
||||
@click="jump(device)"
|
||||
class="boxClick"
|
||||
:thumbnail="deviceIcon(device.runStatus)"
|
||||
>
|
||||
<template v-slot:title>
|
||||
@@ -12,12 +13,9 @@
|
||||
<view class="uni-card__header" @click="jump(device)">
|
||||
<view class="uni-card__header-box">
|
||||
<view class="uni-card__header-avatar">
|
||||
<view
|
||||
class="event-icon"
|
||||
:style="{ backgroundColor: getColor(device.runStatus, device.devType) }"
|
||||
>
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
:type="
|
||||
device.devType == 'Direct_Connected_Device'
|
||||
@@ -26,7 +24,12 @@
|
||||
"
|
||||
:color="device.runStatus == 1 ? '#ff3b30' : '#10B981'"
|
||||
:size="device.devType == 'Direct_Connected_Device' ? '35' : '40'"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-device
|
||||
:devType="device.devType"
|
||||
:runStatus="device.runStatus"
|
||||
:alarmStatus="device.isAlarm ? 1 : 0"
|
||||
></Cn-icon-device>
|
||||
</view>
|
||||
</view>
|
||||
<view class="uni-card__header-content">
|
||||
@@ -114,30 +117,16 @@ export default {
|
||||
'&process=' +
|
||||
this.device.process +
|
||||
'&ndid=' +
|
||||
this.device.ndid,
|
||||
this.device.ndid +
|
||||
'&device=' +
|
||||
JSON.stringify(this.device),
|
||||
})
|
||||
} else {
|
||||
if (this.device.lineList.length == 0) {
|
||||
return this.$util.toast('暂无监测点!')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url:
|
||||
'/pages/device/realTime/index?id=' +
|
||||
this.device.equipmentId +
|
||||
'&isPrimaryUser=' +
|
||||
this.device.isPrimaryUser +
|
||||
'&process=' +
|
||||
this.device.process +
|
||||
'&ndid=' +
|
||||
this.device.ndid +
|
||||
'&lineList=' +
|
||||
JSON.stringify(this.device.lineList) +
|
||||
'&engineeringName=' +
|
||||
this.device.engineeringName +
|
||||
'&equipmentName=' +
|
||||
this.device.equipmentName +
|
||||
'&runStatus=' +
|
||||
this.device.runStatus,
|
||||
url: '/pages/device/realTime/index?device=' + JSON.stringify(this.device),
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -248,8 +237,8 @@ export default {
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #36cfc920;
|
||||
color: #36cfc9;
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
}
|
||||
.pinToTop {
|
||||
background-color: $uni-theme-color;
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<view class="nav choose">
|
||||
<view class="nav-menu" @click="selectEngineering" v-if="showQianTree"
|
||||
>{{
|
||||
<view class="nav-menu nav-menu1" @click="selectEngineering" v-if="showQianTree">
|
||||
{{
|
||||
select.engineeringName || select.projectName || select.deviceName || select.lineName
|
||||
? [select.engineeringName, select.projectName, select.deviceName, select.lineName]
|
||||
.filter((item) => item && item !== '')
|
||||
.join('>')
|
||||
: '全部工程'
|
||||
}}
|
||||
|
||||
<uni-icons type="bottom" size="14"></uni-icons>
|
||||
</view>
|
||||
<!-- 弹框组件 -->
|
||||
@@ -35,18 +36,26 @@
|
||||
<uni-icons type="bottom" size="14"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
<uni-datetime-picker v-if="!showDatetime" v-model="select.range" type="daterange" :end="endDate">
|
||||
<!-- <uni-datetime-picker v-if="!showDatetime" v-model="select.range" type="daterange" :end="endDate">
|
||||
<view class="nav-menu"
|
||||
>{{ select.range[0] + '至' + select.range[1] }}
|
||||
<uni-icons type="bottom" size="14"></uni-icons>
|
||||
</view>
|
||||
</uni-datetime-picker>
|
||||
<picker @change="bindReport" v-if="report" :value="select.report" :range="reportList">
|
||||
</uni-datetime-picker> -->
|
||||
<picker
|
||||
mode="date"
|
||||
:value="select.range"
|
||||
fields="year"
|
||||
:end="endDate.slice(0, -6)"
|
||||
@change="yearChange"
|
||||
v-if="!showDatetime"
|
||||
>
|
||||
<view class="nav-menu"
|
||||
>{{ reportList[select.report] }}
|
||||
>{{ select.range }}
|
||||
<uni-icons type="bottom" size="14"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
|
||||
<slot />
|
||||
</view>
|
||||
</template>
|
||||
@@ -57,7 +66,6 @@ export default {
|
||||
props: {
|
||||
level: { type: Number, default: 3 },
|
||||
showDatetime: { type: Boolean, default: true },
|
||||
report: { type: Boolean, default: false },
|
||||
singleChoice: { type: Boolean, default: false },
|
||||
showQianTree: { type: Boolean, default: true },
|
||||
},
|
||||
@@ -65,6 +73,10 @@ export default {
|
||||
const currentDate = this.getDate({
|
||||
format: true,
|
||||
})
|
||||
const rangeDate = this.getDate({
|
||||
format: true,
|
||||
}).slice(0, -3)
|
||||
console.log('🚀 ~ rangeDate:', rangeDate)
|
||||
return {
|
||||
select: {
|
||||
engineeringName: '',
|
||||
@@ -76,18 +88,12 @@ export default {
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
date: currentDate,
|
||||
range: ['', ''],
|
||||
report: 0,
|
||||
range: rangeDate,
|
||||
},
|
||||
list: [],
|
||||
reportList: ['日报', '月报'],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!this.showDatetime) {
|
||||
this.select.range = [this.endDate.slice(0, -3) + '-01', this.endDate]
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
onShow() {},
|
||||
|
||||
mounted() {},
|
||||
@@ -172,9 +178,10 @@ export default {
|
||||
bindDateChange(e) {
|
||||
this.select.date = e.detail.value
|
||||
},
|
||||
bindReport(e) {
|
||||
this.select.report = e.detail.value
|
||||
yearChange(e) {
|
||||
this.select.range = e.detail.value
|
||||
},
|
||||
|
||||
selectEngineering() {
|
||||
this.$refs.qiantree._show()
|
||||
},
|
||||
@@ -219,10 +226,18 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
external(name, id) {
|
||||
external(params) {
|
||||
this.getTree()
|
||||
this.select.engineeringId = id
|
||||
this.select.engineeringName = name
|
||||
// this.select.engineeringId = id
|
||||
// this.select.engineeringName = name
|
||||
this.select.engineeringName = params.engineeringName
|
||||
this.select.engineeringId = params.engineeringId //工程ID
|
||||
this.select.projectName = params.projectName
|
||||
this.select.projectId = params.projectId //項目ID
|
||||
this.select.deviceName = params.deviceName
|
||||
this.select.deviceId = params.deviceId //设备ID
|
||||
this.select.lineName = params.lineName
|
||||
this.select.lineId = params.lineId //测点ID
|
||||
},
|
||||
// 取消回调事件
|
||||
treeCancel(e) {
|
||||
@@ -273,6 +288,15 @@ export default {
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
// showDatetime: {
|
||||
// handler(val, oldVal) {
|
||||
// if (val == false) {
|
||||
|
||||
// console.log("🚀 ~ this.select.range:", this.select.range)
|
||||
// }
|
||||
// },
|
||||
// deep: true,
|
||||
// },
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -280,4 +304,13 @@ export default {
|
||||
/deep/ .uni-date-editor {
|
||||
width: 360rpx;
|
||||
}
|
||||
.nav-menu1 {
|
||||
max-width: calc(100vw - 150px);
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
130
components/Cn-icon-device/Cn-icon-device.vue
Normal file
130
components/Cn-icon-device/Cn-icon-device.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<view v-html="svgHtml" class="svg-container"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 父组件传递的参数
|
||||
devType: {
|
||||
type: String,
|
||||
default: 'Direct_Connected_Device',
|
||||
},
|
||||
runStatus: {
|
||||
type: [String, Number],
|
||||
},
|
||||
alarmStatus: {
|
||||
type: [String, Number],
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 动态颜色
|
||||
powerColor: '#10b981',
|
||||
// alarmStatus==1?'#f59e0b':'#10b981': '#f59e0b', //告警
|
||||
// commColor: '#10B981', //在线离线
|
||||
// 动态数据
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
svgHtml() {
|
||||
if (this.devType == 'Direct_Connected_Device') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<!-- 设备主体 - 治理设备主题色(绿色) -->
|
||||
<rect x="2" y="2" width="96" height="96" rx="6" ry="6" fill="#007aff30" stroke="#007aff" stroke-width="2"/>
|
||||
|
||||
<!-- 屏幕区域 -->
|
||||
<rect x="6" y="6" width="88" height="52" rx="3" ry="3" fill="#FFFFFF" stroke="#007aff" stroke-width="1.5"/>
|
||||
|
||||
<!-- 屏幕标题栏 - 调整高度以容纳14px文字 -->
|
||||
<rect x="10" y="9" width="80" height="14" rx="2" ry="2" fill="#007aff30" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="20" font-family="Arial, sans-serif" font-size="14" font-weight="bold" fill="#007aff" text-anchor="middle">治理设备</text>
|
||||
|
||||
<!-- 下降趋势折线(从高到低,拉满宽度) -->
|
||||
<polyline points="14,28 22,34 30,32 38,40 46,38 54,46 62,44 70,50 78,48 86,52"
|
||||
fill="none" stroke="#007aff" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<!-- 趋势填充区域(完全覆盖屏幕下方) -->
|
||||
<polygon points="14,28 22,34 30,32 38,40 46,38 54,46 62,44 70,50 78,48 86,52 86,54 14,54"
|
||||
fill="#007aff15"/>
|
||||
|
||||
<!-- 数据节点圆点(增强数据感) -->
|
||||
<circle cx="14" cy="28" r="1.5" fill="#007aff"/>
|
||||
<circle cx="30" cy="32" r="1.5" fill="#007aff"/>
|
||||
<circle cx="46" cy="38" r="1.5" fill="#007aff"/>
|
||||
<circle cx="62" cy="44" r="1.5" fill="#007aff"/>
|
||||
<circle cx="78" cy="48" r="1.5" fill="#007aff"/>
|
||||
<circle cx="86" cy="52" r="1.5" fill="#007aff"/>
|
||||
|
||||
<!-- 下降箭头(增强趋势指向) -->
|
||||
<polygon points="88,48 86,52 84,48" fill="#007aff" opacity="0.7"/>
|
||||
|
||||
<!-- 指示灯区域分隔线 -->
|
||||
<line x1="6" y1="62" x2="94" y2="62" stroke="#999" stroke-width="1" stroke-dasharray="2,2"/>
|
||||
|
||||
<!-- 告警指示灯 -->
|
||||
<circle cx="28" cy="70" r="6" fill="${this.alarmStatus==1?'#f59e0b':'#10b981'}" stroke="${this.alarmStatus==1?'#f59e0b':'#10b981'}" stroke-width="1"/>
|
||||
<text x="28" y="92" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#007aff" text-anchor="middle">告警</text>
|
||||
|
||||
<!-- 通讯指示灯 -->
|
||||
<circle cx="70" cy="70" r="6" fill="${this.runStatus == 1 ? '#ff3b30' : '#10b981'}" stroke="${this.runStatus == 1 ? '#ff3b30' : '#10b981'}" stroke-width="1"/>
|
||||
<text x="70" y="92" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#007aff" text-anchor="middle">通讯</text>
|
||||
</svg>`
|
||||
} else {
|
||||
return `
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<style>
|
||||
text { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
|
||||
</style>
|
||||
|
||||
<!-- 设备主体 -->
|
||||
<rect x="2" y="2" width="96" height="96" rx="6" ry="6" fill="#3498DB30" stroke="#3498DB" stroke-width="2"/>
|
||||
|
||||
<!-- 屏幕区域 -->
|
||||
<rect x="6" y="6" width="88" height="52" rx="3" ry="3" fill="#FFFFFF" stroke="#3498DB" stroke-width="1.5"/>
|
||||
|
||||
<!-- 屏幕标题栏 - 调整高度 -->
|
||||
<rect x="10" y="9" width="80" height="14" rx="2" ry="2" fill="#3498DB30" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="20" font-size="13" font-weight="bold" fill="#3498DB" text-anchor="middle">监测设备</text>
|
||||
|
||||
<!-- 左侧电压数据 - 调整Y位置 -->
|
||||
<text x="10" y="34" font-size="7" fill="#3498DB">Ua: 220.5V</text>
|
||||
<text x="10" y="43" font-size="7" fill="#3498DB">Ub: 219.8V</text>
|
||||
<text x="10" y="52" font-size="7" fill="#3498DB">Uc: 220.1V</text>
|
||||
|
||||
<!-- 竖向分隔线 -->
|
||||
<line x1="52" y1="26" x2="52" y2="55" stroke="#CCC" stroke-width="0.8" stroke-dasharray="1.5,1.5"/>
|
||||
|
||||
<!-- 右侧电流数据 -->
|
||||
<text x="58" y="34" font-size="7" fill="#3498DB">Ia: 125.3A</text>
|
||||
<text x="58" y="43" font-size="7" fill="#3498DB">Ib: 124.7A</text>
|
||||
<text x="58" y="52" font-size="7" fill="#3498DB">Ic: 125.1A</text>
|
||||
|
||||
<!-- 指示灯区域分隔线 -->
|
||||
<line x1="6" y1="62" x2="94" y2="62" stroke="#999" stroke-width="1" stroke-dasharray="2,2"/>
|
||||
|
||||
<!-- 告警指示灯 -->
|
||||
<circle cx="28" cy="70" r="6" fill="${this.alarmStatus==1?'#f59e0b':'#10b981'}" stroke="${this.alarmStatus==1?'#f59e0b':'#10b981'}" stroke-width="1"/>
|
||||
<text x="28" y="92" font-size="13" font-weight="bold" fill="#3498DB" text-anchor="middle">告警</text>
|
||||
|
||||
<!-- 通讯指示灯 -->
|
||||
<circle cx="70" cy="70" r="6" fill="${this.runStatus == 1 ? '#ff3b30' : '#10b981'}" stroke="${this.runStatus == 1 ? '#ff3b30' : '#10b981'}" stroke-width="1"/>
|
||||
<text x="70" y="92" font-size="13" font-weight="bold" fill="#3498DB" text-anchor="middle">通讯</text>
|
||||
</svg>
|
||||
`
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-container {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
41
components/Cn-icon-device/icon.svg
Normal file
41
components/Cn-icon-device/icon.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<!-- 设备主体 -->
|
||||
<rect x="2" y="2" width="96" height="96" rx="6" ry="6" fill="#E8E8E8" stroke="#333" stroke-width="2"/>
|
||||
|
||||
<!-- 屏幕区域 -->
|
||||
<rect x="6" y="6" width="88" height="52" rx="3" ry="3" fill="#FFFFFF" stroke="#333" stroke-width="1.5"/>
|
||||
|
||||
<!-- 屏幕标题栏(代替品牌标识) -->
|
||||
<rect x="10" y="9" width="80" height="10" rx="2" ry="2" fill="#F0F0F0" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="17" font-family="Arial, sans-serif" font-size="7" font-weight="bold" fill="#333" text-anchor="middle">电能质量监测</text>
|
||||
|
||||
<!-- 屏幕内容 - 左侧参数 -->
|
||||
<text x="10" y="28" font-family="Arial, sans-serif" font-size="6" fill="#000">Ua:220.5V</text>
|
||||
<text x="10" y="36" font-family="Arial, sans-serif" font-size="6" fill="#000">Ub:219.8V</text>
|
||||
<text x="10" y="44" font-family="Arial, sans-serif" font-size="6" fill="#000">Uc:220.1V</text>
|
||||
<text x="10" y="52" font-family="Arial, sans-serif" font-size="6" fill="#000">Hz:50.02</text>
|
||||
|
||||
<!-- 垂直分隔线 -->
|
||||
<line x1="52" y1="22" x2="52" y2="55" stroke="#CCC" stroke-width="0.8" stroke-dasharray="1.5,1.5"/>
|
||||
|
||||
<!-- 右侧参数 -->
|
||||
<text x="58" y="28" font-family="Arial, sans-serif" font-size="6" fill="#000">Ia:125.3A</text>
|
||||
<text x="58" y="36" font-family="Arial, sans-serif" font-size="6" fill="#000">Ib:124.7A</text>
|
||||
<text x="58" y="44" font-family="Arial, sans-serif" font-size="6" fill="#000">Ic:125.1A</text>
|
||||
<text x="58" y="52" font-family="Arial, sans-serif" font-size="6" fill="#000">PF:0.98</text>
|
||||
|
||||
<!-- 指示灯区域分隔线 -->
|
||||
<line x1="6" y1="62" x2="94" y2="62" stroke="#999" stroke-width="1" stroke-dasharray="2,2"/>
|
||||
|
||||
<!-- 电源灯 -->
|
||||
<circle cx="20" cy="76" r="5" fill="#10b981" stroke="#10b981" stroke-width="1"/>
|
||||
<text x="20" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">电源</text>
|
||||
|
||||
<!-- 运行灯 -->
|
||||
<circle cx="50" cy="76" r="5" fill="#999999" stroke="#333" stroke-width="1"/>
|
||||
<text x="50" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">运行</text>
|
||||
|
||||
<!-- 通讯灯(原通信灯,已改名) -->
|
||||
<circle cx="80" cy="76" r="5" fill="#999999" stroke="#333" stroke-width="1"/>
|
||||
<text x="80" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">通讯</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
146
components/Cn-icon-transient/Cn-icon-transient.vue
Normal file
146
components/Cn-icon-transient/Cn-icon-transient.vue
Normal file
@@ -0,0 +1,146 @@
|
||||
<template>
|
||||
<view v-html="svgHtml" class="svg-container"></view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 父组件传递的参数
|
||||
name: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {
|
||||
svgHtml() {
|
||||
if (this.name == '电压暂降') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<path d="M8,50 L15,50 L18,38 L21,28 L24,38 L27,50 L30,62 L33,72 L36,62 L39,50 L42,38 L45,28 L48,38 L51,50 L54,56 L56,54 L58,55 L60,54 L63,56 L66,60 L68,62 L70,60 L72,56 L75,54 L77,52 L79,54 L81,56 L84,50 L87,38 L90,28 L93,38 L96,50" fill="none" stroke="#2563eb" stroke-width="4"/>
|
||||
</svg>`
|
||||
} else if (this.name == '电压暂升') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<path d="M8,50 L15,50 L18,38 L21,28 L24,38 L27,50 L30,62 L33,72 L36,62 L39,50 L42,38 L45,28 L48,38 L51,50 L54,43 L56,34 L58,26 L60,34 L63,43 L66,54 L68,60 L70,54 L72,43 L75,34 L77,26 L79,34 L81,43 L84,50 L87,38 L90,28 L93,38 L96,50" fill="none" stroke="#e6a23c" stroke-width="4"/>
|
||||
</svg>`
|
||||
} else if (this.name == '电压中断') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<path d="M8,50 L15,50 L18,38 L21,28 L24,38 L27,50 L30,62 L33,72 L36,62 L39,50 L42,38 L45,28 L48,38 L51,50 L54,50 L57,50 L60,50 L63,50 L66,50 L69,50 L72,50 L75,50 L78,50 L81,50 L84,50 L87,38 L90,28 L93,38 L96,50" fill="none" stroke="#6b7280" stroke-width="4"/>
|
||||
</svg>`
|
||||
} else if (this.name == '瞬态') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<path d="M8,50 L15,50 L18,38 L21,28 L24,38 L27,50 L30,62 L33,72 L36,62 L39,50 L42,38 L45,28 L48,38 L51,50 L53,50 L55,50 L57,20 L59,50 L61,50 L63,50 L66,60 L68,62 L70,60 L72,56 L75,54 L77,52 L79,54 L81,56 L84,50 L87,38 L90,28 L93,38 L96,50" fill="none" stroke="#8b5cf6" stroke-width="4"/>
|
||||
|
||||
</svg>`
|
||||
} else if (this.name == '未知') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<path d="M8,50 L15,50 L18,38 L21,28 L24,38 L27,50 L30,62 L33,72 L36,62 L39,50 L42,38 L45,28 L48,38 L51,50 L54,56 L56,54 L58,55 L60,54 L63,56 L66,60 L68,62 L70,60 L72,56 L75,54 L77,52 L79,54 L81,56 L84,50 L87,38 L90,28 L93,38 L96,50" fill="none" stroke="#6b7280" stroke-width="4"/>
|
||||
<text x="50" y="82" text-anchor="middle" font-size="18" fill="#6b7280" font-family="Arial, sans-serif" font-weight="bold">?</text>
|
||||
</svg>`
|
||||
} else if (this.name == '稳态越限') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<!-- Limit line -->
|
||||
<line x1="5" y1="40" x2="95" y2="40" stroke="#e6a23c" stroke-width="2" stroke-dasharray="4,4"/>
|
||||
|
||||
<polyline points="
|
||||
5,65 12,65 15,59 18,53 21,59 24,65
|
||||
27,71 30,77 33,71 36,65
|
||||
39,59 42,53 45,59 48,65
|
||||
" fill="none" stroke="#376cf3" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<polyline points="
|
||||
51,40 54,20 57,40
|
||||
" fill="none" stroke="#e6a23c" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<polyline points="
|
||||
60,65 63,71 66,77 69,71 72,65
|
||||
75,59 78,53 81,59 84,65
|
||||
87,71 90,77 93,71 95,65
|
||||
" fill="none" stroke="#376cf3" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
|
||||
<line x1="48" y1="65" x2="51" y2="40" stroke="#376cf3" stroke-width="4" stroke-linecap="round"/>
|
||||
<line x1="57" y1="40" x2="60" y2="65" stroke="#376cf3" stroke-width="4" stroke-linecap="round"/>
|
||||
|
||||
<circle cx="54" cy="18" r="2" fill="#e6a23c"/>
|
||||
|
||||
<defs>
|
||||
<marker id="arrowRed" markerWidth="6" markerHeight="5" refX="5" refY="2.5" orient="auto">
|
||||
<polygon points="0,0 6,2.5 0,5" fill="#e6a23c"/>
|
||||
</marker>
|
||||
</defs>
|
||||
</svg>`
|
||||
} else if (this.name == '运行告警') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="40" height="40">
|
||||
<path d="M78.43 4H20.06C9.48 4 1.16 12.33 1.16 22.9v38.37c0 10.57 8.32 18.9 18.9 18.9h26.49v7.27H25.77v7.41h47.96v-7.41H53.96v-7.27h26.47c10.58 0 18.9-8.33 18.9-18.9V22.9c0-10.57-8.32-18.9-18.9-18.9z m11.49 57.27c0 6.33-5.14 11.49-11.49 11.49H20.06c-6.34 0-11.49-5.15-11.49-11.49V22.9c0-6.33 5.14-11.49 11.49-11.49h59.37c6.34 0 11.49 5.15 11.49 11.49v38.37z" fill="#376cf3"/>
|
||||
<line x1="50" y1="28" x2="50" y2="50" stroke="#376cf3" stroke-width="6" stroke-linecap="round"/>
|
||||
<circle cx="50" cy="62" r="4" fill="#376cf3"/>
|
||||
</svg>`
|
||||
} else if (this.name == '治理设备') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="38" height="38">
|
||||
<rect x="0" y="0" width="100" height="100" rx="8" ry="8" fill="#007aff30" stroke="#007aff" stroke-width="2"/>
|
||||
<rect x="8" y="8" width="84" height="84" rx="4" ry="4" fill="#FFFFFF" stroke="#007aff" stroke-width="1.5"/>
|
||||
<rect x="10" y="12" width="80" height="16" rx="2" ry="2" fill="#007aff30" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="24" font-family="Arial, sans-serif" font-size="13" font-weight="bold" fill="#007aff" text-anchor="middle">治理设备</text>
|
||||
<polyline points="14,45 22,51 30,49 38,57 46,55 54,63 62,61 70,67 78,65 86,69"
|
||||
fill="none" stroke="#007aff" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<polygon points="14,45 22,51 30,49 38,57 46,55 54,63 62,61 70,67 78,65 86,69 86,80 14,80"
|
||||
fill="#007aff15"/>
|
||||
|
||||
<circle cx="14" cy="45" r="2" fill="#007aff"/>
|
||||
<circle cx="30" cy="49" r="2" fill="#007aff"/>
|
||||
<circle cx="46" cy="55" r="2" fill="#007aff"/>
|
||||
<circle cx="62" cy="61" r="2" fill="#007aff"/>
|
||||
<circle cx="78" cy="65" r="2" fill="#007aff"/>
|
||||
<circle cx="86" cy="69" r="2" fill="#007aff"/>
|
||||
<polygon points="88,65 86,70 84,65" fill="#007aff" opacity="0.7"/>
|
||||
</svg>`
|
||||
} else if (this.name == '监测设备') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="38" height="38">
|
||||
<style>
|
||||
text { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
|
||||
</style>
|
||||
|
||||
<rect x="0" y="0" width="100" height="100" rx="6" ry="6" fill="#3498DB30" stroke="#3498DB" stroke-width="2"/>
|
||||
|
||||
<rect x="8" y="8" width="84" height="84" rx="3" ry="3" fill="#FFFFFF" stroke="#3498DB" stroke-width="1.5"/>
|
||||
|
||||
<rect x="10" y="12" width="80" height="16" rx="2" ry="2" fill="#3498DB30" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="24" font-size="13" font-weight="bold" fill="#3498DB" text-anchor="middle">监测设备</text>
|
||||
|
||||
<text x="16" y="45" font-size="7" fill="#3498DB">Ua: 220.5V</text>
|
||||
<text x="16" y="55" font-size="7" fill="#3498DB">Ub: 219.8V</text>
|
||||
<text x="16" y="65" font-size="7" fill="#3498DB">Uc: 220.1V</text>
|
||||
|
||||
<line x1="48" y1="38" x2="48" y2="78" stroke="#CCC" stroke-width="0.8" stroke-dasharray="2,2"/>
|
||||
|
||||
<text x="54" y="45" font-size="7" fill="#3498DB">Ia: 125.3A</text>
|
||||
<text x="54" y="55" font-size="7" fill="#3498DB">Ib: 124.7A</text>
|
||||
<text x="54" y="65" font-size="7" fill="#3498DB">Ic: 125.1A</text>
|
||||
|
||||
</svg>`
|
||||
} else if (this.name == '报告') {
|
||||
return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="47" height="47">
|
||||
<path d="M12,12 L78,12 L88,22 L88,88 L12,88 Z" fill="none" stroke="#3b82f6" stroke-width="4" stroke-linejoin="round"/>
|
||||
<path d="M78,12 L78,22 L88,22" fill="none" stroke="#3b82f6" stroke-width="4" stroke-linejoin="round"/>
|
||||
<polyline points="20,50 26,50 28,46 30,42 32,46 34,50 36,54 38,58 40,54 42,50 44,46 46,42 48,46 50,50 56,50" fill="none" stroke="#3b82f6" stroke-width="4" stroke-linecap="round"/>
|
||||
<line x1="20" y1="68" x2="52" y2="68" stroke="#3b82f6" stroke-width="4" opacity="0.4" stroke-linecap="round"/>
|
||||
<line x1="20" y1="76" x2="42" y2="76" stroke="#3b82f6" stroke-width="4" opacity="0.4" stroke-linecap="round"/>
|
||||
<circle cx="70" cy="68" r="9" fill="none" stroke="#3b82f6" stroke-width="4"/>
|
||||
<line x1="76" y1="74" x2="86" y2="84" stroke="#3b82f6" stroke-width="4" stroke-linecap="round"/>
|
||||
</svg>`
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.svg-container {
|
||||
width: 100rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
41
components/Cn-icon-transient/icon.svg
Normal file
41
components/Cn-icon-transient/icon.svg
Normal file
@@ -0,0 +1,41 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<!-- 设备主体 -->
|
||||
<rect x="2" y="2" width="96" height="96" rx="6" ry="6" fill="#E8E8E8" stroke="#333" stroke-width="2"/>
|
||||
|
||||
<!-- 屏幕区域 -->
|
||||
<rect x="6" y="6" width="88" height="52" rx="3" ry="3" fill="#FFFFFF" stroke="#333" stroke-width="1.5"/>
|
||||
|
||||
<!-- 屏幕标题栏(代替品牌标识) -->
|
||||
<rect x="10" y="9" width="80" height="10" rx="2" ry="2" fill="#F0F0F0" stroke="#CCC" stroke-width="0.8"/>
|
||||
<text x="50" y="17" font-family="Arial, sans-serif" font-size="7" font-weight="bold" fill="#333" text-anchor="middle">电能质量监测</text>
|
||||
|
||||
<!-- 屏幕内容 - 左侧参数 -->
|
||||
<text x="10" y="28" font-family="Arial, sans-serif" font-size="6" fill="#000">Ua:220.5V</text>
|
||||
<text x="10" y="36" font-family="Arial, sans-serif" font-size="6" fill="#000">Ub:219.8V</text>
|
||||
<text x="10" y="44" font-family="Arial, sans-serif" font-size="6" fill="#000">Uc:220.1V</text>
|
||||
<text x="10" y="52" font-family="Arial, sans-serif" font-size="6" fill="#000">Hz:50.02</text>
|
||||
|
||||
<!-- 垂直分隔线 -->
|
||||
<line x1="52" y1="22" x2="52" y2="55" stroke="#CCC" stroke-width="0.8" stroke-dasharray="1.5,1.5"/>
|
||||
|
||||
<!-- 右侧参数 -->
|
||||
<text x="58" y="28" font-family="Arial, sans-serif" font-size="6" fill="#000">Ia:125.3A</text>
|
||||
<text x="58" y="36" font-family="Arial, sans-serif" font-size="6" fill="#000">Ib:124.7A</text>
|
||||
<text x="58" y="44" font-family="Arial, sans-serif" font-size="6" fill="#000">Ic:125.1A</text>
|
||||
<text x="58" y="52" font-family="Arial, sans-serif" font-size="6" fill="#000">PF:0.98</text>
|
||||
|
||||
<!-- 指示灯区域分隔线 -->
|
||||
<line x1="6" y1="62" x2="94" y2="62" stroke="#999" stroke-width="1" stroke-dasharray="2,2"/>
|
||||
|
||||
<!-- 电源灯 -->
|
||||
<circle cx="20" cy="76" r="5" fill="#10b981" stroke="#10b981" stroke-width="1"/>
|
||||
<text x="20" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">电源</text>
|
||||
|
||||
<!-- 运行灯 -->
|
||||
<circle cx="50" cy="76" r="5" fill="#999999" stroke="#333" stroke-width="1"/>
|
||||
<text x="50" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">运行</text>
|
||||
|
||||
<!-- 通讯灯(原通信灯,已改名) -->
|
||||
<circle cx="80" cy="76" r="5" fill="#999999" stroke="#333" stroke-width="1"/>
|
||||
<text x="80" y="90" font-family="Arial, sans-serif" font-size="8" font-weight="bold" fill="#333" text-anchor="middle">通讯</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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' })
|
||||
|
||||
@@ -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
|
||||
: '全部项目'
|
||||
}}
|
||||
|
||||
@@ -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%);
|
||||
}
|
||||
|
||||
@@ -3,29 +3,33 @@
|
||||
<view class="filterCriteria">
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :showDatetime="true"> </Cn-filterCriteria>
|
||||
<view class="choose1">
|
||||
<view>
|
||||
<checkbox-group @change="changeBox"
|
||||
><checkbox value="true" :checked="checkedAll" />全选
|
||||
</checkbox-group></view
|
||||
>
|
||||
<!-- <view class="choose1">
|
||||
<view class="nav-menu nav-menu-btn" @click="selectDevice">申请报告 </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="smallLabel mt20">
|
||||
<view> 共 {{ store.total }} 条事件 | 已选择 {{ checkedTotal }} 条事件 </view>
|
||||
<view style="width: 180rpx">
|
||||
<view class="boxCenter">
|
||||
<view>
|
||||
<checkbox-group @change="changeBox" class="boxCenter"
|
||||
><checkbox value="true" :checked="checkedAll" />全选
|
||||
</checkbox-group></view
|
||||
>
|
||||
已选择 {{ checkedTotal }} 条事件
|
||||
</view>
|
||||
<view class="nav-menu nav-menu-btn" @click="selectDevice">申请报告 </view>
|
||||
<!-- <view style="width: 180rpx">
|
||||
<picker @change="bindPickerChange" :value="sort" :range="array">
|
||||
<view class="uni-input"
|
||||
>{{ array[sort] }}排序
|
||||
<uni-icons custom-prefix="iconfont" type="icon-paixu1" size="10" color="#2563EB"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<!-- 卡片 -->
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@scrolltolower="scrolltolower"
|
||||
class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
@@ -41,16 +45,17 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
:custom-prefix="judgment(item.showName) == 'interrupt' ? 'custom-icon' : 'iconfont'"
|
||||
:type="judgment(item.showName).icon"
|
||||
:color="judgment(item.showName).color"
|
||||
:size="judgment(item.showName).size"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="item.showName" />
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<text class="event-tag" :class="`${judgment(item.showName).type}-tag`">{{
|
||||
item.showName
|
||||
}}</text>
|
||||
@@ -58,22 +63,35 @@
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<text>监测点名称:{{ item.lineName }}</text>
|
||||
<text>设备名称:{{ item.equipmentName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
<!-- 选择 -->
|
||||
<checkbox-group @change="changeChild($event, item)"
|
||||
><checkbox value="true" :checked="item.checked" />
|
||||
><checkbox value="true" :disabled="!item.wavePath" :checked="item.checked" />
|
||||
</checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth }},持续时间:{{
|
||||
item.evtParamTm
|
||||
}},相别:{{ item.evtParamPhase }}
|
||||
{{ item.startTime ? '发生时间:' + item.startTime : '' }}
|
||||
{{
|
||||
item.evtParamVVaDepth != null && item.evtParamVVaDepth !== ''
|
||||
? ',幅值:' + item.evtParamVVaDepth + '%'
|
||||
: ''
|
||||
}}
|
||||
{{
|
||||
item.evtParamTm != null && item.evtParamTm !== ''
|
||||
? ',持续时间:' + item.evtParamTm + 's'
|
||||
: ''
|
||||
}}
|
||||
{{
|
||||
item.evtParamPhase != null && item.evtParamPhase !== ''
|
||||
? ',相别:' + item.evtParamPhase
|
||||
: ''
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -134,7 +152,7 @@ export default {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 0
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.sortField = this.sort
|
||||
this.store.params.engineeringid = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
@@ -158,11 +176,17 @@ export default {
|
||||
changeBox(e) {
|
||||
this.checkedAll = !this.checkedAll
|
||||
if (e.target.value.length > 0) {
|
||||
let total = 0
|
||||
this.store.data = this.store.data.map((item) => {
|
||||
item.checked = true
|
||||
if (item.wavePath != null) {
|
||||
item.checked = true
|
||||
total += 1
|
||||
} else {
|
||||
item.checked = false
|
||||
}
|
||||
return item
|
||||
})
|
||||
this.checkedTotal = this.store.total
|
||||
this.checkedTotal = total
|
||||
} else {
|
||||
this.store.data = this.store.data.map((item) => {
|
||||
item.checked = false
|
||||
@@ -266,6 +290,20 @@ export default {
|
||||
|
||||
return true
|
||||
},
|
||||
// 下拉
|
||||
refresherrefresh() {
|
||||
this.triggered = true
|
||||
uni.startPullDownRefresh()
|
||||
setTimeout(() => {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -283,7 +321,7 @@ export default {
|
||||
background-color: #fff;
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: flex-end;
|
||||
/deep/ .uni-checkbox-input {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
@@ -294,8 +332,8 @@ export default {
|
||||
.nav-menu {
|
||||
height: 40rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// margin-left: 20rpx;
|
||||
// margin-bottom: 20rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
border-radius: 8rpx;
|
||||
@@ -315,6 +353,10 @@ export default {
|
||||
}
|
||||
.smallLabel {
|
||||
justify-content: space-between;
|
||||
font-size: 24rpx !important;
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
.boxCenter {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,21 +22,21 @@
|
||||
<view class="project-info">
|
||||
<view class="project-name">{{ item.engineeringName }}</view>
|
||||
<view class="project-stats">
|
||||
<view class="stat-item" @click="jump('nowEngineering', item)">
|
||||
<view class="stat-item boxClick" @click="jump('nowEngineering', item)">
|
||||
<text class="stat-value blue">{{ item.devTotal }}</text>
|
||||
<text class="stat-label">设备总数</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('currentOnLineDevs', item)">
|
||||
<view class="stat-item boxClick" @click="jump('currentOnLineDevs', item)">
|
||||
<text class="stat-value green">{{ item.onlineDevTotal }}</text>
|
||||
<text class="stat-label">在线设备</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('currentOffLineDevs', item)">
|
||||
<view class="stat-item boxClick" @click="jump('currentOffLineDevs', item)">
|
||||
<text class="stat-value red">{{ item.offlineDevTotal }}</text>
|
||||
<text class="stat-label">离线设备</text>
|
||||
</view>
|
||||
<view class="stat-item" @click="jump('event', item)">
|
||||
<view class="stat-item boxClick" @click="jump('event', item)">
|
||||
<text class="stat-value red">{{ item.alarmTotal }}</text>
|
||||
<text class="stat-label">告警数量</text>
|
||||
<text class="stat-label">事件数量</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -150,8 +150,15 @@ export default {
|
||||
if (type == 'event') {
|
||||
// 存储参数
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: item.engineeringName,
|
||||
id: item.engineeringId,
|
||||
|
||||
engineeringName: this.device.engineeringName,
|
||||
engineeringId: this.device.engineeringId, //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: '',
|
||||
})
|
||||
uni.switchTab({
|
||||
@@ -204,7 +211,7 @@ export default {
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
color: #333333;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.project-stats {
|
||||
@@ -224,13 +231,14 @@ export default {
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 32rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
margin-top: 5rpx;
|
||||
// color: #666666;
|
||||
}
|
||||
|
||||
.blue {
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
<template v-if="devCount.engineeringListLength > 0">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0)">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1)">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -50,7 +50,12 @@
|
||||
<view class="canneng-index-title mt20">常用功能</view>
|
||||
<view style="padding: 20rpx 20rpx 0">
|
||||
<Cn-grid title="" :auto-fill="false">
|
||||
<Cn-grid-item src="/static/device2.png" text="设备注册" @click="registerDevice(4)"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
class="boxClick"
|
||||
src="/static/device2.png"
|
||||
text="设备注册"
|
||||
@click="registerDevice(4)"
|
||||
></Cn-grid-item>
|
||||
<!-- <Cn-grid-item
|
||||
src="/static/device2.png"
|
||||
text="功能调试"
|
||||
@@ -178,8 +183,14 @@ export default {
|
||||
},
|
||||
jumpMessage(type) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
@@ -20,17 +20,17 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
|
||||
@@ -3,29 +3,29 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(2, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(2, false)">
|
||||
<view class="header-item-value">{{ devCount.alarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, false)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.eventCount + devCount.runCount + devCount.harmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -34,31 +34,31 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(2, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(2, true)">
|
||||
<view class="header-item-value">{{ devCount.currentAlarmCount || 0 }}</view>
|
||||
<view class="header-item-label">告警数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, true)">
|
||||
<view class="header-item-value">{{
|
||||
devCount.currentEventCount + devCount.currentRunCount + devCount.currentHarmonicCount || 0
|
||||
}}</view>
|
||||
<view class="header-item-label">事件数量</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
<view class="header-item boxClick" @click="projectNum(true)">
|
||||
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
@@ -81,8 +81,16 @@ export default {
|
||||
methods: {
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
// name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
// id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
engineeringName: flag ? uni.getStorageSync('engineering').name : '',
|
||||
engineeringId: flag ? uni.getStorageSync('engineering').id : '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
@@ -20,25 +20,25 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value"
|
||||
>{{ devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0 }}
|
||||
</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('0')">
|
||||
<view class="header-item boxClick" @click="jumpMessage('0')">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage('1')">
|
||||
<view class="header-item boxClick" @click="jumpMessage('1')">
|
||||
<view class="header-item-value">{{ devCount.currentHarmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
@@ -46,9 +46,19 @@
|
||||
<view class="canneng-index-title mt20">常用功能</view>
|
||||
<view style="padding: 20rpx 20rpx 0">
|
||||
<Cn-grid title="">
|
||||
<Cn-grid-item src="/static/device2.png" text="设备注册" @click="registerDevice"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
src="/static/device2.png"
|
||||
class="boxClick"
|
||||
text="设备注册"
|
||||
@click="registerDevice"
|
||||
></Cn-grid-item>
|
||||
<!-- <Cn-grid-item src="/static/gateway2.png" text="网关注册" @click="registerGateway"></Cn-grid-item> -->
|
||||
<Cn-grid-item src="/static/feedback2.png" text="问题反馈" @click="submitFeedBack"></Cn-grid-item>
|
||||
<Cn-grid-item
|
||||
src="/static/feedback2.png"
|
||||
class="boxClick"
|
||||
text="问题反馈"
|
||||
@click="submitFeedBack"
|
||||
></Cn-grid-item>
|
||||
</Cn-grid>
|
||||
</view>
|
||||
<uni-popup ref="popup" type="dialog" @maskClick="maskClick">
|
||||
@@ -144,8 +154,14 @@ export default {
|
||||
},
|
||||
jumpMessage(type) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name:'',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -3,27 +3,27 @@
|
||||
<template v-if="devCount.engineeringListLength > 1">
|
||||
<view class="canneng-index-title mb20">所有工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('allEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('allEngineering')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount + devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('onLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('onLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.onLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('offLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('offLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.offLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, false)">
|
||||
<view class="header-item-value">{{ devCount.eventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1, false)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1, false)">
|
||||
<view class="header-item-value">{{ devCount.harmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="eningerNum">
|
||||
<view class="header-item boxClick" @click="eningerNum">
|
||||
<view class="header-item-value">{{ devCount.eningerCount || 0 }}</view>
|
||||
<view class="header-item-label">工程个数</view>
|
||||
</view>
|
||||
@@ -32,29 +32,29 @@
|
||||
</template>
|
||||
<view class="canneng-index-title mb20">当前工程设备统计</view>
|
||||
<view class="header">
|
||||
<view class="header-item" @click="jump('nowEngineering')">
|
||||
<view class="header-item boxClick" @click="jump('nowEngineering')">
|
||||
<view class="header-item-value"
|
||||
>{{ devCount.currentOnLineDevCount + devCount.currentOffLineDevCount || 0 }}
|
||||
</view>
|
||||
<view class="header-item-label">设备总数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOnLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOnLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">在线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item boxClick" @click="jump('currentOffLineDevs')">
|
||||
<view class="header-item-value">{{ devCount.currentOffLineDevCount || 0 }}</view>
|
||||
<view class="header-item-label">离线设备</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(0, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(0, true)">
|
||||
<view class="header-item-value">{{ devCount.currentEventCount || 0 }}</view>
|
||||
<view class="header-item-label">暂态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="jumpMessage(1, true)">
|
||||
<view class="header-item boxClick" @click="jumpMessage(1, true)">
|
||||
<view class="header-item-value">{{ devCount.currentHarmonicCount || 0 }}</view>
|
||||
<view class="header-item-label">稳态事件数</view>
|
||||
</view>
|
||||
<view class="header-item" @click="projectNum(true)">
|
||||
<view class="header-item boxClick" @click="projectNum(true)">
|
||||
<view class="header-item-value">{{ devCount.currentProjectCount || 0 }}</view>
|
||||
<view class="header-item-label">项目个数</view>
|
||||
</view>
|
||||
@@ -87,8 +87,16 @@ export default {
|
||||
},
|
||||
jumpMessage(type, flag) {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
// name: flag ? uni.getStorageSync('engineering').name : '',
|
||||
// id: flag ? uni.getStorageSync('engineering').id : '',
|
||||
engineeringName: flag ? uni.getStorageSync('engineering').name : '',
|
||||
engineeringId: flag ? uni.getStorageSync('engineering').id : '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: type,
|
||||
})
|
||||
uni.switchTab({
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<view class="dateReport">
|
||||
<!-- {{ height }} -->
|
||||
<!-- <view class="pd20">
|
||||
|
||||
<view class="pd20">
|
||||
<uni-segmented-control
|
||||
:current="curSub"
|
||||
class="subsection"
|
||||
@@ -9,10 +10,10 @@
|
||||
:values="subsectionList"
|
||||
@clickItem="sectionChange"
|
||||
/>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="filterCriteria">
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :report="true"> </Cn-filterCriteria>
|
||||
<Cn-filterCriteria @select="select" :singleChoice="true" :showDatetime="curSub == 0"> </Cn-filterCriteria>
|
||||
</view>
|
||||
|
||||
<!-- 卡片 -->
|
||||
@@ -22,28 +23,50 @@
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list mt20"
|
||||
v-if="eventList.length != 0"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`报告`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<view class="event-tags"
|
||||
<!-- <view class="event-tags"
|
||||
>{{ selectValue.report == 0 ? item.startTime : item.startTime + '至' + item.endTime }}
|
||||
<view class="iconText ml10" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text
|
||||
>统计时间:{{
|
||||
curSub == 0 ? item.startTime : item.startTime + ' 至 ' + item.endTime
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action" v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">
|
||||
<view class="iconText" @click="download(item)"
|
||||
><uni-icons type="arrow-down" color="#fff" size="16"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>{{ item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc }}</text>
|
||||
<view class="event-detail textBox" @touchmove.stop>
|
||||
<text v-if="curSub == 0 ? monthFlag : item.endTime != thisMonth01">{{
|
||||
item.overLimitDesc == '' ? '该监测点暂无指标越限' : item.overLimitDesc
|
||||
}}</text>
|
||||
<text v-else>数据未生成,暂不支持下载</text>
|
||||
</view>
|
||||
<!-- <view class="downloadReport" @click="download">
|
||||
<uni-icons type="download" size="16" color="#376cf3"></uni-icons>下载报告
|
||||
@@ -83,21 +106,18 @@ export default {
|
||||
status: 'noMore',
|
||||
curSub: 0,
|
||||
subsectionList: ['周报', '月报'],
|
||||
eventList: [
|
||||
{
|
||||
id: '测试监测点',
|
||||
tag: '2026-01-23至2026-01-23',
|
||||
|
||||
status: '1',
|
||||
},
|
||||
],
|
||||
thisSelectValue: {},
|
||||
triggered: true,
|
||||
height: 0,
|
||||
thisMonth01: '',
|
||||
monthFlag: true,
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.thisMonth01 = this.$util.getToday().slice(0, -3) + '-01'
|
||||
this.monthFlag = this.$util.getToday() != this.$util.getToday().slice(0, -3) + '-01'
|
||||
|
||||
// this.setHeight()
|
||||
},
|
||||
methods: {
|
||||
@@ -107,28 +127,33 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 80 || 0
|
||||
this.height = rect?.height + 140 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 30 || 0
|
||||
this.height = rect?.height + 70 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
},
|
||||
sectionChange(index) {
|
||||
this.curSub = index.currentIndex
|
||||
this.init()
|
||||
},
|
||||
init() {
|
||||
if (this.selectValue.lineId == '') return
|
||||
|
||||
this.store = this.DataSource('/cs-report-boot/csAppReport/reportList')
|
||||
this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.selectValue.report
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.timeType = this.curSub //this.selectValue.report
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
this.store.params.lineId = this.selectValue.lineId
|
||||
this.store.params.time = this.selectValue.date
|
||||
if (this.curSub == 0) {
|
||||
this.store.params.time = this.selectValue.date
|
||||
} else {
|
||||
this.store.params.time = this.selectValue.range + '-01'
|
||||
}
|
||||
// this.store.params.startTime = this.selectValue.range[0]
|
||||
// this.store.params.endTime = this.selectValue.range[1]
|
||||
this.store.loadedCallback = () => {}
|
||||
@@ -137,11 +162,10 @@ export default {
|
||||
|
||||
select(value) {
|
||||
this.selectValue = value
|
||||
setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
this.setHeight()
|
||||
}, 200)
|
||||
this.init()
|
||||
|
||||
},
|
||||
// 下载
|
||||
download(item) {
|
||||
@@ -289,6 +313,34 @@ export default {
|
||||
border-radius: 50%;
|
||||
background-color: $uni-theme-color;
|
||||
text-align: center;
|
||||
line-height: 45rpx;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
/* 列表容器 */
|
||||
.event-list {
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
.event-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.event-tags {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
// @touchmove.stop
|
||||
max-height: 110rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -22,24 +22,28 @@
|
||||
<!-- 筛选条件 -->
|
||||
<Cn-filterCriteria @select="select" :showQianTree="false"> </Cn-filterCriteria>
|
||||
</view>
|
||||
<view
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="record event-list mt20"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view
|
||||
class="event-icon"
|
||||
:style="{ backgroundColor: item.isComplete == 1 ? '#10b98120' : '#FF000020' }"
|
||||
>
|
||||
<view class="event-icon">
|
||||
<!-- :style="{ backgroundColor: item.isComplete == 1 ? '#10b98120' : '#FF000020' }" -->
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-baogaoguanli"
|
||||
size="40"
|
||||
:color="item.isComplete == 1 ? '#10b981' : '#FF0000'"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`报告`" />
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
@@ -81,10 +85,9 @@
|
||||
<text>{{ item.eventNums }}次</text>
|
||||
</view>
|
||||
<view class="device-body-item">
|
||||
<text>申请状态:</text>
|
||||
<text>报告状态:</text>
|
||||
<text
|
||||
:style="{ color: item.isComplete == 1 ? '#10b981' : '#FF0000' }"
|
||||
style="font-weight: 700"
|
||||
>{{ item.isComplete == 1 ? '已完成' : '未完成' }}</text
|
||||
>
|
||||
</view>
|
||||
@@ -102,7 +105,7 @@
|
||||
:status="store.status"
|
||||
></uni-load-more>
|
||||
<Cn-empty v-else style="top: 30%"></Cn-empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -141,6 +144,7 @@ export default {
|
||||
type: 0,
|
||||
lindId: '',
|
||||
},
|
||||
triggered: true,
|
||||
userInfo: {},
|
||||
height: 0,
|
||||
selectValue: {},
|
||||
@@ -274,8 +278,6 @@ export default {
|
||||
},
|
||||
// 刷新
|
||||
reload() {
|
||||
console.log(123, this.curSub)
|
||||
|
||||
switch (this.curSub) {
|
||||
case 0:
|
||||
this.$refs.applyRef.store.reload()
|
||||
@@ -285,6 +287,20 @@ export default {
|
||||
break
|
||||
}
|
||||
},
|
||||
// 下拉
|
||||
refresherrefresh() {
|
||||
this.triggered = true
|
||||
uni.startPullDownRefresh()
|
||||
setTimeout(() => {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
}
|
||||
@@ -355,6 +371,12 @@ export default {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.event-list {
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
}
|
||||
.segmented-control {
|
||||
flex: 1;
|
||||
margin-right: 24rpx;
|
||||
|
||||
@@ -187,11 +187,18 @@ export default {
|
||||
key: this.$cacheKey.messageCount,
|
||||
data: this.devCount,
|
||||
})
|
||||
// let messagePage =
|
||||
// this.devCount.runCount +
|
||||
// this.devCount.eventCount +
|
||||
// this.devCount.alarmCount +
|
||||
// this.devCount.harmonicCount
|
||||
let messagePage =
|
||||
this.devCount.runCount +
|
||||
this.devCount.eventCount +
|
||||
this.devCount.alarmCount +
|
||||
this.devCount.harmonicCount
|
||||
this.devCount.harmonicCount +
|
||||
(uni.getStorageSync(this.$cacheKey.userInfo).authorities == 'operation_manager'
|
||||
? this.devCount.alarmCount + this.devCount.runCount
|
||||
: 0)
|
||||
console.log('🚀 ~ messagePage:', messagePage)
|
||||
let minePage = this.devCount.feedBackCount
|
||||
|
||||
if (messagePage) {
|
||||
@@ -300,7 +307,6 @@ export default {
|
||||
|
||||
.canneng-index-title {
|
||||
padding: 0 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
@@ -121,8 +121,8 @@ export default {
|
||||
if (params.type !== '') {
|
||||
this.current = params.type - 0
|
||||
}
|
||||
if (params.name != '') {
|
||||
this.$refs.cnFilterCriteria && this.$refs.cnFilterCriteria.external(params.name, params.id)
|
||||
if (params.engineeringName != '') {
|
||||
this.$refs.cnFilterCriteria && this.$refs.cnFilterCriteria.external(params)
|
||||
}
|
||||
// this.refresh()
|
||||
this.$refs.TransientRef && this.$refs.TransientRef.getConfig()
|
||||
@@ -131,8 +131,14 @@ export default {
|
||||
// 页面销毁
|
||||
onHide() {
|
||||
uni.setStorageSync('messageParams', {
|
||||
name: '',
|
||||
id: '',
|
||||
engineeringName: '',
|
||||
engineeringId: '', //工程ID
|
||||
projectName: '',
|
||||
projectId: '', //項目ID
|
||||
deviceName: '',
|
||||
deviceId: '', //设备ID
|
||||
lineName: '',
|
||||
lineId: '', //测点ID
|
||||
type: '',
|
||||
})
|
||||
},
|
||||
@@ -195,11 +201,13 @@ export default {
|
||||
key: this.$cacheKey.messageCount,
|
||||
data: this.devCount,
|
||||
})
|
||||
|
||||
let messagePage =
|
||||
this.devCount.runCount +
|
||||
this.devCount.eventCount +
|
||||
this.devCount.alarmCount +
|
||||
this.devCount.harmonicCount
|
||||
this.devCount.harmonicCount +
|
||||
(uni.getStorageSync(this.$cacheKey.userInfo).authorities == 'operation_manager'
|
||||
? this.devCount.alarmCount + this.devCount.runCount
|
||||
: 0)
|
||||
let minePage = this.devCount.feedBackCount
|
||||
|
||||
if (messagePage) {
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
</view>
|
||||
<view class="mine-nav" @click="jump('transientSetting')" v-if="userInfo.authorities !== 'tourist'">
|
||||
<!-- 调试内容配置 serverSetting-->
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/server2.png" />
|
||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/tongji.png" />
|
||||
<view class="mine-nav-label">暂态统计配置</view>
|
||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||
</view>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -23,24 +24,34 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="30"
|
||||
color="#FF0000"
|
||||
></uni-icons>
|
||||
color="#376cf3"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`运行告警`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.date }}发生告警终端{{ item.warnNums }}台</text>
|
||||
<text class="event-id">{{ item.date }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>告警终端:{{ item.warnNums }}台</text>
|
||||
<text>通讯中断:{{ item.interruptCounts }}次</text>
|
||||
<text>终端告警:{{ item.warnCounts}}次</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
<view class="event-action">
|
||||
<!-- <uni-icons type="search" size="25" color="#376cf3"></uni-icons> -->
|
||||
🔍
|
||||
🔍
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="event-detail">
|
||||
<text> 告警终端{{ item.warnNums }}台 </text>
|
||||
</view> -->
|
||||
</uni-card>
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||
@@ -76,7 +87,7 @@ export default {
|
||||
methods: {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csAlarm/queryAlarmList')
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
@@ -101,6 +112,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -124,18 +141,18 @@ export default {
|
||||
.event-list {
|
||||
margin-top: 20rpx;
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
.event-header {
|
||||
margin-bottom: 0rpx;
|
||||
}
|
||||
.event-title {
|
||||
margin-bottom: 0rpx;
|
||||
}
|
||||
// .event-header {
|
||||
// margin-bottom: 0rpx;
|
||||
// }
|
||||
// .event-title {
|
||||
// margin-bottom: 0rpx;
|
||||
// }
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
background-color: #ff000020;
|
||||
// width: 80rpx;
|
||||
// height: 80rpx;
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
/* 信息区域 */
|
||||
|
||||
@@ -13,9 +13,7 @@ export default {
|
||||
store: {
|
||||
type: [Object],
|
||||
},
|
||||
filterValue: {
|
||||
type: [String],
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -238,20 +236,13 @@ export default {
|
||||
store: {
|
||||
handler(val, oldVal) {
|
||||
this.status = val.status
|
||||
this.data = (val.data || []).filter((k) =>
|
||||
this.filterValue == '' ? k : k.showName == this.filterValue,
|
||||
)
|
||||
this.data = (val.data || [])
|
||||
this.gongfunction()
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
filterValue: {
|
||||
handler(val, oldVal) {
|
||||
this.data = (this.store.data || []).filter((k) => (val == '' ? k : k.showName == val))
|
||||
this.gongfunction()
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,9 +13,7 @@ export default {
|
||||
store: {
|
||||
type: [Object],
|
||||
},
|
||||
filterValue: {
|
||||
type: [String],
|
||||
},
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -230,20 +228,13 @@ export default {
|
||||
store: {
|
||||
handler(val, oldVal) {
|
||||
this.status = val.status
|
||||
this.data = (val.data || []).filter((k) =>
|
||||
this.filterValue == '' ? k : k.showName == this.filterValue,
|
||||
)
|
||||
this.data = (val.data || [])
|
||||
this.gongfunction()
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
filterValue: {
|
||||
handler(val, oldVal) {
|
||||
this.data = (this.store.data || []).filter((k) => (val == '' ? k : k.showName == val))
|
||||
this.gongfunction()
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,102 +6,68 @@
|
||||
<view>{{ detail.date }}</view>
|
||||
</view>
|
||||
<view class="detail-content" style="padding: 0px">
|
||||
<view class="detail-content-title mb20 pt20 pl20">终端告警列表</view>
|
||||
<view class="detail-content-title pb20 pt20 pl20">终端告警列表</view>
|
||||
</view>
|
||||
|
||||
<!-- <uni-collapse accordion v-model="collapseValue">
|
||||
<uni-collapse-item :title="item.devName" v-for="item in list">
|
||||
<template v-slot:title>
|
||||
<view class="collapseTop">
|
||||
<view class="mb5 name"> {{ item.devName }}</view>
|
||||
<view class="mb5 frequency">
|
||||
<view class="mr20"> 告警次数: {{ item.warnCounts }} 次</view>
|
||||
<view> 通讯中断: {{ item.interruptCounts }} 次</view>
|
||||
</view>
|
||||
<view class="event-list">
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in list" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view
|
||||
class="event-icon"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-bgc' : 'jc-bgc'"
|
||||
>
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="35"
|
||||
color="#FF0000"
|
||||
></uni-icons> -->
|
||||
<!-- <Cn-icon-transient :name="`运行告警`" /> -->
|
||||
<Cn-icon-transient
|
||||
:name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'"
|
||||
/>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.devName }}</text>
|
||||
<text
|
||||
class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
|
||||
>{{ item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text
|
||||
>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<view>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>项目名称:{{ item.projectName }} </view></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>工程名称:{{ item.engineeringName }}</view></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>通讯信息:</view>
|
||||
<view style="flex: 1">
|
||||
<view v-if="item.interruptCounts == 0">通讯正常</view>
|
||||
<view v-else>通讯中断{{ item.interruptCounts }}次,具体如下所示:</view
|
||||
><view v-for="date in item.interruptDetails" class="mt15 textBox">{{
|
||||
date
|
||||
}}</view></view
|
||||
></view
|
||||
>
|
||||
<view class="mb10 ml12 frequency">
|
||||
<view>告警信息:</view>
|
||||
<view style="flex: 1">
|
||||
<view v-if="item.warnCounts == 0">暂无终端告警信息</view>
|
||||
<view v-else>终端告警{{ item.warnCounts }}次,具体如下所示:</view
|
||||
><view v-for="val in item.warnDetails" class="mt15 textBox">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view></view
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<!-- <text>事件时间:{{ item.startTime }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<view v-if="item.interruptCounts">
|
||||
通讯中断 {{ item.interruptCounts }} 次,详情如下:
|
||||
<view class="textBox">
|
||||
<view
|
||||
v-for="date in String(item.interruptDetails || '').split(',')"
|
||||
class="textBox mb5"
|
||||
>{{ date }}</view
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse> -->
|
||||
<view class="event-list">
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in list" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-terminal-box-fill"
|
||||
size="35"
|
||||
color="#FF0000"
|
||||
></uni-icons>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.devName }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<!-- <text>事件时间:{{ item.startTime }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="item.warnCounts">
|
||||
终端告警 {{ item.warnCounts }} 次,详情如下:
|
||||
<view class="textBox">
|
||||
<view v-for="val in item.warnDetails" class="textBox mb5">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view></view
|
||||
>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<uni-collapse>
|
||||
<uni-collapse-item
|
||||
:title="
|
||||
item.interruptCounts == 0 ? '通讯正常' : `通讯中断 ${item.interruptCounts} 次`
|
||||
"
|
||||
>
|
||||
<view
|
||||
v-for="date in String(item.interruptDetails || '').split(',')"
|
||||
class="textBox mb10"
|
||||
>{{ date }}</view
|
||||
>
|
||||
</uni-collapse-item>
|
||||
<uni-collapse-item
|
||||
:title="
|
||||
item.warnCounts == 0 ? '暂无终端告警信息' : `终端告警 ${item.warnCounts} 次`
|
||||
"
|
||||
>
|
||||
<view v-for="val in item.warnDetails" class="textBox mb10">
|
||||
{{ val.warnEventTime + '发生' + val.warnEventDesc }}
|
||||
</view>
|
||||
</uni-collapse-item>
|
||||
</uni-collapse>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
@@ -180,18 +146,30 @@ export default {
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
border-bottom: 1px solid #eee;
|
||||
// border-bottom: 1px solid #eee;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
text-indent: 2em;
|
||||
}
|
||||
.event-list {
|
||||
background: #fff;
|
||||
// background: #fff;
|
||||
padding-bottom: 10rpx;
|
||||
.event-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
background-color: #ff000020;
|
||||
// .event-icon {
|
||||
// background-color: #376cf320;
|
||||
// }
|
||||
.zl-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.jc-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.zl-tag {
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-collapse-item__title-box {
|
||||
@@ -204,4 +182,8 @@ export default {
|
||||
font-size: 26rpx !important;
|
||||
}
|
||||
}
|
||||
.textBox {
|
||||
max-height: 120rpx;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">基础信息</view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.devName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 设备名称:{{ detail.devName }} </view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5" style="display: flex">
|
||||
越限详情:
|
||||
<view style="flex: 1">{{ detail.overLimitDesc }}</view></view
|
||||
<view style="flex: 1" class="details">{{ detail.overLimitDesc }}</view></view
|
||||
>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20"
|
||||
>指标越限详情<text class="prompt">(仅显示较为严重的10次)</text></view
|
||||
>指标越限详情<text class="prompt">(仅显示最严重的10组数据)</text></view
|
||||
>
|
||||
|
||||
<uni-collapse accordion v-model="collapseValue">
|
||||
@@ -129,13 +129,15 @@ export default {
|
||||
padding: 20rpx 0rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
text {
|
||||
flex: 1;
|
||||
width: 100rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
// color: #333;
|
||||
&:first-child {
|
||||
// text-align: left;
|
||||
flex: 1.2;
|
||||
&:nth-child(1) {
|
||||
flex: 1;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,4 +152,8 @@ export default {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
.details {
|
||||
max-height: 70px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="detail-content-title mb20">基础信息</view>
|
||||
<view class="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 工程名称:{{ detail.engineeringName }} </view>
|
||||
<view class="mb5"> 项目名称:{{ detail.projectName }} </view>
|
||||
<view class="mb5"> 设备名称:{{ detail.equipmentName }}</view>
|
||||
<view class="mb5"> 监测点名称:{{ detail.lineName }}</view>
|
||||
<view class="mb5"> 暂态类型:{{ detail.showName }}</view>
|
||||
<view class="mb5"> 持续时间:{{ detail.evtParamTm || '-' }}%</view>
|
||||
<view class="mb5"> 幅值:{{ detail.evtParamVVaDepth || '-' }}s</view>
|
||||
<view class="mb5"> 相别:{{ detail.evtParamPhase || '-' }}</view>
|
||||
<view class="mb5" v-if="detail.evtParamTm"> 持续时间:{{ detail.evtParamTm }}s</view>
|
||||
<view class="mb5" v-if="detail.evtParamVVaDepth"> 幅值:{{ detail.evtParamVVaDepth }}%</view>
|
||||
<view class="mb5" v-if="detail.evtParamPhase"> 相别:{{ detail.evtParamPhase }}</view>
|
||||
<!-- <view class="mb5" v-for="(item, textIndex) in detail.dataSet" :key="textIndex">
|
||||
{{ item.showName + ':' + (item.value == 3.1415926 ? '-' : item.value) + (item.unit || '') }}
|
||||
</view> -->
|
||||
|
||||
@@ -58,8 +58,8 @@
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
position: relative;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -21,14 +22,22 @@
|
||||
>
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<view class="event-icon" :class="item.devType == 'Direct_Connected_Device' ? 'zl-bgc' : 'jc-bgc'">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons custom-prefix="iconfont" type="icon-shebei" size="35" color="#10B981"></uni-icons>
|
||||
<!-- <uni-icons custom-prefix="iconfont" type="icon-shebei3" size="35" color="#376cf3"></uni-icons> -->
|
||||
<Cn-icon-transient
|
||||
:name="item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备'"
|
||||
/>
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text
|
||||
class="event-tag"
|
||||
:class="item.devType == 'Direct_Connected_Device' ? 'zl-tag' : 'jc-tag'"
|
||||
>{{ item.devType == 'Direct_Connected_Device' ? '治理设备' : '监测设备' }}</text
|
||||
>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
@@ -68,7 +77,7 @@ export default {
|
||||
mixins: [list],
|
||||
data() {
|
||||
return {
|
||||
triggered: true,
|
||||
triggered: true,
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
@@ -78,7 +87,7 @@ export default {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 2
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.sortField = this.sort
|
||||
this.store.params.engineeringid = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
@@ -108,6 +117,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -134,11 +149,19 @@ export default {
|
||||
/* 头部:图标 + 信息 + 操作 */
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
// width: 90rpx;
|
||||
// height: 90rpx;
|
||||
|
||||
background-color: #10b98120;
|
||||
.zl-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.jc-bgc {
|
||||
background-color: #376cf320;
|
||||
}
|
||||
.zl-tag {
|
||||
background-color: #007aff20;
|
||||
color: #007aff;
|
||||
}
|
||||
.jc-tag {
|
||||
background-color: #3498db20;
|
||||
color: #3498db;
|
||||
}
|
||||
}
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
class="box"
|
||||
:class="{ boxClick: item.label == filterValue }"
|
||||
v-for="item in list"
|
||||
@click="filterValue = item.label"
|
||||
@click="
|
||||
filterValue = item.label
|
||||
init()
|
||||
"
|
||||
>
|
||||
<text class="num">{{ item.value }}</text>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
@@ -19,6 +22,7 @@
|
||||
v-if="filterValue == '稳态数量'"
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -36,12 +40,13 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`稳态越限`" />
|
||||
<view class="badge1" v-if="item.isRead == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
@@ -61,7 +66,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail textBox">
|
||||
<view class="event-detail textBox" @touchmove.stop>
|
||||
<text>{{ item.statisticsDate }}发生 {{ item.overLimitDesc }} </text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -83,10 +88,67 @@
|
||||
:end-date="endData"
|
||||
/>
|
||||
</view>
|
||||
<!-- 越限测点数 -->
|
||||
<scroll-view
|
||||
v-if="filterValue == '越限测点数'"
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
>
|
||||
<!-- 循环渲染事件项 -->
|
||||
<uni-card class="event-item" :class="item.type" v-for="(item, index) in store.data" :key="index">
|
||||
<!-- 头部:图标 + 信息 + 操作 -->
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<!-- <uni-icons
|
||||
custom-prefix="iconfont"
|
||||
type="icon-kouanjiancedian"
|
||||
size="40"
|
||||
color="#E6A23C"
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="`稳态越限`" />
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
</view>
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<text>设备名称:{{ item.devName }}</text>
|
||||
<!-- <text>统计日期:{{ item.statisticsDate }}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<uni-calendar
|
||||
:insert="true"
|
||||
:lunar="false"
|
||||
:date="startData"
|
||||
:selected="item.timeList.map((date) => ({ date, info: '' }))"
|
||||
:start-date="startData"
|
||||
:end-date="endData"
|
||||
/>
|
||||
</view>
|
||||
</uni-card>
|
||||
|
||||
<uni-load-more
|
||||
v-if="store.status == 'loading' || (store.data && store.data.length > 0)"
|
||||
:status="store.status"
|
||||
></uni-load-more>
|
||||
<Cn-empty v-else style="top: 20%"></Cn-empty>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import list from '@/common/js/list'
|
||||
import { queryAppHarmonicCounts, queryAppHarmonicLine } from '../../common/api/harmonic.js'
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
@@ -112,11 +174,11 @@ export default {
|
||||
startData: '',
|
||||
endData: '',
|
||||
selected: [
|
||||
{ date: '2026-04-10', info: '' },
|
||||
{ date: '2026-04-11', info: '' },
|
||||
{ date: '2026-04-12', info: '' },
|
||||
// { date: '2026-04-13', info: '' },
|
||||
// { date: '2026-04-10', info: '' },
|
||||
// { date: '2026-04-11', info: '' },
|
||||
// { date: '2026-04-12', info: '' },
|
||||
],
|
||||
|
||||
triggered: true,
|
||||
status: 'noMore', //more加载前 loading加载中 noMore加载后
|
||||
}
|
||||
@@ -144,8 +206,12 @@ export default {
|
||||
// "time": ""
|
||||
// 查詢
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryHarmonicList')
|
||||
this.store.params.pageSize = 10000
|
||||
if (this.filterValue == '越限测点数') {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryAppHarmonicLine')
|
||||
} else {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/csHarmonic/queryHarmonicList')
|
||||
}
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.engineerId = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.devId = this.selectValue.deviceId
|
||||
@@ -153,12 +219,16 @@ export default {
|
||||
this.store.params.time = this.selectValue.date
|
||||
|
||||
this.store.loadedCallback = () => {
|
||||
this.list[0].value = this.store.copyData.harmonicNums
|
||||
this.list[1].value = this.store.copyData.overDays
|
||||
this.list[2].value = this.store.copyData.overLineNums
|
||||
this.loading = false
|
||||
this.startData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
|
||||
this.endData = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
|
||||
// 查询越限日期
|
||||
queryAppHarmonicCounts(this.store.params).then((res) => {
|
||||
this.list[0].value = res.data.harmonicNums
|
||||
this.list[1].value = res.data.overDays
|
||||
this.list[2].value = res.data.overLineNums
|
||||
this.selected = res.data.overDaysList.map((date) => ({ date, info: '' }))
|
||||
})
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
@@ -177,6 +247,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
@@ -211,7 +287,7 @@ export default {
|
||||
|
||||
/* 图标区域(按类型区分背景色) */
|
||||
.event-icon {
|
||||
background-color: #e6a23c20;
|
||||
background-color: #376cf320;
|
||||
}
|
||||
|
||||
.event-tags {
|
||||
@@ -223,13 +299,14 @@ export default {
|
||||
}
|
||||
.textBox {
|
||||
max-height: 110rpx;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
// overflow: hidden;
|
||||
/* 下面是溢出显示省略号关键样式 */
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3; /* 控制最多显示几行,你可以改 2/3/4 */
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
// display: -webkit-box;
|
||||
// -webkit-line-clamp: 3; /* 控制最多显示几行,你可以改 2/3/4 */
|
||||
// -webkit-box-orient: vertical;
|
||||
// text-overflow: ellipsis;
|
||||
// word-break: break-all;
|
||||
}
|
||||
/deep/ .uni-calendar-item--checked {
|
||||
background-color: #ffffff00;
|
||||
@@ -250,15 +327,18 @@ export default {
|
||||
/deep/ .uni-calendar-item__weeks-box-text {
|
||||
z-index: 1;
|
||||
}
|
||||
/deep/ .uni-calendar-item--isDay-text {
|
||||
color: #333 !important; /* 改成你想要的颜色 */
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-circle {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 9px;
|
||||
top: 7px;
|
||||
right: 6px;
|
||||
width: 39px;
|
||||
height: 39px;
|
||||
border-radius: 50%;
|
||||
z-index: 0;
|
||||
background-color: #e43d33;
|
||||
background-color: #f43530;
|
||||
}
|
||||
/* 核心:选中圆圈下的 子元素(日期数字) */
|
||||
/deep/ .uni-calendar-item__weeks-box-circle + .uni-calendar-item__weeks-box-text {
|
||||
@@ -268,7 +348,28 @@ export default {
|
||||
/deep/ .uni-calendar__header-btn-box {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-lunar-text {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .uni-calendar__header {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
.event-detail {
|
||||
/deep/ .uni-calendar__header {
|
||||
display: none !important;
|
||||
}
|
||||
/deep/ .uni-calendar__weeks-day {
|
||||
height: 35px;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-item {
|
||||
height: 40px;
|
||||
}
|
||||
/deep/ .uni-calendar-item__weeks-box-circle {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 8px;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
<view class="statistics pd20">
|
||||
<view
|
||||
class="box"
|
||||
:class="{ boxClick: filterValue == item.key }"
|
||||
v-for="item in list"
|
||||
@click="filterValue = item.key"
|
||||
:class="{ boxClick: filterValue == index }"
|
||||
v-for="(item, index) in dataList"
|
||||
@click="
|
||||
filterValue = index
|
||||
init()
|
||||
"
|
||||
>
|
||||
<!-- <text class="num">{{ item.value }}</text> -->
|
||||
<text class="num">{{
|
||||
store &&
|
||||
store.data &&
|
||||
store.data.filter((k) => (item.key == '' ? item : k.showName == item.key)).length
|
||||
}}</text>
|
||||
<text class="num">{{ item.value }}</text>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -45,6 +44,7 @@
|
||||
<scroll-view
|
||||
scroll-y="true"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
@scrolltolower="scrolltolower"
|
||||
:refresher-triggered="triggered"
|
||||
refresher-enabled="true"
|
||||
class="event-list"
|
||||
@@ -55,9 +55,7 @@
|
||||
<uni-card
|
||||
class="event-item"
|
||||
:class="judgment(item.showName).type"
|
||||
v-for="(item, index) in (store.data || []).filter((k) =>
|
||||
filterValue == '' ? k : k.showName == filterValue,
|
||||
)"
|
||||
v-for="(item, index) in store.data || []"
|
||||
:key="index"
|
||||
@click="jump(item)"
|
||||
>
|
||||
@@ -65,18 +63,19 @@
|
||||
<view class="event-header">
|
||||
<view class="event-icon">
|
||||
<!-- 动态图标:根据类型切换 -->
|
||||
<uni-icons
|
||||
<!-- <uni-icons
|
||||
:custom-prefix="'iconfont'"
|
||||
:type="judgment(item.showName).icon"
|
||||
:color="judgment(item.showName).color"
|
||||
:size="judgment(item.showName).size"
|
||||
></uni-icons>
|
||||
></uni-icons> -->
|
||||
<Cn-icon-transient :name="item.showName" />
|
||||
<!-- 0未读 1已读 -->
|
||||
<view class="badge1" v-if="item.status == 0"> </view>
|
||||
</view>
|
||||
<view class="event-info">
|
||||
<view class="event-title">
|
||||
<text class="event-id">{{ item.equipmentName }}</text>
|
||||
<text class="event-id">{{ item.lineName }}</text>
|
||||
<text class="event-tag" :class="`${judgment(item.showName).type}-tag`">{{
|
||||
item.showName
|
||||
}}</text>
|
||||
@@ -84,7 +83,7 @@
|
||||
<view class="event-desc">
|
||||
<text>工程名称:{{ item.engineeringName }}</text>
|
||||
<text>项目名称:{{ item.projectName }}</text>
|
||||
<text>监测点名称:{{ item.lineName }}</text>
|
||||
<text>设备名称:{{ item.equipmentName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="event-action">
|
||||
@@ -95,9 +94,22 @@
|
||||
<!-- 详情区域 -->
|
||||
<view class="event-detail">
|
||||
<text>
|
||||
发生时间:{{ item.startTime }},幅值:{{ item.evtParamVVaDepth || '-' }}%,持续时间:{{
|
||||
item.evtParamTm || '-'
|
||||
}}s,相别:{{ item.evtParamPhase || '-' }}
|
||||
{{ item.startTime ? '发生时间:' + item.startTime : '' }}
|
||||
{{
|
||||
item.evtParamVVaDepth != null && item.evtParamVVaDepth !== ''
|
||||
? ',幅值:' + item.evtParamVVaDepth + '%'
|
||||
: ''
|
||||
}}
|
||||
{{
|
||||
item.evtParamTm != null && item.evtParamTm !== ''
|
||||
? ',持续时间:' + item.evtParamTm + 's'
|
||||
: ''
|
||||
}}
|
||||
{{
|
||||
item.evtParamPhase != null && item.evtParamPhase !== ''
|
||||
? ',相别:' + item.evtParamPhase
|
||||
: ''
|
||||
}}
|
||||
</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
@@ -111,14 +123,12 @@
|
||||
<ITIC
|
||||
v-if="subsectionList[curSub] == 'ITIC'"
|
||||
:store="store"
|
||||
:filterValue="filterValue"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
></ITIC>
|
||||
<!-- F47 列表 -->
|
||||
<F47
|
||||
v-if="subsectionList[curSub] == 'F47'"
|
||||
:store="store"
|
||||
:filterValue="filterValue"
|
||||
:style="{ height: 'calc(100vh - ' + (navHeight + height) + 'px)', overflow: 'auto' }"
|
||||
></F47>
|
||||
</view>
|
||||
@@ -128,6 +138,7 @@ import list from '@/common/js/list'
|
||||
import { queryUserPushConfig } from '@/common/api/mine'
|
||||
import ITIC from './comp/ITIC.vue'
|
||||
import F47 from './comp/F47.vue'
|
||||
import { queryAppEventCounts } from '../../common/api/harmonic.js'
|
||||
|
||||
export default {
|
||||
components: { ITIC, F47 },
|
||||
@@ -145,8 +156,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: 0,
|
||||
filterValue: '',
|
||||
list: [
|
||||
filterValue: 0,
|
||||
dataList: [
|
||||
{ value: 0, label: '暂态数量', key: '' },
|
||||
{ value: 0, label: '暂降', key: '电压暂降' },
|
||||
{ value: 0, label: '中断', key: '电压中断' },
|
||||
@@ -169,10 +180,10 @@ export default {
|
||||
.boundingClientRect((rect) => {
|
||||
//
|
||||
// #ifdef H5
|
||||
this.height = rect?.height + 12 || 0
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
// #ifdef APP-PLUS
|
||||
this.height = rect?.height + 12 || 0
|
||||
this.height = rect?.height + 10 || 0
|
||||
// #endif
|
||||
})
|
||||
.exec()
|
||||
@@ -183,17 +194,30 @@ export default {
|
||||
init() {
|
||||
this.store = this.DataSource('/cs-harmonic-boot/eventUser/queryEventpage')
|
||||
this.store.params.type = 0
|
||||
this.store.params.pageSize = 10000
|
||||
// this.store.params.pageSize = 10000
|
||||
this.store.params.sortField = this.sort
|
||||
this.store.params.engineeringid = this.selectValue.engineeringId
|
||||
this.store.params.projectId = this.selectValue.projectId
|
||||
this.store.params.deviceId = this.selectValue.deviceId
|
||||
this.store.params.lineId = this.selectValue.lineId
|
||||
this.store.params.target =
|
||||
this.filterValue == 0
|
||||
? []
|
||||
: this.filterValue == 1
|
||||
? ['Evt_Sys_DipStr']
|
||||
: this.filterValue == 2
|
||||
? ['Evt_Sys_IntrStr']
|
||||
: ['Evt_Sys_SwlStr']
|
||||
this.store.params.startTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).firstDay
|
||||
this.store.params.endTime = this.$util.getMonthFirstAndLastDay(this.selectValue.date).lastDay
|
||||
this.store.loadedCallback = () => {
|
||||
this.filterValue = ''
|
||||
this.loading = false
|
||||
queryAppEventCounts(this.store.params).then((res) => {
|
||||
this.dataList[0].value = res.data.allNum
|
||||
this.dataList[1].value = res.data.eventDown
|
||||
this.dataList[2].value = res.data.eventOff
|
||||
this.dataList[3].value = res.data.eventUp
|
||||
})
|
||||
}
|
||||
this.store.reload()
|
||||
},
|
||||
@@ -272,6 +296,12 @@ export default {
|
||||
this.triggered = false
|
||||
}, 500)
|
||||
},
|
||||
// 上拉
|
||||
scrolltolower() {
|
||||
if (this.store.status != 'noMore') {
|
||||
this.store.next && this.store.next()
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.curSub = 0
|
||||
@@ -293,6 +323,7 @@ export default {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './index.scss';
|
||||
|
||||
/deep/ .uni-scroll-view-refresher {
|
||||
display: none;
|
||||
}
|
||||
|
||||
BIN
static/tongji.png
Normal file
BIN
static/tongji.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Reference in New Issue
Block a user