feat: 引入 ECharts 统一图表并完善员工画像标签分页
后端优化员工行为画像服务和辅助函数,完善系统设置模型和 配置持久化,前端引入 ECharts 替换所有图表组件实现统一 渲染,新增员工画像标签分页器和数字员工工作记录组件,优 化工作台响应式布局和登录页过渡动画,完善预算中心和数字 员工页面样式细节。
This commit is contained in:
@@ -36,6 +36,8 @@ const progress = useAnimationProgress([
|
||||
() => props.available
|
||||
], 1000)
|
||||
const themeColors = useThemeColors()
|
||||
const prefersReducedMotion = () =>
|
||||
typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
|
||||
|
||||
const currency = (value) =>
|
||||
Number(value || 0).toLocaleString('zh-CN', {
|
||||
@@ -80,7 +82,7 @@ const chartData = computed(() => ({
|
||||
label: '已使用',
|
||||
data: scaleSeries(usedPercent.value),
|
||||
backgroundColor: themeColors.value.chartPrimary,
|
||||
borderRadius: 5,
|
||||
borderRadius: 4,
|
||||
borderSkipped: false,
|
||||
stack: 'budgetUsage',
|
||||
amounts: props.used
|
||||
@@ -89,7 +91,7 @@ const chartData = computed(() => ({
|
||||
label: '已占用',
|
||||
data: scaleSeries(occupiedPercent.value),
|
||||
backgroundColor: themeColors.value.warning,
|
||||
borderRadius: 5,
|
||||
borderRadius: 4,
|
||||
borderSkipped: false,
|
||||
stack: 'budgetUsage',
|
||||
amounts: props.occupied
|
||||
@@ -98,7 +100,7 @@ const chartData = computed(() => ({
|
||||
label: '剩余可用',
|
||||
data: scaleSeries(availablePercent.value),
|
||||
backgroundColor: '#e5edf3',
|
||||
borderRadius: 5,
|
||||
borderRadius: 4,
|
||||
borderSkipped: false,
|
||||
stack: 'budgetUsage',
|
||||
amounts: props.available
|
||||
@@ -114,7 +116,7 @@ const chartOptions = computed(() => ({
|
||||
intersect: false
|
||||
},
|
||||
animation: {
|
||||
duration: 760,
|
||||
duration: prefersReducedMotion() ? 0 : 760,
|
||||
easing: 'easeOutQuart'
|
||||
},
|
||||
plugins: {
|
||||
@@ -127,6 +129,7 @@ const chartOptions = computed(() => ({
|
||||
borderWidth: 1,
|
||||
bodyColor: '#475569',
|
||||
titleColor: '#0f172a',
|
||||
cornerRadius: 4,
|
||||
padding: 12,
|
||||
displayColors: true,
|
||||
callbacks: {
|
||||
|
||||
Reference in New Issue
Block a user