XiaoRuby
2023-08-22 4c4c6475fde41dbee74c6a071a187a47a1c4a243
Merge remote-tracking branch 'origin/master'

# Conflicts:
# src/layout/components/AppMain.vue
已修改13个文件
已添加4个文件
1121 ■■■■ 文件已修改
src/App.vue 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/passRateStatistics.js 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/laboratory/measure.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/url.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/util/requestUtil.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Breadcrumb/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/AppMain.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/Logo.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/index.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/dateUtil.js 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/passRateStatistics/index.vue 240 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/planAssignments/plan.vue 255 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/measure/Add.vue 170 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/measure/index.vue 183 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -9,3 +9,62 @@
  name: 'App'
}
</script>
<style>
    #app{
        overflow: hidden !important;
    }
    .breadcrumb-container{
        height: 40px;
    }
    .app-main{
        margin-top: 41px !important;
    }
    .el-menu-item{
        width: 100%;
    }
    /* å…¨å±€æ¨¡æ€æ¡†æ ·å¼ */
    .el-dialog{
        border-radius: 10px;
        overflow: hidden;
    }
    .el-dialog__header,.el-message-box__header {
      box-sizing: border-box;
      height: 46px;
      border-bottom: 1px solid rgb(238, 238, 238);
      padding: 0px;
        padding-left: 18px;
      display: flex;
      align-items: center;
        background-color: #069cff;
    }
    .el-dialog__header *{
      font-size: 16px !important;
        color: #fff;
    }
    .el-dialog__headerbtn .el-dialog__close{
        color: #fff;
        top: -20px;
    }
    .el-dialog__headerbtn{
        top: initial;
    }
    .el-dialog__footer .el-button * {
      font-size: 14px !important;
    }
    .el-dialog__footer .el-button {
      height: 36px;
      border: 1px solid rgba(190, 190, 190, 0.44);
      box-shadow: 0px 2px 4px rgba(220, 220, 220, 0.41);
      padding: 0 14px;
    }
</style>
src/api/experiment/passRateStatistics.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
import request from '@/utils/request'
export function getSupplierList(params) {
    return request({
      url: '/qualificationRate/getSupplierList',
      method: 'get',
      params
    })
  }
  /**
   * æ ·å“åˆæ ¼çއ
   * @param {} params
   * @returns
   */
  export function getTestSampleStatistics(params) {
    return request({
      url: '/qualificationRate/getTestSampleStatistics',
      method: 'get',
      params
    })
  }
  /**
   * ä¾›åº”商合格率
   * @param {} params
   * @returns
   */
  export function getSupplierNoPassStatistics(params) {
    return request({
      url: '/qualificationRate/getSupplierNoPassStatistics',
      method: 'get',
      params
    })
  }
  /**
   * é¡¹ç›®åˆæ ¼çއ
   * @param {} params
   * @returns
   */
  export function getNoPassProjectStatistics(params) {
    return request({
      url: '/qualificationRate/getNoPassProjectStatistics',
      method: 'get',
      params
    })
  }
src/api/laboratory/measure.js
@@ -33,4 +33,30 @@
    method: 'get',
    params
  })
}
//获取user列表和仪器列表
export function getListUserAndListIns(params) {
  return request({
    url: '/metering-plan/getListUserAndListIns',
    method: 'get',
    params
  })
}
//添加计划以及计量信息
export function addPlanAndMeasure(data) {
  return request({
    url: '/metering-plan/addPlanAndMeasure',
    method: 'post',
    data
  })
}
//修改计量
export function updateMetricalInformationInfo(data) {
  return request({
    url: '/metrical-information/updateMetricalInformationInfo',
    method: 'post',
    data
  })
}
src/api/url.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
const url = {
}
export default function(Vue) {
    //添加全局API
    Vue.prototype.$url = url
}
src/api/util/requestUtil.js
@@ -15,4 +15,13 @@
        data
    })
}
export function postFile(path, data) {
    return request({
        url: path,
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
          },
        data
    })
}
src/components/Breadcrumb/index.vue
@@ -12,6 +12,7 @@
  </el-col>
  <el-col :span="12" style="background-color: #fff;display: flex;justify-content: end; align-items: center;">
    <el-button v-if="backPlan" type="primary" icon="el-icon-refresh-left" size="mini" plain @click="backPlanUp">返回</el-button>
    <el-button v-if="add" size="mini" @click="breadd" style="width: 60px;" type="primary">保存</el-button>
  <el-col :span="1"></el-col>
  </el-col>
</div>
@@ -24,7 +25,8 @@
  data() {
    return {
      levelList: null,
      backPlan: false
      backPlan: false,
      add: false
    }
  },
  watch: {
@@ -40,6 +42,13 @@
        this.$parent.combackPlan()
        this.backPlan=false
    },
    breadd(){
        this.add=false
        this.$parent.indexAdd()
    },
    showadd(){
      this.add=true
    },
    triggerBtnPlan(){
      this.backPlan?this.backPlan=false:this.backPlan=true
    },
src/layout/components/AppMain.vue
@@ -1,52 +1,52 @@
<template>
  <section class="app-main">
    <transition name="fade-transform" mode="out-in">
      <router-view
        ref="child"
        @triggerMainBtnPlan="triggerMainBtnPlan"
        :key="key"
      />
      <router-view ref="child" @triggerMainBtnPlan="triggerMainBtnPlan" :key="key" />
    </transition>
  </section>
</template>
<script>
export default {
  name: "AppMain",
  name: 'AppMain',
  computed: {
    key() {
      return this.$route.path;
    },
      return this.$route.path
    }
  },
  methods: {
    childMethod() {
      this.$refs.child.combackLookPlan();
    childMethod(){
      this.$refs.child.combackLookPlan()
    },
    triggerMainBtnPlan() {
      this.$parent.triggerCombackBtn();
    triggerMainBtnPlan(){
      this.$parent.triggerCombackBtn()
    },
  },
};
    mainAdd(){
      this.$refs.child.measureAdd()
    },
    mainShowAdd(){
      this.$parent.showIndexAdd()
    }
  }
}
</script>
<style lang="scss" scoped>
.app-main {
  /* 88 = navbar+baredcrumb  */
  min-height: calc(100vh - 88px);
  height: calc(100vh - 88px);
  width: 100%;
  position: relative;
  overflow: hidden;
  > div {
    min-height: calc(100vh - 88px);
  >div{
    height: 100%;
    width: 100%;
  }
  ::v-deep .content-main {
    //这是所有页面的内边距
  ::v-deep .content-main{//这是所有页面的内边距
    padding: 24px !important;
  }
}
.fixed-header + .app-main {
.fixed-header+.app-main {
  padding-top: 50px;
}
</style>
@@ -58,7 +58,7 @@
    padding-right: 15px;
  }
}
.el-menu--popup {
.el-menu--popup{
  width: 120px;
}
</style>
src/layout/components/Sidebar/Logo.vue
@@ -46,7 +46,7 @@
  width: 100%;
  height: 50px;
  line-height: 50px;
  background: #fff;
  background: #f8f8f8;
  text-align: center;
  overflow: hidden;
src/layout/index.vue
@@ -58,6 +58,12 @@
    combackPlan(){
        this.$refs.main.childMethod()
    },
    indexAdd(){
      this.$refs.main.mainAdd()
    },
    showIndexAdd(){
      this.$refs.breadcrumb.showadd()
    },
    triggerCombackBtn(){
      this.$refs.breadcrumb.triggerBtnPlan()
    }
src/main.js
@@ -17,6 +17,8 @@
import '@/icons' // icon
import '@/permission' // permission control
import url from './api/url.js'
/**
 * If you don't want to use mock-server
 * you want to use MockJs for mock api
@@ -30,11 +32,17 @@
  mockXHR()
}
Vue.prototype.HaveJson = (val) => {
    return JSON.parse(JSON.stringify(val))
}
// set ElementUI lang to EN
Vue.use(ElementUI, { locale })
// å¦‚果想要中文版 element-ui,按如下方式声明
// Vue.use(ElementUI)
Vue.use(url);
Vue.config.productionTip = false
new Vue({
src/router/index.js
@@ -199,7 +199,7 @@
      {
        path: 'planAssignments',
        name: 'PlanAssignments',
        component: () => import('@/views/experiment/planAssignments/index'),
        component: () => import('@/views/experiment/planAssignments/plan'),
        meta: { title: '检验计划', icon: 'tree' }
      },
      {
src/utils/dateUtil.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
export function dateFormat(longTypeDate) {
    var dateTypeDate = "";
    var date = new Date();
    date.setTime(longTypeDate);
    dateTypeDate += date.getFullYear();   //å¹´
    dateTypeDate += "-" + getMonth(date); //月
    dateTypeDate += "-" + getDay(date);   //日
    return dateTypeDate;
}
//返回 01-12 çš„æœˆä»½å€¼
function getMonth(date) {
    var month = "";
    month = date.getMonth() + 1; //getMonth()得到的月份是0-11
    if (month < 10) {
        month = "0" + month;
    }
    return month;
}
//返回01-30的日期
function getDay(date) {
    var day = "";
    day = date.getDate();
    if (day < 10) {
        day = "0" + day;
    }
    return day;
}
function datetimeFormat(longTypeDate) {
    var dateTypeDate = "";
    var date = new Date();
    date.setTime(longTypeDate);
    dateTypeDate += date.getFullYear();   //å¹´
    dateTypeDate += "-" + this.getMonth(date); //月
    dateTypeDate += "-" + this.getDay(date);   //日
    return dateTypeDate;
}
function format(d) {
    var y = d.getFullYear();
    var m = d.getMonth() + 1;
    if (m < 10) {
        m = "0" + m;
    }
    var day = d.getDate();
    if (day < 10) {
        day = "0" + day;
    }
    return y + "-" + m + "-" + day;
}
src/views/experiment/passRateStatistics/index.vue
@@ -2,52 +2,48 @@
  <div class="content-main">
    <div class="top-bar">
      <el-form ref="form" :inline="true" :rules="rules" :model="searchData" label-position="top">
              <el-form-item label="检测日期:" class="sermargin" prop="date">
                <el-date-picker
                  v-model="searchData.date"
                  type="daterange"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="检验类型:" class="sermargin" prop="type">
                <el-select v-model="searchData.type" placeholder="全部">
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="物料分组:">
                <el-button type="primary" icon="el-icon-plus" class="chooseMaterialBtn" >选择物料分组</el-button>
              </el-form-item>
              <div class="rightBtn">
                <el-form-item>
                  <el-button type="primary" plain size="mini">清空</el-button>
                  <el-button type="primary" @click="search" size="mini">查询</el-button>
                </el-form-item>
              </div>
              </el-form>
        <el-form-item label="检测日期:" class="sermargin" prop="date">
          <el-date-picker v-model="searchData.date" type="daterange" range-separator="至" start-placeholder="开始日期"
            end-placeholder="结束日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="检验类型:" class="sermargin" prop="type">
          <el-select v-model="searchData.type" placeholder="全部">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="供应商:">
          <el-select v-model="searchData.supplier" placeholder="全部">
            <el-option v-for="item in supplier" :key="item.value" :label="item.label" :value="item.value">
            </el-option>
          </el-select>
        </el-form-item>
        <div class="rightBtn">
          <el-form-item>
            <el-button type="primary" plain size="mini">清空</el-button>
            <el-button type="primary" @click="search" size="mini">查询</el-button>
          </el-form-item>
        </div>
      </el-form>
    </div>
    <div class="top-bar-copy"></div>
    <div class="chart-content">
      <div class="qualified-wrapper">
        <div style="margin-left: 20px;padding:20px 0px;font-size:18px">检测批次合格率统计</div>
        <div style="margin-left: 20px;padding:20px 0px;font-size:18px">检测样品合格率统计</div>
        <div class="qualified" ref="qualified"></div>
      </div>
      <div class="unqualified">
          <div class="firstBox-wrapper" >
            <div style="margin-left: 20px;padding:20px 0px;font-size:18px">供应商不合格次数统计</div>
            <div class="firstBox" ref="unqualified_provider"></div>
          </div>
        <div class="secondBox-wrapper" >
        <div class="firstBox-wrapper">
          <div style="margin-left: 20px;padding:20px 0px;font-size:18px">供应商不合格次数统计</div>
          <div class="firstBox" ref="unqualified_provider"></div>
        </div>
        <div class="secondBox-wrapper">
          <div class="secondBox_header">
            <div style="font-size:18px">不合格项目统计</div>
            <el-radio-group v-model="type">
              <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value" >{{ item.label }}</el-radio-button>
              <el-radio-button v-for="item in radiooptions" :key="item.value" :label="item.value">{{ item.label
              }}</el-radio-button>
            </el-radio-group>
          </div>
          <div class="secondBox" ref="unqualified_project"></div>
@@ -55,14 +51,14 @@
      </div>
    </div>
    <div class="bottom">
      <el-button type="primary" size="mini" >数据导出</el-button>
      <el-button type="primary" size="mini">数据导出</el-button>
    </div>
  </div>
</template>
<script>
// æ·»åŠ æ»šåŠ¨ç›‘å¬äº‹ä»¶
window.addEventListener('scroll', function() {
window.addEventListener('scroll', function () {
  var topBar = document.querySelector('.top-bar');
  var scrollTop = window.pageYOffset || document.documentElement.scrollTop;
@@ -74,25 +70,32 @@
})
import * as echarts from 'echarts'
import { getSupplierList,getTestSampleStatistics,getSupplierNoPassStatistics,getNoPassProjectStatistics } from '@/api/experiment/passRateStatistics';
import { dateFormat } from '../../../utils/dateUtil'
export default {
  data(){
  data() {
    return {
      searchData:{
      supplier: [],
      searchData: {
        date: [],
        type: 0,
        group: ''
        type: null,
        supplier: null
      },
      options:[
      options: [
        {
          label: '采购入库',
          label: '原材料',
          value: 0
        },
        {
          label: 'xxxx',
          label: '成品',
          value: 1
        },
        {
          label: '委托品',
          value: 2
        }
      ],
      radiooptions:[
      radiooptions: [
        {
          label: '环形饼图',
          value: 0
@@ -104,12 +107,15 @@
      ],
      type: 0,
      rules: {
        date: [{required: true, message: '请输入账号', trigger: 'blur'}],
        type: [{required: true, message: '请输入名字', trigger: 'blur'}]
        // date: [{ required: true, message: '请输入账号', trigger: 'blur' }],
        // type: [{ required: true, message: '请输入名字', trigger: 'blur' }]
      }
    }
  },
  mounted() {
    this.getSupplierList()
    this.getTestSampleStatistics()
    this.getSupplierNoPassStatistics()
    const chartDom_qualified = this.$refs.qualified;
    const chartDom_unqualified_provider = this.$refs.unqualified_provider;
    const chartDom_unqualified_project = this.$refs.unqualified_project;
@@ -118,6 +124,9 @@
    const myChart2 = echarts.init(chartDom_unqualified_provider);
    const myChart3 = echarts.init(chartDom_unqualified_project);
    /**
     * æ£€æµ‹åˆæ ¼çŽ‡ç»Ÿè®¡
     */
    const option_qualified = {
      tooltip: {
        trigger: 'axis',
@@ -164,15 +173,18 @@
        }
      ]
    };
    const option_unqualified1 ={
    /**
     * ä¾›åº”商
     */
    const option_unqualified1 = {
      tooltip: {
        trigger: 'axis',
        axisPointer: { // åæ ‡è½´æŒ‡ç¤ºå™¨ï¼Œåæ ‡è½´è§¦å‘有效
          type: 'shadow' // é»˜è®¤ä¸ºç›´çº¿ï¼Œå¯é€‰ä¸ºï¼š'line' | 'shadow'
        },
        formatter: function(params) {
        formatter: function (params) {
          let tooltip = params[0].name + '<br/>';
          params.forEach(function(item) {
          params.forEach(function (item) {
            tooltip += item.marker + ' ' + item.seriesName + ': ' + item.value.toFixed(2) + '%<br/>'; // å°†æ•°æ®ä¿ç•™ä¸¤ä½å°æ•°å¹¶è½¬ä¸ºç™¾åˆ†æ¯”形式
          });
          return tooltip;
@@ -185,13 +197,13 @@
        data: ['供应商1', '供应商2', '供应商3', '供应商4']
      },
      yAxis: [
          {
            type: 'value',
            axisLabel: {
              formatter: '{value}%'
            }
        {
          type: 'value',
          axisLabel: {
            formatter: '{value}%'
          }
        ],
        }
      ],
      series: [
        {
          name: '合格数量',
@@ -207,6 +219,9 @@
        }
      ]
    };
    /**
     * ä¸åˆæ ¼é¡¹ç›®
     */
    const option_unqualified2 = {
      legend: {
        orient: 'vertical',
@@ -246,25 +261,54 @@
    myChart1.setOption(option_qualified);
    myChart2.setOption(option_unqualified1);
    if(this.type === 0){
    if (this.type === 0) {
      myChart3.setOption(option_unqualified2);
    }
    if(this.type === 1){
    if (this.type === 1) {
      myChart3.setOption(option_unqualified2);
    }
  },
  methods: {
    search() {
      this.getTestSampleStatistics()
    },
    dateHandle(){
      let data=JSON.parse(JSON.stringify(this.searchData))
      if(this.searchData.date.length!=0&&this.searchData.date !=[]){
        data.beginDate=dateFormat(this.searchData.date[0])
        data.endDate=dateFormat(this.searchData.date[1])
      }
      data.date=null
      return data
    },
    async getSupplierList() {
      let res = await getSupplierList()
      res.data.forEach(item => {
        this.supplier.push({ label: item.supplier, value: item.supplier })
      })
    },
    getTestSampleStatistics(){
     let param= this.dateHandle()
     let res =getTestSampleStatistics(param)
    },
    getSupplierNoPassStatistics(){
      let param= this.dateHandle()
      getSupplierNoPassStatistics(param)
    }
  }
}
</script>
<style lang="scss" scoped>
.content-main{
  height:100%;
.content-main {
  height: 100%;
  width: 100%;
  .top-bar{
  .top-bar {
    position: absolute;
    width: 99%;
    top: 0;
    left:0;
    left: 0;
    z-index: 999;
    margin-top: 5px;
    margin-left: 9.5px;
@@ -272,79 +316,95 @@
    display: flex;
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    transition: position 0.3s ease;
    .el-form{
    transition: position 0.3s ease;
    .el-form {
      width: 100%;
      .chooseMaterialBtn{
      .chooseMaterialBtn {
        background-color: #fff;
        border-color: rgba(192,196,204,0.5);
        border-color: rgba(192, 196, 204, 0.5);
        color: gray;
        width: 220px;
      }
    }
    .sermargin{
    .sermargin {
      margin-right: 60px;
    }
    .rightBtn{
      display:flex;
      justify-content:end;
    .rightBtn {
      display: flex;
      justify-content: end;
      margin-right: 20px;
      margin-top: -40px;
      margin-bottom: -10px;
    }
  }
  .top-bar.fixed {
    position: fixed;
    top: 0.45rem;
    left: 0.52rem;
    width:93.8%;
    width: 93.8%;
  }
  .top-bar-copy{
  .top-bar-copy {
    width: 100%;
    height: 12vh;
  }
  .chart-content{
  .chart-content {
    margin: 0px -15px;
    margin-bottom: 60px;
    .qualified-wrapper{
    .qualified-wrapper {
      // margin-top: 14vh;
      background-color: #fff;
      width: 100%;
      height:50vh;
      height: 50vh;
    }
    .qualified{
    .qualified {
      width: 100%;
      height: 400px;
    }
    .unqualified{
    .unqualified {
      margin-top: 10px;
      height: 50vh;
      display:flex;
      display: flex;
      justify-content: space-between;
      .firstBox-wrapper{
      .firstBox-wrapper {
        background-color: #fff;
        width:49%;
        .firstBox{
        width: 49%;
        .firstBox {
          width: 100%;
          height: 40vh;
        }
      }
      .secondBox-wrapper{
        background-color:#fff;
        width:49%;
        .secondBox_header{
          display:flex;
      .secondBox-wrapper {
        background-color: #fff;
        width: 49%;
        .secondBox_header {
          display: flex;
          justify-content: space-between;
          margin: 20px 20px;
        }
        .secondBox{
        .secondBox {
          width: 100%;
          height: 40vh;
        }
      }
    }
  }
  .bottom{
  .bottom {
    position: fixed;
    width: 95%;
    bottom: 0rem !important;
@@ -352,7 +412,7 @@
    margin: 0px -15px;
    padding: 20px 40px;
    z-index: 999;
    display:flex;
    display: flex;
    justify-content: end;
    background-color: #fff;
  }
src/views/experiment/planAssignments/plan.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,255 @@
<style scoped>
    .plan {
        width: 100%;
    }
    .title {
        height: 60px;
        width: calc(100% - 20px);
        background-color: white;
        margin: 5px 10px;
        display: flex;
        align-items: center;
        padding: 0 30px;
    }
    .thing {
        margin: 10px;
        padding: 15px;
        background-color: white;
        height: calc(100vh - 15vh);
    }
</style>
<style>
    .plan .has-gutter tr th {
        background-color: #f5f7fa !important;
        color: #333;
    }
    .plan .cell {
        color: #333;
    }
</style>
<template>
    <div class="plan">
        <div class="title">
            <span>项目名称:</span>
            <el-input v-model="search.name" size="medium" style="width: 200px;margin-right: 20px;"></el-input>
            <span>检验时间:</span>
            <el-date-picker v-model="search.date" type="daterange" range-separator="至" start-placeholder="开始日期"
                end-placeholder="结束日期" size="medium" style="margin-right: 20px;">
            </el-date-picker>
            <span>检验人:</span>
            <el-input v-model="search.userName" size="medium" style="width: 200px;margin-right: 20px;"></el-input>
            <el-button size="small" type="primary">查询</el-button>
            <el-button size="small">重置</el-button>
        </div>
        <div class="thing">
            <el-table :data="tableData" style="width: 100%;" row-key="id" default-expand-all
                :tree-props="{children: 'children', hasChildren: 'hasChildren'}" :key="upIndex">
                <el-table-column type="index" width="50" label="序号">
                </el-table-column>
                <el-table-column prop="date" label="申请单号">
                </el-table-column>
                <el-table-column prop="name" label="检验结果">
                </el-table-column>
                <el-table-column prop="address" label="地址">
                </el-table-column>
                <el-table-column label="操作" width="80">
                    <template slot-scope="scope">
                        <el-button size="mini" type="primary" v-if="isIfReport(scope.row)">上报</el-button>
                        <el-button size="mini" type="warning" @click="openUpDia(scope.row)"
                            v-else-if="scope.row.insId==undefined&&scope.row.address==null">分配</el-button>
                        <el-button size="mini" type="success" @click="openUpInsDia(scope.row)"
                            v-else-if="scope.row.insId==undefined&&scope.row.name==null">检验</el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
        <el-dialog title="分配设备和人员" :visible.sync="upDia" width="500px" top="30vh">
            <div class="body">
                <el-row style="line-height: 46px;">
                    <el-col :span="4" style="font-size: 14px;text-align: right;">人员:</el-col>
                    <el-col :span="16" :offset="1">
                        <el-input v-model="upData.address" size="small" clearable></el-input>
                    </el-col>
                </el-row>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitUpData">ç¡® å®š</el-button>
                <el-button @click="upDia = false">取 æ¶ˆ</el-button>
            </span>
        </el-dialog>
        <el-dialog title="检验" :visible.sync="upInsDia" width="500px">
            <div class="body" style="max-height: 50vh;overflow-y: auto;">
                <el-row style="line-height: 46px;">
                    <el-col :span="4" style="font-size: 14px;text-align: right;">样品编码:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                    <el-col :span="4" style="font-size: 14px;text-align: right;">样品名称:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                </el-row>
                <el-row style="line-height: 46px;">
                    <el-col :span="4" style="font-size: 14px;text-align: right;">检验项目:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                    <el-col :span="4" style="font-size: 14px;text-align: right;">单位:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                </el-row>
                <el-row style="line-height: 46px;">
                    <el-col :span="4" style="font-size: 14px;text-align: right;">标准值:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                    <el-col :span="4" style="font-size: 14px;text-align: right;">内控值:</el-col>
                    <el-col :span="8">{{upData.date}}</el-col>
                </el-row>
                <el-row style="line-height: 46px;">
                    <el-col style="text-align: right;"><el-button size="mini" @click="addRes">添加检验值</el-button></el-col>
                </el-row>
                <el-row>
                    <el-col>
                        <el-table :data="upData.res" border style="width: 99.9%;" :key="upIndex2">
                            <el-table-column type="index" width="100" label="序号">
                            </el-table-column>
                            <el-table-column label="检验值">
                                <template slot-scope="scope">
                                    <el-input v-model.number="scope.row.number" size="small" clearable placeholder="请输入"
                                        @change="(val)=>scope.row.number = isNaN(val)?null:val">
                                    </el-input>
                                </template>
                            </el-table-column>
                            <el-table-column label="操作" width="60">
                                <template slot-scope="scope">
                                    <el-button size="mini" type="text"
                                        @click.native.prevent="deleteRow(scope.$index, upData.res)">删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </el-col>
                </el-row>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="submitUpData">提 äº¤</el-button>
                <el-button @click="upInsDia = false">取 æ¶ˆ</el-button>
            </span>
        </el-dialog>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                search: {
                    name: null,
                    date: [],
                    userName: null,
                },
                tableData: [{
                    id: 1,
                    insId: 123,
                    date: '2016-05-02',
                    name: null,
                    address: '上海市普陀区金沙江路 1518 å¼„',
                    children: [{
                        id: 33,
                        date: '2016-05-01',
                        name: null,
                        res: '[{"number": 1},{"number": 2}]',
                        address: '上海市普陀区金沙江路 1519 å¼„'
                    }, {
                        id: 34,
                        date: '2016-05-01',
                        name: null,
                        res: '[{"number": 1,"res": "不合格"},{"number": 2}]',
                        address: '上海市普陀区金沙江路 1519 å¼„'
                    }]
                }, {
                    id: 2,
                    insId: 123,
                    date: '2016-05-04',
                    name: null,
                    address: '上海市普陀区金沙江路 1517 å¼„',
                    children: []
                }, {
                    id: 3,
                    insId: 123,
                    date: '2016-05-01',
                    children: [{
                        id: 31,
                        date: '2016-05-01',
                        name: null,
                        res: '[{"number": 1},{"number": 2}]',
                        address: '上海市普陀区金沙江路 1519 å¼„'
                    }, {
                        id: 32,
                        date: '2016-05-01',
                        name: null,
                        res: '[]',
                        address: null
                    }]
                }],
                upDia: false,
                upData: {},
                upIndex: 0,
                upInsDia: false,
                upIndex2: 0
            }
        },
        mounted() {
            this.selectDataList()
        },
        methods: {
            selectDataList() {
                this.tableData.forEach(a => {
                    a.code = '[1]'
                    if (a.children != undefined) {
                        a.children.forEach(b => {
                            b.code = '[2]'
                            b.res = JSON.parse(b.res)
                        })
                    }
                })
                this.upIndex++
            },
            isIfReport(row) {
                var count = 0
                if (row.children == undefined) return false
                row.children.forEach(a => {
                    if (a.name != null && a.name != undefined) count++
                })
                return row.insId != undefined && count == row.children.length
            },
            openUpDia(row) {
                this.upDia = true
                this.upData = {
                    id: row.id,
                    address: row.address
                }
            },
            submitUpData() {
                this.tableData.forEach(a => {
                    a.children.forEach(b => {
                        if (b.id == this.upData.id) {
                            b.address = this.upData.address
                        }
                    })
                })
                this.$message.success('修改成功')
                this.upIndex++
                this.upDia = false
            },
            openUpInsDia(row) {
                this.upInsDia = true
                this.upData = this.HaveJson(row)
            },
            deleteRow(index, rows) {
                rows.splice(index, 1);
            },
            addRes() {
                this.upData.res.push({
                    "number": null
                })
                this.upIndex2++
            }
        }
    }
</script>
src/views/home/index.vue
@@ -94,4 +94,5 @@
    }
  }
}
</style>
</style>
src/views/laboratory/measure/Add.vue
@@ -8,15 +8,15 @@
                <el-form-item>
                    <el-col :span="6" style="display: flex;justify-content: space-around;">
                        <span>负责人:</span>
                        <el-select v-model="planAddInfo.measurePerson" placeholder="请选择活动区域">
                            <el-option label="区域一" value="shanghai"></el-option>
                            <el-option label="区域二" value="beijing"></el-option>
                        <el-select v-model="planAddInfo.measurePerson" placeholder="请选择负责人">
                            <el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </el-col>
                    <el-col :span="8" style="display: flex;justify-content: space-around;">
                        <span>计划时间:</span>
                        <el-date-picker v-model="planAddInfo.planDate" type="daterange" range-separator="至" start-placeholder="开始日期"
                            end-placeholder="结束日期">
                        <el-date-picker v-model="planAddInfo.planDate" type="daterange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
                        </el-date-picker>
                    </el-col>
                    <el-col :span="5"></el-col>
@@ -36,39 +36,54 @@
                    :show-text="false"></el-progress>
            </el-col>
        </el-col>
        <el-col style="width:93%;height: 20vh;margin-top: 30px; margin-left: 40px;">
            <el-button icon="el-icon-plus" @click="addcodePointsTable()" style="margin-bottom: 10px;"
                type="primary">新增计量</el-button>
            <el-table ref="codePointsTable" :cell-style="{ textAlign: 'center' }"
                :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
                :data="codePointsTable" style="width: 100%">
                <el-table-column type="index" label="序号" min-width="90" />
                <el-table-column prop="equipmentPointName" label="仪器设备名称" min-width="150">
                <el-table-column type="index" v-model="codePointsTable.index" label="序号" min-width="90" />
                <el-table-column prop="equipmentPointName" label="仪器设备" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.equipmentPoint }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.equipmentPoint" />
                        <span v-show="!codePointesTableStatus">{{ scope.row.equipmentPointName }}</span>
                        <el-select @change="insListChange(scope.row.equipmentPointName,scope)" v-model="scope.row.equipmentPointName" placeholder="请选择仪器设备">
                            <el-option v-for="item in insList" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column prop="measuringRange" label="测量范围" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.measuringRange }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.measuringRange" />
                        <el-input disabled v-show="codePointesTableStatus" v-model="scope.row.measuringRange" />
                    </template>
                </el-table-column>
                <el-table-column prop="unit" label="单位" min-width="150">
                <el-table-column prop="termValidity" label="计量周期" min-width="150">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.unit }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.unit" />
                        <span v-show="!codePointesTableStatus">{{ scope.row.termValidity }}</span>
                        <el-input disabled v-show="codePointesTableStatus" v-model="scope.row.termValidity" />
                    </template>
                </el-table-column>
                <el-table-column prop="descriptiveness" label="描述" min-width="200">
                <el-table-column prop="result" label="计量结果" min-width="200">
                    <template slot-scope="scope">
                        <span v-show="!codePointesTableStatus">{{ scope.row.descriptiveness }}</span>
                        <el-input v-show="codePointesTableStatus" v-model="scope.row.descriptiveness" />
                        <span v-show="!codePointesTableStatus">{{ scope.row.result }}</span>
                        <el-select v-model="scope.row.result" placeholder="请选择">
                            <el-option v-for="item in result" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </el-select>
                    </template>
                </el-table-column>
                <el-table-column prop="descriptiveness" label="操作" min-width="200">
                <el-table-column prop="endDate" label="计量日期" min-width="200">
                    <template slot-scope="scope">
                        <el-tag type="" icon=""></el-tag>
                        <span v-show="!codePointesTableStatus">{{ scope.row.endDate }}</span>
                        <el-date-picker v-model="scope.row.endDate" type="date" placeholder="选择日期">
                        </el-date-picker>
                    </template>
                </el-table-column>
                <el-table-column prop="index" label="操作" min-width="200">
                    <template slot-scope="scope">
                        <span><a @click="removetableIndex(scope.row.index)" style="color: deepskyblue;">作废</a></span>
                    </template>
                </el-table-column>
            </el-table>
@@ -76,41 +91,110 @@
    </div>
</template>
<script>
import {
    getListUserAndListIns, addPlanAndMeasure
} from '@/api/laboratory/measure'
import { dateFormat } from "../../../utils/dateUtil";
export default {
    data() {
        return {
            planAddInfo: {
                plannedOrderNumber: 7897897987,
                measurePerson: '某某人',
                planDate: "2021-09-08 ~ 2024-08-09",
                unit: '某某检测局',
                createPerson: '某某负责人',
                createTime: '2021-09-08'
                plannedOrderNumber: '',
                measurePerson: '',
                planDate: "",
                unit: '',
                createPerson: '',
                createTime: ''
            },
            codePointsTable: [{
                id: '',
                "index": 1,
                "equipmentPointName": '',
                "measuringRange": '',
                "termValidity": "",
                "result": null,
            }],
            result: [{
                label: '合格',
                value: 1
            }, {
                label: '矫正后可用',
                value: 2
            }, {
                label: '不合格',
                value: 3
            }],
            userList: [],
            insList: [],
            instrumentList:[],
            // ç ç‚¹è¡¨æ ¼çš„状态:数据展示false/新增输入true
            codePointesTableStatus: false,
        }
    },
    async created() {
        this.codePointsTable = []
        let res = await getListUserAndListIns()
        res.data.userList.forEach(element => {
            this.userList.push({ label: element.name, value: element.id })
        });
        this.instrumentList=res.data.instrumentList
        res.data.instrumentList.forEach(item => {
            this.insList.push({ label: item.equipmentName, value: item.id })
        })
        console.log(this.insList);
    },
    methods: {
        addcodePointsTable() {
            const newObj = {
                index: this.codePointsTable.length + 1,
                equipmentPointName: '',
                measuringRange: '',
                termValidity: "",
                planDate: null,
            }],
            // ç ç‚¹è¡¨æ ¼çš„状态:数据展示false/新增输入true
            codePointesTableStatus: true,
        }
    },
    methods: {
        // æ–°å¢žè®¾å¤‡ç ç‚¹
        addNewCodePoints() {
            //
            if (!this.codePointsTable) {
                this.codePointsTable = []
                result: null,
                endDate: null,
                planDate: null
            }
            const newObj = {}
            newObj.equipmentPointName = ''
            newObj.descriptiveness = ''
            newObj.unit = ''
            newObj.instrumentId = this.equipmentDetail.id
            this.codePointsTable.push(newObj)
            this.codePointesTableStatus = true
        },
        removetableIndex(id) {
            this.codePointsTable = this.codePointsTable.filter(item => {
                return item.index != id;
            })
        },
        async add() {
            console.log(111111);
            this.planAddInfo.startTime = dateFormat(this.planAddInfo.planDate[0])
            this.planAddInfo.endTime = dateFormat(this.planAddInfo.planDate[1])
            console.log(this.planAddInfo);
            this.planAddInfo.planDate = null
            this.codePointsTable.forEach(item => {
                if(item.endDate!=null&&item.endDate!=''){
                    item.endDate = dateFormat(item.endDate)
                }
            })
            console.log(this.codePointsTable);
            let data = {}
            this.codePointsTable.length>0?data = { measureList: this.codePointsTable, plan: this.planAddInfo }:data = {plan: this.planAddInfo }
            let add = await addPlanAndMeasure(data)
            this.planAddInfo={
                plannedOrderNumber: '',
                measurePerson: '',
                planDate: "",
                unit: '',
                createPerson: '',
                createTime: ''
            }
            this.codePointsTable=[]
            return add.data
        },
        insListChange(i,s){
            console.log(i);
            console.log(s.$index);
            let ins= this.instrumentList.filter(item=>{
                return item.id==i
            })[0]
            this.codePointsTable[s.$index].measuringRange=ins.measuringRange
            this.codePointsTable[s.$index].termValidity=ins.termValidity+'月'
        }
    }
}
src/views/laboratory/measure/index.vue
@@ -117,11 +117,12 @@
          </div>
        </div>
      </div>
      <div style="position: absolute;top:14px;left: 9px;transition: 1s;width: 99%;height: 82vh;background-color: #fff;z-index: 21;">
          <Add/>
      <div
        :style="`position: absolute;top:${addTop}px;left: 9px;transition: 1s;width: 99%;height: 82vh;background-color: #fff;z-index: 21;`">
        <Add ref="add" />
      </div>
      <div id="myMOdel"
        :style="`position: absolute;transition: 1s;top:${mymodelTop}px; left: 9px; width: 99%; height: 65vh; background-color: #fff;z-index: 20;`">
        :style="`position: absolute;transition: 1s;top:${mymodelTop}px; left: 9px; width: 99%; height: 85vh; background-color: #fff;z-index: 20;`">
        <el-col :span="10">
          <p style="font-size: 13px;padding-left: 40px;">计划信息</p>
        </el-col>
@@ -188,22 +189,84 @@
            <el-table-column prop="imCreateTime" label="创建日期" />
            <el-table-column prop="measurementName" label="创建人" />
            <el-table-column prop="measurementUnit" label="计量单位" />
            <el-table-column prop="equipmentCode" label="计量编号" />
            <el-table-column prop="code" label="计量编号" />
            <el-table-column prop="equipmentCode" label="操作">
              <template slot-scope="scope">
                <a @click="measureUp(scope)" style="color: deepskyblue;">计量</a>
              </template>
            </el-table-column>
          </el-table>
        </el-col>
        <el-col style="width: 93%;margin-left: 40px; margin-top: 90px;display: flex;justify-content: end;">
        <el-col style="width: 93%;margin-left: 40px; margin-top: 250px;display: flex;justify-content: end;">
          <el-pagination @size-change="handleSizeChangePlan" @current-change="handleCurrentChangePllan"
            :current-page="currentPagePlan" :page-sizes="[5, 10, 20]" :page-size="pageSizePlan"
            :current-page="currentPagePlan" :page-sizes="[5, 10]" :page-size="pageSizePlan"
            layout="total, sizes, prev, pager, next, jumper" :total="totalPlan">
          </el-pagination>
        </el-col>
      </div>
      <el-dialog class="measureForm" title="计量" :visible.sync="dialogVisible">
        <el-form label-position="top" ref="upmeasureForm" :model="measureUpInfo">
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="检定有效期" prop="date"
                :rules="[{ required: true, message: '请选择检定有效期', trigger: 'change' }]">
                <el-date-picker v-model="measureUpInfo.date" type="date" placeholder="选择日期">
                </el-date-picker>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="不确定度" prop="uncertainty"
                :rules="[{ required: true, message: '请填写不确定度', trigger: 'blur' }]">
                <el-input placeholder="请填写不确定度" v-model="measureUpInfo.uncertainty" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="结果" prop="result" :rules="[{ required: true, message: '请选择结果', trigger: 'change' }]">
                <el-select v-model="measureUpInfo.result" clearable filterable :allow-create="true" placeholder="请选择结果"
                  style="width:100%">
                  <el-option v-for="item in result" :key="item.id" :label="item.label" :value="item.value" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="性能指标">
                <el-input v-model="measureUpInfo.performanceIndex" type="textarea" :rows="2" placeholder="请输入内容" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="备注">
                <el-input v-model="measureUpInfo.remarks" type="textarea" :rows="2" placeholder="请输入内容" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="24">
              <el-form-item label="">
                <el-upload class="upload-demo" action="#" :on-change="handleUploadupdated" :auto-upload="false">
                  <el-button size="small" type="primary">点击上传</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <span slot="footer" class="dialog-footer">
          <el-button type="primary" @click="upMeasure">ç¡® å®š</el-button>
          <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
        </span>
      </el-dialog>
    </div>
  </div>
</template>
<script>
import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest } from '@/api/laboratory/measure'
import { getPlanPageList, getStandingPageList, getPlanMeasureInstrument, limitGetPlanMeasureRequest, updateMetricalInformationInfo } from '@/api/laboratory/measure'
import { default as Add } from "./Add.vue";
export default {
  components: {
@@ -211,6 +274,29 @@
  },
  data() {
    return {
      dialogVisible: false,
      tableIndex: null,
      measureUpInfo: {
        id: null,
        code: null,
        result: null,
        date: null,
        uncertainty: null,
        performanceIndex: null,
        remarks: null,
        file: null,
        termValidity: null
      },
      result: [{
        label: '合格',
        value: 1
      }, {
        label: '矫正后可用',
        value: 2
      }, {
        label: '不合格',
        value: 3
      }],
      searchData: {
        code: '',
        name: '',
@@ -232,9 +318,8 @@
      currentPagePlan: 1,
      pageSizePlan: 5,
      totalPlan: 0,
      drawer: false,
      direction: 'rtl',
      lookVisible: true,
      lookVisible: false,
      measureData: [],
      planInfo: {
        plannedOrderNumber: 7897897987,
@@ -244,7 +329,8 @@
        createPerson: '某某负责人',
        createTime: '2021-09-08'
      },
      mymodelTop: -600,//14
      mymodelTop: -700,//14
      addTop: -700,
      planId: 0
    }
  },
@@ -253,6 +339,47 @@
    // this.getPlanPageList()
  },
  methods: {
    upResult() {
      this.measureData[this.tableIndex].result = this.resultUp
    },
    async upMeasure() {
      let res = await updateMetricalInformationInfo(this.measureUpInfo)
      if (res) {
        this.$message({
          message: '操作成功!',
          type: 'success'
        });
        this.limitGetPlanMeasureInstrument()
        this.dialogVisible = false
      }
    },
    handleUploadupdated() {
    },
    measureUp(scope) {
      this.dialogVisible = true
      this.tableIndex = scope.$index
      this.measureUpInfo.result = scope.row.result
      this.measureUpInfo.code = scope.row.code
      this.measureUpInfo.date = scope.row.endDate
      this.measureUpInfo.id = scope.row.imId
      this.measureUpInfo.uncertainty = scope.row.uncertainty
      this.measureUpInfo.performanceIndex = scope.row.performanceIndex
      this.measureUpInfo.remarks = scope.row.remarks
      this.measureUpInfo.termValidity = scope.row.termValidity
    },
    measureAdd() {
      let add = this.$refs.add.add()
      if (add) {
        this.addTop = -700
        this.$message({
          message: '操作成功!',
          type: 'success'
        });
        this.lookVisible = false
      }
    },
    async handleSizeChangePlan(num) {
      this.pageSizePlan = num
      await this.limitGetPlanMeasureInstrument()
@@ -262,14 +389,17 @@
      await this.limitGetPlanMeasureInstrument()
    },
    addPlan() {
      this.drawer = true
      this.addTop = 14
      this.lookVisible = true
      this.$parent.mainShowAdd()
    },
    async limitGetPlanMeasureInstrument() {
      let res = await limitGetPlanMeasureRequest({
      let param = {
        id: this.planId,
        currentPage: this.currentPagePlan,
        pageSize: this.pageSize
      })
        pageSize: this.pageSizePlan
      }
      let res = await limitGetPlanMeasureRequest(param)
      this.totalPlan = res.data.taotal
      this.measureData = res.data.list
    },
@@ -282,7 +412,6 @@
    },
    async getPlanAndInfoAndIns(id) {
      let res = await getPlanMeasureInstrument({ "id": id, "currentPage": this.currentPagePlan, "pageSize": this.pageSize });
      console.log(res);
      for (const key in res.data.list) {
        this.planInfo[key] = res.data.list[key]
      }
@@ -299,27 +428,29 @@
    },
    combackLookPlan() {
      this.lookVisible = false
      this.mymodelTop = -600
      this.mymodelTop = -700
    },
    blurSearch() {
      if (this.radioValue === 1) {
        console.log("计划");
      }
    },
    handleClose() {
      this.drawer = false
    },
    handleCurrentChange() {
      this.getStandingPageList()
    handleCurrentChange(num) {
      this.currentPage = num
      this.radioValue ? this.getPlanPageList() : this.getStandingPageList()
    },
    handleSizeChange() {
      this.getStandingPageList()
    handleSizeChange(num) {
      this.pageSize = num
      this.radioValue ? this.getPlanPageList() : this.getStandingPageList()
    },
    async getStandingPageList() {
      const res = await getStandingPageList({
      let param = {
        currentPage: this.currentPage, pageSize: this.pageSize,
        code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit
      })
      }
      const res = await getStandingPageList(param)
      this.measureLedgerTable = res.data.records
      this.total = res.data.total
      this.measureLedgerTable.forEach(item => {
@@ -362,10 +493,11 @@
      this.reset()
    },
    async getPlanPageList() {
      const res = await getPlanPageList({
      let param = {
        currentPage: this.currentPage, pageSize: this.pageSize,
        code: this.searchData.code, name: this.searchData.name, unit: this.searchData.measureunit
      })
      }
      const res = await getPlanPageList(param)
      res.data.list.forEach(item => {
        item.palanDate = item.beginTime + " ~ " + item.endTime
      })
@@ -373,7 +505,6 @@
      this.total = res.data.total
    },
    async lookMeasurement(code) {
      console.log(code);
    },
  }
}