Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
ETL-admin
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
莫晓莉
ETL-admin
Commits
38c85308
Commit
38c85308
authored
Jan 21, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页折线图和统计
parent
d609bd33
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
34 deletions
+135
-34
src/api/Statistics.js
+63
-4
src/views/dashboard/LineChart.vue
+33
-26
src/views/home.vue
+0
-0
src/views/watch/homework.vue
+19
-3
src/views/watch/transform.vue
+20
-1
No files found.
src/api/Statistics.js
View file @
38c85308
...
...
@@ -16,7 +16,7 @@ export function getCardData(data) {
data
,
method
:
'GET'
})
}
}
//获取每天收入数据
export
function
getIncomeData
(
data
)
{
...
...
@@ -25,7 +25,7 @@ export function getIncomeData(data) {
data
,
method
:
'GET'
})
}
}
//获取每天注册数据
export
function
getRegData
(
data
)
{
...
...
@@ -34,7 +34,7 @@ export function getRegData(data) {
data
,
method
:
'GET'
})
}
}
//获取总数统计
export
function
getTotalStats
(
data
)
{
...
...
@@ -43,4 +43,63 @@ export function getTotalStats(data) {
data
,
method
:
'GET'
})
}
}
// ----------------------------------------------
//被监控中的总数
export
function
allRuningMonitor
(
data
)
{
return
request
({
url
:
'kettle/index/allRuningMonitor'
,
data
,
method
:
'post'
})
}
//获取所有的监控作业数
export
function
getAllMonitorJob
(
data
)
{
return
request
({
url
:
'kettle/jobMonitor/getAllMonitorJob'
,
data
,
method
:
'post'
})
}
//获取所有的监控转换数
export
function
getAllMonitorTrans
(
data
)
{
return
request
({
url
:
'kettle/transMonitor/getAllMonitorTrans'
,
data
,
method
:
'post'
})
}
//获取7天内作业和转换的折线图
export
function
getKettleLine
(
data
)
{
return
request
({
url
:
'kettle/index/getKettleLine'
,
data
,
method
:
'post'
})
}
//获取作业监控的Top5
export
function
getTop5JobList
(
data
)
{
return
request
({
url
:
'kettle/index/getTop5JobList'
,
data
,
method
:
'post'
})
}
//获取转换监控的Top5
export
function
getTop5TransList
(
data
)
{
return
request
({
url
:
'kettle/index/getTop5TransList'
,
data
,
method
:
'post'
})
}
// ----------------------------------------------
src/views/dashboard/LineChart.vue
View file @
38c85308
...
...
@@ -64,8 +64,15 @@ export default {
},
setOptions
(
data
)
{
this
.
chart
.
setOption
({
title
:{
text
:
'7天内作业和转换的监控情况'
,
textStyle
:
{
fontWeight
:
'bolder'
,
color
:
'#333333'
//标题颜色
},
},
xAxis
:
{
data
:
data
.
time
,
data
:
data
.
legend
,
boundaryGap
:
false
,
axisTick
:
{
show
:
false
...
...
@@ -75,7 +82,7 @@ export default {
left
:
10
,
right
:
10
,
bottom
:
20
,
top
:
3
0
,
top
:
10
0
,
containLabel
:
true
},
tooltip
:
{
...
...
@@ -91,10 +98,10 @@ export default {
}
},
legend
:
{
data
:
[
'expected'
]
data
:
[
data
.
job
.
name
,
data
.
trans
.
name
]
},
series
:
[{
itemStyle
:
{
name
:
data
.
job
.
name
,
itemStyle
:
{
normal
:
{
color
:
'#FF005A'
,
lineStyle
:
{
...
...
@@ -105,31 +112,31 @@ export default {
},
smooth
:
true
,
type
:
'line'
,
data
:
data
.
expectedD
ata
,
data
:
data
.
job
.
d
ata
,
animationDuration
:
2800
,
animationEasing
:
'cubicInOut'
},
//
{
// name: 'actual'
,
//
smooth: true,
//
type: 'line',
//
itemStyle: {
//
normal: {
//
color: '#3888fa',
//
lineStyle: {
//
color: '#3888fa',
//
width: 2
//
},
//
areaStyle: {
//
color: '#f3f8ff'
//
}
//
}
//
},
// data: actualD
ata,
//
animationDuration: 2800,
//
animationEasing: 'quadraticOut'
// }
]
{
name
:
data
.
trans
.
name
,
smooth
:
true
,
type
:
'line'
,
itemStyle
:
{
normal
:
{
color
:
'#3888fa'
,
lineStyle
:
{
color
:
'#3888fa'
,
width
:
2
},
areaStyle
:
{
color
:
'#f3f8ff'
}
}
},
data
:
data
.
trans
.
d
ata
,
animationDuration
:
2800
,
animationEasing
:
'quadraticOut'
}]
})
}
}
...
...
src/views/home.vue
View file @
38c85308
This diff is collapsed.
Click to expand it.
src/views/watch/homework.vue
View file @
38c85308
...
...
@@ -7,7 +7,7 @@
<div
class=
"num-content"
>
<div
class=
"num-title"
>
总作业任务数
</div>
<span
class=
"show-num"
>
{{
all
TableData
.
length
}}
{{
all
RunningJobNum
}}
</span>
</div>
</div>
...
...
@@ -193,9 +193,13 @@ import {
getKettleJobMonitorPageList
,
getKettleJobMonitorList
,
getAllSuccessCount
,
getAllFailCount
getAllFailCount
,
}
from
"@/api/watch/homework"
;
import
{
getAllMonitorJob
,
//获取所有的监控作业数
}
from
"@/api/Statistics"
;
export
default
{
filters
:
{
dateFormat
(
val
)
{
...
...
@@ -216,6 +220,7 @@ export default {
data
()
{
return
{
jobShow
:
true
,
allRunningJobNum
:
0
,
////获取所有的监控作业数
allTableData
:[],
//获取总列表数据
allSuccessCount
:
0
,
//总执行成功次数
allFailCount
:
0
,
//总执行失败的数
...
...
@@ -248,6 +253,7 @@ export default {
};
},
created
()
{
this
.
getAllMonitorJob
();
//获取所有的监控作业数
this
.
getKettleJobMonitorList
();
//获取列表
this
.
getAllSuccessCount
();
// 获取执行成功的数
this
.
getAllFailCount
();
// 获取执行失败的数
...
...
@@ -289,6 +295,16 @@ export default {
});
},
//获取所有的监控作业数
getAllMonitorJob
()
{
getAllFailCount
().
then
((
res
)
=>
{
console
.
log
(
'获取所有的监控作业数'
,
res
);
if
(
res
.
success
){
this
.
allRunningJobNum
=
res
.
data
;
}
});
},
...
...
src/views/watch/transform.vue
View file @
38c85308
...
...
@@ -7,7 +7,7 @@
<div
class=
"num-content"
>
<div
class=
"num-title"
>
总转换任务数
</div>
<span
class=
"show-num"
>
{{
al
lTableData
.
length
}}
{{
al
RunningTransNum
}}
</span>
</div>
</div>
...
...
@@ -195,6 +195,11 @@ import {
// update,
// create,
}
from
"@/api/watch/transform"
;
import
{
getAllMonitorTrans
,
//获取所有的监控作业数
}
from
"@/api/Statistics"
;
// import { getDoctorList } from "@/api/hospitalapi/doctor";
// import { getToken } from "@/utils/auth";
export
default
{
...
...
@@ -211,6 +216,7 @@ export default {
allTableData
:[],
//获取总列表数据
allSuccessCount
:
0
,
//总执行成功次数
allFailCount
:
0
,
//总执行失败的数
alRunningTransNum
:
0
,
//当前正在运行的总转换数
pageInfo
:
{
page
:
1
,
size
:
10
,
...
...
@@ -242,6 +248,7 @@ export default {
},
created
()
{
this
.
getKettleTransMonitorList
();
//获取总列表
this
.
getAllMonitorTrans
();
//获取所有的监控转换数
this
.
getKettleTransMonitorPageList
();
//分页获取列表
this
.
getAllSuccessCount
();
// 获取执行成功的数
this
.
getAllFailCount
();
// 获取执行失败的数
...
...
@@ -280,6 +287,18 @@ export default {
});
},
//获取所有的监控转换数
getAllMonitorTrans
()
{
getAllMonitorTrans
().
then
((
res
)
=>
{
console
.
log
(
'获取所有的监控转换数'
,
res
);
if
(
res
.
success
){
this
.
alRunningTransNum
=
res
.
data
;
}
});
},
// 获取总执行成功次数
getAllSuccessCount
()
{
getAllSuccessCount
().
then
((
res
)
=>
{
...
...
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