| | |
| | | haveMainHazard: null, |
| | | checkBeginDate: "", |
| | | checkEndDate: "", |
| | | scratchpad: 2 |
| | | }, |
| | | originDeptList: [], |
| | | dataList: [], |
| | |
| | | rules: [{ required: true, message: "请选择复查时间", trigger: "blur" }], |
| | | }, |
| | | { |
| | | label: '检查图片', |
| | | prop: 'checkPics', |
| | | type: 'upload', |
| | | uploadType: 'img', |
| | | label: "检查图片", |
| | | prop: "checkPics", |
| | | type: "upload", |
| | | uploadType: "img", |
| | | limit: 3, |
| | | maxSize: 5, |
| | | accept: 'image/*', |
| | | tip: '支持上传图片格式,尺寸小于5M,最多可上传3份' |
| | | accept: "image/*", |
| | | tip: "支持上传图片格式,尺寸小于5M,最多可上传3份", |
| | | }, |
| | | { |
| | | label: "备注", |
| | |
| | | }; |
| | | |
| | | const openDialog = async(type, value) => { |
| | | let initalData = {} |
| | | if(type == 'add'){ |
| | | const res = await getDailySafetyInspectList({ |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | researchGroup: null, |
| | | checkUser: "", |
| | | checkType: null, |
| | | haveMainHazard: null, |
| | | checkBeginDate: "", |
| | | checkEndDate: "", |
| | | scratchpad: 1 |
| | | }) |
| | | if (res.code == 200) { |
| | | initalData = JSON.parse(JSON.stringify(res.rows[0])) || {} |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | | }else{ |
| | | initalData = JSON.parse(JSON.stringify(value)); |
| | | } |
| | | const initalData = JSON.parse(JSON.stringify(value)); |
| | | if ( |
| | | initalData.dailySafetyInspectionDepts && |
| | | Array.isArray(initalData.dailySafetyInspectionDepts) |
| | |
| | | |
| | | const handleSave = async (data) => { |
| | | const params = JSON.parse(JSON.stringify(data)); |
| | | if ( |
| | | params.dailySafetyInspectionDepts && |
| | | Array.isArray(params.dailySafetyInspectionDepts) |
| | | ) { |
| | | params.dailySafetyInspectionDepts = params.dailySafetyInspectionDepts.map( |
| | | (i) => { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | ); |
| | | } |
| | | |
| | | const res = await saveTemDailySafetyInspect(params); |
| | | if (res.code == 200) { |
| | | ElMessage.success(res.msg); |