小小儁爺
2024-09-20 328adde6e667404fd3aaf388c6191c5b88e8da92
src/views/kanbanManager/cj.vue
@@ -6,11 +6,12 @@
      <div class="kb_header">
        <div class="kb_headTime" style="top: 35px;left:  20px">
          <span>浙江优克工贸股份有限公司</span>
          <span>永康市桥下塑料厂</span>
        </div>
        <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
          <span>{{ title }}数字化看板</span>
          <!--          <span>{{ title }}数字化看板</span>-->
          <span>发泡挤出数字化看板</span>
        </div>
        <div class="kb_headTime" style="top: 35px;right:  25px">
@@ -29,7 +30,7 @@
            </div>
            <div
              class="lineContent horn"
              style="height: 450px;display: flex;flex-direction: column;justify-content: space-between"
              style="height: 870px;display: flex;flex-direction: column;justify-content: space-between"
            >
              <el-table
                ref="tableDataLeftCenterRef"
@@ -38,28 +39,34 @@
                style="width: 100%;"
                :header-cell-style="headerCellStyle"
                :cell-style="cellStyle"
                height="500"
                height="920"
              >
                <el-table-column
                  prop="wo_code"
                  label="工单号"
                  width="220"
                  width="270"
                />
                <!--                <el-table-column-->
                <!--                  prop="saleOrderCode"-->
                <!--                  label="生产单号"-->
                <!--                  width="160"-->
                <!--                />-->
                <el-table-column
                  prop="saleOrderCode"
                  label="生产单号"
                  width="160"
                  prop="wkshp_name"
                  label="生产车间"
                  width="210"
                />
                <!--                600-->
                <el-table-column
                  prop="partcode"
                  label="产品编码"
                  width="160"
                  width="210"
                />
                <el-table-column
                  prop="partname"
                  label="产品名称"
                  width="160"
                  width="210"
                />
<!--                <el-table-column-->
<!--                  prop="partspec"-->
@@ -73,47 +80,47 @@
                <el-table-column
                  prop="plan_qty"
                  label="任务数量"
                  width="120"
                  width="170"
                />
                <el-table-column
                  prop="good_qty"
                  label="合格数量"
                  width="120"
                  width="170"
                />
                <el-table-column
                  prop="ng_qty"
                  label="不良数量"
                  width="120"
                />
                <el-table-column
                  prop="laborbad_qty"
                  label="工废数量"
                  width="120"
                />
                <el-table-column
                  prop="materielbad_qty"
                  label="料废数量"
                  width="120"
                />
                <el-table-column
                  prop="seq"
                  label="工序顺序"
                  width="120"
                />
                <el-table-column
                  prop="step_code"
                  label="工序编码"
                  width="120"
                />
                <!--                <el-table-column-->
                <!--                  prop="ng_qty"-->
                <!--                  label="不良数量"-->
                <!--                  width="120"-->
                <!--                />-->
                <!--                <el-table-column-->
                <!--                  prop="laborbad_qty"-->
                <!--                  label="工废数量"-->
                <!--                  width="120"-->
                <!--                />-->
                <!--                <el-table-column-->
                <!--                  prop="materielbad_qty"-->
                <!--                  label="料废数量"-->
                <!--                  width="120"-->
                <!--                />-->
                <!--                <el-table-column-->
                <!--                  prop="seq"-->
                <!--                  label="工序顺序"-->
                <!--                  width="120"-->
                <!--                />-->
                <!--                <el-table-column-->
                <!--                  prop="step_code"-->
                <!--                  label="工序编码"-->
                <!--                  width="120"-->
                <!--                />-->
                <el-table-column
                  prop="step_name"
                  label="工序名称"
                  width="120"
                  width="320"
                />
                <el-table-column
                  prop="schedule"
                  label="完成进度(%)"
                  width="213"
                  width="313"
                />
              </el-table>
            </div>
@@ -121,27 +128,27 @@
        </div>
        <!--        下边-->
        <div style="display: flex;justify-content: space-between;margin-top: 15px;">
          <div style="width: 1000px;">
            <div class="smallTitle">
              <svg-icon icon-class="blcs" class="svg_class" />
              质量不良(近一周)
            </div>
            <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
              <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />
        <!--        <div style="display: flex;justify-content: space-between;margin-top: 15px;">-->
        <!--          <div style="width: 1000px;">-->
        <!--            <div class="smallTitle">-->
        <!--              <svg-icon icon-class="blcs" class="svg_class" />-->
        <!--              质量不良(近一周)-->
        <!--            </div>-->
        <!--            <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">-->
        <!--              <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />-->
            </div>
          </div>
          <div style="width: 850px;">
            <div class="smallTitle">
              <svg-icon icon-class="ckkc" class="svg_class" />
              不良统计(近一月)
            </div>
            <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
              <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" />
            </div>
          </div>
        </div>
        <!--            </div>-->
        <!--          </div>-->
        <!--          <div style="width: 850px;">-->
        <!--            <div class="smallTitle">-->
        <!--              <svg-icon icon-class="ckkc" class="svg_class" />-->
        <!--              不良统计(近一月)-->
        <!--            </div>-->
        <!--            <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">-->
        <!--              <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" />-->
        <!--            </div>-->
        <!--          </div>-->
        <!--        </div>-->
      </div>
    </div>
  </div>
@@ -182,7 +189,11 @@
    }
  },
  activated() {   window.addEventListener('resize', this.getHeight)   this.getHeight() }, created() {
  activated() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  created() {
    setInterval(this.getNowTime, 1000)
    // 两小时看板刷新一次
@@ -191,11 +202,13 @@
    }, 1000 * 60 * 120)
  },
  mounted() {
    this.getAllApi()
    // this.getAllApi()
    this.getWorkShopProduceTopData()
  },
  methods: {
    async getWorkShopProduceTopData() {
      WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
      // WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
      WorkShopProduceTopData({ wkshopcode: '101,102' }).then(res => {
        this.tableDataCenterTop = res.data
        const divData = this.$refs.tableDataLeftCenterRef.bodyWrapper
@@ -213,7 +226,7 @@
              }
            })
          }
        }, this.tableDataCenterTop.length <= 11 ? 1000 * 30 : 200)
        }, this.tableDataCenterTop.length <= 22 ? 1000 * 30 : 200)
      })
    },