zouyu
6 天以前 edc6b742457bcdfcfbd49ff41a625f956a733459
src/views/statisticalCharts/qualificationRateStatistics/index.vue
@@ -1,13 +1,6 @@
<template>
  <div class="app-container">
    <el-row>
<!--      <el-col :span="4">-->
<!--        <el-radio-group v-model="dateType" @change="changeDateType">-->
<!--          <el-radio-button label="1">本周</el-radio-button>-->
<!--          <el-radio-button label="2">本月</el-radio-button>-->
<!--          <el-radio-button label="3">今年</el-radio-button>-->
<!--        </el-radio-group>-->
<!--      </el-col>-->
      <el-col :span="20">
        <el-form ref="entity" size="small" :inline="true">
          <el-form-item style="width: 20%;">
@@ -88,8 +81,17 @@
              下载
            </el-button>
          </div>
          <lims-table :tableData="tableData" :column="tableColumn" :tableLoading="tableLoading"
            :height="550" :show-summary="true" :summary-method="getSummaries"></lims-table>
          <el-table ref="passRateTable" :height="'calc(40vh - 40px)'" :data="tableData" border v-loading="tableLoading" show-summary :summary-method="getSummaries">
            <el-table-column label="序号" type="index" align="center" width="80"></el-table-column>
            <el-table-column label="供应商名称" prop="supplierName" show-overflow-tooltip align="center" min-width="140"></el-table-column>
            <el-table-column label="到货批次" prop="totalBatch" show-overflow-tooltip align="center" min-width="140"></el-table-column>
            <el-table-column label="不合格批次" prop="unqualifiedBatch" show-overflow-tooltip align="center" min-width="140"></el-table-column>
            <el-table-column label="合格率(%)" prop="passRate" show-overflow-tooltip align="center" min-width="140">
              <template slot-scope="scope">
                {{ scope.row.passRate != null ? scope.row.passRate + '%' : '0%'}}
              </template>
            </el-table-column>
          </el-table>
        </div>
      </el-col>
    </el-row>
@@ -423,17 +425,6 @@
      ],
      tableData: [],
      tableLoading: false,
      tableColumn: [
        { label: '供应商名称', prop: 'supplierName', minWidth: '200px' },
        { label: '到货批次', prop: 'totalBatch', minWidth: '100px' },
        { label: '不合格批次', prop: 'unqualifiedBatch', minWidth: '100px' },
        {
          label: '合格率(%)',
          prop: 'passRate',
          minWidth: '100px',
          formatData: (val) => (val != null ? val + '%' : '0%')
        }
      ],
      rawPassRate: '',
      conductorPassRate: '',
      dlanPassRate: '',
@@ -725,6 +716,9 @@
        // Sort by totalBatch descending
        tableData.sort((a, b) => b.totalBatch - a.totalBatch);
        this.tableData = tableData;
        this.$nextTick(()=>{
          this.$refs.passRateTable.doLayout()
        })
        this.tableLoading = false;
      }).catch(() => {
        this.tableLoading = false;