|
@@ -34,8 +34,9 @@ import PlayLoading from "./component/play-loading"
|
|
|
import PracticeForm from "@/businessComponents/practiceForm"
|
|
|
import { saveAs } from "file-saver"
|
|
|
import JSZip from "jszip"
|
|
|
-import { svgtoblob } from "./formatSvgToImg"
|
|
|
+import { canvasAddTitle, imgToCanvas, svgtoblob } from "./formatSvgToImg"
|
|
|
import { penShow, whitePenShow } from "@/businessComponents/globalTools/globalTools"
|
|
|
+import { handleFullscreen } from "@/libs/fullscreen"
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: "cloudPractice",
|
|
@@ -102,6 +103,9 @@ export default defineComponent({
|
|
|
musicSheetType: item?.musicSheetType,
|
|
|
audioFileUrl,
|
|
|
// titleImg: list?.titleImg,
|
|
|
+ musicImg: list.musicImg,
|
|
|
+ musicJianImg: list.musicJianSvg,
|
|
|
+ musicFirstImg: list.musicFirstSvg,
|
|
|
isScoreRender: item?.isScoreRender,
|
|
|
defaultScoreRender: item?.defaultScoreRender,
|
|
|
musicPdfUrl: item?.musicPdfUrl // 独奏使用PDF
|
|
@@ -115,6 +119,9 @@ export default defineComponent({
|
|
|
musicSheetType: list?.musicSheetType,
|
|
|
audioFileUrl: list?.audioFileUrl,
|
|
|
titleImg: list?.titleImg,
|
|
|
+ musicImg: list.musicImg,
|
|
|
+ musicJianImg: list.musicJianSvg,
|
|
|
+ musicFirstImg: list.musicFirstSvg,
|
|
|
isScoreRender: list?.isScoreRender,
|
|
|
defaultScoreRender: list?.defaultScoreRender,
|
|
|
musicPdfUrl: list?.musicPdfUrl
|
|
@@ -129,6 +136,9 @@ export default defineComponent({
|
|
|
musicSheetType: list?.musicSheetType,
|
|
|
audioFileUrl: item?.audioFileUrl,
|
|
|
titleImg: list?.titleImg,
|
|
|
+ musicImg: list.musicImg,
|
|
|
+ musicJianImg: list.musicJianSvg,
|
|
|
+ musicFirstImg: list.musicFirstSvg,
|
|
|
isScoreRender: false,
|
|
|
defaultScoreRender: false,
|
|
|
musicPdfUrl: list?.musicPdfUrl
|
|
@@ -695,6 +705,8 @@ export default defineComponent({
|
|
|
renderStaff()
|
|
|
}
|
|
|
|
|
|
+ // 全屏显示
|
|
|
+ handleFullscreen(true, false)
|
|
|
__init()
|
|
|
|
|
|
const handleResh = () => {
|
|
@@ -728,6 +740,19 @@ export default defineComponent({
|
|
|
if (row.musicSheetType === "SINGLE") {
|
|
|
loading.value = false
|
|
|
state.musicPdfUrl = row.musicPdfUrl
|
|
|
+
|
|
|
+ if (userStoreHook.roles === "GYM") {
|
|
|
+ const imgs = row.musicImg ? row.musicImg.split(",") : []
|
|
|
+ state.imgs = []
|
|
|
+ imgs.forEach(async (item: string, index: number) => {
|
|
|
+ const imgCanvas = await imgToCanvas(item)
|
|
|
+ const img = await canvasAddTitle(imgCanvas, row.name)
|
|
|
+ state.imgs.push({
|
|
|
+ name: index + 1 + ".png",
|
|
|
+ url: img
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
state.partNames = await getPartNames(row.xmlUrl)
|
|
@@ -900,8 +925,6 @@ export default defineComponent({
|
|
|
// // 多个文件下载
|
|
|
const downLoadMultiFile = (files: any, filesName: string) => {
|
|
|
const zip = new JSZip()
|
|
|
- // const result = []
|
|
|
- // console.log(files)
|
|
|
for (const i in files) {
|
|
|
zip.file(files[i].name, files[i].url, { binary: true })
|
|
|
}
|