Skip to content

Commit

Permalink
feat: dashboard json
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed May 6, 2022
1 parent 8babbfa commit 5476603
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 111 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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))
* 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))
* **request:** optimize query requests ([f682c5d](https://github.com/dgiot/dgiot-dashboard/commit/f682c5dc89e1fe43534658f9125fa320f7911ec5))
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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))
* 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))
* **request:** optimize query requests ([f682c5d](https://github.com/dgiot/dgiot-dashboard/commit/f682c5dc89e1fe43534658f9125fa320f7911ec5))
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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))
* 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))
* **request:** optimize query requests ([f682c5d](https://github.com/dgiot/dgiot-dashboard/commit/f682c5dc89e1fe43534658f9125fa320f7911ec5))
Expand Down
97 changes: 0 additions & 97 deletions src/api/Mock/dashboard/index.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/dgiot/plugins/lajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ class Lajax {
if (this.readyState === XMLHttpRequest.DONE) {
// 这里将发送接口请求的日志打印到控制台和添加到队列分开执行
if (console && console.group && that.stylize) {
console.group(
'%cajax请求',
`color: ${Lajax.colorEnum.ajaxGroup};`
)
// console.group(
// '%cajax请求',
// `color: ${Lajax.colorEnum.ajaxGroup};`
// )
}
that._printConsole(
startTime,
Expand Down
14 changes: 9 additions & 5 deletions src/views/DeviceCloud/manage/platform_overview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@
import { Startdashboard } from '@/api/System/index'
import { isBase64 } from '@/utils'
import info from '@/components/Device/info'
import queryParams from '@/api/Mock/dashboard'
import { getDlinkJson } from '@/api/Dlink'
import {
BaiduMap,
BmCityList,
Expand Down Expand Up @@ -688,6 +688,7 @@
}
return {
queryParams: {},
mapHeight: '800px',
mapWidth: '800px',
polyline: {
Expand Down Expand Up @@ -857,11 +858,14 @@
limit: true,
},
},
created() {},
async created() {
const { dashboard = {} } = await getDlinkJson('Dashboard')
this.queryParams = dashboard
},
mounted() {
this.initMapHeight()
setTimeout(() => {
queryParams.forEach((e) => {
this.queryParams.forEach((e) => {
let key = e.vuekey
this.loadingConfig[`${key}`] = false
})
Expand Down Expand Up @@ -1190,7 +1194,7 @@
async queryData() {
// https://lbsyun.baidu.com/cms/jsapi/class/jsapi_reference.html#a3b22
setTimeout(() => {
queryParams.forEach((e) => {
this.queryParams.forEach((e) => {
let key = e.vuekey
this.loadingConfig[`${key}`] = true
})
Expand All @@ -1204,7 +1208,7 @@
qos: 0,
ttl: 1000 * 60 * 60 * 3,
})
await Startdashboard(queryParams, Startdashboardid)
await Startdashboard(this.queryParams, Startdashboardid)
// 本地mqtt 存在问题,在请求4秒后手动关闭所有loading
this.$nextTick(() => {
if (this.mapType == 'tencent') {
Expand Down
16 changes: 11 additions & 5 deletions src/views/Home/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@
import { Startdashboard } from '@/api/System/index'
import { isBase64 } from '@/utils'
import info from '@/components/Device/info'
import queryParams from '@/api/Mock/dashboard'
// import queryParams from '@/api/Mock/dashboard'
import {
BaiduMap,
BmCityList,
Expand All @@ -650,6 +650,8 @@
BmPointCollection,
} from 'vue-baidu-map'
import { secret } from '@/config/secret.config'
// import queryParams from '@/api/Mock/dashboard'
import { getDlinkJson } from '@/api/Dlink'
window.dgiot.dgiotEnv = process.env
export default {
Expand Down Expand Up @@ -688,6 +690,7 @@
}
return {
queryParams: {},
mapHeight: '800px',
mapWidth: '800px',
polyline: {
Expand Down Expand Up @@ -857,11 +860,14 @@
limit: true,
},
},
created() {},
async created() {
const { dashboard = {} } = await getDlinkJson('Dashboard')
this.queryParams = dashboard
},
mounted() {
this.initMapHeight()
setTimeout(() => {
queryParams.forEach((e) => {
this.queryParams.forEach((e) => {
let key = e.vuekey
this.loadingConfig[`${key}`] = false
})
Expand Down Expand Up @@ -1190,7 +1196,7 @@
async queryData() {
// https://lbsyun.baidu.com/cms/jsapi/class/jsapi_reference.html#a3b22
setTimeout(() => {
queryParams.forEach((e) => {
this.queryParams.forEach((e) => {
let key = e.vuekey
this.loadingConfig[`${key}`] = true
})
Expand All @@ -1204,7 +1210,7 @@
qos: 0,
ttl: 1000 * 60 * 60 * 3,
})
await Startdashboard(queryParams, Startdashboardid)
await Startdashboard(this.queryParams, Startdashboardid)
// 本地mqtt 存在问题,在请求4秒后手动关闭所有loading
this.$nextTick(() => {
if (this.mapType == 'tencent') {
Expand Down

0 comments on commit 5476603

Please sign in to comment.