| | |
| | | <el-table-column prop="id" label="id" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createTime" label="上报时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="name" label="报告名称" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="type" label="报告类型" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{scope.row.type == 1 ? '安全评价报告':scope.row.type == 2 ? '安全三同时':'--'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remarks" label="备注" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="evaluateTime" label="评价时间" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="files" label="附件" show-overflow-tooltip> |
| | |
| | | } |
| | | |
| | | const openFile=(file: string)=>{ |
| | | axios.get(import.meta.env.VITE_API_URL + file,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{ |
| | | if (res) { |
| | | const link = document.createElement('a') |
| | | let blob = new Blob([res.data],{type: 'application/pdf'}) |
| | | link.style.display = "none"; |
| | | link.href = URL.createObjectURL(blob); // 创建URL |
| | | window.open(link.href) |
| | | } else { |
| | | ElMessage({ |
| | | type: 'warning', |
| | | message: '文件读取失败' |
| | | }); |
| | | } |
| | | }) |
| | | // axios.get(file,{headers:{'Content-Type': 'application/json','Authorization': `${Cookies.get('token')}`,'uid':`${Cookies.get('uid')}`},responseType: 'blob'}).then(res=>{ |
| | | // if (res) { |
| | | // const link = document.createElement('a') |
| | | // let blob = new Blob([res.data],{type: 'application/pdf'}) |
| | | // link.style.display = "none"; |
| | | // link.href = URL.createObjectURL(blob); // 创建URL |
| | | // window.open(link.href) |
| | | // } else { |
| | | // ElMessage({ |
| | | // type: 'warning', |
| | | // message: '文件读取失败' |
| | | // }); |
| | | // } |
| | | // }) |
| | | window.open(file) |
| | | } |
| | | |
| | | // 删除用户 |