src/views/CNAS/resourceDemand/device/component/equipmentVerificationPlan.vue
@@ -249,10 +249,12 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/performance/class";
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  name: "equipment-verification-plan",
  // import 引入的组件需要注入到对象中才能使用
  components: { AddVerificationYearPlanDia, CheckRecord, EquipmentCheck },
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -495,6 +497,9 @@
      if (this.operationType !== 'add') {
        this.$nextTick(() => {
          this.form = this.HaveJson(row)
          if (this.operationType !== 'view') {
            this.draftRestore('equipmentVerificationPlan', 'form', this.form.planDetailsId, 'dialogVisible')
          }
        })
      } else {
        this.form = {
@@ -510,6 +515,7 @@
          planId: this.currentRow.planId,
          planDetailsId: '',
        }
        this.draftRestore('equipmentVerificationPlan', 'form', this.form.planId, 'dialogVisible')
      }
    },
    // 提交表单
@@ -521,6 +527,7 @@
            addDeviceExaminePlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentVerificationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -533,6 +540,7 @@
            updateDeviceExaminePlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentVerificationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -564,6 +572,7 @@
      })
    },
    resetForm() {
      this.draftStop('equipmentVerificationPlan')
      this.$refs.modelForm.resetFields();
      this.dialogVisible = false
    },