edu.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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
  16. label="在校开始日期"
  17. align="center"
  18. prop="startTime"
  19. :formatter="dateFormatter2"
  20. width="180px"
  21. />
  22. <el-table-column
  23. label="在校结束日期"
  24. align="center"
  25. prop="endTime"
  26. :formatter="dateFormatter2"
  27. width="180px"
  28. />
  29. <el-table-column label="在校经历" align="center" prop="content" :show-overflow-tooltip="true" />
  30. </el-table>
  31. <Pagination
  32. :total="total"
  33. v-model:page="queryParams.pageNo"
  34. v-model:limit="queryParams.pageSize"
  35. @pagination="getList"
  36. />
  37. </template>
  38. <script setup>
  39. defineOptions({ name: 'PersonEduList'})
  40. import { PersonInfoApi } from '@/api/menduner/system/person'
  41. import { DICT_TYPE } from '@/utils/dict'
  42. import { dateFormatter2 } from '@/utils/formatTime'
  43. const props = defineProps({
  44. userId: String
  45. })
  46. const loading = ref(false)
  47. const tableData = ref([])
  48. const total = ref(0)
  49. const queryParams = reactive({
  50. pageNo: 1,
  51. pageSize: 10,
  52. userId: props.userId
  53. })
  54. const getList = async () => {
  55. loading.value = true
  56. try {
  57. const data = await PersonInfoApi.getPersonEduPage(queryParams)
  58. tableData.value = data.list
  59. total.value = data.total
  60. } finally {
  61. loading.value = false
  62. }
  63. }
  64. getList()
  65. </script>