pupilHome.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <!-- 学生首页 -->
  2. <template>
  3. <view class="pupilHome" :style="{paddingTop:navHeight+'rpx'}">
  4. <nav-bar :title="title"></nav-bar>
  5. <view class="top-back-img" :style="{top:navHeight+'rpx'}">
  6. <view class="position-data-button" @click="goPage('dataBoard')"
  7. v-if="dataPageType">数据看板</view>
  8. <img class="position-img" :src="rectangleLogo">
  9. </view>
  10. <view class="button-one-box">
  11. <view class="button-min" @click="goPage('securityExaminationPupil')">
  12. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqks@1x.png">
  13. <view class="button-name">安全考试</view>
  14. </view>
  15. <view class="button-min" @click="goPage('securityAdmittancePupil')">
  16. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqzr@1x.png">
  17. <view class="button-name">安全准入</view>
  18. </view>
  19. <view class="button-min" @click="goPage('chemicalsPupil')">
  20. <img class="button-img" src="@/pages/images/newImage/icon_sy_hxp@1x.png">
  21. <view class="button-name">化学品</view>
  22. </view>
  23. <view class="button-min" @click="goPage('cageSiteSubscribePupil')">
  24. <img class="button-img" src="@/pages/images/newImage/icon_sy_lwgl@1x.png">
  25. <view class="button-name">笼位预约</view>
  26. </view>
  27. </view>
  28. <view class="button-two-box">
  29. <view class="button-big-box" @click="goPage('snapshotPupil')"
  30. style="background-color: #DFF0FF;margin-right:20rpx;">
  31. <img src="@/pages/images/newImage/icon_sy_ssp@1x.png">
  32. <view class="button-min-box">
  33. <view>随手拍</view>
  34. <view>发现隐患</view>
  35. </view>
  36. </view>
  37. <view class="button-big-box" @click="goPage('leaveCheckPupil')"
  38. style="background-color: #D6EBDA;">
  39. <img src="@/pages/images/newImage/img_sy_lkjc@1x.png">
  40. <view class="button-min-box">
  41. <view>离开检查</view>
  42. <view>拍照检查</view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="button-three-box">
  47. <view class="button-big-box" @click="goPage('violationRecordPupil')">
  48. <img src="@/pages/images/newImage/img_wd_wgjl@1x.png">
  49. <view class="button-min-box">
  50. <view>违规记录</view>
  51. <view>实验室安全违规行为查询</view>
  52. </view>
  53. </view>
  54. </view>
  55. <tab-bar></tab-bar>
  56. </view>
  57. </template>
  58. <script>
  59. import {
  60. tabBar
  61. } from '@/pages/component/tabBar.vue'
  62. import {navBar} from '@/pages/component/navbar.vue'
  63. export default {
  64. name: "pupilHome",
  65. components: {
  66. tabBar,
  67. navBar,
  68. },
  69. data() {
  70. return {
  71. pageType:2,
  72. navHeight: uni.getStorageSync('navHeight'),
  73. dataPageType:false,
  74. title: '实验室安全智慧化管控系统',
  75. rectangleLogo:uni.getStorageSync('rectangleLogo')
  76. }
  77. },
  78. created() {
  79. if(pageRestrictVerify('dataBoard')){
  80. this.dataPageType = true;
  81. // this.pageType = 1;
  82. }
  83. },
  84. mounted() {
  85. },
  86. methods: {
  87. goPage(type){
  88. if (!pageRestrictVerify(type)) {
  89. uni.showToast({
  90. title: '没有相关权限,请联系管理员',
  91. icon: "none",
  92. mask: true,
  93. duration: 2000
  94. });
  95. return
  96. }
  97. if(type == 'securityExaminationPupil'){
  98. //安全考试
  99. }else if(type == 'securityAdmittancePupil'){
  100. //安全准入
  101. }else if(type == 'chemicalsPupil'){
  102. //化学品
  103. }else if(type == 'cageSiteSubscribePupil'){
  104. //笼位预约
  105. }else if(type == 'snapshotPupil'){
  106. //随手拍
  107. }else if(type == 'leaveCheckPupil'){
  108. //离开检查
  109. }else if(type == 'violationRecordPupil'){
  110. //违规记录
  111. }
  112. },
  113. }
  114. }
  115. </script>
  116. <style lang="stylus" scoped>
  117. .pupilHome {
  118. flex: 1;
  119. display: flex;
  120. flex-direction: column;
  121. overflow: hidden;
  122. .top-page-title {
  123. text-align: center;
  124. font-size: 28rpx;
  125. background-color: #0183FA;
  126. color: #fff;
  127. }
  128. .top-back-img {
  129. position: absolute;
  130. top: 0;
  131. left: 0;
  132. width: 750rpx;
  133. height: 539rpx;
  134. background: url("@/pages/images/newImage/img_sy_bg@1x.png");
  135. background-size 100%;
  136. background-repeat: no-repeat;
  137. .position-img {
  138. z-index: 5;
  139. position: absolute;
  140. left: 0;
  141. top: 10rpx;
  142. width: 400rpx;
  143. height: 88rpx;
  144. }
  145. .position-data-button {
  146. z-index: 5;
  147. position: absolute;
  148. right: 0;
  149. top: 40rpx;
  150. width: 160rpx;
  151. height: 50rpx;
  152. line-height: 50rpx;
  153. background-color: #0183fa;
  154. color: #fff;
  155. font-size: 28rpx;
  156. text-align: center;
  157. border-top-left-radius: 30rpx;
  158. border-bottom-left-radius: 30rpx;
  159. }
  160. }
  161. .button-one-box {
  162. z-index: 5;
  163. background: #fff;
  164. width: 690rpx;
  165. border-radius: 20rpx;
  166. padding: 13px 0 20px;
  167. overflow: hidden;
  168. margin: 330rpx 30rpx 0;
  169. .button-min {
  170. display: inline-block;
  171. overflow: hidden;
  172. width: 172rpx;
  173. height: 123rpx;
  174. margin-top: 23rpx;
  175. .button-img {
  176. display: block;
  177. width: 80rpx;
  178. height: 80rpx;
  179. margin: 0 auto;
  180. }
  181. .button-name {
  182. margin-top: 15rpx;
  183. height: 28rpx;
  184. line-height: 28rpx;
  185. font-size: 28rpx;
  186. text-align: center;
  187. color: #333;
  188. }
  189. }
  190. }
  191. .button-two-box {
  192. z-index: 5;
  193. width: 690rpx;
  194. height: 120rpx;
  195. display: flex;
  196. margin: 20rpx 30rpx 0;
  197. .button-big-box {
  198. width: 335rpx;
  199. display: flex;
  200. border-radius: 20rpx;
  201. img {
  202. display: block;
  203. margin: 20rpx 31rpx 0 36rpx;
  204. height: 80rpx;
  205. width: 80rpx;
  206. }
  207. .button-min-box {
  208. view:nth-child(1) {
  209. line-height: 32rpx;
  210. height: 32rpx;
  211. font-size: 32rpx;
  212. color: #333;
  213. margin: 20rpx 0 18rpx;
  214. }
  215. view:nth-child(2) {
  216. line-height: 28rpx;
  217. height: 28rpx;
  218. font-size: 28rpx;
  219. color: #999;
  220. }
  221. }
  222. }
  223. }
  224. .button-three-box {
  225. z-index: 5;
  226. width: 690rpx;
  227. height: 150rpx;
  228. margin: 20rpx 30rpx 0;
  229. .button-big-box {
  230. border-radius: 20rpx;
  231. background-color: #FFF0DD;
  232. display: flex;
  233. img {
  234. display: block;
  235. width: 134rpx;
  236. height: 104rpx;
  237. margin: 23rpx 34rpx 0 30rpx;
  238. }
  239. .button-min-box {
  240. view:nth-child(1) {
  241. line-height: 30rpx;
  242. height: 30rpx;
  243. font-size: 30rpx;
  244. color: #FF8C00;
  245. margin: 35rpx 0 20rpx;
  246. }
  247. view:nth-child(2) {
  248. line-height: 26rpx;
  249. height: 26rpx;
  250. font-size: 26rpx;
  251. color: #666666;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. </style>