|
|
@@ -210,9 +210,7 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
-
|
|
|
</div>
|
|
|
<div class="info-box-l-lines"></div>
|
|
|
<!-- 求职岗位 -->
|
|
|
@@ -238,8 +236,6 @@
|
|
|
<div>已拒绝</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
-
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="info-box-r flex justify-center flex-wrap">
|
|
|
@@ -247,16 +243,8 @@
|
|
|
<div class="info-box-r-t-title">
|
|
|
常用功能
|
|
|
</div>
|
|
|
- <div style="margin-top: 20px;" class="flex align-center">
|
|
|
- <!-- <div @click="openShar()" class="info-box-r-b-item">
|
|
|
- <div class="info-box-r-b-item-t flex align-center justify-center">
|
|
|
- <img src="/images/resume/yq.png" alt="" srcset="">
|
|
|
- </div>
|
|
|
- <div class="info-box-r-b-item-b">
|
|
|
- 邀请好友
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div @click="refreshJob()" class="info-box-r-b-item">
|
|
|
+ <div style="margin-top: 30px;display: grid;grid-template-columns: repeat(4, 1fr);gap: 20px;">
|
|
|
+ <!-- <div @click="refreshJob()" class="info-box-r-b-item">
|
|
|
<div class="info-box-r-b-item-t flex align-center justify-center">
|
|
|
<img src="/images/resume/sx.png" alt="" srcset="">
|
|
|
</div>
|
|
|
@@ -296,6 +284,22 @@
|
|
|
沟通记录
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div @click="openStatistics('day')" class="info-box-r-b-item">
|
|
|
+ <div class="info-box-r-b-item-t flex align-center justify-center">
|
|
|
+ <img src="/images/resume/yq.png" alt="" srcset="">
|
|
|
+ </div>
|
|
|
+ <div class="info-box-r-b-item-b">
|
|
|
+ 日数据
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div @click="openStatistics('week')" class="info-box-r-b-item">
|
|
|
+ <div class="info-box-r-b-item-t flex align-center justify-center">
|
|
|
+ <img src="/images/resume/yq.png" alt="" srcset="">
|
|
|
+ </div>
|
|
|
+ <div class="info-box-r-b-item-b">
|
|
|
+ 周数据
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -396,6 +400,98 @@
|
|
|
</div>
|
|
|
<canvas ref="poster" class="poster_canvas" width="375" height="673"></canvas>
|
|
|
</el-dialog>
|
|
|
+ <!-- 日 周数据 -->
|
|
|
+ <el-dialog class="shares" v-model="dialogStatistics" destroy-on-close width="35%">
|
|
|
+ <el-icon @click="dialogStatistics = false" style="position: absolute;right: 10px;top: 10px;cursor: pointer;"
|
|
|
+ size="25">
|
|
|
+ <Close />
|
|
|
+ </el-icon>
|
|
|
+ <el-select v-model="selectValue" placeholder="Select" style="width: 240px" @change="changeOptions">
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ <template v-if="activeName == 'week'">
|
|
|
+ <el-select v-model="selectedWeekValue" placeholder="选择周" style="width: 240px" @change="selectWeek">
|
|
|
+ <el-option v-for="week in previous8Weeks" :key="week.start" :label="week.label"
|
|
|
+ :value="week.start" />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ <div style="margin-top: 20px;">
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs" @tab-change="changeOptions">
|
|
|
+ <el-tab-pane label="日数据" name="day">
|
|
|
+ <div style="display: grid;grid-template-columns: repeat(4, 1fr);gap: 20px;">
|
|
|
+ <div class="table-box" v-for="(item,index) in todayData" :key="index">
|
|
|
+ <div>{{ item.title}}</div>
|
|
|
+ <div class="flex justify-between align-center table-bottom">
|
|
|
+ <div class="data-value">{{ item.number }}</div>
|
|
|
+ <div class="data-unit">较昨日 {{ item.change }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="周数据" name="week">
|
|
|
+ <div style="display: grid;grid-template-columns: repeat(2, 1fr);gap: 20px;">
|
|
|
+ <div class="table-box">
|
|
|
+ <div>查看</div>
|
|
|
+ <div class="flex flex-wrap table-bottom" style="gap: 20px;">
|
|
|
+ <div>
|
|
|
+ <div>我看过</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.iSaw }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div>看过我</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.sawMe }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table-box">
|
|
|
+ <div>沟通</div>
|
|
|
+ <div class="flex flex-wrap table-bottom" style="gap: 20px;">
|
|
|
+ <div>
|
|
|
+ <div>我沟通</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.iCommunicated }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div>求职者</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.candidateCommunicated }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table-box">
|
|
|
+ <div>获取简历联系方式</div>
|
|
|
+ <div class="flex flex-wrap table-bottom" style="gap: 20px;">
|
|
|
+ <div>
|
|
|
+ <div>合计</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.receivedResumes + dataStatics.exchangedContact }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div>获取简历</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.receivedResumes }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div>交换电话/微信</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.exchangedContact }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="table-box">
|
|
|
+ <div>获取面试联系方式</div>
|
|
|
+ <div class="flex flex-wrap table-bottom" style="gap: 20px;">
|
|
|
+ <div>
|
|
|
+ <div>邀约面试</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.acceptedInterview }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div>接受面试</div>
|
|
|
+ <div><span class="data-value">{{ dataStatics.acceptedInterview }}</span> 人</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -408,6 +504,23 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ previous8Weeks: [], // 前8周日期范围 [[start, end], ...]
|
|
|
+ selectedWeekValue: '', // 当前选中的周
|
|
|
+ todayStart: "",
|
|
|
+ todayEnd: "",
|
|
|
+ selectValue:'',
|
|
|
+ activeName:'day',
|
|
|
+ options: [],
|
|
|
+ todayData: [
|
|
|
+ { title: '我看过', number: 0, change: 0 },
|
|
|
+ { title: '看过我', number: 0, change: 0 },
|
|
|
+ { title: '我沟通', number: 0, change: 0 },
|
|
|
+ { title: '求职者沟通', number: 0, change: 0 },
|
|
|
+ { title: '收获简历', number: 0, change: 0 },
|
|
|
+ { title: '交换电话微信', number: 0, change: 0 },
|
|
|
+ { title: '接受面试', number: 0, change: 0 }
|
|
|
+ ],
|
|
|
+ dataStatics: {},
|
|
|
companyInfos: {},
|
|
|
companyInfo: {
|
|
|
companyName: '', //企业名称
|
|
|
@@ -544,6 +657,7 @@
|
|
|
dialogShare: false,
|
|
|
dialogImageUrl: '', // 预览图片URL
|
|
|
dialogVisible: false, // 预览图片是否可见
|
|
|
+ dialogStatistics:false
|
|
|
}
|
|
|
|
|
|
},
|
|
|
@@ -567,6 +681,13 @@
|
|
|
this.getCompanyInfo()
|
|
|
this.getComList()
|
|
|
this.getlist()
|
|
|
+ this.previous8Weeks = this.getPrevious8Weeks(new Date());
|
|
|
+ console.log(this.previous8Weeks)
|
|
|
+ // 默认选中上一周
|
|
|
+ if (this.previous8Weeks.length) {
|
|
|
+ this.selectedWeekValue = this.previous8Weeks[0].start;
|
|
|
+ this.selectWeek(this.selectedWeekValue);
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
//监听行业选择变化
|
|
|
@@ -586,6 +707,99 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取前8周(不包含当前周)
|
|
|
+ getPrevious8Weeks(currentDate) {
|
|
|
+ const date = new Date(currentDate);
|
|
|
+ const currentDay = date.getDay();
|
|
|
+ const mondayOffset = currentDay === 0 ? -6 : 1 - currentDay;
|
|
|
+ const currentMonday = new Date(date);
|
|
|
+ currentMonday.setDate(date.getDate() + mondayOffset);
|
|
|
+
|
|
|
+ const weeks = [];
|
|
|
+ for (let i = 1; i <= 8; i++) {
|
|
|
+ const weekStart = new Date(currentMonday);
|
|
|
+ weekStart.setDate(currentMonday.getDate() - i * 7);
|
|
|
+
|
|
|
+ const weekEnd = new Date(weekStart);
|
|
|
+ weekEnd.setDate(weekStart.getDate() + 6);
|
|
|
+
|
|
|
+ const startStr = this.formatDate(weekStart);
|
|
|
+ const endStr = this.formatDate(weekEnd);
|
|
|
+ const label = `${weekStart.getFullYear()}-${String(weekStart.getMonth() + 1).padStart(2, '0')}-${String(weekStart.getDate()).padStart(2, '0')}- ~ `
|
|
|
+ + `${weekEnd.getFullYear()}-${String(weekEnd.getMonth() + 1).padStart(2, '0')}-${String(weekEnd.getDate()).padStart(2, '0')}`;
|
|
|
+
|
|
|
+ weeks.push({ start: startStr, end: endStr, label });
|
|
|
+ }
|
|
|
+ return weeks;
|
|
|
+ },
|
|
|
+ // 格式化日期 YYYY-MM-DD
|
|
|
+ formatDate(date) {
|
|
|
+ const y = date.getFullYear();
|
|
|
+ const m = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
+ const d = String(date.getDate()).padStart(2, '0');
|
|
|
+ return `${y}-${m}-${d}`;
|
|
|
+ },
|
|
|
+
|
|
|
+ selectWeek(startDate) {
|
|
|
+ const week = this.previous8Weeks.find(w => w.start === startDate);
|
|
|
+ if (!week) return;
|
|
|
+
|
|
|
+ this.todayStart = `${week.start} 00:00:00`;
|
|
|
+ this.todayEnd = `${week.end} 23:59:59`;
|
|
|
+
|
|
|
+ // 调用接口
|
|
|
+ if (this.selectValue) this.getDataStatics();
|
|
|
+ },
|
|
|
+ // 打开日周统计弹框
|
|
|
+ openStatistics(val) {
|
|
|
+ this.dialogStatistics = true;
|
|
|
+ this.activeName = val;
|
|
|
+ this.getZwList();
|
|
|
+ },
|
|
|
+ getZwList() {
|
|
|
+ this.$Request.get("/app/postPush/getMyPostPush").then(res => {
|
|
|
+ this.options = []
|
|
|
+ res.data.records.forEach(item => {
|
|
|
+ this.options.push({
|
|
|
+ label: item.ruleClassifyName,
|
|
|
+ value: item.postPushId
|
|
|
+ })
|
|
|
+ })
|
|
|
+ this.selectValue = res.data?.records[0]?.postPushId || ''
|
|
|
+ this.getDataStatics()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getDataStatics() {
|
|
|
+ let data = {
|
|
|
+ postPushId: this.selectValue,
|
|
|
+ todayStart: this.activeName == 'week'? this.todayStart : '',
|
|
|
+ todayEnd: this.activeName == 'week' ? this.todayEnd : '',
|
|
|
+ }
|
|
|
+ this.$Request.get("/app/user/userYesterdayData", { params:data}).then(res => {
|
|
|
+ if(this.activeName == 'day'){
|
|
|
+ this.todayData[0].number = res.data.iSaw;
|
|
|
+ this.todayData[0].change = res.data.tyIsaw;
|
|
|
+ this.todayData[1].number = res.data.sawMe;
|
|
|
+ this.todayData[1].change = res.data.tySawMe;
|
|
|
+ this.todayData[2].number = res.data.iCommunicated;
|
|
|
+ this.todayData[2].change = res.data.tyICommunicated;
|
|
|
+ this.todayData[3].number = res.data.candidateCommunicated;
|
|
|
+ this.todayData[3].change = res.data.tyCandidateCommunicated;
|
|
|
+ this.todayData[4].number = res.data.receivedResumes;
|
|
|
+ this.todayData[4].change = res.data.tyReceivedResumes;
|
|
|
+ this.todayData[5].number = res.data.exchangedContact;
|
|
|
+ this.todayData[5].change = res.data.tyExchangedContact;
|
|
|
+ this.todayData[6].number = res.data.acceptedInterview;
|
|
|
+ this.todayData[6].change = res.data.tyAcceptedInterview;
|
|
|
+ }else{
|
|
|
+ this.dataStatics = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 切换岗位
|
|
|
+ changeOptions(){
|
|
|
+ this.getDataStatics();
|
|
|
+ },
|
|
|
formatHtml(html) {
|
|
|
return html.replace(/<p>/g, '<p style="margin:0;padding:0;">')
|
|
|
},
|
|
|
@@ -669,9 +883,10 @@
|
|
|
// },
|
|
|
//去我的收藏
|
|
|
goMyCollect(name) {
|
|
|
- this.$router.push({
|
|
|
+ const routeUrl = this.$router.resolve({
|
|
|
name: name,
|
|
|
- })
|
|
|
+ });
|
|
|
+ window.open(routeUrl.href, '_blank');
|
|
|
},
|
|
|
//去我的团队
|
|
|
goMyTeam() {
|
|
|
@@ -680,27 +895,30 @@
|
|
|
})
|
|
|
},
|
|
|
goJilu(type) {
|
|
|
- this.$router.push({
|
|
|
+ const routeUrl = this.$router.resolve({
|
|
|
name: 'jilu',
|
|
|
query: {
|
|
|
type: type
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ window.open(routeUrl.href, '_blank');
|
|
|
},
|
|
|
// 面试记录
|
|
|
goMyRecord() {
|
|
|
- this.$router.push({
|
|
|
+ const routeUrl = this.$router.resolve({
|
|
|
name: 'record'
|
|
|
- })
|
|
|
+ });
|
|
|
+ window.open(routeUrl.href, '_blank');
|
|
|
},
|
|
|
//我的招聘
|
|
|
goMyPostPush(type) {
|
|
|
- this.$router.push({
|
|
|
+ const routeUrl = this.$router.resolve({
|
|
|
name: 'myPostPush',
|
|
|
query: {
|
|
|
tabIndex: type
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ window.open(routeUrl.href, '_blank');
|
|
|
},
|
|
|
//获取岗位
|
|
|
getlist() {
|
|
|
@@ -1127,4 +1345,24 @@
|
|
|
border: none !important;
|
|
|
width: initial !important;
|
|
|
}
|
|
|
+ .info-box-r-b-item{
|
|
|
+ width: initial !important;
|
|
|
+ }
|
|
|
+ .table-box{
|
|
|
+ padding: 12px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1px solid #e3e7ec;
|
|
|
+ border-radius: 6px;
|
|
|
+ .table-bottom{
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .data-value{
|
|
|
+ color: #333333;
|
|
|
+ font-size: 22px;
|
|
|
+ }
|
|
|
+ .data-unit{
|
|
|
+ color: #999999;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|