|
|
@ -6,9 +6,9 @@ |
|
|
|
<el-input style="width: 250px" placeholder="请输入文件名称" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
<el-input style="width: 250px" placeholder="请输入文件名称" v-model="keyword" suffix-icon="el-icon-search" clearable size="small"></el-input> |
|
|
|
<div class="action"> |
|
|
|
<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-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-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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -145,11 +145,11 @@ export default { |
|
|
|
show(row) { |
|
|
|
show(row) { |
|
|
|
// 如果是word,pdf,excel,就用预览插件打开,图片等就直接打开 |
|
|
|
// 如果是word,pdf,excel,就用预览插件打开,图片等就直接打开 |
|
|
|
const format = row.fileFormat |
|
|
|
const format = row.fileFormat |
|
|
|
if ('xls,xlsx'.includes(format)) { |
|
|
|
// if ('xls,xlsx'.includes(format)) { |
|
|
|
this.$router.push(`/preview?path=${row.filePath}`) |
|
|
|
// this.$router.push(`/preview?path=${row.filePath}`) |
|
|
|
} else { |
|
|
|
// } else { |
|
|
|
window.open((util.isDoc(format) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + row.filePath) |
|
|
|
window.open((util.isDoc(format) ? 'https://view.officeapps.live.com/op/view.aspx?src=' : '') + row.filePath) |
|
|
|
} |
|
|
|
// } |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 下载 |
|
|
|
// 下载 |
|
|
|
download(row) { |
|
|
|
download(row) { |
|
|
@ -193,6 +193,13 @@ export default { |
|
|
|
.action { |
|
|
|
.action { |
|
|
|
display: inline-flex; |
|
|
|
display: inline-flex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.cus-btn { |
|
|
|
|
|
|
|
background-color: #007eff; |
|
|
|
|
|
|
|
border-color: #007eff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.el-button--text { |
|
|
|
|
|
|
|
color: #007eff; |
|
|
|
|
|
|
|
} |
|
|
|
.copy { |
|
|
|
.copy { |
|
|
|
margin-left: 5px; |
|
|
|
margin-left: 5px; |
|
|
|
cursor: pointer; |
|
|
|
cursor: pointer; |
|
|
|