|
@@ -303,8 +303,8 @@
|
|
|
$message.warning(`当前限制选择 5 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)
|
|
|
}"
|
|
|
:on-remove="handleRemove"
|
|
|
- :on-change="changes"
|
|
|
- :file-list="dataList">
|
|
|
+ :show-file-list="false"
|
|
|
+ :on-change="changes">
|
|
|
<el-button type="info" size="mini">点击上传</el-button>
|
|
|
</el-upload>
|
|
|
|
|
@@ -324,10 +324,13 @@
|
|
|
:print-config="{}"
|
|
|
@sort-change="sortChangeHandle"
|
|
|
:sort-config="{remote:true}"
|
|
|
- :data="dataList"
|
|
|
+ :data="dataListNew"
|
|
|
:checkbox-config="{}">
|
|
|
<vxe-column type="seq" width="40"></vxe-column>
|
|
|
<vxe-column title="文件名称" field="name"></vxe-column>
|
|
|
+ <vxe-column title="创建人" field="createBy"></vxe-column>
|
|
|
+ <vxe-column title="创建时间" field="createDate"></vxe-column>
|
|
|
+ <vxe-column title="文件描述" field="description"></vxe-column>
|
|
|
<vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
@@ -357,6 +360,7 @@
|
|
|
data () {
|
|
|
return {
|
|
|
dataList: [],
|
|
|
+ dataListNew: [],
|
|
|
title: '',
|
|
|
method: '',
|
|
|
visible: false,
|
|
@@ -416,13 +420,16 @@
|
|
|
},
|
|
|
methods: {
|
|
|
init (method, id) {
|
|
|
- this.filesArra2 = []
|
|
|
+ this.dataListNew = []
|
|
|
+ this.dataList = []
|
|
|
this.ossService.findFileList(id).then(({data}) => {
|
|
|
- this.dataList = data
|
|
|
data.forEach((item) => {
|
|
|
- console.log(item)
|
|
|
item.name = item.attachmentName
|
|
|
- this.filesArra2.push(item)
|
|
|
+ // item.createBy = item.createBy
|
|
|
+ // item.createDate = item.createDate
|
|
|
+ // item.description = item.description
|
|
|
+ this.dataList.push(item)
|
|
|
+ this.dataListNew.push(item)
|
|
|
})
|
|
|
})
|
|
|
this.method = method
|
|
@@ -521,7 +528,17 @@
|
|
|
handleRemove () {
|
|
|
this.fileList = handleRemove()
|
|
|
},
|
|
|
- changes (file) {
|
|
|
+ changes (file, fileList) {
|
|
|
+ console.log ("22", fileList)
|
|
|
+ this.dataListNew = []
|
|
|
+ this.dataList.forEach((item) =>{
|
|
|
+ this.dataListNew.push(item)
|
|
|
+ })
|
|
|
+ fileList.forEach((item) =>{
|
|
|
+ this.dataListNew.push(item)
|
|
|
+ })
|
|
|
+ console.log("11",this.dataList)
|
|
|
+ console.log("33",this.dataListNew)
|
|
|
const isLt2M = file.size / 1024 / 1024 < 300
|
|
|
if (isLt2M === false) {
|
|
|
this.$message.error('文件大小不能超过 ' + 300 + 'M !')
|