Explorar el Código

SOC统计图调整

yanghao hace 2 semanas
padre
commit
9d2fa235d5
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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) => {
-  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) => {