Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张苑
bi
Commits
03e4086c
Commit
03e4086c
authored
Sep 30, 2021
by
莫坚培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改柱状图取错字段的问题
parent
f9eb9296
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
dashboard.js
js/dashboard.js
+2
-7
tokenSetting.js
js/tokenSetting.js
+8
-2
No files found.
js/dashboard.js
View file @
03e4086c
...
@@ -1055,7 +1055,6 @@ function loopRenderBarchart(poolData, resData, resCode) {
...
@@ -1055,7 +1055,6 @@ function loopRenderBarchart(poolData, resData, resCode) {
}
}
let
resValue
=
JSON
.
parse
(
resData
[
key
])
let
resValue
=
JSON
.
parse
(
resData
[
key
])
if
(
!
resValue
)
{
if
(
!
resValue
)
{
return
return
}
}
...
@@ -1092,7 +1091,6 @@ function loopRenderBarchart(poolData, resData, resCode) {
...
@@ -1092,7 +1091,6 @@ function loopRenderBarchart(poolData, resData, resCode) {
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
requestLoopVaribleCache
[
cacheKey
]
=
dataList
requestLoopVaribleCache
[
cacheKey
]
=
dataList
}
else
{
}
else
{
console
.
log
(
'柱状图缓存'
,
requestLoopVaribleCache
[
cacheKey
])
dataList
=
requestLoopVaribleCache
[
cacheKey
]
dataList
=
requestLoopVaribleCache
[
cacheKey
]
}
}
...
@@ -1109,13 +1107,13 @@ function loopRenderBarchart(poolData, resData, resCode) {
...
@@ -1109,13 +1107,13 @@ function loopRenderBarchart(poolData, resData, resCode) {
})
})
if
(
poolData
.
option
.
AxisChartYAxis
.
yAxisData
)
{
if
(
poolData
.
option
.
AxisChartYAxis
.
yAxisData
)
{
chartOption
.
yAxis
[
0
].
data
=
res
Data
.
x
?
resData
.
x
:
poolData
.
option
.
BarChartData
.
option
.
AxisChartYAxis
.
yAxisData
chartOption
.
yAxis
[
0
].
data
=
res
Value
.
x
?
resValue
.
x
:
poolData
.
option
.
BarChartData
.
option
.
AxisChartYAxis
.
yAxisData
let
list
=
chartOption
.
yAxis
[
0
].
data
[
0
]
let
list
=
chartOption
.
yAxis
[
0
].
data
[
0
]
if
(
left
<=
getTextWidth
(
list
,
16
))
{
if
(
left
<=
getTextWidth
(
list
,
16
))
{
left
=
getTextWidth
(
list
,
16
)
left
=
getTextWidth
(
list
,
16
)
}
}
}
else
{
}
else
{
chartOption
.
xAxis
[
0
].
data
=
res
Data
.
x
?
resData
.
x
:
poolData
.
option
.
XData
chartOption
.
xAxis
[
0
].
data
=
res
Value
.
x
?
resValue
.
x
:
poolData
.
option
.
XData
}
}
chartOption
.
series
=
[]
chartOption
.
series
=
[]
...
@@ -1193,7 +1191,6 @@ function loopRenderLinechart(poolData, resData, resCode) {
...
@@ -1193,7 +1191,6 @@ function loopRenderLinechart(poolData, resData, resCode) {
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
requestLoopVaribleCache
[
cacheKey
]
=
dataList
requestLoopVaribleCache
[
cacheKey
]
=
dataList
}
else
{
}
else
{
console
.
log
(
'折线图缓存'
,
requestLoopVaribleCache
[
cacheKey
])
dataList
=
requestLoopVaribleCache
[
cacheKey
]
dataList
=
requestLoopVaribleCache
[
cacheKey
]
}
}
...
@@ -1284,7 +1281,6 @@ function loopRenderDashboardchart(poolData, resData, resCode) {
...
@@ -1284,7 +1281,6 @@ function loopRenderDashboardchart(poolData, resData, resCode) {
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
requestLoopVaribleCache
[
cacheKey
]
=
value
requestLoopVaribleCache
[
cacheKey
]
=
value
}
else
{
}
else
{
console
.
log
(
'仪表盘缓存'
,
requestLoopVaribleCache
[
cacheKey
])
value
=
requestLoopVaribleCache
[
cacheKey
]
value
=
requestLoopVaribleCache
[
cacheKey
]
}
}
...
@@ -1352,7 +1348,6 @@ function loopRenderPiechart(poolData, resData, resCode) {
...
@@ -1352,7 +1348,6 @@ function loopRenderPiechart(poolData, resData, resCode) {
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
if
(
requestLoopVaribleCache
[
cacheKey
]
===
undefined
)
{
requestLoopVaribleCache
[
cacheKey
]
=
value
requestLoopVaribleCache
[
cacheKey
]
=
value
}
else
{
}
else
{
console
.
log
(
'饼图缓存'
,
requestLoopVaribleCache
[
cacheKey
])
value
=
requestLoopVaribleCache
[
cacheKey
]
value
=
requestLoopVaribleCache
[
cacheKey
]
}
}
...
...
js/tokenSetting.js
View file @
03e4086c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* @description: 文件描述
* @description: 文件描述
* @Date: 2021-09-16 18:33:55
* @Date: 2021-09-16 18:33:55
* @LastEditors: 莫靓仔
* @LastEditors: 莫靓仔
* @LastEditTime: 2021-09-
29 09:56:55
* @LastEditTime: 2021-09-
30 17:26:44
*/
*/
let
setObj
=
{
let
setObj
=
{
// 厂家大佬
// 厂家大佬
...
@@ -29,10 +29,16 @@ let setObj = {
...
@@ -29,10 +29,16 @@ let setObj = {
devToken
:
'd59bfc52-4f36-4284-b02b-9ab0a3b7f3e2'
,
devToken
:
'd59bfc52-4f36-4284-b02b-9ab0a3b7f3e2'
,
devAppId
:
'CESHI0000001_d09i'
,
devAppId
:
'CESHI0000001_d09i'
,
devTenantId
:
'CESHI0000001_d09i'
devTenantId
:
'CESHI0000001_d09i'
},
// lgz
set5
:
{
devToken
:
'ec154c77-3edd-4224-9375-7b1b306d49d0'
,
devAppId
:
'LGZ_f9bk'
,
devTenantId
:
'LGZ_f9bk'
}
}
}
}
let
defaultObj
=
'set
4
'
let
defaultObj
=
'set
5
'
window
.
devToken
=
setObj
[
defaultObj
].
devToken
window
.
devToken
=
setObj
[
defaultObj
].
devToken
window
.
devAppId
=
setObj
[
defaultObj
].
devAppId
window
.
devAppId
=
setObj
[
defaultObj
].
devAppId
window
.
devTenantId
=
setObj
[
defaultObj
].
devTenantId
window
.
devTenantId
=
setObj
[
defaultObj
].
devTenantId
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment