Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
2a76bdb1
Commit
2a76bdb1
authored
Jul 08, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页统计图
parent
40454629
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
+86
-0
device-manager-ui/admin/src/views/Home.vue
device-manager-ui/admin/src/views/Home.vue
+86
-0
No files found.
device-manager-ui/admin/src/views/Home.vue
View file @
2a76bdb1
...
@@ -213,6 +213,8 @@ export default {
...
@@ -213,6 +213,8 @@ export default {
this
.
findDeviceStat
(
beforeday
);
this
.
findDeviceStat
(
beforeday
);
this
.
findDeviceAlarm
(
beforeday
);
this
.
findDeviceAlarm
(
beforeday
);
this
.
findDevicePush
(
beforeday
);
},
},
methods
:
{
methods
:
{
findDeviceTotalStat
(
beforeday
)
{
findDeviceTotalStat
(
beforeday
)
{
...
@@ -301,6 +303,33 @@ export default {
...
@@ -301,6 +303,33 @@ export default {
});
});
},
},
findDevicePush
(
beforeday
)
{
let
query
=
{
createTimeStart
:
this
.
formatterDate
(
beforeday
)
};
this
.
$post
(
"
/device/stat/list
"
,
query
)
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
this
.
statArrayData
=
res
.
data
.
data
;
this
.
beforeDevicePushday
=
this
.
statArrayData
.
map
((
i
)
=>
{
let
daystr
=
i
.
month
+
"
-
"
+
i
.
day
;
return
daystr
;
});
this
.
devicePushyData
=
this
.
statArrayData
.
map
((
i
)
=>
{
return
i
.
pushTotalCount
;
});
this
.
$nextTick
(()
=>
{
this
.
devicePushEcharts
();
});
}
this
.
loading
=
false
;
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
formatterDate
(
time
)
{
formatterDate
(
time
)
{
let
date
=
new
Date
(
Number
(
time
));
let
date
=
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
"
-
"
;
let
Y
=
date
.
getFullYear
()
+
"
-
"
;
...
@@ -343,6 +372,15 @@ export default {
...
@@ -343,6 +372,15 @@ export default {
subtext
:
""
,
subtext
:
""
,
x
:
"
center
"
,
x
:
"
center
"
,
},
},
tooltip
:
{
trigger
:
"
axis
"
,
axisPointer
:
{
type
:
"
cross
"
,
label
:
{
backgroundColor
:
"
#6a7985
"
,
},
},
},
legend
:
{
legend
:
{
orient
:
"
horizontal
"
,
orient
:
"
horizontal
"
,
...
@@ -576,7 +614,53 @@ export default {
...
@@ -576,7 +614,53 @@ export default {
}
}
],
],
};
};
chart
.
setOption
(
option
);
},
devicePushEcharts
()
{
var
chart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"
devicePush
"
)
);
let
option
=
{
title
:
{
text
:
"
设备消息推送趋势
"
,
},
tooltip
:
{
trigger
:
"
axis
"
,
axisPointer
:
{
type
:
"
cross
"
,
label
:
{
backgroundColor
:
"
#6a7985
"
,
},
},
},
legend
:
{
data
:
[
"
告警次数
"
],
},
xAxis
:
[
{
type
:
"
category
"
,
data
:
this
.
beforeDevicePushday
,
},
],
yAxis
:
[
{
type
:
"
value
"
,
},
],
series
:
[
{
name
:
"
告警次数
"
,
type
:
"
line
"
,
smooth
:
true
,
data
:
this
.
devicePushyData
,
}
],
};
chart
.
setOption
(
option
);
chart
.
setOption
(
option
);
},
},
},
},
...
@@ -590,6 +674,7 @@ export default {
...
@@ -590,6 +674,7 @@ export default {
pendList
:
[],
pendList
:
[],
beforeday
:
[],
beforeday
:
[],
beforeDeviceStatday
:
[],
beforeDeviceStatday
:
[],
beforePushday
:
[],
beforeAlarmday
:
[],
beforeAlarmday
:
[],
deviceTotalyData
:
[],
deviceTotalyData
:
[],
...
@@ -597,6 +682,7 @@ export default {
...
@@ -597,6 +682,7 @@ export default {
deviceStatOnlineyData
:
[],
deviceStatOnlineyData
:
[],
deviceStatOfflineyData
:
[],
deviceStatOfflineyData
:
[],
deviceAlarmyData
:
[],
deviceAlarmyData
:
[],
devicePushyData
:
[],
weekPerDay
:
{
weekPerDay
:
{
xData
:
[],
xData
:
[],
yData
:
[],
yData
:
[],
...
...
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