| | |
| | | add: "/eam/maintenanceStandard/add", |
| | | edit: "/eam/maintenanceStandard/edit", |
| | | addDetail: "/eam/maintenanceStandardDetail/add", |
| | | getMaintenanceCycle: "/eam/maintenanceStandardDetail/getMaintenanceCycle", |
| | | getMaintenanceCycle: "/eam/maintenanceStandardDetail/getPeriodicMaintenanceCycle", |
| | | realDelete: "/eam/maintenanceStandardDetail/realDelete", |
| | | revise: '/eam/maintenanceStandard/revise', |
| | | getReviseVersion: "/eam/maintenanceStandard/getReviseVersion", |
| | |
| | | edit(record) { |
| | | let that = this; |
| | | this.initOptions(); |
| | | this.getMaintenanceCycle() |
| | | // this.getMaintenanceCycle() |
| | | this.dataSource = []; |
| | | this.form.resetFields(); |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | if (record.maintenanceStandardDetaillist != undefined) { |
| | | const temp = [...record.maintenanceStandardDetaillist]; |
| | | // for (let i = 0; i < temp.length; i++) { |
| | | // let r = temp[i].upload; |
| | | // r.src = this.getSrc(temp[i].upload); |
| | | // } |
| | | that.dataSource = temp; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | this.maintenanceCycles = [] |
| | | this.getMaintenanceCycle(this.model.equipmentId) |
| | | this.codeDisable = true; |
| | | that.$nextTick(() => { |
| | | if (that.isRevise) { |
| | |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.getMaintenanceCycle(record.id) |
| | | this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model, teamId: record.teamId, teamName: record.teamId_dictText }); |
| | | |
| | | }, |
| | | |
| | | onDepartList() { |
| | |
| | | }) |
| | | }, |
| | | |
| | | getMaintenanceCycle() { |
| | | getAction(this.url.getMaintenanceCycle).then((res) => { |
| | | getMaintenanceCycle(equipmentId) { |
| | | debugger |
| | | getAction(this.url.getMaintenanceCycle, { equipmentId: equipmentId }).then((res) => { |
| | | if (res.success) { |
| | | this.maintenanceCycles = res.result |
| | | } |