export const leftOption = {
  title: [
    {
      text: '任务携行航材利用率',
      x: 'top',
      left: 'center',
      textStyle: {
        fontSize: 16,
        color: '#fff'
      }
    },
    {
      subtext: '',
      top: 'center',
      left: 'center',
      subtextStyle: {
        fontSize: 16,
        color: '#fff'
      }
    }
  ],
  tooltip: {
    trigger: 'item',
    formatter(params) {
      let result = ''
      if (params.name) {
        result = `${params.name} : ` + '<span>' + params.value + '%</span>'
      } else {
        result = ''
      }

      return result
    }
  },
  grid: {
    left: '1%',
    right: '10%',
    bottom: '10%',
    containLabel: true
  },
  series: [
    {
      data: [],
      type: 'pie',
      radius: ['50%', '70%'],
      label: {
        show: false
      },
      labelLine: {
        show: false
      }
    }
  ]
}

export const leftOtherOption = {
  title: [
    {
      text: '非任务携行航材利用率',
      x: 'top',
      left: 'center',
      textStyle: {
        fontSize: 16,
        color: '#fff'
      }
    },
    {
      subtext: '',
      top: 'center',
      left: 'center',
      subtextStyle: {
        fontSize: 16,
        color: '#fff'
      }
    }
  ],
  tooltip: {
    trigger: 'item',
    formatter(params) {
      let result = ''
      if (params.name) {
        result = `${params.name} : ` + '<span>' + params.value + '%</span>'
      } else {
        result = ''
      }

      return result
    }
  },
  grid: {
    left: '1%',
    right: '10%',
    bottom: '10%',
    containLabel: true
  },
  series: [
    {
      data: [],
      type: 'pie',
      radius: ['50%', '70%'],
      label: {
        show: false
      },
      labelLine: {
        show: false
      }
    }
  ]
}

const handleModelData = (a) => {
  if (a == '全部') return 96
  if (a == '大灯') return 24
  if (a == '雾灯') return 65
  if (a == '煤油') return 11
  if (a == '飞机发动机') return 79
}
const handleModelDataOther = (a) => {
  if (a == '全部') return 56
  if (a == '大灯') return 37
  if (a == '雾灯') return 28
  if (a == '煤油') return 19
  if (a == '飞机发动机') return 46
}
