src/views/CNAS/resourceDemand/device/component/failureForm.vue
@@ -72,12 +72,10 @@
  addDeviceBreakdownMaintenance,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  name: "failure-form",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -118,8 +116,6 @@
      this.getUserList()
      if (this.form.maintenanceId) {
        this.searchInfo()
      } else {
        this.draftRestore('failureForm', 'form', this.form.deviceId, 'dialogVisible')
      }
    },
    // 查询详情
@@ -128,9 +124,7 @@
        maintenanceId: this.form.maintenanceId
      }).then(res => {
        if (res.code === 200) {
          const id = this.form.maintenanceId
          this.form = { ...res.data }
          this.draftRestore('failureForm', 'form', id, 'dialogVisible')
          if (this.form.isFinish === 0) {
            if (this.form.departmentHeadUserId) {
              this.currentStep = 1
@@ -160,7 +154,6 @@
          addDeviceBreakdownMaintenance(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('新增成功')
              this.draftClear('failureForm')
              this.resetForm()
            }
            this.submitFormLoading = false
@@ -172,7 +165,6 @@
    },
    // 关闭弹框
    resetForm() {
      this.draftStop('failureForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },