|
@@ -36,7 +36,7 @@ import userStore from "@/store/modules/user"
|
|
import PlayLoading from "./component/play-loading"
|
|
import PlayLoading from "./component/play-loading"
|
|
import PracticeForm from "@/businessComponents/practiceForm"
|
|
import PracticeForm from "@/businessComponents/practiceForm"
|
|
import { saveAs } from "file-saver"
|
|
import { saveAs } from "file-saver"
|
|
-import JSZip, { file } from "jszip"
|
|
|
|
|
|
+import JSZip from "jszip"
|
|
import { svgtopng } from "./formatSvgToImg"
|
|
import { svgtopng } from "./formatSvgToImg"
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
@@ -715,7 +715,7 @@ export default defineComponent({
|
|
state.selectedPartName = ""
|
|
state.selectedPartName = ""
|
|
state.selectedTrack = ""
|
|
state.selectedTrack = ""
|
|
state.selectedPartIndex = 0
|
|
state.selectedPartIndex = 0
|
|
- state.musicPdfUrl = ""
|
|
|
|
|
|
+ // state.musicPdfUrl = ""
|
|
state.partXmlIndex = 0
|
|
state.partXmlIndex = 0
|
|
document.querySelector(".musicList-container")?.scroll(0, 0)
|
|
document.querySelector(".musicList-container")?.scroll(0, 0)
|
|
state.page = 1
|
|
state.page = 1
|
|
@@ -1303,20 +1303,40 @@ export default defineComponent({
|
|
state.selectedTrack = item.track
|
|
state.selectedTrack = item.track
|
|
state.partXmlIndex = item.xmlIndex
|
|
state.partXmlIndex = item.xmlIndex
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
- if (item && item.musicPdfUrl) {
|
|
|
|
|
|
+ // if (item && item.musicPdfUrl) {
|
|
|
|
+ // staffLoading.value = true
|
|
|
|
+ // state.musicPdfUrl = item.musicPdfUrl
|
|
|
|
+ // renderStaff()
|
|
|
|
+ // } else {
|
|
|
|
+ // loading.value = true
|
|
|
|
+ // if (state.musicPdfUrl) {
|
|
|
|
+ // state.musicPdfUrl = ""
|
|
|
|
+ // renderStaff()
|
|
|
|
+ // } else {
|
|
|
|
+ // resetRender()
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ let tempPdf = ""
|
|
|
|
+ if (activeItem.value?.isComberRender) {
|
|
|
|
+ if (activeItem.value?.musicPdfUrl) {
|
|
|
|
+ tempPdf = activeItem.value?.musicPdfUrl
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ tempPdf = item.musicPdfUrl
|
|
|
|
+ }
|
|
|
|
+ if (tempPdf) {
|
|
|
|
+ state.musicPdfUrl = tempPdf
|
|
staffLoading.value = true
|
|
staffLoading.value = true
|
|
- state.musicPdfUrl = item.musicPdfUrl
|
|
|
|
renderStaff()
|
|
renderStaff()
|
|
} else {
|
|
} else {
|
|
loading.value = true
|
|
loading.value = true
|
|
- if (state.musicPdfUrl) {
|
|
|
|
- state.musicPdfUrl = ""
|
|
|
|
|
|
+ // 为了处理,之前是使用pdf渲染,现在又用osmd,iframe没有重新加载
|
|
|
|
+ if (state.iframeSrc.indexOf("pdf/web") !== -1) {
|
|
renderStaff()
|
|
renderStaff()
|
|
} else {
|
|
} else {
|
|
resetRender()
|
|
resetRender()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(value, "value", item)
|
|
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
class={["PopSelect", "PopSelectPart"]}
|
|
class={["PopSelect", "PopSelectPart"]}
|