loulijun2021
2023-03-08 dc24803e0bc49c5a356b7eaad43060d463469a51
src/views/kb/cjsc.vue
@@ -1,6 +1,12 @@
<template>
  <div>
    <div class="kb_dashboard">
      <!--    星空背景-->
      <div ref="starsRef" class="stars">
        <div v-for="(item, index) in starsCount" :key="index" class="star" />
      </div>
      <div class="kb_header">
        <div class="flex_c_c kb_header_text">
          <div id="topBarLeft" style="width:600px;height:100%" />
@@ -22,7 +28,7 @@
              <el-table
                ref="tableDataLeftTopRef"
                :data="tableDataLeftTop"
                class="tableData"
                class="tableData  tableDataCell"
                style="width: 100%;"
                :header-cell-style="headerCellStyle"
                :cell-style="cellStyle"
@@ -31,18 +37,27 @@
                <el-table-column
                  prop="saleOrderCode"
                  label="销售单号"
                  width="165"
                />
                  width="130"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{ row.saleOrderCode }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="partname"
                  width="120"
                  width="170"
                  label="产品名称"
                />
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="good_qty"
                  label="数量"
                  width="80"
                  width="70"
                />
              </el-table>
            </div>
@@ -56,7 +71,7 @@
              <el-table
                ref="tableDataLeftBottomRef"
                :data="tableDataLeftBottom"
                class="tableData"
                class="tableData tableDataCell"
                style="width: 100%;"
                :header-cell-style="headerCellStyle"
                :cell-style="cellStyle"
@@ -65,18 +80,28 @@
                <el-table-column
                  prop="saleOrderCode"
                  label="销售单号"
                  width="165"
                />
                  width="130"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{ row.saleOrderCode }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="partname"
                  width="120"
                  width="170"
                  label="产品名称"
                />
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="good_qty"
                  label="数量"
                  width="80"
                  width="70"
                />
              </el-table>
            </div>
@@ -92,7 +117,7 @@
            <el-table
              ref="tableDataLeftCenterRef"
              :data="tableDataCenterTop"
              class="tableData"
              class="tableData tableDataCell"
              style="width: 100%;"
              :header-cell-style="headerCellStyleCenter"
              :cell-style="cellStyleCenter"
@@ -101,7 +126,7 @@
              <el-table-column
                type="RowNum"
                label="序号"
                width="60"
                width="50"
              >
                <template slot-scope="{row}">
                  <div
@@ -124,7 +149,7 @@
              </el-table-column>
              <el-table-column
                prop="eqp_name"
                width="100"
                width="90"
                label="产线名称"
              >
                <template slot-scope="{row}">
@@ -136,11 +161,12 @@
              </el-table-column>
              <el-table-column
                prop="partname"
                width="140"
                width="170"
                label="产品名称"
              >
                <template slot-scope="{row}">
                  <div
                    class="ellipsis"
                    :style="{color:row.eqp_name==='装配一线'?'#FFFF77':row.eqp_name==='装配二线'?'#FF8888':row.eqp_name==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.partname }}
                  </div>
@@ -149,7 +175,7 @@
              <el-table-column
                prop="plan_qty"
                label="生产数量"
                width="100"
                width="90"
              >
                <template slot-scope="{row}">
                  <div
@@ -161,7 +187,7 @@
              <el-table-column
                prop="plan_startdate"
                label="预计开始"
                width="130"
                width="125"
              >
                <template slot-scope="{row}">
                  <div
@@ -175,7 +201,7 @@
              <el-table-column
                prop="plan_enddate"
                label="预计完工"
                width="130"
                width="125"
              >
                <template slot-scope="{row}">
                  <div
@@ -189,10 +215,11 @@
              <el-table-column
                prop="stepname"
                label="工序"
                width="90"
                width="100"
              >
                <template slot-scope="{row}">
                  <div
                    class="ellipsis"
                    :style="{color:row.eqp_name==='装配一线'?'#FFFF77':row.eqp_name==='装配二线'?'#FF8888':row.eqp_name==='装配三线'?'#D28EFF':'#66FFFF'}"
                  > {{ row.stepname }}
                  </div>
@@ -220,7 +247,7 @@
              <el-table
                ref="tableDataRightTopRef"
                :data="tableDataRightTop"
                class="tableData"
                class="tableData tableDataCell"
                style="width: 100%;"
                :header-cell-style="headerCellStyle"
                :cell-style="cellStyle"
@@ -229,18 +256,27 @@
                <el-table-column
                  prop="saleOrderCode"
                  label="销售单号"
                  width="165"
                />
                  width="130"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{ row.saleOrderCode }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="partname"
                  width="120"
                  width="170"
                  label="产品名称"
                />
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="good_qty"
                  label="数量"
                  width="80"
                  width="70"
                />
              </el-table>
            </div>
@@ -254,7 +290,7 @@
              <el-table
                ref="tableDataRightBottomRef"
                :data="tableDataRightBottom"
                class="tableData"
                class="tableData tableDataCell"
                style="width: 100%;"
                :header-cell-style="headerCellStyle"
                :cell-style="cellStyle"
@@ -263,18 +299,27 @@
                <el-table-column
                  prop="saleOrderCode"
                  label="销售单号"
                  width="165"
                />
                  width="130"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.saleOrderCode" style="text-align: left" class="ellipsis">{{ row.saleOrderCode }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="partname"
                  width="120"
                  width="170"
                  label="产品名称"
                />
                >
                  <template slot-scope="{row}">
                    <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="good_qty"
                  label="数量"
                  width="80"
                  width="70"
                />
              </el-table>
            </div>
@@ -307,7 +352,10 @@
      tableDataRightBottomTemp: [],
      tableDataCenterTop: [],
      tableDataCenterTopTemp: []
      tableDataCenterTopTemp: [],
      starsCount: 800, // 星星数量
      distance: 900 // 间距
    }
  },
  created() {
@@ -328,8 +376,23 @@
    // 中间表格数据内容
    this.getCenterTableDataSetInterval()
    this.setStarsRef()
  },
  methods: {
    setStarsRef() {
      const starNodes = Array.from(this.$refs.starsRef.children)
      starNodes.forEach(item => {
        const speed = 0.2 + Math.random() * 1
        const thisDistance = this.distance + Math.random() * 300
        item.style.transformOrigin = `0 0 ${thisDistance}px`
        item.style.transform = `
        translate3d(0,0,-${thisDistance}px)
        rotateY(${Math.random() * 360}deg)
        rotateX(${Math.random() * -50}deg)
        scale(${speed},${speed})`
      })
    },
    // 中间部分的表格
    getCenterTableDataSetInterval() {
      let startValue = 0 // 初始值
@@ -370,7 +433,7 @@
      let startValue = 0 // 初始值
      const scale = 10// 刻度
      WkshpLineData({ LineCode: 'DEV06' }).then(res => {
      WkshpLineData({ LineCode: '001' }).then(res => {
        this.tableDataLeftTopTemp = res.data
        this.tableDataLeftTop = this.tableDataLeftTopTemp.slice(startValue, startValue + scale)
@@ -393,7 +456,7 @@
      let startValue = 0 // 初始值
      const scale = 10// 刻度
      WkshpLineData({ LineCode: 'DEV02' }).then(res => {
      WkshpLineData({ LineCode: '002' }).then(res => {
        this.tableDataLeftBottomTemp = res.data
        this.tableDataLeftBottom = this.tableDataLeftBottomTemp.slice(startValue, startValue + scale)
@@ -416,7 +479,8 @@
      let startValue = 0 // 初始值
      const scale = 10// 刻度
      WkshpLineData({ LineCode: 'DEV03' }).then(res => {
      WkshpLineData({ LineCode: '003' }).then(res => {
        this.tableDataRightTopTemp = res.data
        this.tableDataRightTop = this.tableDataRightTopTemp.slice(startValue, startValue + scale)
        const loop = Math.floor(this.tableDataRightTopTemp.length / scale)// 需要循环的次数
@@ -438,7 +502,8 @@
      let startValue = 0 // 初始值
      const scale = 10// 刻度
      WkshpLineData({ LineCode: 'DEV04' }).then(res => {
      WkshpLineData({ LineCode: '004' }).then(res => {
        this.tableDataRightBottomTemp = res.data
        this.tableDataRightBottom = this.tableDataRightBottomTemp.slice(startValue, startValue + scale)
        const loop = Math.floor(this.tableDataRightBottomTemp.length / scale)// 需要循环的次数
@@ -530,6 +595,12 @@
$main_color: #09d8f2;
$color01: #00FFFF;
.tableDataCell {
  ::v-deep .cell{
    padding: 0 2px ;
  }
}
.tableData {
  background: #000;
}
@@ -543,3 +614,37 @@
}
</style>
<!--星空-->
<style lang="css" scoped>
@keyframes rotate {
  0% {
    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(0);
  }
  100% {
    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(-360deg);
  }
}
.stars {
  transform: perspective(500px);
  transform-style: preserve-3d;
  position: absolute;
  perspective-origin: 50% 100%;
  left: 45%;
  animation: rotate 90s infinite linear;
  bottom: 0;
  z-index: 102;
}
.star {
  width: 2px;
  height: 2px;
  /*background: #f7f7b6;*/
  background: #8edffc;
  position: absolute;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  z-index: 102;
}
</style>