|
@@ -24,6 +24,12 @@ export default defineComponent({
|
|
|
},
|
|
|
},
|
|
|
setup(props) {
|
|
|
+ const audioPlayTypesOption = [
|
|
|
+ { text: '全部场景', value: "" },
|
|
|
+ { text: '演奏', value: "PLAY" },
|
|
|
+ { text: '演唱', value: "SING" },
|
|
|
+ { text: '演奏+演唱', value: "PLAY,SING" },
|
|
|
+ ]
|
|
|
const query: any = getQuery();
|
|
|
const forms = reactive({
|
|
|
name: "",
|
|
@@ -32,10 +38,10 @@ export default defineComponent({
|
|
|
musicSheetCategoriesId: state.bizMusicCategoryId,
|
|
|
recentFlag: props.recentFlag ? true : null,
|
|
|
excludeMusicId: props.recentFlag ? null : state.examSongId,
|
|
|
- audioPlayTypes: [],
|
|
|
+ audioPlayTypes: "",
|
|
|
musicTutorialIds: "",
|
|
|
musicTagIds: "",
|
|
|
- musicalInstrumentId: query.instrumentId || ""
|
|
|
+ musicalInstrumentId: props.recentFlag ? "" : query.instrumentId
|
|
|
});
|
|
|
const data = reactive({
|
|
|
isFocus: false,
|
|
@@ -49,7 +55,12 @@ export default defineComponent({
|
|
|
if (!data.hasNext) return;
|
|
|
data.loading = true;
|
|
|
try {
|
|
|
- const res = await api_musicSheetPage(forms);
|
|
|
+ const res = await api_musicSheetPage({
|
|
|
+ ...forms,
|
|
|
+ ...{
|
|
|
+ audioPlayTypes: forms.audioPlayTypes ? forms.audioPlayTypes.split(",") : []
|
|
|
+ }
|
|
|
+ });
|
|
|
if (res?.code === 200 && Array.isArray(res.data?.rows)) {
|
|
|
data.list = [...data.list, ...res.data.rows];
|
|
|
}
|
|
@@ -113,10 +124,16 @@ export default defineComponent({
|
|
|
return () => (
|
|
|
<div class={styles.wrap}>
|
|
|
<div class={[styles.searchBox,data.isFocus && styles.isFocus]}>
|
|
|
- <div class={styles.dropdownMenu} onClick={() => { filterShow.value = true }}>
|
|
|
- <div>筛选</div>
|
|
|
- <img src={xiangImg} />
|
|
|
- </div>
|
|
|
+ {
|
|
|
+ props.recentFlag ?
|
|
|
+ <DropdownMenu class={[styles.dropdownMenu1]} overlay={false}>
|
|
|
+ <DropdownItem onChange={handleQuery} v-model={forms.audioPlayTypes} options={audioPlayTypesOption}/>
|
|
|
+ </DropdownMenu> :
|
|
|
+ <div class={styles.dropdownMenu} onClick={() => { filterShow.value = true }}>
|
|
|
+ <div>筛选</div>
|
|
|
+ <img class={filterShow.value && styles.onImg} src={xiangImg} />
|
|
|
+ </div>
|
|
|
+ }
|
|
|
<img src={searImg} />
|
|
|
<Field placeholder="请输入曲目名称" v-model={forms.name} autocomplete="off" onFocus={()=>{ data.isFocus = true }} onBlur={()=>{ data.isFocus = false }} />
|
|
|
<div class={styles.searchBtn} onClick={handleQuery}>搜索</div>
|