| | |
| | | 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 { |
| | |
| | | this.getUserList() |
| | | if (this.form.maintenanceId) { |
| | | this.searchInfo() |
| | | } else { |
| | | this.draftRestore('failureForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 查询详情 |
| | |
| | | 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 |
| | |
| | | addDeviceBreakdownMaintenance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('failureForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('failureForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |