Browse Source

优化调整上传更新文件,及历史文件展示和预览

master
李磊 3 years ago
parent
commit
14e3b30dfd
  1. 17
      src/views/document/index.vue

17
src/views/document/index.vue

@ -11,7 +11,6 @@
clearable
@keyup.enter.native="crud.toQuery"
/>
<query :crud="crud" />
<el-upload
ref="upload"
@ -57,10 +56,17 @@
<pagination />
<el-dialog title="查看历史版本" :visible.sync="dialogTableVisible">
<el-table :data="gridData">
<el-table-column :formatter="formatterFlowName" property="flowname" label="操作环节" />
<el-table-column :formatter="formatterFlowName" property="flowName" label="操作环节" width="80" />
<el-table-column property="filename" label="文件名称" />
<el-table-column :formatter="formatter.getChineseName" property="createBy" label="创建人" />
<el-table-column property="createTime" label="创建时间" />
<el-table-column :formatter="formatter.getChineseName" property="createBy" label="创建人" width="100" />
<el-table-column property="createTime" label="创建时间" width="150" />
<el-table-column label="操作" width="80">
<template v-slot="scope">
<el-button v-if="scope.row.flowName !== 0" type="text" @click="viewHistoryFile(scope.row)">
预览
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="params.pageSize"
@ -189,6 +195,9 @@ export default {
downLoad(item) {
downloadFileUrl(this.url + '/' + item.id + item.suffix, item.filename, item.suffix)
},
viewHistoryFile(item) {
downloadFileUrl(this.url + '/' + item.inspectionSystemFileId + '_' + item.id + item.suffix, item.filename, item.suffix)
},
downLoadFn(item) {
download(this.url + '/' + item.id + item.suffix)
},

Loading…
Cancel
Save