zmc
2023-09-05 c2f95b0b9090a2394b5b068582b932a5e57b86aa
src/views/exception/SiteAuditAssistance.vue
@@ -100,10 +100,12 @@
        checker: 'admin',
        checkDate: '',
        checkerNotes: '',
        enterpriseNotes: ''
        enterpriseNotes: '',
      },
      auditTableData: [],
      auditNumByTime: 0
      // 审核状态不为0
      auditData: [],
    };
  },
  setup() {
@@ -143,13 +145,39 @@
    }
  },
  computed: {
    unCheckedNUm() {
      return this.total - this.auditNumByTime;
    // 审计总数(包括部分审核)
    auditTotal(){
      return this.auditData.length
    },
    // 审核比例
    checkedRate() {
      return (this.auditNumByTime / this.total) * 100;
    }
    // 规范审计总数
    auditedRegular(){
      let count = 0
      this.auditData.forEach(item => {
        if(item.auditStatus == 3){
           count ++
          }
      })
      return count
    },
    // 部分审核数量
    auditPart(){
      let count = 0
      this.auditData.forEach(item => {
        if(item.auditStatus == 1 || item.auditStatus == 2){
           count ++
          }
      })
      return count
    },
    // 待审核数
    unCheckedNUm() {
      return this.total - this.auditedRegular;
    },
     // 审核比例
     checkedRate() {
      return ((this.auditedRegular / this.total) * 100).toFixed(1);
    },
  },
  mounted() {
    this.backExceptionDataAWeekAgo();
@@ -158,13 +186,13 @@
  methods: {
    /**
     * 查看该段时间内已审核的数量
     * 查看该段时间内已审核的数据
     * @param:
     * @returns:
     */
    gethasCheckedNumByTime() {
      submitApi.getAuditNumByTime(this.beginTime, this.endTime).then((res) => {
        this.auditNumByTime = res.data.data.length;
        this.auditData = res.data.data;
      });
    },
    /**
@@ -278,6 +306,12 @@
            if (enterprise) {
              this.tableCurrentRowData.enterpriseContent = enterprise;
            }
            // 更新分析的数据
            setTimeout(() => {
            this.gethasCheckedNumByTime();
            }, 1500);
          } else {
            ElMessage.warning('提交失败');
          }
@@ -305,6 +339,11 @@
            if (enterpriseContent) {
              this.tableCurrentRowData.enterpriseContent = enterpriseContent;
            }
            // 更新分析的数据
            setTimeout(() => {
              this.gethasCheckedNumByTime();
            }, 1500);
          } else {
            ElMessage.warning('提交失败');
          }
@@ -1270,7 +1309,7 @@
    </el-col>
  </el-row>
  <el-row class="anasysis" ref="h2">
  <!-- <el-row class="anasysis" ref="h2">
    <el-col :span="6">
      <el-card>
        <el-statistic title="全部审核数" :value="total" />
@@ -1296,7 +1335,27 @@
        </el-statistic>
      </el-card>
    </el-col>
  </el-row>
  </el-row> -->
  <div class="checknum">
      <el-row class="anasysis" ref="h2">
        <el-col :span="8">
        <span class="checknum-blue">应审核数:</span> {{ total }}<span class="checknum-rate">({{ checkedRate }}%) </span>
        </el-col>
        <el-col :span="8">
          <div><span class="checknum-green">已审核数:</span>{{ auditTotal }}</div>
          <div>规范审核数:{{ auditedRegular }}</div>
          <div>部分审核数:{{ auditPart }}</div>
        </el-col >
        <el-col :span="8">
          <span><span class="checknum-red">待审核数:</span>{{ unCheckedNUm }}</span>
        </el-col>
      </el-row>
</div>
  <el-row>
    <el-col v-show="!isNoData">
@@ -1387,7 +1446,7 @@
              plain
              v-else-if="row.auditStatus == 1 || row.auditStatus == 2"
              @click="openAuditDiag(row)"
              >审核</el-button
              >待审核</el-button
            >
            <el-button
@@ -1395,7 +1454,7 @@
              size="default"
              type="danger"
              @click="openAuditDiag(row)"
              >审核</el-button
              >待审核</el-button
            >
            <!-- <span v-if="row.auditStatus == 3">已审核</span
              ><span v-else>审核</span> -->
@@ -1471,7 +1530,8 @@
        />
      </el-form-item>
    </el-form>
    <el-card>
    <el-card v-show="tableCurrentRowData.auditStatus==3">
      <template #header>审核详情</template>
      <el-form>
        <el-form-item label="审核人">{{
@@ -1485,6 +1545,7 @@
        }}</el-form-item>
      </el-form>
    </el-card>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="close">取消</el-button>
@@ -1644,34 +1705,58 @@
.el-row {
  margin-left: 20px;
}
/* 条件查询模块的样式 */
.head-container-search {
  display: flex;
  justify-content: space-between;
  // float: right;
}
.head-describtion-text {
  justify-content: flex-end;
  margin-bottom: 10px;
  font-size: 14px;
  color: gray;
}
/* 条件查询模块结束 */
/*分析 */
.anasysis {
  margin-bottom: 20px;
// .anasysis {
//   margin-bottom: 20px;
// }
// :deep(.el-statistic__head) {
//   font-weight: bold;
//   font-size: 16px;
// }
.checknum {
  border: 1px solid orange;
  margin-bottom: 10px;
  margin-left: 20px;
  margin: 0px 5px 10px 20px;
}
:deep(.el-statistic__head) {
.checknum-rate{
    margin-left: 5px;
  }
.checknum-blue {
  font-weight: bold;
  font-size: 16px;
  color: blue;
}
.checknum-green {
  font-weight: bold;
  color: green;
}
.checknum-red {
  font-weight: bold;
  color: red;
}
/* 分析结束 */
/* 表格模块的样式 */
/* 表格模块的样式 */
:global(.el-table .black-row) {
  color: black;
}