“zhuo”
2023-08-09 4299bf547e315c824dd59b587be8778937dfb08e
8-9提交代码
已修改3个文件
已添加1个文件
544 ■■■■ 文件已修改
src/api/experiment/planAssignments.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/planAssignments/index.vue 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/reportAuditing/index.vue 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/planAssignments.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
import request from '@/utils/request'
export function selectAllPlan(params) {
  return request({
    url: '/plan/selectAllPlan',
    method: 'get',
    params
  })
}
src/views/experiment/checkTheReport/index.vue
@@ -14,9 +14,23 @@
          <el-button type="primary" @click="getData()">查询</el-button>
          <el-button type="primary" plain @click="resetData()">重置</el-button>
        </el-form-item>
        <el-dropdown>
          <span class="el-dropdown-link">
            é«˜çº§æœç´¢<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>高级搜索</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-form>
      <el-form>
        <el-button class="rightBtn" type="primary" icon="el-icon-document" @click="exportData">导出报告</el-button>
        <el-button
          class="rightBtn"
          type="primary"
          icon="el-icon-document"
          @click="exportData"
          >导出报告</el-button
        >
      </el-form>
    </div>
    <div class="library-table">
@@ -28,6 +42,10 @@
            <el-radio-button label="1">待审核</el-radio-button>
            <el-radio-button label="2">已审核</el-radio-button>
          </el-radio-group>
          <el-checkbox v-model="checked" style="margin-left: 20px"
            >仅看我的</el-checkbox
          >
        </div>
      </div>
      <div class="table-box">
@@ -35,15 +53,17 @@
          ref="reportTable"
          :max-height="800"
          :cell-style="{textAlign: 'center'}"
          :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
          :header-cell-style="{
            border: '0px',
            background: '#f5f7fa',
            color: '#606266',
            boxShadow: 'inset 0 1px 0 #ebeef5',
            textAlign: 'center',
          }"
          :data="reportTable"
          style="width: 100%"
        >
          <el-table-column
            type="selection"
            label=""
            min-width="5%"
          />
          <el-table-column type="selection" label="" min-width="5%" />
          <el-table-column
            prop="materialCode"
@@ -63,39 +83,48 @@
            sortable
            min-width="10%"
          />
          <el-table-column
            prop="approver"
            label="审批人"
            min-width="5%"
          />
          <el-table-column
            prop="status"
            label="审批状态"
            min-width="8%"
          >
          <el-table-column prop="approver" label="审批人" min-width="8%">
            <template slot-scope="scope">
              <span>
                <el-tag type="info">{{ scope.row.status == 0 ? '待提交' :
                  scope.row.status == 1 ? '待审核' :
                  scope.row.status == 2 ? '代签字' :'已完成' }}</el-tag>
                <el-tag type="info" icon="el-icon-user">
                  <i class="el-icon-user">{{ scope.row.approver }}</i>
                </el-tag>
              </span>
            </template></el-table-column>
          <el-table-column
            prop="conclusion"
            label="检验结论"
            min-width="10%"
          />
          <el-table-column
            prop="name"
            label="编制人"
            min-width="8%"
          />
          <el-table-column
            label="操作"
            min-width="8%"
          >
            </template>
          </el-table-column>
          <el-table-column prop="status" label="审批状态" min-width="8%">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="handleClick(scope.row)">预览</el-button>
              <span>
                <el-tag type="info">{{
                  scope.row.status == 0
                    ? "待提交"
                    : scope.row.status == 1
                    ? "待审核"
                    : scope.row.status == 2
                    ? "代签字"
                    : "已完成"
                }}</el-tag>
              </span>
            </template></el-table-column
          >
          <el-table-column prop="conclusion" label="检验结论" min-width="8%" />
          <el-table-column prop="name" label="编制人" min-width="8%">
            <template slot-scope="scope">
              <span>
                <el-tag type="info" icon="el-icon-user">
                  <i class="el-icon-user">{{ scope.row.name }}</i>
                </el-tag>
              </span>
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="8%">
            <template slot-scope="scope">
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >预览</el-button
              >
              <el-button type="text" size="small">打印</el-button>
            </template>
          </el-table-column>
@@ -118,45 +147,46 @@
</template>
<script>
import { selectAllReport } from '@/api/experiment/checkTheReport'
import { selectAllReport } from "@/api/experiment/checkTheReport";
export default {
  data() {
    return {
      input: '',
      input: "",
      checkStatus: undefined,
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 10
    }
      pageSize: 10,
      checked: true,
    };
  },
  created() {
    this.getData()
    this.getData();
  },
  methods: {
    // çŠ¶æ€æŒ‰é’®
    handleRadioChange() {
      this.getData()
      this.getData();
    },
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`)
      this.pageSize = val
      this.getData()
      console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.getData();
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.page = val
      this.getData()
      console.log(`当前页: ${val}`);
      this.page = val;
      this.getData();
    },
    // é‡ç½®æŒ‰é’®
    resetData() {
      this.input = undefined
      this.page = 1
      this.pageSize = 10
      this.checkStatus = undefined
      this.getData()
      this.input = undefined;
      this.page = 1;
      this.pageSize = 10;
      this.checkStatus = undefined;
      this.getData();
    },
    // æŸ¥è¯¢åˆ—表
    async getData() {
@@ -164,14 +194,14 @@
        page: this.page,
        pageSize: this.pageSize,
        name: this.input ? this.input : undefined,
        status: this.checkStatus ? this.checkStatus : undefined
      }
      const { data } = await selectAllReport(params)
      this.reportTable = data.row
      this.total = data.total
    }
  }
}
        status: this.checkStatus ? this.checkStatus : undefined,
      };
      const { data } = await selectAllReport(params);
      this.reportTable = data.row;
      this.total = data.total;
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -182,7 +212,14 @@
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .input-form {
    width: 800px;
    width: 700px;
  }
  .el-dropdown-link {
    cursor: pointer;
    color: #409EFF;
  }
  .el-icon-arrow-down {
    font-size: 12px;
    }
}
.library-table{
@@ -213,5 +250,6 @@
            margin: 10px 0;
          }
      }
    }
</style>
src/views/experiment/planAssignments/index.vue
@@ -3,12 +3,17 @@
    <div class="top-bar">
      <el-form ref="form" :inline="true" :model="searchData">
        <el-form-item label="设备名称:" class="sermargin">
          <el-select v-model="searchData.devicename" placeholder="全部" style="width: 100px;">
          <el-select
            v-model="searchData.devicename"
            placeholder="全部"
            style="width: 100px"
          >
            <el-option
              v-for="item in options"
              v-for="item in options1"
              :key="item.value"
              :label="item.label"
              :value="item.value">
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
@@ -18,21 +23,29 @@
            type="daterange"
            range-separator="~"
            start-placeholder="开始日期"
            end-placeholder="结束日期">
            end-placeholder="结束日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="检验人:" style="margin-right: 20px;">
          <el-select v-model="searchData.person" placeholder="全部" style="width: 80px;margin-right: 100px;">
        <el-form-item label="检验人:" style="margin-right: 20px">
          <el-select
            v-model="searchData.person"
            placeholder="全部"
            style="width: 80px; margin-right: 100px"
          >
            <el-option
              v-for="item in options"
              v-for="item in options2"
              :key="item.value"
              :label="item.label"
              :value="item.value">
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" plain style="margin-right: 10px;">重置</el-button>
          <el-button type="primary" plain style="margin-right: 10px"
            >重置</el-button
          >
          <el-button type="primary">查询</el-button>
        </el-form-item>
        </el-form>
@@ -43,79 +56,69 @@
          ref="planTable"
          :max-height="800"
          :cell-style="{textAlign: 'center'}"
          :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
          :header-cell-style="{
            border: '0px',
            background: '#f5f7fa',
            color: '#606266',
            boxShadow: 'inset 0 1px 0 #ebeef5',
            textAlign: 'center',
          }"
          :data="planTable"
          style="width: 100%"
        >
        <el-table-column
          type="index"
          label="序号"
          min-width="10%"
        />
        <el-table-column
          prop="device"
          label="检验设备"
          min-width="8%"
        />
        <el-table-column
          prop="samplename"
          label="样品名称"
          min-width="8%"
        />
        <el-table-column
          prop="sampleid"
          label="样品编号"
          min-width="10%"
        />
          <el-table-column type="index" label="序号" min-width="10%" />
          <el-table-column prop="device" label="检验设备" min-width="8%" />
          <el-table-column prop="samplename" label="样品名称" min-width="8%" />
          <el-table-column prop="sampleid" label="样品编号" min-width="10%" />
        <el-table-column
          prop="modelandspecification"
          label="规格型号"
          min-width="12%"
        />
        <el-table-column
          prop="unit"
          label="单位"
          min-width="5%"
        />
        <el-table-column
          prop="amount"
          label="数量"
          min-width="5%"
        />
          <el-table-column prop="unit" label="单位" min-width="5%" />
          <el-table-column prop="amount" label="数量" min-width="5%" />
        <el-table-column
          prop="checkproject"
          label="检验项目"
          min-width="12%"
        />
        <el-table-column
          prop="checker"
          label="检验人"
          min-width="6%"
        />
        <el-table-column
          prop="duration"
          label="计划工期/h"
          min-width="8%"
        />
        <el-table-column
          prop="progress"
          label="检验进度"
          min-width="12%">
          <el-table-column prop="checker" label="检验人" min-width="6%" />
          <el-table-column prop="duration" label="计划工期/h" min-width="8%" />
          <el-table-column prop="progress" label="检验进度" min-width="12%">
          <template slot-scope="scope">
            <div v-if="scope.row.progress === 100" style="display: flex;">
              <el-progress :text-inside="true" :stroke-width="15" :percentage="scope.row.progress" status="success" style="width: 70%;"></el-progress>
              <span style="color: rgb(103, 194, 58);">已完成</span>
              <div v-if="scope.row.progress === 100" style="display: flex">
                <el-progress
                  :text-inside="true"
                  :stroke-width="15"
                  :percentage="scope.row.progress"
                  status="success"
                  style="width: 70%"
                ></el-progress>
                <span style="color: rgb(103, 194, 58)">已完成</span>
            </div>
            <div v-if="scope.row.progress <100 && scope.row.progress >0" style="display: flex;">
              <el-progress :text-inside="true" :stroke-width="15" :percentage="scope.row.progress" status="warning" style="width: 70%;"></el-progress>
              <span style="color: rgb(230, 162, 60);">检验中</span>
              <div
                v-if="scope.row.progress < 100 && scope.row.progress > 0"
                style="display: flex"
              >
                <el-progress
                  :text-inside="true"
                  :stroke-width="15"
                  :percentage="scope.row.progress"
                  status="warning"
                  style="width: 70%"
                ></el-progress>
                <span style="color: rgb(230, 162, 60)">检验中</span>
            </div>
            <div v-if="scope.row.progress === 0" style="display: flex;">
              <el-progress :text-inside="true" :stroke-width="15" :percentage="scope.row.progress" style="width: 70%;"></el-progress>
              <div v-if="scope.row.progress === 0" style="display: flex">
                <el-progress
                  :text-inside="true"
                  :stroke-width="15"
                  :percentage="scope.row.progress"
                  style="width: 70%"
                ></el-progress>
              <span style="color: gray">未分配</span>
            </div>
            <div v-else>
            </div>
              <div v-else></div>
          </template>
        </el-table-column>
        <el-table-column
@@ -128,12 +131,14 @@
          label="计划结束时间"
          min-width="10%"
        />
        <el-table-column
            label="操作"
            min-width="8%"
        >
          <el-table-column label="操作" min-width="8%">
          <template slot-scope="scope">
            <el-button type="text" size="small" @click="handleClick(scope.row)">查看</el-button>
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >查看</el-button
              >
          </template>
        </el-table-column>
        </el-table>
@@ -143,6 +148,7 @@
</template>
<script>
import { selectAllPlan } from "@/api/experiment/planAssignments";
export default {
  data() {
    return {
@@ -151,72 +157,37 @@
        time: "",
        person: "",
      },
      options: [
        {
          value: "选项1",
          label: "选项1",
        },
        {
          value: "选项2",
          label: "选项2",
          disabled: true,
        },
      ],
      planTable: [{
        device: '拉力机',
        samplename: '镀锌钢绞线',
        sampleid: 'SN1027401-12937',
        modelandspecification: 'JLHA/G1A-185/30-14/7',
        unit: 'm',
        amount: '200',
        checkproject: '抗压强度(绞前)',
        checker: '黄小明',
        duration: '2',
        progress: 100,
        starttime: '2023-08-04 8:00',
        finishtime: '2023-08-04 10:00',
      },{
        device: '拉力机',
        samplename: '镀锌钢绞线',
        sampleid: 'SN1027401-12937',
        modelandspecification: 'JLHA/G1A-185/30-14/7',
        unit: 'm',
        amount: '200',
        checkproject: '抗压强度(绞前)',
        checker: '黄小明',
        duration: '2',
        progress: 60,
        starttime: '2023-08-04 8:00',
        finishtime: '2023-08-04 10:00',
      },{
        device: '拉力机',
        samplename: '镀锌钢绞线',
        sampleid: 'SN1027401-12937',
        modelandspecification: 'JLHA/G1A-185/30-14/7',
        unit: 'm',
        amount: '200',
        checkproject: '抗压强度(绞前)',
        checker: '黄小明',
        duration: '2',
        progress: 30,
        starttime: '2023-08-04 8:00',
        finishtime: '2023-08-04 10:00',
      },{
        device: '拉力机',
        samplename: '镀锌钢绞线',
        sampleid: 'SN1027401-12937',
        modelandspecification: 'JLHA/G1A-185/30-14/7',
        unit: 'm',
        amount: '200',
        checkproject: '抗压强度(绞前)',
        checker: '黄小明',
        duration: '2',
        progress: 0,
        starttime: '2023-08-04 8:00',
        finishtime: '2023-08-04 10:00',
      }]
      options1: [],
      options2: [],
      planTable: [],
    };
  },
  created() {
    this.getData();
  },
  methods: {
    // æŸ¥è¯¢åˆ—表
    async getData() {
      const params = {};
      const { data } = await selectAllPlan(params);
      this.planTable = data;
      this.planTable.forEach((res) => {
        let o1 = {
          value: res.device,
          label: res.device,
        };
        this.options1.push(o1);
        if(res.userId == undefined) {
        }
      });
      let d=this.options1.filter((val,index,self)=>{
        return self.indexOf(val)==index;
      })
      console.log(d);
    },
  },
};
</script>
src/views/experiment/reportAuditing/index.vue
@@ -14,9 +14,19 @@
          <el-button type="primary" @click="getData()">查询</el-button>
          <el-button type="primary" plain @click="resetData()">重置</el-button>
        </el-form-item>
        <el-dropdown>
          <span class="el-dropdown-link">
            é«˜çº§æœç´¢<i class="el-icon-arrow-down el-icon--right"></i>
          </span>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>高级搜索</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
      </el-form>
      <el-form>
        <el-button class="rightBtn" type="primary" @click="exportData">审核</el-button>
        <el-button class="rightBtn" type="primary" @click="exportData"
          >审核</el-button
        >
      </el-form>
    </div>
    <div class="library-table">
@@ -27,6 +37,9 @@
            <el-radio-button label="0">待提交</el-radio-button>
            <el-radio-button label="2">待通过</el-radio-button>
          </el-radio-group>
          <el-checkbox v-model="checked" style="margin-left: 20px"
            >仅看我的</el-checkbox
          >
        </div>
      </div>
      <div class="table-box">
@@ -34,61 +47,48 @@
          ref="reportTable"
          :max-height="800"
          :cell-style="{textAlign: 'center'}"
          :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
          :header-cell-style="{
            border: '0px',
            background: '#f5f7fa',
            color: '#606266',
            boxShadow: 'inset 0 1px 0 #ebeef5',
            textAlign: 'center',
          }"
          :data="reportTable"
          style="width: 100%"
        >
          <el-table-column
            type="selection"
            label=""
            min-width="5%"
          />
          <el-table-column type="selection" label="" min-width="5%" />
          <el-table-column
            prop="materialCode"
            label="样品编号"
            min-width="10%"
          />
          <el-table-column
            prop="reportCode"
            label="报告单号"
            min-width="10%"
          />
          <el-table-column prop="reportCode" label="报告单号" min-width="10%" />
          <el-table-column
            prop="materialName"
            label="样品名称"
            min-width="10%"
          />
          <el-table-column
            prop="status"
            label="审批状态"
            min-width="8%"
          >
          <el-table-column prop="status" label="审批状态" min-width="8%">
            <template slot-scope="scope">
              <span>
                <el-tag type="warning">{{ scope.row.status == 0 ? '待提交' : '已审核' }}</el-tag>
                <el-tag type="warning">{{
                  scope.row.status == 0 ? "待提交" : "待通过"
                }}</el-tag>
              </span>
            </template></el-table-column>
          <el-table-column
            prop="approver"
            label="审批人"
            min-width="8%"
          />
          <el-table-column
            prop="submitTime"
            label="提交日期"
            min-width="8%"
          />
          <el-table-column
            prop="checkTime"
            label="审核日期"
            min-width="8%"
          />
          <el-table-column
            label="操作"
            min-width="8%"
            </template></el-table-column
          >
          <el-table-column prop="approver" label="审批人" min-width="8%" />
          <el-table-column prop="submitTime" label="提交日期" min-width="8%" />
          <el-table-column prop="checkTime" label="审核日期" min-width="8%" />
          <el-table-column label="操作" min-width="8%">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="handleClick(scope.row)">查看详细</el-button>
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >查看详细</el-button
              >
            </template>
          </el-table-column>
        </el-table>
@@ -110,45 +110,46 @@
</template>
<script>
import { selectAllReportCheck } from '@/api/experiment/reportAuditing'
import { selectAllReportCheck } from "@/api/experiment/reportAuditing";
export default {
  data() {
    return {
      input: '',
      input: "",
      checkStatus: undefined,
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 10
    }
      pageSize: 10,
      checked: true,
    };
  },
  created() {
    this.getData()
    this.getData();
  },
  methods: {
    // çŠ¶æ€æŒ‰é’®
    handleRadioChange() {
      this.getData()
      this.getData();
    },
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`)
      this.pageSize = val
      this.getData()
      console.log(`每页 ${val} æ¡`);
      this.pageSize = val;
      this.getData();
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.page = val
      this.getData()
      console.log(`当前页: ${val}`);
      this.page = val;
      this.getData();
    },
    // é‡ç½®æŒ‰é’®
    resetData() {
      this.input = undefined
      this.page = 1
      this.pageSize = 10
      this.checkStatus = undefined
      this.getData()
      this.input = undefined;
      this.page = 1;
      this.pageSize = 10;
      this.checkStatus = undefined;
      this.getData();
    },
    // æŸ¥è¯¢åˆ—表
    async getData() {
@@ -156,14 +157,14 @@
        page: this.page,
        pageSize: this.pageSize,
        name: this.input ? this.input : undefined,
        status: this.checkStatus ? this.checkStatus : undefined
      }
      const { data } = await selectAllReportCheck(params)
      this.reportTable = data.row
      this.total = data.total
    }
  }
}
        status: this.checkStatus ? this.checkStatus : undefined,
      };
      const { data } = await selectAllReportCheck(params);
      this.reportTable = data.row;
      this.total = data.total;
    },
  },
};
</script>
<style lang="scss" scoped>
@@ -174,7 +175,14 @@
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .input-form {
    width: 800px;
    width: 700px;
  }
  .el-dropdown-link {
    cursor: pointer;
    color: #409eff;
  }
  .el-icon-arrow-down {
    font-size: 12px;
    }
}
.library-table{