Browse Source

feat: 修改

TIANYONG 3 months ago
parent
commit
e7bfa51a52
2 changed files with 16 additions and 3 deletions
  1. 1 1
      osmd-extended
  2. 15 2
      src/page-instrument/report-new/index.tsx

+ 1 - 1
osmd-extended

@@ -1 +1 @@
-Subproject commit 6b139a79b2825dd9e4621336e29f5db52c771092
+Subproject commit 2932a178d64983901e533ffd0d6abb1a8235a046

+ 15 - 2
src/page-instrument/report-new/index.tsx

@@ -16,9 +16,20 @@ export default defineComponent({
     const scoreData = reactive({
         videoFilePath: "", // 回放视频路径
         openRealPitch: false,
+        xmlInfo: {} as any,
         xmlNotes: [],
     });
 
+    // 根据音符构造小节信息
+    const createMeasureList = (notes: Array<any>) => {
+        let arr = [];
+        const preMeasureNumber = 1;
+        for (let index = 0; index < notes.length; index++) {
+            const note = notes[index];
+            
+        }
+    }
+
     const getRecordDetail = async () => {
         state.isEvaluatReport = true;
         const res = await api_musicPracticeRecordDetail(query.id);
@@ -26,11 +37,13 @@ export default defineComponent({
         let resultData = {} as any;
         try {
           resultData = eval('(' + res?.data?.scoreData + ')');
-          scoreData.xmlNotes = eval('(' + JSON.parse(res.data.scoreData)?.musicalNotesPlayStats?.musicXmlBasicInfo + ')')?.musicXmlInfos || []
+          scoreData.xmlInfo = eval('(' + JSON.parse(res.data.scoreData)?.musicalNotesPlayStats?.musicXmlBasicInfo + ')') || {}
+          scoreData.xmlNotes = scoreData.xmlInfo.musicXmlInfos || []
+          createMeasureList(scoreData.xmlNotes)
+          console.log(11111,resultData,scoreData.xmlInfo,scoreData.xmlNotes)
         } catch (error) {
           console.error("解析评测结果:", error);
         }
-        console.log(11111,scoreData.xmlNotes)
         scoreData.videoFilePath = res.data?.videoFilePath || res.data?.recordFilePath;
     }