From 2208cfcec655c4610e70ae3b3824ec444709c413 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 12 七月 2024 12:02:04 +0800 Subject: [PATCH] 名字搜索 --- src/views/meet/index.vue | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/views/meet/index.vue b/src/views/meet/index.vue index 01f3959..a7d0f28 100644 --- a/src/views/meet/index.vue +++ b/src/views/meet/index.vue @@ -5,10 +5,10 @@ <div style="padding: 5px"> <el-row :gutter="5"> <el-col :span="22"> - <el-input placeholder="鎼滅储" size="small" v-model="searchForm.keyword"/> + <el-input placeholder="鎼滅储" size="small" clearable @input="getStudentList" @clear="getStudentList" v-model="searchForm.keyword"/> </el-col> <el-col :span="2"> - <el-button type="primary" size="small" @click="getRoomInfo">鎼滅储</el-button> + <el-button type="primary" size="small" @click="getStudentList">鎼滅储</el-button> </el-col> </el-row> <el-row> @@ -39,7 +39,7 @@ let jitsiApi = null export default { - data() { + data () { return { intervalId: null, meetId: null, @@ -48,21 +48,21 @@ searchForm: { keyword: '', // 0 鏈湪绾裤�� 1 鍦ㄧ嚎 - onlineStatus: 0, + onlineStatus: 0 }, studentList: [], - showStudentList: [], + showStudentList: [] } }, methods: { - getStatus(status) { + getStatus (status) { if (status === 1) { - return "鍦ㄧ嚎" + return '鍦ㄧ嚎' } else if (status === 0) { - return "绂荤嚎" + return '绂荤嚎' } }, - handleTabChange(tab) { + handleTabChange (tab) { let status = parseInt(tab.name) this.showStudentList = this.studentList.filter(student => { return student.onlineStatus === status @@ -70,12 +70,12 @@ }, getStudentList () { let params = { - keyword: this.keyword + keyword: this.searchForm.keyword } getStudentList(this.meetId, params).then(res => { this.studentList = res.data.data this.showStudentList = this.studentList.filter(student => { - return student.onlineStatus === 0 + return student.onlineStatus === this.searchForm.onlineStatus }) }) }, @@ -145,7 +145,7 @@ // 姣忎笁绉掓洿瀛﹀憳鍦ㄧ嚎鐘舵�� this.intervalId = setInterval(() => { this.getRoomInfo() - }, 3000) + }, 2500) }, beforeDestroy () { // 娓呴櫎瀹氭椂鍣紝閬垮厤鍐呭瓨娉勬紡 -- Gitblit v1.8.0