提交代码
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user