云
2026-09-14 4334e4d5f680b4375d7af4ba9e4d8c8baef7266b
src/views/reportAnalysis/productionAnalysis/components/left-top.vue
@@ -33,7 +33,7 @@
const pieWrapperRef = ref(null)
const pieBackgroundRef = ref(null)
const dateType = ref(1) // 1=周 2=月 3=季度
const dateType = ref(3) // 1=周 2=月 3=季度
function array2obj(array, key) {
  const resObj = {}
@@ -60,7 +60,7 @@
    icon: 'circle',
    textStyle: {
      fontSize: 18,
      color: pieColors[idx % pieColors.length],
      color: d.color || pieColors[idx % pieColors.length],
    },
  }))
@@ -154,11 +154,18 @@
    .then((res) => {
      if (res.code === 200 && Array.isArray(res.data)) {
        const items = res.data
        pieDatas.value = items.map((item) => ({
          name: item.name,
          value: parseFloat(item.value) || 0,
          rate: item.rate,
        }))
        pieDatas.value = items.map((item) => {
          const point = {
            name: item.name,
            value: parseFloat(item.value) || 0,
            rate: item.rate,
          }
          if (item.color) {
            point.color = item.color
            point.itemStyle = { color: item.color }
          }
          return point
        })
      }
    })
    .catch((err) => {