|
@@ -98,7 +98,9 @@ export default defineComponent({
|
|
|
applicationId: null, //应用ID
|
|
|
musicPreview: false,
|
|
|
musicScore: null as any,
|
|
|
- useProjectData: [] as any // 适用项目行数据
|
|
|
+ useProjectData: [] as any, // 适用项目行数据
|
|
|
+ subjectInstrumentMap: new Map(), // 声部乐器
|
|
|
+ subjectId: null,//
|
|
|
})
|
|
|
|
|
|
onMounted(async () => {
|
|
@@ -126,7 +128,8 @@ export default defineComponent({
|
|
|
const tempList = data || []
|
|
|
tempList.forEach((item: any) => {
|
|
|
item.label = item.subjectName
|
|
|
- item.value = item.instrumentId
|
|
|
+ item.value = item.subjectId
|
|
|
+ state.subjectInstrumentMap.set(item.subjectId, item.instrumentId)
|
|
|
})
|
|
|
state.subjectList = tempList
|
|
|
} catch {}
|
|
@@ -188,6 +191,13 @@ export default defineComponent({
|
|
|
const getList = async () => {
|
|
|
try {
|
|
|
state.loading = true
|
|
|
+
|
|
|
+ if (state.subjectId) {
|
|
|
+ state.searchForm.musicalInstrumentId = state.subjectInstrumentMap.get(state.subjectId)
|
|
|
+ }else {
|
|
|
+ state.searchForm.musicalInstrumentId = null
|
|
|
+ }
|
|
|
+
|
|
|
const sourceType = state.searchForm.sourceType
|
|
|
const { data } = await musicSheetPageByApplication({
|
|
|
...state.pagination,
|
|
@@ -537,7 +547,7 @@ export default defineComponent({
|
|
|
<NFormItem label="可用声部" path="musicalInstrumentId">
|
|
|
<NSelect
|
|
|
placeholder="请选择可用声部"
|
|
|
- v-model:value={state.searchForm.musicalInstrumentId}
|
|
|
+ v-model:value={state.subjectId}
|
|
|
options={state.subjectList}
|
|
|
clearable
|
|
|
/>
|