|
@@ -182,7 +182,7 @@ export default defineComponent({
|
|
|
loading.value = true
|
|
|
isError.value = false
|
|
|
try {
|
|
|
- const { data } = await request.get(state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student' + '/musicSheet/cbsDetail/' + route.query.id)
|
|
|
+ const { data } = await request.get((state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student') + '/musicSheet/cbsDetail/' + route.query.id)
|
|
|
staffData.details = data
|
|
|
|
|
|
await toDetail(data)
|
|
@@ -626,9 +626,10 @@ export default defineComponent({
|
|
|
// );
|
|
|
// 因为合奏的,显示总谱会加一个声轨
|
|
|
const defaultIndex = row.musicSheetType !== "SINGLE" && row.isScoreRender ? index + 1 : index
|
|
|
+ const cnName = getInstrumentName(item.track)
|
|
|
return {
|
|
|
- text: getInstrumentName(item.track as string),
|
|
|
- name: getInstrumentName(item.track as string), // true
|
|
|
+ text: item.track + (cnName ? `(${cnName})` : ''),
|
|
|
+ name: item.track + (cnName ? `(${cnName})` : ''), // true
|
|
|
track: item.track,
|
|
|
musicPdfUrl: item.musicPdfUrl,
|
|
|
firstPdfUrl: item.firstPdfUrl,
|
|
@@ -643,7 +644,7 @@ export default defineComponent({
|
|
|
staffData.isComberRender = staffData.details?.isScoreRender;
|
|
|
|
|
|
|
|
|
- let defaultShowStaff
|
|
|
+ let defaultShowStaff: any
|
|
|
if(staffData.details?.musicalInstruments) {
|
|
|
const soundCodes = filterSoundCodes(staffData.details?.musicalInstruments)
|
|
|
if (soundCodes) {
|
|
@@ -662,7 +663,6 @@ export default defineComponent({
|
|
|
.trim()
|
|
|
)
|
|
|
)
|
|
|
- // console.log(defaultShowStaff, 'defaultShowStaff')
|
|
|
if(defaultShowStaff) {
|
|
|
staffData.selectedPartIndex = defaultShowStaff.value
|
|
|
}
|
|
@@ -737,18 +737,21 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
|
|
|
- const getPreViewCloud = (musicId: string, partIndex: number) => {
|
|
|
+ const getPreViewCloud = (musicId: string, partIndex: number, track: string) => {
|
|
|
const Authorization = sessionStorage.getItem("Authorization") || "";
|
|
|
const musicScorePath = "/klx-music-score/";
|
|
|
// 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=' +( state.platformType === "STUDENT" ? `student` : 'teacher'));
|
|
|
- // if (location.pathname.includes("accompany-teacher")) {
|
|
|
- // href += `&systemType=teacher`;
|
|
|
- // }
|
|
|
+ // 总谱还是什么
|
|
|
+ if(partIndex === 999) {
|
|
|
+ href += `&part-index=${partIndex}`
|
|
|
+ } else {
|
|
|
+ href += `&part-name=${track}`
|
|
|
+ }
|
|
|
// musicRenderType
|
|
|
// /** 五线谱 */
|
|
|
// staff = "staff",
|
|
@@ -780,13 +783,13 @@ export default defineComponent({
|
|
|
|
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
|
iframeRef.contentWindow.location.replace(url)
|
|
|
- staffData.iframeSrc = url
|
|
|
+ // staffData.iframeSrc = url
|
|
|
} else {
|
|
|
- const url = getPreViewCloud(staffData.musicId, currentColumn.value.xmlIndex)
|
|
|
+ const url = getPreViewCloud(staffData.musicId, currentColumn.value.xmlIndex, currentColumn.value.track)
|
|
|
console.log(url, 'staffIframeRef')
|
|
|
const iframeRef = document.querySelector('#staffIframeRef') as any
|
|
|
iframeRef.contentWindow.location.replace(url)
|
|
|
- staffData.iframeSrc = url
|
|
|
+ // staffData.iframeSrc = url
|
|
|
}
|
|
|
})
|
|
|
} catch (error) {
|
|
@@ -796,7 +799,7 @@ export default defineComponent({
|
|
|
|
|
|
const resetRender = () => {
|
|
|
const iframeRef: any = document.getElementById("staffIframeRef")
|
|
|
- iframeRef.contentWindow.location.replace(getPreViewCloud(staffData.musicId, currentColumn.value.xmlIndex))
|
|
|
+ iframeRef.contentWindow.location.replace(getPreViewCloud(staffData.musicId, currentColumn.value.xmlIndex, currentColumn.value.track))
|
|
|
}
|
|
|
return () => {
|
|
|
return (
|
|
@@ -1176,7 +1179,7 @@ export default defineComponent({
|
|
|
musicRenderType = 'firstTone'
|
|
|
}
|
|
|
let extraParam: any = {
|
|
|
- // 'part-index': currentColumn.value.xmlIndex || 0,
|
|
|
+ // 'part-index': currentColumn.value.track || 0,
|
|
|
'part-name': currentColumn.value.track?.trim(),
|
|
|
musicRenderType,
|
|
|
}
|