Merge remote-tracking branch 'origin/dev'

This commit is contained in:
纪寒 2023-04-07 11:41:02 +08:00
commit e269e73e4f
2 changed files with 33 additions and 7 deletions

View File

@ -69,4 +69,13 @@ export function deletePrescriptionVideo(prescriptionVideoUrl) {
url: `/system/motionPrescriptionLibrary/deletePrescriptionVideo?prescriptionVideoUrl=${prescriptionVideoUrl}`, url: `/system/motionPrescriptionLibrary/deletePrescriptionVideo?prescriptionVideoUrl=${prescriptionVideoUrl}`,
method: 'post', method: 'post',
}) })
}
//获得图列表
export function prescriptionVideoUpload(id) {
return request({
url: `/system/motionPrescriptionLibrary/prescriptionVideoUpload?id=${id}`,
method: 'get',
})
} }

View File

@ -213,7 +213,6 @@
:data="upload.data" :data="upload.data"
:file-list="fileList" :file-list="fileList"
:on-change="handleChange" :on-change="handleChange"
:limit="5"
:before-remove="handleFileremove" :before-remove="handleFileremove"
drag drag
> >
@ -258,7 +257,8 @@ import {
updateMotionPrescriptionLibrary, updateMotionPrescriptionLibrary,
getPrescriptionVideoInfo, getPrescriptionVideoInfo,
confirmUploadVideo, confirmUploadVideo,
deletePrescriptionVideo deletePrescriptionVideo,
prescriptionVideoUpload
} from "@/api/system/motionPrescriptionLibrary"; } from "@/api/system/motionPrescriptionLibrary";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import baseurl from "@/api/baseurl"; import baseurl from "@/api/baseurl";
@ -535,10 +535,27 @@ export default {
}, },
// //
uploadopentrue(e) { uploadopentrue(e) {
this.upload.data.motionPrescriptionId = e.id;
this.upload.open = true;
this.videourl = []; this.videourl = [];
this.fileList = []; this.fileList = [];
this.upload.data.motionPrescriptionId = e.id;
prescriptionVideoUpload(e.id).then(res => {
if (
res.data.prescriptionVideoUrlList &&
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;
});
}, },
// //
handleChange(file, fileList) {}, handleChange(file, fileList) {},
@ -548,9 +565,9 @@ export default {
}, },
// //
handleFileremove(file, fileList) { handleFileremove(file, fileList) {
deletePrescriptionVideo(file.response.prescriptionVideoUrl).then(res => { // deletePrescriptionVideo(file.response.prescriptionVideoUrl).then(res => {
this.$modal.msgSuccess("删除视频成功"); // this.$modal.msgSuccess("");
}); // });
this.fileList = this.fileList.filter(e => e != file); this.fileList = this.fileList.filter(e => e != file);
}, },
// //