gaoluyang
2025-03-24 8edfe5a740151978422bdba16b6b68b20f0706c7
设备校准计划-新增设备赋值优化
已修改2个文件
20 ■■■■ 文件已修改
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -13,6 +13,7 @@
      </div>
      <div style="margin: 10px 0">
        <el-table id="templateParamTable" ref="yearTable" :data="calibrationPlanDetailList" height="300px"
                  v-loading="yearTableLoading"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          row-key="deviceId" style="width: 100% ;">
          <el-table-column label="设备名称及型号" min-width="190" prop="deviceName">
@@ -115,7 +116,8 @@
        planId: '',
        calibrationPlanDetailList: [],
      },
      operationType: ''
      operationType: '',
      yearTableLoading: false
    }
  },
  mounted() {
@@ -129,21 +131,26 @@
        this.form = {
          planName: '',
          planYear: '',
          examinePlanDetailsList: [],
          calibrationPlanDetailList: [],
        }
        this.calibrationPlanDetailList = []
      } else {
        this.getRowInfo(row)
      }
      this.applicationForm = true
    },
    getRowInfo(row) {
      this.yearTableLoading = true
      getDeviceCalibrationPlan({ planId: row.planId }).then(res => {
        this.yearTableLoading = false
        if (res.code == 200) {
          this.calibrationPlanDetailList = res.data.calibrationPlanDetailList
          this.form.planName = res.data.planName
          this.form.planYear = res.data.planYear
          this.form.planId = res.data.planId
        }
      }).catch(err => {
        this.yearTableLoading = false
      })
    },
    // 添加设备
@@ -158,7 +165,12 @@
      this.selectionRows.map(val => {
        this.calibrationPlanDetailList.push({
          deviceId: val.id, deviceName: val.label, deviceNumber: val.value,
          specificationModel: val.specificationModel, verificationCycles: val.calibrationDate, lastDate: val.lastCalibrationDate.substring(0, 10), planDate: val.nextCalibrationDate.substring(0, 10)
          specificationModel: val.specificationModel,
          verificationCycles: val.calibrationDate,
          lastDate: val.lastCalibrationDate.substring(0, 10),
          planDate: val.nextCalibrationDate.substring(0, 10),
          verificationUnit: val.calibrationServices,
          deviceAmount: 1
        })
      })
      this.addEquipDia = false
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -15,7 +15,7 @@
      <div>
        <el-table ref="yearTable" v-loading="yearTableDataLoading" :data="yearTableData" height="calc(60vh - 20em)"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
          highlight-current-row style="width: 100% ;" @current-change="currentChange">
                  highlight-current-row @current-change="currentChange">
          <!-- 表格列 -->
          <el-table-column align="center" header-align="center" label="序号" prop="prop" type="index"
            width="70"></el-table-column>