pupilHome.vue 6.5 KB

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