loulijun2021
2022-11-22 20ac76481e2748bec983dbf460cd44995ae08c0c
src/views/kb/cjsc.vue
@@ -31,18 +31,18 @@
                <el-table-column
                  prop="xsdd"
                  label="销售单号"
                  width="141"
                  width="165"
                />
                <el-table-column
                  prop="cpmc"
                  width="133"
                  width="120"
                  label="产品名称"
                />
                <el-table-column
                  prop="sl"
                  label="数量"
                  width="100"
                  width="80"
                />
              </el-table>
            </div>
@@ -65,18 +65,18 @@
                <el-table-column
                  prop="xsdd"
                  label="销售单号"
                  width="141"
                  width="165"
                />
                <el-table-column
                  prop="cpmc"
                  width="133"
                  width="120"
                  label="产品名称"
                />
                <el-table-column
                  prop="sl"
                  label="数量"
                  width="100"
                  width="80"
                />
              </el-table>
            </div>
@@ -101,11 +101,11 @@
              <el-table-column
                prop="xh"
                label="序号"
                width="50"
                width="60"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.xh }}
                  </div>
                </template>
@@ -113,35 +113,35 @@
              <el-table-column
                prop="jgdh"
                label="加工单号"
                width="150"
                width="165"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.jgdh }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="cxmc"
                width="130"
                width="100"
                label="产线名称"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.cxmc }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="cpmc"
                width="150"
                width="140"
                label="产品名称"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.cpmc }}
                  </div>
                </template>
@@ -153,7 +153,7 @@
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.scsl }}
                  </div>
                </template>
@@ -161,11 +161,11 @@
              <el-table-column
                prop="yjks"
                label="预计开始"
                width="150"
                width="130"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.yjks }}
                  </div>
                </template>
@@ -173,11 +173,11 @@
              <el-table-column
                prop="yjwg"
                label="预计完工"
                width="150"
                width="130"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.yjwg }}
                  </div>
                </template>
@@ -189,21 +189,22 @@
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.gx }}
                  </div>
                </template>
              </el-table-column>
              <el-table-column
                prop="scjd"
                prop="scjdxxx"
                label="生产进度"
                width="90"
                width="130"
              >
                <template slot-scope="{row}">
                  <div
                    :style="{color:row.cxmc==='装配一线'?'#ffff00':row.cxmc==='装配二线'?'#FF3333':row.cxmc==='装配三线'?'#FF00FF':'#00FFFF'}"
                  > {{ row.scjd }}
                  </div>
                  <!--                  <div-->
                  <!--                    :style="{color:row.cxmc==='装配一线'?'#FFFF77':row.cxmc==='装配二线'?'#FF8888':row.cxmc==='装配三线'?'#D28EFF':'#66FFFF'}"-->
                  <!--                  > {{ row.scjdxxx }}-->
                  <!--                  </div>-->
                  <div :id="'progress'+row.xh" style="width: 100%;height:30px" />
                </template>
              </el-table-column>
            </el-table>
@@ -228,18 +229,18 @@
                <el-table-column
                  prop="xsdd"
                  label="销售单号"
                  width="141"
                  width="165"
                />
                <el-table-column
                  prop="cpmc"
                  width="133"
                  width="120"
                  label="产品名称"
                />
                <el-table-column
                  prop="sl"
                  label="数量"
                  width="100"
                  width="80"
                />
              </el-table>
            </div>
@@ -262,18 +263,18 @@
                <el-table-column
                  prop="xsdd"
                  label="销售单号"
                  width="141"
                  width="165"
                />
                <el-table-column
                  prop="cpmc"
                  width="133"
                  width="120"
                  label="产品名称"
                />
                <el-table-column
                  prop="sl"
                  label="数量"
                  width="100"
                  width="80"
                />
              </el-table>
            </div>
@@ -287,7 +288,7 @@
<script>
import './kbCommon.css'
import { kbTop, loadEcharts } from '@/utils/myEcharts'
import { kbTop, line02, loadEcharts, progress } from '@/utils/myEcharts'
export default {
  name: 'Cjsc',
@@ -332,7 +333,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '20',
          scjd2: '30'
        },
        {
          xh: 2,
@@ -343,7 +345,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 3,
@@ -354,7 +357,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '50',
          scjd2: '100'
        },
        {
          xh: 4,
@@ -365,7 +369,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '20',
          scjd2: '60'
        },
        {
          xh: 5,
@@ -376,7 +381,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '50',
          scjd2: '60'
        },
        {
          xh: 6,
@@ -387,7 +393,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 7,
@@ -398,7 +405,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 8,
@@ -409,7 +417,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '30',
          scjd2: '30'
        },
        {
          xh: 9,
@@ -420,7 +429,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 10,
@@ -431,7 +441,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '1',
          scjd2: '2'
        },
        {
          xh: 11,
@@ -442,7 +453,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 12,
@@ -453,7 +465,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '1000',
          scjd2: '1000'
        },
        {
          xh: 13,
@@ -464,7 +477,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '16',
          scjd2: '33'
        },
        {
          xh: 14,
@@ -475,7 +489,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '19',
          scjd2: '81'
        },
        {
          xh: 15,
@@ -486,7 +501,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '100',
          scjd2: '200'
        },
        {
          xh: 16,
@@ -497,7 +513,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '1',
          scjd2: '2'
        },
        {
          xh: 17,
@@ -508,7 +525,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 18,
@@ -519,7 +537,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '1',
          scjd2: '2'
        },
        {
          xh: 19,
@@ -530,7 +549,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 20,
@@ -541,7 +561,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 21,
@@ -552,7 +573,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 22,
@@ -563,7 +585,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '1',
          scjd2: '2'
        },
        {
          xh: 23,
@@ -574,7 +597,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 24,
@@ -585,7 +609,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 25,
@@ -596,7 +621,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 26,
@@ -607,7 +633,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        },
        {
          xh: 27,
@@ -618,7 +645,8 @@
          yjks: '2022-10-01',
          yjwg: '2022-10-10',
          gx: '工序一',
          scjd: '10/20'
          scjd1: '10',
          scjd2: '20'
        }
      ]
    }
@@ -640,7 +668,7 @@
    // 中间部分的表格
    getCenterTableDataSetInterval() {
      let startValue = 0 // 初始值
      const scale = 23// 刻度
      const scale = 20// 刻度
      this.tableDataCenterTop = this.tableDataCenterTopTemp.slice(startValue, startValue + scale)
@@ -653,29 +681,39 @@
        if (nowLoop === loop) {
          this.getCenterTableDataSetInterval()
        }
        nowLoop++
      }, 5000)
        this.$nextTick(() => {
          this.tableDataCenterTop.forEach(i => {
            loadEcharts('progress' + i.xh, progress(i.scjd1, i.scjd2))
          })
        })
      }, 1000 * 10)
      this.$nextTick(() => {
        this.tableDataCenterTop.forEach(i => {
          loadEcharts('progress' + i.xh, progress(i.scjd1, i.scjd2))
        })
      })
    },
    // 定时刷新表格数据
    getTableDataSetInterval() {
      let startValue = 0 // 初始值
      const startValue = 0 // 初始值
      const scale = 10// 刻度
      this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
      const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 需要循环的次数
      let nowLoop = 0// 当前循环的次数
      setInterval(() => {
        startValue = startValue + scale
        this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
        if (nowLoop === loop) {
          this.getTableDataSetInterval()
        }
        nowLoop++
      }, 5000)
      //
      // const loop = Math.floor(this.tableDataLeftTopTemp.length / scale)// 需要循环的次数
      // let nowLoop = 0// 当前循环的次数
      //
      // setInterval(() => {
      //   startValue = startValue + scale
      //   this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
      //   if (nowLoop === loop) {
      //     this.getTableDataSetInterval()
      //   }
      //   nowLoop++
      // }, 5000)
    },
    // 获取topEcharts
@@ -706,7 +744,8 @@
        padding: '10px 0',
        textAlign: 'center',
        color: '#07acc2',
        border: 'none'
        border: 'none',
        fontSize: '18px'
      }
    },
    cellStyle() {
@@ -717,7 +756,8 @@
        backgroundColor: '#000',
        // backgroundColor: 'transparent',
        color: '#fff',
        border: 'none'
        border: 'none',
        fontSize: '18px'
      }
    },
    headerCellStyleCenter() {
@@ -727,16 +767,18 @@
        padding: '10px 0',
        textAlign: 'center',
        color: '#07acc2',
        border: 'none'
        border: 'none',
        fontSize: '18px'
      }
    },
    cellStyleCenter() {
      return {
        padding: '7.5px 0',
        padding: '7px 0',
        textAlign: 'center',
        backgroundColor: '#000',
        color: '#fff',
        border: 'none'
        border: 'none',
        fontSize: '18px'
      }
    }
  }
@@ -747,45 +789,17 @@
<style lang="scss" scoped>
$main_color: #09d8f2;
$color01: #00FFFF;
.lineContent {
  height: 435px;
  border: 1px solid $main_color;
  //outline: 1px solid $main_color;
  border-radius: 5px;
  padding: 2px;
}
.lineContentCenter {
  height: 935px;
  border: 1px solid $main_color;
  //outline: 1px solid $main_color;
  border-radius: 5px;
  padding: 2px;
}
.horn {
  background: linear-gradient($color01, $color01) left top,
  linear-gradient($color01, $color01) left top,
  linear-gradient($color01, $color01) right top,
  linear-gradient($color01, $color01) right top,
  linear-gradient($color01, $color01) left bottom,
  linear-gradient($color01, $color01) left bottom,
  linear-gradient($color01, $color01) right bottom,
  linear-gradient($color01, $color01) right bottom;
  background-repeat: no-repeat;
  //background-size: 5px 20px, 20px 5px;
  background-size: 2px 20px, 20px 2px;
}
.tableData {
  background: #000;
}
//.el-table::before{
//  height: 0;
//}
.el-table::before{
  height: 0;
}
.el-table__empty-text {
  color: $main_color;
}
</style>