Commit 38c85308 by 莫晓莉

首页折线图和统计

parent d609bd33
......@@ -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'
})
}
// ----------------------------------------------
......@@ -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: 30,
top: 100,
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.expectedData,
data: data.job.data,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
// {
// name: 'actual',
// smooth: true,
// type: 'line',
// itemStyle: {
// normal: {
// color: '#3888fa',
// lineStyle: {
// color: '#3888fa',
// width: 2
// },
// areaStyle: {
// color: '#f3f8ff'
// }
// }
// },
// data: actualData,
// 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.data,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}]
})
}
}
......
......@@ -7,7 +7,7 @@
<div class="num-content">
<div class="num-title">总作业任务数</div>
<span class="show-num">
{{allTableData.length}}
{{allRunningJobNum}}
</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;
}
});
},
......
......@@ -7,7 +7,7 @@
<div class="num-content">
<div class="num-title">总转换任务数</div>
<span class="show-num">
{{allTableData.length}}
{{alRunningTransNum}}
</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) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment