Przeglądaj źródła

SOC统计图调整

yanghao 1 tydzień temu
rodzic
commit
9d2fa235d5
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      src/views/pms/qhse/socSummary/index.vue

+ 5 - 1
src/views/pms/qhse/socSummary/index.vue

@@ -354,7 +354,11 @@ const hexToRgba = (hex: string, alpha: number) => {
 }
 }
 
 
 const getBarBaseColor = (name: string, isDrilldown: boolean) => {
 const getBarBaseColor = (name: string, isDrilldown: boolean) => {
-  return chartColorMap[name] || (isDrilldown ? '#67c23a' : '#409eff')
+  if (isDrilldown && currentDrilldownKey.value) {
+    return chartColorMap[currentDrilldownKey.value] || '#67c23a'
+  }
+
+  return chartColorMap[name] || '#409eff'
 }
 }
 
 
 const getBarItemStyle = (name: string, isDrilldown: boolean) => {
 const getBarItemStyle = (name: string, isDrilldown: boolean) => {