马宇豪
2025-03-07 db905ecd14f63dba9337b4f4715584ef2d7e8c7e
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
<template>
  <div class="app-container">
    <div style="display: flex">
     <el-input placeholder="请输入身份证号" v-model="queryParams.idcard" style="width: 250px"></el-input>
      <el-input placeholder="请输入姓名" v-model="queryParams.name" style="width: 250px;margin-left: 20px"></el-input>
      <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">
      <el-table-column label="姓名" align="center" prop="name" />
      <el-table-column label="身份证号" align="center" prop="idcard" :show-overflow-tooltip="true" width="170" />
      <el-table-column label="性别" align="center" prop="sex" >
        <template #default="scope">
          <span>{{scope.row.sex == 1 ? '男' : scope.row.sex == 2?'女':'未知'}}</span>
        </template>
      </el-table-column>
      <el-table-column label="手机号" align="center" prop="phone" />
      <el-table-column label="实名认证照" align="center" prop="photo" width="120" >
        <template #default="scope">
          <el-image
            style="width: 100px; height: 100px"
            :src="scope.row.authPhoto"
            :preview-src-list="[scope.row.authPhoto]">
          </el-image>
        </template>
      </el-table-column>
      <el-table-column label="当前归属单位" align="center" prop="trainOrgName" />
      <el-table-column label="行业" align="center" prop="industry" />
      <el-table-column label="工种" align="center" prop="occupation" />
      <el-table-column label="初次上报平台" align="center" prop="createBy" />
      <el-table-column label="上报时间" align="center" prop="createTime" width="100" />
      <el-table-column label="最近更新平台" align="center" prop="updateBy" />
      <el-table-column label="最新更新时间" align="center" prop="updateTime" width="100" />
      <el-table-column label="历史记录" align="center" class-name="small-padding fixed-width">
        <template #default="scope">
          <el-button
            size="mini"
            type="text"
            @click="viewLearnRecord(scope.row)"
          >学习记录</el-button>
          <el-button
            size="mini"
            type="text"
            @click="viewExamRecord(scope.row)"
          >考试记录</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
 
    <el-dialog
      title="学习记录"
      :visible.sync="learningDialog"
      :modal-append-to-body="false"
      :close-on-click-modal="false"
      width="900px"
      append-to-body
      :before-close="handleCloseLearning">
      <learning ref="learnRef" ></learning>
    </el-dialog>
    <el-dialog
      title="考试记录"
      :visible.sync="dialogVisible"
      :modal-append-to-body="false"
      :close-on-click-modal="false"
      width="900px"
      :before-close="handleClose">
      <examRecord ref="examRef" ></examRecord>
    </el-dialog>
 
  </div>
</template>
 
<script>
import examRecord from '../studentSupervision/compontents/examlRecord.vue'
import learning from '../studentSupervision/compontents/learningRecord.vue'
import { listStudent } from '@/api/onlineEducation/student'
import noPic from '@/assets/images/none.png'
import Cookies from 'js-cookie'
import { listPlat } from '@/api/onlineEducation/plat'
export default {
  name: "nPeopleManage",
  dicts: [],
  components: {learning,examRecord},
  data() {
    return {
      loading: false,
      single: true,
      multiple: true,
      showSearch: true,
      addForm: false,
      total: 0,
      expertTypes: [],
      expertList: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        idcard: '',
        name: ''
      },
      dialogVisible:false,
      learningDialog: false
    };
  },
  created() {
    this.getList()
 
  },
  methods: {
    getList(){
      this.loading = true;
      listStudent( this.queryParams).then((res) => {
        if (res.code == 200) {
          this.expertList = res.rows.map(item => {
            return {
              ...item,
              authPhoto: item.authPhoto !='-' ? item.authPhoto : noPic,
            }
          })
          this.total = res.total
          this.loading = false;
        }
      })
    },
    handleChange(){
 
    },
    handleQuery(){
      this.getList()
    },
    resetQuery(){
      this.queryParams = {
        pageIndex: 1,
        pageSize: 10,
        idCard: '',
        name: '',
      }
      this.getList()
    },
    viewLearnRecord(data){
      this.learningDialog = true
      Cookies.set('learnRecord',true)
      setTimeout(() => {
        this.$refs.learnRef.getList(data)
      },10)
    },
    viewExamRecord(data){
      this.dialogVisible = true
      Cookies.set('examRecord',true)
      setTimeout(() => {
        this.$refs.examRef.getList(data)
      },10)
 
    },
    handleClose() {
      Cookies.remove('examRecord')
      this.dialogVisible = false;
    },
    handleCloseLearning() {
      Cookies.remove('learnRecord')
      this.learningDialog = false;
    }
 
  }
};
</script>