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] =?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; }, //删除文件