撤回设备模块其他标签页的草稿自动保存,仅保留设备核查计划标签页:核查计划主页面、核查录入弹窗、核查记录弹窗、新增年计划弹窗 4 处保留编辑退出自动保存/恢复,其余 21 个组件恢复原状;
management.vue(数采配置旧弹窗)与 calibration.vue(被注释导出按钮)仅保留此前已报备的死代码清理,草稿接线一并移除
已修改23个文件
270 ■■■■■ 文件已修改
src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/accidentForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/applicationForm.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/borrow.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/calibration.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/check.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/failureForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/fault.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/files.vue 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/inspectionForm.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/management.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/record.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/resourceReservation.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/state.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue
@@ -79,12 +79,10 @@
  updateDeviceAcceptance,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  name: "acceptance-form",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -124,19 +122,13 @@
      this.getUserList()
      if (this.form.acceptanceId) {
        this.searchInfo()
      } else if (this.operationType !== 'view') {
        this.draftRestore('acceptanceForm', 'form', this.form.deviceId, 'dialogVisible')
      }
    },
    // 查询详情
    searchInfo() {
      getDeviceAcceptance({ acceptanceId: this.form.acceptanceId }).then(res => {
        if (res.code === 200) {
          const id = this.form.acceptanceId
          this.form = { ...res.data }
          if (this.operationType !== 'view') {
            this.draftRestore('acceptanceForm', 'form', id, 'dialogVisible')
          }
        }
      }).catch(error => {
        console.error(error)
@@ -150,7 +142,6 @@
            addDeviceAcceptance(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('acceptanceForm')
                this.resetForm()
              }
              this.submitFormLoading = false
@@ -161,7 +152,6 @@
            updateDeviceAcceptance(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('修改成功')
                this.draftClear('acceptanceForm')
                this.resetForm()
              }
              this.submitFormLoading = false
@@ -174,7 +164,6 @@
    },
    // 关闭弹框
    resetForm() {
      this.draftStop('acceptanceForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },
src/views/CNAS/resourceDemand/device/component/accidentForm.vue
@@ -100,12 +100,10 @@
  getDeviceAccidentReport,
  addDeviceAccidentReport,
} from '@/api/cnas/resourceDemand/device.js'
import draftSave from '@/mixins/draftSave'
export default {
  name: "accident-form",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -152,17 +150,13 @@
      this.getUserList()
      if (this.form.accidentReportId) {
        this.searchInfo()
      } else {
        this.draftRestore('accidentForm', 'form', this.form.deviceId, 'dialogVisible')
      }
    },
    // 查询详情
    searchInfo() {
      getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => {
        if (res.code === 200) {
          const id = this.form.accidentReportId
          this.form = { ...res.data }
          this.draftRestore('accidentForm', 'form', id, 'dialogVisible')
          if (res.data.isFinish === 0) {
            if (this.form.assessorUserId) {
              this.currentStep = 1
@@ -200,7 +194,6 @@
          addDeviceAccidentReport(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('新增成功')
              this.draftClear('accidentForm')
              this.resetForm()
            }
            this.submitFormLoading = false
@@ -212,7 +205,6 @@
    },
    // 关闭弹框
    resetForm() {
      this.draftStop('accidentForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -181,12 +181,10 @@
  getNoConfigProduct,
} from '@/api/cnas/resourceDemand/device.js'
import limsTable from "@/components/Table/lims-table.vue";
import draftSave from '@/mixins/draftSave'
export default {
  name: "dataAcquisitionConfig",
  // import 引入的组件需要注入到对象中才能使用
  components: {limsTable},
  mixins: [draftSave],
  props: {
    deviceId: {
      type: Number,
@@ -407,9 +405,6 @@
        this.configForm["sampleCode"] = res.data.sampleCode;
        this.configForm["dbFileName"] = res.data.dbFileName;
        this.configForm["fiberOpticRibbon"] = res.data.fiberOpticRibbon
        this.$nextTick(() => {
          this.draftRestore('acquisitionConfig4', 'configForm', this.deviceId, 'dialogVisible4')
        })
      })
    },
    // 提交文件配置
@@ -428,7 +423,6 @@
      this.upLoad4 = true;
      saveDeviceFileConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
        if (res.code == 200) {
          this.draftClear('acquisitionConfig4')
          this.dialogVisible4 = false;
          this.init();
          this.$message.success("操作成功");
@@ -487,10 +481,6 @@
            });
          });
        }
        this.$nextTick(() => {
          this.draftRestore('acquisitionConfig3', 'configForm', row.structureItemParameterId, 'dialogVisible3')
          this.draftRestore('acquisitionConfig3Domains', 'domains', row.structureItemParameterId, 'dialogVisible3')
        })
      });
    },
    // 提交数采配置
@@ -530,8 +520,6 @@
            dataConfigList: this.domains,
            isDevice: false
          }).then(res => {
            this.draftClear('acquisitionConfig3')
            this.draftClear('acquisitionConfig3Domains')
            this.dialogVisible3 = false;
            this.domains = [
              {
@@ -592,8 +580,6 @@
      this.page.current = val;
    },
    closeForm() {
      this.draftStop('acquisitionConfig3')
      this.draftStop('acquisitionConfig3Domains')
      this.deleteList = [];
      this.domains = [
        {
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -96,13 +96,11 @@
  deviceScopeSearch
} from '@/api/cnas/resourceDemand/device.js'
import Sortable from "sortablejs";
import draftSave from '@/mixins/draftSave'
export default {
  name: "addYearPlanDia",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -136,10 +134,6 @@
          calibrationPlanDetailList: [],
        }
        this.calibrationPlanDetailList = []
        this.$nextTick(() => {
          this.draftRestore('addYearPlanDiaForm', 'form', '', 'applicationForm')
          this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', '', 'applicationForm')
        })
      } else {
        this.getRowInfo(row)
      }
@@ -154,10 +148,6 @@
          this.form.planName = res.data.planName
          this.form.planYear = res.data.planYear
          this.form.planId = res.data.planId
          this.$nextTick(() => {
            this.draftRestore('addYearPlanDiaForm', 'form', this.form.planId, 'applicationForm')
            this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', this.form.planId, 'applicationForm')
          })
        }
      }).catch(err => {
        this.yearTableLoading = false
@@ -225,8 +215,6 @@
        addDeviceCalibrationPlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('addYearPlanDiaForm')
            this.draftClear('addYearPlanDiaRows')
            this.closeDialog()
            this.$emit('closeDia')
          }
@@ -238,8 +226,6 @@
        updateDeviceCalibrationPlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('addYearPlanDiaForm')
            this.draftClear('addYearPlanDiaRows')
            this.closeDialog()
            this.$emit('closeDia')
          }
@@ -250,8 +236,6 @@
      }
    },
    closeDialog() {
      this.draftStop('addYearPlanDiaForm')
      this.draftStop('addYearPlanDiaRows')
      this.applicationForm = false
    },
    // 获取所有设备
src/views/CNAS/resourceDemand/device/component/applicationForm.vue
@@ -115,12 +115,10 @@
  addDeviceExternalApply,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  name: "applicationForm",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -167,17 +165,12 @@
      this.getUserList()
      if (this.form.externalApplyId) {
        this.searchInfo()
      } else {
        this.$nextTick(() => {
          this.draftRestore('applicationForm', 'form', '', 'dialogVisible')
        })
      }
    },
    // 查询详情
    searchInfo() {
      getDeviceExternalApply({ externalApplyId: this.form.externalApplyId }).then(res => {
        if (res.code === 200) {
          const externalApplyId = this.form.externalApplyId
          this.form = { ...res.data }
          if (res.data.isFinish === 0) {
            if (this.form.departmentHeadUserId) {
@@ -196,9 +189,6 @@
            this.currentStep = 4
            this.showStep = 3
          }
          this.$nextTick(() => {
            this.draftRestore('applicationForm', 'form', externalApplyId, 'dialogVisible')
          })
        }
      }).catch(error => {
        console.error(error)
@@ -215,7 +205,6 @@
          addDeviceExternalApply(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('新增成功')
              this.draftClear('applicationForm')
              this.resetForm()
            }
            this.submitFormLoading = false
@@ -227,7 +216,6 @@
    },
    // 关闭弹框
    resetForm() {
      this.draftStop('applicationForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },
src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -207,9 +207,7 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -345,7 +343,6 @@
    },
    dialogVisible(newVal) {
      if (!newVal) {
        this.draftStop('borrow')
        this.form = {}
        this.currentStep = 0 // 步骤条显示第几步
        this.currentStepClick = 0 // 点击步骤条变化
@@ -451,7 +448,6 @@
          saveDeviceBorrow(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('提交成功')
              this.draftClear('borrow')
              this.dialogVisible = false
              this.refreshTable()
            }
@@ -514,9 +510,6 @@
            this.currentStepClick = i
          }
          console.log(this.currentStepClick)
          if (this.currentStep < 2) {
            this.draftRestore('borrow', 'form', this.form.id, 'dialogVisible')
          }
          this.dialogVisible = true
        }
      })
@@ -539,7 +532,6 @@
      }
      this.form.deviceName = this.clickNodeVal.label
      this.form.deviceId = this.clickNodeVal.value
      this.draftRestore('borrow', 'form', this.clickNodeVal.value, 'dialogVisible')
    },
    //导出
    handleDown() {
src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -265,7 +265,6 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  props: {
    clickNodeVal: {
@@ -275,7 +274,6 @@
      }
    }
  },
  mixins: [draftSave],
  data() {
    return {
      value: "",
@@ -408,10 +406,7 @@
    add(type) {
      this.operationType = type
      this.dialogVisible1 = true
      this.draftRestore('calibrationRecord', 'calibrationRecord', '', 'dialogVisible1')
      this.getXmsg().then(() => {
        this.draftRestore('calibrationRecordParams', 'calibrateParams', '', 'dialogVisible1')
      })
      this.getXmsg()
    },
    // 查看详情
    handleViewClick(type, row) {
@@ -468,9 +463,6 @@
    calibrationMaintenance() {
      this.dialogVisible0 = true
      this.getXmsg();
      this.$nextTick(() => {
        this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0')
      })
    },
    // 获取设备校准参数table信息
    async getXmsg() {
@@ -517,8 +509,6 @@
            if (res.code == 200) {
              this.$message.success('保存成功')
              this.$refs['form0'].resetFields()
              this.draftClear('calibrationMaintain')
              this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0')
              this.getXmsg() // 刷新设备校准参数表格
            }
            this.calibrateParamsLoading = false
@@ -550,8 +540,6 @@
            addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => {
              if (res.code == 200) {
                this.$message.success('添加成功')
                this.draftClear('calibrationRecord')
                this.draftClear('calibrationRecordParams')
                this.dialogVisible1 = false
                this.getTableList(this.clickNodeVal.value)
              }
@@ -606,8 +594,6 @@
    },
    dialogVisible1(newVal) {
      if (newVal === false) {
        this.draftStop('calibrationRecord')
        this.draftStop('calibrationRecordParams')
        this.calibrateParams = []
        this.calibrationRecord = {
          unitOfMeasure: '', // 计量单位
src/views/CNAS/resourceDemand/device/component/check.vue
@@ -250,10 +250,8 @@
<script>
import file from '@/utils/file';
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  components: {},
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -387,7 +385,6 @@
    // 校准项目维护
    calibrationMaintenance() {
      this.dialogVisible0 = true
      this.draftRestore('checkMaintenanceDia', 'form0', this.clickNodeVal.value, 'dialogVisible0')
      this.getXmsg();
    },
    addCalibrate() {
@@ -406,7 +403,6 @@
          }).then(res => {
            if (res.code == 200) {
              this.$message.success('保存成功')
              this.draftClear('checkMaintenanceDia')
              this.$refs['form0'].resetFields()
              this.getXmsg() // 刷新设备校准参数表格
            }
@@ -451,7 +447,6 @@
            }).then(res => {
              if (res.code == 200) {
                this.$message.success('添加成功')
                this.draftClear('checkAddRecordDia')
                this.dialogVisible1 = false
                this.getTableList(this.clickNodeVal.value)
              }
@@ -467,7 +462,6 @@
      })
    },
    resetcalibrationRecord() {
      this.draftStop('checkAddRecordDia')
      this.$refs.calibrationRecord.resetFields()
    },
    // 附件上传
@@ -524,7 +518,6 @@
    add(type) {
      this.operationType = type
      this.dialogVisible1 = true
      this.draftRestore('checkAddRecordDia', 'calibrationRecord', this.clickNodeVal.value, 'dialogVisible1')
      this.getXmsg()
    },
    // 查看详情
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -229,12 +229,10 @@
} 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,
@@ -461,9 +459,6 @@
      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 = {
@@ -478,7 +473,6 @@
          planId: this.currentRow.planId,
          planDetailId: '',
        }
        this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planId, 'dialogVisible')
      }
    },
    // 提交表单
@@ -490,7 +484,6 @@
            addDeviceCalibrationPlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentCalibrationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -503,7 +496,6 @@
            updateDeviceCalibrationPlanDetail(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.draftClear('equipmentCalibrationPlan')
                this.dialogVisible = false
                this.getYearTableData()
              }
@@ -558,7 +550,6 @@
      })
    },
    resetForm() {
      this.draftStop('equipmentCalibrationPlan')
      this.$refs.modelForm.resetFields();
      this.dialogVisible = false
    },
src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -67,13 +67,11 @@
} from "@/api/cnas/resourceDemand/device";
import limsTable from "@/components/Table/lims-table.vue";
import {selectUserCondition} from "@/api/system/user";
import draftSave from '@/mixins/draftSave'
export default {
  name: '',
  // import 引入的组件需要注入到对象中才能使用
  components: {limsTable},
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -182,9 +180,6 @@
          this.form = {...row}
          this.form['maintenanceContentArr'] = this.form.maintenanceContent.split(',')
        }
        if (this.operationType !== 'view') {
          this.draftRestore('equipmentMaintenance', 'form', this.operationType === 'edit' ? this.form.id : this.clickNodeVal.value, 'dialogVisible')
        }
      })
      this.getDictS()
      this.getUserList()
@@ -264,7 +259,6 @@
          addDeviceMaintenance(this.form).then(res => {
            this.buttonLoading = false;
            this.$message.success('新增成功')
            this.draftClear('equipmentMaintenance')
            this.closeDia()
            this.getTableList()
          }).catch(err => {
@@ -274,7 +268,6 @@
      })
    },
    closeDia () {
      this.draftStop('equipmentMaintenance')
      this.$refs['form'].resetFields();
      this.dialogVisible = false
      this.refreshTableList()
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -166,12 +166,10 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  name: "equipment-maintenance-plan",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -275,22 +273,12 @@
          if (res.code === 200) {
            this.form = res.data
            this.deviceMaintenancePlanDetails = this.form.deviceMaintenancePlanDetails
            this.restoreMaintenancePlanDraft()
          }
        }).catch(error => {
          console.error(error)
        })
      } else {
        this.restoreMaintenancePlanDraft()
      }
      this.getEquipOptions()
    },
    restoreMaintenancePlanDraft() {
      if (this.operationType === 'add' || this.operationType === 'edit') {
        const rid = this.operationType === 'edit' ? this.maintenancePlanId : ''
        this.draftRestore('maintenancePlanForm', 'form', rid, 'applicationForm')
        this.draftRestore('maintenancePlanRows', 'deviceMaintenancePlanDetails', rid, 'applicationForm')
      }
    },
    // 添加设备
    addTableRow() {
@@ -343,8 +331,6 @@
        addMaintenancePlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('maintenancePlanForm')
            this.draftClear('maintenancePlanRows')
            this.applicationForm = false
            this.getYearTableDetailData()
          }
@@ -356,8 +342,6 @@
        updateMaintenancePlan(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('修改成功')
            this.draftClear('maintenancePlanForm')
            this.draftClear('maintenancePlanRows')
            this.applicationForm = false
            this.getYearTableDetailData()
          }
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')
    },
src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -279,9 +279,7 @@
<script>
import { dateFormat } from '@/utils/date'
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -409,7 +407,6 @@
          }).then(res => {
            if (res.code == 200) {
              this.$message.success('提交成功')
              this.draftClear('fault')
              this.getTableList(this.clickNodeVal.value)
              this.dialogVisible = false
            }
@@ -434,11 +431,6 @@
        this.form.manufacturer = res.data.manufacturer
        this.form.specificationModel = res.data.specificationModel
        this.form.managementNumber = res.data.managementNumber
        if (!this.form.id) {
          this.draftRestore('fault', 'form', this.clickNodeVal.value, 'dialogVisible')
        } else if (this.currentStep === 0) {
          this.draftRestore('fault', 'form', this.form.id, 'dialogVisible')
        }
      });
      // 获取负责人信息
      this.getUserList()
@@ -588,7 +580,6 @@
    },
    dialogVisible(newVal) {
      if (!newVal) {
        this.draftStop('fault')
        this.form = {}
        this.closeLoading()
        this.currentStep = 0 // 步骤条显示第几步
src/views/CNAS/resourceDemand/device/component/files.vue
@@ -5,7 +5,7 @@
      <h4><span class="line"></span><span>设备档案</span></h4>
      <div class="btns">
        <el-button type="primary" size="small" @click="openEditForm" style="">修订档案</el-button>
        <el-button type="primary" size="small" @click="openAddFileDia" style="">添加附件</el-button>
        <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">添加附件</el-button>
        <el-button type="primary" size="small" @click="deviceDialog = true" style="">查看设备二维码</el-button>
        <el-button type="primary" size="small" @click="handleDownOne" style="">导出</el-button>
      </div>
@@ -504,9 +504,7 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -684,14 +682,6 @@
        })
        this.fileList.push(obj)
      }
      this.draftRestore('fileAdd', 'addFile', row.id, 'dialogVisible1')
    },
    // 打开添加附件弹窗
    openAddFileDia() {
      this.dialogVisible1 = true
      this.$nextTick(() => {
        this.draftRestore('fileAdd', 'addFile', this.clickNodeVal.value, 'dialogVisible1')
      })
    },
    handleDeleteClick(row) {
      // 删除逻辑
@@ -722,7 +712,6 @@
        updateDocument(this.addFile).then(res => {
          if (res.code == 200) {
            this.$message.success('更新成功')
            this.draftClear('fileAdd')
            this.dialogVisible1 = false;
            this.getPage()
          }
@@ -732,7 +721,6 @@
        addDocument(this.addFile).then(res => {
          if (res.code == 200) {
            this.$message.success('保存成功')
            this.draftClear('fileAdd')
            this.dialogVisible1 = false;
            this.getPage()
          }
@@ -816,7 +804,6 @@
      this.editData = JSON.parse(JSON.stringify(this.Mdata))
      this.$nextTick(() => {
        this.dialogVisible = true
        this.draftRestore('fileRevision', 'editData', this.clickNodeVal.value, 'dialogVisible')
      })
    },
    // 下次日期 = 最近日期 + 周期(月),自动计算
@@ -888,7 +875,6 @@
      upDeviceParameter(formData).then(res => {
        this.$message.success('修改成功')
        this.upLoad = false
        this.draftClear('fileRevision')
        this.getList(this.clickNodeVal.value)
        this.dialogVisible = false
      }).catch(e => {
@@ -991,7 +977,6 @@
    },
    dialogVisible1(newVal) {
      if (newVal == false) {
        this.draftStop('fileAdd')
        this.isAddFileUpdate = false
        this.addFile = {}
        this.fileList = []
src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -144,12 +144,10 @@
  reviewDeviceInspectionRecord,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  name: "inspection-form",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -188,8 +186,6 @@
      this.getUserList()
      if (this.form.inspectionRecordId) {
        this.searchInfo()
      } else if (this.operationType !== 'check') {
        this.draftRestore('inspectionForm', 'form', this.form.deviceId, 'dialogVisible')
      }
    },
    searchInfo() {
@@ -197,12 +193,8 @@
        inspectionRecordId: this.form.inspectionRecordId
      }).then(res => {
        if (res.code === 200) {
          const id = this.form.inspectionRecordId
          this.form = { ...res.data }
          this.details = this.form.details || []
          if (this.operationType !== 'check') {
            this.draftRestore('inspectionForm', 'form', id, 'dialogVisible')
          }
        }
      }).catch(error => {
        console.error(error)
@@ -219,7 +211,6 @@
        addDeviceInspectionRecord(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('inspectionForm')
            this.resetForm()
          }
          this.submitFormLoading = false
@@ -230,7 +221,6 @@
        updateDeviceInspectionRecord(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('inspectionForm')
            this.resetForm()
          }
          this.submitFormLoading = false
@@ -255,7 +245,6 @@
      })
    },
    resetForm() {
      this.draftStop('inspectionForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },
src/views/CNAS/resourceDemand/device/component/management.vue
@@ -27,7 +27,7 @@
        </el-form>
      </div>
      <div>
        <el-button size="small" type="primary" @click="openAdd2">新增</el-button>
        <el-button size="small" type="primary" @click="dialogVisible2 = true">新增</el-button>
        <el-button size="small" type="primary" @click="handleDownOne">导出</el-button>
      </div>
    </div>
@@ -426,7 +426,6 @@
import { selectUserCondition } from "@/api/business/inspectionTask";
import dayjs from 'dayjs'
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
import draftSave from '@/mixins/draftSave'
export default {
    props: {
        clickNodeVal: {
@@ -440,7 +439,6 @@
        limsTable,
        dataAcquisitionConfig,
    },
    mixins: [draftSave],
    data() {
        return {
            dateFormat: 'yyyy-MM-dd',
@@ -770,14 +768,7 @@
                })
            })
        },
        openAdd2() {
            this.dialogVisible2 = true
            this.$nextTick(() => {
                this.draftRestore('managementAdd', 'formData2', '', 'dialogVisible2')
            })
        },
        handleClose() {
            this.draftStop('management')
            this.formData = {
                authorizedPerson: []
            }
@@ -790,7 +781,6 @@
            this.upLoad = false;
        },
        handleClose2() {
            this.draftStop('managementAdd')
            this.formData = {
                authorizedPerson: []
            }
@@ -834,7 +824,6 @@
                    this.formData[key] = `${this.formData[key]} 00:00:00`
                }
            })
            this.draftRestore('management', 'formData', this.formData.id, 'dialogVisible')
        },
        beforeUpload(file) {
            if (file.size > 1024 * 1024 * 10) {
@@ -929,7 +918,6 @@
                this.$message.success('修改成功')
                this.upLoad = false
                this.refreshTable('page')
                this.draftClear('management')
                this.dialogVisible = false
            }).catch(e => {
                this.$message.error('修改失败')
@@ -973,7 +961,6 @@
                this.$message.success('提交成功')
                this.upLoad2 = false
                this.refreshTable('page')
                this.draftClear('managementAdd')
                this.dialogVisible2 = false
                this.formData2 = {
                    imageUpload: '',
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -3,7 +3,7 @@
  <div>
    <div style="margin: 10px 0;text-align: right">
      <el-button size="small" type="primary" @click="getList">刷新</el-button>
      <el-button size="small" type="primary" @click="openInstructionDia">受控申请</el-button>
      <el-button size="small" type="primary" @click="dialogVisible = true">受控申请</el-button>
    </div>
    <el-table :data="tableData" border height="calc(100vh - 18em)"
>
@@ -188,9 +188,7 @@
  pageByPageQueryOfHomeworkInstructions,
  selectDeviceParameter,
} from '@/api/cnas/resourceDemand/device.js'
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -261,8 +259,6 @@
    },
    dialogVisible(newVal) {
      if (newVal === false) {
        this.draftStop('instructionForm')
        this.draftStop('instructionRows')
        this.instructionForm = {}
        this.documentTableData = []
        this.fileList1 = []
@@ -341,17 +337,7 @@
          this.documentTableData.forEach((v, k) => {
            v.index = k
          })
          this.draftRestore('instructionForm', 'instructionForm', row.instructionId, 'dialogVisible')
          this.draftRestore('instructionRows', 'documentTableData', row.instructionId, 'dialogVisible')
        }
      })
    },
    // 打开受控申请弹窗(新增)
    openInstructionDia() {
      this.dialogVisible = true
      this.$nextTick(() => {
        this.draftRestore('instructionForm', 'instructionForm', '', 'dialogVisible')
        this.draftRestore('instructionRows', 'documentTableData', '', 'dialogVisible')
      })
    },
    handleSizeChange(val) {
@@ -369,8 +355,6 @@
          newHomeworkGuidebookAdded(this.instructionForm).then(res => {
            if (res.code == 200) {
              this.$message.success('操作成功!')
              this.draftClear('instructionForm')
              this.draftClear('instructionRows')
              this.dialogVisible = false
              this.getList()
            }
@@ -412,7 +396,6 @@
    addFile() {
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.draftClear('instructionRowForm')
          if (this.tableDataIndex !== undefined) {
            this.documentTableData[this.tableDataIndex] = this.form
            this.dialogVisible1 = false;
@@ -435,7 +418,7 @@
      this.form.deviceName = this.clickNodeVal.label
      this.onDeviceNameChange()
      this.fileList = []
      this.draftRestore('instructionRowForm', 'form', '', 'dialogVisible1')
    },
    editFun(row, index) {
      this.form = { ...row }
@@ -446,10 +429,8 @@
        this.fileList.push({ name: this.form.fileName })
      }
      this.dialogVisible1 = true
      this.draftRestore('instructionRowForm', 'form', row.id !== undefined ? row.id : ('row' + index), 'dialogVisible1')
    },
    closeDia() {
      this.draftStop('instructionRowForm')
      this.dialogVisible1 = false
      this.$refs['form'].resetFields()
      this.fileList = []
src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
@@ -174,12 +174,10 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  name: "quantity-value-traceability-plan",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -286,21 +284,11 @@
          if (res.code === 200) {
            this.form = res.data
            this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails
            this.restoreTraceabilityDraft()
          }
        }).catch(error => {
          console.error(error)
          this.yearTableLoading = false
        })
      } else {
        this.restoreTraceabilityDraft()
      }
    },
    restoreTraceabilityDraft() {
      if (this.operationType === 'add' || this.operationType === 'edit') {
        const rid = this.operationType === 'edit' ? this.traceabilityManagementId : ''
        this.draftRestore('traceabilityForm', 'form', rid, 'applicationForm')
        this.draftRestore('traceabilityRows', 'deviceTraceabilityManagementDetails', rid, 'applicationForm')
      }
    },
    // 添加设备
@@ -361,8 +349,6 @@
        addTraceabilityManagement(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('traceabilityForm')
            this.draftClear('traceabilityRows')
            this.applicationForm = false
            this.getYearTableDetailData()
          }
@@ -374,8 +360,6 @@
        updateTraceabilityManagement(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('修改成功')
            this.draftClear('traceabilityForm')
            this.draftClear('traceabilityRows')
            this.applicationForm = false
            this.getYearTableDetailData()
          }
src/views/CNAS/resourceDemand/device/component/record.vue
@@ -157,9 +157,7 @@
  deleteDeviceRecord,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -290,7 +288,6 @@
        this.form.managementNumber = res.data.managementNumber
        this.$nextTick(() => {
          this.$refs['form'].clearValidate()
          this.draftRestore('record', 'form', '', 'dialogVisible')
        })
      });
    },
@@ -312,7 +309,6 @@
              if (res.code == 200) {
                this.$message.success('新增成功')
                this.getTableList(this.clickNodeVal.value)
                this.draftClear('record')
                this.dialogVisible = false
              }
            })
@@ -322,7 +318,6 @@
              if (res.code == 200) {
                this.$message.success('修改成功')
                this.getTableList(this.clickNodeVal.value)
                this.draftClear('record')
                this.dialogVisible = false
              }
            })
@@ -348,9 +343,6 @@
      list.push(row.useStartDate)
      list.push(row.useEndDate)
      this.form['useDateList'] = list
      if (type === 'edit') {
        this.draftRestore('record', 'form', this.form.id, 'dialogVisible')
      }
    },
    handleDeleteClick(index, row) {
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
@@ -387,7 +379,6 @@
    },
    dialogVisible(newVal) {
      if (newVal === false) {
        this.draftStop('record')
        this.form = {
          // deviceId:'',
          sampleCode: '',
src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
@@ -120,9 +120,7 @@
</template>
<script>
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -383,7 +381,6 @@
      this.addReservation.reservationTime = this.yuyuetime + " " + this.yuyue.time;
      this.addReservation.specificTime = this.yuyue.time;
      this.addReservation.deviceNumber = 'TX-ABC-01'+Math.floor(Math.random() * 10 + 1);
      this.draftRestore('reservation', 'addReservation', this.yuyue.id + '_' + this.yuyuetime, 'addVisiable')
    },
    handleSelectionChange(selected) {
      this.selectedRow = selected.length > 0 ? selected : null;
@@ -424,7 +421,6 @@
          this.$axios.post(this.$api.deviceReservate.save, this.addReservation).then(res => {
            if (res.code == 200) {
              this.$message.success('保存成功')
              this.draftClear('reservation')
              this.addVisiable = false
              this.getList();
              this.query();
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
@@ -78,12 +78,10 @@
  addDeviceScrapped,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import draftSave from '@/mixins/draftSave'
export default {
  name: "scrapApplicationForm",
  // import 引入的组件需要注入到对象中才能使用
  components: {},
  mixins: [draftSave],
  data() {
    // 这里存放数据
    return {
@@ -125,8 +123,6 @@
      this.getUserList()
      if (this.form.scrappedId) {
        this.searchInfo()
      } else {
        this.draftRestore('scrapApplicationForm', 'form', this.form.deviceId, 'dialogVisible')
      }
    },
    // 查询详情
@@ -135,9 +131,7 @@
        scrappedId: this.form.scrappedId
      }).then(res => {
        if (res.code === 200) {
          const id = this.form.scrappedId
          this.form = { ...res.data }
          this.draftRestore('scrapApplicationForm', 'form', id, 'dialogVisible')
          if (this.form.isFinish === 0) {
            if (this.form.departmentHeadUserId) {
              this.currentStep = 1
@@ -171,7 +165,6 @@
          addDeviceScrapped(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('新增成功')
              this.draftClear('scrapApplicationForm')
              this.resetForm()
            }
            this.submitFormLoading = false
@@ -183,7 +176,6 @@
    },
    // 关闭弹框
    resetForm() {
      this.draftStop('scrapApplicationForm')
      this.dialogVisible = false
      this.$emit('closeDialog')
    },
src/views/CNAS/resourceDemand/device/component/state.vue
@@ -242,9 +242,7 @@
import { selectUserCondition } from "@/api/business/inspectionTask";
import { dateFormat } from '@/utils/date'
import { mapGetters } from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -367,7 +365,6 @@
            if (res.code == 200) {
              this.$message.success('提交成功')
              this.getDeviceStatePage(this.clickNodeVal.value)
              this.draftClear('deviceState')
              this.dialogVisible = false
              this.closeLoading()
            }
@@ -396,9 +393,6 @@
        this.form.managementNumber = res.data.managementNumber
        this.$nextTick(() => {
          this.$refs['form'].clearValidate()
          if (!this.form.stateId) {
            this.draftRestore('deviceState', 'form', '', 'dialogVisible')
          }
        })
      });
      // 获取负责人信息
@@ -420,9 +414,6 @@
      this.currentStepClick = this.currentStep === 4 ? 0 : this.currentStep
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
        if (this.currentStep === 0) {
          this.draftRestore('deviceState', 'form', this.form.stateId, 'dialogVisible')
        }
      })
      this.dialogVisible = true
    },
@@ -498,7 +489,6 @@
    },
    dialogVisible(newVal) {
      if (!newVal) {
        this.draftStop('deviceState')
        this.form = {
        }
        this.closeLoading()
src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
@@ -122,13 +122,11 @@
} from "@/api/cnas/resourceDemand/device";
import {selectUserCondition} from "@/api/system/user";
import {mapGetters} from "@/utils/store-compat";
import draftSave from '@/mixins/draftSave'
export default {
  name: '',
  // import 引入的组件需要注入到对象中才能使用
  components: {limsTable},
  mixins: [draftSave],
  props: {
    clickNodeVal: {
      type: Object,
@@ -325,23 +323,13 @@
            this.deviceImpowerDetails.forEach(item => {
              item['delegatedUserArr'] = item.delegatedUser.split(',')
            })
            this.restoreImpowerDraft()
          }
        }).catch(error => {
          console.error(error)
        })
      } else {
        this.restoreImpowerDraft()
      }
      this.getEquipOptions()
      this.getUserList()
    },
    restoreImpowerDraft() {
      if (this.operationType === 'add' || this.operationType === 'edit') {
        const rid = this.operationType === 'edit' ? this.impowerId : ''
        this.draftRestore('usageAuthorizationForm', 'form', rid, 'usageTableDia')
        this.draftRestore('usageAuthorizationRows', 'deviceImpowerDetails', rid, 'usageTableDia')
      }
    },
    closeDialog () {
      this.usageTableDia = false
@@ -368,8 +356,6 @@
        addImpower(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('新增成功')
            this.draftClear('usageAuthorizationForm')
            this.draftClear('usageAuthorizationRows')
            this.usageTableDia = false
            this.refreshTableList()
          }
@@ -381,8 +367,6 @@
        updateImpower(this.form).then(res => {
          if (res.code == 200) {
            this.$message.success('修改成功')
            this.draftClear('usageAuthorizationForm')
            this.draftClear('usageAuthorizationRows')
            this.usageTableDia = false
            this.refreshTableList()
          }