Xiao_123 7 hónapja
szülő
commit
74762696e6

+ 27 - 2
src/views/menduner/system/analysis/statisticAnalysis/components/jobDetails.vue

@@ -5,7 +5,10 @@
       <template #header>
         <CardTitle title="最新发布职位" />
       </template>
-      <div class="scroll-box">
+      <div class="header-box">
+        <div v-for="(k, i) in headers" :key="i" class="header-item">{{ k }}</div>
+      </div>
+      <div v-if="list.length" class="scroll-box">
         <vue3-seamless-scroll :list="list" style="height: 100%;" :step="0.5">
           <div v-for="val in list" :key="val.id" class="!h-40px list-item">
             <div>{{ val.name }}</div>
@@ -14,6 +17,7 @@
           </div>
         </vue3-seamless-scroll>
       </div>
+      <div v-else class="noDataText">暂无数据</div>
     </el-card>
   </el-skeleton>
 </template>
@@ -28,6 +32,7 @@ const props = defineProps({
   queryParams: Object
 })
 
+const headers = ['职位名称', '发布企业', '发布时间']
 const loading = ref(false)
 const list = ref([])
 const getData = async (queryParams: any) => {
@@ -50,7 +55,7 @@ watch(() => props.queryParams, (newVal) => {
 
 <style lang="scss" scoped>
 .scroll-box {
-  height: 400px;
+  height: 372px;
   overflow: hidden;
 }
 
@@ -67,4 +72,24 @@ watch(() => props.queryParams, (newVal) => {
     text-overflow: ellipsis;
   }
 }
+
+.header-box {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+
+  .header-item {
+    width: 33.3%;
+    font-size: 13px;
+    font-weight: 700;
+  }
+}
+
+.noDataText {
+  height: 332px;
+  margin-top: 50px;
+  font-size: 14px;
+  color: #666;
+  text-align: center;
+}
 </style>

+ 2 - 0
src/views/menduner/system/analysis/statisticAnalysis/components/jobTop.vue

@@ -61,6 +61,8 @@ const getData = async (queryParams: any) => {
     const data = await statisticAnalysisApi.getJobPositionTop({ ...queryParams, jobStatus: 0 })
     chartOptions.yAxis.data = data.x || []
     chartOptions.series![0].data = data.y || []
+    if (data.y && data.y.length < 5) chartOptions.series![0].barWidth = 40
+    else delete chartOptions.series![0].barWidth
   } catch (err) {
     console.log(err);
     loading.value = false