From 0a36c1e7503bafa76c93f065f7bbca651180163b Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 25 十月 2024 14:38:45 +0800
Subject: [PATCH] 会议没声音
---
src/views/train/index.vue | 46 +++++++++++++++++++++++++++++++++++++++-------
1 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/src/views/train/index.vue b/src/views/train/index.vue
index b4465cb..9a32761 100644
--- a/src/views/train/index.vue
+++ b/src/views/train/index.vue
@@ -8,17 +8,19 @@
<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" @input="searchData" />
+ <el-button type="primary" class="ml-4" @click="searchData">鎼滅储</el-button>
</div>
</div>
@@ -29,7 +31,16 @@
</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="total, sizes, prev, pager, next, jumper"
+ :total="total"
+ :page-sizes="[10, 20, 50]"
+ :page-size="pageSize"
+ :currentPage="currentIndex"
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ />
</div>
</div>
</el-card>
@@ -44,18 +55,23 @@
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 } from '@/api/modules/meet.js';
const activeName = ref('1');
const searchText = ref('');
const dataList = ref([]);
const loading = ref(false);
+const currentIndex = ref(1);
+const pageSize = ref(10);
+const total = ref(0);
+
const getData = () => {
loading.value = true;
- getMeetList().then(res => {
+ getMeetList({meetName: searchText.value}).then(res => {
dataList.value = res.data;
loading.value = false;
+ total.value = res.total;
}).catch(err => {
loading.value = false;
});
@@ -63,6 +79,22 @@
getData();
+const handleCurrentChange = (val) => {
+ currentIndex.value = val;
+ getData();
+};
+
+const handleSizeChange = (val) => {
+ currentIndex.value = 1;
+ pageSize.value = val;
+ getData();
+};
+
+const searchData = () => {
+ getData();
+
+};
+
const handleClick = (tab, event) => {
};
--
Gitblit v1.8.0