|
@@ -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;
|
|
|
}
|
|
|
|