Quellcode durchsuchen

处理显示指法问题

lex vor 11 Monaten
Ursprung
Commit
6ff6759220
1 geänderte Dateien mit 2 neuen und 24 gelöschten Zeilen
  1. 2 24
      src/page-instrument/view-figner/index.tsx

+ 2 - 24
src/page-instrument/view-figner/index.tsx

@@ -341,39 +341,17 @@ export default defineComponent({
           };
           if (Array.isArray(row.instruments)) {
             row.instruments.forEach((i: any) => {
+              const code = i.code ? i.code.split(",") : [];
               tempList.children.push({
                 text: i.name,
                 id: i.id,
-                value: mappingVoicePart(i.code, "INSTRUMENT"),
+                value: mappingVoicePart(code[0] || "", "INSTRUMENT"),
               });
             });
           }
           tempSubjects.push(tempList);
-          // if (row.instruments && row.instruments.length > 0) {
-          //   if (row.instruments.length > 1) {
-          //     row.instruments.forEach((i: any) => {
-          //       tempList.children.push({
-          //         text: i.name,
-          //         id: i.id,
-          //         value: mappingVoicePart(i.code, "INSTRUMENT"),
-          //       });
-          //     });
-          //   } else {
-          //     const singleRow = row.instruments[0];
-          //     if (singleRow.code) {
-          //       tempList.value = mappingVoicePart(singleRow.code, "INSTRUMENT");
-          //       tempList.id = singleRow.id;
-          //     }
-          //   }
-          // }
-          // data.subjects.push(tempList);
         });
         console.log(data.subject, "data.subject");
-        // tempSubjects.forEach((item: any) => {
-        //   if (item.value === data.subject && item.children?.length > 1) {
-        //     data.subject = item.children[0].value;
-        //   }
-        // });
         data.subjects = tempSubjects;
       } catch (e) {
         //