| | |
| | | <el-table-column prop="stage" label="评估状态"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.stage == 4?'success':scope.row.stage == 1?'info':''"> |
| | | {{scope.row.stage == 1?'未评估':scope.row.status == 2?'评估中':scope.row.status == 3?'评估完成':scope.row.status == 4?'生成报告':'--'}} |
| | | {{scope.row.stage == 1?'未评估':scope.row.stage == 2?'评估中':scope.row.stage == 3?'评估完成':scope.row.stage == 4?'生成报告':'--'}} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="250" fixed="right"> |
| | | <template #default="scope"> |
| | | <el-button size="small" v-if="scope.row.stage == 3" text type="primary" :icon="Edit" @click="toReport(scope.row)">生成评估报告</el-button> |
| | | <el-button size="small" text type="primary" :icon="Edit" @click="openRiskDialog(scope.row)">管理实验现实风险</el-button> |
| | | <el-button size="small" text type="primary" :icon="View" @click="openReportDialog('提交', scope.row)">提交综合评估报告审批</el-button> |
| | | <el-button size="small" :disabled="scope.row.status == 2 ? true : false" text type="primary" :icon="Edit" @click="openReportDialog('查看',scope.row)">查看评估报告</el-button> |
| | | <el-button size="small" v-if="scope.row.stage == 4 && !scope.row.assessPerson" text type="primary" :icon="View" @click="openReportDialog('提交', scope.row)">提交审批</el-button> |
| | | <el-button size="small" v-if="scope.row.stage == 4 && scope.row.assessPerson" text type="primary" :icon="View" @click="openReportDialog('修改', scope.row)">修改</el-button> |
| | | <el-button size="small" v-if="scope.row.stage == 4 && scope.row.assessPerson" text type="primary" :icon="Edit" @click="openReportDialog('查看',scope.row)">查看</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | } |
| | | }; |
| | | |
| | | const toReport = (val: ProjectType)=>{ |
| | | ElMessageBox.confirm(`此操作将对该实验生成风险评估报告:“${val.experimentName}”,是否继续?`, '提示', { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | let res = await assessApplyApi().toRiskReport({ id: val.id }); |
| | | if (res.data.code === 100) { |
| | | ElMessage({ |
| | | type: 'success', |
| | | duration: 2000, |
| | | message: '生成报告成功' |
| | | }); |
| | | await getAssessData(); |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: res.data.msg |
| | | }); |
| | | } |
| | | }) |
| | | .catch((error) => { |
| | | }); |
| | | } |
| | | |
| | | const getAllRoom = async () => { |
| | | let res = await roomApi().getAllRoom(); |
| | | if(res.data.code === 100){ |
| | |
| | | type: 'warning' |
| | | }) |
| | | .then(async () => { |
| | | debugger |
| | | let res = await projectApi().deleteProjectById({ id: val.id }); |
| | | if (res.data.code === 100) { |
| | | ElMessage({ |