src/views/CNAS/resourceDemand/device/component/addVerificationYearPlanDia.vue
@@ -99,10 +99,12 @@
  deviceScopeSearch,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/performance/class";
import draftSave from '@/mixins/draftSave'
export default {
  name: "addVerificationYearPlanDia",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -137,6 +139,10 @@
          examinePlanDetailsList: [],
        }
        this.examinePlanDetailsList = []
        this.$nextTick(() => {
          this.draftRestore('addVerificationYearPlanDiaForm', 'form', '', 'applicationForm')
          this.draftRestore('addVerificationYearPlanDiaRows', 'examinePlanDetailsList', '', 'applicationForm')
        })
      } else {
        this.getRowInfo(row)
      }
@@ -152,6 +158,10 @@
          this.form.planName = res.data.planName
          this.form.planYear = res.data.planYear
          this.form.planId = res.data.planId
          this.$nextTick(() => {
            this.draftRestore('addVerificationYearPlanDiaForm', 'form', this.form.planId, 'applicationForm')
            this.draftRestore('addVerificationYearPlanDiaRows', 'examinePlanDetailsList', this.form.planId, 'applicationForm')
          })
        }
      }).catch(error => {
        this.yearTableLoading = false
@@ -212,6 +222,8 @@
        addDeviceExaminePlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('addVerificationYearPlanDiaForm')
            this.draftClear('addVerificationYearPlanDiaRows')
            this.closeDialog()
            this.$emit('closeDia')
          }
@@ -223,6 +235,8 @@
        updateDeviceExaminePlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('addVerificationYearPlanDiaForm')
            this.draftClear('addVerificationYearPlanDiaRows')
            this.closeDialog()
            this.$emit('closeDia')
          }
@@ -233,6 +247,8 @@
      }
    },
    closeDialog() {
      this.draftStop('addVerificationYearPlanDiaForm')
      this.draftStop('addVerificationYearPlanDiaRows')
      this.applicationForm = false
    },
    // 获取所有设备