Fixiaobai
2023-08-28 77a041c5e9a31ad96fce404f06fe0c03f4031b1d
Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
已修改21个文件
已添加2个文件
3598 ■■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/checkTheReport.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/planAssignments.js 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspection/commisioninspection.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/laboratory/organizational.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standardLibrary.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/util/requestUtil.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/experiment/checkTheReport/index.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/index.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/chart/work/index.vue 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/checkTheReport/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/Viewdetails/index.vue 177 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 359 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/reportAuditing/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/addCommision.vue 1017 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 123 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/reportForInspection/index.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/organizational/index.vue 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/personnel/index.vue 435 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standardLibrary/index.vue 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/template_testReport/index.vue 651 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -25,6 +25,7 @@
    "nprogress": "0.2.0",
    "path-to-regexp": "2.4.0",
    "postcss-pxtorem": "^5.1.1",
    "print-js": "^1.6.0",
    "vue": "2.6.10",
    "vue-clipboard2": "^0.3.3",
    "vue-router": "3.0.6",
src/api/experiment/checkTheReport.js
@@ -7,3 +7,12 @@
    params
  })
}
//获取报告内的数据
export function getReportData(params) {
  return request({
    url: '/report/getReportContext',
    method: 'post',
    params
  })
}
src/api/experiment/planAssignments.js
@@ -30,4 +30,44 @@
    method: 'post',
    data
  })
}
}
//检验单详情
export function selectInspectsListById(params){
  return request({
    url: '/inspection/selectInspectsListById',
    method: 'get',
    params
  })
}
//选择责任项目检验人
export function selectUser(params){
  return request({
    url: '/inspection/selectUser',
    method: 'get',
    params
  })
}
// å§”托检验列表
export function getCommisionList(params) {
  return request({
    url: '/link-basic-table/page',
    method: 'get',
    params
  })
}
//原材料检验列表
export function YANcailiso(params) {
  return request({
    url: '/raw-material/selectAll',
    method: 'get',
    params
  })
}
//版本号
export function chooseVer(params) {
  return request({
    url: '/inspection/chooseVer',
    method: 'get',
    params
  })
}
src/api/inspection/commisioninspection.js
@@ -25,7 +25,7 @@
  })
}
//规格型号
export function getModelSpecification(params){
  return request({
    url: '/link-basic/specification',
src/api/laboratory/organizational.js
@@ -2,10 +2,50 @@
const Api = {
    getOrganizational: "/organizational/list", // å››çº§æ ‘
    getTableInitialization: "/organizational/table", // è¡¨æ ¼æ•°æ®æŽ¥å£
    organizationalAdd: "/organizational/add", // æ·»åŠ éƒ¨é—¨
    organizationalUpdate: "/organizational/add", // ä¿®æ”¹éƒ¨é—¨
    organizationalDelete: "/organizational/delete", // åˆ é™¤éƒ¨é—¨
}
export function getOrganizationalApi() {
    return request({
        url: Api.getOrganizational,
        method: 'get'
    })
}
export function getTableInitializationApi(departmentId) {
    return request({
        url: Api.getTableInitialization,
        method: 'get',
        params: {
            departmentId
        }
    })
}
export function organizationalAddApi(formData){
    return request({
        url: Api.organizationalAdd,
        method: 'post',
        data: formData
    })
}
export function organizationalUpdateApi(formData){
    return request({
        url: Api.organizationalUpdate + '?id=' + formData.id,
        method: 'put',
        data: formData
    })
}
export function organizationalDeleteApi(id){
    return request({
        url: Api.organizationalDelete,
        method: 'delete',
        params: {
            ids: id.toString()
        }
    })
}
src/api/standardLibrary.js
@@ -7,6 +7,24 @@
  })
}
//获取所有版本
export function getVersion(params){
  return request({
    url: '/product/chooseVersion',
    method: 'get',
    params
  })
}
//添加同一个型号的其他版本
export function addVersion(params){
  return request({
    url: '/product/addVersion',
    method: 'post',
    params
  })
}
// èŽ·å–æ‰€æœ‰é¡¹ç›®
export function getProductList(params) {
  return request({
src/api/util/requestUtil.js
@@ -16,6 +16,14 @@
    })
}
export function put(path, data) {
    return request({
        url: path,
        method: 'put',
        data
    })
}
export function wpost(path, params) {
    return request({
        url: path,
src/components/experiment/checkTheReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
<template>
    <div class="preview-main">
        <div class="logo">
            <img :src="logoSrc" />
        </div>
        <div class="center">
            <h1>原材料检测报告</h1>
            <table>
                <tr>
                    <td>材料名称</td>
                    <td colspan="5">{{reportData.name}}</td>
                </tr>
                <tr>
                    <td>规格型号</td>
                    <td colspan="2">
                        {{reportData.specifications.split("-")[1]}}
                    </td>
                    <td>材料厂家</td>
                    <td colspan="2">{{reportData.supplier}}</td>
                </tr>
                <tr>
                    <td>材料编号</td>
                    <td colspan="2">{{reportData.imCode}}</td>
                    <td>检测编号</td>
                    <td colspan="2">{{reportData.insCode}}</td>
                </tr>
                <tr>
                    <td>检测依据</td>
                    <td colspan="2">{{reportData.specifications.split("-")[0]}}</td>
                    <td>检测类别</td>
                    <td colspan="2">原材料</td>
                </tr>
                <tr>
                    <td>序号</td>
                    <td>检验项目</td>
                    <td>单位</td>
                    <td>标准要求</td>
                    <td>检测结果</td>
                    <td>单项判断</td>
                </tr>
                <tr v-for="(item,index) in reportData.products" :key="item">
                    <td>{{index+1}}</td>
                    <td>{{item.ipName}}</td>
                    <td>{{item.unit}}</td>
                    <td>{{item.required}}</td>
                    <td>{{item.testValue}}</td>
                    <td>{{item.testState == 1 ? "√" : "X"}}</td>
                </tr>
                <tr>
                    <td colspan="6">检验结论:{{reportData.type == 1 ? "合格" : "不合格"}}</td>
                </tr>
                <tr>
                    <td colspan="6">
                        æ³¨ï¼šâ€œâˆšâ€è¡¨ç¤ºè¯¥é¡¹ç›®åˆæ ¼ï¼Œâ€œÃ—”表示该项目不合格,“—”表示该项目不要求检测。
                    </td>
                </tr>
            </table>
            <el-row class="date-group" :gutter="20">
                <el-col :span="12">检测、日期:<span>{{reportData.createTime}}</span></el-col>
                <el-col :span="12">审核、日期:<span>{{reportData.checkTime}}</span></el-col>
            </el-row>
            <p class="footer">
                <span>编号:</span><span>{{reportData.reportCode}}</span>
                <span> å‘行日期:</span><span>{{new Date() | formatDate}}</span>
                <span> ä¿å­˜æœŸé™:</span><span>长期</span>
            </p>
        </div>
    </div>
</template>
<script>
export default({
    data() {
        return {
            logoSrc : require("@/assets/404_images/logo.png"),
        }
    },
    methods:{
        formatDate(val){
            var dt = new Date(val);
            let year = dt.getFullYear();
            let month = (dt.getMonth() + 1).toString().padStart(2,'0');
            let date = dt.getDate().toString().padStart(2,'0');
            return `${year}-${month}-${date}`;
        }
    },
    props:["reportData"]
})
</script>
<style scoped lang="scss">
     .preview-main{
        margin: 0;
        padding: 0;
        width:90%;
        margin-left: 5%;
        .logo{
            img{
                width: 150px;
                height: 60px;
            }
        }
        .center{
            width: 100%;
            h1{
                width:100%;
                font-family: "微软雅黑" !important;
                text-align: center;
            }
            table{
                width:100%;
                height:100vh;
                border-collapse: collapse;
                font-size: 18px;
            }
            table,tr,th,td{
                border: 2px solid black;
            }
            tr,td,th{
                padding: 5px 5px;
            }
            .date-group .el-col{
                text-align: center;
                padding: 50px 0px;
                font-size: 18px;
            }
            .footer{
                margin: 0;
                padding: 0;
                width:90%;
                margin-left: 5%;
                color: gray;
                text-align: center;
                margin-top: 250px;
            }
        }
     }
</style>
src/layout/components/Navbar.vue
@@ -24,7 +24,7 @@
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
      <el-dialog title="修改密码" :visible.sync="dialogFormVisible" :append-to-body="true">
      <el-dialog title="修改密码" :visible.sync="dialogFormVisible" :append-to-body="true" width="40%">
        <el-form :model="form">
          <el-form-item label="旧密码" :label-width="formLabelWidth">
            <el-input v-model="form.oldPwd" autocomplete="off"></el-input>
@@ -69,7 +69,11 @@
                name: 'value'
            },
      dialogFormVisible: false,
      formLabelWidth: '120px'
      formLabelWidth: '120px',
            user: {
                id: null,
                name: 'value'
            }
    }
  },
  components: {
src/main.js
@@ -20,6 +20,7 @@
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
import print from 'print-js'
import '@/icons' // icon
import '@/permission' // permission control
src/views/basicData/index.vue
@@ -136,13 +136,14 @@
      <el-table
        :data="tableData"
        style="width: 100%; margin-bottom: 20px"
        row-key="name"
        row-key="id"
        border
        height="calc(100vh - 250px)"
        default-expand-all
        ref="multipleTable"
        @select="selectTr"
        @select-all="selectAll"
        @selection-change="handleSelectionChange"
        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
      >
        <el-table-column type="selection" label="序号"> </el-table-column>
@@ -344,20 +345,6 @@
      this.isAllSelect = !this.isAllSelect;
      let data = this.tableData;
      this.toggleSelect(data, this.isAllSelect, "all");
      // è‡ªå®šä¹‰
      if (this.isAllSelect) {
        val.forEach((i) => {
          if (i.id !== undefined) {
            this.deleteList.push(i.id);
          } else {
            i.children.forEach((c) => {
              this.deleteList.push(c.id);
            });
          }
        });
      } else {
        this.deleteList.splice(0, this.deleteList.length);
      }
    },
    //选择某行
    selectTr(selection, row) {
@@ -366,33 +353,6 @@
        this.isAllSelect = row.isChecked;
        this.toggleSelect(row, row.isChecked, "tr");
      });
      if (row.isChecked === true) {
        if (row.children !== undefined) {
          row.children.forEach((i) => {
            this.deleteList.push(i.id);
          });
        } else {
          this.deleteList.push(row.id);
        }
      } else if (row.isChecked === false) {
        if (row.children !== undefined) {
          row.children.forEach((i) => {
            this.deleteList.findIndex((c, index) => {
              if (c === i.id) {
                this.deleteList.splice(index, 1);
                return;
              }
            });
          });
        }
        this.deleteList.findIndex((c, index) => {
          if (c === row.id) {
            this.deleteList.splice(index, 1);
            return;
          }
        });
      }
    },
    //递归子级
    toggleSelect(data, flag, type) {
@@ -426,6 +386,15 @@
        }
      });
    },
    handleSelectionChange(val) {
      this.deleteList = []
      val.forEach((v) => {
        if(v.id !== undefined) {
          this.deleteList.push(v.id)
        }
      })
      console.log(`output->this.deleteList`,this.deleteList)
    },
    // è¡¨æ ¼æ ‘全部选中配置  ç»“束
    deleteListClick() {
      deleteListApi(this.deleteList).then((res) => {
src/views/chart/work/index.vue
@@ -90,12 +90,7 @@
        },
      }
    },
    mounted(){
      // this.initLeaderStatiChart("");
      this.initLeaderTimelyChart("leaderTimely");
      this.initTesterStatiChart("testerStati");
      this.initTesterTimelyChart("testerTimely");
    },
    mounted(){},
    methods: {
      async queryData(){
        let date = this.formInline.date;
@@ -182,7 +177,7 @@
          series: [
            {
              name: '已完成',
              barWidth: '20%',
              barWidth: '30%',
              type: 'bar',
              stack: 'one',
              emphasis: emphasisStyle,
@@ -207,22 +202,25 @@
        option && myChart.setOption(option);
      },
      initTesterStatiChart(id,executeMater){
        console.log("qqq----",executeMater);
        var chartDom = document.getElementById(id);
        var myChart = echarts.init(chartDom);
          window.addEventListener('resize', function() {
          myChart.resize();
        });
        var option;
        let max = 0;
        let xAxisData = [];
        let data1 = [];
        let data2 = [];
        // for(let i=0;i<executeMater.length;i++){
        //   xAxisData.push(executeMater[i].name);
        //   data1.push(executeMater[i].finsh);
        //   data2.push(executeMater[i].unfinsh);
        // }
        for(let i=0;i<executeMater.length;i++){
          xAxisData.push(executeMater[i].name);
          data1.push(executeMater[i].finsh);
          data2.push(executeMater[i].unfinsh);
          let sum = executeMater[i].finsh + executeMater[i].unfinsh;
          if(sum > max){
            max = sum;
          }
        }
        var emphasisStyle = {
          itemStyle: {
            shadowBlur: 10,
@@ -244,8 +242,8 @@
          },
          yAxis: {
            min: 0,
            max: 60,
            interval: 10,
            max: max,
            interval: 1,
          },
          grid: {
            bottom: 100
@@ -255,6 +253,7 @@
              name: '数据1',
              type: 'bar',
              stack: 'one',
              barWidth: '30%',
              emphasis: emphasisStyle,
              data: data1,
              itemStyle:{
@@ -265,6 +264,7 @@
              name: '数据2',
              type: 'bar',
              stack: 'one',
              barWidth: '30%',
              emphasis: emphasisStyle,
              data: data2,
              itemStyle:{
@@ -282,6 +282,18 @@
          myChart.resize();
        });
        var option;
        let xAxisData = [];
        let data1 = [];
        let data2 = [];
        let yAxisData1 = 0;
        for(let i=0;i<dutyTimely.length;i++){
          xAxisData.push(dutyTimely[i].name);
          data1.push(dutyTimely[i].total);
          data2.push(dutyTimely[i].timely);
          if(dutyTimely[i].total > yAxisData1){
            yAxisData1 = dutyTimely[i].total;
          }
        }
        option = {
          tooltip: {
            trigger: 'axis',
@@ -299,13 +311,10 @@
            {
              name: '姓名',
              type: 'category',
              data: ['沐秋',],
              data: xAxisData,
              axisPointer: {
                type: 'shadow'
              },
              itemStyle: {
                top: '20px'
              }
            }
          ],
          yAxis: [
@@ -313,7 +322,7 @@
              type: 'value',
              name: '数量',
              min: 0,
              max: 10,
              max: yAxisData1,
              interval: 1,
              axisLabel: {
                formatter: '{value}'
@@ -334,13 +343,13 @@
            {
              name: '样品数',
              type: 'bar',
              barWidth: '20%',
              barWidth: '30%',
              tooltip: {
                valueFormatter: function (value) {
                  return value;
                }
              },
              data: [4.0],
              data: data1,
              itemStyle: {
                color: '#9fceff'
              }
@@ -348,19 +357,19 @@
            {
              name: '完成及时率',
              type: 'line',
              yAxisIndex: 1,
              tooltip: {
                valueFormatter: function (value) {
                  return value + ' %';
                }
              },
              data: [7.5],
              data: [{value:20},{value:40}],
              itemStyle: {
                color: '#d2eec5'
              }
            },
          ]
        };
        option && myChart.setOption(option);
      },
      initTesterTimelyChart(id,executeTimely){
@@ -370,6 +379,18 @@
          myChart.resize();
        });
        var option;
        let xAxisData = [];
        let data1 = [];
        let data2 = [];
        let yAxisData1 = 0;
        for(let i=0;i<executeTimely.length;i++){
          xAxisData.push(executeTimely[i].name);
          data1.push(executeTimely[i].total);
          data2.push(executeTimely[i].timely);
          if(executeTimely[i].total > yAxisData1){
            yAxisData1 = executeTimely[i].total;
          }
        }
        option = {
          tooltip: {
            trigger: 'axis',
@@ -387,7 +408,7 @@
          xAxis: [
            {
              type: 'category',
              data: ["","",""],
              data: xAxisData,
              axisPointer: {
                type: 'shadow'
              }
@@ -398,8 +419,8 @@
              type: 'value',
              name: '',
              min: 0,
              max: 50,
              interval: 5,
              max: yAxisData1,
              interval: 1,
              axisLabel: {
                formatter: '{value}'
              }
@@ -419,12 +440,13 @@
            {
              name: '项目数',
              type: 'bar',
              barWidth: '30%',
              tooltip: {
                valueFormatter: function (value) {
                  return value ;
                }
              },
              data: [2.0, 4.9, 7.0],
              data: data1,
              itemStyle: {
                color: '#5087ec'
              }
@@ -438,7 +460,7 @@
                  return value + ' %';
                }
              },
              data: [2.0, 2.2, 3.3],
              data: data2,
              itemStyle: {
                color: '#68bbc4'
              }
src/views/experiment/checkTheReport/index.vue
@@ -51,6 +51,18 @@
          >
        </div>
      </div>
      <el-dialog
        top="10vh"
        title="报告预览"
        :visible.sync="dialogVisible"
        width="60%">
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="printFun()">打印</el-button>
        </span>
        <div class="printStyle">
          <preview id="printDiv" :reportData="reportData"></preview>
        </div>
      </el-dialog>
      <div class="table-box">
        <el-table
          ref="reportTable"
@@ -81,14 +93,14 @@
            </template></el-table-column
          >
          <el-table-column
            prop="materialCode"
            prop="reportCode"
            label="报告单号"
            sortable
            min-width="10%"
          >
            <template slot-scope="scope">
              <span style="color: #409eff;">
                  {{ scope.row.materialCode }}
                  {{ scope.row.reportCode }}
              </span>
            </template></el-table-column
          >
@@ -143,10 +155,9 @@
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >预览</el-button
                @click="previewFun(scope.row)"
                >查看报告</el-button
              >
              <el-button type="text" size="small">打印</el-button>
            </template>
          </el-table-column>
        </el-table>
@@ -168,10 +179,13 @@
</template>
<script>
import { selectAllReport } from "@/api/experiment/checkTheReport";
import { selectAllReport,getReportData } from "@/api/experiment/checkTheReport";
import Preview from "@/components/experiment/checkTheReport/index.vue";
import PrintJS from 'print-js'
export default {
  data() {
    return {
      reportData: [],
      searchData:{
        sample_code:'',
        reportCode:'',
@@ -183,12 +197,39 @@
      total: 0,
      pageSize: 10,
      checked: true,
      dialogVisible: false,
    };
  },
  created() {
    this.getData();
  },
  mounted(){
  },
  components:{
    Preview
  },
  methods: {
    async queryReportByRCode(code){
      const resp = await getReportData({code:code});
      this.reportData = resp.data;
      console.log(this.reportData);
    },
    //查看报告按钮
    previewFun(row){
      this.dialogVisible = true;
      this.queryReportByRCode(row.reportCode);
    },
    //打印按钮
    printFun(){
      this.dialogVisible = false;
      PrintJS({
        printable: "printDiv",
        type: "html",
        // header: "原材料检测报告",
        targetStyles: ["*"],
        ignoreElements: ["no-ignore"],
      });
    },
    // çŠ¶æ€æŒ‰é’®
    handleRadioChange() {
      this.getData();
@@ -227,6 +268,7 @@
      };
      const { data } = await selectAllReport(params);
      this.reportTable = data.row;
      console.log(data.row);
      this.total = data.total;
    },
  },
@@ -280,5 +322,14 @@
      margin: 10px 0;
    }
  }
  .printStyle{
    overflow: scroll;
    height:600px;
    .el-button{
      position: absolute;
      top: 10vh;
      left: 90%;
    }
  }
}
</style>
src/views/experiment/inspectionApplication/Viewdetails/index.vue
@@ -12,7 +12,7 @@
                <el-form ref="form" :model="searchData" label-width="80px">
                    <el-col :span="6">
                        <el-form-item label="来料日期:" >
                            <el-input :disabled="true" v-model="searchData.from_time"></el-input>
                            <el-input :disabled="true" v-model="searchData.formTime"></el-input>
                            
                        </el-form-item>
                    </el-col>
@@ -23,7 +23,7 @@
                    </el-col>                    
                    <el-col :span="6">
                        <el-form-item label="产品编号:">
                            <el-input :disabled="true" v-model="searchData.mcode"></el-input>
                            <el-input :disabled="true" v-model="searchData.code"></el-input>
                        </el-form-item> 
                    </el-col>
                </el-form>
@@ -60,7 +60,7 @@
                    <el-col :span="6">
                        <el-form-item label="登记日期:">
                            <el-input :disabled="true" v-model="searchData.end_time"></el-input>
                            <el-input :disabled="true" v-model="searchData.endTime"></el-input>
                        </el-form-item>
                    </el-col>
                    
@@ -86,7 +86,7 @@
        <div>        
            <el-card style="margin: 10px;">
                <el-table
                    :data="tableData"
                    :data="insProducts"
                    border      
                    style="width: 100%">
                    <el-table-column
@@ -95,52 +95,37 @@
                    width="50">
                    </el-table-column>
                    <el-table-column
                        prop="date"
                        prop="name"
                        label="项目"
                        width="180">
                    </el-table-column>
                    <el-table-column
                        prop="name"
                        prop="unit"
                        label="单位"
                        width="180">
                    </el-table-column>
                    <el-table-column
                        prop="kk"
                        prop="internal"
                        label="标准值">
                    </el-table-column>
                    <el-table-column
                        prop="zz"
                        prop="required"
                        label="内控值">
                    </el-table-column>
                    <el-table-column
                        prop="oo"
                        wight="200"
                        label="经验人">
                        <template>
                            <el-select v-model="value" placeholder="黄晓明">
                                <el-option
                                    v-for="item in cities"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                    <span style="float: left">{{ item.label }}</span>
                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
                                    </el-option>
                    <el-table-column prop="userName" label="经验人">
                        <template slot-scope="scope">
                            <el-select v-model="value" size="small" slot="append" style="width: 220px;">
                            <el-option v-for="item in ZERENren" :key="item.id" :label="item.name"  :value="item.name"></el-option>
                            </el-select>
                        </template>
                    </el-table-column>
                    <el-table-column
                        prop="pp"
                        prop="inspectionMaterialId"
                        label="实验设备">
                        <template>
                            <el-select v-model="value" placeholder="拉力机">
                                <el-option
                                v-for="item in cities"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                            <!-- <el-select v-model="scope.row.checker" size="small" slot="append" style="width: 260px;">
                            <el-option v-for="item in checkeroptions" :key="item.value" :label="item.label">{{ item.label }}</el-option>
                            </el-select> -->
                        </template>
                    </el-table-column>
                </el-table>
@@ -151,126 +136,38 @@
</div>       
</template>
<script>
  import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments'
  import { selectInspectsListById,selectUser} from '@/api/experiment/planAssignments'
export default {
    data(){
        return {
            searchData:{
                from_time:'',
                supplier:'',
                mcode:'',
                name:'',
                specifications:'',
                unit:'',
                num:'',
                userName:'',
                end_time:'',
            },
            value:{},
            cities:[{
                value: 'Beijing',
                label: '黄小明'
                }, {
                value: 'Shanghai',
                label: '黄小明'
                }, {
            }],
            tableData:[{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          }],
          currentPage:1,
          pageSize:8,
          id:''
            searchData:{ },
            insProducts:[],
            uu:'',
            value:''
        }
    },
    created(){
        console.log(this.$route.query.icode);
        this.id = this.$route.query.icode;
        this.selectInspectsList()
        this.uu = this.$route.query.id;
        this.selectInspectsListById()
        this.selectUser()
    },
    methods: {
      async goback(){
        //返回
      async goback(){
        this.$router.push({name:'inspectionApplication'})
      },
      async selectInspectsList() {
        // èŽ·å–åˆ†é¡µåˆ—è¡¨
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage ,message:this.id})
        // this.inspectionTable = data
        console.log(res)
    //     res.data.forEach((item) => {
    //       var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
    //       var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
    //       var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
    //       var checkdate = startTime + '~' + endTime
    //       var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"]
    //       item['formTime'] = formTime // æ¥æ–™æ—¥æœŸ
    //       item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
    //       item['createTime'] = createTime // ç™»è®°æ—¥æœŸ
    //   })
        this.searchData.mcode = res.data.row[0].mcode
        this.searchData.supplier = res.data.row[0].supplier
        this.searchData.from_time = res.data.row[0]["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
        this.searchData.name = res.data.row[0].name
        this.searchData.specifications = res.data.row[0].specifications
        this.searchData.unit = res.data.row[0].unit
        this.searchData.num = res.data.row[0].num
        this.searchData.end_time = res.data.row[0]["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
        this.searchData.userName = res.data.row[0].userName
        const data = res.data.row
        data.forEach((item) => {
          var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
          var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
          var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
          var checkdate = startTime + '~' + endTime
          var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"]
          item['formTime'] = formTime // æ¥æ–™æ—¥æœŸ
          item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
          item['createTime'] = createTime // ç™»è®°æ—¥æœŸ
      })
        this.inspectionTable = data
        this.total = res.data.total
      //检验单责任人
      async selectUser(){
        const res = await selectUser()
        this.ZERENren = res.data
        // console.log(this.ZERENren);
      },
      //检验单表
      async selectInspectsListById() {
        const res = await selectInspectsListById({id:this.uu})
        this.searchData = res.data
        this.insProducts = res.data.insProducts
      }
}
}
</script>
src/views/experiment/inspectionApplication/index.vue
@@ -82,7 +82,7 @@
                  label="检验类型"
                  min-width="80px">
                  <template slot-scope="scope">
                    <div v-if="scope.row.type === 0" ><span>原材料检验</span></div>
                    <div v-if="scope.row.type === 0" ><span >原材料检验</span></div>
                    <div v-if="scope.row.type === 1" ><span>委托检验</span></div>
                    <div v-if="scope.row.type === 2" ><span>成品检验</span></div>
                  </template>
@@ -180,16 +180,17 @@
              title="新增检验单"
              :visible.sync="checkTypeVisible"
              width="50%"
                            top="10vh"
            >
              <div class="check-box">
                <el-radio-group v-model="type" @change="handleRadioChange">
                  <el-radio :label="0" border >原材料检验</el-radio>
                  <el-radio :label="1" border>委托检验</el-radio>
                  <el-radio :label="2" border>成品检验</el-radio>
                <el-radio-group v-model="type" @click.native="handleRadioChange">
                  <el-radio :style="`background-color: ${type==0?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="0" border>原材料检验</el-radio>
                  <el-radio :style="`background-color: ${type==1?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="1" border>委托检验</el-radio>
                  <el-radio :style="`background-color: ${type==2?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="2" border>成品检验</el-radio>
                </el-radio-group>
              </div>
              <div v-if="type === 0 || type === ''">
                <el-form :model="infoForm" ref="infoForm" class="checkTypeForm" label-position="top" label-width="200px" size="mini">
              <div v-if="type === 0">
                <el-form :model="infoForm" ref="infoForm" class="checkTypeForm" label-position="top" label-width="200px" size="medium">
                  <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="来料日期:">
@@ -251,44 +252,44 @@
                <el-form :model="commisionSelection" ref="commisionTable" class="checkTypeForm" label-position="top" label-width="200px" size="mini">
                  <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="来料日期:">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.formTime" placeholder="请输入来料日期" autocomplete="off" />
                          <el-form-item label="委托编号">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.entrust_coding" placeholder="请输入来料日期" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      <el-col :span="10">
                          <el-form-item label="供应商名称:">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.supplier" placeholder="请输入委托单位" autocomplete="off" />
                          <el-form-item label="委托单位">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.entrusted" placeholder="请输入委托单位" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      </el-row>
                      <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="委托编号:">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.mcode" placeholder="请输入样品编号" autocomplete="off" />
                          <el-form-item label="样品编号">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.samples_number" placeholder="请输入样品编号" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      <el-col :span="10">
                          <el-form-item label="委托名称:">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.name" placeholder="请输入样品名称" autocomplete="off" />
                          <el-form-item label="样品名称">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.sample_name" placeholder="请输入样品名称" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      </el-row>
                      <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="规格型号:">
                              <el-input style="width: 300px" type="text" :value="commisionSelection.specifications" placeholder="请输入型号规格" autocomplete="off" />
                              <el-input style="width: 300px" type="text" :value="commisionSelection.specifications_models" placeholder="请输入型号规格" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      <el-col :span="10">
                          <el-form-item label="单位:">
                            <el-input style="width: 300px" type="text" :value="commisionSelection.unit" placeholder="请输入单位" autocomplete="off" />
                          <el-form-item label="送达时间">
                            <el-input style="width: 300px" type="text" :value="commisionSelection.dateSurvey" placeholder="请输入单位" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      </el-row>
                      <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="数量:">
                            <el-input style="width: 300px" type="text" :value="commisionSelection.num" placeholder="请输入数量" autocomplete="off" />
                          <el-form-item label="完成期限">
                            <el-input style="width: 300px" type="text" :value="commisionSelection.completionDeadline" placeholder="请输入数量" autocomplete="off" />
                          </el-form-item>
                      </el-col>
                      <el-col :span="10">
@@ -367,11 +368,90 @@
              </div>
              <span slot="footer" class="dialog-footer">
                <el-button @click="checkTypeVisible = false">取 æ¶ˆ</el-button>
                <el-button type="primary" @click="addInspection">ç¡® å®š</el-button>
                <!-- <el-button type="primary" @click="addInspection">ç¡® å®š</el-button> -->
                <el-button type="primary" @click="QUEding">ç¡® å®š</el-button>
              </span>
            </el-dialog>
          </div>
        </div>
        <!-- ç¡®å®šè·³è½¬åŸºæœ¬åº“弹窗 -->
        <el-dialog
              title="标准库"
              :visible.sync="Standardframe"
              width="48%">
              <el-card>
                  <template slot-scope="scope" >
                    <span>版本选择:</span>
                            <el-select v-model="commisionTable" size="small" slot="append" style="width: 220px;">
                            <el-option v-for="item in BANben" :key="item.id" :label="item.name"  :value="item.name"></el-option>
                            </el-select>
                  </template>
              </el-card>
                <el-table
                    :data="tableData"
                    style="width: 100%; margin-bottom: 20px"
                    row-key="name"
                    border
                    default-expand-all
                    ref="multipleTable"
                    :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
                  >
                    <el-table-column type="selection" label="序号"> </el-table-column>
                    <el-table-column
                      type="index"
                      width="50px"
                      label="序号"
                    ></el-table-column>
                    <el-table-column label="项目名称" sortable>
                      <template scope="scope">
                        <el-tag
                          ><div
                            class="firstDiv"
                            :style="`color: ${
                              scope.row.code == '[1]' ? '#16a7ff' : '#58c173'
                            }`"
                          >
                            {{ scope.row.code == "[1]" ? "01" : "02" }}
                          </div>
                          <span style="color: black">{{ scope.row.name }}</span></el-tag
                        >
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="unit"
                      label="单位"
                      sortable
                    ></el-table-column>
                    <el-table-column label="标准值" sortable>
                      <template scope="scope">
                        <el-input
                          v-if="scope.row.edit === true || scope.row.code === '[2]'"
                          @blur="requiredOnfocus(scope)"
                          v-model="scope.row.required"
                          placeholder="请输入标准值"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column prop="internal" label="内控值" sortable>
                      <template scope="scope">
                        <el-input
                          v-if="scope.row.edit === true || scope.row.code === '[2]'"
                          @blur="requiredOnfocus(scope)"
                          v-model="scope.row.internal"
                          placeholder="请输入内控值"
                        ></el-input>
                      </template>
                    </el-table-column>
                  </el-table>
                  <span slot="footer" class="dialog-footer">
                <el-button @click="Standardframe = false">取 æ¶ˆ</el-button>
                <el-button type="primary" @click="Standardframe = false">ç¡® å®š</el-button>
            </span>
            </el-dialog>
        <!-- åŽŸææ–™æ£€éªŒæ¨¡æ€æ¡† -->
        <el-dialog
        title="原材料检验"
@@ -385,11 +465,10 @@
              :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
              :data="rawMaterialTable"
              style="width: 100%"
              @selection-change="handleSelectionChange"
              @selection-change="handleSelectionChange_0"
            >
              <el-table-column
            <el-table-column
                type="selection"
                label=""
                min-width="10%"
              />
              <el-table-column
@@ -398,7 +477,7 @@
                min-width="8%"
              />
              <el-table-column
                prop="dateSurvey"
                prop="createTime"
                label="来料日期"
                min-width="8%"
              />
@@ -443,12 +522,12 @@
                min-width="8%"
              />
              <el-table-column
                prop="createTime"
                prop="dateSurvey"
                label="检验日期"
                min-width="8%"
              />
              <el-table-column
                prop="state"
                prop="condition"
                label="状态"
                min-width="8%"
              >
@@ -480,50 +559,32 @@
                @selection-change="handleSelectionChange"
                style="width: 100%"
              >
                <el-table-column
                  type="selection"
                  min-width="10%"
                />
                <el-table-column
                  type="index"
                  label="序号"
                  min-width="10%"
                />
                <el-table-column
                  prop="formTime"
                  label="来料日期"
                  min-width="10%"
                />
                <el-table-column
                  prop="supplier"
                  label="供应商名称"
                  min-width="12%"
                />
                <el-table-column
                  prop="mcode"
                  label="材料编码"
                  min-width="8%"
                />
                <el-table-column
                  prop="specifications"
                  label="规格型号"
                  min-width="8%"
                />
                <el-table-column
                  prop="unit"
                  label="单位"
                  min-width="12%"
                />
                <el-table-column
                  prop="num"
                  label="数量"
                  min-width="8%"
                />
                <el-table-column
                  prop="checkdate_"
                  label="检验日期"
                  min-width="8%"
                />
              <el-table-column type="selection" min-width="10%" />
                            <el-table-column type="index" label="序号" min-width="10%" />
                            <el-table-column prop="entrust_coding" label="委托编号" min-width="10%" />
                            <el-table-column prop="entrusted" label="委托单位" min-width="12%" />
                            <el-table-column prop="samples_number" label="样品编号" min-width="8%" />
                            <el-table-column prop="sample_name" label="样品名称" min-width="8%" />
                            <el-table-column prop="specifications_models" label="规格型号" min-width="12%" />
                            <el-table-column prop="dateSurvey" label="送达时间" min-width="8%" />
                            <el-table-column prop="completionDeadline" label="完成期限" min-width="8%" />
                            <el-table-column prop="contacts" label="委托编制人" min-width="8%" />
                            <el-table-column prop="inspectionTime" label="检验日期" min-width="8%" />
                            <el-table-column prop="inspection_status" label="状态" min-width="8%">
                                <template slot-scope="scope">
                                    <div v-if="scope.row.inspection_status === 1">
                                        <span style="color: green;">已检测</span>
                                    </div>
                                    <div v-else>
                                        <span style="color: red;">待检测</span>
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column label="操作" min-width="8%">
                                <template slot-scope="scope">
                                    <el-button type="text" size="small">删除</el-button>
                                </template>
                            </el-table-column>
              </el-table>
            <span slot="footer" class="dialog-footer">
                <el-button @click="commisionVisible = false">取 æ¶ˆ</el-button>
@@ -534,13 +595,12 @@
      </template>
      <template v-else>
        <router-view />
      </template>
    </div>
  </template>
  <script>
  import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments'
  import { selectInspectsList, selectAll, addInspect,getCommisionList,YANcailiso,chooseVer} from '@/api/experiment/planAssignments'
  export default {
    data() {
      return {
@@ -550,34 +610,11 @@
          type: '',
          state: '',
        },
        valu:{},
        icode:'',
        inspectionTable: [],
        rawMaterialTable: [],
        commisionTable: [{
          specifications_models: "GGXH-AAAAA",
          inspectionTime: "2023-08-03",
          id: 2,
          samples_number: 0,
          dateSurvey: "2023-08-03",
          entrusted: "阿里巴巴",
          completionDeadline: "2023-08-03",
          contacts: "小黑",
          entrust_coding: "SL20230803000003",
          sample_name: "发动机",
          inspection_status: 1
        },{
          specifications_models: "GGXH-AAAAA",
          inspectionTime: "2023-08-03",
          id: 2,
          samples_number: 0,
          dateSurvey: "2023-08-03",
          entrusted: "阿里巴巴",
          completionDeadline: "2023-08-03",
          contacts: "小黑",
          entrust_coding: "SL20230803000003",
          sample_name: "发动机",
          inspection_status: 1
        }],
        commisionTable: [],
        finishedTable: {
          deliverydate: '',
          supplier: '',
@@ -588,7 +625,7 @@
          amount: '',
          checkdate: []
        },
        infoForm:'',
        infoForm:{},
        commisionSelection:{
          entrust_coding: '',
          entrusted: '',
@@ -629,10 +666,15 @@
        pageSize: 8, // æ¯é¡µçš„æ•°æ®æ¡æ•°
        radioValue: '全部',
        checkTypeVisible: false,
        type: '', // é»˜è®¤ä¸é€‰ä¸­çš„状态
        type: 0, // é»˜è®¤ä¸é€‰ä¸­çš„状态
        rawmaterialVisible: false,
        commisionVisible: false,
        tmp: ''
        tmp: '',
        Standardframe: false,
                tableData: [],
        tableRow:{},
        BANben:[],
        select_1: []
      }
    },
    watch: {
@@ -653,23 +695,36 @@
    },
    methods: {
      async handleClick(row){
        // console.log(item);
        // const res = await ddd({goodId:id})
        // this.$message({
        //   message: '恭喜你,这是一条成功消息',
        //   type: 'success'
        // });
        // console.log(res);
        this.inspectionTable = row;
        console.log(row.icode);
        this.icode = row.icode
        this.$router.push({name:'Viewdetails',query: {icode:row.icode}});
        this.id = row.id
        this.$router.push({name:'Viewdetails',query: {id:row.id}});
        this.selectInspectsList()
      },
      //版本库
      async chooseVer() {
        const res = await chooseVer ({
          mcode:this.commisionTable.entrust_coding,
          name:this.commisionTable.entrusted,
          scifications:this.commisionTable.specifications_models
         })
        console.log(res);
        this.BANben = res.data.row
      },
      //委托检验
      async getCommisionList() {
        const res = await getCommisionList({pageNo:1,pageSize:10 })
        console.log(res);
        this.commisionTable = res.data
      },
      //原材料
      async selecYANcailisotAllAPI() {
        const res = await YANcailiso({pageNo:1,pageSize:10 })
        console.log(res);
        this.rawMaterialTable = res.data.row
      },
      async selectInspectsList() {
        // èŽ·å–åˆ†é¡µåˆ—è¡¨
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage,message:this.icode})
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage,message:this.id})
        // this.inspectionTable = data
        // console.log(res.data.row)
        const data = res.data.row
@@ -699,7 +754,6 @@
          item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
          item['createTime'] = createTime // ç™»è®°æ—¥æœŸ
      })
      console.log('data:',data)
      this.inspectionTable = data
      if(this.searchData.type !== ''){
        if(this.searchData.state !== ''){
@@ -742,33 +796,30 @@
      this.infoForm = this.tmp
      this.rawmaterialVisible = false
    },
    async handleRadioChange(){
      if(this.type === 0){
        // åŽŸææ–™æŠ¥æ£€
        // this.rawmaterialVisible = true
        // const res = await selectAll({type: this.type})
        // var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
        //   checkdate.push(item['createTime'])
        //   checkdate.push(item['updateTime'])
        //   item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
        // })
        this.$router.push({ name: 'ReportForInspection' });
      }else if(this.type === 1){
        // this.commisionVisible = true
        // const res = await selectAll({type: this.type})
        // var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
        //   checkdate.push(item['startTime'])
        //   checkdate.push(item['endTime'])
        //   item['checkdate_'] = item['startTime'] + '~' + item['endTime']
        //   item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
        // })
        // this.commisionTable = res.data
        this.$router.push({ name: 'CommissionInspection' });
      }
    handleRadioChange(){
      setTimeout(()=>{
                if(this.type === 0){
                  // åŽŸææ–™æŠ¥æ£€
                  this.rawmaterialVisible = true
                  selectAll({type: this.type}).then(res=>{
                        var data = res.data
                        data.forEach((item)=>{
                          var checkdate = []
                          checkdate.push(item['createTime'])
                          checkdate.push(item['updateTime'])
                          item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
                        })
                        this.rawMaterialTable = res.data
                    })
                  // this.$router.push({ name: 'ReportForInspection' });
                }else if(this.type === 1){
                  this.commisionVisible = true
                  getCnList({pageNo:1,pageSize:10}).then(res=>{
                    // consommisioole.log(res);
                    this.commisionTable = res.data.row
                  })
                }
            },100)
    },
    // æ–°å¢žæ£€éªŒ
    async addInspection(){
@@ -811,7 +862,7 @@
          type: this.type,
          unit: this.finishedTable.unit })
      }
      this.type = ''
      this.type = 0
      this.checkTypeVisible = false
      this.$message({
          message: '添加成功!',
@@ -830,6 +881,28 @@
        console.log(`当前页: ${val}`)
        this.currentPage = val
        this.selectInspectsList()
      },
      //确定跳转
      QUEding(){
        // this.tableRow = a
        this.Standardframe = true
        chooseVer({mcode:this.select_1[0].materialCoding,
          name:this.select_1[0].materialName,
          scifications:this.select_1[0].specificationsModels}).then(res => {
            this.BANben = res.data.row
            console.log(this.BANben);
          })
      },
      handleSelectionChange_0(val){
        this.select_1 = []
        val.forEach(v => {
          let obj = {}
          obj.materialCoding = v.materialCoding
          obj.materialName = v.materialName
          obj.specificationsModels = v.specificationsModels
          this.select_1.push(obj)
        })
      }
    }
  }
@@ -854,7 +927,7 @@
          }
          height: auto;
          font-size: 22px !important;
          padding: 20px 40px !important;
          padding: 40px 50px !important;
          ::v-deep  .el-radio__label{
            font-size: 22px !important;
            padding-left: 0px !important;
src/views/experiment/reportAuditing/index.vue
@@ -78,7 +78,7 @@
              </span>
            </template></el-table-column
          >
          <el-table-column
          <el-table-columne
            prop="materialName"
            label="样品名称"
            min-width="10%"
@@ -86,7 +86,7 @@
          <el-table-column prop="status" label="审批状态" min-width="8%" v-model="Auditconclusion">
            <template slot-scope="scope">
              <span>
                <el-tag type="warning">{{
                <el-tag :color="scope.row.status == 0 ? '' : 'rgb(187, 237, 221)'" type="warning">{{
                  scope.row.status == 0 ? "待通过" : "通过"
                }}</el-tag>
              </span>
@@ -109,7 +109,7 @@
              title="原始记录审核"
              :visible.sync="checkskipvisible"
              width="30%"
              >
              <el-form :model="form">
                <el-form-item label="请选择审核结果:" :label-width="formLabelWidth">
@@ -153,7 +153,7 @@
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 10,
      pageSize: 8,
      checkskipvisible: false,
      form:{},
      // handleClose:{},
@@ -163,7 +163,7 @@
      Auditconclusion:{},
      tableRow: {},
    };
  },
  created() {
@@ -201,9 +201,13 @@
    //通过
    async checkskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=2
      this.reportTable[this.tableRow.$index].status=1
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '通过成功',
          type: 'success'
        });
    },
    //不通过
@@ -212,12 +216,16 @@
      this.reportTable[this.tableRow.$index].status=0
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '待通过',
          type: 'warning'
        });
    },
    //审核
    async transmitData(id) {
      let param={"id":id,"result":1}
     let data = await checkApi(param)
    async transmitData(id) {
      let param={"id":id,"result":2}
     let data = await checkApi(param)
    },
    // æŸ¥è¯¢åˆ—表
    async getData() {
src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -1,12 +1,13 @@
<template>
  <div class="add_commision">
  <div class="content-main">
    <div class="firstBox">
      <div class="title">委托信息</div>
      <div class="tableBox">
        <div class="tableBox-header">
        <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small" style="background-color: rgb(1, 102, 226);">添加样品</el-button>
<!--        <el-input
    <div class="add_commision">
        <div class="content-main">
            <div class="firstBox">
                <div class="title">委托信息</div>
                <div class="tableBox">
                    <div class="tableBox-header">
                        <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small"
                            style="background-color: rgb(1, 102, 226);">添加样品</el-button>
                        <!--        <el-input
          v-model="searchData"
          class="input-form split"
          placeholder="扫描二维码录入样品..."
@@ -14,537 +15,493 @@
          style="width: 200px;"
        >
        </el-input>-->
        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">重置</el-button>
      </div>
        <el-table
                ref="detectionInfo"
                :max-height="800"
                :cell-style="{textAlign: 'center'}"
                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
                :data="detectionInfo"
                style="width: 100%"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  min-width="10%"
                />
                <el-table-column
                  prop="sampleNumber"
                  label="样品编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="sampleName"
                  label="样品名称"
                  min-width="10%"
                />
                <el-table-column
                  prop="specificationsModels"
                  label="规格型号"
                  min-width="10%"
                />
                <el-table-column
                  prop="unit"
                  label="单位"
                  min-width="8%"
                />
                <el-table-column
                  prop="samplesNumber"
                  label="数量"
                  min-width="8%"
                />
                <el-table-column
                  prop="addway"
                  label="添加方式"
                  min-width="8%">
                  <template slot-scope="scope">
                    <div v-if="scope.row.addway === 0">
                      <el-tag :type= 'success' disable-transitions>扫描</el-tag>
                    </div>
                    <div v-if="scope.row.addway === 1">
                      <el-tag :type= 'primary' disable-transitions>录入</el-tag>
                    </div>
                    <div v-else></div>
                </template>
                </el-table-column>
                <el-table-column
                  prop="experiment"
                  label="试验"
                  min-width="8%"
                />
                <el-table-column
                  prop="remarks"
                  label="备注"
                  min-width="8%"
                />
                <el-table-column
                  label="操作"
                  min-width="8%"
                >
                  <template slot-scope="scope">
                    <el-button type="text" size="small">修改</el-button>
                    <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!-- åˆ†é¡µå™¨ -->
              <div>
                <el-pagination
                  class="pagination"
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[100, 200, 300, 400]"
                  :page-size="100"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="400">
                </el-pagination>
              </div>
      </div>
      <div class="secondBox">
        <el-row class="header">
            <el-col :span="12">基本信息</el-col>
            <el-col :span="12" style="text-align: right;">
            <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
            <!-- <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button> -->
            </el-col>
        </el-row>
            <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px" size="mini" >
              <div class="formwrapper">
                  <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="委托编号:">
                            <el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled="true" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="委托单位:">
                          <el-input style="width: 160px" v-model="infoForm.department" placeholder="请输入委托单位"  />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="联系人:">
                          <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="请输入委托单位"  />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="联系电话:">
                          <el-input style="width: 160px" v-model="infoForm.tel" placeholder="请输入联系电话" />
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="联系地址:" >
                          <el-input style="width: 160px;" v-model="infoForm.address" placeholder="请输入联系地址" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="完成期限:">
                            <el-date-picker
                              v-model="infoForm.deadline"
                              type="date"
                              placeholder="选择日期"
                              style="width: 160px;">
                            </el-date-picker>
                          </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样时间:">
                            <el-date-picker
                              v-model="infoForm.time"
                              type="date"
                              placeholder="选择日期"
                              style="width: 160px;">
                            </el-date-picker>
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样方式:">
                          <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="送样">
                                <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.value">{{ options.value }}</el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="送样人:" >
                          <el-input style="width: 160px;" v-model="infoForm.sender" placeholder="请输入送样人" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样人电话:" >
                          <el-input style="width: 160px;" v-model="infoForm.sendertel" placeholder="请输入送样人电话" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="报告数:">
                            <el-input style="width: 160px;" v-model="infoForm.num" placeholder="请输入报告数" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="委托备注:">
                            <el-input style="width: 160px;" v-model="infoForm.other" placeholder="备注" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                    </el-row>
                    </div>
                    <div class="submitBtn">
                      <el-button type="primary" size="small" @click="submitInspection" style="background-color: rgb(1, 102, 226);">提交</el-button>
                      <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
                      <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button>
                    </div>
                </el-form>
      </div>
    </div>
    <div class="checkType">
      <el-dialog
        title="添加指标"
        :visible.sync="dialogueFormVisible"
        width="40%"
      >
        <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right" label-width="100px" size="mini">
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="样品编号:">
                <el-select style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small" placeholder="请选择样品编号">
                  <el-option v-for="options in samplecodeoptions" :value="options.value" :key="options.key" >{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="样品名称:">
                <el-select style="width: 160px;" v-model="addPointerForm.sampleName" size="small" placeholder="请选择样品名称">
                  <el-option v-for="options in sampleoptions" :value="options.value" :key="options.key">{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="规格型号:">
                <el-select style="width: 160px;" v-model="addPointerForm.specificationsModels" size="small" placeholder="请选择样品名称">
                  <el-option v-for="options in model_spe_options" :value="options.value" :key="options.key">{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="样品单位:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="样品数量:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" />
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="备注:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="添加实验:">
                <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
                  <el-checkbox v-for="expers in experList" :label="expers.label" :key="expers.key">{{ expers.label }}</el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </el-col>
          </el-row>
              </el-form>
              <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="addInspection">添加</el-button>
                <el-button @click="dialogueFormVisible = false">取 æ¶ˆ</el-button>
              </span>
      </el-dialog>
          </div>
  </div>
</div>
                        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">重置</el-button>
                    </div>
                    <el-table ref="detectionInfo" :max-height="800" :cell-style="{textAlign: 'center'}"
                        :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
                        :data="detectionInfo" style="width: 100%;margin-bottom: 20px;">
                        <el-table-column type="index" label="序号" min-width="10%" />
                        <el-table-column prop="sampleNumber" label="样品编号" min-width="8%" />
                        <el-table-column prop="sampleName" label="样品名称" min-width="10%" />
                        <el-table-column prop="specificationsModels" label="规格型号" min-width="10%" />
                        <el-table-column prop="unit" label="单位" min-width="8%" />
                        <el-table-column prop="samplesNumber" label="数量" min-width="8%" />
                        <el-table-column prop="addway" label="添加方式" min-width="8%">
                            <template slot-scope="scope">
                                <div v-if="scope.row.addway === 0">
                                    <el-tag type="success" disable-transitions>扫描</el-tag>
                                </div>
                                <div v-if="scope.row.addway === 1">
                                    <el-tag type="primary" disable-transitions>录入</el-tag>
                                </div>
                                <div v-else></div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="remarks" label="备注" min-width="8%" />
                        <el-table-column label="操作" min-width="8%">
                            <template slot-scope="scope">
                                <el-button type="text" size="small">修改</el-button>
                                <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="secondBox">
                    <el-row class="header">
                        <el-col :span="12" style="font-size: 16px;margin-bottom: 5px;">基本信息</el-col>
                        <el-col :span="12" style="text-align: right;">
                        </el-col>
                    </el-row>
                    <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px"
                        size="mini">
                        <div class="formwrapper">
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="委托编号:">
                                        <el-input style="width: 200px" type="text" :value="infoForm.commisioncode" readonly disabled
                                            autocomplete="off" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="委托单位:">
                                        <el-input style="width: 200px" v-model="infoForm.department" placeholder="请输入委托单位" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="联系人:">
                                        <el-input style="width: 200px" v-model="infoForm.contacter" placeholder="请输入委托单位" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="联系电话:">
                                        <el-input style="width: 200px" v-model="infoForm.tel" placeholder="请输入联系电话" size="small" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="联系地址:">
                                        <el-input style="width: 200px;" v-model="infoForm.address" placeholder="请输入联系地址" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="完成期限:">
                                        <el-date-picker v-model="infoForm.deadline" type="date" placeholder="选择日期" style="width: 200px;"
                                            size="small">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样时间:">
                                        <el-date-picker v-model="infoForm.time" type="date" placeholder="选择日期" style="width: 200px;">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样方式:">
                                        <el-select style="width: 200px;" v-model="infoForm.way" size="small" placeholder="送样">
                                            <el-option v-for="options in sampleDeliveryMode" :key="options.key"
                                                :value="options.value">{{ options.value }}</el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="送样人:">
                                        <el-input style="width: 200px;" v-model="infoForm.sender" placeholder="请输入送样人" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样人电话:">
                                        <el-input style="width: 200px;" v-model="infoForm.sendertel" placeholder="请输入送样人电话"
                                            autocomplete="off" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="报告数:">
                                        <el-input style="width: 200px;" v-model="infoForm.num" placeholder="请输入报告数" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="委托备注:">
                                        <el-input style="width: 200px;" v-model="infoForm.other" placeholder="备注" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                        <div class="submitBtn">
                            <el-button type="primary" size="small" @click="submitInspection"
                                style="background-color: rgb(1, 102, 226);">提交</el-button>
                            <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
                            <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button>
                        </div>
                    </el-form>
                </div>
            </div>
            <div class="checkType">
                <el-dialog title="添加样品" :visible.sync="dialogueFormVisible" width="40%" top="30vh">
                    <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right"
                        label-width="100px" size="mini">
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="样品编号:">
                                    <el-input v-model="addPointerForm.sampleNumber" size="small" disabled>
                                    </el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="样品名称:">
                                    <el-select v-model="addPointerForm.sampleName" size="small" placeholder="请选择样品名称"
                                        @change="upMaterialName">
                                        <el-option v-for="options in sampleoptions" :value="options.key" :label="options.value"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="评定标准:">
                                    <el-select v-model="addPointerForm.addway" size="small" placeholder="请选择评定标准">
                                        <el-option v-for="options in model_spe_options" :value="options.value"
                                            :key="options.key">{{ options.value }}</el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="规格型号:">
                                    <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称">
                                        <el-option v-for="options in model_spe_options" :value="options.value"
                                            :key="options.key">{{ options.value }}</el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="样品单位:">
                                    <el-input type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="样品数量:">
                                    <el-input type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="9">
                                <el-form-item label="添加项目:">
                                    <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
                                        <el-checkbox v-for="expers in experList" :label="expers.label"
                                            :key="expers.key">{{ expers.label }}</el-checkbox>
                                    </el-checkbox-group>
                                </el-form-item>
                            </el-col>
                            <el-col :span="41">
                                <el-form-item label="备注:">
                                    <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}"  style="width: 200px;" v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                    <span slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="addInspection">添加</el-button>
                        <el-button @click="dialogueFormVisible = false">取 æ¶ˆ</el-button>
                    </span>
                </el-dialog>
            </div>
        </div>
    </div>
</template>
<script>
import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection'
export default {
  data() {
    return {
      currentPage: 0,
      searchData: '',
      infoForm: {
        commisioncode: '',
        department: '',
        contacter: '',
        tel: '',
        address: '',
        deadline: '',
        time: '',
        way: '',
        sender: '',
        sendertel: '',
        num: '',
        other: ''
      },
      detectionInfo: [],
      addPointerForm:{
        sampleNumber: '',
        sampleName: '',
        specificationsModels: '',
        unit: '',
        samplesNumber: '',
        remarks: '',
        experiment: [],
        addway: ''
      },
      experList:[{
        key: '1',
        label: '外观检查'
      },{
        key: '2',
        label: '动作电压试验'
      },{
        key: '3',
        label: '电阻管泄漏电流试验'
      },{
        key: '4',
        label: '绝缘部分交流耐压试验'
      }],
      sampleoptions:[{
        key:'1',
        value: '选项1'
      },{
        key:'2',
        value: '选项2'
      }],
      samplecodeoptions:[{
        key:'1',
        value: ''
      }],
      model_spe_options:[{
        key:'1',
        value: '选项1'
      },{
        key: '2',
        value: '选项2'
      }],
      sampleDeliveryMode:[{
        key: '1',
        value: '送样'
      },{
        key: '2',
        value: '上门'
      }],
      dialogueFormVisible: false,
      showDetail: false
    }
  },
  created(){
    this.getlink()
  },
  mounted(){
    this.getSampleName()
    this.getModelSpecification()
  },
  methods: {
    // èŽ·å–é“¾æŽ¥link
    getlink(){
      getlink().then((result)=>{
        this.$store.commit('settings/SAVE_LINK',result.data)
        console.log(this.$store.state.settings.link)
      })
    },
    async getSampleName(){
      const res = await getSampleName()
      // console.log('res',res.data)
      this.sampleoptions = res.data.map((item)=>{
        return{
          key:item.id.toString(),
          value:item.name
        }
      })
      this.samplecodeoptions = res.data.map((item)=>{
        return{
          key:item.id.toString(),
          value:item.code
        }
      })
    },
    async getModelSpecification(){
      const res = await getModelSpecification({materialId: '1'})
      // console.log(res)
      this.model_spe_options = res.data.map((item)=>{
        return{
          key:item.specificationsId,
          value:item.specificationsName
        }
      })
    },
    addInspection(){
      let exper = this.addPointerForm.experiment[0]
      this.addPointerForm.addway = 1
      for(let i=1;i<this.addPointerForm.experiment.length;i++){
        exper += ',' + this.addPointerForm.experiment[i]
      }
      // console.log(exper)
      this.addPointerForm.experiment = exper
      let tmp = this.addPointerForm
      this.detectionInfo.push(tmp)
      this.dialogueFormVisible = false
      this.addPointerForm ={
        sampleNumber: '',
        sampleName: '',
        specificationsModels: '',
        unit: '',
        samplesNumber: '',
        remarks: '',
        experiment: [],
        addway: ''
      }
    },
    async submitInspection(){
      let sampledeliveryway
      if(this.infoForm.way === '送样'){
        sampledeliveryway = 1
      }else{
        sampledeliveryway = 2
      }
      const res = await addInspection({completionDeadline: this.infoForm.deadline,
        contactAddress: this.infoForm.address,
        contactNumber: this.infoForm.tel,
        contacts: this.infoForm.contacter,
        entrustRemarks: this.infoForm.other,
        entrusted: this.infoForm.department,
        inspectionTime: this.infoForm.time,
        linkDetectionList: this.detectionInfo,
        reportNumber: parseInt(this.infoForm.num),
        sampleDeliveryMode: sampledeliveryway,
        sampleDeliveryPhone: this.infoForm.sendertel,
        sampleSender: this.infoForm.sender})
//       const res = await addInspection({
//   completionDeadline: "2023-08-03",
//   contactAddress: "江苏南通",
//   contactNumber: "12321423432",
//   contacts: "小黑",
//   entrustRemarks: "委托备注YPBH123456789YPBH123456789YPBH123456789",
//   entrusted: "阿里巴巴",
//   inspectionTime: "2023-08-03",
//   linkDetectionList: [
//     {
//       "experiment": "做梦",
//       "remarks": "通过了",
//       "sampleName": "发动机",
//       "sampleNumber": "YPBH123456789",
//       "samplesNumber": 20,
//       "specificationsModels": "GGXH-AAAAA",
//       "unit": "百度"
//     }
//   ],
//   reportNumber: 23,
//   sampleDeliveryMode: 1,
//   sampleDeliveryPhone: "123456789676",
//   sampleSender: "小白"
// })
      // console.log(res)
      this.infoForm.commisioncode = res.data
      if(res.data){
        this.$message({
          message: '恭喜你!',
          type: 'success'
        })
        // è·³è½¬é¡µé¢
        this.$router.push('/inspectionManagement/commissionInspection')
        this.showDetail = true
      }else{
        this.$message.error(res.message)
      }
    },
    handleSizeChange(pageSize) {
      this.pageParams.pageSize = pageSize
    },
    handleCurrentChange(pageNo) {
      this.pageParams.pageNo = pageNo
    },
    deleteRow(row){
      console.log(row)
      row = null
    }
  }
}
    import {
        getSampleName,
        getModelSpecification,
        getlink,
        addInspection,
        isIfViewUUID
    } from '@/api/inspection/commisioninspection'
    export default {
        data() {
            return {
                currentPage: 0,
                searchData: '',
                infoForm: {
                    commisioncode: '',
                    department: '',
                    contacter: '',
                    tel: '',
                    address: '',
                    deadline: '',
                    time: '',
                    way: '',
                    sender: '',
                    sendertel: '',
                    num: '',
                    other: ''
                },
                detectionInfo: [],
                addPointerForm: {
                    sampleNumber: '',
                    sampleName: '',
                    specificationsModels: '',
                    unit: '',
                    samplesNumber: '',
                    remarks: '',
                    experiment: [],
                    addway: ''
                },
                experList: [{
                    key: '1',
                    label: '外观检查'
                }, {
                    key: '2',
                    label: '动作电压试验'
                }, {
                    key: '3',
                    label: '电阻管泄漏电流试验'
                }, {
                    key: '4',
                    label: '绝缘部分交流耐压试验'
                }],
                sampleoptions: [{
                    key: '1',
                    value: '选项1'
                }, {
                    key: '2',
                    value: '选项2'
                }],
                samplecodeoptions: [{
                    key: '1',
                    value: ''
                }],
                model_spe_options: [],
                sampleDeliveryMode: [{
                    key: '1',
                    value: '送样'
                }, {
                    key: '2',
                    value: '上门'
                }],
                dialogueFormVisible: false,
                showDetail: false,
                viewId: null
            }
        },
        created() {
            this.viewId = this.$route.params.viewId
            this.$store.commit('settings/SAVE_LINK', this.viewId)
            this.getlink(this.$route.params.viewId)
        },
        mounted() {
            this.getSampleName()
        },
        methods: {
            getlink(viewId) {
                if (viewId == null) {
                    this.$message.error('当前链接不在有效期内,系统自动关闭')
                    this.$router.push('/404')
                    return
                }
                isIfViewUUID({
                    viewId
                }).then(res => {
                    if (!res.data) {
                        this.$message.error('当前链接不在有效期内,系统自动关闭')
                        this.$router.push('/404')
                    }
                })
            },
            async getSampleName() {
                const res = await getSampleName()
                this.sampleoptions = res.data.map((item) => {
                    return {
                        key: item.id.toString(),
                        value: item.name,
                        code: item.code
                    }
                })
            },
            async getModelSpecification(val) {
                const res = await getModelSpecification({
                    materialId: val
                })
                this.model_spe_options = res.data.map((item) => {
                    return {
                        key: item.specificationsId,
                        value: item.specificationsName
                    }
                })
            },
            addInspection() {
                let exper = this.addPointerForm.experiment[0]
                this.addPointerForm.addway = 1
                for (let i = 1; i < this.addPointerForm.experiment.length; i++) {
                    exper += ',' + this.addPointerForm.experiment[i]
                }
                // console.log(exper)
                this.addPointerForm.experiment = exper
                let tmp = this.addPointerForm
                this.detectionInfo.push(tmp)
                this.dialogueFormVisible = false
                this.addPointerForm = {
                    sampleNumber: '',
                    sampleName: '',
                    specificationsModels: '',
                    unit: '',
                    samplesNumber: '',
                    remarks: '',
                    experiment: [],
                    addway: ''
                }
            },
            async submitInspection() {
                let sampledeliveryway
                if (this.infoForm.way === '送样') {
                    sampledeliveryway = 1
                } else {
                    sampledeliveryway = 2
                }
                const res = await addInspection({
                    completionDeadline: this.infoForm.deadline,
                    contactAddress: this.infoForm.address,
                    contactNumber: this.infoForm.tel,
                    contacts: this.infoForm.contacter,
                    entrustRemarks: this.infoForm.other,
                    entrusted: this.infoForm.department,
                    inspectionTime: this.infoForm.time,
                    linkDetectionList: this.detectionInfo,
                    reportNumber: parseInt(this.infoForm.num),
                    sampleDeliveryMode: sampledeliveryway,
                    sampleDeliveryPhone: this.infoForm.sendertel,
                    sampleSender: this.infoForm.sender
                })
                this.infoForm.commisioncode = res.data
                if (res.data) {
                    this.$message({
                        message: '恭喜你!',
                        type: 'success'
                    })
                    // è·³è½¬é¡µé¢
                    this.$router.push('/inspectionManagement/commissionInspection')
                    this.showDetail = true
                } else {
                    this.$message.error(res.message)
                }
            },
            handleSizeChange(pageSize) {
                this.pageParams.pageSize = pageSize
            },
            handleCurrentChange(pageNo) {
                this.pageParams.pageNo = pageNo
            },
            deleteRow(row) {
            },
            upMaterialName(val) {
                this.sampleoptions.forEach(a => {
                    if (a.key == val) {
                        this.addPointerForm.sampleNumber = a.code
                    }
                })
                this.getModelSpecification(val)
            }
        }
    }
</script>
<style lang="scss" scoped>
.add_commision{
  padding: 20px;
}
.content-main{
  padding: 20px 40px;
  background-color: #f0f2f5;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  // align-items: center;
.firstBox{
  .title {
    padding: 15px 10px;
    font-size: 18px;
    background-color: #0166e2;
    color: #fff;
    border-radius: 4px;
  }
  .tableBox{
    background-color: #fff;
    padding: 0px 20px;
    margin: 0px -15px;
    flex: 1;
    background: #fff;
    /* padding: 20px 20px 10px 20px; */
    display: flex;
    flex-direction: column;
    .tableBox-header{
      padding: 20px 0px;
      .split{
        margin-right: 15px;
      }
    }
          .el-table {
            flex: 1;
          }
          >div:nth-child(3){
            display: flex;
            justify-content: end;
            margin: 10px 0;
          }
  }
}
.secondBox{
  margin: 0px -15px;
  .header{
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    margin-top: 10px;
  }
  .submitBtn{
    display: flex;
    justify-content: end;
    margin-right: 40px;
    margin-top: 20px;
  }
}
.infoForm{
  background-color: #fff;
  padding: 20px 50px;
  .formwrapper{
    margin: 20px 0px;
    padding-left: 30px;
    .el-row{
      margin: 10px 0px;
    }
  }
}
}
</style>
        .firstBox {
            .title {
                padding: 15px 10px;
                font-size: 18px;
                background-color: #0166e2;
                color: #fff;
                border-radius: 4px;
                margin-bottom: 20px;
            }
            .tableBox {
                background-color: #fff;
                padding: 0px 20px;
                flex: 1;
                background: #fff;
                /* padding: 20px 20px 10px 20px; */
                display: flex;
                flex-direction: column;
                .tableBox-header {
                    padding: 20px 0px;
                    .split {
                        margin-right: 15px;
                    }
                }
                .el-table {
                    flex: 1;
                }
                >div:nth-child(3) {
                    display: flex;
                    justify-content: end;
                    margin: 10px 0;
                }
            }
        }
        .secondBox {
            .header {
                display: flex;
                justify-content: space-between;
                padding: 10px 20px;
                margin-top: 10px;
            }
            .submitBtn {
                display: flex;
                justify-content: end;
                margin-right: 40px;
                margin-top: 20px;
            }
        }
        .infoForm {
            background-color: #fff;
            padding: 20px 50px;
            .formwrapper {
                margin: 20px 0px;
                padding-left: 30px;
                .el-row {
                    margin: 10px 0px;
                }
            }
        }
    }
</style>
src/views/inspectionManagement/commissionInspection/index.vue
@@ -339,70 +339,71 @@
        display: flex;
        justify-content: space-between;
        padding: 5px 24px 0px 24px;
    }
.top-bar{
    margin: -25px -15px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .sermargin{
      margin-right: 60px;
    }
    .rightForm{
      display: flex;
      justify-content: space-between;
      /* background-color: #bfa; */
      height: 40px;
      line-height: 40px;
      >div{
        padding: 0px 10px;
        padding-bottom: 10px;
        border:1px solid rgb(8, 156, 230);
        margin-right: 10px;
        /* height: 40px;
        .sermargin {
            margin-right: 60px;
        }
        .rightForm {
            display: flex;
            justify-content: space-between;
            /* background-color: #bfa; */
            height: 40px;
            line-height: 40px;
            >div {
                padding: 0px 10px;
                padding-bottom: 10px;
                border: 1px solid rgb(8, 156, 230);
                margin-right: 10px;
                /* height: 40px;
        line-height: 40px; */
      }
      .rightBtn{
        background-color: rgb(1, 102, 226);
      }
    }
  }
            }
.library-table{
      background-color: #fff;
      flex: 1;
      margin: 0px -15px;
      margin-top: 40px;
      display: flex;
      flex-direction: column;
      .table-header{
        padding: 20px;
        display: flex;
        justify-content: space-between;
        .el-form-item{
          margin-bottom: 30px !important;
        }
      }
      .table-box{
          padding: 0px 20px;
          margin-top: 0px;
          flex: 1;
          background: #fff;
          /* padding: 20px 20px 10px 20px; */
          display: flex;
          flex-direction: column;
          .el-table {
            flex: 1;
          }
          >div:nth-child(2){
            display: flex;
            justify-content: end;
            margin: 10px 0;
          }
      }
    }
            .rightBtn {
                background-color: rgb(1, 102, 226);
            }
        }
    }
    .library-table {
        background-color: #fff;
        flex: 1;
        margin: 0px -15px;
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        .table-header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            .el-form-item {
                margin-bottom: 30px !important;
            }
        }
        .table-box {
            padding: 0px 20px;
            margin-top: 0px;
            flex: 1;
            background: #fff;
            /* padding: 20px 20px 10px 20px; */
            display: flex;
            flex-direction: column;
            .el-table {
                flex: 1;
            }
            >div:nth-child(2) {
                display: flex;
                justify-content: end;
                margin: 10px 0;
            }
        }
    }
    .rightBtn {
        background-color: rgb(1, 102, 226);
src/views/inspectionManagement/reportForInspection/index.vue
@@ -123,13 +123,13 @@
                min-width="8%"
              />
              <el-table-column
                prop="condition"
                prop="type"
                label="状态"
                min-width="8%"
              >
              <template slot-scope="scope">
                <span :style="{ color: scope.row.condition === 1 ? 'green' : 'red' }">
                  {{ scope.row.condition === 1 ? '已检测':'未检测' }}
                <span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }">
                  {{ scope.row.type === 1 ? '已检测':'未检测' }}
                </span>
              </template>
              </el-table-column>
@@ -386,6 +386,7 @@
      // console.log(res)
      this.inspectionTable = res.data.row
      this.data = res.data.row
      console.log(res.data.row);
      this.total = res.data.total
    },
    async search(){
src/views/laboratory/organizational/index.vue
@@ -23,9 +23,15 @@
            type="primary"
            size="small"
            icon="el-icon-circle-plus-outline"
            @click="dialogVisible = true"
            >新增</el-button
          >
          <el-button size="small" icon="el-icon-delete-solid">删除</el-button>
          <el-button
            size="small"
            icon="el-icon-delete-solid"
            @click="listDeleteClick"
            >删除</el-button
          >
        </div>
      </div>
      <div class="table-main-div">
@@ -39,27 +45,84 @@
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="55"> </el-table-column>
          <el-table-column label="日期" width="120">
            <template slot-scope="scope">{{ scope.row.date }}</template>
          </el-table-column>
          <el-table-column prop="name" label="姓名" width="120">
          </el-table-column>
          <el-table-column prop="address" label="地址" show-overflow-tooltip>
          <el-table-column
            label="序号"
            type="index"
            width="70"
          ></el-table-column>
          <el-table-column prop="department" label="部门"> </el-table-column>
          <el-table-column label="操作">
            <template scope="scope">
              <el-button type="text" size="mini" @click="updateClick(scope)"
                >编辑</el-button
              >
              <el-button type="text" size="mini" @click="deleteClick(scope)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <el-dialog
      :title="isUpdate ? '更新部门名称' : '新增部门'"
      :visible.sync="dialogVisible"
      width="30%"
    >
      <el-form
        :model="formData"
        :rules="rules"
        ref="ruleForm"
        class="elFormClass"
      >
        <el-form-item label="上级部门:" prop="name" style="padding-left: 10px">
          <el-input
            v-model="treeNodeData.department"
            :disabled="true"
            style="width: 81.3%"
          >
          </el-input>
        </el-form-item>
        <el-form-item
          label="部门名称:"
          prop="department"
          style="padding-top: 20px"
        >
          <el-input
            placeholder="请输入部门名称"
            v-model="formData.department"
            clearable
            style="width: 80%"
          >
          </el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="saveForm">{{
          isUpdate ? "更 æ–°" : "新 å¢ž"
        }}</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getOrganizationalApi } from "@/api/laboratory/organizational";
import {
  getOrganizationalApi,
  getTableInitializationApi,
  organizationalAddApi,
  organizationalUpdateApi,
  organizationalDeleteApi,
} from "@/api/laboratory/organizational";
export default {
  name: "Organizational",
  data() {
    return {
      filterText: "",
      dialogVisible: false,
      msg: "",
      isUpdate: false,
      data: [],
      // tree树默认值配置
      defaultProps: {
@@ -67,28 +130,24 @@
        label: "department",
        id: "id",
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 å¼„",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 å¼„",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 å¼„",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 å¼„",
        },
      ],
      formData: {
        fatherId: "",
        department: "",
      },
      // æ–°å¢žæŒ‰é’®é‡Œé¢ç¦æ­¢è¾“入框数据
      disabledInputShow: "",
      // ä¿å­˜ç‚¹å‡»èŠ‚ç‚¹æ•°æ®
      treeNodeData: {},
      // å¤šé€‰åˆ é™¤
      listDelete: [],
      // è¡¨æ ¼æ•°æ®
      tableData: [],
      rules: {
        department: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 1, max: 25, message: "长度在 1 åˆ° 5 ä¸ªå­—符", trigger: "blur" },
        ],
      },
    };
  },
  methods: {
@@ -101,6 +160,13 @@
    treeInitialization() {
      getOrganizationalApi().then((res) => {
        this.data = res.data;
        // åˆå§‹åŒ–默认msg提示路径为第一节点名称
        this.msg = res.data[0].department;
        // åˆå§‹åŒ–调用表格接口
        this.tableInitialization(res.data[0].id);
        // åˆå§‹åŒ–保存第一节点数据
        this.treeNodeData.department = res.data[0].department;
        this.treeNodeData.id = res.data[0].id;
      });
    },
    // èŽ·å–æ ‘è·¯å¾„
@@ -115,10 +181,14 @@
    // ç‚¹å‡»æ ‘节点
    handleNodeClick(data, node, element) {
      this.getParentData(node.parent, node.data.department);
      console.log(`output->this.msg`, this.msg);
      console.log(`output->data`, data);
      console.log(`output->node`, node);
      console.log(`output->element`, element);
      // ç”±äºŽç‚¹å‡»ç¬¬ä¸€èŠ‚ç‚¹æ— æ³•è§¦å‘getParentData里面的判断,只能额外判断
      if (node.data.id === 0) {
        this.msg = node.data.department;
      }
      // ç‚¹å‡»èŠ‚ç‚¹æ•°æ®å­˜å‚¨ä¸‹æ¥
      this.treeNodeData = node.data;
      // ç‚¹å‡»è§¦å‘该函数,更新表格数据
      this.tableInitialization(node.data.id);
    },
    // æ”¹å˜å¤šé€‰æ¡†çŠ¶æ€
    toggleSelection(rows) {
@@ -132,7 +202,71 @@
    },
    // ç‚¹å‡»å¤šé€‰æ¡†ä»¥åŽçš„æ“ä½œ
    handleSelectionChange(val) {
      this.multipleSelection = val;
      this.listDelete = []
      val.forEach((v) => {
        this.listDelete.push(v.id);
        });
    },
    // åˆå§‹åŒ–表格数据
    tableInitialization(departmentId) {
      getTableInitializationApi(departmentId).then((res) => {
        this.tableData = res.data;
      });
    },
    // æ›´æ–°ä¸Žæ–°å¢žè¡¨å•
    saveForm() {
      this.formData.fatherId = this.treeNodeData.id;
      this.$refs.ruleForm.validate((valid) => {
        if (valid) {
          if (!this.isUpdate) {
            organizationalAddApi(this.formData).then((res) => {
              this.$message({
                message: res.message,
                type: "success",
              });
              this.treeInitialization();
              this.dialogVisible = false;
            });
          } else {
            organizationalUpdateApi(this.formData).then((res) => {
              this.$message({
                message: res.message,
                type: "success",
              });
              this.treeInitialization();
              this.dialogVisible = false;
            });
          }
        }
      });
    },
    // ç‚¹å‡»ç¼–辑触发
    updateClick(scope) {
      this.dialogVisible = true;
      this.isUpdate = true;
      this.formData.id = scope.row.id;
      this.formData.fatherId = this.treeNodeData.id;
      this.formData.department = scope.row.department;
    },
    // è¡¨æ ¼ä¸­çš„删除按钮
    deleteClick(scope) {
      organizationalDeleteApi(scope.row.id).then((res) => {
        this.$message({
          message: res.message,
          type: "success",
        });
        this.treeInitialization();
      });
    },
    // å¤´éƒ¨å¤šé€‰åˆ é™¤
    listDeleteClick() {
      organizationalDeleteApi(this.listDelete).then((res) => {
        this.$message({
          message: res.message,
          type: "success",
        });
        this.treeInitialization();
      });
    },
  },
  mounted() {
@@ -141,6 +275,15 @@
  watch: {
    filterText(val) {
      this.$refs.tree.filter(val);
    },
    dialogVisible: {
      handler(newVal, oldVal) {
        if (newVal == false) {
          this.isUpdate = false;
          this.formData = {};
          this.$refs.ruleForm.resetFields();
        }
      },
    },
  },
};
@@ -187,4 +330,7 @@
  font-weight: 500;
  color: #999999;
}
.elFormClass .el-form-item__error {
  padding-left: 90px;
}
</style>
src/views/laboratory/personnel/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="personnel-main ">
  <div class="personnel-main">
    <div class="page-header-search">
      <div class="search-bar">
        <el-form ref="form" :inline="true">
@@ -10,74 +10,197 @@
          </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 type="primary" plain @click="resetData()"
              >重置</el-button
            >
            <!-- <el-button type="text">高级搜索<i class="el-icon-arrow-down el-icon--right" /></el-button> -->
          </el-form-item>
        </el-form>
      </div>
      <div class="serve-btn">
        <el-button type="primary" icon="el-icon-plus" @click="dialogFormVisible = true">新增人员</el-button>
        <el-button
          type="primary"
          icon="el-icon-plus"
          @click="dialogFormVisible = true"
          >新增人员</el-button
        >
        <el-dialog title="新增人员" :visible.sync="dialogFormVisible" width="30%">
          <el-form :model="form" :rules="rules">
            <el-form-item label="账号" :label-width="formLabelWidth" prop="account">
              <el-input v-model="form.account" autocomplete="off" />
        <el-dialog
          :title="isUpdate == true ? '更新人员信息' : '新增人员'"
          :visible.sync="dialogFormVisible"
          width="30%"
        >
          <el-form :model="form" ref="form" :rules="rules">
            <el-form-item
              label="账号"
              :label-width="formLabelWidth"
              prop="account"
            >
              <el-input v-model="form.account" />
            </el-form-item>
            <el-form-item label="年龄" :label-width="formLabelWidth">
              <el-input v-model="form.age" autocomplete="off" />
              <el-input v-model="form.age" />
            </el-form-item>
            <el-form-item label="邮箱" :label-width="formLabelWidth" prop="email">
              <el-input v-model="form.email" autocomplete="off" />
            <el-form-item
              label="邮箱"
              :label-width="formLabelWidth"
              prop="email"
            >
              <el-input v-model="form.email" />
            </el-form-item>
            <el-form-item label="名字" :label-width="formLabelWidth" prop="name">
              <el-input v-model="form.name" autocomplete="off" />
            <el-form-item
              label="名字"
              :label-width="formLabelWidth"
              prop="name"
            >
              <el-input v-model="form.name" />
            </el-form-item>
            <el-form-item label="电话" :label-width="formLabelWidth" prop="phone">
              <el-input v-model="form.phone" autocomplete="off" />
            <el-form-item
              label="电话"
              :label-width="formLabelWidth"
              prop="phone"
            >
              <el-input v-model="form.phone" />
            </el-form-item>
            <el-form-item label="权限" :label-width="formLabelWidth" prop="role_id">
              <el-input v-model="form.role_id" autocomplete="off" />
            <el-form-item
              label="部门"
              :label-width="formLabelWidth"
              required
              prop="organizationId"
            >
              <el-cascader
                style="width: 100%"
                :options="options"
                :props="myProp"
                v-model="form.organizationId"
                clearable
              ></el-cascader>
            </el-form-item>
            <el-form-item
              label="权限"
              :label-width="formLabelWidth"
              prop="roleId"
            >
              <el-select
                v-model="form.roleId"
                clearable
                style="100%"
                placeholder="请选择权限"
              >
                <el-option
                  v-for="item in roleList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-form>
          <div slot="footer" class="dialog-footer">
            <el-button @click="dialogFormVisible = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="submitForm()">ç¡® å®š</el-button>
            <el-button type="primary" @click="submitForm()">{{
              isUpdate == true ? "更 æ–°" : "ç¡® å®š"
            }}</el-button>
          </div>
        </el-dialog>
      </div>
    </div>
    <div class="content-main">
      <div class="personner-table">
        <el-table ref="personnerlTable" :max-height="700" :cell-style="{ textAlign: 'center' }"
          :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
          :data="personnerlTable" style="width: 100%">
        <el-table
          ref="personnerlTable"
          height="calc(100vh - 240px)"
          border
          :cell-style="{ textAlign: 'center' }"
          :header-cell-style="{
            border: '0px',
            background: '#f5f7fa',
            color: '#606266',
            boxShadow: 'inset 0 1px 0 #ebeef5',
            textAlign: 'center',
          }"
          @filter-change="fnFilterChangeInit"
          :data="personnerlTable"
          style="width: 100%"
        >
          <el-table-column prop="username" label="角色名称" min-width="120" />
          <el-table-column prop="roleName" label="角色权限" min-width="120" />
          <el-table-column prop="age" label="年龄" min-width="150" />
          <el-table-column prop="age" label="年龄" min-width="150">
            <template scope="scope">
              {{
                scope.row.age === "" ||
                scope.row.age === null ||
                scope.row.age == undefined
                  ? "---"
                  : scope.row.age
              }}
            </template>
          </el-table-column>
          <el-table-column prop="department" label="部门" min-width="150" />
          <el-table-column prop="createTime" label="创建时间" min-width="180" />
          <el-table-column prop="phone" label="电话" min-width="200" />
          <el-table-column prop="email" label="邮箱" min-width="200" />
          <el-table-column prop="jobState" label="在职状态" min-width="120"
            :filters="[{ text: 0, value: 0 }, { text: 1, value: 1 }]" :filter-method="filterTag"
            filter-placement="bottom-end">
          <el-table-column prop="phone" label="电话" min-width="200">
            <template scope="scope">
              {{
                scope.row.phone === "" || scope.row.phone === undefined
                  ? "---"
                  : scope.row.phone
              }}
            </template>
          </el-table-column>
          <el-table-column prop="email" label="邮箱" min-width="200">
            <template scope="scope">
              {{
                scope.row.email === "" || scope.row.email === undefined
                  ? "---"
                  : scope.row.email
              }}
            </template>
          </el-table-column>
          <el-table-column
            prop="jobState"
            label="在职状态"
            min-width="120"
            :filters="[
              { text: '在职', value: 1 },
              { text: '离岗', value: 0 },
            ]"
            column-key="status"
            :filter-method="filterTag"
            filter-placement="bottom-end"
          >
            <template slot-scope="scope">
              <el-tag :type="scope.row.jobState === 0 ? 'danger' : 'success'" disable-transitions>{{
                scope.row.jobState === 0 ? '离岗' : '在职' }}</el-tag>
              <el-tag
                :type="scope.row.jobState === 0 ? 'danger' : 'success'"
                disable-transitions
                >{{ scope.row.jobState === 0 ? "离岗" : "在职" }}</el-tag
              >
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="120">
            <template slot-scope="scope">
              <el-button type="text" size="small" @click="handleClick(scope.row)">编辑</el-button>
              <!-- <el-button type="text" size="small">编辑</el-button> -->
              <el-button
                type="text"
                size="small"
                @click="handleClick(scope.row)"
                >编辑</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <div>
          <!-- åˆ†é¡µå™¨ -->
          <el-pagination :current-page="currentPage" :page-sizes="[100, 200, 300, 400]" :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper" :total="this.personnerlTable.length"
            @size-change="handleSizeChange" @current-change="handleCurrentChange" />
          <el-pagination
            :current-page="currentPage"
            :page-sizes="[10, 15, 20, 25]"
            :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
        </div>
      </div>
    </div>
@@ -85,15 +208,15 @@
</template>
<script>
import { get, post } from '@/api/util/requestUtil';
import urlInfo from '../../../api/urlEnum/personnel.js'
import { get, post, put } from "@/api/util/requestUtil";
import urlInfo from "../../../api/urlEnum/personnel.js";
import { getOrganizationalApi } from "@/api/laboratory/organizational";
export default {
  data() {
    return {
      keyword: '',
      personnerlTable: [
      ],
      keyword: "",
      roleList: "",
      personnerlTable: [],
      filteredpersonnerlTable: [],
      currentindex: 1,
      currentPage: 1, // å½“前页码
@@ -102,108 +225,224 @@
      personData: [], // ç”¨æ¥å­˜æ”¾æŽ¥å£ä¼ è¿‡æ¥çš„人员列表数据
      dialogFormVisible: false,
      form: {
        account: '',
        age: '',
        email: '',
        name: '',
        phone: '',
        role_id: ''
        account: "",
        age: "",
        email: "",
        name: "",
        phone: "",
        organizationId: "",
        roleId: "",
      },
      formLabelWidth: '100px',
      myProp: {
        value: "id",
        label: "department",
        checkStrictly: true, //允许选择任意一节
      },
      formLabelWidth: "100px",
      rules: {
        account: [
          {
            required: true, message: '请输入账号', trigger: 'blur'
          }
            required: true,
            message: "请输入账号",
            trigger: "blur",
          },
        ],
        name: [{
          required: true, message: '请输入名字', trigger: 'blur'
        }],
        name: [
          {
            required: true,
            message: "请输入名字",
            trigger: "blur",
          },
        ],
        phone: [
          // { required: true, message: '请输入11位电话号码', trigger: 'blur' },
          { pattern: /^1[34578]\d{9}$/, message: '非法手机号码', trigger: 'blur' }
          {
            pattern: /^1[3456789]\d{9}$/,
            message: "非法手机号码",
            trigger: ["blur", "change"],
          },
        ],
        email: [
          // { required: true, message: '请输入邮箱地址', trigger: 'blur' },
          { type: 'email', message: '非法邮箱地址', trigger: ['blur', 'change'] }
          {
            type: "email",
            message: "非法邮箱地址",
            trigger: ["blur", "change"],
          },
        ],
        role_id: [
          { required: true, message: '请输入权限(0或1)', trigger: 'blur' }
        ]
      }
    }
        organizationId: [
          {
            required: true,
            type: "array",
            message: "请选择部门",
            trigger: "change",
          },
        ],
        roleId: [
          { required: true, message: "请输入权限(0或1)", trigger: "blur" },
        ],
      },
      options: [],
      status: "",
      isUpdate: false,
    };
  },
  mounted() {
    this.getData()
    this.getData();
    this.getTreeData();
  },
  methods: {
    // æ¯é¡µæ¡æ•°æ”¹å˜æ—¶è§¦å‘ é€‰æ‹©ä¸€é¡µæ˜¾ç¤ºå¤šå°‘行
    handleSizeChange(val) {
      console.log(`每页 ${val} æ¡`)
      this.currentPage = 1
      this.pageSize = val
      console.log(`每页 ${val} æ¡`);
      this.currentPage = 1;
      this.pageSize = val;
    },
    filterTag() {
      console.log(11);
    filterTag(value) {
      this.status = "";
      this.status = value;
      return true;
    },
    // å½“前页改变时触发 è·³è½¬å…¶ä»–页
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
      this.currentPage = val
      console.log(`当前页: ${val}`);
      this.currentPage = val;
    },
    async getData() {
      let data = {
        pageNo: 0,
        pageSize: 20,
        name: this.keyword
      }
        pageSize: 10,
        name: this.keyword,
        status: this.status,
      };
      let res = await get(urlInfo.url.list_new_personnel, data);
      this.personnerlTable=res.data.row
      this.total=res.data.total
      this.personnerlTable = res.data.row;
      this.total = res.data.total;
    },
    searchData() {
      this.filteredpersonnerlTable = this.personnerlTable.filter((item) => {
        return item.username === this.keyword
      }
      )
      this.personnerlTable = this.filteredpersonnerlTable
        return item.username === this.keyword;
      });
      this.personnerlTable = this.filteredpersonnerlTable;
    },
    resetData() {
      // console.log("111111")
      this.personnerlTable = this.personData
      this.keyword = ''
      this.personnerlTable = this.personData;
      this.keyword = "";
      this.status = "";
      this.getData();
    },
    // æäº¤æ–°å¢žäººå‘˜è¡¨å•
    submitForm() {
      // Handle form submission here
      // console.log(this.form);
      // POST请求
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.dialogFormVisible = false
          axios.post('/user/add_new_personnel', this.form)
            .then(response => {
              console.log(response)
              // this.dialogVisible = false;
            })
            .catch(error => {
              console.error(error)
            })
          let departmentId = this.form.organizationId;
          this.form.organizationId = departmentId[departmentId.length - 1];
          if (!this.isUpdate) {
            post("/user/add_new_personnel", this.form).then((response) => {
              this.$message({
                message: response.message,
                type: "success",
              });
              this.dialogFormVisible = false;
              this.getData();
            });
          } else {
            put("/user/update_new_personnel", this.form).then((res) => {
              this.$message({
                message: res.message,
                type: "success",
              });
              this.dialogFormVisible = false;
              this.getData();
            });
          }
        } else {
          console.log('error submit!!')
          return false
          console.log("error submit!!");
          return false;
        }
      })
      });
    },
  }
    // æ¸…空Cascader空白
    clearCascaderBlank(list) {
      list.forEach((i) => {
        if (i.children.length === 0) {
          i.children = undefined;
        } else {
          this.clearCascaderBlank(i.children);
        }
      });
    },
    fnFilterChangeInit() {
      this.personData = [];
      this.getData();
    },
    /*
     * @param  list æ•°æ®åˆ—表
     * @param  id åŽç«¯è¿”回的id
     **/
    getParentsById(list, id) {
      for (let i in list) {
        if (list[i].id == id) {
          return [list[i].id];
        }
        if (list[i].children) {
          let node = this.getParentsById(list[i].children, id);
          if (node !== undefined) {
            //查询到把父节把父节点加到数组前面
            node.unshift(list[i].id);
            return node;
          }
        }
      }
    },
}
    handleClick(row) {
      this.isUpdate = true;
      this.dialogFormVisible = true;
      this.form.name = row.username;
      this.form.roleName = row.roleName;
      this.form.phone = row.phone;
      this.form.id = row.id;
      this.form.email = row.email;
      this.form.organizationId = this.getParentsById(
        this.options,
        row.departmentId
      );
      this.form.roleId = row.roleName;
      this.form.age = row.age;
      this.form.account = row.account;
    },
    getTreeData() {
      getOrganizationalApi().then((res) => {
        this.options = res.data[0].children;
        this.clearCascaderBlank(this.options);
      });
    },
    getRoleList() {
      get("/user/list").then((res) => {
        console.log(`output->res`, res);
        this.roleList = res.data;
      });
    },
  },
  watch: {
    dialogFormVisible: {
      handler(newVal, oldVal) {
        if (newVal == false) {
          this.isUpdate = false;
          this.form = {};
          this.$refs.form.resetFields();
        } else {
          this.getRoleList();
        }
      },
    },
  },
};
</script>
<style lang="scss" scoped>
.personnel-main {
  // width: 100%;
  // height: 100%;
  .page-header-search {
@@ -229,7 +468,7 @@
    background: #fff;
    padding: 20px 20px 10px 20px;
    >div:nth-child(2) {
    > div:nth-child(2) {
      display: flex;
      justify-content: end;
      margin: 10px 0;
src/views/standardLibrary/index.vue
@@ -25,6 +25,16 @@
        <div class="table-header">
          <div class="serve-btn">
            <span class="tipMsg">{{ msg !== "" ? msg : "" }}</span>
            <el-select v-model="versionValue" @change="changeSelect" placeholder="请选择版本号">
              <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value"
                >
              </el-option>
            </el-select>
            <el-button type="primary" @click="addVersionFun">新增版本号</el-button>
            <el-button
              type="primary"
              icon="el-icon-plus"
@@ -44,13 +54,14 @@
          <el-table
            :data="tableData"
            style="width: 100%; margin-bottom: 20px"
            row-key="name"
            row-key="id"
            border
            height="calc(100vh - 250px)"
            default-expand-all
            ref="multipleTable"
            @select="selectTr"
            @select-all="selectAll"
            @selection-change="handleSelectionChange"
            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
          >
            <el-table-column type="selection" label="序号"> </el-table-column>
@@ -160,12 +171,16 @@
  addSpecifications,
  deleteListApi,
  blurUpdateApi,
  getVersion,
  addVersion
} from "@/api/standardLibrary";
import { selectproductModelApi } from "@/api/basicData/index";
export default {
  data() {
    return {
      options:[],
      versionValue: '',
      deleteList: [],
      msg: "",
      isAllSelect: false,
@@ -198,7 +213,48 @@
  created() {
    this.getStandardTree();
  },
  mounted(){
  },
  methods: {
    async initSelect(){
        this.options = [];
        this.versionValue = "";
        const response = await getVersion({"specificationsId":this.selectData.id});
        if(response.code===200 && response.data.length>0){
          this.getTableByClick(this.selectData,response.data[0])
          for(let i=0;i<response.data.length;i++){
            this.options.push({
              value: response.data[i],
              label: "V" + response.data[i]
            })
            this.versionValue = response.data[0];
          }
        }
    },
    changeSelect(){
      this.tableData = [];
      this.getTableByClick(this.selectData,this.versionValue);
    },
    async insertVersion(){
      const resp = await addVersion({"specificationsId":this.selectData.id});
      if(resp.code===200){
        this.initSelect();
        this.$message({
            type: 'success',
            message: resp.message
          });
      }
    },
     addVersionFun() {
        this.$confirm('确认添加新的版本号吗?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.insertVersion();
        }).catch(() => {});
    },
    filterNode(value, data) {
      if (!value) return true;
      return data.name.indexOf(value) !== -1;
@@ -252,7 +308,8 @@
        this.getParentData(node.parent, node.data.name);
        // å­˜ä¸‹é€‰ä¸­èŠ‚ç‚¹
        this.selectData = data;
        this.getTableByClick(data);
        this.getTableByClick(data,this.versionValue);
        this.initSelect();
      }
      if (!("children" in data)) {
        return;
@@ -267,9 +324,10 @@
        this.getParentData(node.parent, this.msg);
      }
    },
    async getTableByClick(data) {
    async getTableByClick(data,versionVal) {
      await getProductList({
        specificationsId: data.id,
        version: versionVal
      }).then((res) => {
        res.data.forEach((i) => {
          if (i.name === undefined) {
@@ -345,13 +403,12 @@
        this.$message.error("添加失败");
      }
      console.log(res);
      this.$message.success("添加成功");
      this.addTreeForm = {
        addTypeArr: [],
      };
      this.getStandardTree();
      this.getTableByClick(this.selectData);
      this.getTableByClick(this.selectData,this.versionValue);
    },
    changeCascader(data) {
      this.addTreeForm.addTypeArr = data;
@@ -400,20 +457,6 @@
      this.isAllSelect = !this.isAllSelect;
      let data = this.tableData;
      this.toggleSelect(data, this.isAllSelect, "all");
      // è‡ªå®šä¹‰
      if (this.isAllSelect) {
        val.forEach((i) => {
          if (i.id !== undefined) {
            this.deleteList.push(i.id);
          } else {
            i.children.forEach((c) => {
              this.deleteList.push(c.id);
            });
          }
        });
      } else {
        this.deleteList.splice(0, this.deleteList.length);
      }
    },
    //选择某行
    selectTr(selection, row) {
@@ -422,33 +465,6 @@
        this.isAllSelect = row.isChecked;
        this.toggleSelect(row, row.isChecked, "tr");
      });
      if (row.isChecked === true) {
        if (row.children !== undefined) {
          row.children.forEach((i) => {
            this.deleteList.push(i.id);
          });
        } else {
          this.deleteList.push(row.id);
        }
      } else if (row.isChecked === false) {
        if (row.children !== undefined) {
          row.children.forEach((i) => {
            this.deleteList.findIndex((c, index) => {
              if (c === i.id) {
                this.deleteList.splice(index, 1);
                return;
              }
            });
          });
        }
        this.deleteList.findIndex((c, index) => {
          if (c === row.id) {
            this.deleteList.splice(index, 1);
            return;
          }
        });
      }
    },
    //递归子级
    toggleSelect(data, flag, type) {
@@ -482,6 +498,15 @@
        }
      });
    },
    handleSelectionChange(val) {
      this.deleteList = []
      val.forEach((v) => {
        if(v.id !== undefined){
          this.deleteList.push(v.id)
        }
      })
      console.log(`output->this.deleteList`,this.deleteList)
    },
    // è¡¨æ ¼æ ‘全部选中配置  ç»“束
    deleteListClick() {
      deleteListApi(this.deleteList).then((res) => {
@@ -489,7 +514,7 @@
          message: res.message,
          type: "success",
        });
        this.getTableByClick(this.selectData);
        this.getTableByClick(this.selectData,this.versionValue);
      });
    },
    async requiredOnfocus(scope) {
@@ -504,7 +529,7 @@
          message: res.message,
          type: "success",
        });
        this.getTableByClick(this.selectData);
        this.getTableByClick(this.selectData,this.versionValue);
      });
    },
  },
@@ -640,6 +665,9 @@
  width: 100%;
  padding-bottom: 6px;
  text-align: right;
  .el-select{
    margin-right:10px;
  }
}
.tipMsg {
  float: left;
src/views/template_testReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,651 @@
<template>
  <div class="content-wrapper">
    <div class="content-main">
      <div class="cover">
        <div class="cover-top">
          <div>
            <div style="height: 30px; line-height: 30px;">报告编号:</div>
            <div style="height: 30px; line-height: 30px;">Reference No:</div>
          </div>
        </div>
        <div class="title">
          <h1 style="text-align-last:justify ;">检验报告</h1>
          <h1>Test   Report</h1>
        </div>
        <div class="cover-body">
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>试样名称</div>
            <span style="font-size: 14px;">Name of Product</span>
            </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div style="text-align-last: justify;">型号</div>
            <span style="font-size: 14px;">Type and Size</span>
            </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>委托单位</div>
            <span style="font-size: 14px;display: block;margin: 10px 50px 0px;">Client</span>
          </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>检验类别</div>
            <span style="font-size: 14px;">Kind of Test</span></div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
        </div>
        <div class="cover-footer">
          <span>江苏中天科技股份有限公司检测中心</span><br>
          <span style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</span>
        </div>
      </div>
      <div class="pageOne">
        <div class="statement">
          <div><h2>声明</h2></div>
          <div style="text-align-last: center;"><h2 style="font-size: 14px;">Statement</h2></div>
        </div>
        <div class="statement-body">
          <div>
            <span>1.    æœ¬æ£€éªŒæŠ¥å‘Šï¼ˆåŒ…括复印件)未加检测专用章一律无效。</span><br>
            <span>This test report (including any duplicates) shall become effective only with pecial chapter for testing on.</span>
          </div>
          <div>
            <span>2.    æœ¬æ£€éªŒæŠ¥å‘Šæ— ç¼–写、审核、批准人签章无效。</span><br>
            <span>This test report shall become effective only with the signatures of compiler checker and approver.</span>
          </div>
          <div>
            <span>3.    æœ¬æ£€éªŒæŠ¥å‘Šæ¶‚改无效。</span><br>
            <span>This test report will be invalid if altered.</span>
          </div>
          <div>
            <span>4.    æœ¬æ£€éªŒæŠ¥å‘Šä¸å¾—部分复印。</span><br>
            <span>This test report mustn’t copy partly.</span>
          </div>
          <div>
            <span>5.    é€æ ·å§”托检验,仅对来样负责。</span><br>
            <span>For the sample submitted by clients, the test result is valid only for these samples.</span>
          </div>
          <div>
            <span>6.    æ ·å“åŠå§”托单位为委托方自命名。</span><br>
            <span>Samples and consignor name for the principal.</span>
          </div>
          <div>
            <span>7.    æœ¬æ£€éªŒæŠ¥å‘Šä¸­è‹±æ–‡æè¿°æœ‰å†²çªæ—¶ï¼Œä»¥ä¸­æ–‡è§£é‡Šä¸ºå‡†ã€‚</span><br>
            <span>If the Chinese and English version of the test report have any conflict, the Chinese version should be the standard for arbitrament.</span>
          </div>
          <div>
            <span>8.    å§”托方对本检验报告若有异议,应于样品保存期内向本中心提出,联系电话:0513-84885657</span><br>
            <span>Clients who have any different ideas about this test report, may contract with Test Central within the sample reservation time. Tel: 0513-84885657</span>
          </div>
          <div>
            <span>9.    æœ¬ä¸­å¿ƒæ ·å“è‡ªæŠ¥å‘Šå‘送日起,一般保存一个月,以备复验。</span><br>
            <span>The sample shall be reserved for one month beginning from the data when this test report is submitted for examine or review.</span>
          </div>
        </div>
        <div class="statement-footer">
          <div class="depart">
            <span>江苏中天科技股份有限公司检测中心</span><br>
            <span>Test Center of Jiangsu Zhongtian Technology Co., LTD</span>
          </div>
          <div class="address">
            <span>地    å€ï¼šæ±Ÿè‹çœå—通市经济技术开发区新开南路19号</span><br>
            <span>Address: No.19 Xinkai South Road, Nantong Economic and Technological Development Zone, Jiangsu Province</span>
          </div>
          <div class="zipcode">邮政编码Zip Code:226010</div>
          <div class="tel">电    è¯Tel:0513-89059043</div>
          <div class="email">邮    ç®±E-mail::ztttc@chinaztt.com </div>
        </div>
      </div>
      <div class="pageTwo">
        <div class="header" style="line-height: 10px;">
          <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
            <h2 style="font-size: 18px;">江苏中天科技股份有限公司检测中心</h2>
          </div>
          <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2>
          </div>
          <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 18px;">检测报告</h2>
          </div>
          <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">Test Report</h2>
          </div>
        </div>
        <div class="table">
          <div class="table-header">
            <div>
              <span>报告编号:</span><br>
              <span>Reference No:</span>
            </div>
            <div>
              <span>第1页共2页</span><br>
              <span>Page 1 of 2</span>
            </div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <tr>
                <td><span>试样名称</span><br>
                <span>Name of product</span></td>
                <td colspan="2"></td>
                <td>
                  <span>规格型号</span><br>
                  <span>Type and size</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>样品数量</span><br>
                  <span>Test item</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验项目</span><br>
                  <span>Test item</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>来样方式</span><br>
                  <span>Delivering method</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验类型</span><br>
                  <span>Type of test</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>样品状态</span><br>
                  <span>Sample discription</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>生产单位</span><br>
                  <span>Producer</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>收样时间</span><br>
                  <span>Received date</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验日期</span><br>
                  <span>Test date</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>委托人</span><br>
                  <span>Consignor</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>电话</span><br>
                  <span>Tel</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>委托单位</span><br>
                  <span>Client</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>委托单位地址</span><br>
                  <span>Address</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>检验环境</span><br>
                  <span>Test environment</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>检验依据</span><br>
                  <span>Test standard</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td style="height: 180px;">
                  <span>结论</span><br>
                  <span>Conclusion </span>
                </td>
                <td colspan="5">
                  <div style="height: 120px;"></div>
                  <div style="height: 60px;margin-left: 250px;">
                    <span>(检测报告专用章)</span><br>
                     <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
                      <span>签发日期:  å¹´   æœˆ   æ—¥</span><br>
                      <span>Date of issue: August 23, 2023</span>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <span>备注</span><br>
                  <span>Remark </span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>编制</span><br>
                  <span>Preparer</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验</span><br>
                  <span>Tester</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>审核</span><br>
                  <span>Checker </span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>批准</span><br>
                  <span>Approver</span>
                </td>
                <td colspan="2"></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      <div class="pageThree">
        <div class="header" style="line-height: 10px;">
          <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
            <h2 style="font-size: 18px;">江苏中天科技股份有限公司检测中心</h2>
          </div>
          <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2>
          </div>
          <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 18px;">检测报告</h2>
          </div>
          <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">Test Report</h2>
          </div>
        </div>
        <div class="table">
          <div class="table-header">
            <div>
              <span>报告编号:</span><br>
              <span>Reference No:</span>
            </div>
            <div>
              <span>第2页共2页</span><br>
              <span>Page 2 of 2</span>
            </div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <tr>
                <td colspan="4">
                  <span>样品编号</span><br>
                  <span>Sample No</span></td>
                <td colspan="3"></td>
                <td colspan="4">
                  <span>规格型号</span><br>
                  <span>Type</span>
                </td>
                <td colspan="3"></td>
              </tr>
              <tr>
                <td>
                  <span>序号</span><br>
                  <span>No</span>
                </td>
                <td colspan="3">
                  <span>检验项目</span><br>
                  <span>Test item</span>
                </td>
                <td>
                  <span>单位</span><br>
                  <span>Unit</span>
                </td>
                <td colspan="3">
                  <span>标准要求</span><br>
                  <span>Requirement</span>
                </td>
                <td colspan="3">
                  <span>检验结果</span><br>
                  <span>Test result</span>
                </td>
                <td>
                  <span>结论</span><br>
                  <span>Conclusion</span>
                </td>
                </tr>
                <tr>
                  <td>
                    <span></span><br>
                    <span></span>
                  </td>
                  <td colspan="3">
                    <span>样品标识</span><br>
                    <span>Sample labeling</span>
                  </td>
                  <td>
                    <span></span><br>
                    <span>I</span>
                  </td>
                  <td colspan="3">
                    <span></span><br>
                    <span></span>
                  </td>
                  <td colspan="3">
                    <span></span><br>
                    <span></span>
                  </td>
                  <td>
                    <span></span><br>
                    <span></span>
                  </td>
                </tr>
                <tr v-for="item in resultTable" :key="index">
                  <td>
                    <span>{{ item.id }}</span><br>
                  </td>
                  <td colspan="3">
                    <span>{{ item.testitem }}</span><br>
                    <span>{{ item.testitem_engName }}</span>
                  </td>
                  <td>
                    <span>{{ item.unit }}</span>
                  </td>
                  <td colspan="3">
                    <span>{{ item.requirement }}</span><br>
                    <span>{{ item.requirement_eng }}</span>
                  </td>
                  <td colspan="3">
                    <span>{{ item.testresult }}</span><br>
                    <span>{{ item.testresult_engName }}</span>
                  </td>
                  <td>
                    <span>{{ item.conclusion }}</span>
                  </td>
                </tr>
            </table>
          </div>
        </div>
      </div>
      <div class="pageFour">
        <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
          <div>
            <span>报告编号:</span><br>
            <span>Reference No:</span>
          </div>
          <div>
            <span>附页</span><br>
            <span>Appenfix</span>
          </div>
        </div>
        <hr>
        <div class="table">
          <div class="table-header">
            <div style="width: 200px; margin: 0 auto;text-align-last: justify;"><h2>检验设备一览表</h2></div>
            <div style="text-align-last: center;"><h2 style="font-size: 14px;">Equipment List</h2></div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <thead>
                  <tr>
                    <td>
                      <span>序号</span><br>
                      <span>No</span>
                    </td>
                    <td colspan="2">
                      <span>设备名称</span><br>
                      <span>Equipment name</span>
                    </td>
                    <td>
                      <span>设备型号</span><br>
                      <span>type</span>
                    </td>
                    <td colspan="2">
                      <span>编号</span><br>
                      <span>Factory number</span>
                    </td>
                    <td colspan="2">
                      <span>校准有效期</span><br>
                      <span>Date of validity</span>
                    </td>
                  </tr>
              </thead>
              <tr v-for="item in table" :key="index">
                <td>
                  <span>{{ item.id }}</span>
                </td>
                <td colspan="2">
                  <span>{{ item.equipment_name }}</span>
                </td>
                <td>
                  <span>{{ item.type }}</span><br>
                </td>
                <td colspan="2">
                  <span>{{ item.factory_number }}</span>
                </td>
                <td colspan="2">
                  <span>{{ item.validity }}</span>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props:{
  },
  data(){
    return {
      resultTable:[
        {
          id: '1',
          testitem: '原始拉伸',
          testitem_engName: 'Primitive strength',
          unit: 'MPa',
          requirement: '最小10.0',
          requirement_eng: 'Minimun 10.0',
          testresult: '',
          testitem_engName: ''
        }
      ],
      table:[{
        id: 1,
        equipment_name: '拖拉机',
        type: 1,
        factory_number: 'Akjgfewof',
        validity:'2023.8.25~2023.8.27'
      }]
    }
  }
}
</script>
<style lang="scss" scoped>
.content-wrapper{
  background-color: #f0f2f5;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  .content-main{
    margin: -50px auto;
    width: 50%;
    // background-color: #fff;
    // background-color: #bfa;
    .cover{
      margin: 80px 0px;
      padding:0px 50px;
      height: 1200px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      .cover-top{
        display: flex;
        justify-content: end;
        font-size: 20px;
        margin-right: 50px;
        padding-top: 50px;
        // font-weight: bold;
      }
      .title{
        margin-top: 100px;
        padding: 0px 220px;
        text-align: center;
        font-size: 25px;
      }
      .cover-body{
        font-size: 25px;
        margin: 100px 80px;
        .name{
          // background-color: #bfa;
          display: flex;
          justify-content: space-between;
          margin-bottom: 20px;
          .line{
            width: 500px;
            border-bottom: solid 1px black;
            text-align: center;
            // height: 60px;
            line-height: 60px;
          }
        }
      }
      .cover-footer{
        text-align: center;
        margin-top: 200px;
        span{
          font-size: 23px;
          height: 40px;
          line-height: 40px;
        }
      }
    }
    .pageOne{
      margin-top: -50px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 100px;
      height: 1200px;
      .statement{
        margin: 0 auto;
        width: 100px;
        text-align-last: justify;
      }
      .statement-body{
        line-height: 32px;
        text-align: justify;
        margin: 30px 0px;
        font-size: 12px;
      }
      .statement-footer{
        line-height: 30px;
        font-size: 12px;
      }
    }
    .pageTwo{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 20px;
        .table-header{
          display: flex;
          justify-content: space-between;
          font-size: 14px;
          line-height: 20px;
        }
        .table-body{
          font-size: 12px;
          table td{
            width: 150px;
            height: 52px;
          }
        }
      }
    }
    .pageThree{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 20px;
        .table-header{
          display: flex;
          justify-content: space-between;
          font-size: 14px;
          line-height: 20px;
        }
        .table-body{
          font-size: 12px;
          table td{
            width: 8%;
            height: 52px;
          }
        }
      }
    }
    .pageFour{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 50px;
        .table-header{
          line-height: 20px;
        }
        .table-body{
          margin-top: 20px;
          font-size: 12px;
          table td{
            width: 80px;
            height: 52px;
          }
        }
      }
    }
  }
}
</style>