| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | /** |
| | | * 1. 区域分类统计更加灵活 |
| | | */ |
| | | import * as echarts from 'echarts' |
| | | import { ref, onMounted } from 'vue' |
| | | import dayjs from 'dayjs' |
| | |
| | | |
| | | function fetchSubtaskThisWeek() { |
| | | const area = getParams('week') |
| | | // 修改时段为周一到周日 |
| | | area.starttime = dayjs(area.starttime).add(1, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | area.endtime = dayjs(area.endtime).add(1, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | taskApi.fetchSubtaskSummaryByArea(area).then((res) => { |
| | | subtaskWeek.value = res.data |
| | | const series = refreshChartData(res.data) |
| | |
| | | |
| | | function fetchSubtaskLastWeek() { |
| | | const area = getParams('week') |
| | | area.starttime = dayjs(area.starttime).add(-7, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | area.endtime = dayjs(area.endtime).add(-7, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | // 修改时段为周一到周日 |
| | | area.starttime = dayjs(area.starttime).add(-6, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | area.endtime = dayjs(area.endtime).add(-6, 'day').format('YYYY-MM-DD HH:mm:ss') |
| | | taskApi.fetchSubtaskSummaryByArea(area).then((res) => { |
| | | subtaskLastWeek.value = res.data |
| | | const series = refreshChartData(res.data) |
| | |
| | | |
| | | .bar-chart { |
| | | width: 400px; |
| | | height: 600px; |
| | | height: 400px; |
| | | } |
| | | </style> |