Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
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 006fb88a
authored
Dec 26, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复v1.14.0显示bug
1 parent
10e08f65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
6 deletions
src/views/home/index.vue
src/views/home/index.vue
View file @
006fb88
...
...
@@ -303,8 +303,11 @@ export default {
let
m
=
[];
m
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
onlineRate
),
name
:
""
});
m
.
push
({
value
:
obj
.
onlineRate
,
name
:
""
});
this
.
createBindChart
(
"onlineChart"
,
m
);
if
(
obj
.
onlineRate
==
0
||
obj
.
onlineRate
==
100
)
{
this
.
unCreateBindChart
(
"onlineChart"
,
m
);
}
else
{
this
.
createBindChart
(
"onlineChart"
,
m
);
}
// 离线率
let
n
=
[];
...
...
@@ -317,7 +320,11 @@ export default {
n
.
push
({
value
:
this
.
accSub
(
obj
.
offlineRate
,
obj
.
fakeOfflineRate
),
name
:
""
});
n
.
push
({
value
:
this
.
addSub
(
b
,
obj
.
fakeOfflineRate
),
name
:
""
});
}
this
.
createChart
(
"offlineChart"
,
n
);
if
(
this
.
accSub
(
obj
.
offlineRate
,
obj
.
fakeOfflineRate
)
==
0
||
this
.
accSub
(
obj
.
offlineRate
,
obj
.
fakeOfflineRate
)
==
100
)
{
this
.
unCreateChart
(
"offlineChart"
,
n
);
}
else
{
this
.
createChart
(
"offlineChart"
,
n
);
}
// 假性离线率
let
x
=
[]
...
...
@@ -325,7 +332,11 @@ export default {
x
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
fakeOfflineRate
),
name
:
""
});
x
.
push
({
value
:
obj
.
fakeOfflineRate
,
name
:
""
});
}
this
.
createBindChart
(
"fakeOfflineChart"
,
x
);
if
(
obj
.
fakeOfflineRate
==
0
||
obj
.
fakeOfflineRate
==
100
)
{
this
.
unCreateBindChart
(
"fakeOfflineChart"
,
x
);
}
else
{
this
.
createBindChart
(
"fakeOfflineChart"
,
x
);
}
this
.
maskFlag
=
false
});
},
...
...
@@ -402,7 +413,7 @@ export default {
});
},
// 创建环形图表
// 创建
含有最小比例
环形图表
createBindChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
...
...
@@ -435,7 +446,39 @@ export default {
],
});
},
// 离线率环形图表
// 创建没有最小比例环形图表
unCreateBindChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
tooltip
:
{
show
:
true
,
formatter
:
"{c0}%"
,
},
legendHoverLink
:
false
,
color
:
[
"#c0c0c0"
,
"#0096fa"
,
"#fac858"
,
"#ee6666"
,
"#73c0de"
,
"#3ba272"
,
"#fc8452"
,
"#9a60b4"
,
"#ea7ccc"
,
],
series
:
[
{
type
:
"pie"
,
radius
:
[
"40%"
,
"70%"
],
labelLine
:
{
show
:
false
,
},
data
:
data
},
],
});
},
// 含有最小比例离线率环形图表
createChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
...
...
@@ -468,6 +511,38 @@ export default {
],
});
},
// 没有最小比例离线率环形图表
unCreateChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
tooltip
:
{
show
:
true
,
formatter
:
"{c0}%"
,
},
legendHoverLink
:
false
,
color
:
[
"#F6B06F"
,
"#c0c0c0"
,
"#fac858"
,
"#ee6666"
,
"#73c0de"
,
"#3ba272"
,
"#fc8452"
,
"#9a60b4"
,
"#ea7ccc"
,
],
series
:
[
{
type
:
"pie"
,
radius
:
[
"40%"
,
"70%"
],
labelLine
:
{
show
:
false
,
},
data
:
data
},
],
});
},
// 页面跳转
linkToPage
(
path
,
start
,
end
)
{
let
row
=
{
alarmStatus
:
1
};
...
...
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