|
@@ -463,14 +463,26 @@ export default defineComponent({
|
|
|
instrumentCodeList.push(instrumentCode)
|
|
|
}
|
|
|
}
|
|
|
- const codeIdMap = new Map<string, string>()
|
|
|
+ const codeIdMap = new Map<string, []>() as any
|
|
|
state.instrumentData.forEach((data: any) => {
|
|
|
- codeIdMap.set(data.code, data.id + '')
|
|
|
+ const codes = data.code.split(/,|,/)
|
|
|
+ codes.forEach((code: string) => {
|
|
|
+ if (codeIdMap.has(code)) {
|
|
|
+ codeIdMap.get(code).push(data.id + '')
|
|
|
+ } else {
|
|
|
+ const arr = [] as any;
|
|
|
+ arr.push(data.id + '')
|
|
|
+ codeIdMap.set(code, arr)
|
|
|
+ }
|
|
|
+ // codeIdMap.set(code, data.id + '')
|
|
|
+ })
|
|
|
})
|
|
|
forms.musicalInstrumentIdList = []
|
|
|
instrumentCodeList.forEach((code: string) => {
|
|
|
if (codeIdMap.has(code)) {
|
|
|
- forms.musicalInstrumentIdList.push(codeIdMap.get(code))
|
|
|
+ codeIdMap.get(code).forEach((c: any) => {
|
|
|
+ forms.musicalInstrumentIdList.push(c)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -1318,32 +1330,29 @@ export default defineComponent({
|
|
|
<NRadio value={'invert'}>反选</NRadio>
|
|
|
</NRadioGroup>
|
|
|
</NGi>
|
|
|
- <NGi span={24} style={'margin-top:5px'}>
|
|
|
- <NFormItemGi
|
|
|
- label=""
|
|
|
- path="multiTracksSelection"
|
|
|
- rule={[
|
|
|
- {
|
|
|
- required: false
|
|
|
- }
|
|
|
- ]}
|
|
|
- >
|
|
|
- <NCheckboxGroup v-model:value={forms.multiTracksSelection}
|
|
|
- onUpdateValue={()=>{
|
|
|
- console.log("multiTracksSelection",forms.multiTracksSelection)
|
|
|
- console.log("musicSheetSoundList",forms.musicSheetSoundList)
|
|
|
- }}
|
|
|
- >
|
|
|
- <NGrid yGap={2} cols={4}>
|
|
|
- {state.partListNames.map((item: any) => (
|
|
|
- <NGi>
|
|
|
- <NCheckbox value={item.value} label={item.label} />
|
|
|
- </NGi>
|
|
|
- ))}
|
|
|
- </NGrid>
|
|
|
- </NCheckboxGroup>
|
|
|
- </NFormItemGi>
|
|
|
- </NGi>
|
|
|
+ {(state.partListNames && state.partListNames.length > 0) && (
|
|
|
+ <NGi span={24} style={'margin-top:5px'}>
|
|
|
+ <NFormItemGi
|
|
|
+ label=""
|
|
|
+ path="multiTracksSelection"
|
|
|
+ rule={[
|
|
|
+ {
|
|
|
+ required: false
|
|
|
+ }
|
|
|
+ ]}
|
|
|
+ >
|
|
|
+ <NCheckboxGroup v-model:value={forms.multiTracksSelection}>
|
|
|
+ <NGrid yGap={2} cols={4}>
|
|
|
+ {state.partListNames.map((item: any) => (
|
|
|
+ <NGi>
|
|
|
+ <NCheckbox value={item.value} label={item.label} />
|
|
|
+ </NGi>
|
|
|
+ ))}
|
|
|
+ </NGrid>
|
|
|
+ </NCheckboxGroup>
|
|
|
+ </NFormItemGi>
|
|
|
+ </NGi>
|
|
|
+ )}
|
|
|
</NGrid>
|
|
|
</NFormItemGi>
|
|
|
</NGrid>
|
|
@@ -1492,17 +1501,23 @@ export default defineComponent({
|
|
|
options={initPartsListStatus(item.track)}
|
|
|
onUpdateValue={(value: any) => {
|
|
|
const track = item.track
|
|
|
- // 声轨交换
|
|
|
- forms.musicSheetSoundList.forEach((next:any)=>{
|
|
|
- if (next.track == value) {
|
|
|
- next.track = track
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
if (track) {
|
|
|
+ // 声轨交换
|
|
|
+ forms.musicSheetSoundList.forEach((next: any) => {
|
|
|
+ if (next.track == value) {
|
|
|
+ next.track = track
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
const index = forms.multiTracksSelection.indexOf(item.track)
|
|
|
forms.multiTracksSelection.splice(index, 1)
|
|
|
+ } else {
|
|
|
+ forms.musicSheetSoundList = forms.musicSheetSoundList.filter((next:any) => {
|
|
|
+ return next.track != value
|
|
|
+ })
|
|
|
}
|
|
|
+
|
|
|
if (value && !forms.multiTracksSelection.includes(value)) {
|
|
|
forms.multiTracksSelection.push(value)
|
|
|
}
|
|
@@ -1515,7 +1530,7 @@ export default defineComponent({
|
|
|
<NButton
|
|
|
type="primary"
|
|
|
text
|
|
|
- disabled={forms.musicSheetSoundList.length === 1}
|
|
|
+ // disabled={forms.musicSheetSoundList.length === 1}
|
|
|
onClick={() => removeSys(index)}
|
|
|
>
|
|
|
删除
|