更新角色管理相关内容

This commit is contained in:
2026-09-09 15:04:34 +08:00
parent de7225b61e
commit fef0233cc4
24 changed files with 1442 additions and 116 deletions
@@ -111,6 +111,10 @@ const getMonthLabels = (): string[] => {
const initChart = (refEl: HTMLElement, title: string, color: string) => {
const chart = echarts.init(refEl);
const months = getMonthLabels();
const isDark = document.documentElement.classList.contains('dark');
const palette = isDark
? { axis: '#4c4d4f', label: '#a8abb2', split: '#2b2b2d' }
: { axis: '#E0E6ED', label: '#606266', split: '#F2F6FC' };
chart.setOption({
tooltip: {
@@ -128,15 +132,15 @@ const initChart = (refEl: HTMLElement, title: string, color: string) => {
type: 'category',
boundaryGap: false,
data: months,
axisLine: { lineStyle: { color: '#E0E6ED' } },
axisLabel: { color: '#606266', fontSize: 11 }
axisLine: { lineStyle: { color: palette.axis } },
axisLabel: { color: palette.label, fontSize: 11 }
},
yAxis: {
type: 'value',
axisLine: { show: false },
axisTick: { show: false },
splitLine: { lineStyle: { color: '#F2F6FC' } },
axisLabel: { color: '#606266', fontSize: 11 }
splitLine: { lineStyle: { color: palette.split } },
axisLabel: { color: palette.label, fontSize: 11 }
},
series: [
{
@@ -326,4 +330,40 @@ onUnmounted(() => {
min-height: 0;
}
}
// ===== 暗色主题适配 =====
html.dark & {
.erp-dashboard {
background-color: var(--el-bg-color-page);
}
.stat-card {
background: var(--el-bg-color);
.stat-header {
.stat-label {
color: var(--el-text-color-regular);
}
.stat-icon {
color: var(--el-text-color-secondary);
}
}
.stat-value {
.currency,
.number {
color: var(--el-text-color-primary);
}
}
}
.chart-card {
background: var(--el-bg-color);
.chart-title {
color: var(--el-text-color-primary);
border-bottom-color: var(--el-border-color-lighter);
}
}
}
</style>