소스 검색

企业详情-在招职位:职位类别全部数值修复

Xiao_123 3 주 전
부모
커밋
13d2057b45
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      src/views/recruit/personal/companyDetail/components/positions.vue

+ 4 - 1
src/views/recruit/personal/companyDetail/components/positions.vue

@@ -8,7 +8,7 @@
           v-for="k in positionCategory" 
           :key="k.id"
           @click.stop="handleClickCategory(k)"
-        >{{ k.id === -1 ? `${k.label}${list && list.length ? ` (${list.length})` : ''}` : `${k.label} (${k.number})` }}</span>
+        >{{ k.id === -1 ? `${k.label}${positionCategory && positionCategory.length ? ` (${categoryTotalNum})` : ''}` : `${k.label} (${k.number})` }}</span>
       </div>
     </div>
     <div class="d-flex mt-1 justify-space-between">
@@ -150,6 +150,7 @@ const getProvideData = (list) => {
 }
 
 // 职位类别&工作地点
+const categoryTotalNum = ref(0)
 const positionCategory = ref([])
 const getData = async () => {
   const data = await getJobAdvertisedPositionCount({ enterpriseId: props.info.enterprise.id })
@@ -161,6 +162,8 @@ const getData = async () => {
     return { id: value.id, label: value.nameCn, number: val.value, active: false }
   }).filter(Boolean)
   positionCategory.value = [{ id: -1, label: '全部', active: true }, ...list]
+
+  categoryTotalNum.value = list.reduce((a, b) => a + Number(b.number), 0)
 }
 const getPoAr = async () => {
   await getData()