Skip to content

Commit

Permalink
feat(components): 云压测
Browse files Browse the repository at this point in the history
修复压测界面全屏问题
  • Loading branch information
h7ml committed Jun 23, 2022
1 parent d510b62 commit 532b3a4
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-23)


### Bug Fixes
Expand All @@ -12,6 +12,7 @@
### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))


Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-23)


### Bug Fixes
Expand All @@ -12,6 +12,7 @@
### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))


Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-22)
## [4.5.4](https://github.com/dgiot/dgiot-dashboard/compare/v4.5.5...v4.5.4) (2022-06-23)


### Bug Fixes
Expand All @@ -12,6 +12,7 @@
### Features

* **components:** 设备管理 ([0a9756c](https://github.com/dgiot/dgiot-dashboard/commit/0a9756cadaa45a0796f345fa064c1f1f239af7ee))
* **projects:** 云压测 ([97a7f62](https://github.com/dgiot/dgiot-dashboard/commit/97a7f62e0b32949dc2bc4d1297a30befa76fe583))
* **projects:** scripts ([d4566d9](https://github.com/dgiot/dgiot-dashboard/commit/d4566d90c7ca08ef84107f2a7ff3b8b8cf0da6e8))


Expand Down
19 changes: 16 additions & 3 deletions src/views/DeviceCloud/manage/devicelist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1091,20 +1091,33 @@
// await _this.$subscribe('$dg/user/devicestate/#')
// _this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('$dg/user/devicestate', (Msg) => {
let args = {}
const parseString = JSON.parse(Msg.payloadString)
console.log('收到消息', parseString)
if (parseString) {
const topicsKeys = Object.keys(parseString)
console.groupCollapsed(
`%c收到devicestate消息 ${topicsKeys}`,
'color:#009a61; font-size: 28px; font-weight: 300'
)
args.key = topicsKeys
console.log(parseString)
args.parseString = parseString
_this.list.forEach((t) => {
topicsKeys.forEach((j) => {
if (t.objectId == j) {
const mergeInfo = _.merge(t, parseString[j])
console.log(`更新设备${t.name}`, mergeInfo, parseString[j])
// _this.upkey = moment(new Date()).valueOf() + ''
console.log(`更新设备${t.name}`)
args.name = t.name
console.log(mergeInfo, parseString[j])
args.Info = parseString[j]
args.mergeInfo = mergeInfo
_this.upkey = moment(new Date()).valueOf() + ''
}
})
})
}
console.info(args)
console.groupEnd()
})
},
},
Expand Down
19 changes: 16 additions & 3 deletions src/views/DeviceCloud/manage/home_index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1222,20 +1222,33 @@
// await _this.$subscribe('$dg/user/devicestate/#')
// _this.$dgiotBus.$off('devicestate')
_this.$dgiotBus.$on('$dg/user/devicestate', (Msg) => {
let args = {}
const parseString = JSON.parse(Msg.payloadString)
console.log('收到消息', parseString)
if (parseString) {
const topicsKeys = Object.keys(parseString)
console.groupCollapsed(
`%c收到devicestate消息 ${topicsKeys}`,
'color:#009a61; font-size: 28px; font-weight: 300'
)
args.key = topicsKeys[0]
console.log(parseString)
args.parseString = parseString
_this.list.forEach((t) => {
topicsKeys.forEach((j) => {
if (t.objectId == j) {
const mergeInfo = _.merge(t, parseString[j])
console.log(`更新设备${t.name}`, mergeInfo, parseString[j])
// _this.upkey = moment(new Date()).valueOf() + ''
console.log(`更新设备${t.name}`)
args.name = t.name
console.log(mergeInfo, parseString[j])
args.Info = parseString[j]
args.mergeInfo = mergeInfo
_this.upkey = moment(new Date()).valueOf() + ''
}
})
})
}
console.info(args)
console.groupEnd()
})
},
},
Expand Down

0 comments on commit 532b3a4

Please sign in to comment.