chore: backup workspace before list detail shell refactor
This commit is contained in:
@@ -16,7 +16,6 @@ import { GridComponent, TooltipComponent } from 'echarts/components'
|
||||
import { use } from 'echarts/core'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
|
||||
import { useAnimationProgress } from '../../composables/useAnimationProgress.js'
|
||||
import { useEcharts } from '../../composables/useEcharts.js'
|
||||
import { useThemeColors } from '../../composables/useThemeColors.js'
|
||||
|
||||
@@ -30,12 +29,6 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const chartElement = shallowRef(null)
|
||||
const progress = useAnimationProgress([
|
||||
() => props.labels,
|
||||
() => props.applications,
|
||||
() => props.approved,
|
||||
() => props.avgHours
|
||||
], 1100)
|
||||
const themeColors = useThemeColors()
|
||||
const chartColors = computed(() => ({
|
||||
primary: themeColors.value.chartPrimary,
|
||||
@@ -49,18 +42,13 @@ const ariaLabel = computed(() =>
|
||||
)).join(';')
|
||||
)
|
||||
|
||||
const scaleSeries = (series, decimals = 0) =>
|
||||
series.map((value) => {
|
||||
const number = Number(value || 0)
|
||||
if (progress.value >= 0.999) {
|
||||
return number
|
||||
}
|
||||
return Number((number * progress.value).toFixed(decimals))
|
||||
})
|
||||
|
||||
const chartOptions = computed(() => ({
|
||||
backgroundColor: 'transparent',
|
||||
animation: false,
|
||||
animation: true,
|
||||
animationDuration: 1200,
|
||||
animationDurationUpdate: 1200,
|
||||
animationEasing: 'linear',
|
||||
animationEasingUpdate: 'linear',
|
||||
grid: {
|
||||
top: 18,
|
||||
right: 38,
|
||||
@@ -125,7 +113,7 @@ const chartOptions = computed(() => ({
|
||||
{
|
||||
name: '申请量(单)',
|
||||
type: 'bar',
|
||||
data: scaleSeries(props.applications),
|
||||
data: props.applications,
|
||||
barWidth: 12,
|
||||
barGap: '28%',
|
||||
itemStyle: {
|
||||
@@ -136,7 +124,7 @@ const chartOptions = computed(() => ({
|
||||
{
|
||||
name: '审批完成量(单)',
|
||||
type: 'bar',
|
||||
data: scaleSeries(props.approved),
|
||||
data: props.approved,
|
||||
barWidth: 12,
|
||||
itemStyle: {
|
||||
color: chartColors.value.blue,
|
||||
@@ -147,7 +135,7 @@ const chartOptions = computed(() => ({
|
||||
name: '平均审批时长(小时)',
|
||||
type: 'line',
|
||||
yAxisIndex: 1,
|
||||
data: scaleSeries(props.avgHours, 1),
|
||||
data: props.avgHours,
|
||||
smooth: true,
|
||||
symbol: 'circle',
|
||||
symbolSize: 7,
|
||||
|
||||
Reference in New Issue
Block a user