| | |
| | | visible: false, |
| | | model: {}, |
| | | editable: false, |
| | | upgradeFlag: false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 }, |
| | |
| | | add: "/eam/maintenanceStandard/add", |
| | | edit: "/eam/maintenanceStandard/edit", |
| | | detail: "/eam/eamMaintenanceStandardDetail/queryList", |
| | | upgrade: '/eam/maintenanceStandard/upgrade', |
| | | }, |
| | | detail: { |
| | | loading: false, |
| | |
| | | title: '序号', |
| | | key: 'itemCode', |
| | | type: JVXETypes.inputNumber, |
| | | width: '10%', |
| | | align:"center", |
| | | width: 100, |
| | | validateRules: [ |
| | | {required : true, unique: true, message: '序号不能重复'} |
| | | ] |
| | | }, |
| | | { |
| | | title: '部位', |
| | | key: 'itemPart', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '保养项', |
| | | key: 'itemName', |
| | | type: JVXETypes.textarea, |
| | | width: '20%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, message: '保养项不能为空!'} |
| | | ] |
| | | }, |
| | | { |
| | | title: '子保养项', |
| | | key: 'subItemName', |
| | | title: '保养要求', |
| | | key: 'itemDemandAlias', |
| | | type: JVXETypes.textarea, |
| | | width: '25%', |
| | | align:"center", |
| | | }, |
| | | { |
| | | title: '保养要求', |
| | | title: '检查标准或要求', |
| | | key: 'itemDemand', |
| | | type: JVXETypes.textarea, |
| | | width: '30%', |
| | | align:"center", |
| | | validateRules: [ |
| | | {required : true, message: "保养要求不能为空!"} |
| | | ] |
| | | }, |
| | | { |
| | | title: '检查方法', |
| | | key: 'checkMethod', |
| | | type: JVXETypes.textarea, |
| | | align:"center", |
| | | }, |
| | | ], |
| | | toolbarConfig: { |
| | |
| | | this.model = {}; |
| | | this.visible = true; |
| | | this.editable = false; |
| | | this.upgradeFlag = false; |
| | | this.detail.dataSource = []; |
| | | }, |
| | | edit (record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.editable = true; |
| | | this.upgradeFlag = false; |
| | | this.detail.dataSource = []; |
| | | if(record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile); |
| | | this.model.fileList = [obj]; |
| | | }else { |
| | | this.model.fieldList = []; |
| | | } |
| | | this.loadDetail(record.id); |
| | | }, |
| | | upgrade(record) { |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.editable = true; |
| | | this.upgradeFlag = true; |
| | | this.detail.dataSource = []; |
| | | if(record && record.referenceFile) { |
| | | let obj = JSON.parse(record.referenceFile); |
| | | this.model.fileList = [obj]; |
| | |
| | | httpurl+=this.url.add; |
| | | method = 'post'; |
| | | }else{ |
| | | httpurl+=this.url.edit; |
| | | method = 'put'; |
| | | if(this.upgradeFlag) { |
| | | httpurl+=this.url.upgrade; |
| | | }else { |
| | | httpurl+=this.url.edit; |
| | | } |
| | | method = 'put'; |
| | | } |
| | | httpAction(httpurl,this.model,method).then((res)=>{ |
| | | if(res.success){ |