| | |
| | | <div class="app-container"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-form style="display: flex;flex-wrap: wrap;"> |
| | | <el-form-item label="企业名称:" v-if="data.isAdmin" style="margin-left: 20px"> |
| | | <el-form-item label="单位名称:" v-if="data.isAdmin" style="margin-left: 20px"> |
| | | <el-select |
| | | v-model="data.queryParams.companyName" |
| | | filterable |
| | |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" > |
| | | <template #default="scope"> |
| | | <el-button v-if="scope.row.filePath" link type="primary" @click="downloadFile(scope.row)" >下载</el-button> |
| | | <el-button v-if="data.isAdmin" link type="primary" @click="openDataDialog('edit',scope.row)" >编辑</el-button> |
| | | <el-button v-if="data.isAdmin" link type="danger" @click="handleDataDelete(scope.row)" >删除</el-button> |
| | | <el-button link type="primary" @click="openDataDialog('edit',scope.row)" >编辑</el-button> |
| | | <el-button link type="danger" @click="handleDataDelete(scope.row)" >删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | const openFile = async(path)=>{ |
| | | const ext = path.split('.').pop().toLowerCase(); |
| | | if (ext === 'doc') { |
| | | ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | | ElMessageBox.confirm('暂不支持线上预览.doc、.xls、.xlsx文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | | window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank'); |
| | | }).catch(() => { |
| | | console.log('取消预览') |