Bläddra i källkod

Merge branch 'feature-tianyong' into gym-test

TIANYONG 5 månader sedan
förälder
incheckning
d6b93b4ce2

+ 2 - 2
src/page-instrument/evaluat-model/index.tsx

@@ -185,8 +185,8 @@ export default defineComponent({
       actualBeatLength = Math.round((state.times[0].fixtime * 1000) / 1);
       // 如果是阶段评测,选取该阶段的times
       if (state.isSelectMeasureMode && state.section.length) {
-        const startIndex = state.times.findIndex((n: any) => n.noteId == state.section[0].noteId);
-        let endIndex = state.times.findIndex((n: any) => n.noteId == state.section[1].noteId);
+        const startIndex = state.section[0].noteId ? state.times.findIndex((n: any) => n.noteId == state.section[0].noteId) : state.times.findIndex((n: any) => n.MeasureNumberXML == state.section[0].MeasureNumberXML);
+        let endIndex = state.section[1].noteId ? state.times.findIndex((n: any) => n.noteId == state.section[1].noteId) : state.times.findIndex((n: any) => n.MeasureNumberXML == state.section[1].MeasureNumberXML);
         endIndex = endIndex < state.section[1].i ? state.section[1].i : endIndex;
         if (startIndex > 1) {
           // firstNoteTime应该取预备小节的第一个音符的开始播放的时间

+ 2 - 1
src/page-instrument/view-evaluat-report/index.tsx

@@ -267,10 +267,11 @@ export default defineComponent({
     const setViewColor = () => {
       clearViewColor();
       const notes = filterNotes();
+      console.log('评测报告111')
       // console.log(1111,notes)
       for (const note of notes) {
         const idx = note.musicalNotesIndex !== undefined ? note.musicalNotesIndex : note.index;
-        const active = detailData.isNewReport ? allNote.value.find((item: any) => item.i === idx) : allNote.value[idx];
+        const active = detailData.isNewReport ? notes[0]?.measureRenderIndex != 0 ? allNote.value[idx] : allNote.value.find((item: any) => item.i === idx) : allNote.value[idx];
         setTimeout(() => {
           if (!active?.id) return;
           if (active?.id && useedid.value.includes(active?.id)) {