TIANYONG 1 rok pred
rodič
commit
be2b4a301e
2 zmenil súbory, kde vykonal 14 pridanie a 15 odobranie
  1. 2 2
      src/state.ts
  2. 12 13
      src/view/fingering/fingering-config.ts

+ 2 - 2
src/state.ts

@@ -944,8 +944,8 @@ const setState = (data: any, index: number) => {
   const subjectCode = data.subjectCodes ? data.subjectCodes.split(',')?.[0] : 0;
   // 乐器code
   let musicalCode = data.musicalInstrumentIdCodes ? data.musicalInstrumentIdCodes.split(',')?.[0] : 0;
-  const pitchSubject = musicalInstrumentCodeInfo.find((n) => n.code === subjectCode)
-  const pitchMusical = musicalInstrumentCodeInfo.find((n) => n.code === musicalCode)
+  const pitchSubject = musicalInstrumentCodeInfo.find((n) => n.code.toLocaleLowerCase() === subjectCode.toLocaleLowerCase())
+  const pitchMusical = musicalInstrumentCodeInfo.find((n) => n.code.toLocaleLowerCase() === musicalCode.toLocaleLowerCase())
   state.subjectCodeId = pitchSubject ? pitchSubject.id : 0
   state.musicalCodeId = pitchMusical ? pitchMusical.id : 0
   state.categoriesId = data.musicCategoryId;

+ 12 - 13
src/view/fingering/fingering-config.ts

@@ -232,21 +232,20 @@ export const mappingVoicePart = (id: number | string, soruce: "GYM" | "COLEXIU"
 export const matchVoicePart = (id: number | string, type: "SINGLE" | "CONCERT"): number => {
   if (type === "SINGLE") {
     const subject: { [_key: string | number]: any } = {
-      1: "pan-flute",
-      2: "ocarina",
-      3: "hulusi-flute",
-      4: "piccolo",
-      5: "melodica",
-      6: "baroque-recorder",
-      7: "",
-      8: 2,
-      9: 5,
-      10: 4,
+      33: "pan-flute",
+      34: "ocarina",
+      35: "hulusi-flute",
+      37: "piccolo",
+      36: "melodica",
+      38: "baroque-recorder",
+      1: 2,
+      5: 5,
+      3: 4,
       11: 12,
-      12: 14,
-      13: 13,
+      13: 14,
+      12: 13,
       14: 15,
-      15: 17,
+      16: 17,
     };
     return subject[id];
   } else {