zhouwx
2024-07-05 a89cc4281bf7d4c6d984bb9827cd0f175416c286
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<template>
  <div class="app-container">
    <div style="display: flex">
      <div>
        <span style="font-size: 14px;margin-right:10px">学员身份证号:</span>
        <el-input v-model="queryParams.idcard" style="width: 200px" placeholder="请输入学员身份证号" clearable></el-input>
          <span style="font-size: 14px;margin: 0 20px">平台:</span>
        <el-select v-model="queryParams.institutionId" placeholder="请选择平台" clearable>
          <el-option
            v-for="item in platformList"
            :key="item.id"
            :label="item.institutionalName"
            :value="item.id">
          </el-option>
        </el-select>
        <el-button
          size="small"
          type="primary"
          style="margin-bottom: 10px;margin-left: 20px"
          @click="handleQuery()"
        >查询实时进度</el-button>
        <el-button
          plain
          size="small"
          type="primary"
          style="margin-bottom: 10px"
          @click="resetQuery()"
        >重置</el-button>
      </div>
    </div>
<!--    查询数据-->
    <div style="margin: 30px 20%"  >
      <div v-if="data">
        <div  style="display: flex;align-items: center;margin-bottom: -15px" >
          <span style="font-size: 18px;font-weight: 550">姓名:</span>
          <span style="font-size: 17px;margin-right: 60px">{{data.name}}</span>
          <span style="font-size: 18px;font-weight: 550">查询平台:</span>
          <span style="font-size: 17px">{{data.institutionalName}}</span>
        </div>
        <el-divider></el-divider>
        <div>
          <div v-for="(batch,index) in data.batchList" :key="index" >
            <div  style="display: flex;align-items: center;margin-bottom: -15px" >
              <span style="font-size: 18px">班级(批次):</span>
              <span style="font-size: 16px;margin-right: 60px">{{batch.batchName}}</span>
              <span style="font-size: 18px">创建时间:</span>
              <span style="font-size: 16px">{{batch.createTime}}</span>
            </div>
            <div v-for="(course,index) in batch.courseList" :key="index" style="margin-top: 40px;margin-bottom: 50px">
              <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >
                <div style="display: flex;align-items: center;">
                  <span style="font-size: 18px">课程名称:</span>
                  <span style="font-size: 16px;margin-right: 60px">{{course.courseName}}</span>
                  <span style="font-size: 18px">总学时:</span>
                  <span style="font-size: 16px;margin-right: 60px">{{course.lessonNum}}</span>
                  <span style="font-size: 18px">当前学时:</span>
                  <span style="font-size: 16px;margin-right: 60px">{{course.duration}}</span>
                </div>
                <el-progress :percentage="course.durationRate" style="width: 250px" ></el-progress>
              </div>
              <div v-for="(chapter,index) in course.chapterList" :key="index" style="margin-top: 50px;margin-left: 40px;">
                <div style="margin-bottom: -15px;display: flex;justify-content: space-between"  >
                  <div  style="display: flex;align-items: center" >
                    <span style="font-size: 16px;margin-right: 60px">{{chapter.chapterName}}</span>
                    <span style="font-size: 16px">总时长:</span>
                    <span style="font-size: 16px;margin-right: 60px">{{chapter.lessonTocal}}</span>
                    <span style="font-size: 16px"> 已学时长:</span>
                    <span style="font-size: 16px">{{chapter.lessonNum}}</span>
                  </div>
                  <span v-if="chapter.lessonTocal == chapter.lessonNum " style="color: #13ce66">[已完成]</span>
                  <span v-else style="color: #1890ff">[学习中]</span>
                </div>
              </div>
            </div>
            <el-divider></el-divider>
          </div>
        </div>
      </div>
      <el-empty description="暂无数据" style="margin-top: 10%" v-else></el-empty>
      <pagination
        v-show="total>0"
        :total="total"
        :layout="layout"
        :page.sync="queryParams.pageIndex"
        :limit.sync="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
 
  </div>
</template>
 
<script>
import courseDialog from '@/views/onlineEducation/courseSupervision/components/courseDialog.vue'
import studentList from '@/views/onlineEducation/count/components/studentList.vue'
import { delJobRegist } from '@/api/coalMine/jobRegist'
import { listPlat, listPlatSelect } from '@/api/onlineEducation/plat'
import { listCourse } from '@/api/onlineEducation/course'
export default {
  name: "nPeopleManage",
  dicts: [],
  components: { courseDialog,studentList},
  data() {
    return {
      total: 2,
      platformList: [],
      data: {},
      queryParams: {
        pageIndex: 1,
        pageSize: 2,
        institutionId: '',
        idcard: ''
      },
      layout: 'total,prev, pager, next, jumper'
    };
  },
  created() {
    this.getPlat();
    this.getList();
  },
  methods: {
    getList(){
      console.log("111",this.queryParams)
      this.data =
        {
          id: null,
          idcard: '11111',
          name: '李四',
          institutionalName: '链工宝',
          batchList: [
            {
              batchName: 'xxxx',
              createTime: 'xxxx',
              courseList: [
                {
                  courseName: 'xx',
                  lessonNum: 100,
                  duration: 90,
                  durationRate: 90,
                  chapterList: [
                    {
                      chapterName: '第5章:章节名称',
                      lessonTocal: 20,
                      lessonNum: 10
                    },
                    {
                      chapterName: '第1章:章节名称',
                      lessonTocal: 80,
                      lessonNum: 80
                    },
                  ]
                },
                {
                  courseName: 'xx',
                  lessonNum: 100,
                  duration: 90,
                  durationRate: 90,
                  chapterList: [
                    {
                      chapterName: '第5章:章节名称',
                      lessonTocal: 20,
                      lessonNum: 10
                    },
                    {
                      chapterName: '第1章:章节名称',
                      lessonTocal: 80,
                      lessonNum: 80
                    },
                  ]
                }
              ]
            },
 
              ]
            }
      this.total = 1;
      // listCourse( this.queryParams).then((res) => {
      //   if (res.code == 200) {
      //     this.expertList = res.rows.map(item => {
      //       return {
      //         ...item,
      //         courseNum: item.outline ? item.outline.length : ''
      //       }
      //     })
      //   }
      // })
    },
    getPlat() {
      listPlatSelect().then((res) => {
        if (res.code == 200) {
          this.platformList = res.data
        }
      })
 
    },
 
    handleQuery(){
      this.getList();
 
    },
    resetQuery(){
      this.queryParams = {
        pageIndex: 1,
        pageSize: 10,
        institutionId: '',
        idcard: ''
      }
      this.getList();
    },
 
  }
};
</script>