diff --git a/src/views/user/InterviewSchedule.vue b/src/views/user/InterviewSchedule.vue index 997277c..8efc55c 100644 --- a/src/views/user/InterviewSchedule.vue +++ b/src/views/user/InterviewSchedule.vue @@ -41,6 +41,16 @@ +
+ + + + +
@@ -56,8 +66,8 @@ @@ -149,6 +159,7 @@ } }; return { + title: '添加管理员', buttonText: '立即创建', userList: [], @@ -173,18 +184,92 @@ Password: '', checkPass: '', }, + accountlist:[], Count: 0, query: { PageIndex: 1, PageSize: 1000, - + date: '', + month:0, + day:1 }, } }, created() { - this.GetUser() + this.GetUser(); + + this.$nextTick(() => { + // 点击前一个月 + let prevBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(1)" + ); + prevBtn.addEventListener("click", e => { + console.log(this.query.date); + this.handlemonth(1); + }); + + //点击下一个月 + let nextBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(3)" + ); + nextBtn.addEventListener("click", () => { + console.log(this.query.date); + this.handlemonth(-1); + }); + + //点击今天 + let todayBtn = document.querySelector( + ".el-calendar__button-group .el-button-group>button:nth-child(2)" + ); + todayBtn.addEventListener("click", () => { + this.handlemonth(0); + }); + }); }, methods: { + getContent(data,date){ + // {{ data.day.split('-').slice(1).join('-') }} {{ data.isSelected ? '✔️' : ''}} + var html = []; + html.push( data.day.split('-').slice(1).join('-')); + try { + var d = this.accountlist.filter(o=>o.startTime == data.day); + if(d){ + d.forEach((item)=>{ + html.push(`${item.qujian+':'+item.count}`); + }); + } + } catch (error) { + + } + return html.join('  '); + }, + handlemonth(val) { + switch (val) { + case -1: + this.query.day=0; + this.query.month--; + break; + case 0: + this.query.month = 0; + this.query.day =1; + break; + case 1: + this.query.month++; + this.query.day =0; + break; + } + this.GetUser(); + }, search() { this.GetUser(); }, @@ -229,7 +314,8 @@ GetUser() { GetCompanyInvitation(this.query).then(res => { - this.userList = res.data.data + this.userList = res.data.data.list || []; + this.accountlist = res.data.data.account || [] this.Count = res.data.records }) },