| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="isSafetyCheck" label="编制现场安全检查表"> |
| | | <el-radio-group v-model="state.formData.isSafetyCheck" size="large"> |
| | | <el-radio-group v-model="state.formData.isSafetyCheck" size="large" @change="changeRadio"> |
| | | <el-radio :label="1" size="large">是</el-radio> |
| | | <el-radio :label="0" size="large">否</el-radio> |
| | | </el-radio-group> |
| | |
| | | rules: { |
| | | investigationDate: [{required: true, message: '请选择现场勘验时间', trigger: 'blur'}], |
| | | location: [{required: true, message: '请选择现场勘验位置', trigger: 'blur'}], |
| | | isSafetyCheck: [{required: true, message: '请选择现场勘验位置', trigger: 'blur'}], |
| | | isSafetyCheck: [{required: true, message: '请选择是否编制现场安全检查表', trigger: 'blur'}], |
| | | recordData: [{required: true, message: '请填写现场勘验记录', trigger: 'blur'}], |
| | | assAccessoryFiles: [{required: true, validator: checkSafetyFiles, trigger: 'blur'}], |
| | | // investingationImages: [{required: true, validator: checkInvestFiles, trigger: 'blur'}], |
| | |
| | | const getDetail = async (val) => { |
| | | const res = await getSiteCheckDetail({projectId: val}); |
| | | if(res.code == 200){ |
| | | state.formData = res.data; |
| | | state.beforeDeviceList = res.data.deviceImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.siteCheckList = res.data.investingationImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.companyList = res.data.ccompanyImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.safetyList = res.data.assAccessoryFiles.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | if(res.data){ |
| | | state.formData = res.data; |
| | | state.beforeDeviceList = res.data.deviceImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.siteCheckList = res.data.investingationImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.companyList = res.data.ccompanyImages.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | state.safetyList = res.data.assAccessoryFiles.map(i=>{ |
| | | return { |
| | | name: i.originName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |
| | | moduleType: i.moduleType |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }else { |
| | | ElMessage.warning(res.message) |
| | | } |
| | | } |
| | | const changeRadio = () => { |
| | | if(state.formData.isSafetyCheck == 1){ |
| | | getSafetyFiles() |
| | | } |
| | | } |
| | | |
| | |
| | | if(res.data && res.data.length>0){ |
| | | state.safetyList = res.data.map(i=>{ |
| | | return { |
| | | name: i.fileName, |
| | | name: i.originName, |
| | | url: import.meta.env.VITE_APP_BASE_API + '/' + i.path, |
| | | id: i.id, |
| | | projectId: i.projectId, |