From e8212b2b3dbd952b53b7d3fb97812cd32048b98d Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 27 Mar 2025 11:34:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/application/components/addNotes.vue | 17 +++++++++++++---- src/views/resource/components/addCatalog.vue | 19 +++++++++++++++---- src/views/resource/components/addFaq.vue | 18 ++++++++++++++---- src/views/resource/components/addFiles.vue | 18 ++++++++++++++---- src/views/resource/components/addLr.vue | 18 ++++++++++++++---- src/views/resource/components/addUm.vue | 18 ++++++++++++++---- src/views/resource/components/addWebinar.vue | 18 ++++++++++++++---- 7 files changed, 98 insertions(+), 28 deletions(-) diff --git a/src/views/application/components/addNotes.vue b/src/views/application/components/addNotes.vue index d7dc95c..b6f77de 100644 --- a/src/views/application/components/addNotes.vue +++ b/src/views/application/components/addNotes.vue @@ -160,9 +160,10 @@
+ :on-remove="handleRemove" :on-progress="handleProgress"> upload - + +
@@ -235,7 +236,9 @@ token: "" }, action: `${process.env.VUE_APP_UPLOAD_API}`, - filesList: [], + filesList: [], + showProgress:false, + uploadProgress:0, appCategoryList: [], productCategoryList: [], detail_item: [{ @@ -297,6 +300,10 @@ return } this.filesList = fileList + }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; }, addRow() { var len = this.form.application_details.length; @@ -392,7 +399,9 @@ } } else { this.id = '' - this.filesList = [] + this.filesList = [] + this.uploadProgress = 0 + this.showProgress = false this.form = { application_type_id: [], category_id: [], diff --git a/src/views/resource/components/addCatalog.vue b/src/views/resource/components/addCatalog.vue index 93d891a..de5944f 100644 --- a/src/views/resource/components/addCatalog.vue +++ b/src/views/resource/components/addCatalog.vue @@ -58,9 +58,12 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove"> upload - + + + +
@@ -92,7 +95,9 @@ type: 'add', uploadOther: { token: "" - }, + }, + showProgress:false, + uploadProgress:0, action: `${process.env.VUE_APP_UPLOAD_API}`, filesList: [], categoryList: [], @@ -130,6 +135,10 @@ return } this.filesList = fileList + }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; }, async getCategoryList() { const res = await getCategory({ @@ -212,7 +221,9 @@ } else { this.id = '' - this.filesList = [] + this.filesList = [] + this.showProgress = false; + this.uploadProgress = 0; this.form = { category_ids: '', title: "", diff --git a/src/views/resource/components/addFaq.vue b/src/views/resource/components/addFaq.vue index 21790ad..45fbd72 100644 --- a/src/views/resource/components/addFaq.vue +++ b/src/views/resource/components/addFaq.vue @@ -31,9 +31,11 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove"> upload - + + +
@@ -75,7 +77,9 @@ uploadOther: { token: "" }, - action: `${process.env.VUE_APP_UPLOAD_API}`, + action: `${process.env.VUE_APP_UPLOAD_API}`, + showProgress:false, + uploadProgress:0, form: { title: "", date:'', @@ -104,6 +108,10 @@ return } this.filesList = fileList + }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; }, changeEditor(e) { this.form.content = e @@ -180,7 +188,9 @@ this.showWang = true } else { this.id = '' - this.showWang = false + this.showWang = false + this.showProgress = false; + this.uploadProgress = 0; this.filesList = [] this.form = { title: "", diff --git a/src/views/resource/components/addFiles.vue b/src/views/resource/components/addFiles.vue index e16484d..a3a1a95 100644 --- a/src/views/resource/components/addFiles.vue +++ b/src/views/resource/components/addFiles.vue @@ -54,9 +54,11 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove"> upload - + + +
@@ -99,7 +101,9 @@ uploadOther: { token: "" }, - action: `${process.env.VUE_APP_UPLOAD_API}`, + action: `${process.env.VUE_APP_UPLOAD_API}`, + showProgress:false, + uploadProgress:0, filesList: [], categoryList: [], showWang: false, @@ -134,6 +138,10 @@ return } this.filesList = fileList + }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; }, changeEditor(e) { this.form.content = e @@ -229,7 +237,9 @@ } else { this.id = '' - this.filesList = [] + this.filesList = [] + this.showProgress = false; + this.uploadProgress = 0; this.form = { category_ids: '', title: "", diff --git a/src/views/resource/components/addLr.vue b/src/views/resource/components/addLr.vue index e708479..1f921a1 100644 --- a/src/views/resource/components/addLr.vue +++ b/src/views/resource/components/addLr.vue @@ -78,9 +78,11 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove"> upload - + + +
@@ -180,7 +182,9 @@ uploadOther: { token: "" }, - action: `${process.env.VUE_APP_UPLOAD_API}`, + action: `${process.env.VUE_APP_UPLOAD_API}`, + showProgress:false, + uploadProgress:0, filesList: [], form: { category_ids: [], @@ -230,6 +234,10 @@ return } this.filesList = fileList + }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; }, async getCategoryList() { const res = await getCategory({ @@ -351,7 +359,9 @@ } else { this.id = '' - this.filesList = [] + this.filesList = [] + this.showProgress = false; + this.uploadProgress = 0; this.form = { category_ids: [], application_ids: [], diff --git a/src/views/resource/components/addUm.vue b/src/views/resource/components/addUm.vue index 0636ce5..9613656 100644 --- a/src/views/resource/components/addUm.vue +++ b/src/views/resource/components/addUm.vue @@ -45,9 +45,11 @@
+ :auto-upload="true" :data="uploadOther" :on-progress="handleProgress" :on-success="handlesuccess" :on-remove="handleRemove"> upload - + + +
@@ -78,7 +80,9 @@ uploadOther: { token: "" }, - action: `${process.env.VUE_APP_UPLOAD_API}`, + action: `${process.env.VUE_APP_UPLOAD_API}`, + showProgress:false, + uploadProgress:0, filesList: [], categoryList:[], form: { @@ -112,6 +116,10 @@ } this.filesList = fileList }, + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; + }, async getCategoryList() { const res = await getCategory({ page_size: 999, @@ -193,7 +201,9 @@ } else { this.id = '' - this.filesList = [] + this.filesList = [] + this.showProgress = false; + this.uploadProgress = 0; this.form = { category_ids: [], name: "", diff --git a/src/views/resource/components/addWebinar.vue b/src/views/resource/components/addWebinar.vue index 9b4db29..0c4ffeb 100644 --- a/src/views/resource/components/addWebinar.vue +++ b/src/views/resource/components/addWebinar.vue @@ -72,10 +72,12 @@
upload + +
@@ -127,7 +129,9 @@ uploadOther: { token: "" }, - action: `${process.env.VUE_APP_UPLOAD_API}`, + action: `${process.env.VUE_APP_UPLOAD_API}`, + showProgress:false, + uploadProgress:0, filesList: [], videosList:[], videosPicList:[], @@ -189,7 +193,10 @@ } this.videosPicList = fileList }, - + handleProgress(event, file, fileList) { + this.showProgress = true; + this.uploadProgress = event.percent; + }, submit() { @@ -316,7 +323,9 @@ this.showWang = false this.filesList = [] this.videosList = [] - this.videosPicList = [] + this.videosPicList = [] + this.showProgress = false; + this.uploadProgress = 0; this.form = { title: "", date:'', @@ -338,6 +347,7 @@ ::v-deep .title, ::v-deep .date, ::v-deep .picture, + ::v-deep .videos, ::v-deep .video_pics, ::v-deep .introduction, ::v-deep .content {