src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -229,10 +229,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-calibration-plan",
  // import 引入的组件需要注入到对象中才能使用
  components: { AddVerificationYearPlanDia, AddYearPlanDia },
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -459,6 +461,9 @@
      if (this.operationType !== 'add') {
        this.$nextTick(() => {
          this.form = this.HaveJson(row)
          if (this.operationType !== 'view') {
            this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planDetailId, 'dialogVisible')
          }
        })
      } else {
        this.form = {
@@ -473,6 +478,7 @@
          planId: this.currentRow.planId,
          planDetailId: '',
        }
        this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planId, 'dialogVisible')
      }
    },
    // 提交表单
@@ -484,6 +490,7 @@
            addDeviceCalibrationPlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentCalibrationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -496,6 +503,7 @@
            updateDeviceCalibrationPlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentCalibrationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -550,6 +558,7 @@
      })
    },
    resetForm() {
      this.draftStop('equipmentCalibrationPlan')
      this.$refs.modelForm.resetFields();
      this.dialogVisible = false
    },