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 e6f2c93d
authored
Feb 16, 2023
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request
!42
2 parents
10e08f65
297ff334
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
9 deletions
src/views/home/index.vue
src/views/home/index.vue
View file @
e6f2c93
...
@@ -136,7 +136,7 @@
...
@@ -136,7 +136,7 @@
</div>
</div>
<i
class=
"el-icon-question"
></i>
<i
class=
"el-icon-question"
></i>
</el-tooltip>
</el-tooltip>
<div
class=
"title"
style=
"margin-top: 10px;"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
staticInfo
.
offlineNumber
-
staticInfo
.
fakeOfflineNumber
:
staticInfo
.
offlineNumber
}}
</div>
<div
class=
"title"
style=
"margin-top: 10px;"
v-show=
"staticInfo.offlineNumber != undefined"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
staticInfo
.
offlineNumber
-
staticInfo
.
fakeOfflineNumber
:
staticInfo
.
offlineNumber
}}
</div>
</div>
</div>
<div
id=
"offlineChart"
class=
"c_canvass"
></div>
<div
id=
"offlineChart"
class=
"c_canvass"
></div>
</div>
</div>
...
@@ -145,11 +145,12 @@
...
@@ -145,11 +145,12 @@
<div
class=
"footer"
>
<div
class=
"footer"
>
<div
class=
"footer-box"
>
<div
class=
"footer-box"
>
<span
style=
"color: #0196FA;"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
'设备总在线率:'
:
'设备在线率:'
}}
</span>
<span
style=
"color: #0196FA;"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
'设备总在线率:'
:
'设备在线率:'
}}
</span>
<span
style=
"color: #0196FA;"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
addSub
(
staticInfo
.
onlineRate
,
staticInfo
.
fakeOfflineRate
)
:
staticInfo
.
onlineRate
}}
%
</span>
<span
style=
"color: #0196FA;"
v-show=
"staticInfo.onlineRate != undefined"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
addSub
(
staticInfo
.
onlineRate
,
staticInfo
.
fakeOfflineRate
)
:
staticInfo
.
onlineRate
}}
%
</span>
</div>
</div>
<div
class=
"footer-box"
v-show=
"hasPermission('data_doard_offLine')"
></div>
<div
class=
"footer-box"
v-show=
"hasPermission('data_doard_offLine')"
></div>
<div
class=
"footer-box"
>
<div
class=
"footer-box"
>
<span
style=
"color: #F47F13;"
>
设备离线率:
{{
hasPermission
(
'data_doard_offLine'
)
?
accSub
(
staticInfo
.
offlineRate
,
staticInfo
.
fakeOfflineRate
)
:
staticInfo
.
offlineRate
}}
%
</span>
<span
style=
"color: #F47F13;"
>
设备离线率:
</span>
<span
style=
"color: #F47F13;"
v-show=
"staticInfo.offlineRate != undefined"
>
{{
hasPermission
(
'data_doard_offLine'
)
?
accSub
(
staticInfo
.
offlineRate
,
staticInfo
.
fakeOfflineRate
)
:
staticInfo
.
offlineRate
}}
%
</span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -303,8 +304,11 @@ export default {
...
@@ -303,8 +304,11 @@ export default {
let
m
=
[];
let
m
=
[];
m
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
onlineRate
),
name
:
""
});
m
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
onlineRate
),
name
:
""
});
m
.
push
({
value
:
obj
.
onlineRate
,
name
:
""
});
m
.
push
({
value
:
obj
.
onlineRate
,
name
:
""
});
if
(
obj
.
onlineRate
==
0
||
obj
.
onlineRate
==
100
)
{
this
.
createBindChart
(
"onlineChart"
,
m
);
this
.
unCreateBindChart
(
"onlineChart"
,
m
);
}
else
{
this
.
createBindChart
(
"onlineChart"
,
m
);
}
// 离线率
// 离线率
let
n
=
[];
let
n
=
[];
...
@@ -317,7 +321,11 @@ export default {
...
@@ -317,7 +321,11 @@ export default {
n
.
push
({
value
:
this
.
accSub
(
obj
.
offlineRate
,
obj
.
fakeOfflineRate
),
name
:
""
});
n
.
push
({
value
:
this
.
accSub
(
obj
.
offlineRate
,
obj
.
fakeOfflineRate
),
name
:
""
});
n
.
push
({
value
:
this
.
addSub
(
b
,
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
||
obj
.
offlineRate
==
0
||
obj
.
offlineRate
==
100
)
{
this
.
unCreateChart
(
"offlineChart"
,
n
);
}
else
{
this
.
createChart
(
"offlineChart"
,
n
);
}
// 假性离线率
// 假性离线率
let
x
=
[]
let
x
=
[]
...
@@ -325,7 +333,11 @@ export default {
...
@@ -325,7 +333,11 @@ export default {
x
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
fakeOfflineRate
),
name
:
""
});
x
.
push
({
value
:
this
.
accSub
(
100
,
obj
.
fakeOfflineRate
),
name
:
""
});
x
.
push
({
value
:
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
this
.
maskFlag
=
false
});
});
},
},
...
@@ -402,7 +414,7 @@ export default {
...
@@ -402,7 +414,7 @@ export default {
});
});
},
},
// 创建环形图表
// 创建
含有最小比例
环形图表
createBindChart
(
id
,
data
)
{
createBindChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
aChart
.
setOption
({
...
@@ -435,7 +447,39 @@ export default {
...
@@ -435,7 +447,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
)
{
createChart
(
id
,
data
)
{
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
var
aChart
=
echarts
.
init
(
document
.
getElementById
(
id
));
aChart
.
setOption
({
aChart
.
setOption
({
...
@@ -468,6 +512,38 @@ export default {
...
@@ -468,6 +512,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
)
{
linkToPage
(
path
,
start
,
end
)
{
let
row
=
{
alarmStatus
:
1
};
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