马宇豪
2025-03-04 509f1d71c91242b11fd287cfcdeafe3d19b2d807
src/views/onlineEducation/learnRecord/index.vue
@@ -1,10 +1,49 @@
<template>
  <div class="app-container">
    <el-radio-group v-model="queryParams.status" style="margin-bottom: 10px;" @change="changeTimeStatus">
    <el-radio-group v-model="queryParams.status" @change="changeTimeStatus" style="margin-bottom: 10px">
      <el-radio-button label="0">全部</el-radio-button>
      <el-radio-button label="2">异常记录</el-radio-button>
      <el-radio-button label="1">正常记录</el-radio-button>
    </el-radio-group>
    <div style="margin-bottom: 10px">
      <el-select v-model="queryParams.institutionId" placeholder="请选择平台" style="margin-right: 10px">
        <el-option
          v-for="item in platformList"
          :key="item.id"
          :label="item.institutionalName"
          :value="item.id">
        </el-option>
      </el-select>
      <el-input
        v-model="queryParams.idcard"
        placeholder="请输入身份证号"
        clearable
        style="width: 300px;margin-right: 10px"
      />
      <el-date-picker
        v-model="dateValue"
        value-format="yyyy-MM-dd HH:mm:ss"
        type="datetimerange"
        range-separator="-"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        style="width: 380px"
      ></el-date-picker>
      <el-button
        size="small"
        type="primary"
        style="margin-bottom: 10px;margin-left: 20px"
        @click="handleQuery()"
      >查询
      </el-button>
      <el-button
        size="small"
        type="primary"
        style="margin-bottom: 10px"
        @click="resetQuery()"
      >重置
      </el-button>
    </div>
    <el-table v-loading="loading" :data="expertList" :row-class-name="tableAddClass">
      <el-table-column label="记录编号" align="center" prop="id" />
      <el-table-column label="身份证号" align="center" prop="idcard" :show-overflow-tooltip="true" />
@@ -45,13 +84,13 @@
import detailDialog from './components/detailDialog.vue'
import { listRecord, listStudent } from '@/api/onlineEducation/student'
import Cookies from 'js-cookie'
import {listPlatSelect} from "@/api/onlineEducation/plat";
export default {
  name: "nPeopleManage",
  dicts: [],
  components: { detailDialog},
  data() {
    return {
      loading: false,
      single: true,
      multiple: true,
@@ -60,24 +99,40 @@
      total: 0,
      expertTypes: [],
      expertList: [],
      platformList: [],
      dateValue: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        status: 0,
        institutionId: null,
        idcard: '',
        startTime: '',
        endTime: ''
      },
    };
  },
  created() {
      this.getList();
      this.getList()
      this.getPlat()
  },
  methods: {
    getList(){
      this.loading = true;
      this.loading = true
      this.queryParams.startTime = this.dateValue[0]?this.dateValue[0]:''
      this.queryParams.endTime = this.dateValue[1]?this.dateValue[1]:''
      listRecord( this.queryParams).then((res) => {
        if (res.code == 200) {
          this.expertList = res.rows
          this.total = res.total
          this.loading = false;
          this.loading = false
        }
      })
    },
    getPlat() {
      listPlatSelect().then((res) => {
        if (res.code == 200) {
          this.platformList = res.data
        }
      })
    },
@@ -94,10 +149,21 @@
    },
    handleQuery(){
      this.queryParams.pageNum = 1
      this.getList();
    },
    resetQuery(){
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        status: 0,
        institutionId: null,
        idcard: '',
        startTime: '',
        endTime: ''
      }
      this.dateValue = []
      this.getList()
    },
    handleView(data){
      this.$refs.detailDialogRef.openDialog(data);