Skip to content

Commit

Permalink
fix(components): 设备列表
Browse files Browse the repository at this point in the history
standard

BREAKING CHANGE:
修复设备列表订阅不正确
  • Loading branch information
h7ml committed Jun 22, 2022
1 parent 7c0e8bc commit f9778d0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.EN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)


### Bug Fixes

* **other:** 修復设备列表订阅 ([27115ef](https://github.com/dgiot/dgiot-dashboard/commit/27115ef44de12c4986a98002173d385eb5593b54))


### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)


### Bug Fixes

* **other:** 修復设备列表订阅 ([27115ef](https://github.com/dgiot/dgiot-dashboard/commit/27115ef44de12c4986a98002173d385eb5593b54))


### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)


### Bug Fixes

* **other:** 修復设备列表订阅 ([27115ef](https://github.com/dgiot/dgiot-dashboard/commit/27115ef44de12c4986a98002173d385eb5593b54))


### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
Expand Down
6 changes: 3 additions & 3 deletions src/views/DeviceCloud/manage/devicelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1089,8 +1089,8 @@
async subAllDevice() {
let _this = this
// await _this.$subscribe('$dg/user/devicestate/#')
_this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('devicestate', (Msg) => {
// _this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('$dg/user/devicestate', (Msg) => {
const parseString = JSON.parse(Msg.payloadString)
console.log('收到消息', parseString)
if (parseString) {
Expand All @@ -1100,7 +1100,7 @@
if (t.objectId == j) {
const mergeInfo = _.merge(t, parseString[j])
console.log(`更新设备${t.name}`, mergeInfo, parseString[j])
_this.upkey = moment(new Date()).valueOf() + ''
// _this.upkey = moment(new Date()).valueOf() + ''
}
})
})
Expand Down
6 changes: 3 additions & 3 deletions src/views/DeviceCloud/manage/home_index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1220,8 +1220,8 @@
async subAllDevice() {
let _this = this
// await _this.$subscribe('$dg/user/devicestate/#')
_this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('devicestate', (Msg) => {
// _this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('$dg/user/devicestate', (Msg) => {
const parseString = JSON.parse(Msg.payloadString)
console.log('收到消息', parseString)
if (parseString) {
Expand All @@ -1231,7 +1231,7 @@
if (t.objectId == j) {
const mergeInfo = _.merge(t, parseString[j])
console.log(`更新设备${t.name}`, mergeInfo, parseString[j])
_this.upkey = moment(new Date()).valueOf() + ''
// _this.upkey = moment(new Date()).valueOf() + ''
}
})
})
Expand Down

0 comments on commit f9778d0

Please sign in to comment.