|
@@ -32,6 +32,7 @@ import SongShare from '../component/song-share'
|
|
|
import icon_music_list from './icon_music_list.png'
|
|
|
import iconMenu from './icon-menu.png'
|
|
|
import TheSticky from '@/components/the-sticky'
|
|
|
+import SelectSubject from '../search/select-subject'
|
|
|
|
|
|
const noop = () => {}
|
|
|
|
|
@@ -47,6 +48,10 @@ export default defineComponent({
|
|
|
localStorage.setItem('behaviorId', getRandomKey())
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
+ const subjects = reactive({
|
|
|
+ name: route.query.subjectName || '全部声部',
|
|
|
+ id: route.query.subjectId || null
|
|
|
+ })
|
|
|
const params = reactive({
|
|
|
search: '',
|
|
|
relatedNum: 6, //相关专辑数
|
|
@@ -54,6 +59,7 @@ export default defineComponent({
|
|
|
rows: 200
|
|
|
})
|
|
|
const albumDetail = ref<any>(null)
|
|
|
+ const subjectPopup = ref(false)
|
|
|
// const data = ref<any>(null)
|
|
|
const rows = ref<any[]>([])
|
|
|
const loading = ref(false)
|
|
@@ -76,7 +82,11 @@ export default defineComponent({
|
|
|
const res = await request.post('/music/album/detail', {
|
|
|
prefix:
|
|
|
state.platformType === 'TEACHER' ? '/api-teacher' : '/api-student',
|
|
|
- data: { id: id || route.params.id, ...params }
|
|
|
+ data: {
|
|
|
+ id: id || route.params.id,
|
|
|
+ ...params,
|
|
|
+ subjectIds: subjects.id
|
|
|
+ }
|
|
|
})
|
|
|
const { musicSheetList, ...rest } = res.data
|
|
|
rows.value = [...musicSheetList.rows]
|
|
@@ -209,7 +219,16 @@ export default defineComponent({
|
|
|
}
|
|
|
})
|
|
|
// this.routerTo()
|
|
|
- } catch {}
|
|
|
+ } catch {
|
|
|
+ //
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ const onComfirmSubject = item => {
|
|
|
+ subjects.name = item.name
|
|
|
+ subjects.id = item.id
|
|
|
+ subjectPopup.value = false
|
|
|
+ FetchList()
|
|
|
}
|
|
|
|
|
|
const shareStatus = ref<boolean>(false)
|
|
@@ -330,10 +349,23 @@ export default defineComponent({
|
|
|
<div class={styles.alumnContainer}>
|
|
|
<div class={styles.alumnList}>
|
|
|
{/* <Title title="曲目列表" isMore={false} /> */}
|
|
|
- <div class={styles.alumnTitle}>
|
|
|
- <img src={iconMenu} class={styles.iconMenu} />
|
|
|
- 曲目列表{' '}
|
|
|
- <span>({albumDetail.value?.musicSheetCount || 0})</span>
|
|
|
+ <div class={styles.alumnTitleSection}>
|
|
|
+ <div class={styles.alumnTitle}>
|
|
|
+ <img src={iconMenu} class={styles.iconMenu} />
|
|
|
+ 曲目列表{' '}
|
|
|
+ <span>({albumDetail.value?.musicSheetCount || 0})</span>
|
|
|
+ </div>
|
|
|
+ {albumDetail.value?.albumType !== 'CONCERT' && (
|
|
|
+ <div
|
|
|
+ class={[
|
|
|
+ styles.subjectSearch,
|
|
|
+ subjectPopup.value ? styles.active : ''
|
|
|
+ ]}
|
|
|
+ onClick={() => (subjectPopup.value = true)}
|
|
|
+ >
|
|
|
+ {subjects.name}
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
</div>
|
|
|
<Song
|
|
|
showNumber
|
|
@@ -362,7 +394,7 @@ export default defineComponent({
|
|
|
}}
|
|
|
/>
|
|
|
|
|
|
- {rows.value && rows.value.length <= 0 && (
|
|
|
+ {rows.value && rows.value.length <= 0 && !loading.value && (
|
|
|
<ColResult btnStatus={false} tips="暂无曲目" />
|
|
|
)}
|
|
|
</div>
|
|
@@ -499,6 +531,22 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</ColShare>
|
|
|
</Popup>
|
|
|
+
|
|
|
+ <Popup
|
|
|
+ position="bottom"
|
|
|
+ round
|
|
|
+ v-model:show={subjectPopup.value}
|
|
|
+ closeable
|
|
|
+ >
|
|
|
+ <div class={styles.popupTitle}>选择声部</div>
|
|
|
+ <SelectSubject
|
|
|
+ type="ALBUM"
|
|
|
+ isShowAllSubject
|
|
|
+ // isReset
|
|
|
+ searchParams={subjects}
|
|
|
+ onComfirm={onComfirmSubject}
|
|
|
+ />
|
|
|
+ </Popup>
|
|
|
</div>
|
|
|
)
|
|
|
}
|