Skip to content

Commit

Permalink
fix(设备列表): 修复设备列表传参deviceid错误
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 16, 2022
1 parent 2231c5d commit 008e177
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/DeviceCloud/manage/js/devicesDetailLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ export default {
this.topicKey = this.$dgiotBus.topicKey(this.router, this.subtopic) // dgiot-mqtt topicKey 唯一标识
// if (this.$route.query.deviceid) {
this.deviceid = this.$route.query.deviceid
localStorage.setItem('parse_objectid', deviceid)
localStorage.setItem('parse_objectid', this.deviceid)
this.subRealtimedata()
this.initChart()
window.addEventListener('resize', this.resizeTheChart)
Expand Down Expand Up @@ -843,7 +843,7 @@ export default {
},
CardDevice() {
this.loading = true
getCardDevice(this.deviceid)
getCardDevice(this.$route.query.deviceid)
.then((response) => {
if (response?.data) {
this.renderCard(response.data)
Expand Down Expand Up @@ -939,15 +939,15 @@ export default {
await this.delVisitedRoute(this.$route.path)
this.activeName = 'first'
this.$router.push({ path: this.$route.path, query })
this.getDeviceInfo(deviceid)
this.getDeviceInfo(query.deviceid)
this.setTreeFlag(false)
this.params.style = this.chartType[0].type
console.log(' this.params.style', this.params.style)
this.subtopic = `$dg/user/realtimecard/${this.$route.query.deviceid}/report` // 设备实时数据topic
this.router = this.$dgiotBus.router(location.href + this.$route.fullPath)
// this.topicKey = this.$dgiotBus.topicKey(this.router, this.subtopic) // dgiot-mqtt topicKey 唯一标识
// if (this.$route.query.deviceid) {
this.deviceid = deviceid
this.deviceid = query.deviceid
this.subRealtimedata()
this.initChart()
window.addEventListener('resize', this.resizeTheChart)
Expand Down

0 comments on commit 008e177

Please sign in to comment.