Skip to content

Commit

Permalink
feat(alarm): query list
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed May 9, 2022
1 parent c1672ae commit 52100ea
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* **map:** fix the problem that Baidu map on the home page is not displayed ([371d4b2](https://github.com/dgiot/dgiot-dashboard/commit/371d4b2a76777b68acc827cbde089ac9f9549f2d))
* parse_objectid ([6e8eaad](https://github.com/dgiot/dgiot-dashboard/commit/6e8eaadd697f06fcd5c2e860f312df708a1da225))
* **pnpm-version:** pnpm-version ([a53d94f](https://github.com/dgiot/dgiot-dashboard/commit/a53d94f6f6581a6180ba81739c4c052818e17f67))
* **product:** fix incorrect device registration field ([c1672ae](https://github.com/dgiot/dgiot-dashboard/commit/c1672ae63a7ff922f16ca0a5fa0aa1cb521e0514))
* productid ([8babbfa](https://github.com/dgiot/dgiot-dashboard/commit/8babbfaf14680af974f179edff2d6d6a65dc68ec))
* **query:** optimize query requests ([9c21da3](https://github.com/dgiot/dgiot-dashboard/commit/9c21da30c760c9f9126722b9ae0e460d8157152a))
* rename ([7597b5a](https://github.com/dgiot/dgiot-dashboard/commit/7597b5a1b8ba7bef62acf48a9d6d7501097ade02))
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* **map:** fix the problem that Baidu map on the home page is not displayed ([371d4b2](https://github.com/dgiot/dgiot-dashboard/commit/371d4b2a76777b68acc827cbde089ac9f9549f2d))
* parse_objectid ([6e8eaad](https://github.com/dgiot/dgiot-dashboard/commit/6e8eaadd697f06fcd5c2e860f312df708a1da225))
* **pnpm-version:** pnpm-version ([a53d94f](https://github.com/dgiot/dgiot-dashboard/commit/a53d94f6f6581a6180ba81739c4c052818e17f67))
* **product:** fix incorrect device registration field ([c1672ae](https://github.com/dgiot/dgiot-dashboard/commit/c1672ae63a7ff922f16ca0a5fa0aa1cb521e0514))
* productid ([8babbfa](https://github.com/dgiot/dgiot-dashboard/commit/8babbfaf14680af974f179edff2d6d6a65dc68ec))
* **query:** optimize query requests ([9c21da3](https://github.com/dgiot/dgiot-dashboard/commit/9c21da30c760c9f9126722b9ae0e460d8157152a))
* rename ([7597b5a](https://github.com/dgiot/dgiot-dashboard/commit/7597b5a1b8ba7bef62acf48a9d6d7501097ade02))
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* **map:** fix the problem that Baidu map on the home page is not displayed ([371d4b2](https://github.com/dgiot/dgiot-dashboard/commit/371d4b2a76777b68acc827cbde089ac9f9549f2d))
* parse_objectid ([6e8eaad](https://github.com/dgiot/dgiot-dashboard/commit/6e8eaadd697f06fcd5c2e860f312df708a1da225))
* **pnpm-version:** pnpm-version ([a53d94f](https://github.com/dgiot/dgiot-dashboard/commit/a53d94f6f6581a6180ba81739c4c052818e17f67))
* **product:** fix incorrect device registration field ([c1672ae](https://github.com/dgiot/dgiot-dashboard/commit/c1672ae63a7ff922f16ca0a5fa0aa1cb521e0514))
* productid ([8babbfa](https://github.com/dgiot/dgiot-dashboard/commit/8babbfaf14680af974f179edff2d6d6a65dc68ec))
* **query:** optimize query requests ([9c21da3](https://github.com/dgiot/dgiot-dashboard/commit/9c21da30c760c9f9126722b9ae0e460d8157152a))
* rename ([7597b5a](https://github.com/dgiot/dgiot-dashboard/commit/7597b5a1b8ba7bef62acf48a9d6d7501097ade02))
Expand Down
2 changes: 1 addition & 1 deletion src/api/Notification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

export async function queryNotification(params) {
return request({
url: `notification`,
url: `classes/Notification`,
method: 'get',
params: params,
})
Expand Down
28 changes: 19 additions & 9 deletions src/views/CloudOT/maintenance/alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
limit: 10,
skip: 0,
order: '-createdAt',
keys: 'count(*)',
keys: 'objectId',
},
}
},
Expand Down Expand Up @@ -584,18 +584,28 @@
limit: args.limit,
order: args.order,
skip: args.skip,
keys: args.keys,
productid: this.queryForm.productName
? this.queryForm.productName
: 'all',
isprocess: this.queryForm.isprocess,
count: args.keys,
// productid: this.queryForm.productName
// ? this.queryForm.productName
// : 'all',
// isprocess: this.queryForm.isprocess,
include: '',
where: {
objectId: this.queryForm.number.length
? { $regex: this.queryForm.number }
: { $ne: null },
// content: {
// _productid: { $ne: 'dgiot' },
// },
},
}
this.queryForm.isprocess
? (this.queryPayload.where['process'] = {
$regex: this.queryForm.isprocess,
})
: ''
// this.queryForm.productName
// ? (this.queryPayload.where.content['_productid'] = {
// $regex: this.queryForm.productName,
// })
// : 'all'
if (this.queryForm.searchDate.length) {
this.queryPayload.where['createdAt'] = {
$gt: {
Expand Down
6 changes: 5 additions & 1 deletion src/views/DeviceCloud/manage/js/devicesDetailLite.js
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,11 @@ export default {
// 删除key为上级设备地址值
delete objRoute[routeKey]
const params = {
parentId: null,
parentId: {
__type: 'Pointer',
className: 'Device',
objectId: 0,
},
route: objRoute,
}
this.$putDevice(row.objectId, params).then((response) => {
Expand Down
6 changes: 5 additions & 1 deletion src/views/DeviceCloud/manage/js/editdevices.js
Original file line number Diff line number Diff line change
Expand Up @@ -1121,7 +1121,11 @@ export default {
// 删除key为上级设备地址值
delete objRoute[routeKey]
const params = {
parentId: null,
parentId: {
__type: 'Pointer',
className: 'Device',
objectId: 0,
},
route: objRoute,
}
this.$putDevice(row.objectId, params).then((response) => {
Expand Down

0 comments on commit 52100ea

Please sign in to comment.