北鸣对接T+畅捷通,看板前端
loulijun2021
2023-12-26 134377316d7e2ee5913649101ac063746f9bb69e
src/utils/myEcharts.js
@@ -101,19 +101,19 @@
      data: salvProValue
    },
      {
        name: '背景',
        type: 'bar',
        barWidth: 15,
        barGap: '-100%',
        data: Value,
        itemStyle: {
          normal: {
            color: `rgba(${color[1]},0.8)`,
            barBorderRadius: 30
          }
    {
      name: '背景',
      type: 'bar',
      barWidth: 15,
      barGap: '-100%',
      data: Value,
      itemStyle: {
        normal: {
          color: `rgba(${color[1]},0.8)`,
          barBorderRadius: 30
        }
      }
    }
    ]
  }
@@ -358,9 +358,9 @@
  // const titlename = ['外观划伤', '表面油污', '尺寸', '颜色', '大小']
  // const data = val.map(i => i.cont)
  // const titlename = val.map(i => i.name)
  const data = dataArr.filter((item, index) => index < 5)
  const data = dataArr.filter((item, index) => index < 10)
  const titlename = titlenameArr.filter((item, index) => index < 5)
  const titlename = titlenameArr.filter((item, index) => index < 10)
  const length = titlename.length
  if (titlename.length < 5) {
@@ -373,7 +373,10 @@
  // const myColor = ['#FF0000', '#FF5511', '#FF8800', '#FFBB00', '#FFFF00']
  // const myColor = ['#0000FF']
  // const myColor = ['#7af5f5', '#00FFFF', '#00FFFF', '#00FFFF', '#00FFFF']
  const myColor = ['rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)']
  const myColor = [
    'rgba(122,245,245,1)', 'rgba(122,245,245,0.95)', 'rgba(122,245,245,0.9)', 'rgba(122,245,245,0.85)', 'rgba(122,245,245,0.8)',
    'rgba(122,245,245,0.75)', 'rgba(122,245,245,0.7)', 'rgba(122,245,245,0.65)', 'rgba(122,245,245,0.6)', 'rgba(122,245,245,0.55)'
  ]
  const option = {
    animation: false,
    backgroundColor: 'transparent',
@@ -1040,10 +1043,10 @@
              offset: 0,
              color: 'rgba(0,154,120,1)'
            },
              {
                offset: 1,
                color: 'rgba(0,0,0, 0)'
              }
            {
              offset: 1,
              color: 'rgba(0,0,0, 0)'
            }
            ], false),
            shadowColor: 'rgba(53,142,215, 0.9)', // 阴影颜色
            shadowBlur: 20 // shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
@@ -1868,17 +1871,17 @@
  var color = ['#00ffff', '#ff5b00', '#006ced', '#ffe000', '#ffa800', '#ff3000']
  for (var i = 0; i < scaleData.length; i++) {
    data.push({
        value: scaleData[i].value,
        name: scaleData[i].name,
        itemStyle: {
          normal: {
            borderWidth: 5,
            shadowBlur: 20,
            borderColor: color[i],
            shadowColor: color[i]
          }
      value: scaleData[i].value,
      name: scaleData[i].name,
      itemStyle: {
        normal: {
          borderWidth: 5,
          shadowBlur: 20,
          borderColor: color[i],
          shadowColor: color[i]
        }
      }
    }
    )
  }
  var seriesObj = [{
@@ -1964,17 +1967,17 @@
  var color = ['#00ffff', '#ff3000', '#ffe000', '#ffa800', '#ff5b00']
  for (var i = 0; i < scaleData.length; i++) {
    data.push({
        value: scaleData[i].value,
        name: scaleData[i].name,
        itemStyle: {
          normal: {
            borderWidth: 5,
            shadowBlur: 20,
            borderColor: color[i],
            shadowColor: [i]
          }
      value: scaleData[i].value,
      name: scaleData[i].name,
      itemStyle: {
        normal: {
          borderWidth: 5,
          shadowBlur: 20,
          borderColor: color[i],
          shadowColor: [i]
        }
      }
    }
    )
  }
  var seriesObj = [{
@@ -2960,12 +2963,12 @@
  return option
}
export function all02(data) {
export function all02(data, title) {
  return {
    backgroundColor: 'transparent',
    // tooltip: {},
    title: {
      text: '每月订单数量/出库数量',
      text: title,
      left: '50%',
      top: '0%',
      textAlign: 'center',
@@ -3094,10 +3097,10 @@
              offset: 0,
              color: 'rgba(0,154,120,1)'
            },
              {
                offset: 1,
                color: 'rgba(0,0,0, 0)'
              }
            {
              offset: 1,
              color: 'rgba(0,0,0, 0)'
            }
            ], false),
            shadowColor: 'rgba(53,142,215, 0.9)', // 阴影颜色
            shadowBlur: 20 // shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
@@ -3127,10 +3130,10 @@
              offset: 0,
              color: 'rgba(0,154,120,1)'
            },
              {
                offset: 1,
                color: 'rgba(0,0,0, 0)'
              }
            {
              offset: 1,
              color: 'rgba(0,0,0, 0)'
            }
            ], false),
            shadowColor: 'rgba(53,142,215, 0.9)', // 阴影颜色
            shadowBlur: 20 // shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
@@ -3162,3 +3165,104 @@
    ]
  }
}
export function all03(ydata, data) {
  const option = {
    backgroundColor: 'transparent',
    // tooltip: {
    //   formatter: '{b} ({c})'
    // },
    title: {
      text: '各车间当月完工数量',
      left: '50%',
      top: '0%',
      textAlign: 'center',
      textStyle: {
        // color: '#fff',
        color: '#00ffff',
        fontSize: '20',
        fontWeight: 'bolder'
      }
    },
    grid: {
      left: '8%',
      right: '8%',
      bottom: '10%',
      top: '15%',
      containLabel: true
    },
    xAxis: [{
      // gridIndex: 0,
      axisTick: {
        show: false
      },
      axisLabel: {
        show: false
      },
      splitLine: {
        show: false
      },
      axisLine: {
        show: false
      }
    }],
    yAxis: [{
      gridIndex: 0,
      interval: 0,
      // data: yAxisData.reverse(),
      data: ydata.reverse(),
      axisTick: {
        show: false
      },
      axisLabel: {
        show: true,
        textStyle: {
          fontSize: 18,
          color: colorX
        }
      },
      splitLine: {
        show: false
      },
      axisLine: {
        show: false
      }
    }],
    series: [
      {
        type: 'bar',
        xAxisIndex: 0,
        yAxisIndex: 0,
        barWidth: '45%',
        itemStyle: {
          normal: {
            barBorderRadius: 15,
            color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
              offset: 0,
              color: 'rgba(0,255,205,.6)'
            }, {
              offset: 0.8,
              color: 'rgba(41,134,207,1)'
            }], false)
          }
        },
        label: {
          normal: {
            show: true,
            position: 'right',
            textStyle: {
              color: colorX
            },
            fontSize: 18
          }
        },
        data: data.map(i => i.quantity).reverse()
      }
    ]
  }
  return option
}