소스 검색

fix: 查看报告 listen,play问题修复

TIANYONG 2 달 전
부모
커밋
e32b49ca53
2개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 1
      src/page-instrument/view-evaluat-report/index.tsx
  2. 1 1
      src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

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

@@ -84,6 +84,7 @@ export default defineComponent({
       musicalNotesPlayStats: [] as any[],
       userMeasureScore: {} as any,
       isNewReport: true,
+      isSpecialReport: false, // 是否是特殊的评测记录(含有listent、play等曲子的评测记录,非选段状态下可能返回的评测数据不是从第1小节开始的,这种情况需要兼容处理)
     });
     const getAPPData = async () => {
       const screenData = await isSpecialShapedScreen();
@@ -271,7 +272,10 @@ export default defineComponent({
       // console.log(1111,notes)
       for (const note of notes) {
         const idx = note.musicalNotesIndex !== undefined ? note.musicalNotesIndex : note.index;
-        const active = detailData.isNewReport ? notes[0]?.measureRenderIndex != 0 ? allNote.value[idx] : allNote.value.find((item: any) => item.i === idx) : allNote.value[idx];
+        let active = detailData.isNewReport ? notes[0]?.measureRenderIndex != 0 ? allNote.value[idx] : allNote.value.find((item: any) => item.i === idx) : allNote.value[idx];
+        if (detailData.isSpecialReport) {
+          active = allNote.value.find((item: any) => item.i === idx)
+        }    
         setTimeout(() => {
           if (!active?.id) return;
           if (active?.id && useedid.value.includes(active?.id)) {
@@ -427,6 +431,7 @@ export default defineComponent({
       beams.forEach((item: any) => {
         item.classList.add(styles.beam);
       });
+      detailData.isSpecialReport = startMeasureNum > 0 && detailData.musicalNotesPlayStats?.[0]?.musicalNotesIndex != 0;
       //setPathColor();
       setViewColor();
       // setMearureColor();

+ 1 - 1
src/view/plugins/toggleMusicSheet/choosePartName/index.tsx

@@ -77,7 +77,7 @@ export default defineComponent({
         <div class={styles.pickerCon}>
           <div class={styles.pickerBox}>
             {
-              state.isScoreRender &&
+              state.isScoreRender && state.modeType === "practise" && 
                 <>
                   {/* <div class={styles.titCon}>
                     <div class={styles.tit}>选择总谱</div>