Browse Source

声轨校验调整

yuanliang 1 year ago
parent
commit
3d7aee663a
1 changed files with 9 additions and 8 deletions
  1. 9 8
      src/views/music-library/music-sheet/modal/music-operationV2.tsx

+ 9 - 8
src/views/music-library/music-sheet/modal/music-operationV2.tsx

@@ -393,8 +393,7 @@ export default defineComponent({
           data.rows.map((row: any) => {
             if (row.code) {
               row.code.split(',').forEach((code: string) => {
-                let temp = code.replaceAll(' ', '')
-                set.push(temp.toLocaleLowerCase())
+                set.push(code.trim().toLocaleLowerCase())
               })
             }
           })
@@ -402,13 +401,15 @@ export default defineComponent({
           forms.multiTracksSelection.forEach((item: any) => {
             if (item) {
               let contain = false;
-              let code = item.trim().toLocaleLowerCase()
-              for (let i = 0; i < set.length; i++) {
-                if (set[i].startsWith(code) || set[i].endsWith(code)) {
-                  contain = true
-                  break
-                }
+              if (set.includes(item.trim().toLocaleLowerCase())) {
+                contain = true
               }
+              // for (let i = 0; i < set.length; i++) {
+              //   if (set[i].startsWith(code) || set[i].endsWith(code)) {
+              //     contain = true
+              //     break
+              //   }
+              // }
               if (!contain) {
                 unDefinedTrack.push(item)
               }