瀏覽代碼

统计分析

Xiao_123 8 月之前
父節點
當前提交
0f1f22c07d

+ 6 - 5
src/views/recruit/enterprise/statistics/components/overview.vue

@@ -54,8 +54,8 @@ const title = ref('')
 const data = ref([])
 // 数据概况
 const overview = ref([
-  { title: '发布职位数量', value: 0, desc: '已发布职位数量', items: [], api: getJobNumPage, deal: true },
-  { title: '职位浏览量', value: 0, desc: '指全部职位被候选人查看的人数总和', items: [], api: getJobBrowseNum, deal: true, custom: true }, // getJobBrowseNumPage
+  { title: '发布职位数量', value: 0, desc: '已发布职位数量', items: [], api: getJobNumPage, deal: true, query: { jobStatus: 0 } },
+  { title: '职位浏览量', value: 0, desc: '指全部职位被求职者查看的人数总和', items: [], api: getJobBrowseNum, deal: true, custom: true }, // getJobBrowseNumPage
   { title: '收到的简历', value: 0, desc: '指全部职位收到简历的总数', items: [], api: getJobCvNewPage, isDeal: true },
   { title: '已查看简历', value: 0, desc: '指查看候选人主动发送的简历数量', items: [], api: getJobCvLookPage },
   { title: '已邀面试', value: 0, desc: '已邀约的面试人数', items: [], api: getInterviewWaitPage },
@@ -74,7 +74,7 @@ const handleDetails = async (val, index) => {
   title.value = val.title + '明细'
   show.value = true
   // 职位浏览量钻取
-  if (val.deal) {
+  if (val.deal && val.custom) {
     getBrowseDetails()
     return
   }
@@ -102,7 +102,7 @@ const getData = async (index) => {
   // 钻取
   if (index !== null && index !== undefined) {
     const obj = overview.value[index]
-    const res = await obj.api({ ...props.query, ...queryParams })
+    const res = await obj.api({ ...props.query, ...queryParams, ...overview.value[index]?.query })
     total.value = res.total
     data.value = obj.deal ? dealDictArrayData([], res.list) : obj.isDeal ? res.list.map(e => {
       e.job = dealDictObjData({}, e.job)
@@ -112,7 +112,8 @@ const getData = async (index) => {
   }
   // 统计数值
   overview.value.forEach(async (item) => {
-    const result = await item.api({ ...props.query, ...queryParams })
+    const params = { ...props.query, ...queryParams, ...item?.query }
+    const result = await item.api(params)
     // 职位浏览量 
     if (item.deal && item.custom) {
       item.value = result

+ 5 - 4
src/views/recruit/enterprise/statistics/overallAnalysis.vue

@@ -1,19 +1,19 @@
 <template>
   <v-card class="card-box pa-5">
     <div class="d-flex color-666 font-size-14">
-      <div class="d-flex align-center">
+      <div class="d-flex align-center" style="min-width: 358px;">
         <span>选择时间</span>
         <div class="ml-5 after">
           <span v-for="(k, i) in list" :key="i" :class="['item', { 'active': current === i }]" @click="handleClickType(i)">{{ k.label }}</span>
         </div>
       </div>
-      <div class="d-flex align-center ml-15">
+      <div class="d-flex align-center ml-7">
         <span>自定义日期</span>
         <div class="ml-5">
           <date-picker v-model="date" :options="{ range: true, clearable: true, placeholder: '请选择要查看的时间范围', change: handleChangeDate, format: 'timestamp' }"></date-picker>
         </div>
       </div>
-      <div class="ml-15" style="width: 300px;">
+      <div class="ml-10" style="width: 300px;">
         <Autocomplete v-model="query.jobId" :item="selectItems"></Autocomplete>
       </div>
     </div>
@@ -42,13 +42,14 @@ import { convertTimestampsToDayRange } from '@/utils/date'
 
 const tab = ref(1)
 const date = ref(null)
-const current = ref(0)
+const current = ref(1)
 const query = reactive({
   type: 0,
   time: null,
   jobId: null
 })
 const list = [
+  { label: '全部', value: -1 },
   { label: '最近7天', value: 0 },
   { label: '上个月', value: 1 },
   { label: '上季度', value: 2 }