certificateDetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view v-if="itemData" 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">{{ itemData?.student?.schoolName }}</span>
  8. <span class="cer-text">{{ itemData?.student?.majorName }}</span>
  9. 专业<span class="cer-text">{{ itemData?.person?.name }}</span>
  10. 同学于<span class="cer-text">{{ itemData?.startTime ? timesTampChange(itemData?.startTime, 'Y-M-D') : '' }}</span>
  11. 至<span class="cer-text">{{ itemData?.endTime ? timesTampChange(itemData?.endTime, 'Y-M-D') : '' }}</span>
  12. 在<span class="cer-text">{{ itemData?.enterprise?.enterpriseName }}</span>
  13. <span class="cer-text">{{ formatName(itemData?.enterprise?.anotherName || itemData?.enterprise?.name) }}</span>岗位实习。
  14. </view>
  15. <view class="cer-comment">{{ itemData?.evaluate }}</view>
  16. <view class="cer-prove">特此证明。</view>
  17. <view class="cer-end">
  18. <!-- <view>{{ itemData?.enterprise?.enterpriseName }}</view> -->
  19. <view>{{ itemData?.createTime ? timesTampChange(itemData?.createTime, 'Y-M-D') : '' }}</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(itemData)" 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="itemData?.certificate" type="primary" size="default" class="buttons" @click="viewReport(itemData)">查看附件</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 { preview } from '@/utils/preview'
  46. import { onLoad } from '@dcloudio/uni-app'
  47. import { timesTampChange } from '@/utils/date'
  48. import { formatName } from '@/utils/getText'
  49. const itemData = ref(null)
  50. onLoad((options) => {
  51. if (options.itemData) itemData.value = JSON.parse(options.itemData)
  52. })
  53. const viewReport = (item) => {
  54. if (!item.certificate) {
  55. uni.showToast({
  56. title: '加载失败,请稍后重试',
  57. icon: 'none',
  58. duration: 2000
  59. })
  60. return
  61. }
  62. preview(item.certificate)
  63. }
  64. </script>
  65. <style lang="less" scoped>
  66. .cer-img{
  67. width: 100vw;
  68. height: 89.5vh;
  69. position: relative;
  70. font-weight: 600;
  71. }
  72. //实习信息
  73. .cer-introduce{
  74. width: 70vw;
  75. position: absolute;
  76. top: 49%;
  77. left: 50%;
  78. transform: translate(-50%,-50%);
  79. text-indent: 2em;
  80. }
  81. //点评内容
  82. .cer-comment{
  83. width: 70vw;
  84. position: absolute;
  85. top: 66%;
  86. left: 50%;
  87. transform: translate(-50%,-50%);
  88. text-indent: 2em;
  89. }
  90. //特此证明
  91. .cer-prove{
  92. width: 70vw;
  93. position: absolute;
  94. top: 80%;
  95. left: 50%;
  96. transform: translate(-50%,-50%);
  97. text-indent: 2em;
  98. }
  99. //公司名称
  100. .cer-end{
  101. position: absolute;
  102. top: 85%;
  103. right: 16%;
  104. }
  105. .cer-text{
  106. text-decoration: underline;
  107. margin: 0 5rpx;
  108. }
  109. button::after{
  110. border:none;
  111. }
  112. .pop-btn-wrapper{
  113. position: relative;
  114. margin-top: 15vh;
  115. .pop-confirm{
  116. background-color: #fff;
  117. color: #4b9afd;
  118. font-size: 21px;
  119. width: 45vw;
  120. position: absolute;
  121. bottom: 0;
  122. left: 0;
  123. }
  124. .pop-cancel{
  125. background-color: #fff;
  126. font-size: 21px;
  127. width: 45vw;
  128. position: absolute;
  129. bottom: 0;
  130. right: 0;
  131. }
  132. }
  133. .buttons{
  134. width: 70vw;
  135. height: 44px;
  136. border-radius: 25px;
  137. background-color: #00B760;
  138. margin: 0;
  139. }
  140. </style>