| | |
| | | allPersonList: [], |
| | | allRoomList: [], |
| | | phaList: [], |
| | | details: {}, |
| | | systemPersonList: [], |
| | | experimentTypeList: [ |
| | | {id: 1, name: '化学类'}, |
| | |
| | | {id: 4, name: '机电类'}, |
| | | {id: 5, name: '特种设备类'}, |
| | | {id: 6, name: '其它类'} |
| | | ], |
| | | stuffTypeList: [ |
| | | {id: 1, name: '化学试剂'}, |
| | | {id:2, name: '基础材料'} |
| | | ], |
| | | stuffStorageList: [ |
| | | {id:1, name: '智能试剂柜'}, |
| | | {id:2, name: '普通储存柜'}, |
| | | ], |
| | | stuffUnitList: [ |
| | | {id:1, name: 'g'}, |
| | | {id:2, name: 'kg'}, |
| | | {id:3, name: 'ml'}, |
| | | {id:4, name: 'l'}, |
| | | ], |
| | | classifyList:[ |
| | | {id:1, name: '有机'}, |
| | | {id:2, name: '酸'}, |
| | | {id:3, name: '碱性'}, |
| | | {id:4, name: '固体废弃物'}, |
| | | {id:5, name: '医疗废弃物'}, |
| | | {id:6, name: '过期化学品'}, |
| | | {id:7, name: '其他'} |
| | | ], |
| | | wasteStorageList: [ |
| | | {id:1, name: '吨袋'}, |
| | | {id:2, name: '吨桶'}, |
| | | {id:3, name: '小桶'}, |
| | | {id:4, name: '托盘'}, |
| | | {id:5, name: '其他'}, |
| | | ], |
| | | riskSourceTypeList: [ |
| | | {id: 1, name: '化学安全'}, |
| | |
| | | |
| | | const showReportDialog = (title: string, value: ProjectType, allRoomList: RoomType []) => { |
| | | getReportData(value.id) |
| | | reportDialogState.details = value |
| | | reportDialogState.reportDialogVisible = true; |
| | | reportDialogState.allRoomList = allRoomList |
| | | setTimeout(() => { |
| | |
| | | }; |
| | | |
| | | const templatePath = '/static/exampleScience.docx' |
| | | |
| | | const startGeneration = async () => { |
| | | const data = JSON.parse(JSON.stringify(reportDialogState.reportForm)) |
| | | let data = JSON.parse(JSON.stringify(reportDialogState.reportForm)) |
| | | const experimentTypeNameList = data.experimentAndType.map(item => { |
| | | return { |
| | | id: item.type.id, |
| | |
| | | } |
| | | }) |
| | | data.riskLevel = levelExample |
| | | // data.tableData = data.oldRiskAssess ?data.oldRiskAssess: [] |
| | | data.phaData = reportDialogState.phaList.map(item=>{ |
| | | data.tableData = data.oldRiskAssess ?data.oldRiskAssess: [] |
| | | data.phaData = reportDialogState.phaList?reportDialogState.phaList.map(item=>{ |
| | | return { |
| | | ...item, |
| | | riskLevelName: item.riskLevel == 1?'低风险':item.riskLevel == 2?'一般风险':item.riskLevel == 3?'较大风险':item.riskLevel == 4?'重大风险':'--' |
| | | } |
| | | }) |
| | | }):[] |
| | | data.siteData = data.experimentSite?data.experimentSite.map(item=>{ |
| | | return { |
| | | ...item, |
| | | hasFireFacilities: item.fireFacilities== 1 ? '有' : item.fireFacilities== 2 ? '无' : '', |
| | | hasPartitionStatus: item.partitionStatus == 1 ? '有' : item.partitionStatus == 2 ? '无' : '' |
| | | } |
| | | }):[] |
| | | data.materialData = reportDialogState.details.stuffList?reportDialogState.details.stuffList.map(item=>{ |
| | | return { |
| | | ...item, |
| | | typeName: reportDialogState.stuffTypeList.find(i=>i.id == item.stuffType)?.name, |
| | | storageName: reportDialogState.stuffStorageList.find(i=>i.id == item.stuffStorage)?.name, |
| | | unitName: reportDialogState.stuffUnitList.find(i=>i.id == item.stuffUnit)?.name |
| | | } |
| | | }):[] |
| | | data.equipData = reportDialogState.details.deviceList?reportDialogState.details.deviceList.map(item=>{ |
| | | return { |
| | | ...item, |
| | | isSpecial: item.specialDevice == 1 ? '是' : item.specialDevice == 2 ? '否' : '' |
| | | } |
| | | }):[] |
| | | data.dangerData = reportDialogState.details.hazardousWasteList?reportDialogState.details.hazardousWasteList.map((item,index)=>{ |
| | | return { |
| | | ...item, |
| | | sort: index + 1, |
| | | classifyName: reportDialogState.classifyList.find(i=>i.id == item.classify)?.name, |
| | | wasteStorageName: reportDialogState.wasteStorageList.find(i=>i.id == item.wasteStorage)?.name |
| | | } |
| | | }):[] |
| | | data.peopleData = reportDialogState.details.persons?reportDialogState.details.persons.map((item,index)=>{ |
| | | return { |
| | | ...item, |
| | | sex: item.personGender == 1 ? '男' : item.personGender == 2 ? '女' : '' |
| | | } |
| | | }):[] |
| | | data.emergyData = reportDialogState.details.emergencyList?reportDialogState.details.emergencyList:[] |
| | | const {experimentStep,experimentMethod,process,keyProcess,measure,timeout,timeoutManager,closed,unclosedManager,explosionProof,fireProof,poisonProof} = reportDialogState.details |
| | | data = {...data,experimentStep,experimentMethod,process,keyProcess,measure,timeout:timeout == 1?'存在':timeout == 2?'不存在':'',timeoutManager,closed:closed == 1?'存在':closed == 2?'不存在':'',unclosedManager,explosionProof,fireProof,poisonProof} |
| | | |
| | | data.riskSource = data.riskSource ? data.riskSource.map(item => { |
| | | return { |
| | | ...item, |
| | |
| | | }) : [] |
| | | |
| | | data.safeRiskAnalysis = data.safeRiskAnalysis ?data.safeRiskAnalysis : '' |
| | | |
| | | console.log(data,'data') |
| | | |
| | | try { |
| | | generateWordDocument(templatePath, data, `材料科学姑苏实验室安全风险评估表---${data.experimentName}.docx`); |
| | |
| | | allPersonList: Array<AllPersonListType> |
| | | systemPersonList: Array<AllPersonListType> |
| | | phaList: [] |
| | | details: {} |
| | | stuffTypeList: Array<Type> |
| | | stuffUnitList: Array<Type> |
| | | stuffStorageList: Array<Type> |
| | | classifyList: Array<Type> |
| | | wasteStorageList: Array<Type> |
| | | allRoomList: Array<RoomType>, |
| | | experimentTypeList: Array<Type> |
| | | riskSourceTypeList: Array<Type> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="experimentType" label="实验类别"> |
| | | <template #default="scope"> |
| | | <span>{{developState.experimentTypeList.find(i=>i.id == scope.row.experimentType)?.name}}</span> |
| | | <span>{{scope.row.typeList.map(i=>i.typeName).join('、')}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="评估申请"> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="最近评估时间" show-overflow-tooltip> |
| | | <el-table-column label="最近评估时间" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.experimentAssessLogs?scope.row.experimentAssessLogs.map(i=>i.assessEndTime.substring(0,16)).join(','): ''}}</span> |
| | | </template> |