| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="保养类型" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择保养类型'" |
| | | :triggerChange="true" |
| | | dictCode="maintenance_type" |
| | | v-decorator="['maintenanceType', validatorRules.maintenanceType]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="派工方式" |
| | | :labelCol="labelCol" |
| | |
| | | v-decorator="['assignMode', validatorRules.assignMode]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="版本" |
| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col |
| | | v-if="this.isRevise == true" |
| | | :span="12" |
| | |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | |
| | | <a-select |
| | | <!-- <a-select |
| | | v-if="col.dataIndex == 'maintenanceCycleId'" |
| | | :value="text" |
| | | :options="record.maintenanceCycles" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | style="width: 100%" |
| | | :disabled="false" |
| | | /> |
| | | <a-textarea |
| | | /> --> |
| | | <!--<a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'maintenanceRequire'" |
| | | :maxLength="500" |
| | |
| | | placeholder="请输入安全要求" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-textarea |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'location'" |
| | | :maxLength="500" |
| | |
| | | placeholder="请输入保养位置" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="true" |
| | | /> |
| | | /> |
| | | <j-image-upload |
| | | :value="text" |
| | | v-if="col.dataIndex == 'photo'" |
| | |
| | | placeholder="请上传图片" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | > |
| | | </j-image-upload> |
| | | </j-image-upload>--> |
| | | <j-dict-select-tag |
| | | v-if="col.dataIndex == 'maintenanceRole'" |
| | | :value="text" |
| | |
| | | :triggerChange="true" |
| | | dictCode="maintenance_role" |
| | | placeholder="请选择保养角色" |
| | | style="width: 100%" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | style="width: 100%" |
| | | /> |
| | | </div> |
| | | </template> |
| | |
| | | // align: 'center', |
| | | // dataIndex: 'id' |
| | | // }, |
| | | // { |
| | | // title: '保养部位', |
| | | // align: 'center', |
| | | // dataIndex: 'location', |
| | | // // scopedSlots: { customRender: 'location' }, |
| | | // // width: 150, |
| | | // }, |
| | | { |
| | | title: '保养项目', |
| | | title: '保养角色', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceRole', |
| | | scopedSlots: { customRender: 'maintenanceRole' }, |
| | | }, |
| | | { |
| | | title: '保养内容', |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | |
| | | { |
| | | title: '保养标准', |
| | | align: 'center', |
| | | dataIndex: 'standard' |
| | | }, |
| | | // { |
| | | // title: '验收标准', |
| | | // align: 'center', |
| | | // dataIndex: 'standard' |
| | | // }, |
| | | // { |
| | | // title: '方法', |
| | | // align: 'center', |
| | |
| | | // scopedSlots: { customRender: 'photo' }, |
| | | // width: 150, |
| | | // }, |
| | | { |
| | | title: '保养部位', |
| | | align: 'center', |
| | | dataIndex: 'location', |
| | | // scopedSlots: { customRender: 'location' }, |
| | | // width: 150, |
| | | }, |
| | | { |
| | | title: '周期', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceCycleId', |
| | | scopedSlots: { customRender: 'maintenanceCycleId' }, |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: '保养角色', |
| | | align: 'center', |
| | | dataIndex: 'maintenanceRole', |
| | | scopedSlots: { customRender: 'maintenanceRole' }, |
| | | width: 150, |
| | | }, |
| | | |
| | | // { |
| | | // title: '周期', |
| | | // align: 'center', |
| | | // dataIndex: 'maintenanceCycleId', |
| | | // scopedSlots: { customRender: 'maintenanceCycleId' }, |
| | | // width: 150, |
| | | // }, |
| | | |
| | | { |
| | | title: '操作', |
| | | align: 'center', |
| | |
| | | { required: true, message: '请选择设备!' }, |
| | | ] |
| | | }, |
| | | assignMode: { |
| | | maintenanceType: { |
| | | rules: [ |
| | | { required: true, message: '请选择派工方式!' }, |
| | | { required: true, message: '请选择保养类型!' }, |
| | | ] |
| | | }, |
| | | version: { |
| | |
| | | for (let i = 0; i < data.length; i++) { |
| | | let id = this.getUuiD(15); |
| | | this.dataSource.push({ |
| | | id: id, |
| | | id: data[i].id, |
| | | maintenanceProjectId: data[i].id, |
| | | name: data[i].name, |
| | | standard: data[i].standard, |
| | |
| | | maintenanceRequire: data[i].maintenanceRequire, |
| | | workingHourQuota: data[i].workingHourQuota, |
| | | // upload: this.upload, |
| | | maintenanceCycles: this.maintenanceCycles, |
| | | // maintenanceCycles: this.maintenanceCycles, |
| | | }) |
| | | |
| | | // let formData = {}; |
| | |
| | | that.dataSource = temp; |
| | | } |
| | | that.$nextTick(() => { |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'teamName', 'assignMode', 'version', 'remark')); |
| | | that.form.setFieldsValue(pick(that.model, 'num', 'departId', 'teamId', 'equipmentId', 'equipmentName', 'useDepartName', 'useId', 'maintenanceType', 'teamName', 'version', 'remark')); |
| | | }); |
| | | if (record.id) { |
| | | this.maintenanceCycles = [] |
| | | this.getMaintenanceCycle(this.model.equipmentId) |
| | | // this.maintenanceCycles = [] |
| | | // this.getMaintenanceCycle(this.model.equipmentId) |
| | | this.codeDisable = true; |
| | | that.$nextTick(() => { |
| | | if (that.isRevise) { |
| | |
| | | |
| | | onEquipmentList() { |
| | | let data = this.form.getFieldsValue(['departId']); |
| | | if (data.departId == null || data.departId == "") { |
| | | this.$message.warning("请先选择使用部门!"); |
| | | return |
| | | } |
| | | // if (data.departId == null || data.departId == "") { |
| | | // this.$message.warning("请先选择使用部门!"); |
| | | // return |
| | | // } |
| | | this.$refs.EquipmentList.list(data.departId); |
| | | this.$refs.EquipmentList.title = "选择设备信息"; |
| | | }, |
| | | sendEquipmentRecord(data) { |
| | | this.dataSource = []; |
| | | let record = data.record; |
| | | this.getMaintenanceCycle(record.id) |
| | | // this.getMaintenanceCycle(record.id) |
| | | this.form.setFieldsValue({ equipmentId: record.id, equipmentName: record.num + "/" + record.name + "/" + record.model, teamId: record.teamId, teamName: record.teamId_dictText }); |
| | | |
| | | }, |
| | |
| | | } |
| | | formData.maintenanceStandardDetaillist = that.dataSource; |
| | | formData.type = 'daily'; |
| | | formData.maintenanceType = '2'; |
| | | let obj; |
| | | if (!this.model.id) { |
| | | formData.versionStatus = '1' |