| | |
| | | import { workApplyApi } from '/@/api/specialWorkSystem/workApply'; |
| | | import axios from 'axios'; |
| | | |
| | | |
| | | interface stateType { |
| | | equipmentDialog: boolean, |
| | | form: Object, |
| | |
| | | form: { |
| | | operatorUids: [], |
| | | workType: 4, |
| | | workLevel: null, |
| | | workLevel: 0, |
| | | workContent: '', |
| | | workLocation: '', |
| | | hazardIdentification: '', |
| | | maId: null, |
| | | maBaseId: null, |
| | | workDetail:{ |
| | | operationDepId: null, |
| | | gbScope: '', |
| | |
| | | gbPath: [], |
| | | otherSpecialWork: [] |
| | | }, |
| | | wmAddReqDTOList: [], |
| | | receiveUids: [], |
| | | workTimeLine: [], |
| | | expStartTime: '', |
| | | expEndTime: '' |
| | |
| | | // } |
| | | |
| | | const openMaList = ()=>{ |
| | | material.value.equipmentDialog = true |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | } |
| | | const conFirmMaterials = (addList: Array<any>,chosenId: number) =>{ |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | if(addList.length > 0){ |
| | | for(let i in addList){ |
| | | if(addList[i].depId != null && addList[i].useCount != null){ |
| | | state.form.wmAddReqDTOList.push(addList[i]) |
| | | } |
| | | if(state.form.operatorUids == []){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '请先选择作业人再获取相应物资配置' |
| | | }); |
| | | }else{ |
| | | if(material.value.receiveUids.length==0){ |
| | | material.value.receiveUids = state.form.operatorUids |
| | | } |
| | | material.value.getMaList(state.form.workType,state.form.workLevel) |
| | | material.value.workerList = props.workerList |
| | | } |
| | | // state.form.wmAddReqDTOList = addList |
| | | state.form.maId = chosenId |
| | | } |
| | | const conFirmMaterials = (receiveUids: Array<number>,chosenId: number) =>{ |
| | | state.form.maBaseId = null |
| | | state.form.receiveUids = [] |
| | | state.form.receiveUids = receiveUids |
| | | state.form.maBaseId = chosenId |
| | | } |
| | | |
| | | const submitForm = async (formEl: FormInstance | undefined) => { |
| | |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | state.form.maId = null |
| | | state.form.wmAddReqDTOList = [] |
| | | material.value.maBaseId = null |
| | | material.value.receiveUids = [] |
| | | } else { |
| | | console.log('error submit!', fields) |
| | | } |