You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

266 lines
5.0 KiB

  1. <template>
  2. <view id="sQrCode">
  3. <view class="sQrCode">
  4. <view class="sQrLogo">
  5. <image mode="widthFix" class="sQrLogoBg" src="@/common/images/xcBg.jpg"></image>
  6. <view class="sQrLogoImg1"><image mode="widthFix" src="@/common/images/logoXc.png"></image></view>
  7. <view class="sQrLogoImg2"><image mode="widthFix" src="@/common/images/logoXcTxt.png"></image></view>
  8. </view>
  9. <view class="sQrBox">
  10. <view class="sQrT">健康通行登记</view>
  11. <view class="sQrList">
  12. <view>
  13. <text>姓名</text>
  14. <text class="sQrListTxt">{{ data.stuInfo.StuName }}</text>
  15. </view>
  16. <view>
  17. <text>专业</text>
  18. <text class="sQrListTxt">{{ data.majorInfo.MajorName }}</text>
  19. </view>
  20. <view>
  21. <text>班级</text>
  22. <text class="sQrListTxt">{{ data.classInfo.ClassName }}</text>
  23. </view>
  24. <view>
  25. <text>学号</text>
  26. <text class="sQrListTxt">{{ data.stuInfo.StuNo }}</text>
  27. </view>
  28. <view>
  29. <text>宿舍</text>
  30. <text style="font-weight: bold;">{{ data.roomInfo }}</text>
  31. </view>
  32. </view>
  33. <view class="sQrType2">
  34. <view class="sQrTypePhoto">
  35. <view>
  36. <image mode="widthFix" :src="imgSrc"></image>
  37. </view>
  38. </view>
  39. <view class="sQrTypeCon">
  40. <view class="sQrTypeT">健康信息 : </view>
  41. <view class="sQrTypeTxt">{{ info }}</view>
  42. </view>
  43. <view class="sQrTypeImg">
  44. <img src="images/xcYc.png" alt="">
  45. </view>
  46. </view>
  47. </view>
  48. <view class="sQrTxt1">温馨提示 : 示:因疫情防控需要,校园实行封闭管理,仅限校内经许可的师生员工通行,敬请理解和配合。 </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
  54. export default {
  55. name: 'stuqrCode',
  56. components: { tkiQrcode },
  57. props: {
  58. stuNo: {
  59. type: String
  60. },
  61. info: {
  62. type: String
  63. }
  64. },
  65. data() {
  66. return {
  67. data: {
  68. stuInfo: {},
  69. majorInfo: {},
  70. classInfo: {}
  71. },
  72. imgSrc: '',
  73. size: 300
  74. };
  75. },
  76. methods: {
  77. init() {
  78. let _this = this;
  79. console.log(_this);
  80. _this.LOADING('加载数据中…');
  81. _this.HTTP_GET('learun/adms/EducationalAdministration/StuInfoBasic/stuinfoDetail', _this.stuNo, '加载数据时出错').then(res => {
  82. this.HIDE_LOADING();
  83. console.log(res);
  84. _this.data = res;
  85. _this.imgSrc = _this.API.slice(0,-1) + res.stuInfo.Photo;
  86. console.log(_this.imgSrc)
  87. });
  88. }
  89. },
  90. created() {
  91. this.init();
  92. }
  93. };
  94. </script>
  95. <style lang="less" scoped>
  96. #sQrCode {
  97. height: 100%;
  98. background-color: #eef2f3;
  99. padding-bottom: 30px;
  100. }
  101. .sQrLogoBg {
  102. position: absolute;
  103. left: 0;
  104. top: 0;
  105. right: 0;
  106. width: 100%;
  107. }
  108. .sQrLogo {
  109. background-size: 100% 100%;
  110. text-align: center;
  111. line-height: 0;
  112. padding: 20px 0 70px;
  113. position: relative;
  114. }
  115. .sQrLogo view {
  116. position: relative;
  117. z-index: 2;
  118. }
  119. .sQrLogoImg1 image {
  120. width: 20%;
  121. }
  122. .sQrLogoImg1 {
  123. margin-bottom: 10px;
  124. }
  125. .sQrLogoImg2 image {
  126. width: 50%;
  127. }
  128. .sQrBox {
  129. margin: -50px 20px 0;
  130. background-color: #fff;
  131. padding: 30px 38px;
  132. border-radius: 10px;
  133. -webkit-box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  134. -moz-box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  135. box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
  136. /* overflow: hidden; */
  137. position: relative;
  138. z-index: 99;
  139. }
  140. .sQrT {
  141. font-weight: bold;
  142. text-align: center;
  143. font-size: 22px;
  144. margin-bottom: 20px;
  145. color: #000;
  146. }
  147. .sQrT2 {
  148. font-weight: bold;
  149. text-align: center;
  150. font-size: 24px;
  151. margin-bottom: 20px;
  152. color: #F8B500;
  153. }
  154. .sQrList {
  155. background-color: #F8F8F8;
  156. margin: 0 10px;
  157. padding: 10px 30px;
  158. border-radius: 4px
  159. }
  160. .sQrList view {
  161. padding: 7px 10px;
  162. font-size: 14px;
  163. color: #000;
  164. border-top: 1px solid #D7D7D7;
  165. }
  166. .sQrList view:first-child {
  167. border: 0;
  168. }
  169. .sQrList view text {
  170. color: #AEAEAE;
  171. margin-right: 10px;
  172. }
  173. .sQrType2 {
  174. // background-color: #F8B500;
  175. padding: 20px 0;
  176. text-align: center;
  177. color: #fff;
  178. margin: 30px -38px -30px;
  179. border-radius: 0 0 10px 10px;
  180. }
  181. .sQrType2>* {
  182. display: inline-block;
  183. vertical-align: middle;
  184. text-align: left;
  185. }
  186. .sQrTypeT {
  187. font-size: 14px;
  188. }
  189. .sQrTypeTxt {
  190. font-size: 24px;
  191. font-weight: bold;
  192. margin-top: 3px;
  193. }
  194. .sQrTypeImg {
  195. margin-left: 15px;
  196. width: 43px;
  197. line-height: 0;
  198. }
  199. .sQrTypeImg image {
  200. width: 100%;
  201. }
  202. .sQrTxt1 {
  203. margin: 30px 50px 20px;
  204. font-size: 14px;
  205. color: #AEAEAE;
  206. }
  207. .sQrBtn3 {
  208. margin: 20px 20px 0;
  209. background-color: #CED0D0;
  210. /* -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
  211. -moz-box-shadow: 0 0 10px rgba(0, 0, 0, .1);
  212. box-shadow: 0 0 10px rgba(0, 0, 0, .1); */
  213. border-radius: 8px;
  214. height: 50px;
  215. line-height: 50px;
  216. font-weight: bold;
  217. color: #fff;
  218. font-size: 16px;
  219. text-align: center;
  220. }
  221. .sQrBtn3 image {
  222. width: 23px;
  223. margin-right: 10px;
  224. position: relative;
  225. top: 2px;
  226. }
  227. .sQrType2 .sQrTypePhoto {
  228. // border: 4px solid #F8B500;
  229. border-radius: 4px;
  230. width: 85px;
  231. margin: -30px 10px -30px 0;
  232. background: #fff;
  233. }
  234. .sQrTypePhoto view {
  235. height: 0;
  236. overflow: hidden;
  237. padding-bottom: 139.516129%;
  238. line-height: 0;
  239. }
  240. .sQrTypePhoto image {
  241. width: 100%;
  242. }
  243. </style>