loulijun2021
2022-10-07 b4972fd2d422f1a29be5282ab10fad00425931cc
src/views/kb/zhkb.vue
@@ -4,7 +4,7 @@
    <div class="kb_body">
      <div class="kb_background" />
      <div class="kb_background2" />
      <div class="kb_head">智能订单看板</div>
      <div class="kb_head">智能工厂综合管理</div>
      <!--      <div class="kb_headerPic" />-->
      <div class="kb_headerPic kb_flex_space_between">
        <div id="zhkbTop01" style="width: 800px;height:36px;" />
@@ -26,9 +26,9 @@
                <div>计划完成进度(外购) 30000吨</div>
              </div>
              <div class="kb_flex_space_between" style="padding: 0 15px;height: 20px;">
                <div style="color:#fff">生产类型</div>
                <div style="color:#fff">生产数量</div>
                <div style="color:#fff">完成进度</div>
                <div :style="{color:colorX}">生产类型</div>
                <div :style="{color:colorX}">生产数量</div>
                <div :style="{color:colorX}">完成进度</div>
              </div>
              <div>
                <div class="kb_flex_space_between">
@@ -59,25 +59,25 @@
            </div>
            <div class="ckgl kb_block horn kb_flex_column">
              <div style="height: 60px" class="kb_flex_space_between">
                <div style="width: 50%;">
                <div style="width: 188px">
                  <div class="middle_title">
                    <div class="icon">
                      <svg-icon icon-class="zncc" class="svg_class" />
                    </div>
                    <div style="margin-left: 30px;">
                      <div>8000吨</div>
                      <div style="color:#fff;">昨日入库数量</div>
                      <div :style="{color:colorX}">昨日入库数量</div>
                    </div>
                  </div>
                </div>
                <div style="width: 50%;">
                <div style="width: 324px">
                  <div class="middle_title">
                    <div class="icon">
                      <svg-icon icon-class="zncc" class="svg_class" />
                    </div>
                    <div style="margin-left: 30px;">
                      <div>10000吨</div>
                      <div style="color:#fff;">昨日出库数量</div>
                      <div :style="{color:colorX}">昨日出库数量</div>
                    </div>
                  </div>
                </div>
@@ -85,21 +85,23 @@
              </div>
              <div style="height: 190px;position: relative" class="kb_flex_space_between">
                <div id="zhkb12" style="width: 190px;padding: 0;" class="kb_block" />
                <div style="position: absolute;bottom: 40px;left: 55px;width: 100px;height: 30px;color: #fff">入库及时率
                <div style="position: absolute;bottom: 40px;left: 55px;width: 100px;height: 30px;color: #c7e7ff">入库及时率
                </div>
                <div style="width: 320px;margin-left: 10px;align-items: center" class="kb_block kb_flex_space_between">
                  <div class="kb_flex_column" style="position: relative">
                <div
                  style="width: 320px;margin-left: 10px;align-items: center;padding: 10px 20px"
                  class="kb_block kb_flex_space_between"
                >
                  <div class="kb_flex_column" style="position: relative;margin-top: -5px;">
                    <div style="position: absolute;left: 42px;top: 20px">0.01%</div>
                    <div class="box03" />
                    <div style="text-align: center">退货率</div>
                    <div style="text-align: center;margin-top: 5px;">退货率</div>
                  </div>
                  <div class="kb_flex_column" style="position: relative">
                  <div class="kb_flex_column" style="position: relative;margin-top: -5px;">
                    <div style="position: absolute;left: 42px;top: 20px">0.02%</div>
                    <div class="box03" />
                    <div style="text-align: center">损坏率</div>
                    <div style="text-align: center;margin-top: 5px;">损坏率</div>
                  </div>
                </div>
              </div>
              <div style="height: 280px;position: relative" class="kb_flex_column">
@@ -203,7 +205,6 @@
import {
  loadEcharts,
  zhkb01,
  zhkb02,
  zhkb03,
  zhkb04,
  zhkb05,
@@ -211,7 +212,7 @@
  zhkb07,
  zhkb08,
  zhkb09,
  zhkb10, zhkb11, zhkb12
  zhkb10, zhkb11
} from '@/utils/myEcharts'
import '@/utils/echarts-liquidfill.min.js'
@@ -235,13 +236,19 @@
    this.getAllEcharts()
    this.getzhkb02()
    // setInterval(() => {
    //   this.getzhkb02()
    // }, 10000)
    setInterval(() => {
      this.getzhkb02()
    }, 1000 * 18)
    this.getzhkb12()
    setInterval(() => {
      this.getzhkb12()
    }, 1000 * 11)
    this.getzhkb13()
    setInterval(() => {
      this.getzhkb13()
    }, 1000 * 50)
  },
  methods: {
    getAllEcharts() {
@@ -262,6 +269,44 @@
      loadEcharts('zhkb09', zhkb09())
      loadEcharts('zhkb10', zhkb10())
      loadEcharts('zhkb11', zhkb11())
      setInterval(() => {
        loadEcharts('zhkb01', zhkb01())
      }, 1000 * 13)
      setInterval(() => {
        loadEcharts('zhkb03', zhkb03())
        loadEcharts('zhkb03_2', zhkb03())
      }, 1000 * 14)
      setInterval(() => {
        loadEcharts('zhkb04', zhkb04())
      }, 1000 * 15)
      setInterval(() => {
        loadEcharts('zhkb05', zhkb05())
      }, 1000 * 9)
      setInterval(() => {
        loadEcharts('zhkb06', zhkb06())
        loadEcharts('zhkb06_2', zhkb06())
      }, 1000 * 8)
      // setInterval(() => {
      //   loadEcharts('zhkb07_1', zhkb07())
      //   loadEcharts('zhkb07_2', zhkb07())
      //   loadEcharts('zhkb07_3', zhkb07())
      //   loadEcharts('zhkb07_4', zhkb07())
      //   loadEcharts('zhkb07_5', zhkb07())
      //   loadEcharts('zhkb07_6', zhkb07())
      // }, 1000 * 5)
      setInterval(() => {
        loadEcharts('zhkb08', zhkb08())
      }, 1000 * 9.5)
      setInterval(() => {
        loadEcharts('zhkb09', zhkb09())
      }, 1000 * 10.5)
      setInterval(() => {
        loadEcharts('zhkb10', zhkb10())
      }, 1000 * 7.5)
      setInterval(() => {
        loadEcharts('zhkb11', zhkb11())
      }, 1000 * 11.5)
    },
    getzhkb13() {
      const colorList = ['#47A2FF ', '#53C8D1', '#59CB74', '#FBD444', '#7F6AAD', '#585247', '#00FFFF', '#ff00ff', '#00ff00', '#ffff00', '#ff0000', '#0000ff']
@@ -343,6 +388,7 @@
          {
            // name: 'title',
            type: 'pie',
            silent: true,
            radius: [60, 90],
            center: ['75%', '60%'],
            label: {
@@ -431,6 +477,7 @@
      }
    },
    getzhkb12() {
      const value1 = Math.ceil(Math.random() * 10 + 60)
      const option = {
        backgroundColor: 'transparent',
        grid: {
@@ -441,11 +488,11 @@
          containLabel: true
        },
        title: {
          text: '85%',
          text: value1 + '%',
          x: '36%',
          y: '40%',
          textStyle: {
            color: '#fff',
            color: this.colorX,
            fontSize: 26
          }
        },
@@ -454,7 +501,7 @@
            type: 'liquidFill',
            radius: '80%',
            // data: [0.6],
            data: [0.6, 0.4, 0.2],
            data: [value1 / 100, 0.4, 0.2],
            backgroundStyle: {
              color: {
                type: 'radial',
@@ -753,19 +800,24 @@
    },
    getzhkb02() {
      let a, b, c, d
      a = Math.ceil(Math.random() * 10 + 20)
      b = Math.ceil(Math.random() * 10 + 20)
      c = Math.ceil(Math.random() * 10 + 20)
      d = 100 - a - b - c
      const data = [
        {
          'name': '生产已排满',
          'value': 40
          'value': a
        }, {
          'name': '物料不足',
          'value': 10
          'value': b
        }, {
          'name': '插班',
          'value': 20
          'value': c
        }, {
          'name': '其它',
          'value': 30
          'value': d
        }]
      const colorArr = ['#00FFFF', '#FFFF00', '#00FF00', '#FF00FF']
@@ -786,7 +838,7 @@
          //   color: ['#ff9d19']
          // },
          x: 'center',
          y: '-2%'
          y: '2%'
        },
        grid: {
          left: '0%',
@@ -797,7 +849,7 @@
        },
        legend: {
          orient: 'vertical',
          top: 'middle',
          top: '30%',
          left: '5%',
          textStyle: {
            color: colorArr.map(r => r),
@@ -809,10 +861,12 @@
        series: [
          // 主要展示层的
          {
            left: 150,
            radius: ['40%', '61%'],
            center: ['50%', '50%'],
            center: ['50%', '60%'],
            type: 'pie',
            silent: true,
            label: {
              normal: {
                show: true,
@@ -840,7 +894,7 @@
              normal: {
                show: true,
                length: 30,
                length2: 55
                length2: 30
              },
              emphasis: {
                show: true
@@ -854,8 +908,9 @@
          {
            left: 150,
            radius: ['30%', '34%'],
            center: ['50%', '50%'],
            center: ['50%', '60%'],
            type: 'pie',
            silent: true,
            label: {
              normal: {
                show: false
@@ -883,13 +938,15 @@
                color: '#09d8f2'
              }
            }]
          }, {
          },
          {
            left: 150,
            name: '外边框',
            type: 'pie',
            silent: true,
            clockWise: false, // 顺时加载
            hoverAnimation: false, // 鼠标移入变大
            center: ['50%', '50%'],
            center: ['50%', '60%'],
            radius: ['65%', '65%'],
            label: {
              normal: {
@@ -928,7 +985,7 @@
      })
      let currentIndex = -1 // 当前高亮图形在饼图数据中的下标
      let changePieInterval = setInterval(selectPie, 2000) // 设置自动切换高亮图形的定时器
      var changePieInterval = setInterval(selectPie, 2000) // 设置自动切换高亮图形的定时器
      function highlightPie() { // 取消所有高亮并高亮当前图形
        // for (var idx in option.series[0].data) {