xiangpei
2024-07-12 2208cfcec655c4610e70ae3b3824ec444709c413
名字搜索
1个文件已修改
24 ■■■■ 已修改文件
src/views/meet/index.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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 () {
    // 清除定时器,避免内存泄漏