| | |
| | | <el-card class="h-full" :body-style="{ height: '100%' }"> |
| | | <div class="card-wrapper w-full h-full flex flex-col px-8 box-border"> |
| | | <div class="card-header flex justify-between items-center shrink-0"> |
| | | <div class="header-tab"> |
| | | |
| | | <!-- <div class="header-tab"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick"> |
| | | <el-tab-pane label="全部" name="1"></el-tab-pane> |
| | | <el-tab-pane label="未开始" name="2"></el-tab-pane> |
| | | <el-tab-pane label="进行中" name="3"></el-tab-pane> |
| | | <el-tab-pane label="已结束" name="4"></el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> --> |
| | | |
| | | <div class="header-search flex items-center"> |
| | | <el-input v-model="searchText" placeholder="请输入考试名称" :prefix-icon="Search" /> |
| | | <el-button type="primary" class="ml-4">搜索</el-button> |
| | | <el-input v-model="searchText" placeholder="请输入考试名称" :prefix-icon="Search" maxlength="20" /> |
| | | <el-button type="primary" class="ml-4" @click="searchData">搜索</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | </div> |
| | | |
| | | <div class="card-footer flex justify-center mb-7 shrink-0"> |
| | | <el-pagination background layout="prev, pager, next" :total="1000" /> |
| | | <el-pagination background layout="prev, pager, next" :total="dataList.length" |
| | | :default-page-size="20" |
| | | :currentPage="currentIndex" |
| | | :hide-on-single-page="true" |
| | | @current-change="handleCurrentChange"/> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | |
| | | import { getExamList,getExamListV2 } from '@/api/modules/exam.js'; |
| | | import { getExamList } from '@/api/modules/exam.js'; |
| | | |
| | | |
| | | const activeName = ref('1'); |
| | |
| | | |
| | | const getData = () => { |
| | | loading.value = true; |
| | | getExamListV2().then(res => { |
| | | // dataList.value = res.data; |
| | | getExamList({ examName: searchText.value }).then(res => { |
| | | dataList.value = res.data; |
| | | loading.value = false; |
| | | }).catch(err => { |
| | | loading.value = false; |
| | |
| | | |
| | | getData(); |
| | | |
| | | const searchData = () => { |
| | | getData(); |
| | | }; |
| | | |
| | | const handleClick = (tab, event) => { |
| | | }; |
| | | |
| | | const handleCurrentChange = (val) => { |
| | | getData(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |