提交代码

This commit is contained in:
guanj
2026-04-24 09:13:17 +08:00
parent 747d3139cf
commit ce78b65875
32 changed files with 2470 additions and 1142 deletions

View File

@@ -35,12 +35,12 @@
</picker>
<picker
@change="runStatusChange"
@cancel="select.runStatusSelect = false"
:value="select.runStatusIndex"
:range="projectType"
range-key="text"
>
<view class="nav-menu" @click="select.runStatusSelect = true">
<view class="nav-menu" >
{{
select.runStatusName
? select.runStatusName.length > 12

View File

@@ -142,7 +142,7 @@ export default {
data() {
return {
loading: true,
deviceInfo: {},
// 使用上面定义的图表配置项
option: {},
@@ -199,9 +199,9 @@ export default {
}
},
onLoad(options) {
this.device= JSON.parse(options.device)
this.device = JSON.parse(options.device)
this.lineKey = 0
this.lineList = this.device.lineList
this.lineList = this.device.lineList
this.lineId = this.lineList[0].lineId
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
this.echartsData0 = this.initEcharts0()
@@ -660,9 +660,8 @@ export default {
.then((res) => {
if (res.code == 'A0000') {
this.connection = true
setTimeout(() => {
this.$util.toast(e == 0 ? '连接成功!' : '刷新成功!')
}, 3000)
this.$util.toast(e == 0 ? '连接成功!' : '刷新成功!')
if (this.timer) {
clearInterval(this.timer)
this.timer = null
@@ -738,12 +737,13 @@ export default {
})
.on('message', (topic, message) => {
// console.log('接收推送信息:', JSON.parse(message.toString()), topic)
// console.log('🚀 ~ .on ~ topic:', topic)
if (!this.connection) return
// console.log('🚀 ~ .on ~ topic:', topic, this.userInfo.userIndex)
if (topic === `/Web/RealData/${this.userInfo.userIndex}`) {
if (topic == `/Web/RealData/${this.lineId}`) {
let list = JSON.parse(message.toString())
if (list.lineId == this.lineId) {
// if (list.userId == this.userInfo.userIndex) {
// console.log(list)
this.realTime = list.dataTime
let pt = list.pt || 0
@@ -859,7 +859,7 @@ export default {
// this.echartA1.setOption(this.echartsDataA1, true)
// this.echartA2.setOption(this.echartsDataA2, true)
// this.echartA3.setOption(this.echartsDataA3, true)
}
// }
}
})
},
@@ -967,7 +967,13 @@ export default {
} else if (e.text === '反馈') {
uni.navigateTo({ url: '/pages/device/feedback' })
} else if (e.text === '用户') {
uni.navigateTo({ url: '/pages/device/user?id=' + this.device.equipmentId + '&isPrimaryUser=' + this.device.isPrimaryUser })
uni.navigateTo({
url:
'/pages/device/user?id=' +
this.device.equipmentId +
'&isPrimaryUser=' +
this.device.isPrimaryUser,
})
}
// this.$refs.fab.close()
},