|
@@ -64,6 +64,7 @@ import { svgtopng } from './formatSvgToImg'
|
|
// import { shareCall } from '@/teacher/share-page/share'
|
|
// import { shareCall } from '@/teacher/share-page/share'
|
|
import deepClone from '@/helpers/deep-clone'
|
|
import deepClone from '@/helpers/deep-clone'
|
|
import { formatXML, getCustomInfo, onlyVisible } from './instrument'
|
|
import { formatXML, getCustomInfo, onlyVisible } from './instrument'
|
|
|
|
+import { data } from 'browserslist'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'new-index',
|
|
name: 'new-index',
|
|
@@ -520,17 +521,17 @@ export default defineComponent({
|
|
try {
|
|
try {
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
if (musicPdfUrl.value) {
|
|
if (musicPdfUrl.value) {
|
|
- const url = `${location.origin}${
|
|
|
|
- location.pathname
|
|
|
|
- }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
|
- musicPdfUrl.value
|
|
|
|
- )}&t=${Date.now()}`
|
|
|
|
|
|
+ // const url = `${location.origin}${
|
|
|
|
+ // location.pathname
|
|
|
|
+ // }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
|
|
|
|
+ // musicPdfUrl.value
|
|
|
|
+ // )}&t=${Date.now()}`
|
|
|
|
|
|
|
|
|
|
- // const url = '/pdf/web/viewer-pdf.html?file=' +
|
|
|
|
- // encodeURIComponent(musicPdfUrl.value) +
|
|
|
|
- // '&t=' +
|
|
|
|
- // Date.now()
|
|
|
|
|
|
+ const url = '/pdf/web/viewer-pdf.html?file=' +
|
|
|
|
+ encodeURIComponent(musicPdfUrl.value) +
|
|
|
|
+ '&t=' +
|
|
|
|
+ Date.now()
|
|
|
|
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
iframeRef.contentWindow.location.replace(
|
|
iframeRef.contentWindow.location.replace(
|
|
@@ -538,8 +539,8 @@ export default defineComponent({
|
|
)
|
|
)
|
|
staffData.iframeSrc = url
|
|
staffData.iframeSrc = url
|
|
} else {
|
|
} else {
|
|
- const url = `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
- // const url = `${location.origin}/osmd/index.html`
|
|
|
|
|
|
+ // const url = `${location.origin}${location.pathname}osmd/index.html`
|
|
|
|
+ const url = `${location.origin}/osmd/index.html`
|
|
|
|
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
iframeRef.contentWindow.location.replace(url)
|
|
iframeRef.contentWindow.location.replace(url)
|
|
@@ -611,10 +612,10 @@ export default defineComponent({
|
|
musicDetail.value?.musicSheetType === 'CONCERT'
|
|
musicDetail.value?.musicSheetType === 'CONCERT'
|
|
? getInstrumentName(item.track)
|
|
? getInstrumentName(item.track)
|
|
: ''
|
|
: ''
|
|
- console.log(item, 'item')
|
|
|
|
return {
|
|
return {
|
|
text: item.track + (instrumentName ? `(${instrumentName})` : ''),
|
|
text: item.track + (instrumentName ? `(${instrumentName})` : ''),
|
|
value: index,
|
|
value: index,
|
|
|
|
+ instrumentName,
|
|
musicPdfUrl: item.musicPdfUrl,
|
|
musicPdfUrl: item.musicPdfUrl,
|
|
firstPdfUrl: item.firstPdfUrl,
|
|
firstPdfUrl: item.firstPdfUrl,
|
|
jianPdfUrl: item.jianPdfUrl,
|
|
jianPdfUrl: item.jianPdfUrl,
|
|
@@ -857,10 +858,10 @@ export default defineComponent({
|
|
style={{
|
|
style={{
|
|
display:
|
|
display:
|
|
musicDetail.value?.musicSheetType === 'SINGLE' ? '' : 'none',
|
|
musicDetail.value?.musicSheetType === 'SINGLE' ? '' : 'none',
|
|
- opacity: showImg.value.length <= 0 ? 0.6 : 1
|
|
|
|
|
|
+ // opacity: showImg.value.length <= 0 || data.musicPdfUrl ? 0.6 : 1
|
|
}}
|
|
}}
|
|
onClick={() => {
|
|
onClick={() => {
|
|
- if (showImg.value.length <= 0) return
|
|
|
|
|
|
+ // if (showImg.value.length <= 0 || data.musicPdfUrl) return
|
|
|
|
|
|
staff.status = true
|
|
staff.status = true
|
|
}}
|
|
}}
|
|
@@ -1229,6 +1230,7 @@ export default defineComponent({
|
|
staffData.open = false
|
|
staffData.open = false
|
|
staffData.partIndex = value.value
|
|
staffData.partIndex = value.value
|
|
staffData.partXmlIndex = value.xmlValue
|
|
staffData.partXmlIndex = value.xmlValue
|
|
|
|
+ staffData.instrumentName = value.instrumentName
|
|
showImg.value = []
|
|
showImg.value = []
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
// const item = getInstrumentItem(musicDetail.value?.background || [], value.selectedOptions[0].track);
|
|
// const item = getInstrumentItem(musicDetail.value?.background || [], value.selectedOptions[0].track);
|