Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
@@ -12,8 +12,9 @@
        </el-date-picker>
      </div>
      <div style="margin: 10px 0">
        <el-table ref="yearTable" :data="examinePlanDetailsList" id="templateParamTable" row-key="deviceId" border
          height="500px" style="width: 100% ;">
        <el-table ref="yearTable" :data="examinePlanDetailsList" id="templateParamTable" row-key="deviceId"
                  v-loading="yearTableLoading"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border height="560px">
          <el-table-column label="设备名称" min-width="190" prop="deviceName">
            <template slot-scope="scope">
              <el-input v-model="scope.row.deviceName" clearable size="small"></el-input>
@@ -75,6 +76,7 @@
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="addEquipDia" title="新增年度计划"
      width="50%">
      <el-table ref="multipleTable" :data="equipOptions" tooltip-effect="dark" height="500" style="width: 100%"
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
        @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column label="设备名称" prop="label"></el-table-column>
@@ -117,7 +119,8 @@
        planId: '',
        examinePlanDetailsList: [],
      },
      operationType: ''
      operationType: '',
      yearTableLoading: false
    }
  },
  mounted() {
@@ -133,6 +136,7 @@
          planYear: '',
          examinePlanDetailsList: [],
        }
        this.examinePlanDetailsList = []
      } else {
        this.getRowInfo(row)
      }
@@ -140,13 +144,17 @@
      this.getUserList()
    },
    getRowInfo(row) {
      this.yearTableLoading = true
      getDeviceExaminePlan({ planId: row.planId }).then(res => {
        this.yearTableLoading = false
        if (res.code == 200) {
          this.examinePlanDetailsList = res.data.examinePlanDetailsList
          this.form.planName = res.data.planName
          this.form.planYear = res.data.planYear
          this.form.planId = res.data.planId
        }
      }).catch(error => {
        this.yearTableLoading = false
      })
    },
    // 添加设备