zhouwx
2024-06-27 ae43feac8c6b2372f5a061ead68e71027e8877e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<template>
  <el-dialog
    title="学习记录"
    :visible.sync="dialogVisible"
    :modal-append-to-body="false"
    :close-on-click-modal="false"
    width="50%"
    :before-close="handleClose"
    append-to-body
  >
    <el-table
      :data="learningTable"
      style="width: 100%;">
      <el-table-column
        prop="startTime"
        label="开始时间"
        width="160"
        >
      </el-table-column>
      <el-table-column
        label="结束时间"
        prop="endTime"
      width="160">
      </el-table-column>
      <el-table-column
        prop="trainingInstitutions"
        label="培训机构"
        >
      </el-table-column>
      <el-table-column
        prop="platform"
        label="线上平台"
        >
      </el-table-column>
      <el-table-column
        prop="courseName"
        label="课程名称"
        >
      </el-table-column>
      <el-table-column
        prop="courseTime"
        label="课程时长"
        >
      </el-table-column>
      <el-table-column
        prop="learningTime"
        label="学习时长"
        >
      </el-table-column>
      <el-table-column
        prop="isComplete"
        label="是否已完成"
        >
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageIndex"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </el-dialog>
</template>
 
<script >
import { listRecord, listStudent } from '@/api/onlineEducation/student'
 
export default {
  name: 'addUser',
  components: {
  },
  data() {
    return {
      dialogVisible: false,
      dialogStatus: '',
      dataForm: {},
      total: 2,
      queryParams: {
        pageIndex: 1,
        pageSize: 10,
        idcard: '',
        name: ''
      },
      learningTable: [
        {
          startTime: '2024-6-11 10:33:00',
          endTime: '2024-6-11 12:33:00',
          trainingInstitutions: 'xxx',
          platform: 'xxx',
          courseName: '课程1',
          courseTime: '2h',
          learningTime: '1h',
          isComplete: '否'
        },
        {
          startTime: '2024-6-11 10:33:00',
          endTime: '2024-6-11 12:33:00',
          trainingInstitutions: 'xxx',
          platform: 'xxx',
          courseName: '课程1',
          courseTime: '2h',
          learningTime: '1h',
          isComplete: '否'
        }
      ]
    }
  },
  created() {
  },
  methods: {
    getList(){
      this.loading = true;
      listRecord( this.queryParams).then((res) => {
        if (res.code == 200) {
          this.learningTable = res.rows
          this.total = res.total
          this.loading = false;
        }
      })
    },
    openDialog (data) {
      this.dialogVisible = true;
      this.queryParams.idcard = data.idcard
      this.getList();
    },
 
    handleClose() {
      this.dialogVisible = false;
      this.$emit("getList");
    },
  }
}
 
</script>
<style scoped>
 
</style>