概览、任务管理研发 10%

This commit is contained in:
守護
2024-04-16 21:45:15 +08:00
parent cf8e104c01
commit a585db1902
5 changed files with 109 additions and 23 deletions

View File

@@ -8,7 +8,7 @@
:startVal="startVal" :startVal="startVal"
:endVal="statistics.connectionStatistics.totalCount" :endVal="statistics.connectionStatistics.totalCount"
:duration="2000"></CountTo> :duration="2000"></CountTo>
<p class="cardItem_p1">数据连接数</p> <p class="cardItem_p1">数据连接数</p>
</div> </div>
<div class="cardItem_icon"> <div class="cardItem_icon">
<i class="el-icon-s-grid color-green1"></i> <i class="el-icon-s-grid color-green1"></i>
@@ -22,7 +22,7 @@
:startVal="startVal" :startVal="startVal"
:endVal="statistics.assignmentTaskStatistics.totalCount" :endVal="statistics.assignmentTaskStatistics.totalCount"
:duration="2000"></CountTo> :duration="2000"></CountTo>
<p class="cardItem_p1">任务安排</p> <p class="cardItem_p1">任务</p>
</div> </div>
<div class="cardItem_icon"> <div class="cardItem_icon">
<i class="el-icon-s-data color-blue"></i> <i class="el-icon-s-data color-blue"></i>
@@ -57,6 +57,62 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6">
<div class="cardItem">
<div class="cardItem_txt">
<CountTo class="cardItem_p0 color-running"
:startVal="startVal"
:endVal="statistics.assignmentJobStatistics.runningCount"
:duration="2000"></CountTo>
<p class="cardItem_p1">执行中</p>
</div>
<div class="cardItem_icon">
<i class="el-icon-office-building color-running"></i>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="cardItem">
<div class="cardItem_txt">
<CountTo class="cardItem_p0 color-error"
:startVal="startVal"
:endVal="statistics.assignmentJobStatistics.failedCount"
:duration="2000"></CountTo>
<p class="cardItem_p1">执行异常</p>
</div>
<div class="cardItem_icon">
<i class="el-icon-office-building color-error"></i>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="cardItem">
<div class="cardItem_txt">
<CountTo class="cardItem_p0 color-cancel"
:startVal="startVal"
:endVal="statistics.assignmentJobStatistics.cancelCount"
:duration="2000"></CountTo>
<p class="cardItem_p1">任务取消</p>
</div>
<div class="cardItem_icon">
<i class="el-icon-office-building color-cancel"></i>
</div>
</div>
</el-col>
<el-col :span="6">
<div class="cardItem">
<div class="cardItem_txt">
<CountTo class="cardItem_p0 color-success"
:startVal="startVal"
:endVal="statistics.assignmentJobStatistics.successfulCount"
:duration="2000"></CountTo>
<p class="cardItem_p1">执行成功</p>
</div>
<div class="cardItem_icon">
<i class="el-icon-office-building color-success"></i>
</div>
</div>
</el-col>
</el-row> </el-row>
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" <div slot="header"
@@ -97,6 +153,7 @@ export default {
assignmentJobStatistics: { assignmentJobStatistics: {
totalCount: 0, totalCount: 0,
runningCount: 0, runningCount: 0,
cancelCount: 0,
successfulCount: 0, successfulCount: 0,
failedCount: 0, failedCount: 0,
waitingCount: 0 waitingCount: 0
@@ -282,6 +339,18 @@ export default {
.color-red { .color-red {
color: #f4516c !important; color: #f4516c !important;
} }
.color-running{
color: #8c85d1 !important;
}
.color-error{
color: #ff9c86 !important;
}
.color-cancel{
color: #a0a6b8 !important;
}
.color-success{
color: #6cdbbc !important;
}
.color-green2 { .color-green2 {
color: #34bfa3 !important; color: #34bfa3 !important;
} }

View File

@@ -26,55 +26,69 @@
border> border>
<el-table-column prop="id" <el-table-column prop="id"
label="编号" label="编号"
min-width="8%"></el-table-column> min-width="6%"></el-table-column>
<el-table-column prop="name" <el-table-column prop="name"
label="名称" label="任务名称"
show-overflow-tooltip show-overflow-tooltip
min-width="30%"></el-table-column> min-width="10%"></el-table-column>
<el-table-column prop="scheduleMode" <el-table-column prop="scheduleMode"
label="调度" label="集成模式"
:formatter="stringFormatSchedule" :formatter="stringFormatSchedule"
min-width="8%"></el-table-column> min-width="8%"></el-table-column>
<el-table-column prop="name"
label="源端数据源"
show-overflow-tooltip
min-width="10%"></el-table-column>
<el-table-column prop="name"
label="目标端数据源"
show-overflow-tooltip
min-width="10%"></el-table-column>
<el-table-column prop="name"
label="运行状态"
show-overflow-tooltip
min-width="10%"></el-table-column>
<el-table-column prop="isPublished" <el-table-column prop="isPublished"
label="已发布" label="任务状态"
:formatter="boolFormatPublish" :formatter="boolFormatPublish"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
min-width="8%"></el-table-column> min-width="8%"></el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime"
label="时间" label="开始调度时间"
min-width="15%"></el-table-column> min-width="12%"></el-table-column>
<el-table-column label="操作" <el-table-column label="操作"
min-width="30%"> min-width="40%">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<el-button size="small"
type="primary"
icon="el-icon-timer"
@click="handlePublish(scope.$index, scope.row)"
round>调度日志</el-button>
<el-button size="small" <el-button size="small"
type="primary" type="primary"
icon="el-icon-timer" icon="el-icon-timer"
v-if="scope.row.isPublished===false" v-if="scope.row.isPublished===false"
@click="handlePublish(scope.$index, scope.row)" @click="handlePublish(scope.$index, scope.row)"
round>发布</el-button> round>启动</el-button>
<el-button size="small" <el-button size="small"
type="info" type="info"
icon="el-icon-delete-location" icon="el-icon-delete-location"
v-if="scope.row.isPublished===true" v-if="scope.row.isPublished===true"
@click="handleRetireTask(scope.$index, scope.row)" @click="handleRetireTask(scope.$index, scope.row)"
round>下线</el-button> round>停止</el-button>
<el-button size="small" <el-button size="small"
type="danger" type="danger"
icon="el-icon-video-play" icon="el-icon-video-play"
v-if="scope.row.isPublished===true"
@click="handleRunTask(scope.$index, scope.row)" @click="handleRunTask(scope.$index, scope.row)"
round>执行</el-button> round>手工调度</el-button>
<el-button size="small" <el-button size="small"
type="success" type="success"
icon="el-icon-document" icon="el-icon-document"
v-if="scope.row.isPublished===true"
@click="handleDetail(scope.$index, scope.row)" @click="handleDetail(scope.$index, scope.row)"
round>详情</el-button> round>详情</el-button>
<el-button size="small" <el-button size="small"
type="warning" type="warning"
icon="el-icon-edit" icon="el-icon-edit"
v-if="scope.row.isPublished===false"
@click="handleUpdate(scope.$index, scope.row)" @click="handleUpdate(scope.$index, scope.row)"
round>修改</el-button> round>修改</el-button>
<el-button size="small" <el-button size="small"
@@ -148,9 +162,9 @@ export default {
}, },
boolFormatPublish (row, column) { boolFormatPublish (row, column) {
if (row.isPublished === true) { if (row.isPublished === true) {
return ""; return "启动";
} else { } else {
return ""; return "停止";
} }
}, },
stringFormatSchedule (row, column) { stringFormatSchedule (row, column) {

View File

@@ -53,7 +53,7 @@ public class AssignmentJobDAO {
assignmentJobMapper.updateById(assignmentJobEntity); assignmentJobMapper.updateById(assignmentJobEntity);
} }
public int getCountByStatus(JobStatusEnum status) { public int getCountByStatus(Integer status) {
QueryWrapper<AssignmentJobEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<AssignmentJobEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(AssignmentJobEntity::getStatus, status); queryWrapper.lambda().eq(AssignmentJobEntity::getStatus, status);
return assignmentJobMapper.selectCount(queryWrapper).intValue(); return assignmentJobMapper.selectCount(queryWrapper).intValue();

View File

@@ -60,6 +60,9 @@ public class OverviewStatisticsResponse {
@ApiModelProperty("执行中的Job总数") @ApiModelProperty("执行中的Job总数")
private Integer runningCount; private Integer runningCount;
@ApiModelProperty("取消的Job总数")
private Integer cancelCount;
@ApiModelProperty("已经成功的总数") @ApiModelProperty("已经成功的总数")
private Integer successfulCount; private Integer successfulCount;

View File

@@ -51,11 +51,11 @@ public class OverviewService {
AssignmentJobStatistics assignmentJobStatistics = new AssignmentJobStatistics(); AssignmentJobStatistics assignmentJobStatistics = new AssignmentJobStatistics();
assignmentJobStatistics.setTotalCount(assignmentJobDAO.getTotalCount()); assignmentJobStatistics.setTotalCount(assignmentJobDAO.getTotalCount());
assignmentJobStatistics assignmentJobStatistics
.setRunningCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.RUNNING)); .setRunningCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.RUNNING.getValue()));
assignmentJobStatistics assignmentJobStatistics
.setSuccessfulCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.PASS)); .setSuccessfulCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.PASS.getValue()));
assignmentJobStatistics.setFailedCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.FAIL)); assignmentJobStatistics.setFailedCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.FAIL.getValue()));
assignmentJobStatistics.setCancelCount(assignmentJobDAO.getCountByStatus(JobStatusEnum.CANCEL.getValue()));
response.setAssignmentJobStatistics(assignmentJobStatistics); response.setAssignmentJobStatistics(assignmentJobStatistics);
return response; return response;