From 85bc9aca4dbc7a43a474d239844b7e76a7d8f009 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 11 Jul 2023 13:23:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=20=E5=B7=A5=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileUpload/index.vue | 9 ++-- src/views/mes/pro/process/content.vue | 7 +-- src/views/mes/pro/process/index.vue | 69 ++++++++++++++++++++------- 3 files changed, 62 insertions(+), 23 deletions(-) diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 423a31ee..8be095c9 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -29,7 +29,7 @@
  • - {{ getFileName(file.name) }} + {{ getFileName(file.name) }}
    删除 @@ -50,7 +50,7 @@ export default { // 数量限制 limit: { type: Number, - default: 5, + default: 15, }, // 大小限制(MB) fileSize: { @@ -60,7 +60,7 @@ export default { // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, - default: () => ["doc", "xls", "ppt", "txt", "pdf"], + default: () => ["doc", "xls", "ppt", "txt", "pdf",'png', 'jpg', 'jpeg'], }, // 是否显示提示 isShowTip: { @@ -146,7 +146,7 @@ export default { // 上传成功回调 handleUploadSuccess(res, file) { if (res.code === 200) { - this.uploadList.push({ name: res.data.url, url: res.data.url }); + this.uploadList.push({ name: res.data.name, url: res.data.url }); this.uploadedSuccessfully(); } else { this.number--; @@ -163,6 +163,7 @@ export default { }, // 上传结束处理 uploadedSuccessfully() { + debugger if (this.number > 0 && this.uploadList.length === this.number) { this.fileList = this.fileList.concat(this.uploadList); this.uploadList = []; diff --git a/src/views/mes/pro/process/content.vue b/src/views/mes/pro/process/content.vue index aa6feea0..e13f66a8 100644 --- a/src/views/mes/pro/process/content.vue +++ b/src/views/mes/pro/process/content.vue @@ -51,7 +51,7 @@ - +