|
@@ -110,19 +110,18 @@ export default defineComponent({
|
|
|
const onChangeStaff = (type: string) => {
|
|
|
staff.radio = type
|
|
|
staff.status = false
|
|
|
-
|
|
|
- if (type == 'first') {
|
|
|
+ if (type == 'FIRST') {
|
|
|
loading.value = false
|
|
|
const tempPdf = staffData.details?.firstPdfUrl
|
|
|
- initIframe(tempPdf, 'first', staffData.musicXml)
|
|
|
- } else if (type == 'fixed') {
|
|
|
+ initIframe(tempPdf, 'FIRST')
|
|
|
+ } else if (type == 'JIAN') {
|
|
|
loading.value = false
|
|
|
const tempPdf = staffData.details?.jianPdfUrl
|
|
|
- initIframe(tempPdf, 'fixed', staffData.musicXml)
|
|
|
+ initIframe(tempPdf, 'JIAN')
|
|
|
} else {
|
|
|
loading.value = false
|
|
|
const tempPdf = staffData.details?.musicPdfUrl
|
|
|
- initIframe(tempPdf, 'staff', staffData.musicXml)
|
|
|
+ initIframe(tempPdf, 'STAVE')
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -200,64 +199,6 @@ export default defineComponent({
|
|
|
const showLoading = async (e: any) => {
|
|
|
// console.log(e, 'showLoading')
|
|
|
if (e.data?.api === 'musicStaffRender') {
|
|
|
- // const osmdImg = e.data.osmdImg
|
|
|
- // // staffData.imgs = []
|
|
|
- // const imgs: any = []
|
|
|
-
|
|
|
- // 独奏并且的图片则不用生成
|
|
|
- // if (
|
|
|
- // staffData.details?.musicSheetType === 'SINGLE' &&
|
|
|
- // staffData.details?.notation
|
|
|
- // ) {
|
|
|
- // if (
|
|
|
- // (staff.radio === 'first' && firstList.value.length > 0) ||
|
|
|
- // (staff.radio === 'fixed' && fixedList.value.length > 0) ||
|
|
|
- // (staff.radio === 'staff' && staffList.value.length > 0)
|
|
|
- // ) {
|
|
|
- // if (staff.radio === 'first') {
|
|
|
- // staffData.imgs = firstList.value
|
|
|
- // } else if (staff.radio === 'fixed') {
|
|
|
- // staffData.imgs = fixedList.value
|
|
|
- // }
|
|
|
- // if (staff.radio === 'staff') {
|
|
|
- // staffData.imgs = staffList.value
|
|
|
- // }
|
|
|
-
|
|
|
- // loading.value = e.data.loading
|
|
|
- // return
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // uploadImgs.value = true
|
|
|
-
|
|
|
- // if (osmdImg) {
|
|
|
- // for (let i = 0; i < osmdImg.length; i++) {
|
|
|
- // const img = await svgtopng(
|
|
|
- // osmdImg[i].img,
|
|
|
- // osmdImg[i].width,
|
|
|
- // osmdImg[i].height
|
|
|
- // )
|
|
|
- // imgs.push(img)
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // uploadImgs.value = false
|
|
|
- // // 判断是否为独奏
|
|
|
- // if (
|
|
|
- // staffData.details?.musicSheetType === 'SINGLE' &&
|
|
|
- // staffData.details?.notation
|
|
|
- // ) {
|
|
|
- // if (staff.radio === 'first') {
|
|
|
- // firstList.value = imgs
|
|
|
- // } else if (staff.radio === 'fixed') {
|
|
|
- // fixedList.value = imgs
|
|
|
- // } else if (staff.radio === 'staff') {
|
|
|
- // staffList.value = imgs
|
|
|
- // }
|
|
|
- // staffData.imgs = imgs
|
|
|
- // } else {
|
|
|
- // staffData.imgs = imgs
|
|
|
- // }
|
|
|
const osmdImg = e.data.osmdImg
|
|
|
const imgs: any = []
|
|
|
for (let i = 0; i < osmdImg.length; i++) {
|
|
@@ -429,7 +370,7 @@ export default defineComponent({
|
|
|
closed: true,
|
|
|
audioReady: false,
|
|
|
iframeSrc: '',
|
|
|
- musicXml: '',
|
|
|
+ // musicXml: '',
|
|
|
instrumentName: '',
|
|
|
iframeRef: null as any,
|
|
|
imgs: [] as any,
|
|
@@ -569,7 +510,7 @@ export default defineComponent({
|
|
|
})
|
|
|
|
|
|
staffData.details = row || {}
|
|
|
- staffData.musicXml = staffData.details?.xmlFileUrl
|
|
|
+ // staffData.musicXml = staffData.details?.xmlFileUrl
|
|
|
staffData.isComberRender = staffData.details?.isScoreRender
|
|
|
|
|
|
let defaultShowStaff
|
|
@@ -666,7 +607,7 @@ export default defineComponent({
|
|
|
const musicScoreUrl = getHttpOrigin() + musicScorePath
|
|
|
// const musicScoreUrl = "https://dev.colexiu.com" + musicScorePath;
|
|
|
// const musicScoreUrl = 'http://192.168.3.68:3000/instrument.html';
|
|
|
- let href = `${musicScoreUrl}?t=${Date.now()}#/?id=${musicId}&Authorization=${Authorization}&part-index=${partIndex}&isPreView=true&zoom=0.5&downPng=A4`
|
|
|
+ let href = `${musicScoreUrl}?t=${Date.now()}#/?id=${musicId}&Authorization=${Authorization}&isPreView=true&zoom=0.5&downPng=A4`
|
|
|
// // 老师端加上systemType=teacher
|
|
|
href +=
|
|
|
'&systemType=' +
|
|
@@ -702,9 +643,10 @@ export default defineComponent({
|
|
|
try {
|
|
|
nextTick(() => {
|
|
|
if (staffData.musicPdfUrl) {
|
|
|
- const url = `${location.origin}${
|
|
|
- location.pathname
|
|
|
- }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
+ // ${
|
|
|
+ // location.pathname
|
|
|
+ // }
|
|
|
+ const url = `${location.origin}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
staffData.musicPdfUrl
|
|
|
)}&t=${Date.now()}`
|
|
|
|