From d962fe78c73e46279d94748899ae3623eb0ba718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:10:39 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/motionPrescriptionLibrary.js | 9 ++++++++ .../motionPrescriptionLibrary/index.vue | 21 +++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/api/system/motionPrescriptionLibrary.js b/src/api/system/motionPrescriptionLibrary.js index db307cc..155efcc 100644 --- a/src/api/system/motionPrescriptionLibrary.js +++ b/src/api/system/motionPrescriptionLibrary.js @@ -69,4 +69,13 @@ export function deletePrescriptionVideo(prescriptionVideoUrl) { url: `/system/motionPrescriptionLibrary/deletePrescriptionVideo?prescriptionVideoUrl=${prescriptionVideoUrl}`, method: 'post', }) +} + + +//获得图列表 +export function prescriptionVideoUpload(id) { + return request({ + url: `/system/motionPrescriptionLibrary/prescriptionVideoUpload?id=${id}`, + method: 'get', + }) } \ No newline at end of file diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index db760bb..7f502e8 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -213,7 +213,6 @@ :data="upload.data" :file-list="fileList" :on-change="handleChange" - :limit="5" :before-remove="handleFileremove" drag > @@ -258,7 +257,8 @@ import { updateMotionPrescriptionLibrary, getPrescriptionVideoInfo, confirmUploadVideo, - deletePrescriptionVideo + deletePrescriptionVideo, + prescriptionVideoUpload } from "@/api/system/motionPrescriptionLibrary"; import { getToken } from "@/utils/auth"; import baseurl from "@/api/baseurl"; @@ -535,15 +535,28 @@ export default { }, //打开视频上传窗口 uploadopentrue(e) { - this.upload.data.motionPrescriptionId = e.id; - this.upload.open = true; this.videourl = []; this.fileList = []; + this.upload.data.motionPrescriptionId = e.id; + prescriptionVideoUpload(e.id).then(res => { + res.data.prescriptionVideoUrlList.forEach(e => { + var arr = e.split("/"); + var obj = { + name: arr[4], + response: { + prescriptionVideoUrl: e + } + }; + this.fileList.push(obj); + }); + this.upload.open = true; + }); }, //文件上传 handleChange(file, fileList) {}, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { + console.log(fileList); this.upload.isUploading = true; }, //删除文件 From 3e8689fad4d7f93fd48d069898850a2d6b430e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:15:05 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/motionPrescriptionLibrary/index.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index 7f502e8..6782ed3 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -561,9 +561,9 @@ export default { }, //删除文件 handleFileremove(file, fileList) { - deletePrescriptionVideo(file.response.prescriptionVideoUrl).then(res => { - this.$modal.msgSuccess("删除视频成功"); - }); + // deletePrescriptionVideo(file.response.prescriptionVideoUrl).then(res => { + // this.$modal.msgSuccess("删除视频成功"); + // }); this.fileList = this.fileList.filter(e => e != file); }, // 文件上传成功处理 From 32b43f134fc3875d9cb02b9da1bc63f4871c2767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:21:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/motionPrescriptionLibrary/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index 6782ed3..62fb6ea 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -556,7 +556,6 @@ export default { handleChange(file, fileList) {}, // 文件上传中处理 handleFileUploadProgress(event, file, fileList) { - console.log(fileList); this.upload.isUploading = true; }, //删除文件 From d332619f2eca4a345ad134e0651e7c5f938fe92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:22:55 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../motionPrescriptionLibrary/index.vue | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index 62fb6ea..f84f21c 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -539,16 +539,18 @@ export default { this.fileList = []; this.upload.data.motionPrescriptionId = e.id; prescriptionVideoUpload(e.id).then(res => { - res.data.prescriptionVideoUrlList.forEach(e => { - var arr = e.split("/"); - var obj = { - name: arr[4], - response: { - prescriptionVideoUrl: e - } - }; - this.fileList.push(obj); - }); + if (res.data.prescriptionVideoUrlList.length > 0) { + res.data.prescriptionVideoUrlList.forEach(e => { + var arr = e.split("/"); + var obj = { + name: arr[4], + response: { + prescriptionVideoUrl: e + } + }; + this.fileList.push(obj); + }); + } this.upload.open = true; }); }, From a15aa86a4a3c78733cec5c61a7ff30d9b93d5c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:25:10 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/motionPrescriptionLibrary/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index f84f21c..a137e22 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -539,7 +539,7 @@ export default { this.fileList = []; this.upload.data.motionPrescriptionId = e.id; prescriptionVideoUpload(e.id).then(res => { - if (res.data.prescriptionVideoUrlList.length > 0) { + if (res.data.prescriptionVideoUrlList) { res.data.prescriptionVideoUrlList.forEach(e => { var arr = e.split("/"); var obj = { From 006f22159a0cc711f2073c21c663be20e4a46c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Fri, 7 Apr 2023 11:28:22 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/motionPrescriptionLibrary/index.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/system/motionPrescriptionLibrary/index.vue b/src/views/system/motionPrescriptionLibrary/index.vue index a137e22..2865ba7 100644 --- a/src/views/system/motionPrescriptionLibrary/index.vue +++ b/src/views/system/motionPrescriptionLibrary/index.vue @@ -539,7 +539,10 @@ export default { this.fileList = []; this.upload.data.motionPrescriptionId = e.id; prescriptionVideoUpload(e.id).then(res => { - if (res.data.prescriptionVideoUrlList) { + if ( + res.data.prescriptionVideoUrlList && + res.data.prescriptionVideoUrlList.length > 0 + ) { res.data.prescriptionVideoUrlList.forEach(e => { var arr = e.split("/"); var obj = {