| | |
| | | > |
| | | <a-input |
| | | allowClear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入方案编码'" |
| | | :placeholder="自动生成" |
| | | :disabled="true" |
| | | v-decorator="[ 'num', validatorRules.num]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | import { preview } from 'vue-photo-preview' |
| | | import PdfView from '@views/common/PdfView' |
| | | import EquipmentList from '@/views/eam/common/EquipmentList' |
| | | import { getAction } from '../../../../api/manage' |
| | | |
| | | export default { |
| | | name: 'MaintenanceStandardModal', |
| | |
| | | add: '/eam/predictiveworkplan/add', |
| | | edit: '/eam/predictiveworkplan/edit', |
| | | revise: '/eam/predictiveworkplan/revise', |
| | | getReviseVersion: '/eam/predictiveworkplan/getReviseVersion' |
| | | getReviseVersion: '/eam/predictiveworkplan/getReviseVersion', |
| | | getNum:'/eam/sysIdentity/getNumNew' |
| | | }, |
| | | |
| | | dataSource: [], |
| | |
| | | methods: { |
| | | |
| | | add() { |
| | | this.edit() |
| | | let that = this; |
| | | let param = { |
| | | type: 'PredictiveWorkPlan', |
| | | length: 4 |
| | | }; |
| | | getAction(this.url.getNum,param).then(res=>{ |
| | | if(res.success){ |
| | | that.model.num = res.result; |
| | | that.edit(that.model); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | edit(record) { |
| | | let that = this |
| | | this.dataSource = [] |
| | |
| | | that.model.equipmentId = record.equipmentId |
| | | that.model.teamId = record.teamId |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'name', 'monitorType', 'maintenanceMethod', 'assignMode', 'teamName', 'planVersion')) |
| | | that.form.setFieldsValue({ |
| | | equipmentName: record.deviceNum + '/' + record.deviceName + '/' + record.deviceModel, |
| | | historyVersion: record.planVersion |
| | | }) |
| | | if(that.model.id){ |
| | | that.form.setFieldsValue({ |
| | | equipmentName: record.deviceNum + '/' + record.deviceName + '/' + record.deviceModel, |
| | | historyVersion: record.planVersion |
| | | }) |
| | | } |
| | | }) |
| | | if (record.id) { |
| | | this.codeDisable = true |