| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getDeviceBreakdownMaintenance, |
| | | addDeviceBreakdownMaintenance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | export default { |
| | | name: "failure-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | this.$axios.get(this.$api.deviceBreakdownMaintenance.getDeviceBreakdownMaintenance + '?maintenanceId=' + this.form.maintenanceId).then(res => { |
| | | getDeviceBreakdownMaintenance({ |
| | | maintenanceId: this.form.maintenanceId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.form = { ...res.data } |
| | | if (this.form.isFinish === 0) { |
| | |
| | | this.form.flowType = this.currentStep |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | this.$axios.post(this.$api.deviceBreakdownMaintenance.addDeviceBreakdownMaintenance, |
| | | this.form, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | }, |
| | | noQs: true |
| | | }).then(res => { |
| | | addDeviceBreakdownMaintenance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.resetForm() |
| | |
| | | this.$emit('closeDialog') |
| | | }, |
| | | getUserList() { |
| | | this.$axios.post(this.$api.user.selectUserList, { |
| | | page: { current: -1, size: -1, }, |
| | | entity: { name: null } |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.userList = res.data.records |
| | | this.userList = res.data |
| | | }) |
| | | }, |
| | | }, |