|
@@ -388,7 +388,7 @@ export default defineComponent({
|
|
|
forms.multiTracksSelection.forEach((item: any) => {
|
|
|
if (item) {
|
|
|
let contain = false;
|
|
|
- let code = item.replaceAll(' ', '').toLocaleLowerCase()
|
|
|
+ let code = item.trim().toLocaleLowerCase()
|
|
|
for (let i = 0; i < set.length; i++) {
|
|
|
if (set[i].startsWith(code) || set[i].endsWith(code)) {
|
|
|
contain = true
|
|
@@ -437,12 +437,10 @@ export default defineComponent({
|
|
|
musicSheetId: props.data.id,
|
|
|
audioPlayType: 'PLAY'
|
|
|
})
|
|
|
- }
|
|
|
- if (forms.musicSheetSoundList_all_subject) {
|
|
|
existYzFile = true
|
|
|
}
|
|
|
} else {
|
|
|
- if (forms.musicSheetSoundList_YZ.length > 0) {
|
|
|
+ if (forms.musicSheetSoundList_YZ.length > 0 && forms.playMode == 'MP3') {
|
|
|
audioPlayTypes.push("PLAY")
|
|
|
forms.musicSheetSoundList_YZ.forEach((musicSheetSound: any) => {
|
|
|
if (forms.musicalInstrumentIdList.includes(musicSheetSound.musicalInstrumentId) && musicSheetSound.audioFileUrl) {
|
|
@@ -458,7 +456,7 @@ export default defineComponent({
|
|
|
} else if (musicSheetType == 'CONCERT') {
|
|
|
audioPlayTypes.push("PLAY")
|
|
|
forms.musicSheetSoundList_YY.forEach((musicSheetSound: any) => {
|
|
|
- if (musicSheetSound.audioFileUrl) {
|
|
|
+ if (musicSheetSound.audioFileUrl && musicSheetSound.track != null) {
|
|
|
musicSheetSoundList.push({
|
|
|
...musicSheetSound,
|
|
|
musicSheetId: props.data.id,
|
|
@@ -502,7 +500,7 @@ export default defineComponent({
|
|
|
isUseSystemBeat: forms.isUseSystemBeat,
|
|
|
isShowFingering: forms.isShowFingering,
|
|
|
isPlayBeat: forms.isPlayBeat,
|
|
|
- multiTracksSelection: forms.isAllSubject ? "" : forms.multiTracksSelection.join(','),
|
|
|
+ multiTracksSelection: forms.multiTracksSelection.join(','),
|
|
|
playSpeed: forms.playSpeed,
|
|
|
playMode: forms.playMode,
|
|
|
xmlFileUrl: forms.xmlFileUrl,
|
|
@@ -1106,35 +1104,40 @@ export default defineComponent({
|
|
|
|
|
|
const existSoundList = data.musicSheetSoundList ? data.musicSheetSoundList : []
|
|
|
// 如果只有一个原音文件,并且原音没有对应声轨,取xml解析中的第一个声轨绑定当当前原音
|
|
|
- if (existSoundList.length === 1 && !formatTrack(existSoundList[0].track)) {
|
|
|
- let track = state.partListNames.length > 0 ? state.partListNames[0].value : null;
|
|
|
- forms.musicSheetSoundList_YY.push({
|
|
|
- audioFileUrl: existSoundList[0].audioFileUrl, // 原音
|
|
|
- musicalInstrumentId: existSoundList[0].musicalInstrumentId,
|
|
|
- track: track, // 轨道
|
|
|
- audioPlayType: 'PLAY'
|
|
|
- })
|
|
|
- if (track && !forms.multiTracksSelection.includes(track)) {
|
|
|
- forms.multiTracksSelection.push(track)
|
|
|
- }
|
|
|
- } else {
|
|
|
+ // if (existSoundList.length === 1 && !formatTrack(existSoundList[0].track)) {
|
|
|
+ // let track = state.partListNames.length > 0 ? state.partListNames[0].value : null;
|
|
|
+ // forms.musicSheetSoundList_YY.push({
|
|
|
+ // audioFileUrl: existSoundList[0].audioFileUrl, // 原音
|
|
|
+ // musicalInstrumentId: existSoundList[0].musicalInstrumentId,
|
|
|
+ // track: track, // 轨道
|
|
|
+ // audioPlayType: 'PLAY'
|
|
|
+ // })
|
|
|
+ // if (track && !forms.multiTracksSelection.includes(track)) {
|
|
|
+ // forms.multiTracksSelection.push(track)
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
const tracks = [] as any
|
|
|
state.partListNames.forEach((item: any) => {
|
|
|
let audioFileUrl = null
|
|
|
let musicalInstrumentId = null
|
|
|
- existSoundList.forEach((next: any) => {
|
|
|
- if (!next.track || next.track.trim() == '') {
|
|
|
- next.track = ''
|
|
|
- }
|
|
|
- if (next.track == item.value) {
|
|
|
- audioFileUrl = next.audioFileUrl
|
|
|
- musicalInstrumentId = next.musicalInstrumentId
|
|
|
- }
|
|
|
- })
|
|
|
+ if (forms.musicSheetType == 'CONCERT') {
|
|
|
+ existSoundList.forEach((next: any) => {
|
|
|
+ if (next.audioPlayType == 'PLAY') {
|
|
|
+ if (!next.track || next.track.trim() == '') {
|
|
|
+ next.track = ''
|
|
|
+ }
|
|
|
+ if (next.track == item.value) {
|
|
|
+ audioFileUrl = next.audioFileUrl
|
|
|
+ musicalInstrumentId = next.musicalInstrumentId
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
forms.musicSheetSoundList_YY.push({
|
|
|
audioFileUrl: audioFileUrl, // 原音
|
|
|
musicalInstrumentId: musicalInstrumentId, // 乐器
|
|
|
- track: item.value // 轨道
|
|
|
+ track: item.value, // 轨道
|
|
|
+ audioPlayType: 'PLAY'
|
|
|
})
|
|
|
tracks.push(item.value)
|
|
|
})
|
|
@@ -1146,16 +1149,18 @@ export default defineComponent({
|
|
|
// 处理没有声轨,但有原音
|
|
|
if (data.musicSheetType == 'CONCERT') {
|
|
|
state.musicSheetSoundList.forEach((next: any) => {
|
|
|
- if (next.track && !tracks.includes(next.track.trim()) && next.audioPlayType == 'PLAY') {
|
|
|
- forms.musicSheetSoundList_YY.push({
|
|
|
- audioFileUrl: next.audioFileUrl, // 原音
|
|
|
- musicalInstrumentId: next.musicalInstrumentId,
|
|
|
- track: next.track ? next.track.trim() : '', // 轨道
|
|
|
- audioPlayType: 'PLAY'
|
|
|
- })
|
|
|
+ if (next.audioPlayType == 'PLAY') {
|
|
|
+ if (next.track && !tracks.includes(next.track.trim()) && next.audioPlayType == 'PLAY') {
|
|
|
+ forms.musicSheetSoundList_YY.push({
|
|
|
+ audioFileUrl: next.audioFileUrl, // 原音
|
|
|
+ musicalInstrumentId: next.musicalInstrumentId,
|
|
|
+ track: next.track ? next.track.trim() : '', // 轨道
|
|
|
+ audioPlayType: 'PLAY'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -1414,7 +1419,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
>
|
|
|
<NRadio value="MP3">MP3</NRadio>
|
|
|
- <NRadio value="MIDI">MID</NRadio>
|
|
|
+ {/*{forms.playMode == 'MIDI' && (<NRadio value="MIDI">MID</NRadio>)}*/}
|
|
|
</NRadioGroup>
|
|
|
</NFormItemGi>
|
|
|
{forms.playMode === 'MP3' && (
|
|
@@ -2042,7 +2047,7 @@ export default defineComponent({
|
|
|
rule={[
|
|
|
{
|
|
|
// required: forms.multiTracksSelection.indexOf(forms.musicSheetSoundList_YY[index].audioFileUrl) > -1,
|
|
|
- required: true,
|
|
|
+ required: false,
|
|
|
message: `请上传${
|
|
|
item.track ? item.track + '的' : '第' + (index + 1) + '个'
|
|
|
}原音`
|