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
40454629
Commit
40454629
authored
Jul 08, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页统计图
parent
f5cf5a55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
2 deletions
+112
-2
common-lib/src/main/java/com/mortals/xhx/feign/area/IAreaFeign.java
.../src/main/java/com/mortals/xhx/feign/area/IAreaFeign.java
+1
-1
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
.../src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
+1
-1
device-manager-ui/admin/src/views/Home.vue
device-manager-ui/admin/src/views/Home.vue
+110
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/feign/area/IAreaFeign.java
View file @
40454629
...
...
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
* @author zxfei
* @date 2022-06-28
*/
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallback
=
AreaFeignFallbackFactory
.
class
)
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallback
Factory
=
AreaFeignFallbackFactory
.
class
)
public
interface
IAreaFeign
extends
IFeign
{
...
...
common-lib/src/main/java/com/mortals/xhx/feign/user/IUserFeign.java
View file @
40454629
...
...
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*;
* @author zxfei
* @date 2022-07-06
*/
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallback
=
UserFeignFallbackFactory
.
class
)
@FeignClient
(
name
=
"base-manager"
,
path
=
"/base"
,
fallback
Factory
=
UserFeignFallbackFactory
.
class
)
public
interface
IUserFeign
extends
IFeign
{
...
...
device-manager-ui/admin/src/views/Home.vue
View file @
40454629
...
...
@@ -211,6 +211,8 @@ export default {
this
.
findDeviceTotalStat
(
beforeday
);
this
.
findDeviceStat
(
beforeday
);
this
.
findDeviceAlarm
(
beforeday
);
},
methods
:
{
findDeviceTotalStat
(
beforeday
)
{
...
...
@@ -272,6 +274,33 @@ export default {
});
},
findDeviceAlarm
(
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
.
beforeDeviceAlarmday
=
this
.
statArrayData
.
map
((
i
)
=>
{
let
daystr
=
i
.
month
+
"
-
"
+
i
.
day
;
return
daystr
;
});
this
.
deviceAlarmyData
=
this
.
statArrayData
.
map
((
i
)
=>
{
return
i
.
alarmTotalCount
;
});
this
.
$nextTick
(()
=>
{
this
.
deviceAlarmEcharts
();
});
}
this
.
loading
=
false
;
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
},
formatterDate
(
time
)
{
let
date
=
new
Date
(
Number
(
time
));
let
Y
=
date
.
getFullYear
()
+
"
-
"
;
...
...
@@ -472,6 +501,84 @@ export default {
deviceStatChart
.
setOption
(
deviceStatOption
);
},
deviceAlarmEcharts
()
{
var
chart
=
this
.
$echarts
.
init
(
document
.
getElementById
(
"
deviceAlarm
"
)
);
let
option
=
{
title
:
{
text
:
"
设备告警趋势
"
,
},
tooltip
:
{
trigger
:
"
axis
"
,
axisPointer
:
{
type
:
"
cross
"
,
label
:
{
backgroundColor
:
"
#6a7985
"
,
},
},
},
legend
:
{
data
:
[
"
告警次数
"
],
},
toolbox
:
{
feature
:
{
saveAsImage
:
{},
},
},
grid
:
{
left
:
"
3%
"
,
right
:
"
4%
"
,
bottom
:
"
3%
"
,
containLabel
:
true
,
},
xAxis
:
[
{
type
:
"
category
"
,
boundaryGap
:
false
,
data
:
this
.
beforeDeviceAlarmday
,
},
],
yAxis
:
[
{
type
:
"
value
"
,
},
],
series
:
[
{
name
:
"
告警次数
"
,
type
:
"
line
"
,
stack
:
"
Total
"
,
smooth
:
true
,
lineStyle
:
{
width
:
0
,
},
showSymbol
:
false
,
areaStyle
:
{
opacity
:
0.8
,
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'
rgb(55, 162, 255)
'
},
{
offset
:
1
,
color
:
'
rgb(116, 21, 219)
'
}
]),
},
emphasis
:
{
focus
:
"
series
"
,
},
data
:
this
.
deviceAlarmyData
,
}
],
};
chart
.
setOption
(
option
);
},
},
data
()
{
return
{
...
...
@@ -483,10 +590,13 @@ export default {
pendList
:
[],
beforeday
:
[],
beforeDeviceStatday
:
[],
beforeAlarmday
:
[],
deviceTotalyData
:
[],
deviceOnlineyData
:
[],
deviceStatOnlineyData
:
[],
deviceStatOfflineyData
:
[],
deviceAlarmyData
:
[],
weekPerDay
:
{
xData
:
[],
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