diff --git a/.continue/prompts/new-prompt.md b/.continue/prompts/new-prompt.md
new file mode 100644
index 0000000..9fd5bf2
--- /dev/null
+++ b/.continue/prompts/new-prompt.md
@@ -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
\ No newline at end of file
diff --git a/.continue/rules/new-rule.md b/.continue/rules/new-rule.md
new file mode 100644
index 0000000..4b20739
--- /dev/null
+++ b/.continue/rules/new-rule.md
@@ -0,0 +1,5 @@
+---
+description: A description of your rule
+---
+
+请用中文回答!
\ No newline at end of file
diff --git a/App.vue b/App.vue
index 487d808..7537159 100644
--- a/App.vue
+++ b/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({
diff --git a/common/api/harmonic.js b/common/api/harmonic.js
index 8f25680..f620b72 100644
--- a/common/api/harmonic.js
+++ b/common/api/harmonic.js
@@ -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',
+ },
+ })
}
\ No newline at end of file
diff --git a/common/css/base.scss b/common/css/base.scss
index 0752fdb..5a3bc3d 100644
--- a/common/css/base.scss
+++ b/common/css/base.scss
@@ -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;
}
diff --git a/components/Cn-device-card/Cn-device-card.vue b/components/Cn-device-card/Cn-device-card.vue
index 2af202d..ac77081 100644
--- a/components/Cn-device-card/Cn-device-card.vue
+++ b/components/Cn-device-card/Cn-device-card.vue
@@ -5,6 +5,7 @@
:extra="device.isPrimaryUser == 1 ? '主设备' : '分享设备'"
padding="0"
@click="jump(device)"
+ class="boxClick"
:thumbnail="deviceIcon(device.runStatus)"
>
@@ -12,12 +13,9 @@
- 电流有效值(A)
+ 电流有效值(A)
@@ -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%);
}
diff --git a/pages/index/comp/apply.vue b/pages/index/comp/apply.vue
index 18592ae..47e50c8 100644
--- a/pages/index/comp/apply.vue
+++ b/pages/index/comp/apply.vue
@@ -3,29 +3,33 @@
-
-
- 全选
-
+
- 共 {{ store.total }} 条事件 | 已选择 {{ checkedTotal }} 条事件
-
+
+
+ 全选
+
+ 已选择 {{ checkedTotal }} 条事件
+
+
+
@@ -41,16 +45,17 @@
@@ -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;
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 65f1f29..496cbbc 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -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;
}
diff --git a/pages/index/message1.vue b/pages/index/message1.vue
index 8c68c05..8b3da7b 100644
--- a/pages/index/message1.vue
+++ b/pages/index/message1.vue
@@ -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) {
diff --git a/pages/index/mine.vue b/pages/index/mine.vue
index 880851c..8e5fea2 100644
--- a/pages/index/mine.vue
+++ b/pages/index/mine.vue
@@ -83,7 +83,7 @@
-
+
暂态统计配置
diff --git a/pages/message1/alarm.vue b/pages/message1/alarm.vue
index ebea6c4..c144a34 100644
--- a/pages/message1/alarm.vue
+++ b/pages/message1/alarm.vue
@@ -6,6 +6,7 @@
-
+ color="#376cf3"
+ > -->
+
- {{ item.date }}发生告警终端{{ item.warnNums }}台
+ {{ item.date }}
+
+
+ 告警终端:{{ item.warnNums }}台
+ 通讯中断:{{ item.interruptCounts }}次
+ 终端告警:{{ item.warnCounts}}次
+
-
+
- 🔍
+ 🔍
+
- 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()
- },
- },
+
},
}
diff --git a/pages/message1/comp/ITIC.vue b/pages/message1/comp/ITIC.vue
index 34cff78..845b1a5 100644
--- a/pages/message1/comp/ITIC.vue
+++ b/pages/message1/comp/ITIC.vue
@@ -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()
- },
- },
+
},
}
diff --git a/pages/message1/comp/alarmDetails.vue b/pages/message1/comp/alarmDetails.vue
index 73d51cd..6f05c64 100644
--- a/pages/message1/comp/alarmDetails.vue
+++ b/pages/message1/comp/alarmDetails.vue
@@ -6,102 +6,68 @@
{{ detail.date }}
- 终端告警列表
+ 终端告警列表
+
-
+
@@ -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;
+}
diff --git a/pages/message1/comp/steadyStateDetails.vue b/pages/message1/comp/steadyStateDetails.vue
index a0e6869..249aa57 100644
--- a/pages/message1/comp/steadyStateDetails.vue
+++ b/pages/message1/comp/steadyStateDetails.vue
@@ -7,18 +7,18 @@
基础信息
- 监测点名称:{{ detail.lineName }}
- 设备名称:{{ detail.devName }}
- 项目名称:{{ detail.projectName }}
工程名称:{{ detail.engineeringName }}
+ 项目名称:{{ detail.projectName }}
+ 设备名称:{{ detail.devName }}
+ 监测点名称:{{ detail.lineName }}
越限详情:
- {{ detail.overLimitDesc }}{{ detail.overLimitDesc }}
指标越限详情(仅显示较为严重的10次)指标越限详情(仅显示最严重的10组数据)
@@ -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;
+}
diff --git a/pages/message1/comp/transientDetails.vue b/pages/message1/comp/transientDetails.vue
index ea12d16..9d972c4 100644
--- a/pages/message1/comp/transientDetails.vue
+++ b/pages/message1/comp/transientDetails.vue
@@ -7,13 +7,14 @@
基础信息
- 设备名称:{{ detail.equipmentName }}
- 项目名称:{{ detail.projectName }}
工程名称:{{ detail.engineeringName }}
+ 项目名称:{{ detail.projectName }}
+ 设备名称:{{ detail.equipmentName }}
+ 监测点名称:{{ detail.lineName }}
暂态类型:{{ detail.showName }}
- 持续时间:{{ detail.evtParamTm || '-' }}%
- 幅值:{{ detail.evtParamVVaDepth || '-' }}s
- 相别:{{ detail.evtParamPhase || '-' }}
+ 持续时间:{{ detail.evtParamTm }}s
+ 幅值:{{ detail.evtParamVVaDepth }}%
+ 相别:{{ detail.evtParamPhase }}
diff --git a/pages/message1/index.scss b/pages/message1/index.scss
index 82771d8..be0bef2 100644
--- a/pages/message1/index.scss
+++ b/pages/message1/index.scss
@@ -58,8 +58,8 @@
/* 图标区域(按类型区分背景色) */
.event-icon {
position: relative;
- width: 120rpx;
- height: 120rpx;
+ width: 110rpx;
+ height: 110rpx;
border-radius: 12rpx;
display: flex;
justify-content: center;
diff --git a/pages/message1/run.vue b/pages/message1/run.vue
index 0645242..f072555 100644
--- a/pages/message1/run.vue
+++ b/pages/message1/run.vue
@@ -6,6 +6,7 @@