Skip to content

Commit

Permalink
Merge pull request #308 from actiontech/feat/issue-1712
Browse files Browse the repository at this point in the history
[feature]: order info chart added execting status
  • Loading branch information
Rain-1214 authored Jul 27, 2023
2 parents 15d3f84 + 6904f12 commit 86710b0
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
* [ ] [fix]: 规则列表分类进行排序, 优化编辑规则模板时的规则列表样式 <https://github.com/actiontech/sqle-ui/pull/304>
* [ ] [chore]: 项目概览界面中数据源最小单位改成1,数据源tips提示文案修改, 没有任何工单时总计显示 0. <https://github.com/actiontech/sqle-ui/pull/305>
* [ ] [fix]:修复在创建自定义规则时先修改了按钮状态然后才进行表单校验, 导致按钮状态未复原的问题 <https://github.com/actiontech/sqle-ui/pull/306>
* [ ] [feature]: 项目概览的工单状态报表添加 正在上线 状态 <https://github.com/actiontech/sqle-ui/pull/308>
7 changes: 7 additions & 0 deletions src/locale/zh-CN/projectManage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ export default {
},
orderClassification: {
title: '工单',
closed: '已关闭',
executing: '正在上线',
executionSuccess: '上线成功',
executionFailed: '上线失败',
rejected: '被驳回',
waitingForAudit: '待审核',
waitingForExecution: '待上线',
},
orderRisk: {
title: '工单潜在风险',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ const config: PieConfig = {
colorField: 'status',
xAxis: false,
yAxis: false,
color: ['#42a2ff', '#43cb77', '#fbd44d', '#f04864', '#9963e5', '#46cbcb'],
color: [
'#42a2ff',
'#43cb77',
'#fbd44d',
'#7767fa',
'#f04864',
'#9963e5',
'#46cbcb',
],
padding: 'auto',
radius: 1,
innerRadius: 0.8,
Expand All @@ -38,23 +46,35 @@ const orderStatusMap = () => {
return new Map<keyof IWorkflowStatusCountV1, string>([
[
'execution_success_count',
t('reportStatistics.orderStatus.executionSuccess'),
t('projectManage.projectOverview.orderClassification.executionSuccess'),
],
[
'waiting_for_audit_count',
t('reportStatistics.orderStatus.waitingForAudit'),
t('projectManage.projectOverview.orderClassification.waitingForAudit'),
],
[
'closed_count',
t('projectManage.projectOverview.orderClassification.closed'),
],
['closed_count', t('reportStatistics.orderStatus.closed')],

['rejected_count', t('reportStatistics.orderStatus.rejected')],
[
'rejected_count',
t('projectManage.projectOverview.orderClassification.rejected'),
],

[
'waiting_for_execution_count',
t('reportStatistics.orderStatus.waitingForExecution'),
t(
'projectManage.projectOverview.orderClassification.waitingForExecution'
),
],
[
'executing_failed_count',
t('reportStatistics.orderStatus.executionFailed'),
t('projectManage.projectOverview.orderClassification.executionFailed'),
],
[
'executing_count',
t('projectManage.projectOverview.orderClassification.executing'),
],
]);
};
Expand Down Expand Up @@ -106,6 +126,7 @@ const OrderClassification: React.FC<PanelCommonProps> = ({
res.data.data?.waiting_for_execution_count ?? 0,
execution_success_count:
res.data.data?.execution_success_count ?? 0,
executing_count: res.data.data?.executing_count ?? 0,
executing_failed_count: res.data.data?.executing_failed_count ?? 0,
rejected_count: res.data.data?.rejected_count ?? 0,
closed_count: res.data.data?.closed_count ?? 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ exports[`test OrderClassification should match snapshot 1`] = `
>
<div
anglefield="value"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#7767fa\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
colorfield="status"
data="[{\\"status\\":\\"\\",\\"value\\":0}]"
height="352"
Expand Down Expand Up @@ -110,9 +110,9 @@ exports[`test OrderClassification should match snapshot 2`] = `
>
<div
anglefield="value"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#7767fa\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
colorfield="status"
data="[{\\"value\\":32,\\"status\\":\\"reportStatistics.orderStatus.waitingForAudit\\"},{\\"value\\":0,\\"status\\":\\"reportStatistics.orderStatus.waitingForExecution\\"},{\\"value\\":20,\\"status\\":\\"reportStatistics.orderStatus.executionSuccess\\"},{\\"value\\":11,\\"status\\":\\"reportStatistics.orderStatus.executionFailed\\"},{\\"value\\":33,\\"status\\":\\"reportStatistics.orderStatus.rejected\\"},{\\"value\\":10,\\"status\\":\\"reportStatistics.orderStatus.closed\\"}]"
data="[{\\"value\\":32,\\"status\\":\\"projectManage.projectOverview.orderClassification.waitingForAudit\\"},{\\"value\\":0,\\"status\\":\\"projectManage.projectOverview.orderClassification.waitingForExecution\\"},{\\"value\\":20,\\"status\\":\\"projectManage.projectOverview.orderClassification.executionSuccess\\"},{\\"value\\":3,\\"status\\":\\"projectManage.projectOverview.orderClassification.executing\\"},{\\"value\\":11,\\"status\\":\\"projectManage.projectOverview.orderClassification.executionFailed\\"},{\\"value\\":33,\\"status\\":\\"projectManage.projectOverview.orderClassification.rejected\\"},{\\"value\\":10,\\"status\\":\\"projectManage.projectOverview.orderClassification.closed\\"}]"
height="352"
innerradius="0.8"
locale="zh-CN"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export const mockStatisticWorkflowStatus = () => {
executing_failed_count: 11,
rejected_count: 33,
closed_count: 10,
executing_count: 3,
})
);
return spy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ exports[`test ProjectOverview should match snapshot 1`] = `
>
<div
anglefield="value"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
color="[\\"#42a2ff\\",\\"#43cb77\\",\\"#fbd44d\\",\\"#7767fa\\",\\"#f04864\\",\\"#9963e5\\",\\"#46cbcb\\"]"
colorfield="status"
data="[{\\"value\\":32,\\"status\\":\\"reportStatistics.orderStatus.waitingForAudit\\"},{\\"value\\":0,\\"status\\":\\"reportStatistics.orderStatus.waitingForExecution\\"},{\\"value\\":20,\\"status\\":\\"reportStatistics.orderStatus.executionSuccess\\"},{\\"value\\":11,\\"status\\":\\"reportStatistics.orderStatus.executionFailed\\"},{\\"value\\":33,\\"status\\":\\"reportStatistics.orderStatus.rejected\\"},{\\"value\\":10,\\"status\\":\\"reportStatistics.orderStatus.closed\\"}]"
data="[{\\"value\\":32,\\"status\\":\\"projectManage.projectOverview.orderClassification.waitingForAudit\\"},{\\"value\\":0,\\"status\\":\\"projectManage.projectOverview.orderClassification.waitingForExecution\\"},{\\"value\\":20,\\"status\\":\\"projectManage.projectOverview.orderClassification.executionSuccess\\"},{\\"value\\":3,\\"status\\":\\"projectManage.projectOverview.orderClassification.executing\\"},{\\"value\\":11,\\"status\\":\\"projectManage.projectOverview.orderClassification.executionFailed\\"},{\\"value\\":33,\\"status\\":\\"projectManage.projectOverview.orderClassification.rejected\\"},{\\"value\\":10,\\"status\\":\\"projectManage.projectOverview.orderClassification.closed\\"}]"
height="352"
innerradius="0.8"
locale="zh-CN"
Expand Down

0 comments on commit 86710b0

Please sign in to comment.