|
@@ -547,6 +547,8 @@ const state = reactive({
|
|
|
xmlHasLyric: false,
|
|
|
/** 生成图片的模式 */
|
|
|
isCreateImg: false,
|
|
|
+ /** 切换谱面后,作业选段是否需要刷新 */
|
|
|
+ workSectionNeedReset: false,
|
|
|
});
|
|
|
const browserInfo = browser();
|
|
|
let offset_duration = 0;
|
|
@@ -1418,7 +1420,8 @@ const setState = (data: any, index: number) => {
|
|
|
/**
|
|
|
* 单曲,指法根据用户当前的乐器来显示,如果没有则取musicSheetSoundList第一个track
|
|
|
*/
|
|
|
- let musicalCode = !storeData.user?.instrumentId ? data.musicSheetSoundList?.find((item:any)=>{ return item.audioPlayType === "PLAY" })?.track || '' : data.musicSheetSoundList?.find((item: any) => item?.musicalInstrumentId == storeData.user?.instrumentId && item.audioPlayType === "PLAY")?.track || '';
|
|
|
+ const currentInstrumentId = query.instrumentId || storeData.user?.instrumentId;
|
|
|
+ let musicalCode = !currentInstrumentId ? data.musicSheetSoundList?.find((item:any)=>{ return item.audioPlayType === "PLAY" })?.track || '' : data.musicSheetSoundList?.find((item: any) => item?.musicalInstrumentId == currentInstrumentId && item.audioPlayType === "PLAY")?.track || '';
|
|
|
const pitchSubject = musicalInstrumentCodeInfo.find((n) => n.code.toLocaleLowerCase() === subjectCode.toLocaleLowerCase())
|
|
|
const pitchMusical = musicalInstrumentCodeInfo.find((n) => n.code.toLocaleLowerCase() === musicalCode.toLocaleLowerCase())
|
|
|
state.subjectCodeId = pitchSubject ? pitchSubject.id : 0
|
|
@@ -1530,9 +1533,9 @@ const setState = (data: any, index: number) => {
|
|
|
let pitchTrack = null
|
|
|
if (state.isConcert) {
|
|
|
musicalCode = musicalInstrumentCodeInfo.find((item: any) => item.id === state.musicalCodeId)?.code
|
|
|
- pitchTrack = data.musicalInstruments?.find((item: any) => item.code === musicalCode)
|
|
|
+ pitchTrack = data.musicalInstruments?.find((item: any) => item.code?.split(',')[0] === musicalCode)
|
|
|
} else {
|
|
|
- pitchTrack = data.musicalInstruments?.find((item: any) => item.code === musicalCode)
|
|
|
+ pitchTrack = data.musicalInstruments?.find((item: any) => item.code?.split(',')[0] === musicalCode)
|
|
|
}
|
|
|
let musicalRenderType = ''
|
|
|
// if (pitchTrack?.defaultScore) {
|
|
@@ -1700,7 +1703,8 @@ export const fillWordColor = () => {
|
|
|
})
|
|
|
const currentLyrics: SVGAElement[] = Array.from(document.querySelectorAll(`.lyric${currentNote?.noteId}`));
|
|
|
currentLyrics.forEach((lyric, index) => {
|
|
|
- if (index === currentNote.repeatIdx) {
|
|
|
+ const lyricIndex = lyric.getAttribute('lyricIndex');
|
|
|
+ if ((index === currentNote.repeatIdx && currentNote.repeatIdx + 1 == lyricIndex) || (currentNote.repeatIdx > 0 && currentNote.formatLyricsEntries?.length === 1)) {
|
|
|
lyric?.classList.add('lyricActive')
|
|
|
}
|
|
|
})
|
|
@@ -1864,6 +1868,9 @@ export const refreshMusicSvg = () => {
|
|
|
clearSelection();
|
|
|
resetBaseRate();
|
|
|
state.activeMeasureIndex = -1;
|
|
|
+ if (query.workRecord) {
|
|
|
+ state.workSectionNeedReset = true;
|
|
|
+ }
|
|
|
// 销毁旋律线
|
|
|
destroySmoothAnimation()
|
|
|
musicScoreRef.value?.refreshMusicScore()
|