internshipRecord.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view class="defaultBgc">
  3. <uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00B760" style="background-color: #fff;"></uni-segmented-control>
  4. <scroll-view class="scrollBox defaultBgc" scroll-y="true" @scrolltolower="loadingMore" style="height: calc(100vh - 36px);">
  5. <view v-if="dataList.length">
  6. <uni-card v-for="(val, index) in dataList" :key="index" :is-shadow="true" :border='false' shadow="0px 0px 3px 1px rgba(0,0,0,0.1)">
  7. <!-- 企业信息 -->
  8. <view class="entInfoBox d-flex align-center ss-p-10 ss-p-l-20 ss-m-b-20">
  9. <image class="enterAvatar" :src="val.enterprise.logoUrl ? val.enterprise.logoUrl : 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></image>
  10. <view class="ellipsis ss-m-l-20" style="flex: 1;">
  11. <view class="enterpriseName font-size-16 ellipsis">{{ formatName(val.enterprise.anotherName || val.enterprise.name) }}</view>
  12. <!-- <view class="ss-m-t-5">
  13. <span class="color-999">{{ val.enterprise?.industryName || '' }}</span>
  14. <span class="divider tag-gap1" v-if="val.enterprise?.industryName && val.enterprise?.scaleName"> | </span>
  15. <span class="color-999">{{ val.enterprise?.scaleName || '' }}</span>
  16. </view> -->
  17. </view>
  18. </view>
  19. <!-- 职位信息 -->
  20. <view class="list-shape ss-p-b-10" >
  21. <view class="titleBox my-5">
  22. <view class="job-name font-size-16" :style="{'max-width': !val.job.payFrom && !val.job.payTo ? '65vw' : '50vw'}">{{ formatName(val.job.name) }}</view>
  23. <span v-if="!val.job.payFrom && !val.job.payTo" class="salary-text">面议</span>
  24. <span v-else class="salary-text">{{ val.job.payFrom }}-{{ val.job.payTo }}{{ val.job.payName ? '/' + val.job.payName : '' }}</span>
  25. </view>
  26. <view style="font-size: 13px;" class="ss-m-t-10">
  27. <span class="tag-gap" style="color: #808080;">
  28. <span>{{ val.job.area?.str ?? '全国' }}</span>
  29. <span class="ss-m-x-10" v-if="val.job.eduName">|</span>
  30. <span>{{ val.job.eduName }}</span>
  31. <span class="ss-m-x-10" v-if="val.job.expName">|</span>
  32. <span>{{ val.job.expName }}</span>
  33. </span>
  34. </view>
  35. </view>
  36. <view>实习时间:{{ timesTampChange(val?.startTime, 'Y-M-D') }} 至 {{ timesTampChange(val?.endTime, 'Y-M-D') }}</view>
  37. <view class="line ss-m-y-20"></view>
  38. <view style="text-align: right;">
  39. <button @tap="handleToReport(val)" class="ss-m-r-10" type="warning" size="mini" style="color:#fff; backgroundColor:#fb8c00;borderColor:#fb8c00">实习报告</button>
  40. <button @tap="handleToCertificate(val)" class="ss-m-x-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00b760;borderColor:#00b760">实习证书</button>
  41. <button @tap="preview(val?.recommendationLetter)" class="ss-m-l-10" type="warning" size="mini" style="color:#fff; backgroundColor:#00897b;borderColor:#00897b">企业推荐信</button>
  42. </view>
  43. </uni-card>
  44. <uni-load-more :status="more" />
  45. </view>
  46. <view v-else class="nodata-img-parent">
  47. <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
  48. </view>
  49. </scroll-view>
  50. </view>
  51. </template>
  52. <script setup>
  53. import { ref } from 'vue'
  54. import { getDict } from '@/hooks/useDictionaries'
  55. import { getStudentPage } from '@/api/student'
  56. import { formatName } from '@/utils/getText'
  57. import { timesTampChange } from '@/utils/date'
  58. import { dealDictObjData } from '@/utils/position'
  59. import { preview } from '@/utils/preview'
  60. const more = ref('more')
  61. const current = ref(0)
  62. const query = ref({
  63. pageNo: 1,
  64. pageSize: 10
  65. })
  66. const dataList = ref([])
  67. const getData = async () => {
  68. try {
  69. const params = {
  70. status: tabList.value[current.value]?.value,
  71. ...query.value
  72. }
  73. if (!params?.status) return
  74. const { data } = await getStudentPage(params)
  75. const list = data?.list?.length && data.list || []
  76. list.forEach(e => {
  77. e.enterprise = dealDictObjData({}, e.enterprise)
  78. e.job = dealDictObjData({}, e.job)
  79. })
  80. //
  81. dataList.value = dataList.value.concat(list)
  82. more.value = dataList.value?.length === data?.total ? 'noMore' : 'more'
  83. } catch (error) {
  84. query.pageNo--
  85. more.value = 'more'
  86. }
  87. }
  88. const handleChange = (e) => {
  89. current.value = e.currentIndex
  90. query.value.pageNo = 1
  91. dataList.value = []
  92. getData()
  93. }
  94. // 加载更多
  95. const loadingMore = () => {
  96. more.value = 'loading'
  97. query.value.pageNo++
  98. getData()
  99. }
  100. const tabList = ref([])
  101. const controlList = ref([])
  102. const getTabList = async () => {
  103. const { data } = await getDict('student_practice_status')
  104. if (data.code !== 0) {
  105. return
  106. }
  107. tabList.value = data?.data?.length && data.data || []
  108. controlList.value = tabList.value.map(e => e.label) || []
  109. if (tabList.value?.length) getData()
  110. }
  111. getTabList()
  112. // 实习报告
  113. const handleToReport = (val) => {
  114. uni.navigateTo({ url: `/pagesA/student/internshipReport?enterpriseId=${val?.enterprise?.id}` })
  115. }
  116. // 查看证书详情
  117. const handleToCertificate = (val) => {
  118. const itemData = JSON.stringify({
  119. student: { schoolName: val?.student?.schoolName, majorName: val?.student?.majorName },
  120. person: { name: val?.person?.name },
  121. enterprise: { anotherName: val?.enterprise?.anotherName || val?.enterprise?.name },
  122. startTime: val?.startTime,
  123. endTime: val?.endTime,
  124. evaluate: val?.evaluate,
  125. certificate: val?.certificate,
  126. createTime: val?.createTime
  127. })
  128. uni.navigateTo({ url: `/pagesA/student/certificateDetail?itemData=${itemData}` })
  129. }
  130. </script>
  131. <style scoped lang="scss">
  132. :deep(.segmented-control) {
  133. background-color: #fff !important;
  134. }
  135. .enterpriseName {
  136. color: #0E100F;
  137. // font-weight: 700;
  138. }
  139. .enterAvatar {
  140. width: 25px;
  141. height: 25px;
  142. // border-radius: 50%;
  143. margin: auto;
  144. }
  145. .line {
  146. border-top: 1px solid #ccc;
  147. }
  148. .list-shape {
  149. background-color: #fff;
  150. border-radius: 12px 12px 0 0;
  151. .titleBox {
  152. display: flex;
  153. align-items: center;
  154. justify-content: space-between;
  155. }
  156. }
  157. .salary-text {
  158. float: right;
  159. font-size: 15px;
  160. color: #00B760;
  161. font-weight: 700;
  162. }
  163. .job-name {
  164. font-size: 30rpx;
  165. // font-weight: 700;
  166. color: #0E100F;
  167. overflow: hidden;
  168. white-space: nowrap;
  169. text-overflow: ellipsis;
  170. }
  171. .ellipsis {
  172. white-space: nowrap;
  173. text-overflow: ellipsis;
  174. overflow: hidden;
  175. }
  176. .entInfoBox {
  177. background: linear-gradient(90deg, #f5fcfc, #fcfbfa);
  178. }
  179. </style>