Fixiaobai
2023-09-08 8635253d498ea4fefd6ea465704569ff34fed3f8
src/views/experiment/reportAuditing/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="content-main">
    <div class="top-bar">
      <el-form ref="form" :inline="true">
      <el-form ref="form" :inline="true" style="margin-top: 10px;">
        <el-form-item>
          <el-input
            v-model="input"
@@ -11,8 +11,8 @@
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="getData()">查询</el-button>
          <el-button type="primary" plain @click="resetData()">重置</el-button>
          <el-button size="small" type="primary" @click="getData()">查询</el-button>
          <el-button size="small" type="primary" plain @click="resetData()">重置</el-button>
        </el-form-item>
      </el-form>
    </div>
@@ -63,7 +63,7 @@
              </span>
            </template></el-table-column
          >
          <el-table-columne
          <el-table-column
            prop="materialName"
            label="样品名称"
            min-width="10%"
@@ -134,7 +134,7 @@
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 8,
      pageSize: 10,
      checkskipvisible: false,
      form:{},
      formLabelWidth: '120px',
@@ -177,33 +177,24 @@
      this.getData();
    },
    //通过
    async checkskip(row) {
     checkskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=1
      this.transmitData(this.tableRow.row.id,1)
      this.checkskipvisible= false
      this.$message({
          message: '通过成功',
          type: 'success'
        });
    },
    //不通过
    async nocheckskip(row) {
     nocheckskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=0
      this.transmitData(this.tableRow.row.id,2)
      this.checkskipvisible= false
      this.$message({
          message: '待通过',
          type: 'warning'
        });
    },
    //审核
    async transmitData(id, result) {
      let param={"id":id,"result":result}
     let data = await checkApi(param)
     await this.getData();
    },
    // 查询列表
    async getData() {
@@ -214,6 +205,7 @@
        status: this.checkStatus ? this.checkStatus : undefined,
      };
      const { data } = await selectAllReportCheck(params);
      console.log(data);
      this.reportTable = data.row;
      this.total = data.total;
    },