| | |
| | | <template> |
| | | <a-modal |
| | | :title="title" |
| | | :width="1250" |
| | | :width="1500" |
| | | :visible="visible" |
| | | :maskClosable="false" |
| | | @ok="handleOk" |
| | |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input-search |
| | | <a-input-search |
| | | :disabled="disableSubmit" |
| | | placeholder="请选择设备" |
| | | enter-button |
| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12" hidden > |
| | | <a-col |
| | | :span="12" |
| | | hidden |
| | | > |
| | | <!-- v-if="false" --> |
| | | <a-form-item |
| | | label="设备名称Id" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | <a-input |
| | | :disabled="disableSubmit" |
| | | placeholder="请选择设备名称Id" |
| | | enter-button |
| | |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :placeholder="disableSubmit?'':'请选择对象部门'" |
| | | :triggerChange="true" |
| | | :disabled = "true" |
| | | :disabled="true" |
| | | dictCode="sys_depart,depart_name,id" |
| | | v-decorator="['departId', validatorRules.departId]" |
| | | /> |
| | |
| | | v-if="col.dataIndex == 'location'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入位置" |
| | | placeholder="请输入保养部位" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="true" |
| | | /> |
| | | <j-image-upload |
| | | :value="text" |
| | |
| | | slot="photo" |
| | | slot-scope="text,record" |
| | | > --> |
| | | <!-- <Tooltip |
| | | <!-- <Tooltip |
| | | placement="top" |
| | | title="预览图片" |
| | | > |
| | |
| | | width: 140, |
| | | }, |
| | | { |
| | | title: '部位', |
| | | title: '保养部位', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | scopedSlots: { customRender: 'location' }, |
| | |
| | | ] |
| | | }, |
| | | version: { |
| | | rules: [ |
| | | rules: [ |
| | | { required: true, message: '请输入版本!' }, |
| | | ] |
| | | }, |
| | |
| | | getMaintenanceMode: "/eam/maintenanceStandardDetail/getMaintenanceMode", |
| | | realDelete: "/eam/maintenanceStandardDetail/realDelete", |
| | | revise: '/eam/maintenanceStandard/revise', |
| | | getReviseVersion:"/eam/maintenanceStandard/getReviseVersion" |
| | | getReviseVersion: "/eam/maintenanceStandard/getReviseVersion" |
| | | }, |
| | | |
| | | dataSource: [], |
| | |
| | | maintenanceProjectId: data[i].id, |
| | | name: data[i].name, |
| | | standard: data[i].standard, |
| | | location: data[i].location, |
| | | maintenanceMethodName: data[i].maintenanceMethod_dictText, |
| | | maintenanceTool: data[i].maintenanceTool, |
| | | maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText, |
| | |
| | | that.dataSource = temp; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model,'version', 'num', 'departId', 'teamId', 'equipmentId','equipmentName','remark')); |
| | | that.form.setFieldsValue(pick(that.model, 'version', 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | that.codeDisable = true; |
| | |
| | | that.confirmLoading = false; |
| | | return |
| | | } |
| | | for(var i = 0;i<that.dataSource.length;i++){ |
| | | if(that.dataSource[i].maintenanceRequire==null||that.dataSource[i].maintenanceRequire==undefined||that.dataSource[i].maintenanceRequire==''){ |
| | | this.$message.error("第"+(i+1)+"行安全要求为空,请填写") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if(that.dataSource[i].photo==null||that.dataSource[i].photo==undefined||that.dataSource[i].photo==''){ |
| | | this.$message.error("第"+(i+1)+"行示意图为空,请上传") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if(that.dataSource[i].location==null||that.dataSource[i].location==undefined||that.dataSource[i].location==''){ |
| | | this.$message.error("第"+(i+1)+"行部位为空,请填写") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if(that.dataSource[i].maintenanceCycleId==null||that.dataSource[i].maintenanceCycleId==undefined){ |
| | | this.$message.error("第"+(i+1)+"行周期为空,请选择") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if(that.dataSource[i].maintenanceMode==null||that.dataSource[i].maintenanceMode==undefined||that.dataSource[i].maintenanceMode==''){ |
| | | this.$message.error("第"+(i+1)+"行维保方式为空,请选择") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | for (var i = 0; i < that.dataSource.length; i++) { |
| | | if (that.dataSource[i].maintenanceRequire == null || that.dataSource[i].maintenanceRequire == undefined || that.dataSource[i].maintenanceRequire == '') { |
| | | this.$message.error("第" + (i + 1) + "行安全要求为空,请填写") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if (that.dataSource[i].photo == null || that.dataSource[i].photo == undefined || that.dataSource[i].photo == '') { |
| | | this.$message.error("第" + (i + 1) + "行示意图为空,请上传") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if (that.dataSource[i].location == null || that.dataSource[i].location == undefined || that.dataSource[i].location == '') { |
| | | this.$message.error("第" + (i + 1) + "行部位为空,请填写") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if (that.dataSource[i].maintenanceCycleId == null || that.dataSource[i].maintenanceCycleId == undefined) { |
| | | this.$message.error("第" + (i + 1) + "行周期为空,请选择") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | if (that.dataSource[i].maintenanceMode == null || that.dataSource[i].maintenanceMode == undefined || that.dataSource[i].maintenanceMode == '') { |
| | | this.$message.error("第" + (i + 1) + "行维保方式为空,请选择") |
| | | that.confirmLoading = false |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | formData.maintenanceStandardDetaillist = that.dataSource; |
| | | formData.type = 'specialty'; |
| | |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | console.log(record.id) |
| | | this.form.setFieldsValue({ departId:record.useId,equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); |
| | | this.form.setFieldsValue({ departId: record.useId, equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model }); |
| | | }, |
| | | |
| | | |