userlist.vue
5.01 KB
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
<template>
<div class="app-container">
<div class="seetingsDiv" style="">
<div class="flex" style="width:75%">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="关键字">
<el-input placeholder="输入关键字搜索" v-model="query.keyword"></el-input>
</el-form-item>
<el-form-item label="最高学历">
<el-select v-model="query.xueli" placeholder="最高学历">
<el-option label="大专" value="shanghai"></el-option>
<el-option label="本科" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item label="性别">
<el-select v-model="query.sex" placeholder="性别">
<el-option label="男" value="1"></el-option>
<el-option label="女" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="success" @click="search">搜索</el-button>
<el-button v-if="selectedList.length" type="primary" @click="handleInviteInterview"
>邀请面试</el-button
>
</el-form-item>
</el-form>
</div>
<el-upload
class="upload-demo"
action="/api/Account/importUsers?UserClassId=0"
multiple
:limit="1"
:show-file-list="false"
:on-exceed="handleExceed"
:on-success="handleSuccess"
:file-list="fileList"
>
<el-button size="small" type="primary">导入用户</el-button>
</el-upload>
</div>
<el-table
:data="userList"
id="QuestionTable"
border
style="
width: 100%;
border-radius: 5px;
box-shadow: 0 0 10px #efefef;
margin-top: 10px;
"
@selection-change="handleSelectionChange"
:stripe="true"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
type="index"
prop="date"
width="50"
align="center"
></el-table-column>
<el-table-column prop="date" label="姓名">
<template slot-scope="scope">
<span>{{ scope.row.fullName }}</span>
</template>
</el-table-column>
<el-table-column prop="date" label="电话号码">
<template slot-scope="scope">
<el-tooltip
class="item"
effect="dark"
:content="scope.row.phone"
placement="top-start"
>
<span>{{ scope.row.phone1 }}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="date" label="性别"> </el-table-column>
<el-table-column prop="date" label="毕业院校"> </el-table-column>
<el-table-column prop="date" label="最高学历"> </el-table-column>专业
<el-table-column prop="date" label="专业"> </el-table-column>
<el-table-column prop="date" label="注册时间">
<template slot-scope="scope">
<span>{{ scope.row.addTime.replace("T", " ") }}</span>
</template>
</el-table-column>
</el-table>
<el-pagination
background
@current-change="currentchange"
style="position: static; bottom: 3px; text-align: center; margin-top: 5px"
:page-size="this.query.PageSize"
layout="total,prev, pager, next"
:total="Count"
>
</el-pagination>
</div>
</template>
<script>
import { ImportUserByExcel, GetUserList } from "@/api/user";
export default {
data() {
return {
userList: [],
Count: 0,
type: "1",
query: {
UserTypeEnum: 1, //0:管理员,1普通用户
PageIndex: 1,
PageSize: 10,
keyword:''
},
fileList:[],
selectedList: [],
};
},
created() {
this.GetUser();
},
methods: {
search(){
this.GetUser();
},
handleSuccess(){
this.$message.success('导入完成!');
this.GetUser();
},
handleInviteInterview() {},
handleSelectionChange(val) {
console.log(val);
this.selectedList = val;
},
handleExceed(){},
ImportUser() {},
GetUser() {
GetUserList(this.query).then((res) => {
this.userList = res.data.data.rows.map((t) => {
if (t.phone) {
t.phone1 = t.phone.replace(t.phone.substring(3, 7), "****");
}
return t;
});
this.Count = res.data.data.total;
});
},
currentchange(page) {
this.query.PageIndex = page;
this.GetUser();
},
},
};
</script>
<style lang="scss" scoped>
.seetingsDiv {
display: flex;
align-items: center;
width: 100%;
padding-top:10px;
padding-left:10px;
/* height: 60px; */
background: #efefef;
/* line-height: 60px; */
border-radius: 5px;
box-shadow: 0 0 5px #cdcdcd;
justify-content: space-between;
}
.seetingsDiv button {
height: 40px;
background-color: #304156;
border: 0px;
margin-left: 10px;
box-shadow: 0 0 5px #cdcdcd;
float: none;
margin-right: 10px;
}
</style>