|
|
|
@ -6,9 +6,9 @@ |
|
|
|
|
<el-input style="width: 250px" placeholder="请输入文件名称" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
|
<div class="action"> |
|
|
|
|
<el-upload :headers="{token}" :action="api.fileUpload" name="file" :limit="1000" :show-file-list="false" :before-upload="beforeImport" :on-success="successImport"> |
|
|
|
|
<el-button type="primary" size="small">导入数据</el-button> |
|
|
|
|
<el-button class="cus-btn" type="primary" size="small">导入数据</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
<el-button style="margin-left: 10px;" type="danger" size="small" @click="delAll">批量删除</el-button> |
|
|
|
|
<el-button class="cus-btn" style="margin-left: 10px;" type="primary" size="small" @click="delAll">批量删除</el-button> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
@ -145,11 +145,11 @@ export default { |
|
|
|
|
show(row) { |
|
|
|
|
// 如果是word,pdf,excel,就用预览插件打开,图片等就直接打开 |
|
|
|
|
const format = row.fileFormat |
|
|
|
|
if ('xls,xlsx'.includes(format)) { |
|
|
|
|
this.$router.push(`/preview?path=${row.filePath}`) |
|
|
|
|
} else { |
|
|
|
|
// if ('xls,xlsx'.includes(format)) { |
|
|
|
|
// this.$router.push(`/preview?path=${row.filePath}`) |
|
|
|
|
// } else { |
|
|
|
|
window.open((util.isDoc(format) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + row.filePath) |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
// 下载 |
|
|
|
|
download(row) { |
|
|
|
@ -193,6 +193,13 @@ export default { |
|
|
|
|
.action { |
|
|
|
|
display: inline-flex; |
|
|
|
|
} |
|
|
|
|
.cus-btn { |
|
|
|
|
background-color: #007eff; |
|
|
|
|
border-color: #007eff; |
|
|
|
|
} |
|
|
|
|
.el-button--text { |
|
|
|
|
color: #007eff; |
|
|
|
|
} |
|
|
|
|
.copy { |
|
|
|
|
margin-left: 5px; |
|
|
|
|
cursor: pointer; |
|
|
|
|