|
|
@ -21,26 +21,50 @@ |
|
|
|
> |
|
|
|
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" /> |
|
|
|
<el-table-column type="index" label="序号" width="55" align="center" /> |
|
|
|
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" align="center" /> |
|
|
|
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" /> |
|
|
|
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> |
|
|
|
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" /> |
|
|
|
<el-table-column prop="file_dpi" label="分辨率" min-width="100" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="!scope.row.file_dpi"> - </div> |
|
|
|
<div v-else> {{ scope.row.file_dpi }} </div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> |
|
|
|
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)"> |
|
|
|
<i class="fileIcon icon-image" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'"> |
|
|
|
<i class="fileIcon icon-excel" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'"> |
|
|
|
<i class="fileIcon icon-word" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'pdf'"> |
|
|
|
<i class="fileIcon icon-pdf" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'"> |
|
|
|
<i class="fileIcon icon-ppt" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'"> |
|
|
|
<i class="fileIcon icon-zip" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="scope.row.file_type === 'txt'"> |
|
|
|
<i class="fileIcon icon-txt" /> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<svg-icon icon-class="fujian" class-name="svg-style" /> |
|
|
|
<i class="fileIcon icon-other" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> |
|
|
|
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center"> |
|
|
|
<!-- && !recycleMain.isRecycle --> |
|
|
|
<el-table-column v-if="!isUploadDetail " label="操作" min-width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> |
|
|
|
</template> |
|
|
@ -101,7 +125,7 @@ export default { |
|
|
|
mixins: [ |
|
|
|
form({}) |
|
|
|
], |
|
|
|
inject: ['recycleMain'], |
|
|
|
// inject: ['recycleMain'], |
|
|
|
props: { |
|
|
|
isUploadDetail: { |
|
|
|
type: Boolean, |
|
|
|