|
@@ -384,7 +384,8 @@ export default defineComponent({
|
|
|
}
|
|
|
if (musicSheetType == 'SINGLE') {
|
|
|
forms.musicSheetSoundList_YZ.forEach((musicSheetSound: any) => {
|
|
|
- if (forms.multiInstrumentSelection.includes(musicSheetSound.musicalInstrumentId)) {
|
|
|
+ if (forms.musicalInstrumentIdList.includes(musicSheetSound.musicalInstrumentId) &&
|
|
|
+ forms.multiInstrumentSelection.includes(musicSheetSound.musicalInstrumentId)) {
|
|
|
musicSheetSoundList.push({
|
|
|
...musicSheetSound,
|
|
|
musicSheetId: props.data.id,
|
|
@@ -747,6 +748,14 @@ export default defineComponent({
|
|
|
item.disabled = !item.enableFlag
|
|
|
|
|
|
state.instrumentIdNameMap.set(item.id + '', item.name)
|
|
|
+
|
|
|
+ forms.musicSheetSoundList_YZ.push({
|
|
|
+ 'musicSheetId': props.data.id,
|
|
|
+ 'musicalInstrumentId': item.id + '',
|
|
|
+ 'musicalInstrumentName': item.name,
|
|
|
+ 'audioFileUrl': null,
|
|
|
+ 'audioPlayType':'PLAY'
|
|
|
+ });
|
|
|
})
|
|
|
state.instrumentList = tempList
|
|
|
} catch {
|
|
@@ -855,21 +864,21 @@ export default defineComponent({
|
|
|
})
|
|
|
|
|
|
// 初始化演奏
|
|
|
- forms.musicalInstrumentIdList.forEach((next: any) => {
|
|
|
- let item = {} as any
|
|
|
- item.musicSheetId = props.data.id
|
|
|
- item.musicalInstrumentId = next;
|
|
|
- item.musicalInstrumentName = state.instrumentIdNameMap.get(next)
|
|
|
- item.audioPlayType = 'PLAY'
|
|
|
- for (let i = 0; i < state.musicSheetSoundList.length; i++) {
|
|
|
- if (state.musicSheetSoundList[i].musicalInstrumentId == next) {
|
|
|
- item.audioFileUrl = state.musicSheetSoundList[i].audioFileUrl
|
|
|
- forms.multiInstrumentSelection.push(next)
|
|
|
- break
|
|
|
+ for (let i = 0; i < state.musicSheetSoundList.length; i++) {
|
|
|
+ for (let j = 0; j < forms.musicSheetSoundList_YZ.length; j++) {
|
|
|
+ let musicalInstrumentId = state.musicSheetSoundList[i].musicalInstrumentId;
|
|
|
+ if (musicalInstrumentId && musicalInstrumentId == forms.musicSheetSoundList_YZ[j].musicalInstrumentId) {
|
|
|
+ forms.musicSheetSoundList_YZ[j].audioFileUrl = state.musicSheetSoundList[i].audioFileUrl
|
|
|
}
|
|
|
}
|
|
|
- forms.musicSheetSoundList_YZ.push(item);
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
+ for (let i = 0; i < state.musicSheetSoundList.length; i++) {
|
|
|
+ if (state.musicSheetSoundList[i].musicalInstrumentId) {
|
|
|
+ forms.multiInstrumentSelection.push(state.musicSheetSoundList[i].musicalInstrumentId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
setOwnerName()
|
|
|
axios.get(data.xmlFileUrl).then((res: any) => {
|
|
@@ -1452,17 +1461,16 @@ export default defineComponent({
|
|
|
multiple
|
|
|
maxTagCount={2}
|
|
|
onUpdateValue={async (value: any) => {
|
|
|
- forms.musicSheetSoundList_YZ = [];
|
|
|
state.instrumentList.forEach((instrument: any) => {
|
|
|
- if (value.includes(instrument.value)) {
|
|
|
- forms.musicSheetSoundList_YZ.push({
|
|
|
- 'musicSheetId': props.data.id,
|
|
|
- 'musicalInstrumentId': instrument.id + '',
|
|
|
- 'musicalInstrumentName': instrument.name,
|
|
|
- 'audioFileUrl': null,
|
|
|
- 'audioPlayType':'PLAY'
|
|
|
- });
|
|
|
- }
|
|
|
+ // if (value.includes(instrument.value)) {
|
|
|
+ // forms.musicSheetSoundList_YZ.push({
|
|
|
+ // 'musicSheetId': props.data.id,
|
|
|
+ // 'musicalInstrumentId': instrument.id + '',
|
|
|
+ // 'musicalInstrumentName': instrument.name,
|
|
|
+ // 'audioFileUrl': null,
|
|
|
+ // 'audioPlayType':'PLAY'
|
|
|
+ // });
|
|
|
+ // }
|
|
|
})
|
|
|
}}
|
|
|
/>
|
|
@@ -1611,7 +1619,7 @@ export default defineComponent({
|
|
|
return (
|
|
|
<>
|
|
|
<NGrid cols={1}>
|
|
|
- {forms.multiInstrumentSelection.includes(item.musicalInstrumentId) && (
|
|
|
+ {forms.musicalInstrumentIdList.includes(item.musicalInstrumentId) && forms.multiInstrumentSelection.includes(item.musicalInstrumentId) && (
|
|
|
<NFormItemGi
|
|
|
span={12}
|
|
|
label={item.musicalInstrumentName}
|