/**
 * @author  daya
 * @createDate  2021/8/27 15:38
 * 备注:模拟数据，临时存放
 **/
// eslint-disable-next-line no-unused-vars
import {defaultColor, defaultFontSize, formatToMillion, linearGradientStyle, labelStyle, horizontalDataZoom, verticalDataZoom} from '../utils/charts'
// 折线图数据
export const lineDatas = {
  // 是否展示相应的demo
  show: true,
  lineConfig1: {
    // 数据
    data: {
      axisList: ['08:00', '09:00', '10:00', '11:00', '12:00', '13:00'],
      dataList: [
        {name: '当日累计参与人次', data: [218, 266, 334, 267, 340, 210]},
        {name: '当日各时段参与人次', data: [128, 334, 434, 334, 120, 310]}
      ]
    },
    styleName: 'style7',
    commonConfig: {
      open: true,
      gridName: 'style',
      tooltipName: 'style1',
      legendName: 'style12',
      colorName: 'style23'
    }
  }
}

// 柱状图数据
export const barDatas = {
  // 是否展示相应的demo
  show: true,
  barConfig1: {
    show: true,
    // 数据
    data: {
      axisList: ['每旬资产提升任务', '手机银行唤醒礼', '季末资产提升礼', '信用卡消费礼', '信用卡新客礼'],
      dataList: [
        {name: '数量', data: [434, 334, 234, 220, 210]}
      ]
    },
    data1: {
      data: [
        {
          name: '周口',
          value: 55
        },
        {
          name: '南阳',
          value: 120
        },
        {
          name: '西峡',
          value: 78
        },
        {
          name: '驻马店',
          value: 66
        },
        {
          name: '新乡',
          value: 80
        },
        {
          name: '信阳',
          value: 45
        },
        {
          name: '漯河',
          value: 29
        }
      ]
    },
    styleName: 'style6',
    // 配置
    commonConfig: {
      open: true,
      tooltipName: 'style1',
      legendName: 'style10',
      xAxisName: 'style10',
      yAxisName: 'style10',
      colorName: 'style17',
      seriesName: 'style11',
      grid: 'style11'
    }
  },
  barConfig2: {
    show: true,
    // 数据
    data: {
      axisList: ['每旬资产提升任务', '手机银行唤醒礼', '季末资产提升礼', '信用卡消费礼', '信用卡新客礼'],
      dataList: [
        {name: '数量', data: [434, 334, 234, 220, 210]}
      ]
    },
    data1: {
      data: [
        {
          name: '周口',
          value: 55
        },
        {
          name: '南阳',
          value: 120
        },
        {
          name: '西峡',
          value: 78
        },
        {
          name: '驻马店',
          value: 66
        },
        {
          name: '新乡',
          value: 80
        },
        {
          name: '信阳',
          value: 45
        },
        {
          name: '漯河',
          value: 29
        }
      ]
    },
    styleName: 'style6',
    // 配置
    commonConfig: {
      open: true,
      tooltipName: 'style1',
      legendName: 'style10',
      xAxisName: 'style10',
      yAxisName: 'style10',
      colorName: 'style17',
      seriesName: 'style11',
      grid: 'style11'
    }
  },
  barConfig3: {
    data: {
      axisList: ['11/06', '11/07', '11/08', '11/09',
        '11/10', '11/11', '11/12', '11/13',
        '11/14', '11/15', '11/16', '11/17', '11/18',
        '11/19', '11/20'
      ],
      dataList: [
        {name: '数量',
          data: [5860, 5550, 5100, 3700, 5600,
            4300, 4900, 5100, 3000, 4800, 5300,
            3000, 4800, 5300, 5700]}
      ]
    },
    styleName: 'style1',
    customConfig: {
      open: true,
      title: {
        text: '2222'
      }
    },
    commonConfig: {
      open: true,
      tooltipName: 'style',
      legendName: 'style10',
      xAxisName: 'style11',
      yAxisName: 'style11',
      colorName: 'style19',
      seriesName: 'style12',
      dataZoomLen: 13,
      grid: 'style'
    }
  },
  barConfig4: {
    data: {
      axisList: ['1月', '2月', '3月', '4月',
        '5月', '6月', '7月', '8月',
        '9月', '10月', '11月', '12月'
      ],
      dataList: [
        {name: '参与人数',
          data: [5860, 5550, 5100, 3700, 5600,
            4300, 4900, 5100, 3000, 4800, 5300,
            3000]},
        {name: '达标人数',
          data: [2500, 2550, 2100, 1700, 2600,
            2300, 2900, 2100, 1000, 1800, 2300,
            3200]},
        {name: '领奖人数',
          data: [1500, 1550, 1100, 1700, 1600,
            1300, 1900, 1100, 1000, 1800, 1300,
            1000]}
      ]
    },
    styleName: 'style1',
    commonConfig: {
      open: true,
      tooltipName: 'style',
      legendName: 'style2',
      xAxisName: 'style11',
      yAxisName: 'style11',
      colorName: 'style20',
      seriesName: 'style9',
      dataZoomLen: 13,
      grid: 'style'
    }
  },
  barConfig5: {
    data: {
      axisList: ['1月', '2月', '3月', '4月',
        '5月', '6月', '7月', '8月',
        '9月', '10月', '11月', '12月'
      ],
      dataList: [
        {name: '参与人数',
          data: [5860, 5550, 5100, 3700, 5600,
            4300, 4900, 5100, 3000, 4800, 5300,
            3000]},
        {name: '达标人数',
          data: [2500, 2550, 2100, 1700, 2600,
            2300, 2900, 2100, 1000, 1800, 2300,
            3200]},
        {name: '领奖人数',
          data: [1500, 1550, 1100, 1700, 1600,
            1300, 1900, 1100, 1000, 1800, 1300,
            1000]}
      ]
    },
    styleName: 'style1',
    commonConfig: {
      open: true,
      tooltipName: 'style',
      legendName: 'style2',
      xAxisName: 'style11',
      yAxisName: 'style11',
      colorName: 'style20',
      seriesName: 'style9',
      dataZoomLen: 13,
      grid: 'style'
    }
  },
  barConfig6: {
    show: true,
    // 数据
    data: {
      axisList: ['天河支行', '海珠支行', '荔湾支行', '萝岗支行', '番禺支行'],
      dataList: [
        {name: '数量', data: [5678, 4563, 3888, 2099, 1988]}
      ]
    },
    styleName: 'style6',
    // 配置
    commonConfig: {
      open: true,
      tooltipName: 'style1',
      legendName: 'style10',
      xAxisName: 'style10',
      yAxisName: 'style10',
      colorName: 'style17',
      seriesName: 'style11',
      grid: 'style11'
    }
  }
}

// 饼图数据
export const pieDatas = {
  // 是否展示相应的demo
  show: true,
  pieConfig1: {
    show: true,
    // 数据
    data: {
      axisList: [],
      dataList: [
        {
          name: '男士',
          value: 45
        },
        {
          name: '女士',
          value: 55
        }
      ]
    },
    styleName: 'style12',
    // 配置
    commonConfig: {
      open: true,
      tooltipName: 'style3',
      legendName: 'style1',
      // colorName: 'style17',
      // seriesName: 'style12',
      grid: 'style1'
    }
  },
  pieConfig2: {
    show: true,
    // 数据
    data: {
      axisList: [],
      dataList: [
        {
          name: '25-35岁',
          value: 330
        },
        {
          name: '35-55岁',
          value: 330
        },
        {
          name: '55岁以上',
          value: 330
        }
      ]
    },
    styleName: 'style3',
    // 配置
    commonConfig: {
      open: true,
      tooltipName: 'style3',
      legendName: 'style11',
      colorName: 'style21'
      // seriesName: 'style5',
    }
  }
}

// 仪表盘的数据
export const gaugeDatas = {
  gaugeConfig1: {
    open: true,
    option: {
      series: [
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          color: [linearGradientStyle([0, 0, 0, 1], '#FEDB65', '#44D7B6')],
          splitNumber: 12,
          itemStyle: {
            color: linearGradientStyle([0, 0, 0, 1], '#FEDB65', '#44D7B6')
          },
          progress: {
            show: true,
            width: 20
          },
          pointer: {
            show: false
          },
          axisLine: {
            lineStyle: {
              width: 20,
              color: [
                [1, '#42604B']
              ]
            }
          },
          axisTick: {
            distance: -55,
            splitNumber: 5,
            length: 14,
            lineStyle: {
              width: 2,
              color: '#00E2DB'
            }
          },
          splitLine: {
            show: false
          },
          axisLabel: {
            show: false
          },
          title: {
            offsetCenter: [0, '30%'],
            fontSize: 20,
            color: '#fff',
            fontWeight: 'bolder'
          },
          anchor: {
            show: false
          },
          detail: {
            valueAnimation: true,
            width: '60%',
            lineHeight: 40,
            borderRadius: 8,
            offsetCenter: [0, '-20%'],
            fontSize: 24,
            fontWeight: 'bolder',
            formatter: '{value} %',
            color: '#FEDB65'
          },
          data: [
            {
              value: 31,
              name: '个金部'
            }
          ]
        },
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          itemStyle: {
            color: '#FD7347'
          },
          progress: {
            show: true,
            width: 8
          },
          pointer: {
            show: false
          },
          axisTick: {
            distance: -15,
            length: 12,
            lineStyle: {
              color: '#090C15',
              width: 2
            }
          },
          splitLine: {
            show: false
          },
          axisLine: {
            // show: false
            lineStyle: {
              width: 15,
              color: [
                [1, '#37a2da']
              ]
            }
          },
          axisLabel: {
            show: false
          },
          detail: {
            show: false
          },
          title: {
            show: false
          },
          radius: '90%'
        }
      ]
    }
  },
  gaugeConfig2: {
    open: true,
    option: {
      series: [
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          color: [linearGradientStyle([0, 0, 0, 1], '#00FFF4', '#008CFF')],
          splitNumber: 12,
          // itemStyle: {
          //   color: linearGradientStyle([0, 0, 0, 1], '#00FFF4', '#008CFF')
          // },
          progress: {
            show: true,
            width: 20
          },
          pointer: {
            show: false
          },
          axisLine: {
            lineStyle: {
              width: 20,
              color: [
                [1, '#0A7478']
              ]
            }
          },
          axisTick: {
            distance: -55,
            splitNumber: 5,
            length: 14,
            lineStyle: {
              width: 2,
              color: '#00E2DB'
            }
          },
          splitLine: {
            show: false
          },
          axisLabel: {
            show: false
          },
          title: {
            offsetCenter: [0, '30%'],
            fontSize: 20,
            color: '#fff',
            fontWeight: 'bolder'
          },
          anchor: {
            show: false
          },
          detail: {
            valueAnimation: true,
            width: '60%',
            lineHeight: 40,
            borderRadius: 8,
            offsetCenter: [0, '-20%'],
            fontSize: 24,
            fontWeight: 'bolder',
            formatter: '{value} %',
            color: '#FEDB65'
          },
          data: [
            {
              value: 31,
              name: '金科部'
            }
          ]
        },
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          itemStyle: {
            color: '#FD7347'
          },
          progress: {
            show: true,
            width: 8
          },
          pointer: {
            show: false
          },
          axisTick: {
            distance: -15,
            length: 12,
            lineStyle: {
              color: '#090C15',
              width: 2
            }
          },
          splitLine: {
            show: false
          },
          axisLine: {
            // show: false
            lineStyle: {
              width: 15,
              color: [
                [1, '#37a2da']
              ]
            }
          },
          axisLabel: {
            show: false
          },
          detail: {
            show: false
          },
          title: {
            show: false
          },
          radius: '90%'
        }
      ]
    }
  },
  gaugeConfig3: {
    open: true,
    option: {
      series: [
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          color: [linearGradientStyle([0, 0, 0, 1], '#3692D4', '#F7E055')],
          splitNumber: 12,
          // itemStyle: {
          //   color: linearGradientStyle([0, 0, 0, 1], '#3692D4', '#F7E055')
          // },
          progress: {
            show: true,
            width: 20
          },
          pointer: {
            show: false
          },
          axisLine: {
            lineStyle: {
              width: 20,
              color: [
                [1, '#0A7478']
              ]
            }
          },
          axisTick: {
            distance: -55,
            splitNumber: 5,
            length: 14,
            lineStyle: {
              width: 2,
              color: '#00E2DB'
            }
          },
          splitLine: {
            show: false
          },
          axisLabel: {
            show: false
          },
          title: {
            offsetCenter: [0, '30%'],
            fontSize: 20,
            color: '#fff',
            fontWeight: 'bolder'
          },
          anchor: {
            show: false
          },
          detail: {
            valueAnimation: true,
            width: '60%',
            lineHeight: 40,
            borderRadius: 8,
            offsetCenter: [0, '-20%'],
            fontSize: 24,
            fontWeight: 'bolder',
            formatter: '{value} %',
            color: '#FEDB65'
          },
          data: [
            {
              value: 38,
              name: '卡部'
            }
          ]
        },
        {
          type: 'gauge',
          center: ['50%', '60%'],
          startAngle: 180,
          endAngle: -0,
          min: 0,
          max: 60,
          itemStyle: {
            color: '#FD7347'
          },
          progress: {
            show: true,
            width: 8
          },
          pointer: {
            show: false
          },
          axisTick: {
            distance: -15,
            length: 12,
            lineStyle: {
              color: '#090C15',
              width: 2
            }
          },
          splitLine: {
            show: false
          },
          axisLine: {
            // show: false
            lineStyle: {
              width: 15,
              color: [
                [1, '#37a2da']
              ]
            }
          },
          axisLabel: {
            show: false
          },
          detail: {
            show: false
          },
          title: {
            show: false
          },
          radius: '90%'
        }
      ]
    }
  }
}

// 数字翻牌器
export const digitalFlop = {
  flopConfig1: {
    length: 5,
    number: [9],
    textAlign: 'center',
    style: {
      fontSize: '32',
      fill: '#FFF'
    },
    animationFrame: 50
  },
  flopConfig2: {
    styleName: 'style2',
    number: [10],
    textAlign: 'center',
    style: {
      fontSize: '56',
      fill: '#FFF'
    }
  }
}

// 常用配置
export const generalDatas = {
  scrollRankingConfig1: {
    data: [
      {
        name: '天河支行',
        value: 5678
      },
      {
        name: '海珠支行',
        value: 5578
      },
      {
        name: '荔湾支行',
        value: 5278
      },
      {
        name: '萝岗支行',
        value: 5078
      },
      {
        name: '番禺支行',
        value: 4678
      },
      {
        name: '佛山',
        value: 4378
      },
      {
        name: '增城',
        value: 2567
      }
    ]
  }
}

export const datas = {
  lineDatas: {
    ...lineDatas
  },
  barDatas: {
    ...barDatas
  },
  pieDatas: {
    ...pieDatas
  },
  gaugeDatas: {
    ...gaugeDatas
  },
  digitalFlop: {
    ...digitalFlop
  },
  generalDatas: {
    ...generalDatas
  }
}

export default datas
