linwe
2025-11-17 9c17c5de6e656cf2b04b71a0777661c845b3ee36
src/views/home/components/leftContainer.vue
@@ -1483,11 +1483,11 @@
      const high = this.$refs.REFPERSONECHARTS.offsetHeight
      if (personInfo.length * (high / 7) > high) {
        this.personEchartsHeight = personInfo.length * (high / 7) + 'px'
      } else {
     // if (personInfo.length * (high / 7) > high) {
     //   this.personEchartsHeight = personInfo.length * (high / 7) + 'px'
     // } else {
        this.personEchartsHeight = '100%'
      }
     // }
      this.$nextTick(() => {
        var chartDom = document.getElementById('PersonEcharts')
@@ -1576,44 +1576,73 @@
            },
            confine: true
          },
          legend: {
            orient: 'vertical',
            top: 'middle',
            right: '2%',
            y: '1%',
            itemGap: 15,
            textStyle: {
              color: '#fff'
            },
            align: 'left',
            formatter: function (name) {
              let data = dataArr
              let tarValue
              for (let i = 0; i < data.length; i++) {
                if (data[i].name == name) {
                  tarValue = data[i].value
                }
              }
              let v = tarValue
              return `${name}  ${v} 人    `
            },
          },
          // legend: {
          //   orient: 'vertical',
          //   top: 'middle',
          //   right: '2%',
          //   y: '1%',
          //   itemGap: 15,
          //   textStyle: {
          //     color: '#fff'
          //   },
          //   align: 'left',
          //   formatter: function (name) {
          //     let data = dataArr
          //     let tarValue
          //     for (let i = 0; i < data.length; i++) {
          //       if (data[i].name == name) {
          //         tarValue = data[i].value
          //       }
          //     }
          //     let v = tarValue
          //     return `${name}  ${v} 人    `
          //   },
          // },
          series: [
            {
              top: 110,
              left: 60,
              type: 'pie',
              radius: [20, 50],
              center: [0, 0],
              avoidLabelOverlap: false,
              center: ['50%', '50%'],
              data: dataArr,
              label: {
                show: false,
                position: 'center'
                normal: {
                  formatter: function (params, ticket, callback) {
                    let msg
                    if (params.value > 10000) {
                      msg = (params.value / 10000).toFixed(2) + '万人'
                    } else {
                      msg = params.value + '人'
                    }
                    return `{white|${params.name}}{yellow|${msg}}`
                  },
                  rich: {
                    yellow: {
                      color: "#ffc72b",
                      fontSize: fontSize(12),
                      padding: [5, 4],
                      align: 'center'
                    },
                    total: {
                      color: "#ffc72b",
                      fontSize: fontSize(12),
                      align: 'center'
                    },
                    white: {
                      color: "#fff",
                      align: 'center',
                      fontSize: fontSize(12),
                      padding: [21, 0]
                    },
                    blue: {
                      color: '#49dff0',
                      fontSize: fontSize(12),
                      align: 'center'
                    },
                  }
                },
              },
              labelLine: {
                show: false
              },
              data: dataArr
            }
          ],
          grid: {