certificateDetail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <template>
  2. <view style="width: 100vw;height: 100vh;overflow: auto;">
  3. <view class="cer-img">
  4. <image src="https://minio.citupro.com/dev/static/bgc.jpg" mode="scaleToFill" style="width: 100%;height: 100%;"></image>
  5. <view class="cer-introduce">
  6. 兹有
  7. <span class="cer-text">{{ schoolName }}</span>
  8. <span class="cer-text">{{ info.student.majorName }}</span>
  9. 专业<span class="cer-text">{{ info.student.studentName }}</span>
  10. 同学于<span class="cer-text">{{ info.praciceSubmitRecord.jobJoinDate }}</span>
  11. 至<span class="cer-text">{{ info.praciceSubmitRecord.internshipEndDate }}</span>
  12. 在<span class="cer-text">{{ info.enterprise.enterpriseName }}</span>
  13. <span class="cer-text">{{ info.enterpriseRecruit.enterpriseRecruitJobName }}</span>岗位实习。
  14. </view>
  15. <view class="cer-comment">{{ info.studentInternshipCertificate.comment }}</view>
  16. <view class="cer-prove">特此证明。</view>
  17. <view class="cer-end">
  18. <view>{{ info.enterprise.enterpriseName }}</view>
  19. <view>{{ info.studentInternshipCertificate.createDate }}</view>
  20. </view>
  21. </view>
  22. <view class="bottom-sticky">
  23. <view style="display: flex;justify-content: space-evenly;align-itens: center;width: 100%;margin: 20rpx 0;">
  24. <view @click="shareClick(info)" style="display: flex;justify-content: center;flex-direction: column;align-items: center;">
  25. <uni-icons type="redo-filled" size="24" color="#00B760"/>
  26. <span style="color:#00B760;font-weight:bold;">分享</span>
  27. </view>
  28. <button v-if="!!info.studentInternshipCertificate.fileUrl" type="primary" size="default" class="buttons" @click="viewReport(info)">查看附件</button>
  29. <button v-else type="primary" size="default" class="buttons" style="background-color:grey;">查看附件</button>
  30. </view>
  31. </view>
  32. <!-- <uni-popup ref="shareup" type="dialog">
  33. <view class="f-straight" style="height: 200px;width:80vw;background-color: #fff;border-radius: 10px;">
  34. <text style="text-align:center;color:grey;">是否分享实习证书?</text>
  35. <view class="f-horizon pop-btn-wrapper">
  36. <button size="default" class="pop-confirm" pain open-type="share" @click="popupClose">确认</button>
  37. <button size="default" class="pop-cancel" pain @click="popupClose">取消</button>
  38. </view>
  39. </view>
  40. </uni-popup> -->
  41. </view>
  42. </template>
  43. <script setup>
  44. import { ref } from 'vue'
  45. import { getEnterpriseCertificateList } from '@/api/student'
  46. import { preview } from '@/utils/preview'
  47. import { onLoad, onShareAppMessage } from '@dcloudio/uni-app'
  48. const schoolName = ref('北京交通大学')
  49. const info = ref({
  50. student: {
  51. majorName: '文言文',
  52. studentName: '张三',
  53. },
  54. praciceSubmitRecord: {
  55. jobJoinDate: '2022-12-12',
  56. internshipEndDate: '2022-12-12',
  57. },
  58. enterprise: {
  59. enterpriseName: '北京交通大学',
  60. },
  61. enterpriseRecruit: {
  62. enterpriseRecruitJobName: '前端工程师',
  63. },
  64. studentInternshipCertificate: {
  65. comment: '优秀',
  66. createDate: '2022-12-12',
  67. fileUrl: 'https://minio.menduner.com/dev/person/725759784858554368/attachment/7cde29dc69c1403649be55d4c2bfd3d8304c088dc79ab25afe9c4bf55d3b382f.docx'
  68. }
  69. })
  70. const query = ref({
  71. size:999,
  72. current:1,
  73. studentId:null,
  74. studentInternshipCertificateId:null
  75. })
  76. onLoad((options) => {
  77. console.log(options, 'options')
  78. // onShareAppMessage(() => {
  79. // if(res.from == 'button'){
  80. // return {
  81. // title: '实习证书',
  82. // path:`/pagesC/my/certificationShare?studentId=${that.curItem.student.studentId}&&certificateId=${that.curItem.studentInternshipCertificate.studentInternshipCertificateId}`
  83. // }
  84. // }
  85. // })
  86. })
  87. // 获取实习证书列表
  88. const getList = async () => {
  89. try {
  90. const { data } = await getEnterpriseCertificateList({ size: 9999, current: 1 })
  91. console.log(data, '实习证书')
  92. // list.value = data.records.reverse()
  93. } catch {}
  94. }
  95. const viewReport = (item) => {
  96. if (!item.studentInternshipCertificate.fileUrl) {
  97. uni.showToast({
  98. title: '加载失败,请稍后重试',
  99. icon: 'none',
  100. duration: 2000
  101. })
  102. return
  103. }
  104. preview(item.studentInternshipCertificate.fileUrl)
  105. }
  106. </script>
  107. <style lang="less" scoped>
  108. .cer-img{
  109. width: 100vw;
  110. height: 89.5vh;
  111. position: relative;
  112. font-weight: 600;
  113. }
  114. //实习信息
  115. .cer-introduce{
  116. width: 70vw;
  117. position: absolute;
  118. top: 49%;
  119. left: 50%;
  120. transform: translate(-50%,-50%);
  121. text-indent: 2em;
  122. }
  123. //点评内容
  124. .cer-comment{
  125. width: 70vw;
  126. position: absolute;
  127. top: 66%;
  128. left: 50%;
  129. transform: translate(-50%,-50%);
  130. text-indent: 2em;
  131. }
  132. //特此证明
  133. .cer-prove{
  134. width: 70vw;
  135. position: absolute;
  136. top: 80%;
  137. left: 50%;
  138. transform: translate(-50%,-50%);
  139. text-indent: 2em;
  140. }
  141. //公司名称
  142. .cer-end{
  143. position: absolute;
  144. top: 85%;
  145. right: 16%;
  146. }
  147. .cer-text{
  148. text-decoration: underline;
  149. margin: 0 5rpx;
  150. }
  151. button::after{
  152. border:none;
  153. }
  154. .pop-btn-wrapper{
  155. position: relative;
  156. margin-top: 15vh;
  157. .pop-confirm{
  158. background-color: #fff;
  159. color: #4b9afd;
  160. font-size: 21px;
  161. width: 45vw;
  162. position: absolute;
  163. bottom: 0;
  164. left: 0;
  165. }
  166. .pop-cancel{
  167. background-color: #fff;
  168. font-size: 21px;
  169. width: 45vw;
  170. position: absolute;
  171. bottom: 0;
  172. right: 0;
  173. }
  174. }
  175. .buttons{
  176. width: 70vw;
  177. height: 44px;
  178. border-radius: 25px;
  179. background-color: #00B760;
  180. margin: 0;
  181. }
  182. </style>