From 8d248b7f81163690f7318c868acce4f889936d42 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 29 十月 2024 16:49:47 +0800 Subject: [PATCH] 会议列表增加班级查询、显示老师 --- src/views/train/index.vue | 24 ++++++++++++++++++------ 1 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/train/index.vue b/src/views/train/index.vue index 9a32761..e026bd2 100644 --- a/src/views/train/index.vue +++ b/src/views/train/index.vue @@ -19,14 +19,18 @@ </div> --> <div class="header-search flex items-center"> - <el-input v-model="searchText" placeholder="璇疯緭鍏ヨ绋嬪悕绉�" :prefix-icon="Search" maxlength="20" @input="searchData" /> + <el-input v-model="searchText" placeholder="璇剧▼鍚嶇О" :prefix-icon="Search" maxlength="20" @input="searchData" /> + <el-select v-model="classesIdList" placeholder="閫夋嫨鐝骇" multiple clearable @clear="searchData" style="width: 200px;margin-left: 10px" @change="searchData"> + <el-option v-for="classes in classesList" :key="classes.id" :label="classes.className" :value="classes.id"/> + </el-select> <el-button type="primary" class="ml-4" @click="searchData">鎼滅储</el-button> </div> </div> <div class="card-main flex-1 my-5 relative"> <div class="main-content absolute top-0 bottom-0 left-0 right-0"> - <DataList :dataList="dataList"></DataList> + <DataList v-if="dataList && dataList.length > 0" :dataList="dataList"></DataList> + <el-empty v-else description="鏆傛棤" /> </div> </div> @@ -55,9 +59,11 @@ import NormalHeader from '@/components/NormalHeader/index.vue'; import DataList from './data-list/index.vue'; import { Search } from '@element-plus/icons-vue'; -import { getMeetList } from '@/api/modules/meet.js'; +import { getMeetList, getStudentClasses } from '@/api/modules/meet.js'; const activeName = ref('1'); const searchText = ref(''); +const classesIdList = ref([]); +const classesList = ref([]); const dataList = ref([]); const loading = ref(false); @@ -68,7 +74,7 @@ const getData = () => { loading.value = true; - getMeetList({meetName: searchText.value}).then(res => { + getMeetList({meetName: searchText.value, classesIds: classesIdList.value}).then(res => { dataList.value = res.data; loading.value = false; total.value = res.total; @@ -77,8 +83,14 @@ }); }; -getData(); +const studentClasses = () => { + getStudentClasses().then(res => { + classesList.value = res.data + }) +} +getData(); +studentClasses(); const handleCurrentChange = (val) => { currentIndex.value = val; getData(); @@ -104,4 +116,4 @@ :deep(.el-tabs__nav-wrap:after) { display: none; } -</style> \ No newline at end of file +</style> -- Gitblit v1.8.0