<template> <div class="AnQuanFengXian"> <el-table :data="tableData" border style="width: 100%" > <el-table-column type='index' label="序号" width="180" /> <el-table-column prop="scenarioName" label="安全事件" width="180" /> <el-table-column prop="projectName" label="所属项目" /> <el-table-column prop="status" label="整改进度" > <template #default={row}> <span style="color: red" v-if="row.fromStatus">驳回</span> <span v-else>{{ dangerous_status.find(item => item.value === row.status)?.label }}</span> </template> </el-table-column> <el-table-column prop="fileSaveRequestList" label="整改附件"> <template #default="{ row }"> <span>{{ row?.fileSaveRequestList?.length || 0 }}</span> </template> </el-table-column> <el-table-column prop="compilationTime" label="编制时间" > <template #default='{row}'> {{row.compilationTime?.substring(0,10)}} </template> </el-table-column> <!-- <el-table-column prop="remark" sortable label="备注" /> --> </el-table> </div> </template> <script setup name="AnQuanFengXian"> import { ref, onMounted, inject } from 'vue' import {getDangerousProjectApproveList} from '@/api/gcpjApi' const { proxy } = getCurrentInstance() const getProjectInfo = inject('getProjectInfo') const projectInfo = getProjectInfo() const { dangerous_status } = proxy.useDict("dangerous_status"); const tableData= ref([]) const getData = async () => { if(!projectInfo?.projectNo) return const res = await getDangerousProjectApproveList({ projectNo: projectInfo.projectNo }) if(res?.code !== 200) return tableData.value = res.data || [] } onMounted(() => { getData() }) </script> <style lang="scss" scoped></style>