|
|
|
@ -260,12 +260,10 @@ export default {
|
|
|
|
|
filePath: url,
|
|
|
|
|
name: "file",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
console.log(res,'res')
|
|
|
|
|
const { path } = JSON.parse(res.data).data;
|
|
|
|
|
console.log('@@@@', path)
|
|
|
|
|
resolve(path);
|
|
|
|
|
if (type === 'check') {
|
|
|
|
|
this.chenckId(path)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
@ -278,9 +276,9 @@ export default {
|
|
|
|
|
async afterRead(event) {
|
|
|
|
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
|
|
|
|
let lists = [].concat(event.file)
|
|
|
|
|
let fileListLen = this[`fileList`].length
|
|
|
|
|
let fileListLen = this[`fileList1`].length
|
|
|
|
|
lists.map((item) => {
|
|
|
|
|
this[`fileList`].push({
|
|
|
|
|
this[`fileList1`].push({
|
|
|
|
|
...item,
|
|
|
|
|
status: 'uploading',
|
|
|
|
|
message: '上传中'
|
|
|
|
@ -289,8 +287,8 @@ export default {
|
|
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
|
|
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
|
|
|
|
console.log(result)
|
|
|
|
|
let item = this[`fileList`][fileListLen]
|
|
|
|
|
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
|
let item = this[`fileList1`][fileListLen]
|
|
|
|
|
this[`fileList1`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
|
status: 'success',
|
|
|
|
|
message: '',
|
|
|
|
|
url: result
|
|
|
|
|