internshipCertificate.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view style="height: 98vh; background-color: #f2f4f7; padding-top: 10px;">
  3. <view v-if="list.length > 0">
  4. <uni-card v-for="(item, index) in list" class="list-item" @tap.stop="handleToDetail(item)" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
  5. <view class="font-weight-bold">实习企业: {{ formatName(item.enterprise.enterpriseName) }}</view>
  6. <view>创建时间:{{ timesTampChange(item.studentInternshipCertificate.createDate) }}</view>
  7. <view>实习点评:{{ item.studentInternshipCertificate.comment }}</view>
  8. <view style="text-align: end;">
  9. <text class="color-primary" @tap.stop="handleToDetail(item)">点击查看</text>
  10. </view>
  11. </uni-card>
  12. </view>
  13. <view v-else class="nodata-img-parent">
  14. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  15. </view>
  16. </view>
  17. </template>
  18. <script setup>
  19. import { ref } from 'vue'
  20. import { getEnterpriseCertificateList } from '@/api/student'
  21. import { onShow } from '@dcloudio/uni-app'
  22. import { formatName } from '@/utils/getText'
  23. import { timesTampChange } from '@/utils/date'
  24. import { preview } from '@/utils/preview'
  25. const list = ref([
  26. {
  27. enterprise: {
  28. enterpriseName: '门墩儿科技有限公司',
  29. },
  30. entity: {
  31. createDate: 1740570206120,
  32. fileUrl: 'https://minio.menduner.com/dev/person/725759784858554368/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
  33. },
  34. studentInternshipCertificate: {
  35. comment: '这是一条测试数据',
  36. createDate: 1740570206120
  37. }
  38. }
  39. ])
  40. // 查看证书详情
  41. const handleToDetail = (item) => {
  42. console.log(111)
  43. uni.navigateTo({
  44. url: '/pagesA/student/certificateDetail?id=' + '1111'
  45. })
  46. }
  47. // 获取实习证书列表
  48. const getList = async () => {
  49. try {
  50. const { data } = await getEnterpriseCertificateList({ size: 9999, current: 1 })
  51. console.log(data, '实习证书')
  52. // list.value = data.records.reverse()
  53. } catch {}
  54. }
  55. onShow(async () => {
  56. // await getList()
  57. })
  58. </script>
  59. <style lang="scss" scoped>
  60. .list-item {
  61. background-color: #fff;
  62. border-radius: 3px;
  63. padding: 20px;
  64. box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);
  65. }
  66. </style>