|
@@ -4,9 +4,7 @@ import MSticky from '@/components/m-sticky';
|
|
import {
|
|
import {
|
|
Button,
|
|
Button,
|
|
DropdownItem,
|
|
DropdownItem,
|
|
- DropdownItemOption,
|
|
|
|
DropdownMenu,
|
|
DropdownMenu,
|
|
- Image,
|
|
|
|
List,
|
|
List,
|
|
Picker
|
|
Picker
|
|
} from 'vant';
|
|
} from 'vant';
|
|
@@ -15,14 +13,10 @@ import styles from '../index.module.less';
|
|
import MStudent from '../component/m-student/index';
|
|
import MStudent from '../component/m-student/index';
|
|
import Attendance from '../component/Attendance';
|
|
import Attendance from '../component/Attendance';
|
|
import Assignment from '../component/Assignment';
|
|
import Assignment from '../component/Assignment';
|
|
-import icon_tuituan from '../images/icon-tuituan.png';
|
|
|
|
-import icon_zaidu from '../images/icon-zaidu.png';
|
|
|
|
-import { useRouter } from 'vue-router';
|
|
|
|
import SkeletionIndex from '../skeletion-index';
|
|
import SkeletionIndex from '../skeletion-index';
|
|
import {
|
|
import {
|
|
api_cooperationOrganMusicGroupPage,
|
|
api_cooperationOrganMusicGroupPage,
|
|
api_studentManageCoopSubjectList,
|
|
api_studentManageCoopSubjectList,
|
|
- api_studentManageUserCount,
|
|
|
|
api_studentManageUserPage
|
|
api_studentManageUserPage
|
|
} from '../api';
|
|
} from '../api';
|
|
import MFullRefresh from '@/components/m-full-refresh';
|
|
import MFullRefresh from '@/components/m-full-refresh';
|
|
@@ -32,7 +26,6 @@ import MEmpty from '@/components/m-empty';
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'student-manage',
|
|
name: 'student-manage',
|
|
setup() {
|
|
setup() {
|
|
- const router = useRouter();
|
|
|
|
const fromData = reactive({
|
|
const fromData = reactive({
|
|
page: 1,
|
|
page: 1,
|
|
rows: 20,
|
|
rows: 20,
|
|
@@ -53,15 +46,15 @@ export default defineComponent({
|
|
loading: false,
|
|
loading: false,
|
|
finshed: false,
|
|
finshed: false,
|
|
list: [] as IStudentManage[],
|
|
list: [] as IStudentManage[],
|
|
- musicGroups: [] as IMusicGroup[],
|
|
|
|
- musicGroupId: '',
|
|
|
|
|
|
+ musicGroups: [{ text: '全部乐团', value: '' }] as IMusicGroup[],
|
|
musicGroupName: '全部乐团',
|
|
musicGroupName: '全部乐团',
|
|
- subjects: [] as ISubject[],
|
|
|
|
- subjectId: '',
|
|
|
|
- subjectName: '全部声部'
|
|
|
|
|
|
+ subjects: [{ text: '全部声部', value: '' }] as ISubject[],
|
|
|
|
+ subjectName: '全部声部',
|
|
});
|
|
});
|
|
const musicGroupRef = ref();
|
|
const musicGroupRef = ref();
|
|
|
|
+ const musicSelectRef = ref();
|
|
const subjectRef = ref();
|
|
const subjectRef = ref();
|
|
|
|
+ const subjectSelectRef = ref();
|
|
|
|
|
|
/** 获取乐团列表 */
|
|
/** 获取乐团列表 */
|
|
const getGroups = () => {
|
|
const getGroups = () => {
|
|
@@ -132,7 +125,6 @@ export default defineComponent({
|
|
};
|
|
};
|
|
|
|
|
|
const handleSearch = () => {
|
|
const handleSearch = () => {
|
|
- studentMagege.skelet = true;
|
|
|
|
fromData.page = 1;
|
|
fromData.page = 1;
|
|
studentMagege.refresh = true;
|
|
studentMagege.refresh = true;
|
|
getData();
|
|
getData();
|
|
@@ -148,6 +140,7 @@ export default defineComponent({
|
|
<MSticky position="top">
|
|
<MSticky position="top">
|
|
<MHeader />
|
|
<MHeader />
|
|
<MSearch
|
|
<MSearch
|
|
|
|
+ placeholder="请输入学员姓名"
|
|
onSearch={value => {
|
|
onSearch={value => {
|
|
fromData.keyword = value;
|
|
fromData.keyword = value;
|
|
handleSearch();
|
|
handleSearch();
|
|
@@ -158,12 +151,10 @@ export default defineComponent({
|
|
ref={musicGroupRef}
|
|
ref={musicGroupRef}
|
|
title={studentMagege.musicGroupName}>
|
|
title={studentMagege.musicGroupName}>
|
|
<Picker
|
|
<Picker
|
|
|
|
+ ref={musicSelectRef}
|
|
showToolbar={false}
|
|
showToolbar={false}
|
|
visibleOptionNum={5}
|
|
visibleOptionNum={5}
|
|
columns={studentMagege.musicGroups}
|
|
columns={studentMagege.musicGroups}
|
|
- onChange={value => {
|
|
|
|
- studentMagege.musicGroupId = value.selectedValues[0];
|
|
|
|
- }}
|
|
|
|
/>
|
|
/>
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
<Button
|
|
<Button
|
|
@@ -179,12 +170,13 @@ export default defineComponent({
|
|
round
|
|
round
|
|
onClick={() => {
|
|
onClick={() => {
|
|
musicGroupRef.value?.toggle(false);
|
|
musicGroupRef.value?.toggle(false);
|
|
- fromData.musicGroupId = studentMagege.musicGroupId;
|
|
|
|
- studentMagege.musicGroupName =
|
|
|
|
- studentMagege.musicGroups.find(
|
|
|
|
- _item => _item.value == studentMagege.musicGroupId
|
|
|
|
- )?.text || '全部乐团';
|
|
|
|
- handleSearch();
|
|
|
|
|
|
+ const option =
|
|
|
|
+ musicSelectRef.value?.getSelectedOptions?.()?.[0];
|
|
|
|
+ if (option) {
|
|
|
|
+ fromData.musicGroupId = option.value;
|
|
|
|
+ studentMagege.musicGroupName = option.text;
|
|
|
|
+ handleSearch();
|
|
|
|
+ }
|
|
}}>
|
|
}}>
|
|
确定
|
|
确定
|
|
</Button>
|
|
</Button>
|
|
@@ -192,12 +184,10 @@ export default defineComponent({
|
|
</DropdownItem>
|
|
</DropdownItem>
|
|
<DropdownItem ref={subjectRef} title={studentMagege.subjectName}>
|
|
<DropdownItem ref={subjectRef} title={studentMagege.subjectName}>
|
|
<Picker
|
|
<Picker
|
|
|
|
+ ref={subjectSelectRef}
|
|
showToolbar={false}
|
|
showToolbar={false}
|
|
visibleOptionNum={5}
|
|
visibleOptionNum={5}
|
|
columns={studentMagege.subjects}
|
|
columns={studentMagege.subjects}
|
|
- onChange={value => {
|
|
|
|
- studentMagege.subjectId = value.selectedValues[0];
|
|
|
|
- }}
|
|
|
|
/>
|
|
/>
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
<div class={['btnGroupPopup', 'van-hairline--top']}>
|
|
<Button
|
|
<Button
|
|
@@ -213,11 +203,11 @@ export default defineComponent({
|
|
round
|
|
round
|
|
onClick={() => {
|
|
onClick={() => {
|
|
subjectRef.value?.toggle(false);
|
|
subjectRef.value?.toggle(false);
|
|
- fromData.subjectId = studentMagege.subjectId;
|
|
|
|
- studentMagege.subjectName =
|
|
|
|
- studentMagege.subjects.find(
|
|
|
|
- _item => _item.value == studentMagege.subjectId
|
|
|
|
- )?.text || '全部声部';
|
|
|
|
|
|
+ const option =
|
|
|
|
+ subjectSelectRef.value?.getSelectedOptions?.()?.[0];
|
|
|
|
+ console.log(option);
|
|
|
|
+ fromData.subjectId = option.value;
|
|
|
|
+ studentMagege.subjectName = option.text;
|
|
handleSearch();
|
|
handleSearch();
|
|
}}>
|
|
}}>
|
|
确定
|
|
确定
|