Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4be32cc7
authored
Dec 25, 2020
by
zhouzy
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
取消横向滚动条,图片自适应
1 parent
83d24569
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
223 additions
and
201 deletions
package-lock.json
src/views/index/index.vue
package-lock.json
View file @
4be32cc
...
@@ -2153,8 +2153,8 @@
...
@@ -2153,8 +2153,8 @@
},
},
"async-validator"
:
{
"async-validator"
:
{
"version"
:
"1.8.5"
,
"version"
:
"1.8.5"
,
"resolved"
:
"https://registry.npm
js.org/async-validator/-/
async-validator-1.8.5.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1605749896979&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2F
async-validator-1.8.5.tgz"
,
"integrity"
:
"sha
512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA=
="
,
"integrity"
:
"sha
1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A
="
,
"requires"
:
{
"requires"
:
{
"babel-runtime"
:
"6.x"
"babel-runtime"
:
"6.x"
}
}
...
@@ -2332,8 +2332,8 @@
...
@@ -2332,8 +2332,8 @@
},
},
"babel-helper-vue-jsx-merge-props"
:
{
"babel-helper-vue-jsx-merge-props"
:
{
"version"
:
"2.0.3"
,
"version"
:
"2.0.3"
,
"resolved"
:
"https://registry.npm
js.org/babel-helper-vue-jsx-merge-props/-
/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/babel-helper-vue-jsx-merge-props/download
/babel-helper-vue-jsx-merge-props-2.0.3.tgz"
,
"integrity"
:
"sha
512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=
="
"integrity"
:
"sha
1-Iq69OzOQIyjlEyk6jkmSs4T58bY
="
},
},
"babel-helpers"
:
{
"babel-helpers"
:
{
"version"
:
"6.24.1"
,
"version"
:
"6.24.1"
,
...
@@ -4916,6 +4916,15 @@
...
@@ -4916,6 +4916,15 @@
"safer-buffer"
:
"^2.1.0"
"safer-buffer"
:
"^2.1.0"
}
}
},
},
"echarts"
:
{
"version"
:
"5.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/echarts/download/echarts-5.0.0.tgz"
,
"integrity"
:
"sha1-ZuwOpH48k7Kq37stcZhpkyrRPOA="
,
"requires"
:
{
"tslib"
:
"1.10.0"
,
"zrender"
:
"5.0.1"
}
},
"editorconfig"
:
{
"editorconfig"
:
{
"version"
:
"0.15.3"
,
"version"
:
"0.15.3"
,
"resolved"
:
"https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz"
,
...
@@ -4971,9 +4980,9 @@
...
@@ -4971,9 +4980,9 @@
"dev"
:
true
"dev"
:
true
},
},
"element-ui"
:
{
"element-ui"
:
{
"version"
:
"2.1
1
.1"
,
"version"
:
"2.1
4
.1"
,
"resolved"
:
"https://registry.npm
js.org/element-ui/-/element-ui-2.11
.1.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/element-ui/download/element-ui-2.14
.1.tgz"
,
"integrity"
:
"sha
512-PACNMHPWqm+/Wc2f/q93pLNzbNyVbpMCXCrYe81czengSWj7IBku7F3zccybkxtWn5qdCmMDBCpG5BzGJL4rKA=
="
,
"integrity"
:
"sha
1-i1dFxzZsHBpgO7bAIShupxh+KqI
="
,
"requires"
:
{
"requires"
:
{
"async-validator"
:
"~1.8.1"
,
"async-validator"
:
"~1.8.1"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
"babel-helper-vue-jsx-merge-props"
:
"^2.0.0"
,
...
@@ -6631,7 +6640,8 @@
...
@@ -6631,7 +6640,8 @@
"ansi-regex"
:
{
"ansi-regex"
:
{
"version"
:
"2.1.1"
,
"version"
:
"2.1.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"aproba"
:
{
"aproba"
:
{
"version"
:
"1.2.0"
,
"version"
:
"1.2.0"
,
...
@@ -6652,12 +6662,14 @@
...
@@ -6652,12 +6662,14 @@
"balanced-match"
:
{
"balanced-match"
:
{
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"brace-expansion"
:
{
"brace-expansion"
:
{
"version"
:
"1.1.11"
,
"version"
:
"1.1.11"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"balanced-match"
:
"^1.0.0"
,
"balanced-match"
:
"^1.0.0"
,
"concat-map"
:
"0.0.1"
"concat-map"
:
"0.0.1"
...
@@ -6672,17 +6684,20 @@
...
@@ -6672,17 +6684,20 @@
"code-point-at"
:
{
"code-point-at"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"concat-map"
:
{
"concat-map"
:
{
"version"
:
"0.0.1"
,
"version"
:
"0.0.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"console-control-strings"
:
{
"console-control-strings"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"core-util-is"
:
{
"core-util-is"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
...
@@ -6799,7 +6814,8 @@
...
@@ -6799,7 +6814,8 @@
"inherits"
:
{
"inherits"
:
{
"version"
:
"2.0.3"
,
"version"
:
"2.0.3"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"ini"
:
{
"ini"
:
{
"version"
:
"1.3.5"
,
"version"
:
"1.3.5"
,
...
@@ -6811,6 +6827,7 @@
...
@@ -6811,6 +6827,7 @@
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"number-is-nan"
:
"^1.0.0"
"number-is-nan"
:
"^1.0.0"
}
}
...
@@ -6825,6 +6842,7 @@
...
@@ -6825,6 +6842,7 @@
"version"
:
"3.0.4"
,
"version"
:
"3.0.4"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"brace-expansion"
:
"^1.1.7"
"brace-expansion"
:
"^1.1.7"
}
}
...
@@ -6832,12 +6850,14 @@
...
@@ -6832,12 +6850,14 @@
"minimist"
:
{
"minimist"
:
{
"version"
:
"0.0.8"
,
"version"
:
"0.0.8"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"minipass"
:
{
"minipass"
:
{
"version"
:
"2.3.5"
,
"version"
:
"2.3.5"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"safe-buffer"
:
"^5.1.2"
,
"safe-buffer"
:
"^5.1.2"
,
"yallist"
:
"^3.0.0"
"yallist"
:
"^3.0.0"
...
@@ -6856,6 +6876,7 @@
...
@@ -6856,6 +6876,7 @@
"version"
:
"0.5.1"
,
"version"
:
"0.5.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"minimist"
:
"0.0.8"
"minimist"
:
"0.0.8"
}
}
...
@@ -6936,7 +6957,8 @@
...
@@ -6936,7 +6957,8 @@
"number-is-nan"
:
{
"number-is-nan"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"object-assign"
:
{
"object-assign"
:
{
"version"
:
"4.1.1"
,
"version"
:
"4.1.1"
,
...
@@ -6948,6 +6970,7 @@
...
@@ -6948,6 +6970,7 @@
"version"
:
"1.4.0"
,
"version"
:
"1.4.0"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"wrappy"
:
"1"
"wrappy"
:
"1"
}
}
...
@@ -7033,7 +7056,8 @@
...
@@ -7033,7 +7056,8 @@
"safe-buffer"
:
{
"safe-buffer"
:
{
"version"
:
"5.1.2"
,
"version"
:
"5.1.2"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"safer-buffer"
:
{
"safer-buffer"
:
{
"version"
:
"2.1.2"
,
"version"
:
"2.1.2"
,
...
@@ -7069,6 +7093,7 @@
...
@@ -7069,6 +7093,7 @@
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"code-point-at"
:
"^1.0.0"
,
"code-point-at"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
"is-fullwidth-code-point"
:
"^1.0.0"
,
...
@@ -7088,6 +7113,7 @@
...
@@ -7088,6 +7113,7 @@
"version"
:
"3.0.1"
,
"version"
:
"3.0.1"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"requires"
:
{
"ansi-regex"
:
"^2.0.0"
"ansi-regex"
:
"^2.0.0"
}
}
...
@@ -7131,12 +7157,14 @@
...
@@ -7131,12 +7157,14 @@
"wrappy"
:
{
"wrappy"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"yallist"
:
{
"yallist"
:
{
"version"
:
"3.0.3"
,
"version"
:
"3.0.3"
,
"bundled"
:
true
,
"bundled"
:
true
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
}
}
}
}
},
},
...
@@ -10671,7 +10699,7 @@
...
@@ -10671,7 +10699,7 @@
},
},
"normalize-wheel"
:
{
"normalize-wheel"
:
{
"version"
:
"1.0.1"
,
"version"
:
"1.0.1"
,
"resolved"
:
"https://registry.npm
js.org/normalize-wheel/-
/normalize-wheel-1.0.1.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/normalize-wheel/download
/normalize-wheel-1.0.1.tgz"
,
"integrity"
:
"sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
"integrity"
:
"sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
},
"npm-run-path"
:
{
"npm-run-path"
:
{
...
@@ -12697,8 +12725,8 @@
...
@@ -12697,8 +12725,8 @@
},
},
"resize-observer-polyfill"
:
{
"resize-observer-polyfill"
:
{
"version"
:
"1.5.1"
,
"version"
:
"1.5.1"
,
"resolved"
:
"https://registry.npm
js.org/resize-observer-polyfill/-
/resize-observer-polyfill-1.5.1.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/resize-observer-polyfill/download
/resize-observer-polyfill-1.5.1.tgz"
,
"integrity"
:
"sha
512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=
="
"integrity"
:
"sha
1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ
="
},
},
"resolve"
:
{
"resolve"
:
{
"version"
:
"1.12.0"
,
"version"
:
"1.12.0"
,
...
@@ -12820,7 +12848,8 @@
...
@@ -12820,7 +12848,8 @@
"version"
:
"4.0.8"
,
"version"
:
"4.0.8"
,
"resolved"
:
"https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz"
,
"resolved"
:
"https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz"
,
"integrity"
:
"sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ="
,
"integrity"
:
"sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ="
,
"dev"
:
true
"dev"
:
true
,
"optional"
:
true
},
},
"rx-lite-aggregates"
:
{
"rx-lite-aggregates"
:
{
"version"
:
"4.0.8"
,
"version"
:
"4.0.8"
,
...
@@ -14437,8 +14466,8 @@
...
@@ -14437,8 +14466,8 @@
},
},
"throttle-debounce"
:
{
"throttle-debounce"
:
{
"version"
:
"1.1.0"
,
"version"
:
"1.1.0"
,
"resolved"
:
"https://registry.npm
js.org/throttle-debounce/-/
throttle-debounce-1.1.0.tgz"
,
"resolved"
:
"https://registry.npm
.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz?cache=0&sync_timestamp=1604313832516&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fthrottle-debounce%2Fdownload%2F
throttle-debounce-1.1.0.tgz"
,
"integrity"
:
"sha
512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=
="
"integrity"
:
"sha
1-UYU9o3vmihVctugns1FKPEIuic0
="
},
},
"through"
:
{
"through"
:
{
"version"
:
"2.3.8"
,
"version"
:
"2.3.8"
,
...
@@ -14632,8 +14661,7 @@
...
@@ -14632,8 +14661,7 @@
"tslib"
:
{
"tslib"
:
{
"version"
:
"1.10.0"
,
"version"
:
"1.10.0"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz"
,
"integrity"
:
"sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
,
"integrity"
:
"sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
"dev"
:
true
},
},
"tty-browserify"
:
{
"tty-browserify"
:
{
"version"
:
"0.0.0"
,
"version"
:
"0.0.0"
,
...
@@ -15952,6 +15980,14 @@
...
@@ -15952,6 +15980,14 @@
"dev"
:
true
"dev"
:
true
}
}
}
}
},
"zrender"
:
{
"version"
:
"5.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org/zrender/download/zrender-5.0.1.tgz?cache=0&sync_timestamp=1605884134992&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fzrender%2Fdownload%2Fzrender-5.0.1.tgz"
,
"integrity"
:
"sha1-zDdxNqnQDQoXfKf2XDKu0pAZKNo="
,
"requires"
:
{
"tslib"
:
"1.10.0"
}
}
}
}
}
}
}
src/views/index/index.vue
View file @
4be32cc
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
</div>
</div>
</el-row>
</el-row>
</div>
-->
</div>
-->
<div
class=
"show-num"
>
<div
class=
"show-num"
>
<div
class=
"num-block"
>
<div
class=
"num-block"
>
<p>
{{
TopNumberData
.
customerCount
||
0
}}
</p>
<p>
{{
TopNumberData
.
customerCount
||
0
}}
</p>
...
@@ -30,276 +31,220 @@
...
@@ -30,276 +31,220 @@
</div>
</div>
</div>
</div>
<el-row
:gutter=
"
5
0"
>
<el-row
:gutter=
"
4
0"
>
<div
class=
"charts"
>
<div
class=
"charts"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple"
>
<div
class=
"grid-content bg-purple"
>
<div
<div
class=
"chart"
id=
"decivceType"
></div>
class=
"chart"
id=
"decivceType"
></div>
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<div
class=
"grid-content bg-purple"
>
<div
class=
"grid-content bg-purple"
>
<div
<div
class=
"chart"
id=
"serviceType"
></div>
class=
"chart"
id=
"serviceType"
></div>
</div>
</div>
</el-col>
</el-col>
</div>
</div>
</el-row>
</el-row>
<p
class=
"Trend"
>
设备接入趋势
</p>
<p
class=
"Trend"
>
设备接入趋势
</p>
<div
<div
id=
"AccessTrend"
style=
"width: 100%; height: 400px"
></div>
id=
"AccessTrend"
style=
"width: 100%; height: 400px"
></div>
<p
class=
"Trend"
>
服务调用趋势
</p>
<p
class=
"Trend"
>
服务调用趋势
</p>
<div
<div
id=
"CallTrend"
style=
"width: 100%; height: 400px"
></div>
id=
"CallTrend"
style=
"width: 100%; height: 400px"
></div>
</d2-container>
</d2-container>
</
template
>
</
template
>
<
script
>
<
script
>
import
_
from
'lodash'
import
_
from
"lodash"
;
import
echarts
from
'echarts'
import
echarts
from
"echarts"
;
import
{
getStatisticData
,
getGraphData
,
getPolylineData
}
from
'@api/api'
import
{
getStatisticData
,
getGraphData
,
getPolylineData
}
from
"@api/api"
;
export
default
{
export
default
{
name
:
'index'
,
name
:
"index"
,
data
()
{
data
()
{
return
{
return
{
// myChart = '',
radio
:
'全部'
,
radio
:
"全部"
,
TopNumberData
:
{},
TopNumberData
:
{},
message
:
''
,
message
:
""
,
// chartData:{
// apiCallGraphData:[{
// num:'',
// apiClassification: ''
// }],
// deviceGraphData:[{
// deviceType: "",
// num: ''
// }],
// },
// 绘图
// 绘图
option
:
{
option
:
{
title
:
{
title
:
{
top
:
'20'
,
top
:
"20"
,
text
:
""
,
subtext
:
""
,
left
:
"20"
,
text
:
''
,
subtext
:
''
,
left
:
'20'
},
},
tooltip
:
{
tooltip
:
{
trigger
:
'item'
,
trigger
:
"item"
,
formatter
:
'{a} <br/>{b} : {c} ({d}%)'
formatter
:
"{a} <br/>{b} : {c} ({d}%)"
,
},
},
legend
:
{
legend
:
{
orient
:
'vertical'
,
orient
:
"vertical"
,
left
:
'right'
,
left
:
"right"
,
data
:
[]
data
:
[]
,
},
},
series
:
[
series
:
[
{
{
name
:
'访问来源'
,
name
:
"访问来源"
,
type
:
'pie'
,
type
:
"pie"
,
radius
:
'55%'
,
radius
:
"55%"
,
center
:
[
'50%'
,
'60%'
],
center
:
[
"50%"
,
"60%"
],
data
:
[],
data
:
[],
emphasis
:
{
emphasis
:
{
itemStyle
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
shadowColor
:
"rgba(0, 0, 0, 0.5)"
,
}
}
,
}
}
,
}
}
,
]
]
,
},
},
Trendoption
:
{
Trendoption
:
{
xAxis
:
{
xAxis
:
{
type
:
'category'
,
type
:
"category"
,
data
:
[]
data
:
[]
,
},
},
yAxis
:
{
yAxis
:
{
type
:
'value'
type
:
"value"
,
},
},
series
:
[
series
:
[
{
{
data
:
[],
data
:
[],
type
:
'line'
type
:
"line"
,
}
},
]
],
}
},
};
// option2 : {
// xAxis: {
// type: 'category',
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
// },
// yAxis: {
// type: 'value'
// },
// series: [{
// data: [820, 932, 901, 934, 1290, 1330, 1320],
// type: 'line'
// }]
// }
// totalOptions: {
// title: [{
// text: '标题',
// x: '49.5%',
// y: '8%',
// textAlign: 'center'
// }],
// tooltip: {},
// series: [{
// name: '在网情况',
// type: 'pie',
// radius: ['35%', '55%'],
// label: {
// normal: {
// fontSize: 16,
// formatter: '{b}: {c}'
// }
// },
// data: [{
// name: '在网',
// value: 0,
// itemStyle: {
// color: '#00b639'
// }
// }, {
// name: '离网',
// value: 0,
// itemStyle: {
// color: '#999999'
// }
// }]
// }],
// },
}
},
},
mounted
()
{
mounted
()
{
// 初始化各表实例
// 初始化各表实例
this
.
$echarts
=
echarts
this
.
$echarts
=
echarts
;
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'decivceType'
))
this
.
totalECharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"decivceType"
));
this
.
totalEChart2
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'serviceType'
))
this
.
totalEChart2
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"serviceType"
));
this
.
trendCharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'AccessTrend'
))
this
.
trendCharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"AccessTrend"
));
this
.
apiCallCharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
'CallTrend'
))
this
.
apiCallCharts
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"CallTrend"
));
// this.getPie()
// this.getPie()
// 获取顶部数据
// 获取顶部数据
getStatisticData
({}).
then
((
res
)
=>
{
getStatisticData
({}).
then
((
res
)
=>
{
this
.
TopNumberData
=
res
this
.
TopNumberData
=
res
;
// console.log( this.TopNumberData)
// console.log( this.TopNumberData)
this
.
TopNumberData
.
customerCount
=
this
.
formatNumber
(
res
.
customerCount
)
this
.
TopNumberData
.
customerCount
=
this
.
formatNumber
(
res
.
customerCount
)
;
this
.
TopNumberData
.
deviceCount
=
this
.
formatNumber
(
res
.
deviceCount
)
this
.
TopNumberData
.
deviceCount
=
this
.
formatNumber
(
res
.
deviceCount
)
;
this
.
TopNumberData
.
userCount
=
this
.
formatNumber
(
res
.
userCount
)
this
.
TopNumberData
.
userCount
=
this
.
formatNumber
(
res
.
userCount
)
;
this
.
TopNumberData
.
apiCallCount
=
this
.
formatNumber
(
res
.
apiCallCount
)
this
.
TopNumberData
.
apiCallCount
=
this
.
formatNumber
(
res
.
apiCallCount
)
;
})
})
;
// 获取饼状图数据
// 获取饼状图数据
getGraphData
({}).
then
((
res
)
=>
{
getGraphData
({}).
then
((
res
)
=>
{
this
.
chartData
=
res
this
.
chartData
=
res
;
// console.log(res)
// console.log(res)
// 修改特定的数值,注意数组和对象的区别
// 修改特定的数值,注意数组和对象的区别
// 左图
// 左图
var
option1
=
_
.
cloneDeep
(
this
.
option
)
var
option1
=
_
.
cloneDeep
(
this
.
option
)
;
option1
.
legend
.
padding
=
[
50
,
50
,
50
,
0
]
option1
.
legend
.
padding
=
[
50
,
50
,
50
,
0
]
;
option1
.
title
.
text
=
'设备接入类型分布'
option1
.
title
.
text
=
"设备接入类型分布"
;
option1
.
legend
.
data
=
res
.
deviceGraphData
.
map
((
item
)
=>
item
.
deviceType
)
option1
.
legend
.
data
=
res
.
deviceGraphData
.
map
((
item
)
=>
item
.
deviceType
)
;
option1
.
series
[
0
].
data
=
res
.
deviceGraphData
.
map
((
item
)
=>
{
option1
.
series
[
0
].
data
=
res
.
deviceGraphData
.
map
((
item
)
=>
{
return
{
return
{
value
:
item
.
num
,
value
:
item
.
num
,
name
:
item
.
deviceType
name
:
item
.
deviceType
,
}
};
})
});
//无数据显示
// if( option1.legend.data =="" || option1.series[0].data=="" ){
// option1.title.text = "暂无数据"
// option1.legend.data = ['none']
// option1.series[0].data = ['暂无数据']
// console.log( option1.title.text)
// }
// 右图
// 右图
var
option2
=
_
.
cloneDeep
(
this
.
option
)
var
option2
=
_
.
cloneDeep
(
this
.
option
)
;
option2
.
title
.
text
=
'调用服务类型分布'
option2
.
title
.
text
=
"调用服务类型分布"
;
// option2.legend.data=res.apiCallGraphData.map(item => item.apiClassification)
// option2.legend.data=res.apiCallGraphData.map(item => item.apiClassification)
var
formatData
=
res
.
apiCallGraphData
.
map
((
item
)
=>
{
var
formatData
=
res
.
apiCallGraphData
.
map
((
item
)
=>
{
return
{
return
{
1
:
'授权管理'
,
1
:
"授权管理"
,
2
:
'设备管理'
,
2
:
"设备管理"
,
3
:
'数据服务'
3
:
"数据服务"
,
}[
item
.
apiClassification
]
}[
item
.
apiClassification
]
;
})
})
;
// formatData == '1' ? formatData = '授权管理' : (formatData== '2' ? formatData= '设备管理' : formatData = '数据服务')
// formatData == '1' ? formatData = '授权管理' : (formatData== '2' ? formatData= '设备管理' : formatData = '数据服务')
// console.log(formatData)
// console.log(formatData)
option2
.
legend
.
data
=
formatData
option2
.
legend
.
data
=
formatData
;
option2
.
legend
.
padding
=
[
50
,
50
,
50
,
0
]
option2
.
legend
.
padding
=
[
50
,
50
,
50
,
0
]
;
option2
.
series
[
0
].
data
=
res
.
apiCallGraphData
.
map
((
item
)
=>
{
option2
.
series
[
0
].
data
=
res
.
apiCallGraphData
.
map
((
item
)
=>
{
return
{
return
{
value
:
item
.
num
,
value
:
item
.
num
,
name
:
{
name
:
{
1
:
'授权管理'
,
1
:
"授权管理"
,
2
:
'设备管理'
,
2
:
"设备管理"
,
3
:
'数据服务'
3
:
"数据服务"
,
}[
item
.
apiClassification
]
}[
item
.
apiClassification
]
,
}
}
;
})
})
;
// console.log(option2.series[0].data)
// console.log(option2.series[0].data)
// 渲染
// 渲染
this
.
totalEChart2
.
setOption
(
option2
)
this
.
totalECharts
.
setOption
(
option1
)
})
this
.
totalEChart2
.
setOption
(
option2
);
window
.
onresize
=
this
.
totalEChart2
.
resize
;
this
.
totalECharts
.
setOption
(
option1
);
window
.
onresize
=
this
.
totalECharts
.
resize
;
});
// 折线图数据获取
// 折线图数据获取
getPolylineData
({}).
then
((
res
)
=>
{
getPolylineData
({}).
then
((
res
)
=>
{
var
trendData
=
res
var
trendData
=
res
;
console
.
log
(
trendData
)
console
.
log
(
trendData
)
;
// 接入设备折线图
// 接入设备折线图
var
option3
=
_
.
cloneDeep
(
this
.
Trendoption
)
var
option3
=
_
.
cloneDeep
(
this
.
Trendoption
)
;
option3
.
grid
=
{
option3
.
grid
=
{
x
:
30
,
x
:
30
,
y
:
50
,
y
:
50
,
x2
:
10
,
x2
:
10
,
y2
:
50
y2
:
50
,
}
}
;
option3
.
xAxis
.
data
=
res
.
deviceAccessTrendList
.
map
(
item
=>
item
.
activatTime
)
option3
.
xAxis
.
data
=
res
.
deviceAccessTrendList
.
map
(
(
item
)
=>
item
.
activatTime
);
option3
.
series
[
0
].
data
=
res
.
deviceAccessTrendList
.
map
(
item
=>
item
.
num
)
option3
.
series
[
0
].
data
=
res
.
deviceAccessTrendList
.
map
(
(
item
)
=>
item
.
num
);
// console.log(option3)
// console.log(option3)
// 服务调用趋势
// 服务调用趋势
var
option4
=
_
.
cloneDeep
(
this
.
Trendoption
)
var
option4
=
_
.
cloneDeep
(
this
.
Trendoption
)
;
option4
.
xAxis
.
data
=
res
.
apiCallTrendList
.
map
(
item
=>
item
.
createTime
)
option4
.
xAxis
.
data
=
res
.
apiCallTrendList
.
map
(
(
item
)
=>
item
.
createTime
);
option4
.
series
[
0
].
data
=
res
.
apiCallTrendList
.
map
(
item
=>
item
.
num
)
option4
.
series
[
0
].
data
=
res
.
apiCallTrendList
.
map
(
(
item
)
=>
item
.
num
);
option4
.
grid
=
{
option4
.
grid
=
{
x
:
30
,
x
:
30
,
y
:
50
,
y
:
50
,
x2
:
10
,
x2
:
10
,
y2
:
50
y2
:
50
,
}
};
this
.
trendCharts
.
setOption
(
option3
);
this
.
trendCharts
.
setOption
(
option3
)
this
.
apiCallCharts
.
setOption
(
option4
);
this
.
apiCallCharts
.
setOption
(
option4
)
});
})
// 渲染
// 渲染
...
@@ -335,20 +280,55 @@ export default {
...
@@ -335,20 +280,55 @@ export default {
// 每隔三位加一个逗号
// 每隔三位加一个逗号
formatNumber
(
n
)
{
formatNumber
(
n
)
{
var
b
=
parseInt
(
n
).
toString
()
var
b
=
parseInt
(
n
).
toString
()
;
var
len
=
b
.
length
var
len
=
b
.
length
;
if
(
len
<=
3
)
{
if
(
len
<=
3
)
{
return
b
return
b
;
}
}
var
r
=
len
%
3
var
r
=
len
%
3
;
return
r
>
0
return
r
>
0
?
b
.
slice
(
0
,
r
)
+
','
+
b
.
slice
(
r
,
len
).
match
(
/
\d{3}
/g
).
join
(
','
)
?
b
.
slice
(
0
,
r
)
+
","
+
b
.
slice
(
r
,
len
).
match
(
/
\d{3}
/g
).
join
(
","
)
:
b
.
slice
(
r
,
len
).
match
(
/
\d{3}
/g
).
join
(
','
)
:
b
.
slice
(
r
,
len
).
match
(
/
\d{3}
/g
).
join
(
","
);
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
>
<
style
>
/* html {
overflow-y: scroll;
}
:root {
overflow-y: auto;
overflow-x: hidden;
}
:root body {
position: absolute;
}
body {
width: 100vw;
overflow: hidden;
} */
.indexPage
{
overflow-y
:
scroll
;
}
:root
{
overflow-y
:
auto
;
overflow-x
:
hidden
;
}
:root
body
.indexPage
{
position
:
absolute
;
}
body
.indexPage
{
width
:
100vw
;
overflow
:
hidden
;
}
.show-num
{
.show-num
{
display
:
flex
;
display
:
flex
;
}
}
...
@@ -385,6 +365,8 @@ export default {
...
@@ -385,6 +365,8 @@ export default {
.grid-content
{
.grid-content
{
border-radius
:
4px
;
border-radius
:
4px
;
min-height
:
36px
;
min-height
:
36px
;
min-width
:
100px
;
}
}
.row-bg
{
.row-bg
{
padding
:
10px
0
;
padding
:
10px
0
;
...
@@ -400,10 +382,14 @@ export default {
...
@@ -400,10 +382,14 @@ export default {
}
}
.charts
{
.charts
{
display
:
flex
;
display
:
flex
;
}
}
.chart
{
.chart
{
border
:
1px
solid
#999999
;
border
:
1px
solid
#999999
;
width
:
100%
;
width
:
100%
;
height
:
400px
;
height
:
400px
;
min-width
:
100px
;
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment