internshipRecord.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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>
  39. <button @tap="null" class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#fb8c00;borderColor:#fb8c00">实习报告</button>
  40. <button class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; backgroundColor:#00b760;borderColor:#00b760">实习证书</button>
  41. <button class="mini-btn ss-m-x-10" type="warning" size="mini" style="color:#ffffff; 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. const more = ref('more')
  60. const current = ref(0)
  61. const query = ref({
  62. pageNo: 1,
  63. pageSize: 10
  64. })
  65. const dataList = ref([])
  66. const getData = async () => {
  67. try {
  68. const params = {
  69. status: tabList.value[current.value]?.value,
  70. ...query.value
  71. }
  72. if (!params?.status) return
  73. const { data } = await getStudentPage(params)
  74. const list = data?.list?.length && data.list || []
  75. list.forEach(e => {
  76. e.enterprise = dealDictObjData({}, e.enterprise)
  77. e.job = dealDictObjData({}, e.job)
  78. })
  79. //
  80. dataList.value = dataList.value.concat(list)
  81. more.value = dataList.value?.length === data?.total ? 'noMore' : 'more'
  82. } catch (error) {
  83. query.pageNo--
  84. more.value = 'more'
  85. }
  86. }
  87. const handleChange = (e) => {
  88. current.value = e.currentIndex
  89. query.value.pageNo = 1
  90. dataList.value = []
  91. getData()
  92. }
  93. // 加载更多
  94. const loadingMore = () => {
  95. more.value = 'loading'
  96. query.value.pageNo++
  97. getData()
  98. }
  99. const tabList = ref([])
  100. const controlList = ref([])
  101. const getTabList = async () => {
  102. const { data } = await getDict('student_practice_status')
  103. if (data.code !== 0) {
  104. return
  105. }
  106. tabList.value = data?.data?.length && data.data || []
  107. controlList.value = tabList.value.map(e => e.label) || []
  108. console.log('123456:', data.data )
  109. if (tabList.value?.length) getData()
  110. }
  111. getTabList()
  112. </script>
  113. <style scoped lang="scss">
  114. :deep(.segmented-control) {
  115. background-color: #fff !important;
  116. }
  117. .enterpriseName {
  118. color: #0E100F;
  119. // font-weight: 700;
  120. }
  121. .enterAvatar {
  122. width: 25px;
  123. height: 25px;
  124. // border-radius: 50%;
  125. margin: auto;
  126. }
  127. .line {
  128. border-top: 1px solid #ccc;
  129. }
  130. .list-shape {
  131. background-color: #fff;
  132. border-radius: 12px 12px 0 0;
  133. .titleBox {
  134. display: flex;
  135. align-items: center;
  136. justify-content: space-between;
  137. }
  138. }
  139. .salary-text {
  140. float: right;
  141. font-size: 15px;
  142. color: #00B760;
  143. font-weight: 700;
  144. }
  145. .job-name {
  146. font-size: 30rpx;
  147. // font-weight: 700;
  148. color: #0E100F;
  149. overflow: hidden;
  150. white-space: nowrap;
  151. text-overflow: ellipsis;
  152. }
  153. .ellipsis {
  154. white-space: nowrap;
  155. text-overflow: ellipsis;
  156. overflow: hidden;
  157. }
  158. .entInfoBox {
  159. background: linear-gradient(90deg, #f5fcfc, #fcfbfa);
  160. }
  161. </style>