b89c8760
wangming
项目初始化
|
1
|
<template>
|
de382ae8
yangzhi
首页修改
|
2
3
4
5
6
7
8
9
10
11
|
<div class="dashboard-container">
<div class="left-container">
<div class="panel">
<div class="panel-title">学历分布</div>
<div class="panel-body">
<div class="echart-box" style="height: 35vh" id="echart1"></div>
</div>
</div>
<div class="panel">
<div class="panel-body">
|
ed88fd8e
yangzhi
首页数据对接
|
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<el-calendar v-model="currentDate" style="height: 35vh">
<template slot="dateCell" slot-scope="{ date, data }">
<p :class="data.isSelected ? 'is-selected' : ''">
<el-popover
v-if="hasInvitationComputed(date, data).length"
placement="top-start"
title="今日面试"
width="350"
trigger="hover"
>
<ul class="popover-list">
<li
v-for="invitation in hasInvitationComputed(date, data)"
:key="invitation.id"
>
<span style="min-width: 3em">{{
invitation.qujian
}}</span>
|
38bc1d53
yangzhi
基础字体改大到16px
|
30
|
<span style="min-width: 3em">{{
|
ed88fd8e
yangzhi
首页数据对接
|
31
32
33
|
invitation.fullName
}}</span>
<span style="min-width: 7em">{{ invitation.phone }}</span>
|
38bc1d53
yangzhi
基础字体改大到16px
|
34
|
<span style="min-width: 5em">{{
|
4ebb3d66
yangzhi
简历界面
|
35
36
|
invitation.processName
}}</span>
|
ed88fd8e
yangzhi
首页数据对接
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
</li>
</ul>
<el-badge
slot="reference"
:value="hasInvitationComputed(date, data).length"
class="item"
type="primary"
>
<span>{{ data.day.split("-")[2] }} </span>
</el-badge>
</el-popover>
<span v-else>{{ data.day.split("-")[2] }} </span>
</p>
</template>
</el-calendar>
|
de382ae8
yangzhi
首页修改
|
53
54
55
56
57
58
59
60
61
62
63
|
</div>
</div>
<div class="panel">
<div class="panel-title">面试进度</div>
<div class="panel-body">
<div id="echart2" style="height: 35vh"></div>
</div>
</div>
<div class="panel">
<div class="panel-title">当日面试</div>
<div class="panel-body">
|
ed88fd8e
yangzhi
首页数据对接
|
64
|
<el-table :data="toDayInterviewUsers" :show-header="false">
|
4ebb3d66
yangzhi
简历界面
|
65
66
|
<el-table-column>
<template slot-scope="{ row }">
|
de382ae8
yangzhi
首页修改
|
67
|
<div class="table-td-list">
|
4ebb3d66
yangzhi
简历界面
|
68
|
<span>{{ row.fullName }}</span>
|
ed88fd8e
yangzhi
首页数据对接
|
69
|
<span>{{ row.sex }}</span>
|
de382ae8
yangzhi
首页修改
|
70
71
72
73
|
<span>32</span>
</div>
</template>
</el-table-column>
|
ed88fd8e
yangzhi
首页数据对接
|
74
|
<el-table-column>
|
4ebb3d66
yangzhi
简历界面
|
75
|
<template slot-scope="{ row }">
|
de382ae8
yangzhi
首页修改
|
76
|
<div class="table-td-list">
|
ed88fd8e
yangzhi
首页数据对接
|
77
78
79
|
<span>{{ row.byyx }}</span>
<span>{{ row.zhuanye }}</span>
<span>{{ row.xueli }}</span>
|
de382ae8
yangzhi
首页修改
|
80
81
82
83
|
</div>
</template>
</el-table-column>
<el-table-column>
|
4ebb3d66
yangzhi
简历界面
|
84
85
86
87
88
|
<template slot-scope="{ row }">
<span>{{
row.AnswerTime | dateTimeFilter("yyyy/MM/dd HH:mm")
}}</span>
</template>
|
de382ae8
yangzhi
首页修改
|
89
|
</el-table-column>
|
4ebb3d66
yangzhi
简历界面
|
90
|
<el-table-column prop="testpaper"> </el-table-column>
|
de382ae8
yangzhi
首页修改
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
</el-table>
</div>
</div>
</div>
<div class="right-container">
<ul class="sta-list">
<li v-for="item in staList" :key="item.title">
<div style="justify-content: flex-start">
<img
style="height: 20px; margin-right: 10px"
:src="item.icon"
alt=""
/>
<span class="sub-title">{{ item.title }}</span>
</div>
<div>
<h3>{{ item.count }}</h3>
<img
|
64ef8e7e
yangzhi
首页右侧的侧边栏箭头按钮不可点击
|
109
|
@click="handleNavigatorUser(item)"
|
de382ae8
yangzhi
首页修改
|
110
|
src="/static/images/index/icon9.png"
|
64ef8e7e
yangzhi
首页右侧的侧边栏箭头按钮不可点击
|
111
|
style="height: 30px;cursor: pointer;"
|
de382ae8
yangzhi
首页修改
|
112
113
114
115
116
117
118
|
alt=""
/>
</div>
</li>
</ul>
</div>
</div>
|
b89c8760
wangming
项目初始化
|
119
120
121
|
</template>
<script>
|
de382ae8
yangzhi
首页修改
|
122
123
124
|
import { GetQuestionTotal, GetTestPaperTotal } from "@/api/index";
import { OrderGetPriceNumber } from "@/api/order.js";
import { mapGetters } from "vuex";
|
ed88fd8e
yangzhi
首页数据对接
|
125
126
127
128
129
130
131
|
import { GetUserList, GetCompanyInvitation } from "@/api/user";
import {
GetEducationalBackgroundDistribution,
GetInterviewProgress,
GetSameDayInterview,
} from "@/api/dashboard";
|
de382ae8
yangzhi
首页修改
|
132
133
134
135
136
137
138
139
140
|
import { GetInfo } from "@/api/setting";
import * as echarts from "echarts";
export default {
data() {
return {
currentDate: new Date(),
|
ed88fd8e
yangzhi
首页数据对接
|
141
142
143
|
invitationList: [], //面试邀请
|
de382ae8
yangzhi
首页修改
|
144
145
146
|
staList: [
{
title: "入库/人",
|
4ebb3d66
yangzhi
简历界面
|
147
|
val: "入库",
|
ed88fd8e
yangzhi
首页数据对接
|
148
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
149
150
151
152
|
icon: "/static/images/index/icon1.png",
},
{
title: "面试邀请/人",
|
4ebb3d66
yangzhi
简历界面
|
153
|
val: "面试邀请",
|
ed88fd8e
yangzhi
首页数据对接
|
154
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
155
156
157
158
|
icon: "/static/images/index/icon2.png",
},
{
title: "正在面试/人",
|
4ebb3d66
yangzhi
简历界面
|
159
|
val: "未完成面试",
|
ed88fd8e
yangzhi
首页数据对接
|
160
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
161
162
163
164
|
icon: "/static/images/index/icon3.png",
},
{
title: "面试完成/人",
|
4ebb3d66
yangzhi
简历界面
|
165
|
val: "面试完成",
|
ed88fd8e
yangzhi
首页数据对接
|
166
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
167
168
169
170
|
icon: "/static/images/index/icon4.png",
},
{
title: "线下面试/人",
|
4ebb3d66
yangzhi
简历界面
|
171
|
val: "线下面试",
|
ed88fd8e
yangzhi
首页数据对接
|
172
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
173
174
175
176
|
icon: "/static/images/index/icon5.png",
},
{
title: "已录用/人",
|
4ebb3d66
yangzhi
简历界面
|
177
|
val: "已录用",
|
ed88fd8e
yangzhi
首页数据对接
|
178
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
179
180
181
182
|
icon: "/static/images/index/icon6.png",
},
{
title: "未录用/人",
|
4ebb3d66
yangzhi
简历界面
|
183
|
val: "未录用",
|
ed88fd8e
yangzhi
首页数据对接
|
184
|
count: 0,
|
de382ae8
yangzhi
首页修改
|
185
186
|
icon: "/static/images/index/icon7.png",
},
|
4ebb3d66
yangzhi
简历界面
|
187
|
{
|
eb117b73
yangzhi
禁用改成不符合条件
|
188
189
|
title: "不符合条件/人",
val: "不符合条件",
|
4ebb3d66
yangzhi
简历界面
|
190
191
192
|
count: 0,
icon: "/static/images/index/icon8.png",
},
|
de382ae8
yangzhi
首页修改
|
193
|
],
|
de382ae8
yangzhi
首页修改
|
194
|
echartOption1: {
|
38bc1d53
yangzhi
基础字体改大到16px
|
195
196
197
|
textStyle: {
fontSize: 16,
},
|
de382ae8
yangzhi
首页修改
|
198
199
200
|
legend: {
top: "bottom",
},
|
ed88fd8e
yangzhi
首页数据对接
|
201
202
203
|
tooltip: {
trigger: "item",
},
|
de382ae8
yangzhi
首页修改
|
204
205
206
207
208
209
|
series: [
{
name: "学历分布",
type: "pie",
radius: [0, "80%"],
center: ["50%", "50%"],
|
ed88fd8e
yangzhi
首页数据对接
|
210
211
|
// roseType: "area",
data: [],
|
de382ae8
yangzhi
首页修改
|
212
213
214
215
|
},
],
},
echartOption2: {
|
38bc1d53
yangzhi
基础字体改大到16px
|
216
217
218
|
textStyle: {
fontSize: 16,
},
|
de382ae8
yangzhi
首页修改
|
219
220
221
222
223
224
225
226
227
|
grid: {
top: 20,
bottom: 40,
},
tooltip: {},
xAxis: {
type: "category",
axisLabel: {
color: "#999999",
|
4ebb3d66
yangzhi
简历界面
|
228
|
interval: 0,
|
de382ae8
yangzhi
首页修改
|
229
230
|
fontSize: 16,
},
|
4ebb3d66
yangzhi
简历界面
|
231
|
data: [],
|
de382ae8
yangzhi
首页修改
|
232
233
234
235
236
237
|
},
yAxis: {
type: "value",
},
series: [
{
|
ed88fd8e
yangzhi
首页数据对接
|
238
|
data: [],
|
de382ae8
yangzhi
首页修改
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
type: "bar",
label: {
show: true,
color: "#4e95ff",
position: "top",
formatter: "{c}人",
},
itemStyle: {
normal: {
color: "#4e95ff",
barBorderRadius: [10, 10, 0, 0],
},
},
},
],
},
|
4ebb3d66
yangzhi
简历界面
|
256
257
|
//当日面试
toDayInterviewUsers: [],
|
ed88fd8e
yangzhi
首页数据对接
|
258
|
|
de382ae8
yangzhi
首页修改
|
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
isAdmin: false,
imageUrl: "",
total: {
questiontotal: 0,
testpapertotal: 0,
PriceNumber: 0,
Count: 0,
},
query: {
UserTypeEnum: 1, //0:管理员,1普通用户
PageIndex: 1,
PageSize: 10,
},
};
},
computed: {
...mapGetters(["name"]),
|
ed88fd8e
yangzhi
首页数据对接
|
276
277
278
279
280
281
282
283
284
285
286
|
hasInvitationComputed() {
return (date, data) => {
if (!this.invitationList.length) {
return [];
}
return this.invitationList.filter((t) => t.startTime == data.day);
};
},
},
created() {
this.initInvitations();
|
4ebb3d66
yangzhi
简历界面
|
287
|
this.initToDayInterviewUsers();
|
de382ae8
yangzhi
首页修改
|
288
|
},
|
de382ae8
yangzhi
首页修改
|
289
290
291
292
293
294
295
296
|
mounted() {
try {
if (this.$store.state.user.userInfo.UserType == 0) this.isAdmin = true;
} catch {}
this.init();
this.GetTotalHeadler();
},
methods: {
|
64ef8e7e
yangzhi
首页右侧的侧边栏箭头按钮不可点击
|
297
298
299
300
|
handleNavigatorUser(item){
this.$router.push({path:'/user/user',query:{process:item.val}});
console.log('item',item);
},
|
4ebb3d66
yangzhi
简历界面
|
301
302
303
304
305
|
initToDayInterviewUsers() {
GetSameDayInterview().then((res) => {
this.toDayInterviewUsers = res.data;
});
},
|
ed88fd8e
yangzhi
首页数据对接
|
306
307
308
309
310
311
312
313
314
|
initInvitations() {
GetCompanyInvitation({
PageIndex: 1,
PageSize: 10000,
}).then((res) => {
console.log("GetCompanyInvitation", res);
this.invitationList = res.data.data.list;
});
},
|
de382ae8
yangzhi
首页修改
|
315
316
317
318
319
320
|
initEchart() {
this.initEchartXueli();
this.initEchartJindu();
},
initEchartXueli() {
let myChart = echarts.init(document.getElementById("echart1"));
|
ed88fd8e
yangzhi
首页数据对接
|
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
GetEducationalBackgroundDistribution().then((res) => {
console.log("GetEducationalBackgroundDistribution", res);
let list = res.data.map((t) => {
t.name = !t.name ? "未知" : t.name;
return t;
});
this.echartOption1.series[0].data = list.map((t) => {
return {
name: t.name,
value: t.count,
};
});
myChart.setOption(this.echartOption1);
});
|
de382ae8
yangzhi
首页修改
|
335
336
337
|
},
initEchartJindu() {
let myChart = echarts.init(document.getElementById("echart2"));
|
ed88fd8e
yangzhi
首页数据对接
|
338
339
|
GetInterviewProgress().then((res) => {
console.log("GetInterviewProgress", res);
|
4ebb3d66
yangzhi
简历界面
|
340
|
let list = res.data;
|
ed88fd8e
yangzhi
首页数据对接
|
341
342
343
344
345
346
|
this.echartOption2.series[0].data = list.map((t) => {
return {
name: t.name,
value: t.count,
};
});
|
4ebb3d66
yangzhi
简历界面
|
347
348
|
this.echartOption2.xAxis.data = list.map((t) => t.name);
myChart.setOption(this.echartOption2);
|
ed88fd8e
yangzhi
首页数据对接
|
349
|
|
4ebb3d66
yangzhi
简历界面
|
350
351
352
|
//右边统计数据
list.forEach((item) => {
let index = this.staList.findIndex((t) => t.val == item.name);
|
9d70977c
yangzhi
修复bug:左边面试进度和右边的数...
|
353
|
if (index>-1) {
|
4ebb3d66
yangzhi
简历界面
|
354
355
356
|
this.staList[index].count = item.count;
}
});
|
ed88fd8e
yangzhi
首页数据对接
|
357
|
});
|
de382ae8
yangzhi
首页修改
|
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
},
init() {
var _this = this;
GetInfo(1).then((res) => {
var d = res.data;
if (d && d.data) {
if (d.data.home_images) {
_this.imageUrl = _this.BASE_URL + d.data.home_images;
}
}
});
this.initEchart();
},
GetTotalHeadler() {
GetQuestionTotal().then((res) => {
this.total.questiontotal = res.data.data;
});
GetTestPaperTotal().then((res) => {
this.total.testpapertotal = res.data.data;
});
OrderGetPriceNumber().then((res) => {
this.total.PriceNumber = res.data.data;
});
GetUserList(this.query).then((res) => {
this.total.Count = res.data.data.total;
});
},
},
};
|
b89c8760
wangming
项目初始化
|
387
388
|
</script>
|
de382ae8
yangzhi
首页修改
|
389
|
<style scoped>
|
ed88fd8e
yangzhi
首页数据对接
|
390
391
|
>>> .el-calendar-table td.next {
display: none;
|
de382ae8
yangzhi
首页修改
|
392
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
393
394
395
396
397
|
>>> .el-calendar-day {
height: auto;
display: flex;
justify-content: center;
align-items: center;
|
de382ae8
yangzhi
首页修改
|
398
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
399
400
401
|
>>> .el-calendar-day p {
margin: 0;
text-align: center;
|
88e9d1c0
yangzhi
首页日历有个小bug
|
402
|
height: 30px;
|
ed88fd8e
yangzhi
首页数据对接
|
403
|
width: 40px;
|
88e9d1c0
yangzhi
首页日历有个小bug
|
404
|
line-height: 30px;
|
de382ae8
yangzhi
首页修改
|
405
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
406
407
|
>>> .el-calendar-table .el-calendar-day:hover {
background-color: transparent;
|
de382ae8
yangzhi
首页修改
|
408
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
409
410
411
|
>>> .el-calendar-table .el-calendar-day:hover p {
background-color: #f2f8fe;
border-radius: 30%;
|
de382ae8
yangzhi
首页修改
|
412
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
413
414
|
>>> .el-calendar-table td.is-selected {
background-color: transparent;
|
de382ae8
yangzhi
首页修改
|
415
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
416
417
418
|
>>> .el-calendar-table td.is-selected .el-calendar-day p {
background-color: #f2f8fe;
border-radius: 30%;
|
de382ae8
yangzhi
首页修改
|
419
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
420
421
422
423
|
>>> .el-calendar-table td.is-today .el-calendar-day p {
color: #fff;
background-color: #409eff;
border-radius: 30%;
|
de382ae8
yangzhi
首页修改
|
424
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
425
426
|
>>> .el-calendar-table td {
border: none;
|
de382ae8
yangzhi
首页修改
|
427
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
428
429
|
>>> .el-calendar-table tr td:first-child {
border-left: none;
|
de382ae8
yangzhi
首页修改
|
430
|
}
|
ed88fd8e
yangzhi
首页数据对接
|
431
432
|
>>> .el-calendar-table tr:first-child td {
border: none;
|
de382ae8
yangzhi
首页修改
|
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
|
}
</style>
<style lang="scss" scoped>
.dashboard {
&-container {
margin: 30px;
}
&-text {
font-size: 30px;
line-height: 46px;
}
}
.el-row {
margin-bottom: 20px;
margin-top: 20px;
&:last-child {
margin-bottom: 0;
}
}
.el-col {
border-radius: 5px;
}
.bg-purple-dark {
background: #99a9bf;
}
.bg-purple {
background: #d3dce6;
box-shadow: 0 0 10px #cdcdcd;
}
.bg-purple-light {
background: #e5e9f2;
}
.grid-content {
border-radius: 5px;
|
97bf7b2f
yangzhi
样式优化适配不同分辨率
|
475
|
min-height: 100%;
|
de382ae8
yangzhi
首页修改
|
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
|
text-align: center;
padding-top: 20px;
padding-bottom: 20px;
.grid-content-number {
font-size: 40px;
color: red;
}
div {
font-size: 20px;
margin-top: 10px;
}
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
</style>
|
b89c8760
wangming
项目初始化
|
496
|
<style lang="scss" scoped>
|
ed88fd8e
yangzhi
首页数据对接
|
497
498
|
.popover-list {
padding-left: 10px;
|
38bc1d53
yangzhi
基础字体改大到16px
|
499
|
padding-right: 10px;
|
ed88fd8e
yangzhi
首页数据对接
|
500
501
502
503
504
505
506
|
li {
list-style: none;
height: 40px;
line-height: 40px;
display: flex;
align-items: center;
border-top: 1px dashed #eaeaea;
|
38bc1d53
yangzhi
基础字体改大到16px
|
507
508
|
font-size: 16px;
padding-right: 20px;
|
ed88fd8e
yangzhi
首页数据对接
|
509
510
511
512
513
|
span {
margin-right: 10px;
}
}
}
|
de382ae8
yangzhi
首页修改
|
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
|
.table-td-list {
display: flex;
align-items: center;
span {
margin-right: 10px;
}
}
.dashboard-container {
display: flex;
justify-content: space-between;
background-color: #f9f9f9;
margin: 0;
padding: 20px;
}
.left-container {
flex: 1;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.panel {
width: 49%;
flex: none;
}
}
.right-container {
}
.panel {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 10px 20px;
margin-bottom: 20px;
.panel-title {
height: 3em;
line-height: 3em;
|
38bc1d53
yangzhi
基础字体改大到16px
|
549
|
font-size: 22px;
|
de382ae8
yangzhi
首页修改
|
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
|
font-weight: bold;
}
}
.sta-list {
display: flex;
flex-direction: column;
padding-left: 20px;
width: 200px;
flex: none;
margin: 0;
li {
list-style: none;
background-color: #fff;
border: 10px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
padding: 15px 15px 5px;
margin-bottom: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 9vh;
.sub-title {
color: #999;
}
& > div {
display: flex;
align-items: center;
justify-content: space-between;
}
h3 {
margin: 0;
}
}
}
|
b32564ca
周超
11
|
585
|
</style>
|