zhouwx
2024-07-05 1f34754ce77199ffb9bbea09c5ef34e03e30f881
src/views/onlineEducation/count/components/studentList.vue
@@ -8,6 +8,7 @@
    :before-close="handleClose"
  >
    <el-table
      height="250"
      :data="learningTable"
      style="width: 100%;">
      <el-table-column
@@ -24,6 +25,9 @@
        prop="lessonTocal"
        label="总学时"
      >
        <template #default="scope">
          {{type == 'batch' ? scope.row.batchLessonNum : scope.row.courseLessonNum}}
        </template>
      </el-table-column>
      <el-table-column
        prop="lessonNum"
@@ -63,7 +67,7 @@
<script >
import lessonReport from '@/views/onlineEducation/studentSupervision/compontents/lessonReport.vue'
import { studentDetail } from '@/api/onlineEducation/student'
import { studentCourseDetail, studentDetail } from '@/api/onlineEducation/student'
import { listCourse } from '@/api/onlineEducation/course'
export default {
  name: 'addUser',
@@ -76,9 +80,11 @@
      dialogStatus: '',
      dataForm: {},
      uuid: '',
      total: 2,
      total: 0,
      type: '',
      queryParams: {
        pageIndex: 1,
        pageSize: 10
      },
      learningTable: [
        {
@@ -107,14 +113,27 @@
  methods: {
    getList() {
      this.loading = true;
      studentDetail( this.uuid).then((res) => {
        if (res.code == 200) {
          this.learningTable = res.data
          this.loading = false;
        }
      })
      if(this.type === 'course'){
        studentCourseDetail( this.uuid).then((res) => {
          if (res.code == 200) {
            this.learningTable = res.data
            this.loading = false;
            // this.total = res.data.total
          }
        })
      }else {
        studentDetail( this.uuid).then((res) => {
          if (res.code == 200) {
            this.learningTable = res.data
            this.loading = false;
            // this.total = res.data.total
          }
        })
      }
    },
    openDialog (data) {
    openDialog (data,type) {
      this.type = type;
      this.uuid = data.uuid;
      this.getList();
      this.dialogVisible = true;