|
@@ -34,7 +34,7 @@ import MusicOperation from '../modal/music-operationV2'
|
|
|
import { subjectPage } from '@/views/system-manage/api'
|
|
|
import MusicPreView from '../modal/musicPreView'
|
|
|
import UseProject from '@views/music-library/music-sheet/modal/use-project'
|
|
|
-import { getMapValueByKey } from '@/utils/filters'
|
|
|
+import { filterAudioPlayType, getMapValueByKey } from '@/utils/filters'
|
|
|
import { appKey, musicSheetSourceType } from '@/utils/constant'
|
|
|
import { getSelectDataFromObj } from '@/utils/objectUtil'
|
|
|
import { sysApplicationPage } from '@views/menu-manage/api'
|
|
@@ -46,6 +46,7 @@ import { HelpCircleOutline } from '@vicons/ionicons5'
|
|
|
import { musicalInstrumentPage } from '@views/system-manage/subject-manage/api'
|
|
|
import MusiceBeatTime from '../modal/musiceBeatTime'
|
|
|
import MusicPlatform from '../modal/music-platform'
|
|
|
+import { audioPlayTypeArray } from '@/utils/searchArray'
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'music-list',
|
|
@@ -76,6 +77,7 @@ export default defineComponent({
|
|
|
musicalInstrumentId: null, // 乐器ID
|
|
|
dataCorrect: null, // 数据修复
|
|
|
generateFirst: null, // 妙级课需要针对生成节拍器音频
|
|
|
+ audioPlayTypes: null, // 场景
|
|
|
generateMetronomeAudio: null // 是否生成节拍器音频
|
|
|
},
|
|
|
dataList: [] as any,
|
|
@@ -228,6 +230,21 @@ export default defineComponent({
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
+ title: '场景',
|
|
|
+ key: 'audioPlayTypes',
|
|
|
+ render(row: any) {
|
|
|
+ return (
|
|
|
+ <NSpace>
|
|
|
+ {row.audioPlayTypeArray.map((item: any) => (
|
|
|
+ <NTag type={item === 'SING' ? 'warning' : 'success'}>
|
|
|
+ {filterAudioPlayType(item)}
|
|
|
+ </NTag>
|
|
|
+ ))}
|
|
|
+ </NSpace>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: '审核版本',
|
|
|
minWidth: '100px',
|
|
|
key: 'appAuditFlag',
|
|
@@ -448,12 +465,22 @@ export default defineComponent({
|
|
|
state.loading = true
|
|
|
const sourceType = state.searchForm.sourceType
|
|
|
const userId = state.searchForm.userId
|
|
|
+ const audioPlayTypes = state.searchForm.audioPlayTypes
|
|
|
+
|
|
|
let search = {
|
|
|
...state.searchForm,
|
|
|
useAppId: state.searchForm.useAppId
|
|
|
? state.searchForm.useAppId.join(',')
|
|
|
- : state.searchForm.useAppId
|
|
|
+ : state.searchForm.useAppId,
|
|
|
+ audioPlayTypes: [] as any
|
|
|
} as any
|
|
|
+ if (audioPlayTypes) {
|
|
|
+ if (audioPlayTypes === 'PLAY_SING') {
|
|
|
+ search.audioPlayTypes = ['PLAY', 'SING']
|
|
|
+ } else {
|
|
|
+ search.audioPlayTypes = [audioPlayTypes]
|
|
|
+ }
|
|
|
+ }
|
|
|
if (sourceType) {
|
|
|
if (sourceType == 'ORG') {
|
|
|
search.organizationRoleId = userId
|
|
@@ -461,10 +488,15 @@ export default defineComponent({
|
|
|
}
|
|
|
}
|
|
|
const opt = { ...state.pagination, ...search }
|
|
|
- opt.generateFirst && (opt.musicCategoryId = "100061")
|
|
|
+ opt.generateFirst && (opt.musicCategoryId = '100061')
|
|
|
const { data } = await musicSheetPage(opt)
|
|
|
state.pagination.pageTotal = Number(data.total)
|
|
|
- state.dataList = data.rows || []
|
|
|
+ const result = data.rows || []
|
|
|
+ // 初始化场景
|
|
|
+ result.forEach((item: any) => {
|
|
|
+ item.audioPlayTypeArray = item.audioPlayTypes ? item.audioPlayTypes.split(',') : []
|
|
|
+ })
|
|
|
+ state.dataList = result
|
|
|
} catch {}
|
|
|
state.loading = false
|
|
|
}
|
|
@@ -793,7 +825,7 @@ export default defineComponent({
|
|
|
}
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
- <NFormItem label="生成节拍器音频" path="generateMetronomeAudio">
|
|
|
+ <NFormItem label="节拍器音频" path="generateMetronomeAudio">
|
|
|
<NSelect
|
|
|
v-model={[state.searchForm.generateMetronomeAudio, 'value']}
|
|
|
placeholder="请选择是否生成节拍器音频"
|
|
@@ -831,6 +863,14 @@ export default defineComponent({
|
|
|
}
|
|
|
/>
|
|
|
</NFormItem>
|
|
|
+ <NFormItem label="场景" path="audioPlayTypes">
|
|
|
+ <NSelect
|
|
|
+ v-model:value={state.searchForm.audioPlayTypes}
|
|
|
+ placeholder="请选择场景"
|
|
|
+ options={audioPlayTypeArray}
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </NFormItem>
|
|
|
<NFormItem>
|
|
|
<NSpace>
|
|
|
<NButton type="primary" onClick={onSearch}>
|
|
@@ -947,11 +987,12 @@ export default defineComponent({
|
|
|
onClose={() => (state.showUseProject = false)}
|
|
|
onGetList={getList}
|
|
|
/> */}
|
|
|
- <MusicPlatform
|
|
|
+ <MusicPlatform
|
|
|
id={state.showUseProjectId}
|
|
|
useProject={state.useProjectData}
|
|
|
onClose={() => (state.showUseProject = false)}
|
|
|
- onGetList={getList} />
|
|
|
+ onGetList={getList}
|
|
|
+ />
|
|
|
</NModal>
|
|
|
|
|
|
<NModal
|