Browse Source

fix: 评测bug修复

TIANYONG 1 year ago
parent
commit
4ccc20c311

+ 4 - 3
src/page-instrument/view-detail/index.tsx

@@ -124,7 +124,8 @@ export default defineComponent({
 			state.detailId = data.id;
 			state.xmlUrl = data.xmlFileUrl;
 			state.partIndex = index;
-			state.subjectId = data.track;
+			state.trackId = data.track;
+      state.subjectId = data.musicSubject;
 			state.categoriesId = data.categoriesId;
 			state.categoriesName = data.musicTagNames;
 			state.enableEvaluation = data.canEvaluate ? true : false;
@@ -163,9 +164,9 @@ export default defineComponent({
       // 	isRhythmicExercises();
 
       // 设置指法
-      const code = mappingVoicePart(state.subjectId, "INSTRUMENT");
+      const code = mappingVoicePart(state.trackId, "INSTRUMENT");
       state.fingeringInfo = subjectFingering(code);
-      console.log("🚀 ~ state.fingeringInfo:", state.fingeringInfo, state.subjectId, state.track);
+      console.log("🚀 ~ state.fingeringInfo:", state.fingeringInfo, state.trackId, state.track);
 
       // 检测是否原音和伴奏都有
       if (!state.music || !state.accompany) {

+ 1 - 0
src/state.ts

@@ -47,6 +47,7 @@ const state = reactive({
   xmlUrl: "",
   /** 声部ID */
   subjectId: 0 as number,
+  trackId: 0 as string | number,
   /** 分类ID */
   categoriesId: 0,
   /** 分类名称 */

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

@@ -203,6 +203,7 @@ export const addMeasureScore = (measureScore: any, show = true) => {
 };
 
 const handleScoreResult = (res?: IPostMessage) => {
+	console.log('返回', res)
 	if (res?.content) {
 		const { header, body } = res.content;
 		// 效音返回

+ 3 - 0
src/view/plugins/toggleMusicSheet/choosePartName/index.module.less

@@ -29,11 +29,14 @@
 
   .picker {
     flex: 1;
+    height: 100px;
   }
 
   .button {
     width: 50%;
     height: 40Px;
     margin: 10Px auto;
+    position: relative;
+    z-index: 9;
   }
 }