Jelajahi Sumber

路由添加标识

Xiao_123 9 bulan lalu
induk
melakukan
1e9ae2d3fe

+ 6 - 3
src/layout/enterprise.vue

@@ -16,10 +16,10 @@
         </div>
         <div class="box pa-3">
           <div v-if="!isInWhiteList(route.path, whiteList)" class="box-content">
-            <router-view></router-view>
+            <router-view :key="key"></router-view>
           </div>
           <div v-else class="full">
-            <router-view></router-view>
+            <router-view :key="key"></router-view>
           </div>
         </div>
       </div>
@@ -34,10 +34,13 @@ import Headers from './company/navBar.vue'
 import Slider from './company/slider.vue'
 import side from './company/side.vue'
 import { useRouter, useRoute } from 'vue-router'
-import { watch, ref } from 'vue'
+import { watch, ref, computed } from 'vue'
 
 const router = useRouter()
 const route = useRoute()
+const key = computed(() => {
+  return route.path + Math.random()
+})
 
 const whiteList = [
   '/recruit/enterprise/talentPool/details',

+ 44 - 41
src/views/recruit/enterprise/statistics/components/data.js

@@ -48,6 +48,7 @@ export const list = [
       },
       xAxis: {
         type: 'category',
+        name: '范围',
         data: ['18-22岁', '22-30岁', '30-39岁', '40-49岁', '50-59岁']
       },
       yAxis: {
@@ -55,9 +56,9 @@ export const list = [
       },
       grid: {
         left: '0',
-        top: '50',
-        right: '0',
-        bottom: 0,
+        top: '60',
+        right: '50',
+        bottom: '10',
         containLabel: true
       },
       series: [
@@ -80,6 +81,7 @@ export const list = [
       },
       xAxis: {
         type: 'category',
+        name: '范围',
         data: ['应届毕业生', '1年以上', '2年以上', '3年以上', '5年以上', '8年以上', '10年以上']
       },
       yAxis: {
@@ -87,9 +89,9 @@ export const list = [
       },
       grid: {
         left: '0',
-        top: '50',
-        right: '0',
-        bottom: 0,
+        top: '60',
+        right: '50',
+        bottom: '10',
         containLabel: true
       },
       series: [
@@ -112,6 +114,7 @@ export const list = [
       },
       xAxis: {
         type: 'category',
+        name: '范围',
         data: ['本科以上', '大专', '中专', '中技', '高中', '初中']
       },
       yAxis: {
@@ -119,9 +122,9 @@ export const list = [
       },
       grid: {
         left: '0',
-        top: '50',
-        right: '0',
-        bottom: 0,
+        top: '60',
+        right: '50',
+        bottom: '10',
         containLabel: true
       },
       series: [
@@ -136,36 +139,36 @@ export const list = [
       ]
     }
   },
-  {
-    col: 12,
-    option: {
-      title: {
-        text: '期望月薪'
-      },
-      xAxis: {
-        type: 'category',
-        data: ['3-5k', '5-8k', '8-12k', '12-15k', '15-20k', '20-30k', '面议']
-      },
-      yAxis: {
-        type: 'value'
-      },
-      grid: {
-        left: '0',
-        top: '50',
-        right: '0',
-        bottom: 0,
-        containLabel: true
-      },
-      series: [
-        {
-          data: [120, 200, 150, 80, 70, 110, 130],
-          type: 'bar',
-          barWidth: 40,
-          label: {
-            show: true
-          }
-        }
-      ]
-    }
-  }
+  // {
+  //   col: 12,
+  //   option: {
+  //     title: {
+  //       text: '期望月薪'
+  //     },
+  //     xAxis: {
+  //       type: 'category',
+  //       data: ['3-5k', '5-8k', '8-12k', '12-15k', '15-20k', '20-30k', '面议']
+  //     },
+  //     yAxis: {
+  //       type: 'value'
+  //     },
+  //     grid: {
+  //       left: '0',
+  //       top: '50',
+  //       right: '0',
+  //       bottom: 0,
+  //       containLabel: true
+  //     },
+  //     series: [
+  //       {
+  //         data: [120, 200, 150, 80, 70, 110, 130],
+  //         type: 'bar',
+  //         barWidth: 40,
+  //         label: {
+  //           show: true
+  //         }
+  //       }
+  //     ]
+  //   }
+  // }
 ]

+ 63 - 3
src/views/recruit/enterprise/statistics/components/resume.vue

@@ -1,22 +1,82 @@
 <template>
-  <v-container>
+  <!-- <v-container>
     <v-row>
       <v-col class="bgc" v-for="(val, i) in list" :key="i" :md="val.col">
         <Echarts :height="400" :option="val.option"></Echarts>
       </v-col>
     </v-row>
-  </v-container>
+  </v-container> -->
+  <div class="chart-box">
+    <div class="chart-item" v-for="(val, i) in list" :key="i">
+      <Echarts :height="400" :option="val.option"></Echarts>
+    </div>
+    <div class="fullChart">
+      <Echarts :height="400" :option="option"></Echarts>
+    </div>
+  </div>
 </template>
 
 <script setup>
 defineOptions({ name: 'resume-analysis'})
 import { list } from './data.js'
 
+const option = {
+  title: {
+    text: '期望月薪'
+  },
+  xAxis: {
+    type: 'category',
+    name: '范围',
+    data: ['3-5k', '5-8k', '8-12k', '12-15k', '15-20k', '20-30k', '面议']
+  },
+  yAxis: {
+    type: 'value'
+  },
+  grid: {
+    left: '0',
+    top: '60',
+    right: '50',
+    bottom: '10',
+    containLabel: true
+  },
+  series: [
+    {
+      data: [120, 200, 150, 80, 70, 110, 130],
+      type: 'bar',
+      barWidth: 40,
+      label: {
+        show: true
+      }
+    }
+  ]
+}
+
 </script>
 
 <style scoped lang="scss">
-.bgc {
+.chart-box {
+  width: 100%;
+  display: flex;
+  flex-wrap: wrap;
+  .chart-item {
+    width: calc((100% - 24px) / 2);
+    min-width: calc((100% - 24px) / 2);
+    max-width: calc((100% - 24px) / 2);
+    overflow: hidden;
+    transition: all .2s linear;
+    background-color: #f7f8fa;
+    border-radius: 8px;
+    margin: 0 12px 12px 0;
+    padding: 12px;
+    &:nth-child(2n) {
+      margin-right: 0;
+    }
+  }
+}
+.fullChart {
+  width: 100%;
   background-color: #f7f8fa;
   border-radius: 8px;
+  padding: 12px;
 }
 </style>

+ 0 - 11
src/views/recruit/enterprise/statistics/index.vue

@@ -1,11 +0,0 @@
-<template>
-  <div>统计分析</div>
-</template>
-
-<script setup>
-defineOptions({ name: 'enterprise-statistics'})
-</script>
-
-<style scoped lang="scss">
-
-</style>

+ 2 - 2
src/views/recruit/enterprise/statistics/overallAnalysis.vue

@@ -21,10 +21,10 @@
       <Overview class="mt-5"></Overview>
     </div>
     <div class="my-10">
-      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
+      <v-tabs class="mb-5" v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
         <v-tab :value="1">应聘简历分析</v-tab>
       </v-tabs>
-      <ResumeAnalysis class="mt-5"></ResumeAnalysis>
+      <ResumeAnalysis></ResumeAnalysis>
     </div>
     <div>
       <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">