|
@@ -40,7 +40,7 @@ import {
|
|
|
musicSheetStatusList
|
|
|
} from '@views/music-library/api'
|
|
|
import UpdateMusic from '@views/music-library/project-music-sheet/module/gym/updateMusic'
|
|
|
-import { subjectPage, sysApplicationPage } from '@views/system-manage/api'
|
|
|
+import {musicSheetApplicationExtendSubjectList, subjectPage, sysApplicationPage} from '@views/system-manage/api'
|
|
|
import { filterTimes } from '@/utils/dateUtil'
|
|
|
import deepClone from '@/utils/deep.clone'
|
|
|
import {copyText, getOwnerName} from '@views/music-library/musicUtil'
|
|
@@ -70,8 +70,7 @@ export default defineComponent({
|
|
|
searchForm: {
|
|
|
keyword: null,
|
|
|
musicSheetType: null, //曲目类型(SINGLE:单曲 CONCERT:合奏)
|
|
|
- subjectId: null, //声部ID
|
|
|
- subjectIds: null, //曲目声部ID集合
|
|
|
+ musicalInstrumentId: null, // 乐器ID
|
|
|
musicCategoryIds: null, //曲目分类ID
|
|
|
status: null, //曲目状态(0:停用,1:启用)
|
|
|
sourceType: null, //来源类型/作者属性(PLATFORM: 平台; ORG: 机构; PERSON: 个人)
|
|
@@ -99,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 () => {
|
|
@@ -121,11 +122,14 @@ export default defineComponent({
|
|
|
// 加载声部
|
|
|
|
|
|
try {
|
|
|
- const { data } = await subjectPage({ page: 1, rows: 999 })
|
|
|
- const tempList = data.rows || []
|
|
|
+ const { data } = await musicSheetApplicationExtendSubjectList({
|
|
|
+ applicationId: state.applicationId
|
|
|
+ })
|
|
|
+ const tempList = data || []
|
|
|
tempList.forEach((item: any) => {
|
|
|
- item.label = item.name
|
|
|
- item.value = item.id + ''
|
|
|
+ item.label = item.subjectName
|
|
|
+ item.value = item.subjectId
|
|
|
+ state.subjectInstrumentMap.set(item.subjectId, item.instrumentId)
|
|
|
})
|
|
|
state.subjectList = tempList
|
|
|
} catch {}
|
|
@@ -187,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,
|
|
@@ -367,9 +378,9 @@ export default defineComponent({
|
|
|
key: 'paymentType',
|
|
|
render: (row: any) => {
|
|
|
return (
|
|
|
- <div>
|
|
|
- {getMapValueByKey(row.paymentType, new Map(Object.entries(musicSheetPaymentType)))}
|
|
|
- </div>
|
|
|
+ <div>
|
|
|
+ {row.paymentType == 'VIP' ? '收费' : '免费'}
|
|
|
+ </div>
|
|
|
)
|
|
|
}
|
|
|
},
|
|
@@ -533,10 +544,10 @@ export default defineComponent({
|
|
|
clearable
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
- <NFormItem label="可用声部" path="subjectId">
|
|
|
+ <NFormItem label="可用声部" path="musicalInstrumentId">
|
|
|
<NSelect
|
|
|
placeholder="请选择可用声部"
|
|
|
- v-model:value={state.searchForm.subjectId}
|
|
|
+ v-model:value={state.subjectId}
|
|
|
options={state.subjectList}
|
|
|
clearable
|
|
|
/>
|
|
@@ -568,7 +579,16 @@ export default defineComponent({
|
|
|
<NSelect
|
|
|
placeholder="请选择收费方式"
|
|
|
v-model:value={state.searchForm.paymentType}
|
|
|
- options={getSelectDataFromObj(musicSheetPaymentType)}
|
|
|
+ options={[
|
|
|
+ {
|
|
|
+ label: '免费',
|
|
|
+ value: 'FREE'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '收费',
|
|
|
+ value: 'VIP'
|
|
|
+ }
|
|
|
+ ]}
|
|
|
clearable
|
|
|
></NSelect>
|
|
|
</NFormItem>
|