6 changed files with 320 additions and 42 deletions
-
11src/api/archivesManage/archivesList.js
-
36src/assets/styles/archives-manage.scss
-
73src/views/archivesManage/archivesList/archivesDetail.vue
-
27src/views/archivesManage/archivesList/module/data.json
-
79src/views/archivesManage/archivesList/module/uploadFile.vue
-
128src/views/components/category/PreviewForm.vue
@ -0,0 +1,27 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": [{ |
|||
"fileName": "附件标题", |
|||
"fileFormat":"xls", |
|||
"fileSize":"76kb", |
|||
"fileDpi":"1920*1080", |
|||
"fileCover":"https://qiniu.aiyxlib.com/yuekan-5-h5bg.jpg", |
|||
"create_date":"2022-5-27 08:00" |
|||
},{ |
|||
"fileName": "附件标题2", |
|||
"fileFormat":"xls", |
|||
"fileSize":"76kb", |
|||
"fileDpi":"1920*1080", |
|||
"fileCover":"", |
|||
"create_date":"2022-5-27 08:00" |
|||
},{ |
|||
"fileName": "附件标题3", |
|||
"fileFormat":"xls", |
|||
"fileSize":"76kb", |
|||
"fileDpi":"1920*1080", |
|||
"fileCover":"", |
|||
"create_date":"2022-5-27 08:00" |
|||
} |
|||
] |
|||
} |
@ -0,0 +1,79 @@ |
|||
<template> |
|||
<div class="upload-file"> |
|||
<!-- 上传附件curd --> |
|||
<div class="upload-curd"> |
|||
<el-button icon="el-icon-plus">新增</el-button> |
|||
<el-button icon="el-icon-delete" :disabled="selections.length === 0">删除</el-button> |
|||
<el-button icon="el-icon-sort">排序</el-button> |
|||
</div> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
:data="tableData" |
|||
style="min-width: 100%" |
|||
height="calc(100vh - 315px)" |
|||
@row-click="clickRowHandler" |
|||
@selection-change="selectionChangeHandler" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column prop="fileName" label="文件名称" min-width="140" align="center" /> |
|||
<el-table-column prop="fileFormat" label="格式" min-width="60" align="center" /> |
|||
<el-table-column prop="fileSize" label="大小" min-width="85" align="center" /> |
|||
<el-table-column prop="fileDpi" label="分辨率" min-width="85" align="center" /> |
|||
<el-table-column prop="fileCover" label="缩览图" min-width="60" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.fileCover"> |
|||
<img width="60px" height="32px" :src="scope.row.fileCover" @click="showCoverVisible=true"> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="create_date" label="创建时间" min-width="100" align="center" /> |
|||
</el-table> |
|||
|
|||
<!-- 点击缩略图看大图 --> |
|||
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<img src="https://qiniu.aiyxlib.com/yuekan-5-h5bg.jpg"> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// import CRUD, { presenter, header } from '@crud/crud' |
|||
// import crudOperation from '@crud/CRUD.operation' |
|||
import data from './data.json' |
|||
export default { |
|||
name: 'UploadFile', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
tableData: [], |
|||
selections: [], |
|||
showCoverVisible: false |
|||
} |
|||
}, |
|||
created() { |
|||
this.tableData = data.data |
|||
}, |
|||
methods: { |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
handleClose(done) { |
|||
this.deleteData = {} |
|||
done() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/archives-manage.scss"; |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue