浏览代码

Merge branch 'feature-tianyong' into gym-test

TIANYONG 6 天之前
父节点
当前提交
76940e9984

+ 1 - 1
src/helpers/formateMusic.ts

@@ -1409,7 +1409,7 @@ export const formateTimes = (osmd: OpenSheetMusicDisplay) => {
 				trackIndex: note.trackIndex, // 当前的音符属于第几条分轨
 				isStaccato: note.voiceEntry.isStaccato(),
 				isRestFlag: note.isRestFlag,
-				noteId: note.NoteToGraphicalNoteObjectId || `restNote${note.sourceMeasure.MeasureNumberXML}`,
+				noteId: note.NoteToGraphicalNoteObjectId === undefined ? `restNote${note.sourceMeasure.MeasureNumberXML}` : note.NoteToGraphicalNoteObjectId,
 				// noteId: note.NoteToGraphicalNoteObjectId,
 				measureListIndex: note.sourceMeasure.measureListIndex,
 				MeasureNumberXML: note.sourceMeasure.MeasureNumberXML, // 当前的小节数,(从1开始)

+ 7 - 2
src/page-instrument/custom-plugins/guide-driver/index.tsx

@@ -1346,13 +1346,18 @@ export const EvaluatingReportDriver = defineComponent({
             title: "",
             description: "",
             popoverClass: "popoverClass popoverClassReport3 popoverClose",
-            align: "start",
+            align: "end",
             side: "bottom",
             prevBtnText: "再看一遍",
             doneBtnText: "完成",
             showButtons: ["next", "previous"],
             onPopoverRender: (popover: PopoverDOM, options: { config: Config; state: State }) => {
-              driverInitialPosition(popover, options);
+              options.config.stageRadius = 8;
+              options.config.stagePadding = 5;
+              try {
+                const rect = options.state.activeElement?.getBoundingClientRect();
+                popover.wrapper.style.marginLeft = ((rect?.width || 0) / 2) * -1 + 4 + "px";
+              } catch {}
             },
             onPrevClick: () => {
               driverObj.drive(0);

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

@@ -224,7 +224,8 @@ export default defineComponent({
       if (preTimes.length) {
         for (let index = preTimes.length-1; index >= 0; index--) {
           const item = preTimes[index]
-          const note = getNoteByMeasuresSlursStart(item)
+          // const note = getNoteByMeasuresSlursStart(item)
+          const note = item
           if (note.formatLyricsEntries.contains('Play') || note.formatLyricsEntries.contains('Play...')) {
             preLyricsContent = 'Play'
             break
@@ -238,7 +239,8 @@ export default defineComponent({
       } 
       for (let index = 0; index < selectTimes.length; index++) {
         const item = selectTimes[index];
-        const note = getNoteByMeasuresSlursStart(item);
+        // const note = getNoteByMeasuresSlursStart(item);
+        const note = item;
         // #8701 bug: 评测模式,是以曲谱本身的速度进行评测,所以rate取1,不需要转换
         // const rate = state.speed / state.originSpeed;
         const rate = state.basePlayRate * state.originAudioPlayRate; // 播放倍率

+ 4 - 1
src/state.ts

@@ -1304,7 +1304,10 @@ const queryMusicXml = async (id: string, xmlUr: string) => {
 
 const getMusicInfo = async (res: any) => {
   try {
-    await initInstrumentCode()
+    // 单行谱页面不需要调用此接口
+    if (!state.isSimplePage) {
+      await initInstrumentCode()
+    }
   } catch (error) {
     // console.log(error)
   }

+ 1 - 1
src/view/evaluating/index.tsx

@@ -855,7 +855,7 @@ export default defineComponent({
       } else {
         removeSocketStatus(handleSocketStatus);
       }
-      api_closeCamera();
+      // api_closeCamera();
       api_disconnectSocket();
       console.log("卸载评测模块成功");
     });

+ 1 - 1
src/view/selection/index.module.less

@@ -85,7 +85,7 @@
     position: absolute;
     right: 10px;
     top: -45px;
-    transform: translateX(-50%);    
+    // transform: translateX(-50%);    
     font-size: 16px;
     font-family: "Roboto", sans-serif;
     font-weight: bold;