fix: 2.5.0:
1、仪表盘MiniBar查询近7天数据,不足补0 2、重试、定时任务折线图(按天,周,月,年补0) 3、优化仪表盘接口,重试,定时共用DateTypeEnum枚举类
This commit is contained in:
parent
3c808f5c56
commit
171ef66695
@ -61,13 +61,13 @@ public class DashboardCardResponseDO {
|
|||||||
@Data
|
@Data
|
||||||
public static class RetryTaskBar {
|
public static class RetryTaskBar {
|
||||||
/**
|
/**
|
||||||
* 时间x
|
* 时间x轴
|
||||||
*/
|
*/
|
||||||
private String x;
|
private String x;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总数y
|
* 任务总数y轴
|
||||||
*/
|
*/
|
||||||
private Long y;
|
private Long taskTotal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,67 @@
|
|||||||
|
package com.aizuda.easy.retry.template.datasource.persistence.dataobject;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: wodeyangzipingpingwuqi
|
||||||
|
* @date : 2023-11-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DashboardLineResponseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间x轴
|
||||||
|
*/
|
||||||
|
private String createDt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总量,计算百分比
|
||||||
|
*/
|
||||||
|
private Long total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-成功数
|
||||||
|
*/
|
||||||
|
private Long successNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-运行数
|
||||||
|
*/
|
||||||
|
private Long runningNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-最大次数
|
||||||
|
*/
|
||||||
|
private Long maxCountNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-暂停数
|
||||||
|
*/
|
||||||
|
private Long suspendNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-失败任务
|
||||||
|
*/
|
||||||
|
private Long fail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-总任务数
|
||||||
|
*/
|
||||||
|
private Long totalNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-无效任务数
|
||||||
|
*/
|
||||||
|
private Long failNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-停止数
|
||||||
|
*/
|
||||||
|
private Long stopNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-取消数
|
||||||
|
*/
|
||||||
|
private Long cancelNum;
|
||||||
|
|
||||||
|
}
|
@ -24,7 +24,7 @@ public class DashboardRetryLineResponseDO {
|
|||||||
/**
|
/**
|
||||||
* 折线图列表
|
* 折线图列表
|
||||||
*/
|
*/
|
||||||
private List<DispatchQuantityResponseDO> dispatchQuantityResponseVOList;
|
private List<DashboardLineResponseDO> dashboardLineResponseDOList;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Task {
|
public static class Task {
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
package com.aizuda.easy.retry.template.datasource.persistence.dataobject;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: wodeyangzipingpingwuqi
|
|
||||||
* @date : 2023-11-30
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class DashboardRetryLinkeResponseDO {
|
|
||||||
|
|
||||||
private String createDt;
|
|
||||||
|
|
||||||
private Long total;
|
|
||||||
|
|
||||||
private Long successNum;
|
|
||||||
|
|
||||||
private Long runningNum;
|
|
||||||
|
|
||||||
private Long maxCountNum;
|
|
||||||
|
|
||||||
private Long suspendNum;
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
package com.aizuda.easy.retry.template.datasource.persistence.dataobject;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: www.byteblogs.com
|
|
||||||
* @date : 2022-04-22 20:27
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class DispatchQuantityResponseDO {
|
|
||||||
|
|
||||||
private String createDt;
|
|
||||||
|
|
||||||
private Long total;
|
|
||||||
|
|
||||||
private Long successNum;
|
|
||||||
|
|
||||||
private Long fail;
|
|
||||||
|
|
||||||
private Long totalNum;
|
|
||||||
|
|
||||||
private Long failNum;
|
|
||||||
|
|
||||||
private Long stopNum;
|
|
||||||
|
|
||||||
private Long cancelNum;
|
|
||||||
}
|
|
@ -1,8 +1,8 @@
|
|||||||
package com.aizuda.easy.retry.template.datasource.persistence.mapper;
|
package com.aizuda.easy.retry.template.datasource.persistence.mapper;
|
||||||
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO;
|
||||||
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DispatchQuantityResponseDO;
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.po.JobSummary;
|
import com.aizuda.easy.retry.template.datasource.persistence.po.JobSummary;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -27,10 +27,10 @@ public interface JobSummaryMapper extends BaseMapper<JobSummary> {
|
|||||||
|
|
||||||
IPage<DashboardRetryLineResponseDO.Task> jobTaskList(@Param("namespaceId") String namespaceId, Page<Object> page);
|
IPage<DashboardRetryLineResponseDO.Task> jobTaskList(@Param("namespaceId") String namespaceId, Page<Object> page);
|
||||||
|
|
||||||
List<DispatchQuantityResponseDO> jobLineList(@Param("namespaceId") String namespaceId,
|
List<DashboardLineResponseDO> jobLineList(@Param("namespaceId") String namespaceId,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("from") LocalDateTime from,
|
@Param("from") LocalDateTime from,
|
||||||
@Param("to") LocalDateTime to);
|
@Param("to") LocalDateTime to);
|
||||||
|
|
||||||
DashboardCardResponseDO.JobTask toJobTask(@Param("namespaceId") String namespaceId);
|
DashboardCardResponseDO.JobTask toJobTask(@Param("namespaceId") String namespaceId);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ package com.aizuda.easy.retry.template.datasource.persistence.mapper;
|
|||||||
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLinkeResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.po.RetrySummary;
|
import com.aizuda.easy.retry.template.datasource.persistence.po.RetrySummary;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -31,10 +31,10 @@ public interface RetrySummaryMapper extends BaseMapper<RetrySummary> {
|
|||||||
|
|
||||||
IPage<DashboardRetryLineResponseDO.Task> retryTaskList(@Param("namespaceId") String namespaceId, Page<Object> page);
|
IPage<DashboardRetryLineResponseDO.Task> retryTaskList(@Param("namespaceId") String namespaceId, Page<Object> page);
|
||||||
|
|
||||||
List<DashboardRetryLinkeResponseDO> retryLineList(@Param("namespaceId") String namespaceId,
|
List<DashboardLineResponseDO> retryLineList(@Param("namespaceId") String namespaceId,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("from") LocalDateTime from,
|
@Param("from") LocalDateTime from,
|
||||||
@Param("to") LocalDateTime to);
|
@Param("to") LocalDateTime to);
|
||||||
|
|
||||||
|
|
||||||
List<DashboardRetryLineResponseDO.Rank> dashboardRank(@Param("namespaceId") String namespaceId,
|
List<DashboardRetryLineResponseDO.Rank> dashboardRank(@Param("namespaceId") String namespaceId,
|
||||||
|
@ -2,8 +2,6 @@ package com.aizuda.easy.retry.template.datasource.persistence.mapper;
|
|||||||
|
|
||||||
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DispatchQuantityResponseDO;
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.SceneQuantityRankResponseDO;
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.po.RetryTaskLog;
|
import com.aizuda.easy.retry.template.datasource.persistence.po.RetryTaskLog;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -73,14 +73,23 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="jobLineList"
|
<select id="jobLineList"
|
||||||
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DispatchQuantityResponseDO">
|
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO">
|
||||||
SELECT
|
SELECT
|
||||||
<choose>
|
<choose>
|
||||||
|
<when test="type == 'DAY'">
|
||||||
|
DATE_FORMAT(create_dt,'%H')
|
||||||
|
</when>
|
||||||
|
<when test="type == 'WEEK'">
|
||||||
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
|
</when>
|
||||||
|
<when test="type =='MONTH'">
|
||||||
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
|
</when>
|
||||||
<when test="type == 'YEAR'">
|
<when test="type == 'YEAR'">
|
||||||
DATE_FORMAT(trigger_at,'%Y-%m')
|
DATE_FORMAT(create_dt,'%Y-%m')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
DATE_FORMAT(trigger_at,'%Y-%m-%d')
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
AS createDt,
|
AS createDt,
|
||||||
|
@ -73,22 +73,48 @@
|
|||||||
|
|
||||||
<select id="retryTaskBarList"
|
<select id="retryTaskBarList"
|
||||||
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO$RetryTaskBar">
|
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardCardResponseDO$RetryTaskBar">
|
||||||
SELECT DATE_FORMAT(trigger_at, '%Y-%m-%d') AS x,
|
SELECT tmp.date AS x, ifnull(b.taskTotal, 0) AS taskTotal
|
||||||
SUM(running_num + finish_num + max_count_num + suspend_num) AS y
|
FROM (
|
||||||
FROM retry_summary
|
SELECT curdate() AS date
|
||||||
WHERE namespace_id = #{namespaceId}
|
UNION ALL
|
||||||
GROUP BY trigger_at LIMIT 7
|
SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY) AS date
|
||||||
|
UNION ALL
|
||||||
|
SELECT DATE_SUB(CURDATE(), interval 2 day) AS date
|
||||||
|
UNION ALL
|
||||||
|
SELECT DATE_SUB(CURDATE(), interval 3 day) AS date
|
||||||
|
UNION ALL
|
||||||
|
SELECT DATE_SUB(CURDATE(), interval 4 day) AS date
|
||||||
|
UNION ALL
|
||||||
|
SELECT DATE_SUB(CURDATE(), interval 5 day) AS date
|
||||||
|
UNION ALL
|
||||||
|
SELECT DATE_SUB(CURDATE(), interval 6 day) AS date
|
||||||
|
) tmp
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT DATE (trigger_at) AS triggerAt,
|
||||||
|
SUM(running_num + finish_num + max_count_num + suspend_num) AS taskTotal FROM retry_summary
|
||||||
|
GROUP BY triggerAt
|
||||||
|
) b
|
||||||
|
ON tmp.date = b.triggerAt
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="retryLineList"
|
<select id="retryLineList"
|
||||||
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLinkeResponseDO">
|
resultType="com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO">
|
||||||
SELECT
|
SELECT
|
||||||
<choose>
|
<choose>
|
||||||
|
<when test="type == 'DAY'">
|
||||||
|
DATE_FORMAT(create_dt,'%H')
|
||||||
|
</when>
|
||||||
|
<when test="type == 'WEEK'">
|
||||||
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
|
</when>
|
||||||
|
<when test="type =='MONTH'">
|
||||||
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
|
</when>
|
||||||
<when test="type == 'YEAR'">
|
<when test="type == 'YEAR'">
|
||||||
DATE_FORMAT(trigger_at,'%Y-%m')
|
DATE_FORMAT(create_dt,'%Y-%m')
|
||||||
</when>
|
</when>
|
||||||
<otherwise>
|
<otherwise>
|
||||||
DATE_FORMAT(trigger_at,'%Y-%m-%d')
|
DATE_FORMAT(create_dt,'%Y-%m-%d')
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
AS createDt,
|
AS createDt,
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
package com.aizuda.easy.retry.server.web.model.enums;
|
package com.aizuda.easy.retry.server.web.model.enums;
|
||||||
|
|
||||||
import com.aizuda.easy.retry.server.web.model.response.DispatchQuantityResponseVO;
|
import com.aizuda.easy.retry.server.web.model.response.DashboardLineResponseVO;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.LocalTime;
|
import java.time.LocalTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author: byteblogs
|
* @author: byteblogs
|
||||||
@ -17,9 +20,30 @@ import java.util.function.Function;
|
|||||||
*/
|
*/
|
||||||
public enum DateTypeEnum {
|
public enum DateTypeEnum {
|
||||||
/**
|
/**
|
||||||
* 天
|
* 天(按小时)
|
||||||
*/
|
*/
|
||||||
DAY(dispatchQuantityResponseVOList -> {
|
DAY(dashboardLineResponseVOList -> {
|
||||||
|
Map<String, DashboardLineResponseVO> dashboardLineResponseVOMap = dashboardLineResponseVOList.stream().collect(Collectors.toMap(DashboardLineResponseVO::getCreateDt, i -> i));
|
||||||
|
for (int i = 0; i <= LocalDateTime.now().with(TemporalAdjusters.lastDayOfMonth()).getHour(); i++) {
|
||||||
|
|
||||||
|
String format = LocalDateTime.of(LocalDate.now(), LocalTime.MIN).plusHours(i).format(DateTimeFormatter.ofPattern("HH"));
|
||||||
|
DashboardLineResponseVO dashboardLineResponseVO = dashboardLineResponseVOMap.get(format);
|
||||||
|
if (Objects.isNull(dashboardLineResponseVO)) {
|
||||||
|
dashboardLineResponseVO = new DashboardLineResponseVO()
|
||||||
|
.setTotal(0L)
|
||||||
|
.setTotalNum(0L)
|
||||||
|
.setFail(0L)
|
||||||
|
.setFailNum(0L)
|
||||||
|
.setMaxCountNum(0L)
|
||||||
|
.setRunningNum(0L)
|
||||||
|
.setSuccessNum(0L)
|
||||||
|
.setSuspendNum(0L)
|
||||||
|
.setStopNum(0L)
|
||||||
|
.setCancelNum(0L)
|
||||||
|
.setCreateDt(format);
|
||||||
|
dashboardLineResponseVOList.add(dashboardLineResponseVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}, (startTime) -> {
|
}, (startTime) -> {
|
||||||
return Objects.isNull(startTime) ?
|
return Objects.isNull(startTime) ?
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.MIN.withNano(0)) :
|
LocalDateTime.of(LocalDate.now(), LocalTime.MIN.withNano(0)) :
|
||||||
@ -32,7 +56,28 @@ public enum DateTypeEnum {
|
|||||||
/**
|
/**
|
||||||
* 周
|
* 周
|
||||||
*/
|
*/
|
||||||
WEEK(dispatchQuantityResponseVOList -> {
|
WEEK(dashboardLineResponseVOList -> {
|
||||||
|
Map<String, DashboardLineResponseVO> dispatchQuantityResponseVOMap = dashboardLineResponseVOList.stream().collect(Collectors.toMap(DashboardLineResponseVO::getCreateDt, i -> i));
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
|
||||||
|
String format = LocalDateTime.of(LocalDate.now().minusDays(i), LocalTime.MIN).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
|
DashboardLineResponseVO dashboardLineResponseVO = dispatchQuantityResponseVOMap.get(format);
|
||||||
|
if (Objects.isNull(dashboardLineResponseVO)) {
|
||||||
|
dashboardLineResponseVO = new DashboardLineResponseVO()
|
||||||
|
.setTotal(0L)
|
||||||
|
.setTotalNum(0L)
|
||||||
|
.setFail(0L)
|
||||||
|
.setFailNum(0L)
|
||||||
|
.setMaxCountNum(0L)
|
||||||
|
.setRunningNum(0L)
|
||||||
|
.setSuccessNum(0L)
|
||||||
|
.setSuspendNum(0L)
|
||||||
|
.setStopNum(0L)
|
||||||
|
.setCancelNum(0L)
|
||||||
|
.setCreateDt(format);
|
||||||
|
dashboardLineResponseVOList.add(dashboardLineResponseVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}, (startTime) -> {
|
}, (startTime) -> {
|
||||||
return Objects.isNull(startTime) ?
|
return Objects.isNull(startTime) ?
|
||||||
LocalDateTime.of(LocalDate.now().minusDays(7), LocalTime.MIN.withNano(0)) :
|
LocalDateTime.of(LocalDate.now().minusDays(7), LocalTime.MIN.withNano(0)) :
|
||||||
@ -46,7 +91,28 @@ public enum DateTypeEnum {
|
|||||||
/**
|
/**
|
||||||
* 月
|
* 月
|
||||||
*/
|
*/
|
||||||
MONTH(dispatchQuantityResponseVOList -> {
|
MONTH(dashboardLineResponseVOList -> {
|
||||||
|
Map<String, DashboardLineResponseVO> dispatchQuantityResponseVOMap = dashboardLineResponseVOList.stream().collect(Collectors.toMap(DashboardLineResponseVO::getCreateDt, i -> i));
|
||||||
|
for (int i = 0; i < LocalDateTime.now().with(TemporalAdjusters.lastDayOfMonth()).getDayOfMonth(); i++) {
|
||||||
|
|
||||||
|
String format = LocalDateTime.of(LocalDate.now().minusDays(i), LocalTime.MIN).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||||
|
DashboardLineResponseVO dashboardLineResponseVO = dispatchQuantityResponseVOMap.get(format);
|
||||||
|
if (Objects.isNull(dashboardLineResponseVO)) {
|
||||||
|
dashboardLineResponseVO = new DashboardLineResponseVO()
|
||||||
|
.setTotal(0L)
|
||||||
|
.setTotalNum(0L)
|
||||||
|
.setFail(0L)
|
||||||
|
.setFailNum(0L)
|
||||||
|
.setMaxCountNum(0L)
|
||||||
|
.setRunningNum(0L)
|
||||||
|
.setSuccessNum(0L)
|
||||||
|
.setSuspendNum(0L)
|
||||||
|
.setStopNum(0L)
|
||||||
|
.setCancelNum(0L)
|
||||||
|
.setCreateDt(format);
|
||||||
|
dashboardLineResponseVOList.add(dashboardLineResponseVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}, (startTime) -> {
|
}, (startTime) -> {
|
||||||
return Objects.isNull(startTime) ?
|
return Objects.isNull(startTime) ?
|
||||||
LocalDateTime.of(LocalDate.now().minusMonths(1), LocalTime.MIN.withNano(0)) :
|
LocalDateTime.of(LocalDate.now().minusMonths(1), LocalTime.MIN.withNano(0)) :
|
||||||
@ -60,7 +126,7 @@ public enum DateTypeEnum {
|
|||||||
/**
|
/**
|
||||||
* 年
|
* 年
|
||||||
*/
|
*/
|
||||||
YEAR(dispatchQuantityResponseVOList -> {
|
YEAR(dashboardLineResponseVOList -> {
|
||||||
}, (startTime) -> {
|
}, (startTime) -> {
|
||||||
return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN.withNano(0));
|
return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN.withNano(0));
|
||||||
}, (endTime) -> {
|
}, (endTime) -> {
|
||||||
@ -70,18 +136,18 @@ public enum DateTypeEnum {
|
|||||||
/**
|
/**
|
||||||
* 其他类型
|
* 其他类型
|
||||||
*/
|
*/
|
||||||
OTHERS(dispatchQuantityResponseVOList -> {
|
OTHERS(dashboardLineResponseVOList -> {
|
||||||
}, (startTime) -> {
|
}, (startTime) -> {
|
||||||
return LocalDateTime.of(startTime.toLocalDate(), LocalTime.MIN.withNano(0));
|
return LocalDateTime.of(startTime.toLocalDate(), LocalTime.MIN.withNano(0));
|
||||||
}, (endTime) -> {
|
}, (endTime) -> {
|
||||||
return LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
return LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
||||||
});
|
});
|
||||||
|
|
||||||
private Consumer<List<DispatchQuantityResponseVO>> consumer;
|
private Consumer<List<DashboardLineResponseVO>> consumer;
|
||||||
private Function<LocalDateTime, LocalDateTime> startTime;
|
private Function<LocalDateTime, LocalDateTime> startTime;
|
||||||
private Function<LocalDateTime, LocalDateTime> endTime;
|
private Function<LocalDateTime, LocalDateTime> endTime;
|
||||||
|
|
||||||
DateTypeEnum(Consumer<List<DispatchQuantityResponseVO>> listConsumer, Function<LocalDateTime, LocalDateTime> startTime, Function<LocalDateTime, LocalDateTime> endTime) {
|
DateTypeEnum(Consumer<List<DashboardLineResponseVO>> listConsumer, Function<LocalDateTime, LocalDateTime> startTime, Function<LocalDateTime, LocalDateTime> endTime) {
|
||||||
this.consumer = listConsumer;
|
this.consumer = listConsumer;
|
||||||
this.startTime = startTime;
|
this.startTime = startTime;
|
||||||
this.endTime = endTime;
|
this.endTime = endTime;
|
||||||
@ -95,7 +161,7 @@ public enum DateTypeEnum {
|
|||||||
return endTime;
|
return endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Consumer<List<DispatchQuantityResponseVO>> getConsumer() {
|
public Consumer<List<DashboardLineResponseVO>> getConsumer() {
|
||||||
return consumer;
|
return consumer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,101 +0,0 @@
|
|||||||
package com.aizuda.easy.retry.server.web.model.enums;
|
|
||||||
|
|
||||||
import com.aizuda.easy.retry.server.web.model.response.DashboardRetryLinkeResponseVO;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.time.temporal.TemporalAdjusters;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: byteblogs
|
|
||||||
* @date: 2020/1/19 20:36
|
|
||||||
*/
|
|
||||||
public enum RetryDateTypeEnum {
|
|
||||||
/**
|
|
||||||
* 天
|
|
||||||
*/
|
|
||||||
DAY(dashboardRetryLinkeResponseVOList -> {
|
|
||||||
}, (startTime) -> {
|
|
||||||
return Objects.isNull(startTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.MIN.withNano(0)) :
|
|
||||||
LocalDateTime.of(startTime.toLocalDate(), LocalTime.MIN.withNano(0));
|
|
||||||
}, (endTime) -> {
|
|
||||||
return Objects.isNull(endTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.MAX.withNano(0)) :
|
|
||||||
LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
|
||||||
}),
|
|
||||||
/**
|
|
||||||
* 周
|
|
||||||
*/
|
|
||||||
WEEK(dashboardRetryLinkeResponseVOList -> {
|
|
||||||
}, (startTime) -> {
|
|
||||||
return Objects.isNull(startTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now().minusDays(7), LocalTime.MIN.withNano(0)) :
|
|
||||||
LocalDateTime.of(startTime.toLocalDate().minusDays(7), LocalTime.MIN.withNano(0));
|
|
||||||
}, (endTime) -> {
|
|
||||||
return Objects.isNull(endTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.MAX.withNano(0)) :
|
|
||||||
LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 月
|
|
||||||
*/
|
|
||||||
MONTH(dashboardRetryLinkeResponseVOList -> {
|
|
||||||
}, (startTime) -> {
|
|
||||||
return Objects.isNull(startTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now().minusMonths(1), LocalTime.MIN.withNano(0)) :
|
|
||||||
LocalDateTime.of(startTime.toLocalDate().minusMonths(1), LocalTime.MIN.withNano(0));
|
|
||||||
}, (endTime) -> {
|
|
||||||
return Objects.isNull(endTime) ?
|
|
||||||
LocalDateTime.of(LocalDate.now(), LocalTime.MAX.withNano(0)) :
|
|
||||||
LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 年
|
|
||||||
*/
|
|
||||||
YEAR(dashboardRetryLinkeResponseVOList -> {
|
|
||||||
}, (startTime) -> {
|
|
||||||
return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.firstDayOfYear()), LocalTime.MIN.withNano(0));
|
|
||||||
}, (endTime) -> {
|
|
||||||
return LocalDateTime.of(LocalDate.now().with(TemporalAdjusters.lastDayOfYear()), LocalTime.MAX.withNano(0));
|
|
||||||
}),
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 其他类型
|
|
||||||
*/
|
|
||||||
OTHERS(dashboardRetryLinkeResponseVOList -> {
|
|
||||||
}, (startTime) -> {
|
|
||||||
return LocalDateTime.of(startTime.toLocalDate(), LocalTime.MIN.withNano(0));
|
|
||||||
}, (endTime) -> {
|
|
||||||
return LocalDateTime.of(endTime.toLocalDate(), LocalTime.MAX.withNano(0));
|
|
||||||
});
|
|
||||||
|
|
||||||
private Consumer<List<DashboardRetryLinkeResponseVO>> consumer;
|
|
||||||
private Function<LocalDateTime, LocalDateTime> startTime;
|
|
||||||
private Function<LocalDateTime, LocalDateTime> endTime;
|
|
||||||
|
|
||||||
RetryDateTypeEnum(Consumer<List<DashboardRetryLinkeResponseVO>> listConsumer, Function<LocalDateTime, LocalDateTime> startTime, Function<LocalDateTime, LocalDateTime> endTime) {
|
|
||||||
this.consumer = listConsumer;
|
|
||||||
this.startTime = startTime;
|
|
||||||
this.endTime = endTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Function<LocalDateTime, LocalDateTime> getStartTime() {
|
|
||||||
return startTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Function<LocalDateTime, LocalDateTime> getEndTime() {
|
|
||||||
return endTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Consumer<List<DashboardRetryLinkeResponseVO>> getConsumer() {
|
|
||||||
return consumer;
|
|
||||||
}
|
|
||||||
}
|
|
@ -75,13 +75,13 @@ public class DashboardCardResponseVO {
|
|||||||
@Data
|
@Data
|
||||||
public static class RetryTaskBar {
|
public static class RetryTaskBar {
|
||||||
/**
|
/**
|
||||||
* 时间x
|
* 时间x轴
|
||||||
*/
|
*/
|
||||||
private String x;
|
private String x;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总数y
|
* 任务总数y轴
|
||||||
*/
|
*/
|
||||||
private Long y;
|
private Long taskTotal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.aizuda.easy.retry.server.web.model.response;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: wodeyangzipingpingwuqi
|
||||||
|
* @date : 2023-11-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class DashboardLineResponseVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间x轴
|
||||||
|
*/
|
||||||
|
private String createDt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总量,计算百分比
|
||||||
|
*/
|
||||||
|
private Long total;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-成功数
|
||||||
|
*/
|
||||||
|
private Long successNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-运行数
|
||||||
|
*/
|
||||||
|
private Long runningNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-最大次数
|
||||||
|
*/
|
||||||
|
private Long maxCountNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重试-暂停数
|
||||||
|
*/
|
||||||
|
private Long suspendNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-失败任务
|
||||||
|
*/
|
||||||
|
private Long fail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-总任务数
|
||||||
|
*/
|
||||||
|
private Long totalNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-无效任务数
|
||||||
|
*/
|
||||||
|
private Long failNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-停止数
|
||||||
|
*/
|
||||||
|
private Long stopNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时-取消数
|
||||||
|
*/
|
||||||
|
private Long cancelNum;
|
||||||
|
|
||||||
|
}
|
@ -25,23 +25,18 @@ public class DashboardRetryLineResponseVO {
|
|||||||
/**
|
/**
|
||||||
* 折线图列表
|
* 折线图列表
|
||||||
*/
|
*/
|
||||||
private List<DispatchQuantityResponseVO> dispatchQuantityResponseVOList;
|
private List<DashboardLineResponseVO> dashboardLineResponseDOList;
|
||||||
|
|
||||||
private List<DashboardRetryLinkeResponseVO> retryLinkeResponseVOList;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Task {
|
public static class Task {
|
||||||
private String groupName;
|
private String groupName;
|
||||||
|
|
||||||
private Integer run;
|
private Integer run;
|
||||||
|
|
||||||
private Integer total;
|
private Integer total;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Rank {
|
public static class Rank {
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String total;
|
private String total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
package com.aizuda.easy.retry.server.web.model.response;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: wodeyangzipingpingwuqi
|
|
||||||
* @date : 2023-11-30
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class DashboardRetryLinkeResponseVO {
|
|
||||||
|
|
||||||
private String createDt;
|
|
||||||
|
|
||||||
private Long total;
|
|
||||||
|
|
||||||
private Long successNum;
|
|
||||||
|
|
||||||
private Long runningNum;
|
|
||||||
|
|
||||||
private Long maxCountNum;
|
|
||||||
|
|
||||||
private Long suspendNum;
|
|
||||||
}
|
|
@ -1,28 +0,0 @@
|
|||||||
package com.aizuda.easy.retry.server.web.model.response;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author: www.byteblogs.com
|
|
||||||
* @date : 2022-04-22 20:27
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class DispatchQuantityResponseVO {
|
|
||||||
|
|
||||||
private String createDt;
|
|
||||||
|
|
||||||
private Long total;
|
|
||||||
|
|
||||||
private Long successNum;
|
|
||||||
|
|
||||||
private Long fail;
|
|
||||||
|
|
||||||
private Long totalNum;
|
|
||||||
|
|
||||||
private Long failNum;
|
|
||||||
|
|
||||||
private Long stopNum;
|
|
||||||
|
|
||||||
private Long cancelNum;
|
|
||||||
}
|
|
@ -1,9 +1,7 @@
|
|||||||
package com.aizuda.easy.retry.server.web.service.convert;
|
package com.aizuda.easy.retry.server.web.service.convert;
|
||||||
|
|
||||||
import com.aizuda.easy.retry.server.web.model.response.DashboardRetryLinkeResponseVO;
|
import com.aizuda.easy.retry.server.web.model.response.DashboardLineResponseVO;
|
||||||
import com.aizuda.easy.retry.server.web.model.response.DispatchQuantityResponseVO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLinkeResponseDO;
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DispatchQuantityResponseDO;
|
|
||||||
import org.mapstruct.Mapper;
|
import org.mapstruct.Mapper;
|
||||||
import org.mapstruct.factory.Mappers;
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
@ -19,7 +17,5 @@ public interface DispatchQuantityResponseVOConverter {
|
|||||||
|
|
||||||
DispatchQuantityResponseVOConverter INSTANCE = Mappers.getMapper(DispatchQuantityResponseVOConverter.class);
|
DispatchQuantityResponseVOConverter INSTANCE = Mappers.getMapper(DispatchQuantityResponseVOConverter.class);
|
||||||
|
|
||||||
List<DashboardRetryLinkeResponseVO> toDashboardRetryLinkeResponseVO(List<DashboardRetryLinkeResponseDO> dashboardRetryLinkeResponseDOList);
|
List<DashboardLineResponseVO> toDashboardLineResponseVO(List<DashboardLineResponseDO> dashboardLineResponseDOList);
|
||||||
|
|
||||||
List<DispatchQuantityResponseVO> toDispatchQuantityResponseVO(List<DispatchQuantityResponseDO> dispatchQuantityResponseDOList);
|
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ import com.aizuda.easy.retry.server.common.register.ServerRegister;
|
|||||||
import com.aizuda.easy.retry.server.web.model.base.BaseQueryVO;
|
import com.aizuda.easy.retry.server.web.model.base.BaseQueryVO;
|
||||||
import com.aizuda.easy.retry.server.web.model.base.PageResult;
|
import com.aizuda.easy.retry.server.web.model.base.PageResult;
|
||||||
import com.aizuda.easy.retry.server.web.model.enums.DateTypeEnum;
|
import com.aizuda.easy.retry.server.web.model.enums.DateTypeEnum;
|
||||||
import com.aizuda.easy.retry.server.web.model.enums.RetryDateTypeEnum;
|
|
||||||
import com.aizuda.easy.retry.server.web.model.request.ServerNodeQueryVO;
|
import com.aizuda.easy.retry.server.web.model.request.ServerNodeQueryVO;
|
||||||
import com.aizuda.easy.retry.server.web.model.response.*;
|
import com.aizuda.easy.retry.server.web.model.response.*;
|
||||||
import com.aizuda.easy.retry.server.web.service.DashBoardService;
|
import com.aizuda.easy.retry.server.web.service.DashBoardService;
|
||||||
@ -19,8 +18,7 @@ import com.aizuda.easy.retry.server.web.service.convert.*;
|
|||||||
import com.aizuda.easy.retry.server.web.util.UserSessionUtils;
|
import com.aizuda.easy.retry.server.web.util.UserSessionUtils;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.ActivePodQuantityResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.ActivePodQuantityResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardRetryLinkeResponseDO;
|
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DashboardLineResponseDO;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.dataobject.DispatchQuantityResponseDO;
|
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.mapper.JobSummaryMapper;
|
import com.aizuda.easy.retry.template.datasource.persistence.mapper.JobSummaryMapper;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.mapper.RetrySummaryMapper;
|
import com.aizuda.easy.retry.template.datasource.persistence.mapper.RetrySummaryMapper;
|
||||||
import com.aizuda.easy.retry.template.datasource.persistence.mapper.ServerNodeMapper;
|
import com.aizuda.easy.retry.template.datasource.persistence.mapper.ServerNodeMapper;
|
||||||
@ -40,6 +38,7 @@ import org.springframework.web.client.RestTemplate;
|
|||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -103,13 +102,14 @@ public class DashBoardServiceImpl implements DashBoardService {
|
|||||||
dashboardRetryLineResponseVO.setTaskList(pageResult);
|
dashboardRetryLineResponseVO.setTaskList(pageResult);
|
||||||
|
|
||||||
// 折线图
|
// 折线图
|
||||||
RetryDateTypeEnum dateTypeEnum = RetryDateTypeEnum.valueOf(type);
|
DateTypeEnum dateTypeEnum = DateTypeEnum.valueOf(type);
|
||||||
LocalDateTime startDateTime = dateTypeEnum.getStartTime().apply(StrUtil.isNotBlank(startTime) ? LocalDateTime.parse(startTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
LocalDateTime startDateTime = dateTypeEnum.getStartTime().apply(StrUtil.isNotBlank(startTime) ? LocalDateTime.parse(startTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
||||||
LocalDateTime endDateTime = dateTypeEnum.getEndTime().apply(StrUtil.isNotBlank(endTime) ? LocalDateTime.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
LocalDateTime endDateTime = dateTypeEnum.getEndTime().apply(StrUtil.isNotBlank(endTime) ? LocalDateTime.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
||||||
List<DashboardRetryLinkeResponseDO> dashboardRetryLinkeResponseDOList = retrySummaryMapper.retryLineList(namespaceId, type, startDateTime, endDateTime);
|
List<DashboardLineResponseDO> dashboardRetryLinkeResponseDOList = retrySummaryMapper.retryLineList(namespaceId, type, startDateTime, endDateTime);
|
||||||
List<DashboardRetryLinkeResponseVO> retryLinkeResponseVOList = DispatchQuantityResponseVOConverter.INSTANCE.toDashboardRetryLinkeResponseVO(dashboardRetryLinkeResponseDOList);
|
List<DashboardLineResponseVO> dashboardLineResponseVOList = DispatchQuantityResponseVOConverter.INSTANCE.toDashboardLineResponseVO(dashboardRetryLinkeResponseDOList);
|
||||||
dateTypeEnum.getConsumer().accept(retryLinkeResponseVOList);
|
dateTypeEnum.getConsumer().accept(dashboardLineResponseVOList);
|
||||||
dashboardRetryLineResponseVO.setRetryLinkeResponseVOList(retryLinkeResponseVOList);
|
dashboardLineResponseVOList.sort(Comparator.comparing(a -> a.getCreateDt()));
|
||||||
|
dashboardRetryLineResponseVO.setDashboardLineResponseDOList(dashboardLineResponseVOList);
|
||||||
|
|
||||||
// 排行榜
|
// 排行榜
|
||||||
List<DashboardRetryLineResponseDO.Rank> rankList = retrySummaryMapper.dashboardRank(namespaceId, groupName, startDateTime, endDateTime);
|
List<DashboardRetryLineResponseDO.Rank> rankList = retrySummaryMapper.dashboardRank(namespaceId, groupName, startDateTime, endDateTime);
|
||||||
@ -133,10 +133,11 @@ public class DashBoardServiceImpl implements DashBoardService {
|
|||||||
DateTypeEnum dateTypeEnum = DateTypeEnum.valueOf(type);
|
DateTypeEnum dateTypeEnum = DateTypeEnum.valueOf(type);
|
||||||
LocalDateTime startDateTime = dateTypeEnum.getStartTime().apply(StrUtil.isNotBlank(startTime) ? LocalDateTime.parse(startTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
LocalDateTime startDateTime = dateTypeEnum.getStartTime().apply(StrUtil.isNotBlank(startTime) ? LocalDateTime.parse(startTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
||||||
LocalDateTime endDateTime = dateTypeEnum.getEndTime().apply(StrUtil.isNotBlank(endTime) ? LocalDateTime.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
LocalDateTime endDateTime = dateTypeEnum.getEndTime().apply(StrUtil.isNotBlank(endTime) ? LocalDateTime.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) : null);
|
||||||
List<DispatchQuantityResponseDO> dispatchQuantityResponseDOList = jobSummaryMapper.jobLineList(namespaceId, type, startDateTime, endDateTime);
|
List<DashboardLineResponseDO> dashboardLineResponseDOList = jobSummaryMapper.jobLineList(namespaceId, type, startDateTime, endDateTime);
|
||||||
List<DispatchQuantityResponseVO> dispatchQuantityResponseVOList = DispatchQuantityResponseVOConverter.INSTANCE.toDispatchQuantityResponseVO(dispatchQuantityResponseDOList);
|
List<DashboardLineResponseVO> dashboardLineResponseVOList = DispatchQuantityResponseVOConverter.INSTANCE.toDashboardLineResponseVO(dashboardLineResponseDOList);
|
||||||
dateTypeEnum.getConsumer().accept(dispatchQuantityResponseVOList);
|
dateTypeEnum.getConsumer().accept(dashboardLineResponseVOList);
|
||||||
dashboardRetryLineResponseVO.setDispatchQuantityResponseVOList(dispatchQuantityResponseVOList);
|
dashboardLineResponseVOList.sort(Comparator.comparing(a -> a.getCreateDt()));
|
||||||
|
dashboardRetryLineResponseVO.setDashboardLineResponseDOList(dashboardLineResponseVOList);
|
||||||
|
|
||||||
// 排行榜
|
// 排行榜
|
||||||
List<DashboardRetryLineResponseDO.Rank> rankList = jobSummaryMapper.dashboardRank(namespaceId, groupName, startDateTime, endDateTime);
|
List<DashboardRetryLineResponseDO.Rank> rankList = jobSummaryMapper.dashboardRank(namespaceId, groupName, startDateTime, endDateTime);
|
||||||
|
@ -15,6 +15,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
viewRecords: [],
|
viewRecords: [],
|
||||||
|
dashboardLineResponseDOList: [],
|
||||||
chart: null
|
chart: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -31,7 +32,7 @@ export default {
|
|||||||
'endTime': endTime
|
'endTime': endTime
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$bus.$emit('job', res)
|
this.$bus.$emit('job', res)
|
||||||
this.viewCharts(res.data.dispatchQuantityResponseVOList)
|
this.viewCharts(res.data.dashboardLineResponseDOList)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
viewCharts (viewRecords, type = 'WEEK') {
|
viewCharts (viewRecords, type = 'WEEK') {
|
||||||
|
@ -32,7 +32,7 @@ export default {
|
|||||||
'endTime': endTime
|
'endTime': endTime
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.$bus.$emit('retry', res)
|
this.$bus.$emit('retry', res)
|
||||||
this.viewCharts(res.data.retryLinkeResponseVOList)
|
this.viewCharts(res.data.dashboardLineResponseDOList)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
viewCharts (viewRecords, type = 'WEEK') {
|
viewCharts (viewRecords, type = 'WEEK') {
|
||||||
|
@ -11,7 +11,8 @@ const getters = {
|
|||||||
userInfo: state => state.user.info,
|
userInfo: state => state.user.info,
|
||||||
addRouters: state => state.permission.addRouters,
|
addRouters: state => state.permission.addRouters,
|
||||||
multiTab: state => state.app.multiTab,
|
multiTab: state => state.app.multiTab,
|
||||||
namespaces: state => state.user.namespaces
|
namespaces: state => state.user.namespaces,
|
||||||
|
mode: state => state.user.mode
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getters
|
export default getters
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import storage from 'store'
|
import storage from 'store'
|
||||||
import { login, getInfo } from '@/api/login'
|
import { login, getInfo } from '@/api/login'
|
||||||
import { ACCESS_TOKEN, APP_NAMESPACE } from '@/store/mutation-types'
|
import { ACCESS_TOKEN, APP_MODE, APP_NAMESPACE } from '@/store/mutation-types'
|
||||||
import { welcome, permissionsConfig } from '@/utils/util'
|
import { welcome, permissionsConfig } from '@/utils/util'
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
@ -37,6 +37,9 @@ const user = {
|
|||||||
} else {
|
} else {
|
||||||
storage.set(APP_NAMESPACE, namespaces[0].uniqueId)
|
storage.set(APP_NAMESPACE, namespaces[0].uniqueId)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
SET_MODE: (state, mode) => {
|
||||||
|
storage.set(APP_MODE, mode)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -84,6 +87,7 @@ const user = {
|
|||||||
return permission.permissionId
|
return permission.permissionId
|
||||||
})
|
})
|
||||||
commit('SET_ROLES', result.role)
|
commit('SET_ROLES', result.role)
|
||||||
|
commit('SET_MODE', result.mode)
|
||||||
commit('SET_INFO', result)
|
commit('SET_INFO', result)
|
||||||
} else {
|
} else {
|
||||||
reject(new Error('getInfo: roles must be a non-null array !'))
|
reject(new Error('getInfo: roles must be a non-null array !'))
|
||||||
|
@ -13,6 +13,7 @@ export const TOGGLE_WEAK = 'weak'
|
|||||||
export const TOGGLE_MULTI_TAB = 'multi_tab'
|
export const TOGGLE_MULTI_TAB = 'multi_tab'
|
||||||
export const APP_LANGUAGE = 'app_language'
|
export const APP_LANGUAGE = 'app_language'
|
||||||
export const APP_NAMESPACE = 'app_namespace'
|
export const APP_NAMESPACE = 'app_namespace'
|
||||||
|
export const APP_MODE = 'app_mode'
|
||||||
|
|
||||||
export const CONTENT_WIDTH_TYPE = {
|
export const CONTENT_WIDTH_TYPE = {
|
||||||
Fluid: 'Fluid',
|
Fluid: 'Fluid',
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<div class="antv-chart-mini">
|
<div class="antv-chart-mini">
|
||||||
<div class="chart-wrapper" :style="{ height: 46 }">
|
<div class="chart-wrapper" :style="{ height: 46 }">
|
||||||
<v-chart :force-fit="true" :height="height" :data="retryTaskBarList" :padding="[36, 5, 18, 5]">
|
<v-chart :force-fit="true" :height="height" :data="retryTaskBarList" :padding="[30, 22, 18, 10]">
|
||||||
<v-tooltip />
|
<v-tooltip />
|
||||||
<v-bar position="x*y" />
|
<v-bar position="x*taskTotal" />
|
||||||
</v-chart>
|
</v-chart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -72,15 +72,29 @@
|
|||||||
|
|
||||||
<a-card :loading="loading" :bordered="true" :body-style="{padding: '0'}">
|
<a-card :loading="loading" :bordered="true" :body-style="{padding: '0'}">
|
||||||
<div class="salesCard">
|
<div class="salesCard">
|
||||||
<a-tabs>
|
<a-tabs @change="callback">
|
||||||
<a-tab-pane loading="true" :tab="$t('dashboard.analysis.sales')" v-if="$auth('RetryAnalysis.retry')" key="1">
|
<div class="extra-wrapper" slot="tabBarExtraContent">
|
||||||
|
<div class="extra-item">
|
||||||
|
<a href="#" @click="dataHandler('DAY')"><a-checkable-tag :checked="type == 'DAY'">{{ $t('dashboard.analysis.all-day') }}</a-checkable-tag></a>
|
||||||
|
<a href="#" @click="dataHandler('WEEK')"><a-checkable-tag :checked="type == 'WEEK'">{{ $t('dashboard.analysis.all-week') }}</a-checkable-tag></a>
|
||||||
|
<a href="#" @click="dataHandler('MONTH')"><a-checkable-tag :checked="type == 'MONTH'">{{ $t('dashboard.analysis.all-month') }}</a-checkable-tag></a>
|
||||||
|
<a href="#" @click="dataHandler('YEAR')"><a-checkable-tag :checked="type == 'YEAR'">{{ $t('dashboard.analysis.all-year') }}</a-checkable-tag></a>
|
||||||
|
</div>
|
||||||
|
<div class="extra-item">
|
||||||
|
<a-range-picker @change="dateChange" :show-time="{format: 'HH:mm:ss',defaultValue: [moment('00:00:00', 'HH:mm:ss'),moment('23:59:59', 'HH:mm:ss')]}" format="YYYY-MM-DD HH:mm:ss" :placeholder="['Start Time', 'End Time']" />
|
||||||
|
</div>
|
||||||
|
<a-select placeholder="请输入组名称" @change="value => handleChange(value)" :style="{width: '256px'}">
|
||||||
|
<a-select-option v-for="item in groupNameList" :value="item" :key="item">{{ item }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
|
<a-tab-pane loading="true" :tab="$t('dashboard.analysis.sales')" v-if="$auth('RetryAnalysis.retry')" key="RETRY">
|
||||||
<div>
|
<div>
|
||||||
<retry-analysis />
|
<retry-analysis ref="retryAnalysisRef"/>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane :tab="$t('dashboard.analysis.visits')" v-if="$auth('JobAnalysis.job')" key="2">
|
<a-tab-pane :tab="$t('dashboard.analysis.visits')" v-if="$auth('JobAnalysis.job')" key="JOB">
|
||||||
<div>
|
<div>
|
||||||
<job-analysis />
|
<job-analysis ref="jobAnalysisRef"/>
|
||||||
</div>
|
</div>
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
</a-tabs>
|
</a-tabs>
|
||||||
@ -99,12 +113,13 @@ import {
|
|||||||
NumberInfo,
|
NumberInfo,
|
||||||
MiniSmoothArea
|
MiniSmoothArea
|
||||||
} from '@/components'
|
} from '@/components'
|
||||||
import {
|
|
||||||
getDashboardTaskRetryJob
|
|
||||||
} from '@/api/manage'
|
|
||||||
|
|
||||||
|
import { getAllGroupNameList, getDashboardTaskRetryJob } from '@/api/manage'
|
||||||
import RetryAnalysis from '@/views/dashboard/RetryAnalysis.vue'
|
import RetryAnalysis from '@/views/dashboard/RetryAnalysis.vue'
|
||||||
import JobAnalysis from '@/views/dashboard/JobAnalysis.vue'
|
import JobAnalysis from '@/views/dashboard/JobAnalysis.vue'
|
||||||
|
import { APP_MODE } from '@/store/mutation-types'
|
||||||
|
import storage from 'store'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Analysis',
|
name: 'Analysis',
|
||||||
@ -124,6 +139,9 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
height: 100,
|
height: 100,
|
||||||
retryTaskBarList: [],
|
retryTaskBarList: [],
|
||||||
|
groupNameList: [],
|
||||||
|
type: 'WEEK',
|
||||||
|
mode: '',
|
||||||
retryTask: {
|
retryTask: {
|
||||||
totalNum: 0,
|
totalNum: 0,
|
||||||
runningNum: 0,
|
runningNum: 0,
|
||||||
@ -147,11 +165,26 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
moment,
|
||||||
|
callback (key) {
|
||||||
|
this.mode = key
|
||||||
|
},
|
||||||
jumpPosList () {
|
jumpPosList () {
|
||||||
this.$router.push({ path: '/dashboard/pods' })
|
this.$router.push({ path: '/dashboard/pods' })
|
||||||
|
},
|
||||||
|
dataHandler (type) {
|
||||||
|
this.type = type
|
||||||
|
this.mode === 'ALL' || this.mode === 'RETRY' ? this.$refs.retryAnalysisRef.dataHandler(this.type) : this.$refs.jobAnalysisRef.dataHandler(this.type)
|
||||||
|
},
|
||||||
|
dateChange (date, dateString) {
|
||||||
|
this.mode === 'ALL' || this.mode === 'RETRY' ? this.$refs.retryAnalysisRef.dateChange(date, dateString) : this.$refs.jobAnalysisRef.dateChange(date, dateString)
|
||||||
|
},
|
||||||
|
handleChange (value) {
|
||||||
|
this.mode === 'ALL' || this.mode === 'RETRY' ? this.$refs.retryAnalysisRef.handleChange(value) : this.$refs.jobAnalysisRef.handleChange(value)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
this.mode = storage.get(APP_MODE)
|
||||||
getDashboardTaskRetryJob().then(res => {
|
getDashboardTaskRetryJob().then(res => {
|
||||||
this.retryTask = res.data.retryTask
|
this.retryTask = res.data.retryTask
|
||||||
this.jobTask = res.data.jobTask
|
this.jobTask = res.data.jobTask
|
||||||
@ -159,6 +192,10 @@ export default {
|
|||||||
this.retryTaskBarList = res.data.retryTaskBarList
|
this.retryTaskBarList = res.data.retryTaskBarList
|
||||||
})
|
})
|
||||||
|
|
||||||
|
getAllGroupNameList().then(res => {
|
||||||
|
this.groupNameList = res.data
|
||||||
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = !this.loading
|
this.loading = !this.loading
|
||||||
}, 1000)
|
}, 1000)
|
||||||
@ -179,7 +216,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.extra-wrapper {
|
.extra-wrapper {
|
||||||
line-height: 55px;
|
|
||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
|
|
||||||
.extra-item {
|
.extra-item {
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="antd-pro-pages-dashboard-analysis-twoColLayout" :class="!isMobile && 'desktop'">
|
<div class="antd-pro-pages-dashboard-analysis-twoColLayout" :class="!isMobile && 'desktop'">
|
||||||
<div class="extra-wrapper" slot="tabBarExtraContent">
|
|
||||||
<div class="extra-item">
|
|
||||||
<a href="#" @click="dataHandler('DAY')"><a-tag :class="dateType == 'DAY' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-day') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('WEEK')"><a-tag :class="dateType == 'WEEK' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-week') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('MONTH')"><a-tag :class="dateType == 'MONTH' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-month') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('YEAR')"><a-tag :class="dateType == 'YEAR' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-year') }}</a-tag></a>
|
|
||||||
</div>
|
|
||||||
<div class="extra-item">
|
|
||||||
<a-range-picker @change="dateChange" :show-time="{format: 'HH:mm:ss',defaultValue: [moment('00:00:00', 'HH:mm:ss'),moment('23:59:59', 'HH:mm:ss')]}" format="YYYY-MM-DD HH:mm:ss" :placeholder="['Start Time', 'End Time']" />
|
|
||||||
</div>
|
|
||||||
<a-select placeholder="请输入组名称" @change="value => handleChange(value)" :style="{width: '256px'}">
|
|
||||||
<a-select-option v-for="item in groupNameList" :value="item" :key="item">{{ item }}</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
<g2-job-line ref="jobViewChart" name="G2JobLine" />
|
<g2-job-line ref="jobViewChart" name="G2JobLine" />
|
||||||
@ -38,13 +24,6 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="12" :lg="24" :md="24" :sm="24" :xs="24">
|
<a-col :xl="12" :lg="24" :md="24" :sm="24" :xs="24">
|
||||||
<a-card class="antd-pro-pages-dashboard-analysis-salesCard" :loading="loading" :bordered="false" :title="$t('dashboard.analysis.the-proportion-of-sales')" :style="{ height: '100%' }">
|
<a-card class="antd-pro-pages-dashboard-analysis-salesCard" :loading="loading" :bordered="false" :title="$t('dashboard.analysis.the-proportion-of-sales')" :style="{ height: '100%' }">
|
||||||
<div slot="extra" style="height: inherit;">
|
|
||||||
<div class="analysis-salesTypeRadio">
|
|
||||||
<a-radio-group defaultValue="a">
|
|
||||||
<a-radio-button value="timing">{{ $t('dashboard.analysis.channel.stores') }}</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h4>{{ $t('dashboard.analysis.job.sales') }}</h4>
|
<h4>{{ $t('dashboard.analysis.job.sales') }}</h4>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
@ -86,8 +65,7 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
rankList: [],
|
rankList: [],
|
||||||
taskList: [],
|
taskList: [],
|
||||||
dispatchQuantityResponseVOList: [],
|
dashboardLineResponseDOList: [],
|
||||||
dateType: 'WEEK',
|
|
||||||
type: 'WEEK',
|
type: 'WEEK',
|
||||||
groupName: '',
|
groupName: '',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
@ -139,7 +117,7 @@ export default {
|
|||||||
this.cancelNum = 0
|
this.cancelNum = 0
|
||||||
this.rankList = res.data.rankList
|
this.rankList = res.data.rankList
|
||||||
this.taskList = res.data.taskList
|
this.taskList = res.data.taskList
|
||||||
res.data.dispatchQuantityResponseVOList.forEach(res => {
|
res.data.dashboardLineResponseDOList.forEach(res => {
|
||||||
this.successNum += res.successNum
|
this.successNum += res.successNum
|
||||||
this.failNum += res.failNum
|
this.failNum += res.failNum
|
||||||
this.stopNum += res.stopNum
|
this.stopNum += res.stopNum
|
||||||
@ -157,7 +135,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
moment,
|
moment,
|
||||||
dataHandler (type) {
|
dataHandler (type) {
|
||||||
this.dateType = type
|
|
||||||
this.type = type
|
this.type = type
|
||||||
this.$refs.jobViewChart.getDashboardJobLine(this.groupName, this.type, this.startTime, this.endTime)
|
this.$refs.jobViewChart.getDashboardJobLine(this.groupName, this.type, this.startTime, this.endTime)
|
||||||
},
|
},
|
||||||
|
@ -1,19 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="antd-pro-pages-dashboard-analysis-twoColLayout" :class="!isMobile && 'desktop'">
|
<div class="antd-pro-pages-dashboard-analysis-twoColLayout" :class="!isMobile && 'desktop'">
|
||||||
<div class="extra-wrapper" slot="tabBarExtraContent">
|
|
||||||
<div class="extra-item">
|
|
||||||
<a href="#" @click="dataHandler('DAY')"><a-tag :class="dateType == 'DAY' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-day') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('WEEK')"><a-tag :class="dateType == 'WEEK' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-week') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('MONTH')"><a-tag :class="dateType == 'MONTH' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-month') }}</a-tag></a>
|
|
||||||
<a href="#" @click="dataHandler('YEAR')"><a-tag :class="dateType == 'YEAR' ? 'in' : 'on'">{{ $t('dashboard.analysis.all-year') }}</a-tag></a>
|
|
||||||
</div>
|
|
||||||
<div class="extra-item">
|
|
||||||
<a-range-picker @change="dateChange" :show-time="{format: 'HH:mm:ss',defaultValue: [moment('00:00:00', 'HH:mm:ss'),moment('23:59:59', 'HH:mm:ss')]}" format="YYYY-MM-DD HH:mm:ss" :placeholder="['Start Time', 'End Time']" />
|
|
||||||
</div>
|
|
||||||
<a-select placeholder="请输入组名称" @change="value => handleChange(value)" :style="{width: '256px'}">
|
|
||||||
<a-select-option v-for="item in groupNameList" :value="item" :key="item">{{ item }}</a-select-option>
|
|
||||||
</a-select>
|
|
||||||
</div>
|
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
<a-col :xl="16" :lg="12" :md="12" :sm="24" :xs="24">
|
||||||
<g2-retry-line ref="viewChart" name="RetryLine" />
|
<g2-retry-line ref="viewChart" name="RetryLine" />
|
||||||
@ -38,13 +24,6 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="12" :lg="24" :md="24" :sm="24" :xs="24">
|
<a-col :xl="12" :lg="24" :md="24" :sm="24" :xs="24">
|
||||||
<a-card class="antd-pro-pages-dashboard-analysis-salesCard" :loading="loading" :bordered="false" :title="$t('dashboard.analysis.the-proportion-of-sales')" :style="{ height: '100%' }">
|
<a-card class="antd-pro-pages-dashboard-analysis-salesCard" :loading="loading" :bordered="false" :title="$t('dashboard.analysis.the-proportion-of-sales')" :style="{ height: '100%' }">
|
||||||
<div slot="extra" style="height: inherit;">
|
|
||||||
<div class="analysis-salesTypeRadio">
|
|
||||||
<a-radio-group defaultValue="a">
|
|
||||||
<a-radio-button value="retry">{{ $t('dashboard.analysis.channel.online') }}</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h4>{{ $t('dashboard.analysis.sales') }}</h4>
|
<h4>{{ $t('dashboard.analysis.sales') }}</h4>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
@ -86,7 +65,6 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
rankList: [],
|
rankList: [],
|
||||||
taskList: [],
|
taskList: [],
|
||||||
dateType: 'WEEK',
|
|
||||||
type: 'WEEK',
|
type: 'WEEK',
|
||||||
groupName: '',
|
groupName: '',
|
||||||
startTime: [],
|
startTime: [],
|
||||||
@ -133,7 +111,7 @@ export default {
|
|||||||
this.suspendNum = 0
|
this.suspendNum = 0
|
||||||
this.rankList = res.data.rankList
|
this.rankList = res.data.rankList
|
||||||
this.taskList = res.data.taskList
|
this.taskList = res.data.taskList
|
||||||
res.data.retryLinkeResponseVOList.forEach(res => {
|
res.data.dashboardLineResponseDOList.forEach(res => {
|
||||||
this.successNum += res.successNum
|
this.successNum += res.successNum
|
||||||
this.runningNum += res.runningNum
|
this.runningNum += res.runningNum
|
||||||
this.maxCountNum += res.maxCountNum
|
this.maxCountNum += res.maxCountNum
|
||||||
@ -151,7 +129,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
moment,
|
moment,
|
||||||
dataHandler (type) {
|
dataHandler (type) {
|
||||||
this.dateType = type
|
|
||||||
this.type = type
|
this.type = type
|
||||||
this.$refs.viewChart.getDashboardRetryLine(this.groupName, this.type, this.startTime, this.endTime)
|
this.$refs.viewChart.getDashboardRetryLine(this.groupName, this.type, this.startTime, this.endTime)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user