|
@@ -55,11 +55,9 @@ export default defineComponent({
|
|
|
list: [] as IStudentManage[],
|
|
|
studentCount: 0,
|
|
|
quitCount: 0,
|
|
|
- musicGroups: [] as IMusicGroup[],
|
|
|
- musicGroupId: '',
|
|
|
+ musicGroups: [{ text: '全部乐团', value: '' }] as IMusicGroup[],
|
|
|
musicGroupName: '全部乐团',
|
|
|
- subjects: [] as ISubject[],
|
|
|
- subjectId: '',
|
|
|
+ subjects: [{ text: '全部声部', value: '' }] as ISubject[],
|
|
|
subjectName: '全部声部',
|
|
|
studentTypes: [
|
|
|
{ text: '全部学员', value: '' },
|
|
@@ -69,7 +67,9 @@ export default defineComponent({
|
|
|
studentTypeName: '全部学员'
|
|
|
});
|
|
|
const musicGroupRef = ref();
|
|
|
+ const musicSelectRef = ref();
|
|
|
const subjectRef = ref();
|
|
|
+ const subjectSelectRef = ref();
|
|
|
|
|
|
/** 获取乐团列表 */
|
|
|
const getGroups = () => {
|
|
@@ -186,12 +186,10 @@ export default defineComponent({
|
|
|
ref={musicGroupRef}
|
|
|
title={studentMagege.musicGroupName}>
|
|
|
<Picker
|
|
|
+ ref={musicSelectRef}
|
|
|
showToolbar={false}
|
|
|
visibleOptionNum={5}
|
|
|
columns={studentMagege.musicGroups}
|
|
|
- onChange={value => {
|
|
|
- studentMagege.musicGroupId = value.selectedValues[0];
|
|
|
- }}
|
|
|
/>
|
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
|
<Button
|
|
@@ -207,13 +205,13 @@ export default defineComponent({
|
|
|
round
|
|
|
onClick={() => {
|
|
|
musicGroupRef.value?.toggle(false);
|
|
|
- fromData.musicGroupId = studentMagege.musicGroupId;
|
|
|
- studentMagege.musicGroupName =
|
|
|
- studentMagege.musicGroups.find(
|
|
|
- _item => _item.value == studentMagege.musicGroupId
|
|
|
- )?.text || '全部乐团';
|
|
|
- studentMagege.musicGroupId = '';
|
|
|
- handleSearch();
|
|
|
+ const option =
|
|
|
+ musicSelectRef.value?.getSelectedOptions?.()?.[0];
|
|
|
+ if (option) {
|
|
|
+ fromData.musicGroupId = option.value;
|
|
|
+ studentMagege.musicGroupName = option.text;
|
|
|
+ handleSearch();
|
|
|
+ }
|
|
|
}}>
|
|
|
确定
|
|
|
</Button>
|
|
@@ -221,13 +219,10 @@ export default defineComponent({
|
|
|
</DropdownItem>
|
|
|
<DropdownItem ref={subjectRef} title={studentMagege.subjectName}>
|
|
|
<Picker
|
|
|
+ ref={subjectSelectRef}
|
|
|
showToolbar={false}
|
|
|
visibleOptionNum={5}
|
|
|
columns={studentMagege.subjects}
|
|
|
- onChange={value => {
|
|
|
- const option = value.selectedOptions[0];
|
|
|
- studentMagege.subjectId = option.value;
|
|
|
- }}
|
|
|
/>
|
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
|
<Button
|
|
@@ -243,12 +238,11 @@ export default defineComponent({
|
|
|
round
|
|
|
onClick={() => {
|
|
|
subjectRef.value?.toggle(false);
|
|
|
- fromData.subjectId = studentMagege.subjectId;
|
|
|
- studentMagege.subjectName =
|
|
|
- studentMagege.subjects.find(
|
|
|
- _item => _item.value == studentMagege.subjectId
|
|
|
- )?.text || '全部声部';
|
|
|
- studentMagege.subjectId = '';
|
|
|
+ const option =
|
|
|
+ subjectSelectRef.value?.getSelectedOptions?.()?.[0];
|
|
|
+ console.log(option);
|
|
|
+ fromData.subjectId = option.value;
|
|
|
+ studentMagege.subjectName = option.text;
|
|
|
handleSearch();
|
|
|
}}>
|
|
|
确定
|