diff --git a/CHANGELOG.EN.md b/CHANGELOG.EN.md index 2d3b3b1158..5d92fe35f1 100644 --- a/CHANGELOG.EN.md +++ b/CHANGELOG.EN.md @@ -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)) diff --git a/CHANGELOG.ZH.md b/CHANGELOG.ZH.md index 2d3b3b1158..5d92fe35f1 100644 --- a/CHANGELOG.ZH.md +++ b/CHANGELOG.ZH.md @@ -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)) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3b3b1158..5d92fe35f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) diff --git a/src/views/DeviceCloud/manage/devicelist.vue b/src/views/DeviceCloud/manage/devicelist.vue index e3a3da31fb..444c67e710 100644 --- a/src/views/DeviceCloud/manage/devicelist.vue +++ b/src/views/DeviceCloud/manage/devicelist.vue @@ -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) { @@ -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() + '' } }) }) diff --git a/src/views/DeviceCloud/manage/home_index.vue b/src/views/DeviceCloud/manage/home_index.vue index e45c03ce8e..dd656b292d 100644 --- a/src/views/DeviceCloud/manage/home_index.vue +++ b/src/views/DeviceCloud/manage/home_index.vue @@ -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) { @@ -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() + '' } }) })