loulijun2021
2022-10-10 fde1edb0a61b411ad236177c7ee6bf94337362a1
src/utils/myEcharts.js
@@ -1570,7 +1570,7 @@
export function zhkb01() {
  // const zhkb01name = ['计划完成进度(自产)', '计划完成进度(外购)'] // 名称
  const zhkb01name = ['', ''] // 名称
  const zhkb01Value = [88, 95] // 值
  const zhkb01Value = [Math.ceil(Math.random() * 10 + 90), Math.ceil(Math.random() * 10 + 90)] // 值
  const zhkb01Max = []
  const max = Math.ceil(Math.max(...zhkb01Value.map(r => r)) * 1.1)
@@ -1816,7 +1816,7 @@
}
export function zhkb03() {
export function zhkb03(title) {
  const labelData = []
  const labelData1 = []
  for (let i = 0; i < 80; ++i) {
@@ -1980,7 +1980,7 @@
    backgroundColor: 'transparent',
    title: [
      {
        text: '螺母投入产出率',
        text: title,
        x: '46%',
        y: '38%',
        textAlign: 'center',
@@ -2235,7 +2235,8 @@
export function zhkb04() {
  const myColor = ['#d0a00e', '#34da62', '#00e9db', '#00c0e9', '#0096f3']
  const data = [330, 404, 780, 509, 150]
  // const data = [330, 404, 780, 509, 150]
  const data = [Math.ceil(Math.random() * 100 + 500), Math.ceil(Math.random() * 100 + 600), Math.ceil(Math.random() * 100 + 700), Math.ceil(Math.random() * 400 + 500), Math.ceil(Math.random() * 100 + 200)]
  const option = {
    backgroundColor: 'transparent',
    grid: {
@@ -2395,9 +2396,10 @@
export function zhkb05() {
// 数据
//   var XName = ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
  var XName = ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月', '11月', '12月']
  var XName = ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月']
  var data1 = [
    [123, 121, 123, 321, 222, 111, 234, 121, 123, 321, 222, 321]
    // [123, 121, 123, 321, 222, 111, 234, 121, 123, 321, 222, 321]
    [Math.ceil(Math.random() * 100 + 100), Math.ceil(Math.random() * 100 + 200), Math.ceil(Math.random() * 100 + 300), Math.ceil(Math.random() * 100 + 100), Math.ceil(Math.random() * 100 + 200), Math.ceil(Math.random() * 100 + 200), Math.ceil(Math.random() * 100 + 300), Math.ceil(Math.random() * 100 + 100), Math.ceil(Math.random() * 100 + 200), Math.ceil(Math.random() * 100 + 300)]
    // [123, 154, 234, 321, 120, 390, 634],
    // [63, 194, 234, 321, 278, 110, 534],
    // [53, 254, 234, 321, 118, 240, 434],
@@ -2567,22 +2569,22 @@
  return option
}
export function zhkb06() {
export function zhkb06(title) {
  const option = {
    backgroundColor: 'transparent',
    title: [
      {
        text: '检验及时率',
        text: title,
        x: 'center',
        top: '55%',
        textStyle: {
          color: '#FFFFFF',
          fontSize: 12,
          fontSize: 14,
          fontWeight: 100
        }
      },
      {
        text: '75%',
        text: '95%',
        x: 'center',
        top: '38%',
        textStyle: {
@@ -2725,11 +2727,11 @@
  return option
}
export function zhkb07() {
export function zhkb07(title, value) {
  const dataArr = [
    {
      value: 61,
      name: '我是标题'
      value: value,
      name: title
    }
  ]
  const color = new echarts.graphic.LinearGradient(0, 0, 1, 0, [
@@ -2743,7 +2745,7 @@
    }
  ])
  const colorSet = [
    [0.61, color],
    [value / 100, color],
    [1, '#15337C']
  ]
  const rich = {
@@ -2764,7 +2766,7 @@
      // lineHeight:80,
      borderWidth: 1,
      borderColor: '#0092F2',
      fontSize: 12,
      fontSize: 14,
      color: '#fff',
      backgroundColor: '#1B215B',
      borderRadius: 20,
@@ -2792,7 +2794,7 @@
        detail: {
          formatter: function(value) {
            var num = Math.round(value)
            return '{bule|' + num + '}{white|分}'
            return '{bule|' + num + '}{white|%}'
          },
          rich: rich,
          offsetCenter: ['0%', '0%']
@@ -2802,7 +2804,7 @@
          show: true,
          color: '#fff',
          offsetCenter: ['0', '75%'],
          fontSize: 12
          fontSize: 14
        },
        axisLine: {
          show: true,
@@ -2859,7 +2861,7 @@
      value: Math.floor(Math.random() * 10 + 90)
    },
    {
      name: '铸造车间',
      name: '镀锌车间',
      value: Math.floor(Math.random() * 10 + 90)
    }
  ]
@@ -3192,7 +3194,8 @@
}
export function zhkb09() {
  const dataY = [60, 70, 80, 90, 60, 70, 80, 90, 80, 90, 60, 70, 80, 90]
  // const dataY = [60, 70, 80, 90, 60, 70, 80, 90, 80, 90, 60, 70, 80, 90]
  const dataY = [(80 + Math.random() * 10), (90 - Math.random() * 30), (60 + Math.random() * 30), (70 + Math.random() * 20), (80 + Math.random() * 10), (90 - Math.random() * 30), (80 - Math.random() * 30), (90 - Math.random() * 30), (60 + Math.random() * 30), (70 + Math.random() * 20), (80 - Math.random() * 10), (90 - Math.random() * 30)]
  const option = {
    backgroundColor: 'transparent',
@@ -3217,7 +3220,7 @@
    xAxis: [
      {
        type: 'category',
        data: ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月', '11月', '12月'],
        data: ['01月', '02月', '03月', '04月', '05月', '06月', '07月', '08月', '09月', '10月'],
        axisTick: {
          alignWithLabel: true
        },
@@ -3349,8 +3352,10 @@
  const _legendColor = '#8FD8FF'
  const _fontSize = 16
  const _fontColor = '#8FD8FF'
  const data1 = [70, 90, 100, 70, 90, 100]
  const data2 = [80, 60, 80, 50, 90, 60]
  // const data1 = [70, 90, 100, 70, 90, 100]
  // const data2 = [80, 60, 80, 50, 90, 60]
  const data1 = [70 + Math.random() * 20, 90 - Math.random() * 20, 100 - Math.random() * 20, 70 + Math.random() * 20, 90 - Math.random() * 20, 80 - Math.random() * 20]
  const data2 = [80 + Math.random() * 20, 60 + Math.random() * 20, 80 - Math.random() * 20, 50 + Math.random() * 20, 90 - Math.random() * 20, 60 + Math.random() * 20]
  const option = {
    backgroundColor: 'transparent',
    legend: {
@@ -3371,7 +3376,8 @@
      containLabel: true
    },
    yAxis: {
      max: Math.ceil(Math.max(...data1) * 1.2),
      // max: Math.ceil(Math.max(...data1) * 1.2),
      max: 100,
      type: 'value',
      position: 'left',
      axisLine: {
@@ -3420,7 +3426,7 @@
          // width: 3
        }
      },
      data: ['一班', '二班', '三班', '四班', '五班', '六班']
      data: ['钢材改制', '冷墩', '热墩', '热处理', '达克罗', '镀锌']
    },
    series: [
      {
@@ -3631,7 +3637,7 @@
        name: '设备利用率',
        type: 'bar',
        barGap: '70%',
        data: [30, 75, 77, 39, 85],
        data: [Math.ceil(30 + Math.random() * 20), Math.ceil(75 - Math.random() * 20), Math.ceil(77 - Math.random() * 20), Math.ceil(39 + Math.random() * 20), Math.ceil(85 - Math.random() * 20)],
        barWidth: 12,
        itemStyle: {
          normal: {
@@ -3675,7 +3681,7 @@
      {
        name: '设备开机率',
        type: 'bar',
        data: [90, 45, 27, 20, 85],
        data: [Math.ceil(90 - Math.random() * 20), 45 + Math.ceil(Math.random() * 20), Math.ceil(27 + Math.random() * 20), Math.ceil(20 + Math.random() * 60), Math.ceil(85 - Math.random() * 20)],
        barWidth: 12,
        itemStyle: {
          normal: {