edu.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <el-table v-loading="loading" :data="tableData" :stripe="true" class="m-t-20px">
  3. <el-table-column label="学校名称" align="center" prop="schoolName" />
  4. <el-table-column label="专业名称" align="center" prop="major" />
  5. <el-table-column label="学历" align="center" prop="educationType">
  6. <template #default="scope">
  7. <dict-tag :type="DICT_TYPE.MENDUNER_EDUCATION_TYPE" :value="scope.row.educationType" />
  8. </template>
  9. </el-table-column>
  10. <el-table-column label="学制类型" align="center" prop="educationSystemType">
  11. <template #default="scope">
  12. <dict-tag :type="DICT_TYPE.MENDUNER_EDUCATION_SYSTEM_TYPE" :value="scope.row.educationSystemType" />
  13. </template>
  14. </el-table-column>
  15. <el-table-column label="在校开始日期" align="center" prop="startTime" :formatter="dateFormatter2" width="180px" />
  16. <el-table-column label="在校结束日期" align="center" prop="endTime" :formatter="dateFormatter2" width="180px" />
  17. <el-table-column label="在校经历" align="center" prop="content" :show-overflow-tooltip="true" />
  18. </el-table>
  19. <Pagination
  20. :total="total"
  21. v-model:page="queryParams.pageNo"
  22. v-model:limit="queryParams.pageSize"
  23. @pagination="getList"
  24. />
  25. </template>
  26. <script setup>
  27. defineOptions({ name: 'PersonEduList'})
  28. import { PersonInfoApi } from '@/api/menduner/system/person'
  29. import { DICT_TYPE } from '@/utils/dict'
  30. import { dateFormatter2 } from '@/utils/formatTime'
  31. const props = defineProps({
  32. userId: String
  33. })
  34. const loading = ref(false)
  35. const tableData = ref([])
  36. const total = ref(0)
  37. const queryParams = reactive({
  38. pageNo: 1,
  39. pageSize: 10,
  40. userId: props.userId
  41. })
  42. const getList = async () => {
  43. loading.value = true
  44. try {
  45. const data = await PersonInfoApi.getPersonEduPage(queryParams)
  46. tableData.value = data.list
  47. total.value = data.total
  48. } finally {
  49. loading.value = false
  50. }
  51. }
  52. getList()
  53. </script>