小小儁爺
2024-06-12 ad47579fa77295dd2ebd0610c02421deeff8b982
1.工单SOP开发完成
已修改8个文件
1971 ■■■■■ 文件已修改
src/api/GeneralBasicData.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/SopManager.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kanbanManager/cgdd.vue 976 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kanbanManager/cj.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kanbanManager/ckgl.vue 418 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/kanbanManager/zhkb.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sopManager/sopWorkOrder.vue 509 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/GeneralBasicData.js
@@ -8,6 +8,7 @@
    params: data
  })
}
// 组织架构基础资料(无公司)
export function PrentOrganizationNoCompany(data) {
  return request({
@@ -155,6 +156,7 @@
    params: data
  })
}
// 仓库查找仓位信息
export function WareHouseSelectLocation(data) {
  return request({
@@ -173,3 +175,11 @@
  })
}
// 获取工单产品信息
export function WrkOrderDataSelect(data) {
  return request({
    url: 'GeneralBasicData/WrkOrderDataSelect',
    method: 'get',
    params: data
  })
}
src/api/SopManager.js
@@ -62,3 +62,40 @@
    params: data
  })
}
// 系统设置,工单SOP查询
export function WrkOrderSearch(data) {
  return request({
    url: 'SopManageMent/WrkOrderSearch',
    method: 'get',
    params: data
  })
}
// 系统设置,工单SOP上传获取最大版本号
export function WrkOrderSopMaxVersion(data) {
  return request({
    url: 'SopManageMent/WrkOrderSopMaxVersion',
    method: 'get',
    params: data
  })
}
// 系统设置,工单SOP新增
export function WrkOrderSopAddSeave(data) {
  return request({
    url: 'SopManageMent/WrkOrderSopAddSeave',
    method: 'post',
    data
  })
}
// 系统设置,工单SOP删除
export function WrkOrderSopDeleteSeave(data) {
  return request({
    url: 'SopManageMent/WrkOrderSopDeleteSeave',
    method: 'post',
    params: data
  })
}
src/views/kanbanManager/cgdd.vue
@@ -1,517 +1,517 @@
<template>
  <div>
    <div class="kb_dashboard">
<!--<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%" />
          采购跟踪数字化看板
          <div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
        </div>
        <div class="kb_headTime" style="left: 85px">
          <span>浙江新凯迪数字科技股份有限公司</span>
        </div>
        <div class="kb_headTime">
          <span>{{ headTime }}</span>
        </div>
      </div>
      <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 980px">
        <div style="width: 1250px;" class="flex_c_b">
          <div style="height: 380px;">
            <div>
              <div class="smallTitle">
                <svg-icon icon-class="cggz" class="svg_class" />
                采购跟踪
              </div>
              <div class="lineContent horn" style="height: 345px">
                <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" />
              </div>
            </div>
          </div>
          <div style="height: 560px; ">
            <div>
              <div class="smallTitle">
                <svg-icon icon-class="cggz" class="svg_class" />
                采购到货跟踪
              </div>
              <div class="lineContent horn" style="height: 525px">
                <el-table
                  ref="tableData"
                  :data="tableData"
                  class="tableData"
                  style="width: 100%;"
                  :header-cell-style="headerCellStyleCenter"
                  :cell-style="cellStyleCenter"
                  height="515"
                >
                  <el-table-column
                    prop="PurchaseOrder"
                    label="采购订单"
                    width="225"
                  >
                    <template slot-scope="{row}">
                      <div class="ellipsis">{{ row.PurchaseOrder }}</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="suppername"
                    label="供应商"
                    width="183"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.suppername" class="ellipsis">{{ row.suppername }}</div>
                      <div v-else />
                    </template>
                  </el-table-column>
                  <!--                  <el-table-column-->
                  <!--                    prop="username"-->
                  <!--                    label="采购员"-->
                  <!--                    width="78"-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.username">{{ row.username }}</div>-->
                  <!--                      <div v-else>/</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <!--                  <el-table-column-->
                  <!--                    prop="partcode"-->
                  <!--                    label="产品编码"-->
                  <!--                    width="108"-->
                  <!--                  />-->
                  <el-table-column
                    prop="partname"
                    label="产品名称"
                    width="215"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
                      <div v-else />
                    </template>
                  </el-table-column>
                  <!--                  <el-table-column-->
                  <!--                    prop="partspec"-->
                  <!--                    label="规格型号"-->
                  <!--                    width="130"-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.partspec" class="ellipsis">{{ row.partspec }}</div>-->
                  <!--                      <div v-else>/</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <el-table-column
                    prop="quantity"
                    label="订单数量"
                    width="114"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.quantity">{{ parseFloat(row.quantity) }}</div>
                      <div v-else>0</div>
                    </template>
                  </el-table-column>
                  <!--                  <el-table-column-->
                  <!--                    prop="checktype"-->
                  <!--                    label="检验状态"-->
                  <!--                    width="104"-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.checktype===null">未检验</div>-->
                  <!--                      <div v-else>已检验</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <!--                  <el-table-column-->
                  <!--                    prop="checkuser"-->
                  <!--                    label="检验人员"-->
                  <!--                    width="94"-->
                  <!--                  >-->
                  <!--                    <template slot-scope="{row}">-->
                  <!--                      <div v-if="row.checkuser===null">/</div>-->
                  <!--                      <div v-else>{{ row.checkuser }}</div>-->
                  <!--                    </template>-->
                  <!--                  </el-table-column>-->
                  <el-table-column
                    prop="quantity1"
                    label="已收数量"
                    width="114"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.quantity1">{{ parseFloat(row.quantity1) }}</div>
                      <div v-else>0</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    label="未收数量"
                    width="114"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div>
                      <div v-else>0</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="acceptDate"
                    label="预计交期"
                    width="135"
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.acceptDate">{{ row.acceptDate.substring(0, 10) }}</div>
                      <div v-else>/</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="warning"
                    label="延期天数"
                    width="144"
                  >
                    <template slot-scope="{row}">
                      <div v-if="parseFloat(row.warning)<0" style="color: red">{{
                        Math.abs(parseFloat(row.warning))
                      }}
                      </div>
                      <div v-else-if="row.warning===null||row.warning===''||row.warning>=0">0</div>
                      <!--                      <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div>-->
                      <!--                      <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">-->
                      <!--                        {{ row.warning }}-->
<!--      &lt;!&ndash;    星空背景&ndash;&gt;-->
<!--      <div ref="starsRef" class="stars">-->
<!--        <div v-for="(item, index) in starsCount" :key="index" class="star" />-->
                      <!--                      </div>-->
                    </template>
                  </el-table-column>
                </el-table>
<!--      <div class="kb_header">-->
<!--        <div class="flex_c_c kb_header_text">-->
<!--          <div id="topBarLeft" style="width:600px;height:100%" />-->
<!--          采购跟踪数字化看板-->
<!--          <div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />-->
<!--        </div>-->
<!--        <div class="kb_headTime" style="left: 85px">-->
<!--          <span>浙江新凯迪数字科技股份有限公司</span>-->
<!--        </div>-->
<!--        <div class="kb_headTime">-->
<!--          <span>{{ headTime }}</span>-->
<!--        </div>-->
<!--      </div>-->
<!--      <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 980px">-->
<!--        <div style="width: 1250px;" class="flex_c_b">-->
<!--          <div style="height: 380px;">-->
<!--            <div>-->
<!--              <div class="smallTitle">-->
<!--                <svg-icon icon-class="cggz" class="svg_class" />-->
<!--                采购跟踪-->
<!--              </div>-->
<!--              <div class="lineContent horn" style="height: 345px">-->
                <!--                <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" />-->
              </div>
            </div>
          </div>
        </div>
        <div style="width: 600px;">
          <div>
            <div class="smallTitle">
              <svg-icon icon-class="yqjh" class="svg_class" />
              供应商延期交货排行
            </div>
            <div class="lineContent horn" style="height: 925px">
              <el-table
                ref="tableDataRank"
                :data="tableDataRank"
                class="tableData"
                style="width: 100%;"
                :header-cell-style="headerCellStyleCenter"
                :cell-style="cellStyleCenter"
                :row-class-name="tableRowClassName"
                height="920"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  width="80"
                >
                  <template slot-scope="{row}">
                    <div>NO.{{ row.index }}</div>
                    <!--                      <div>NO.100</div>-->
                  </template>
                </el-table-column>
<!--              </div>-->
<!--            </div>-->
<!--          </div>-->
<!--          <div style="height: 560px; ">-->
<!--            <div>-->
<!--              <div class="smallTitle">-->
<!--                <svg-icon icon-class="cggz" class="svg_class" />-->
<!--                采购到货跟踪-->
<!--              </div>-->
<!--              <div class="lineContent horn" style="height: 525px">-->
<!--                <el-table-->
<!--                  ref="tableData"-->
<!--                  :data="tableData"-->
<!--                  class="tableData"-->
<!--                  style="width: 100%;"-->
<!--                  :header-cell-style="headerCellStyleCenter"-->
<!--                  :cell-style="cellStyleCenter"-->
<!--                  height="515"-->
<!--                >-->
                <!--                  <el-table-column-->
                <!--                    prop="cj"-->
                <!--                    label="车间"-->
                <!--                    width="100"-->
<!--                    prop="PurchaseOrder"-->
<!--                    label="采购订单"-->
<!--                    width="225"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div class="ellipsis">{{ row.PurchaseOrder }}</div>-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  <el-table-column-->
<!--                    prop="suppername"-->
<!--                    label="供应商"-->
<!--                    width="183"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.suppername" class="ellipsis">{{ row.suppername }}</div>-->
<!--                      <div v-else />-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                  &lt;!&ndash;                    prop="username"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    label="采购员"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    width="78"&ndash;&gt;-->
<!--                  &lt;!&ndash;                  >&ndash;&gt;-->
<!--                  &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-if="row.username">{{ row.username }}</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-else>/</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                    </template>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  </el-table-column>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                  &lt;!&ndash;                    prop="partcode"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    label="产品编码"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    width="108"&ndash;&gt;-->
<!--                  &lt;!&ndash;                  />&ndash;&gt;-->
<!--                  <el-table-column-->
<!--                    prop="partname"-->
<!--                    label="产品名称"-->
<!--                    width="215"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>-->
<!--                      <div v-else />-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                  &lt;!&ndash;                    prop="partspec"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    label="规格型号"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    width="130"&ndash;&gt;-->
<!--                  &lt;!&ndash;                  >&ndash;&gt;-->
<!--                  &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-if="row.partspec" class="ellipsis">{{ row.partspec }}</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-else>/</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                    </template>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  </el-table-column>&ndash;&gt;-->
<!--                  <el-table-column-->
<!--                    prop="quantity"-->
<!--                    label="订单数量"-->
<!--                    width="114"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.quantity">{{ parseFloat(row.quantity) }}</div>-->
<!--                      <div v-else>0</div>-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                  &lt;!&ndash;                    prop="checktype"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    label="检验状态"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    width="104"&ndash;&gt;-->
<!--                  &lt;!&ndash;                  >&ndash;&gt;-->
<!--                  &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-if="row.checktype===null">未检验</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-else>已检验</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                    </template>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  </el-table-column>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                  &lt;!&ndash;                    prop="checkuser"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    label="检验人员"&ndash;&gt;-->
<!--                  &lt;!&ndash;                    width="94"&ndash;&gt;-->
<!--                  &lt;!&ndash;                  >&ndash;&gt;-->
<!--                  &lt;!&ndash;                    <template slot-scope="{row}">&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-if="row.checkuser===null">/</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                      <div v-else>{{ row.checkuser }}</div>&ndash;&gt;-->
<!--                  &lt;!&ndash;                    </template>&ndash;&gt;-->
<!--                  &lt;!&ndash;                  </el-table-column>&ndash;&gt;-->
<!--                  <el-table-column-->
<!--                    prop="quantity1"-->
<!--                    label="已收数量"-->
<!--                    width="114"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.quantity1">{{ parseFloat(row.quantity1) }}</div>-->
<!--                      <div v-else>0</div>-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  <el-table-column-->
<!--                    label="未收数量"-->
<!--                    width="114"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div>-->
<!--                      <div v-else>0</div>-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  <el-table-column-->
<!--                    prop="acceptDate"-->
<!--                    label="预计交期"-->
<!--                    width="135"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="row.acceptDate">{{ row.acceptDate.substring(0, 10) }}</div>-->
<!--                      <div v-else>/</div>-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                  <el-table-column-->
<!--                    prop="warning"-->
<!--                    label="延期天数"-->
<!--                    width="144"-->
<!--                  >-->
<!--                    <template slot-scope="{row}">-->
<!--                      <div v-if="parseFloat(row.warning)<0" style="color: red">{{-->
<!--                        Math.abs(parseFloat(row.warning))-->
<!--                      }}-->
<!--                      </div>-->
<!--                      <div v-else-if="row.warning===null||row.warning===''||row.warning>=0">0</div>-->
<!--                      &lt;!&ndash;                      <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div>&ndash;&gt;-->
<!--                      &lt;!&ndash;                      <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">&ndash;&gt;-->
<!--                      &lt;!&ndash;                        {{ row.warning }}&ndash;&gt;-->
<!--                      &lt;!&ndash;                      </div>&ndash;&gt;-->
<!--                    </template>-->
<!--                  </el-table-column>-->
<!--                </el-table>-->
<!--                &lt;!&ndash;                <div id="cgddchart" class="flex_c_c" style="width: 100%;height:100%" />&ndash;&gt;-->
<!--              </div>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--        <div style="width: 600px;">-->
<!--          <div>-->
<!--            <div class="smallTitle">-->
<!--              <svg-icon icon-class="yqjh" class="svg_class" />-->
<!--              供应商延期交货排行-->
<!--            </div>-->
<!--            <div class="lineContent horn" style="height: 925px">-->
<!--              <el-table-->
<!--                ref="tableDataRank"-->
<!--                :data="tableDataRank"-->
<!--                class="tableData"-->
<!--                style="width: 100%;"-->
<!--                :header-cell-style="headerCellStyleCenter"-->
<!--                :cell-style="cellStyleCenter"-->
<!--                :row-class-name="tableRowClassName"-->
<!--                height="920"-->
<!--              >-->
<!--                <el-table-column-->
<!--                  type="index"-->
<!--                  label="序号"-->
<!--                  width="80"-->
<!--                >-->
<!--                  <template slot-scope="{row}">-->
<!--                    <div>NO.{{ row.index }}</div>-->
<!--                    &lt;!&ndash;                      <div>NO.100</div>&ndash;&gt;-->
<!--                  </template>-->
<!--                </el-table-column>-->
<!--                &lt;!&ndash;                  <el-table-column&ndash;&gt;-->
<!--                &lt;!&ndash;                    prop="cj"&ndash;&gt;-->
<!--                &lt;!&ndash;                    label="车间"&ndash;&gt;-->
<!--                &lt;!&ndash;                    width="100"&ndash;&gt;-->
<!--                &lt;!&ndash;                  />&ndash;&gt;-->
<!--                <el-table-column-->
<!--                  prop="suppercode"-->
<!--                  label="供应商编码"-->
<!--                  width="140"-->
<!--                >-->
<!--                  <template slot-scope="{row}">-->
<!--                    <div v-if="row.suppercode" class="ellipsis">{{ row.suppercode }}</div>-->
<!--                    <div v-else />-->
<!--                  </template>-->
<!--                </el-table-column>-->
<!--                <el-table-column-->
<!--                  prop="suppername"-->
<!--                  width="293"-->
<!--                  label="供应商名称"-->
<!--                >-->
<!--                  <template slot-scope="{row}">-->
<!--                    <div class="ellipsis">{{ row.suppername }}</div>-->
<!--                  </template>-->
<!--                </el-table-column>-->
<!--                <el-table-column-->
<!--                  prop="cont"-->
<!--                  label="次数"-->
<!--                  width="81"-->
                <!--                  />-->
                <el-table-column
                  prop="suppercode"
                  label="供应商编码"
                  width="140"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.suppercode" class="ellipsis">{{ row.suppercode }}</div>
                    <div v-else />
                  </template>
                </el-table-column>
                <el-table-column
                  prop="suppername"
                  width="293"
                  label="供应商名称"
                >
                  <template slot-scope="{row}">
                    <div class="ellipsis">{{ row.suppername }}</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="cont"
                  label="次数"
                  width="81"
                />
              </el-table>
            </div>
          </div>
        </div>
      </div>
<!--              </el-table>-->
<!--            </div>-->
<!--          </div>-->
<!--        </div>-->
<!--      </div>-->
    </div>
  </div>
</template>
<!--    </div>-->
<!--  </div>-->
<!--</template>-->
<script>
import './kbCommon.css'
import { cgddchart, kbTop, loadEcharts } from '@/utils/myEcharts'
import { PurchaseLeftBottom, PurchaseLeftTop, PurchaseRight } from '@/api/kanbanManager'
<!--<script>-->
<!--import './kbCommon.css'-->
<!--import { cgddchart, kbTop, loadEcharts } from '@/utils/myEcharts'-->
<!--import { PurchaseLeftBottom, PurchaseLeftTop, PurchaseRight } from '@/api/kanbanManager'-->
export default {
  name: 'Index2',
  data() {
    return {
      onLine: navigator.onLine, // 监听网络是否在线
<!--export default {-->
<!--  name: 'Index2',-->
<!--  data() {-->
<!--    return {-->
<!--      onLine: navigator.onLine, // 监听网络是否在线-->
      headTime: '',
      purchaseLeftTopData: {},
<!--      headTime: '',-->
<!--      purchaseLeftTopData: {},-->
      tableData: [],
      tableDataRank: [],
<!--      tableData: [],-->
<!--      tableDataRank: [],-->
      PurchaseRight: null,
      PurchaseLeftBottom: null,
<!--      PurchaseRight: null,-->
<!--      PurchaseLeftBottom: null,-->
      starsCount: 800, // 星星数量
      distance: 900 // 间距
<!--      starsCount: 800, // 星星数量-->
<!--      distance: 900 // 间距-->
    }
  },
<!--    }-->
<!--  },-->
  created() {
    setInterval(this.getNowTime, 1000)
<!--  created() {-->
<!--    setInterval(this.getNowTime, 1000)-->
    // 两小时看板刷新一次
    setInterval(() => {
      window.location.reload()
    }, 1000 * 60 * 60 * 10)
  },
  mounted() {
    // 监听网络是否在线
    window.addEventListener('online', this.updateOnlineStatus)
    window.addEventListener('offline', this.updateOnlineStatus)
    this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
<!--    // 两小时看板刷新一次-->
<!--    setInterval(() => {-->
<!--      window.location.reload()-->
<!--    }, 1000 * 60 * 60 * 10)-->
<!--  },-->
<!--  mounted() {-->
<!--    // 监听网络是否在线-->
<!--    window.addEventListener('online', this.updateOnlineStatus)-->
<!--    window.addEventListener('offline', this.updateOnlineStatus)-->
<!--    this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })-->
    this.getTopBar()
    this.getEcharts()
    this.getPurchaseLeftBottom()
    this.getPurchaseRight()
<!--    this.getTopBar()-->
<!--    this.getEcharts()-->
<!--    this.getPurchaseLeftBottom()-->
<!--    this.getPurchaseRight()-->
    this.setStarsRef()
  },
  beforeDestroy() {
    window.removeEventListener('online', this.updateOnlineStatus)
    window.removeEventListener('offline', this.updateOnlineStatus)
  },
  methods: {
    // 更新网络状态
    updateOnlineStatus(e) {
      if (e.isFirst) {
        // console.log('x')
      } else {
        const loading = this.$loading({
          lock: true,
          text: '断网了,正在拼命联网中,请检查网络是否正常...',
          spinner: 'el-icon-loading',
          customClass: 'osloading',
          background: 'rgba(0, 0, 0, 0.7)'
        })
        const { type } = e
        this.onLine = type === 'online'
        if (this.onLine) {
          loading.close()
          this.$message.success('网络连接成功!')
        } else {
          this.$message.error('网络掉线,请关注网络状态!')
        }
      }
    },
    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})`
      })
    },
    // 获取topEcharts
    getTopBar() {
      loadEcharts('topBarLeft', kbTop())
      loadEcharts('topBarRight', kbTop())
    },
    // 获取echarts
    async getEcharts() {
      PurchaseLeftTop().then(res => {
        this.purchaseLeftTopData = res.data[0]
        loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))
        // loadEcharts('cgddchart', cgddchart(30, 5, 10))
      })
      setInterval(() => {
        PurchaseLeftTop().then(res => {
          this.purchaseLeftTopData = res.data[0]
          loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))
        })
      }, 1000 * 6)
    },
    getPurchaseLeftBottom() {
      PurchaseLeftBottom().then(res => {
        this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值
<!--    this.setStarsRef()-->
<!--  },-->
<!--  beforeDestroy() {-->
<!--    window.removeEventListener('online', this.updateOnlineStatus)-->
<!--    window.removeEventListener('offline', this.updateOnlineStatus)-->
<!--  },-->
<!--  methods: {-->
<!--    // 更新网络状态-->
<!--    updateOnlineStatus(e) {-->
<!--      if (e.isFirst) {-->
<!--        // console.log('x')-->
<!--      } else {-->
<!--        const loading = this.$loading({-->
<!--          lock: true,-->
<!--          text: '断网了,正在拼命联网中,请检查网络是否正常...',-->
<!--          spinner: 'el-icon-loading',-->
<!--          customClass: 'osloading',-->
<!--          background: 'rgba(0, 0, 0, 0.7)'-->
<!--        })-->
<!--        const { type } = e-->
<!--        this.onLine = type === 'online'-->
<!--        if (this.onLine) {-->
<!--          loading.close()-->
<!--          this.$message.success('网络连接成功!')-->
<!--        } else {-->
<!--          this.$message.error('网络掉线,请关注网络状态!')-->
<!--        }-->
<!--      }-->
<!--    },-->
<!--    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})`-->
<!--      })-->
<!--    },-->
<!--    // 获取topEcharts-->
<!--    getTopBar() {-->
<!--      loadEcharts('topBarLeft', kbTop())-->
<!--      loadEcharts('topBarRight', kbTop())-->
<!--    },-->
<!--    // 获取echarts-->
<!--    async getEcharts() {-->
<!--      PurchaseLeftTop().then(res => {-->
<!--        this.purchaseLeftTopData = res.data[0]-->
<!--        loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))-->
<!--        // loadEcharts('cgddchart', cgddchart(30, 5, 10))-->
<!--      })-->
<!--      setInterval(() => {-->
<!--        PurchaseLeftTop().then(res => {-->
<!--          this.purchaseLeftTopData = res.data[0]-->
<!--          loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont))-->
<!--        })-->
<!--      }, 1000 * 6)-->
<!--    },-->
<!--    getPurchaseLeftBottom() {-->
<!--      PurchaseLeftBottom().then(res => {-->
<!--        this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值-->
        // this.number1 = this.tableData.length
<!--        // this.number1 = this.tableData.length-->
        const divData = this.$refs.tableData.bodyWrapper
        // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素)
        this.PurchaseLeftBottom = setInterval(() => {
          // 元素自增距离顶部1像素
          divData.scrollTop += 1
          // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // 重置table距离顶部距离
            divData.scrollTop = 0
            PurchaseLeftBottom().then(res => {
              this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值
              // this.number1 = this.tableData.length
              if (this.tableData.length > 13) {
                clearInterval(this.PurchaseLeftBottom)
                this.getPurchaseLeftBottom()
              }
            })
          }
        }, this.tableData.length <= 13 ? 1000 * 3 : 100)
      })
    },
    getPurchaseRight() {
      PurchaseRight().then(res => {
        this.tableDataRank = res.data
        const divData = this.$refs.tableDataRank.bodyWrapper
        // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素)
        this.PurchaseRight = setInterval(() => {
          // 元素自增距离顶部1像素
          divData.scrollTop += 1
          // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)
          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
            // 重置table距离顶部距离
            divData.scrollTop = 0
            PurchaseRight().then(res => {
              this.tableDataRank = res.data
              if (this.tableDataRank.length > 23) {
                clearInterval(this.PurchaseRight)
                this.getPurchaseRight()
              }
            })
          }
        }, this.tableDataRank.length <= 23 ? 1000 * 3 : 100)
      })
    },
    tableRowClassName({ row, rowIndex }) {
      // 把每一行的索引放进row
      row.index = rowIndex + 1
    },
<!--        const divData = this.$refs.tableData.bodyWrapper-->
<!--        // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素)-->
<!--        this.PurchaseLeftBottom = setInterval(() => {-->
<!--          // 元素自增距离顶部1像素-->
<!--          divData.scrollTop += 1-->
<!--          // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)-->
<!--          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {-->
<!--            // 重置table距离顶部距离-->
<!--            divData.scrollTop = 0-->
<!--            PurchaseLeftBottom().then(res => {-->
<!--              this.tableData = res.data.filter(i => !parseFloat(i.quantity1))// 过滤掉已收数量大于零的值-->
<!--              // this.number1 = this.tableData.length-->
<!--              if (this.tableData.length > 13) {-->
<!--                clearInterval(this.PurchaseLeftBottom)-->
<!--                this.getPurchaseLeftBottom()-->
<!--              }-->
<!--            })-->
<!--          }-->
<!--        }, this.tableData.length <= 13 ? 1000 * 3 : 100)-->
<!--      })-->
<!--    },-->
<!--    getPurchaseRight() {-->
<!--      PurchaseRight().then(res => {-->
<!--        this.tableDataRank = res.data-->
<!--        const divData = this.$refs.tableDataRank.bodyWrapper-->
<!--        // 拿到元素后,对元素进行定时增加距离顶部距离,实现滚动效果(此配置为每100毫秒移动1像素)-->
<!--        this.PurchaseRight = setInterval(() => {-->
<!--          // 元素自增距离顶部1像素-->
<!--          divData.scrollTop += 1-->
<!--          // 判断元素是否滚动到底部(可视高度+距离顶部=整个高度)-->
<!--          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {-->
<!--            // 重置table距离顶部距离-->
<!--            divData.scrollTop = 0-->
<!--            PurchaseRight().then(res => {-->
<!--              this.tableDataRank = res.data-->
<!--              if (this.tableDataRank.length > 23) {-->
<!--                clearInterval(this.PurchaseRight)-->
<!--                this.getPurchaseRight()-->
<!--              }-->
<!--            })-->
<!--          }-->
<!--        }, this.tableDataRank.length <= 23 ? 1000 * 3 : 100)-->
<!--      })-->
<!--    },-->
<!--    tableRowClassName({ row, rowIndex }) {-->
<!--      // 把每一行的索引放进row-->
<!--      row.index = rowIndex + 1-->
<!--    },-->
    // 获取当前时间
    getNowTime() {
      const dt = new Date()
      const wk = dt.getDay()
      const y = dt.getFullYear()
      const m = (dt.getMonth() + 1 + '').padStart(2, '0')
      const d = (dt.getDate() + '').padStart(2, '0')
<!--    // 获取当前时间-->
<!--    getNowTime() {-->
<!--      const dt = new Date()-->
<!--      const wk = dt.getDay()-->
<!--      const y = dt.getFullYear()-->
<!--      const m = (dt.getMonth() + 1 + '').padStart(2, '0')-->
<!--      const d = (dt.getDate() + '').padStart(2, '0')-->
      const hh = (dt.getHours() + '').padStart(2, '0')
      const mm = (dt.getMinutes() + '').padStart(2, '0')
      const ss = (dt.getSeconds() + '').padStart(2, '0')
      const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
      const week = weeks[wk]
<!--      const hh = (dt.getHours() + '').padStart(2, '0')-->
<!--      const mm = (dt.getMinutes() + '').padStart(2, '0')-->
<!--      const ss = (dt.getSeconds() + '').padStart(2, '0')-->
<!--      const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']-->
<!--      const week = weeks[wk]-->
      this.headTime = `${y}-${m}-${d}  ${hh}:${mm}:${ss}   ${week}`
    },
    headerCellStyleCenter() {
      return {
        // backgroundColor: 'rgb(30 ,33, 46)',
        backgroundColor: '#000',
        padding: '10px 0',
        textAlign: 'center',
        color: '#07acc2',
        border: 'none',
        fontSize: '18px'
      }
    },
    cellStyleCenter() {
      return {
        padding: '7.5px 0',
        textAlign: 'center',
        backgroundColor: '#000',
        color: '#fff',
        border: 'none',
        fontSize: '18px'
      }
    }
  }
}
</script>
<!--      this.headTime = `${y}-${m}-${d}  ${hh}:${mm}:${ss}   ${week}`-->
<!--    },-->
<!--    headerCellStyleCenter() {-->
<!--      return {-->
<!--        // backgroundColor: 'rgb(30 ,33, 46)',-->
<!--        backgroundColor: '#000',-->
<!--        padding: '10px 0',-->
<!--        textAlign: 'center',-->
<!--        color: '#07acc2',-->
<!--        border: 'none',-->
<!--        fontSize: '18px'-->
<!--      }-->
<!--    },-->
<!--    cellStyleCenter() {-->
<!--      return {-->
<!--        padding: '7.5px 0',-->
<!--        textAlign: 'center',-->
<!--        backgroundColor: '#000',-->
<!--        color: '#fff',-->
<!--        border: 'none',-->
<!--        fontSize: '18px'-->
<!--      }-->
<!--    }-->
<!--  }-->
<!--}-->
<!--</script>-->
<style scoped lang="scss">
$main_color: #09d8f2;
$color01: #00FFFF;
.tableData {
  background: #000;
}
<!--<style scoped lang="scss">-->
<!--$main_color: #09d8f2;-->
<!--$color01: #00FFFF;-->
<!--.tableData {-->
<!--  background: #000;-->
<!--}-->
.el-table__empty-text {
  color: $main_color;
}
<!--.el-table__empty-text {-->
<!--  color: $main_color;-->
<!--}-->
::v-deep .el-table::before {
  height: 0;
}
<!--::v-deep .el-table::before {-->
<!--  height: 0;-->
<!--}-->
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
  /* width: 0;宽度为0暗藏 */
  width: 0;
}
<!--::v-deep .el-table__body-wrapper::-webkit-scrollbar {-->
<!--  /* width: 0;宽度为0暗藏 */-->
<!--  width: 0;-->
<!--}-->
::v-deep .cell {
  padding: 0 !important;
  font-size: 18px;
}
</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);
  }
}
<!--::v-deep .cell {-->
<!--  padding: 0 !important;-->
<!--  font-size: 18px;-->
<!--}-->
<!--</style>-->
<!--&lt;!&ndash;星空&ndash;&gt;-->
<!--<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;
}
<!--.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>
<!--.star {-->
<!--  width: 2px;-->
<!--  height: 2px;-->
<!--  /*background: #f7f7b6;*/-->
<!--  background: #8edffc;-->
<!--  position: absolute;-->
<!--  left: 0;-->
<!--  top: 0;-->
<!--  backface-visibility: hidden;-->
<!--  z-index: 102;-->
<!--}-->
<!--</style>-->
src/views/kanbanManager/cj.vue
@@ -6,10 +6,10 @@
      <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:  765px">
        <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
          <span>{{ title }}数字化看板</span>
        </div>
@@ -251,14 +251,14 @@
        })
      }, 1000 * 50)
      const res5 = await WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') })
      const res5 = await WorkShopProduceBottomRightData({ wkshopcode: 'CJ001' })
      this.RightBottom = res5.data
      if (this.RightBottom.length > 0) {
        loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
      }
      setInterval(() => {
        WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') }).then(res5 => {
        WorkShopProduceBottomRightData({ wkshopcode: 'CJ001' }).then(res5 => {
          this.RightBottom = res5.data
          if (this.RightBottom.length > 0) {
            loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
@@ -266,7 +266,7 @@
        })
      }, 1000 * 60)
      this.getWorkShopProduceTopData()
      await this.getWorkShopProduceTopData()
    },
    // 获取当前时间
@@ -348,6 +348,10 @@
  background-color: transparent;
}
::v-deep .gutter {
  display: none;
}
.all_block01 {
  width: 237px;
  height: 180px;
src/views/kanbanManager/ckgl.vue
@@ -2,34 +2,29 @@
  <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_backgroundCustom" />
      <div class="kb_header">
        <div class="flex_c_c kb_header_text">
          <div id="topBarLeft" style="width:600px;height:100%" />
          仓库管理数字化看板
          <div id="topBarRight" style="width:600px;height:100%;transform:rotate(180deg);" />
        <div class="kb_headTime" style="top: 35px;left:  20px">
          <span>浙江优克工贸股份有限公司</span>
        </div>
        <div class="kb_headTime" style="left: 85px">
          <span>浙江新凯迪数字科技股份有限公司</span>
        <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
          <span>仓库管理数字化看板</span>
        </div>
        <div class="kb_headTime">
        <div class="kb_headTime" style="top: 35px;right:  25px">
          <span>{{ headTime }}</span>
        </div>
      </div>
      <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 980px">
        <div style="width: 1350px; " class="flex_c_b">
      <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 950px">
        <div style="width: 1350px;z-index: 2;margin-top: 50px;" class="flex_c_b">
          <div style="height: 470px;">
            <div class="smallTitle">
              <svg-icon icon-class="cpdrk" class="svg_class" />
              生产待入库
              采购待入库
            </div>
            <div class="lineContent horn" style="height: 435px">
            <div class="lineContent horn" style="height: 410px">
              <el-table
                ref="tableDataTopRef"
                :data="tableDataTop"
@@ -37,12 +32,12 @@
                class="tableData"
                :header-cell-style="headerCellStyleCenter"
                :cell-style="cellStyleCenter"
                height="430"
                height="405"
              >
                <el-table-column
                  prop="voucherdate"
                  label="单据日期"
                  width="131"
                  width="161"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
@@ -52,63 +47,55 @@
                <el-table-column
                  prop="wo"
                  label="单据编号"
                  width="189"
                  width="209"
                >
                  <template slot-scope="{row}">
                    <div class="ellipsis">{{ row.wo }}</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="wkshp_name"
                  label="生产车间"
                  width="105"
                >
                  <template slot-scope="{row}">
                    <div class="ellipsis">{{ row.wkshp_name }}</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="saleOrderCode"
                  label="销售订单号"
                  width="200"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="materiel_code"
                  label="产品编号"
                  width="136"
                >
                  <template slot-scope="{row}">
                    <div class="ellipsis">{{ row.materiel_code }}</div>
                  </template>
                </el-table-column>
                <!--                <el-table-column-->
                <!--                  prop="wkshp_name"-->
                <!--                  label="生产车间"-->
                <!--                  width="105"-->
                <!--                >-->
                <!--                  <template slot-scope="{row}">-->
                <!--                    <div class="ellipsis">{{ row.wkshp_name }}</div>-->
                <!--                  </template>-->
                <!--                </el-table-column>-->
                <!--                <el-table-column-->
                <!--                  prop="saleOrderCode"-->
                <!--                  label="销售订单号"-->
                <!--                  width="210"-->
                <!--                >-->
                <!--                  <template slot-scope="{row}">-->
                <!--                    <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div>-->
                <!--                    <div v-else>/</div>-->
                <!--                  </template>-->
                <!--                </el-table-column>-->
                <el-table-column
                  prop="materiel_name"
                  label="产品名称"
                  width="180"
                  width="390"
                >
                  <template slot-scope="{row}">
                    <div class="ellipsis">{{ row.materiel_name }}</div>
                  </template>
                </el-table-column>
                <!--                  <el-table-column-->
                <!--                    prop="specification"-->
                <!--                    label="规格型号"-->
                <!--                    width="128"-->
                <!--                  >-->
                <!--                    <template slot-scope="{row}">-->
                <!--                      <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>-->
                <!--                      <div v-else>/</div>-->
                <!--                    </template>-->
                <!--                  </el-table-column>-->
                <el-table-column
                  prop="specification"
                  label="规格型号"
                  width="146"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="stck_name"
                  label="预入仓库"
                  width="100"
                  width="145"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
@@ -118,52 +105,28 @@
                <el-table-column
                  prop="quantity"
                  label="数量"
                  width="63"
                  width="113"
                />
                <el-table-column
                  prop="totalStockInQuantity"
                  label="已入库数量"
                  width="100"
                  width="160"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div>
                    <div v-else>0</div>
                  </template>
                </el-table-column>
                <!--                  <el-table-column-->
                <!--                    prop="uomname"-->
                <!--                    label="单位"-->
                <!--                    width="50"-->
                <!--                  />-->
                <!--                  <el-table-column-->
                <!--                    prop="preStartDate"-->
                <!--                    label="预计开工"-->
                <!--                    width="100"-->
                <!--                  >-->
                <!--                    <template slot-scope="{row}">-->
                <!--                      <div v-if="row.preStartDate">{{ row.preStartDate.substring(0, 10) }}</div>-->
                <!--                      <div v-else />-->
                <!--                    </template>-->
                <!--                  </el-table-column>-->
                <el-table-column
                  prop="preFinishDate"
                  label="预计入库"
                  width="140"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.preFinishDate">{{ row.preFinishDate.substring(0, 10) }}</div>
                    <div v-else />
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </div>
          <div style="height: 470px;">
          <div style="height: 470px;margin-top: 30px;">
            <div class="smallTitle">
              <svg-icon icon-class="cpdfh" class="svg_class" />
              产品待发货
              销售待发货
            </div>
            <div class="lineContent horn" style="height: 435px">
            <div class="lineContent horn" style="height: 410px">
              <el-table
                ref="tableDataBottomRef"
                :data="tableDataBottom"
@@ -171,7 +134,7 @@
                class="tableData"
                :header-cell-style="headerCellStyleCenter"
                :cell-style="cellStyleCenter"
                height="430"
                height="405"
              >
                <el-table-column
                  prop="voucherdate"
@@ -192,60 +155,26 @@
                    <div class="ellipsis">{{ row.wo }}</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="customename"
                  label="客户"
                  width="388"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.customename" class="ellipsis">{{ row.customename }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <!--                  <el-table-column-->
                <!--                    prop="username"-->
                <!--                    label="业务员"-->
                <!--                    width="65"-->
                <!--                  >-->
                <!--                    <template slot-scope="{row}">-->
                <!--                      <div v-if="row.username" class="ellipsis">{{ row.username }}</div>-->
                <!--                      <div v-else>/</div>-->
                <!--                    </template>-->
                <!--                  </el-table-column>-->
                <!--                <el-table-column-->
                <!--                  prop="SourceVoucherCode"-->
                <!--                  label="来源单号"-->
                <!--                  width="185"-->
                <!--                >-->
                <!--                  <template slot-scope="{row}">-->
                <!--                    <div v-if="row.SourceVoucherCode" class="ellipsis">{{ row.SourceVoucherCode }}</div>-->
                <!--                    <div v-else>/</div>-->
                <!--                  </template>-->
                <!--                </el-table-column>-->
                <!--                  <el-table-column-->
                <!--                    prop="materiel_code"-->
                <!--                    label="产品编号"-->
                <!--                    width="96"-->
                <!--                  />-->
                <el-table-column
                  prop="materiel_name"
                  label="产品名称"
                  width="200"
                  width="258"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.materiel_name" class="ellipsis">{{ row.materiel_name }}</div>
                  </template>
                </el-table-column>
                <!--                  <el-table-column-->
                <!--                    prop="specification"-->
                <!--                    label="规格型号"-->
                <!--                    width="100"-->
                <!--                  >-->
                <!--                    <template slot-scope="{row}">-->
                <!--                      <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>-->
                <!--                      <div v-else>/</div>-->
                <!--                    </template>-->
                <!--                  </el-table-column>-->
                <el-table-column
                  prop="specification"
                  label="规格型号"
                  width="200"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="quantity"
                  label="数量"
@@ -265,33 +194,25 @@
                    <div v-else>0</div>
                  </template>
                </el-table-column>
                <!--                <el-table-column-->
                <!--                  prop="priuserdefnvc1"-->
                <!--                  label="检验方式"-->
                <!--                  width="110"-->
                <!--                >-->
                <!--                  <template slot-scope="{row}">-->
                <!--                    <div v-if="row.priuserdefnvc1">{{ row.priuserdefnvc1 }}</div>-->
                <!--                    <div v-else>/</div>-->
                <!--                  </template>-->
                <!--                </el-table-column>-->
                <!--                <el-table-column-->
                <!--                  prop="priuserdefnvc2"-->
                <!--                  label="检验人员"-->
                <!--                  width="110"-->
                <!--                >-->
                <!--                  <template slot-scope="{row}">-->
                <!--                    <div v-if="row.priuserdefnvc2">{{ row.priuserdefnvc2 }}</div>-->
                <!--                    <div v-else>/</div>-->
                <!--                  </template>-->
                <!--                </el-table-column>-->
                <el-table-column
                  prop="deliveryDate"
                  label="预计交货日期"
                  label="预计交付日期"
                  width="200"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.deliveryDate">{{ row.deliveryDate.substring(0,10) }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
                <el-table-column
                  prop="warning"
                  label="延期天数"
                  width="130"
                >
                  <template slot-scope="{row}">
                    <div v-if="row.warning">{{ row.warning }}</div>
                    <div v-else>/</div>
                  </template>
                </el-table-column>
@@ -300,23 +221,23 @@
          </div>
        </div>
        <div style="width: 500px;" class="flex_c_b">
        <div style="width: 500px;z-index: 2;margin-top: 50px;" class="flex_c_b">
          <div style="height: 470px;">
            <div class="smallTitle">
              <svg-icon icon-class="ph" class="svg_class" />
              半成品、产品库存量排行Top5
              近一周采购待入库物料排行Top5
            </div>
            <div class="lineContent horn" style="height: 435px">
            <div class="lineContent horn" style="height: 410px">
              <div id="bar03" style="width: 100%;height:100%; " />
              <!--/*              <div id="bar03" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />*/-->
            </div>
          </div>
          <div style="height: 470px;">
          <div style="height: 470px;margin-top: 30px;">
            <div class="smallTitle">
              <svg-icon icon-class="ph" class="svg_class" />
              原材料库存量排行Top5
              近一周销售待发货产品排行Top5
            </div>
            <div class="lineContent horn" style="height: 435px">
            <div class="lineContent horn" style="height: 410px">
              <div id="bar04" style="width: 100%;height:100%;" />
              <!--              <div id="bar04" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />-->
            </div>
@@ -332,10 +253,10 @@
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
import {
  WareHouseRightBottomData,
  WareHouseRightTopData,
  WareHouseTopLeftData,
  WareHouseTopBottomData,
  WareHouseTopLeftData
  WareHouseRightTopData,
  WareHouseRightBottomData
} from '@/api/kanbanManager'
export default {
@@ -369,7 +290,7 @@
    // 两小时看板刷新一次
    setInterval(() => {
      window.location.reload()
    }, 1000 * 60 * 60 * 10)
    }, 1000 * 60 * 120)
  },
  mounted() {
    // 监听网络是否在线
@@ -377,12 +298,9 @@
    window.addEventListener('offline', this.updateOnlineStatus)
    this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
    this.getTopBar()
    this.getWareHouseTopLeftData()
    this.getWareHouseTopBottomData()
    this.getEcharts()
    this.setStarsRef()
  },
  beforeDestroy() {
    window.removeEventListener('online', this.updateOnlineStatus)
@@ -410,24 +328,6 @@
          this.$message.error('网络掉线,请关注网络状态!')
        }
      }
    },
    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})`
      })
    },
    // 获取topEcharts
    getTopBar() {
      loadEcharts('topBarLeft', kbTop())
      loadEcharts('topBarRight', kbTop())
    },
    // 获取左上table数据
    getWareHouseTopLeftData() {
@@ -525,8 +425,7 @@
    },
    headerCellStyleCenter() {
      return {
        // backgroundColor: 'rgb(30 ,33, 46)',
        backgroundColor: '#000',
        backgroundColor: 'transparent ',
        padding: '10px 0',
        textAlign: 'center',
        color: '#07acc2',
@@ -538,8 +437,8 @@
      return {
        padding: '7.5px 0',
        textAlign: 'center',
        backgroundColor: '#000',
        color: '#fff',
        backgroundColor: 'transparent ',
        color: '#c7e7ff',
        border: 'none',
        fontSize: '18px'
      }
@@ -548,65 +447,130 @@
}
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
$main_color:#09d8f2;
$color01: #00FFFF;
.tableData{
  background: #000;
  background: transparent;
}
.el-table::before {
  height: 0;
}
.el-table__empty-text{
  color: $main_color;
}
.tableDataCell {
  ::v-deep .cell {
    padding: 0 2px;
  }
}
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
  /* width: 0;宽度为0暗藏 */
  width: 0;
  background: transparent;
}
::v-deep .el-table::before {
  height: 0;
::v-deep .el-table__body-wrapper {
  background: transparent;
}
::v-deep .cell {
  padding: 0 !important;
  //font-size: 16px;
  font-size: 18px;
::v-deep .el-table th,
::v-deep .el-table tr,
::v-deep .el-table td {
  background-color: transparent;
}
</style>
<!--星空-->
<style lang="css" scoped>
@keyframes rotate {
::v-deep .gutter {
  display: none;
}
.all_block01 {
  width: 237px;
  height: 180px;
}
.all_block02 {
  width: 100%;
  height: 49px;
  background: rgba(9, 216, 242, 0.1);
}
.all_block03 {
  width: 199px;
  height: 180px;
}
.all_block04 {
  width: 100%;
  height: 49px;
  background: rgba(9, 216, 242, 0.1);
}
.kb_center_block_children {
  height: 180px;
  //border: 1px solid $kbBorderColor;
  width: 240px;
  display: flex;
  z-index: 2;
  justify-content: space-around;
  align-items: center;
  flex-direction: column;
  margin: 10px;
  font-size: 22px;
  .box02 {
    background: url("../../assets/images/box02.png") no-repeat;
    transform: scale(1.5);
    width: 145px;
    height: 84px;
  }
}
.all_block05 {
  position: absolute;
  animation: upDown 3s ease-in-out infinite;
  left: 60px;
}
.all_block06 {
  position: absolute;
  animation: upDown2 3s ease-in-out infinite;
  left: 290px;
}
.all_block07 {
  position: absolute;
  animation: upDown 3s ease-in-out infinite;
  left: 520px;
}
@keyframes upDown {
  0% {
    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(0);
    top: 50px;
  }
  50% {
    top: 100px;
  }
  100% {
    transform: perspective(400px) rotateZ(20deg) rotateX(-40deg) rotateY(-360deg);
    top: 50px;
  }
}
.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;
@keyframes upDown2 {
  0% {
    top: 100px;
  }
  50% {
    top: 50px;
  }
  100% {
    top: 100px;
  }
}
.star {
  width: 2px;
  height: 2px;
  /*background: #f7f7b6;*/
  background: #8edffc;
  position: absolute;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  z-index: 102;
}
</style>
src/views/kanbanManager/zhkb.vue
@@ -6,7 +6,7 @@
      <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">
@@ -33,7 +33,7 @@
            >
              <div style="height: 180px;padding: 10px;display: flex;justify-content: space-around">
                <div v-for="i in LeftTopData01" :key="i.wkshp_code" class="flex_c_s">
                  <div class="all_block01 flex_c_s">
                  <div class="all_block01 flex_c_s" style="width: 317px;">
                    <div class="flex_c_c all_block02">{{ i.wkshp_name }}</div>
                    <div class="" style="display: flex;justify-content:space-between">
                      <div class="all_block02 flex_c_c" style="width: 49% ">任务数</div>
@@ -175,7 +175,7 @@
      const res = await PrentOrganizationNoCompany()
      this.wkshopArr = res.data
      const temp = ['00401', '00402', '00501']
      const temp = ['00301', '00302', '00303']
      temp.forEach(i => {
        const aa = this.wkshopArr.find(j => j.torg_code === i).torg_name
src/views/sopManager/sopWorkOrder.vue
@@ -1,11 +1,512 @@
<template />
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div class="bodyTopButtonGroup" style="justify-content: space-between;align-items: center">
        <el-button v-waves icon="el-icon-circle-plus-outline" type="primary" @click="add">文件上传</el-button>
        <div style="display: flex;align-items: center">
          <el-form
            ref="form"
            :model="form"
            label-width="100px"
            inline
          >
            <div class="elForm" style="justify-content: flex-start">
              <el-form-item style="margin-right: 30px">
                <el-checkbox v-model="checked" @change="checkedChange">最新版本</el-checkbox>
              </el-form-item>
              <el-form-item>
                <el-input v-model="form.search" placeholder="请输入关键字" style="width: 260px" />
              </el-form-item>
            </div>
          </el-form>
          <el-button v-waves type="primary" style="margin-left: 30px" icon="el-icon-search" @click="search">查询
          </el-button>
          <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
        </div>
      </div>
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef"
          class="tableFixed"
          :data="tableData"
          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
          border
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <el-table-column
            prop="rowNum"
            width="50"
            fixed
            label="序号"
          />
          <el-table-column
            prop="filename"
            label="文件名称"
            min-width="160"
            show-tooltip-when-overflow
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.filename">{{ row.filename }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="filetypename"
            label="文件类型"
            min-width="110"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.filetypename">{{ row.filetypename }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="version"
            label="版本号"
            min-width="110"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.version">{{ row.version }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="wo"
            label="工单号"
            min-width="110"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="materielcode"
            label="物料编码"
            min-width="110"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="materielname"
            label="物料名称"
            min-width="110"
            show-tooltip-when-overflow
            sortable="custom"
          />
          <el-table-column
            prop="username"
            min-width="110"
            label="上传人员"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.username">{{ row.username }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_date"
            label="上传时间"
            min-width="160"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.lm_date">{{ row.lm_date }}</div>
              <div v-else>/</div>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            width="120"
            fixed="right"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-tooltip v-del-tab-index class="item" effect="dark" content="预览" placement="top">
                  <i
                    class="el-icon-files"
                    style="cursor: pointer;color:#42b983;margin-right: 15px"
                    @click="check(row)"
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" style="cursor: pointer;color:#42b983;" @click="del(row)" />
                </el-tooltip>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!--分页-->
      <pagination
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="total,prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getWrkOrderSearch"
      />
    </div>
    <el-dialog
      v-el-drag-dialog
      title="文件上传"
      :visible.sync="dialogVisible"
      width="800px"
      :close-on-click-modal="false"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
        <el-form-item label="工单信息" prop="wocode">
          <el-select
            v-model="dialogForm.wocode"
            style="width: 200px"
            placeholder="请选择"
            filterable
            :popper-append-to-body="false"
            @change="devicetypecodeChange"
          >
            <el-option
              v-for="item in workOrderArr"
              :key="item.wo_code"
              :label="item.wo_code"
              :value="item.wo_code"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="产品信息" prop="partcode">
          <el-select
            v-model="dialogForm.partcode"
            style="width: 200px"
            placeholder="请选择"
            filterable
            disabled
            :popper-append-to-body="false"
          >
            <el-option
              v-for="item in partcodeArr"
              :key="item.partcode"
              :label="item.partname"
              :value="item.partcode"
            />
          </el-select>
        </el-form-item>
        <!--        <el-form-item label="文件名称" prop="defilename">-->
        <!--        <el-form-item label="文件名称">-->
        <!--          <el-input v-model="dialogForm.defilename" disabled style="width: 200px" />-->
        <!--        </el-form-item>-->
        <el-form-item label="文件类型" prop="filetypecode">
          <el-select
            v-model="dialogForm.filetypecode"
            style="width: 200px"
            placeholder="请选择"
            filterable
            :popper-append-to-body="false"
            @change="filetypecodeChange"
          >
            <el-option
              v-for="item in filetypeArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="版本号">
          <el-input v-model="dialogForm.fileversion" disabled style="width: 200px" />
        </el-form-item>
        <el-form-item label="文件上传" prop="Files">
          <div style="width: 200px;">
            <el-upload
              ref="uploadFileRef"
              style="display: inline-block;"
              action="#"
              :limit="1"
              :show-file-list="true"
              :on-exceed="handleExceed"
              :auto-upload="false"
              :multiple="false"
            >
              <!--              accept=".mp4,.pdf"-->
              <el-button
                v-waves
                type="primary"
                style="width: 200px;display: flex;justify-content: center"
                icon="el-icon-upload2"
              >选择文件
              </el-button>
            </el-upload>
          </div>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button v-waves @click="dialogVisibleCancel">取 消</el-button>
          <el-button
            v-waves
            type="primary"
            :loading="$store.state.app.buttonIsDisabled"
            :disabled="$store.state.app.buttonIsDisabled"
            @click="dialogVisibleConfirm"
          >确 定</el-button>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { WrkOrderSopAddSeave, WrkOrderSopDeleteSeave, WrkOrderSearch, WrkOrderSopMaxVersion } from '@/api/SopManager'
import { DeviceTypeSearch } from '@/api/DeviceManager'
import { EqpTypecodeSeachEqpPermissions, WrkOrderDataSelect } from '@/api/GeneralBasicData'
import waves from '@/directive/waves'
import elDragDialog from '@/directive/el-drag-dialog'
import { PartSelect } from '@/api/ProductModel'
export default {
  name: 'SopWorkOrder'
  name: 'Zzjg',
  components: {
    Pagination
  },
  directives: { waves, elDragDialog },
  data() {
    return {
      mouseHoverType: 'mouseout',
      isExpandForm: false,
      mainHeight: 0,
      tableHeight: 0,
      form: {
        check: 'N', // 是否选中最高版本
        search: '', // 搜索关键字
        prop: 'lm_date', // 排序字段
        order: 'desc', // 排序字段
        page: 1, // 第几页
        rows: 20 // 每页多少条
      },
      checked: false,
      total: 10,
      tableData: [],
      dialogVisible: false,
      dialogForm: {
        wocode: '', // 设备类型编码
        partcode: '', // 物料编码
        defilename: '',
        filetypecode: '', // 文件类型编码
        Files: '', // 文件
        fileversion: ''// 文件版本号
      },
      dialogFormRules: {
        wocode: [
          { required: true, message: '请选择设备类型', trigger: ['blur', 'change'] }
        ],
        partcode: [
          { required: true, message: '请选择产品信息', trigger: ['blur', 'change'] }
        ],
        defilename: [
          { required: true, message: '请输入名文件称', trigger: ['blur', 'change'] }
        ],
        filetypecode: [
          { required: true, message: '请选择文件类型', trigger: ['blur', 'change'] }
        ]
      },
      partcodeArr: [],
      workOrderArr: [],
      filetypeArr: [// 文件类型下拉数组
        { code: 'P001', name: '作业指导书' },
        { code: 'P002', name: '检验指导书' },
        { code: 'P003', name: '图纸' }
      ]
    }
  },
  created() {
    this.getWrkOrderSearch()
    this.getPartSelect()
    this.getWrkOrderDataSelect()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    async getWrkOrderSearch() {
      const res = await WrkOrderSearch(this.form)
      this.tableData = res.data
      this.total = res.count
    },
    async getWrkOrderDataSelect() {
      const { data: res } = await WrkOrderDataSelect()
      this.workOrderArr = res
    },
    // 获取产品信息
    async getPartSelect() {
      const { data: res } = await PartSelect()
      this.partcodeArr = res
    },
    // 排序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getWrkOrderSearch()
    },
    // 查询
    search() {
      this.getWrkOrderSearch()
    },
    // 最新版本改变时触发
    checkedChange(val) {
      this.form.check = val ? 'Y' : 'N'
      this.getWrkOrderSearch()
    },
    // 文件数量超过限定触发
    handleExceed() {
      this.$message.info('暂不支持多文件上传!')
    },
    async devicetypecodeChange(val) {
      const t = this.workOrderArr.find(i => i.wo_code === val)
      this.dialogForm.partcode = t.materiel_code
      await this.filetypecodeChange()
    },
    async filetypecodeChange() {
      const data = {
        wocode: this.dialogForm.wocode,
        partcode: this.dialogForm.partcode,
        filetypecode: this.dialogForm.filetypecode
      }
      const { data: res } = await WrkOrderSopMaxVersion(data)
      this.dialogForm.fileversion = res
    },
    // 重置
    reset() {
      this.form.search = ''
      this.getWrkOrderSearch()
    },
    // 新增按钮
    add() {
      this.dialogVisible = true
    },
    // 预览
    async check(row) {
      window.open(process.env.VUE_APP_BASE_API_FILE + row.filepath)
    },
    // 删除按钮
    async del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const data = {
          id: row.id,
          wocode: row.wo,
          partcode: row.materielcode,
          filepath: row.filepath
        }
        WrkOrderSopDeleteSeave(data).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {
              this.form.page--
            }
            this.getWrkOrderSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // 对话框关闭事件
    handleClose() {
      this.dialogForm.wocode = ''
      this.dialogForm.partcode = ''
      this.dialogForm.defilename = ''
      this.dialogForm.filetypecode = ''
      this.dialogForm.fileversion = ''
      this.dialogForm.Files = ''
      this.$refs.uploadFileRef.clearFiles()
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消
    dialogVisibleCancel() {
      this.dialogVisible = false
      this.$store.state.app.buttonIsDisabled = false
    },
    // 对话框确认
    dialogVisibleConfirm() {
      if (!this.$refs.uploadFileRef.uploadFiles[0]) {
        this.$message.info('请选择文件上传!')
      }
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const formData = new FormData()
          formData.append('wocode', this.dialogForm.wocode)
          formData.append('partcode', this.dialogForm.partcode)
          formData.append('filename', this.$refs.uploadFileRef.uploadFiles[0].name)
          formData.append('filetypecode', this.dialogForm.filetypecode)
          formData.append('version', this.dialogForm.fileversion)
          formData.append('file', this.$refs.uploadFileRef.uploadFiles[0].raw)
          // for (var [key, value] of formData) {
          //   console.log(key, value)
          // }
          this.$store.state.app.buttonIsDisabled = true
          WrkOrderSopAddSeave(formData).then(res => {
            if (res.code === '200') {
              this.$message.success('文件上传成功!')
              this.dialogVisible = false
              this.$store.state.app.buttonIsDisabled = false
              this.getWrkOrderSearch()
            } else {
              this.$message.error('文件上传失败!')
              this.$store.state.app.buttonIsDisabled = false
            }
          })
        }
      })
    },
    // 获取页面高度
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 185
        this.$refs.tableDataRef.doLayout()
      })
    },
    tableRowClassName({ row, rowIndex }) {
      return 'custom-row'
    }
  }
}
</script>
<style scoped>
<style>
.el-table .custom-row {
  background: #f8f8fa;
}
</style>
vue.config.js
@@ -53,6 +53,7 @@
    proxy: {
      [process.env.VUE_APP_BASE_API]: {
        target: 'http://121.196.36.24:8019', // 本地
        // target: 'http://192.168.0.147:8000', // 优克
        changeOrigin: true, // 请求跨域时,需 配置此项
        pathRewrite: { // 路径重写,替换target中的请求地址
          ['^' + process.env.VUE_APP_BASE_API]: '/api/'