diff --git a/src/api/manage.js b/src/api/manage.js
index 199d928..8adae29 100644
--- a/src/api/manage.js
+++ b/src/api/manage.js
@@ -227,9 +227,9 @@ export function getRecord(data) {
for (var i = 0; i < text.length; i++) {
var name = text[i].filename
var fileJson = {
- name: text[i].fileName,
+ name: text[i].name,
url: text[i].url,
- size: text[i].fileSize,
+ size: text[i].size,
id: text[i].id,
fileType: text[i].fileType
}
diff --git a/src/components/jeecg/FileList.vue b/src/components/jeecg/FileList.vue
index c26a104..013677e 100644
--- a/src/components/jeecg/FileList.vue
+++ b/src/components/jeecg/FileList.vue
@@ -173,6 +173,7 @@
methods: {
initFileListArr(val) {
+ console.log('+++------>',val)
if (!val || val.length == 0) {
this.fileList = []
return
diff --git a/src/components/jeecg/JUpload.vue b/src/components/jeecg/JUpload.vue
index a421c0b..c7115d1 100644
--- a/src/components/jeecg/JUpload.vue
+++ b/src/components/jeecg/JUpload.vue
@@ -32,7 +32,7 @@
{{ text }}
- {{ text }}
+ {{ text }}
@@ -69,7 +69,6 @@
headers:{},
fileList: [],
newFileList: [],
- result: '',
uploadGoOn:true,
previewVisible: false,
//---------------------------- begin 图片左右换位置 -------------------------------------
@@ -102,7 +101,7 @@
default:"temp"
},
value:{
- type:[Object, Array, String, Number],
+ type:[Array, Object, String, Number],
required:false
},
// update-begin- --- author:wangshuai ------ date:20190929 ---- for:Jupload组件增加是否能够点击
@@ -147,7 +146,6 @@
if (val instanceof Array) {
if(this.returnUrl){
this.initFileListArr(val);
- // this.initFileList(val.join(','))
}else{
this.initFileListArr(val);
}
@@ -175,7 +173,6 @@
methods:{
initFileListArr(val) {
- console.log('999999',val)
if (!val || val.length == 0) {
this.fileList = []
return
@@ -185,6 +182,7 @@
fileList.push({
uid: uidGenerator(),
name: val[a].name,
+ groups: val[a].groups,
id: val[a].id,
status: 'done',
url: val[a].url,
@@ -192,6 +190,7 @@
result: {
uid: uidGenerator(),
name: val[a].name,
+ groups: val[a].groups,
id: val[a].id,
status: 'done',
url: val[a].url
@@ -263,17 +262,15 @@
return true
},
handleChange(info) {
- console.log("--文件列表改变--",info)
- if(!info.file.status && this.uploadGoOn === false){
- info.fileList.pop();
+ if (!info.file.status && this.uploadGoOn === false) {
+ info.fileList.pop()
}
- let fileList = info
-
- if(info.file.status==='done'){
- if(this.number>0){
- fileList = fileList.slice(-this.number);
+ let fileList = info.fileList
+ if (info.file.status === 'done') {
+ if (this.number > 0) {
+ fileList = fileList.slice(this.number)
}
- if(info.file.response.success){
+ if (info.file.response.success) {
fileList = fileList.map((file) => {
if (file.response) {
let reUrl
@@ -284,23 +281,21 @@
}
file.url = getFileAccessHttpUrl(reUrl)
}
- return file;
- });
+ return file
+ })
}
- //this.$message.success(`${info.file.name} 上传成功!`);
- }else if (info.file.status === 'error') {
- this.$message.error(`${info.file.name} 上传失败.`);
- }else if(info.file.status === 'removed'){
+ } else if (info.file.status === 'error') {
+ this.$message.error(`${info.file.name} 上传失败.`)
+ } else if (info.file.status === 'removed') {
this.handleDelete(info.file)
}
this.fileList = fileList
- if(info.file.status==='done' || info.file.status === 'removed'){
+ if (info.file.status === 'done' || info.file.status === 'removed') {
this.newFileList = []
for (var a = 0; a < fileList.length; a++) {
if (fileList[a].status === 'done') {
-
var fileJson = {
- fileName: fileList[a].response.result.fileName,
+ name: fileList[a].response.result.name,
url: fileList[a].response.result.url,
size: fileList[a].response.result.size,
id: fileList[a].response.result.id,
@@ -311,10 +306,10 @@
return
}
}
- console.log('2222222222222',this.newFileList)
this.initFileListArr(this.newFileList)
this.$emit('change', this.newFileList)
}
+ //}
},
handleDelete(file){
//如有需要新增 删除逻辑
@@ -445,16 +440,16 @@