collect.vue 904 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <div>
  3. <el-descriptions class="margin-top" :column="1" border>
  4. <el-descriptions-item label="职位收藏数量">{{ info.position || 0 }}</el-descriptions-item>
  5. <el-descriptions-item label="企业收藏数量">{{ info.enterprise || 0 }}</el-descriptions-item>
  6. </el-descriptions>
  7. </div>
  8. </template>
  9. <script setup>
  10. /* 职位、企业收藏数量 */
  11. defineOptions({ name: 'PersonAccount'})
  12. import { PersonInfoApi } from '@/api/menduner/system/person'
  13. import { formatDate } from '@/utils/formatTime'
  14. import { DICT_TYPE } from '@/utils/dict'
  15. const props = defineProps({
  16. userId: String
  17. })
  18. const info = ref({
  19. position: 0,
  20. enterprise: 0
  21. })
  22. const getInfo = async () => {
  23. info.value.position = await PersonInfoApi.getPersonJobFavoriteCount(props.userId)
  24. info.value.enterprise = await PersonInfoApi.getPersonEnterpriseSubscribeCount(props.userId)
  25. }
  26. getInfo()
  27. </script>