|  | @@ -523,6 +523,9 @@ export default defineComponent({
 | 
											
												
													
														|  |                ) {
 |  |                ) {
 | 
											
												
													
														|  |                  musicSheetSoundList.push({
 |  |                  musicSheetSoundList.push({
 | 
											
												
													
														|  |                    ...musicSheetSound,
 |  |                    ...musicSheetSound,
 | 
											
												
													
														|  | 
 |  | +                  musicalInstrumentId:
 | 
											
												
													
														|  | 
 |  | +                    musicSheetSound.musicalInstrumentId ||
 | 
											
												
													
														|  | 
 |  | +                    instrumentCodeToInstrumentId(musicSheetSound.track),
 | 
											
												
													
														|  |                    musicSheetId: props.data.id,
 |  |                    musicSheetId: props.data.id,
 | 
											
												
													
														|  |                    audioPlayType: 'PLAY'
 |  |                    audioPlayType: 'PLAY'
 | 
											
												
													
														|  |                  })
 |  |                  })
 | 
											
										
											
												
													
														|  | @@ -916,6 +919,40 @@ export default defineComponent({
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    // 通过乐器编码返回乐器编号
 | 
											
												
													
														|  | 
 |  | +    const instrumentCodeToInstrumentId = (code: string) => {
 | 
											
												
													
														|  | 
 |  | +      const codeIdMap = new Map<string, []>() as any
 | 
											
												
													
														|  | 
 |  | +      const codeMapKeys: string[] = []
 | 
											
												
													
														|  | 
 |  | +      state.instrumentData.forEach((data: any) => {
 | 
											
												
													
														|  | 
 |  | +        if (!data.disabled) {
 | 
											
												
													
														|  | 
 |  | +          const codes = data.code.split(/[,,]/)
 | 
											
												
													
														|  | 
 |  | +          codes.forEach((code: string) => {
 | 
											
												
													
														|  | 
 |  | +            let codeTemp = code.replaceAll(' ', '').toLowerCase()
 | 
											
												
													
														|  | 
 |  | +            codeMapKeys.push(codeTemp)
 | 
											
												
													
														|  | 
 |  | +            if (codeIdMap.has(codeTemp)) {
 | 
											
												
													
														|  | 
 |  | +              codeIdMap.get(codeTemp).push(data.id + '')
 | 
											
												
													
														|  | 
 |  | +            } else {
 | 
											
												
													
														|  | 
 |  | +              const arr = [] as any
 | 
											
												
													
														|  | 
 |  | +              arr.push(data.id + '')
 | 
											
												
													
														|  | 
 |  | +              codeIdMap.set(codeTemp, arr)
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +      })
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +      if (!code) {
 | 
											
												
													
														|  | 
 |  | +        return ''
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      code = code.replaceAll(' ', '').toLowerCase()
 | 
											
												
													
														|  | 
 |  | +      const tempCode = getInstrumentName(codeMapKeys, code)
 | 
											
												
													
														|  | 
 |  | +      if (codeIdMap.has(tempCode)) {
 | 
											
												
													
														|  | 
 |  | +        const result = codeIdMap.get(tempCode)
 | 
											
												
													
														|  | 
 |  | +        console.log('result:', result)
 | 
											
												
													
														|  | 
 |  | +        return result[0] || ''
 | 
											
												
													
														|  | 
 |  | +      }
 | 
											
												
													
														|  | 
 |  | +      return ''
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      // 获取xml中所有轨道 乐器
 |  |      // 获取xml中所有轨道 乐器
 | 
											
												
													
														|  |      const getPartListNames = (xml: any) => {
 |  |      const getPartListNames = (xml: any) => {
 | 
											
												
													
														|  |        if (!xml) return []
 |  |        if (!xml) return []
 |