| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80"/> |
| | | <el-table-column label="模板名称" prop="templateName" align="center"/> |
| | | <el-table-column label="模板文件" align="center"> |
| | | <el-table-column label="文件名称" prop="templateName" header-align="center" align="left"/> |
| | | <!-- <el-table-column label="分类" prop="classify" align="center">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <span>{{scope.row.classify == 1 ? '体系标准' :scope.row.classify == 2 ?'安全标准': scope.row.classify == 3 ? '其他' : ''}}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="文件" header-align="center" align="left"> |
| | | <template #default="scope"> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + '模板' + scope.row.format}}</el-link> |
| | | <el-link type="primary" @click="openFile(scope.row.filePath)">{{scope.row.templateName + scope.row.format}}</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" > |
| | |
| | | |
| | | const openFile = async(path)=>{ |
| | | const ext = path.split('.').pop().toLowerCase(); |
| | | if (ext === 'doc') { |
| | | if (ext === 'doc' || ext === 'xlsx' || ext === 'xls') { |
| | | ElMessageBox.confirm('暂不支持线上预览.doc文件,是否下载查看?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => { |
| | | window.open(`${import.meta.env.VITE_APP_BASE_API}/${path}`, '_blank'); |
| | | }).catch(() => { |