pupilHome.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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('chemicalsPupil')">
  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. flex: 1;
  136. display: flex;
  137. flex-direction: column;
  138. overflow: hidden;
  139. .top-page-title {
  140. text-align: center;
  141. font-size: 28rpx;
  142. background-color: #0183FA;
  143. color: #fff;
  144. }
  145. .top-back-img {
  146. position: absolute;
  147. top: 0;
  148. left: 0;
  149. width: 750rpx;
  150. height: 539rpx;
  151. background: url("@/pages/images/newImage/img_sy_bg@1x.png");
  152. background-size 100%;
  153. background-repeat: no-repeat;
  154. .position-img {
  155. z-index: 5;
  156. position: absolute;
  157. left: 0;
  158. top: 10rpx;
  159. width: 400rpx;
  160. height: 88rpx;
  161. }
  162. .position-data-button {
  163. z-index: 5;
  164. position: absolute;
  165. right: 0;
  166. top: 40rpx;
  167. width: 160rpx;
  168. height: 50rpx;
  169. line-height: 50rpx;
  170. background-color: #0183fa;
  171. color: #fff;
  172. font-size: 28rpx;
  173. text-align: center;
  174. border-top-left-radius: 30rpx;
  175. border-bottom-left-radius: 30rpx;
  176. }
  177. }
  178. .button-one-box {
  179. z-index: 5;
  180. background: #fff;
  181. width: 690rpx;
  182. border-radius: 20rpx;
  183. padding: 13px 0 20px;
  184. overflow: hidden;
  185. margin: 330rpx 30rpx 0;
  186. .button-min {
  187. display: inline-block;
  188. overflow: hidden;
  189. width: 172rpx;
  190. height: 123rpx;
  191. margin-top: 23rpx;
  192. .button-img {
  193. display: block;
  194. width: 80rpx;
  195. height: 80rpx;
  196. margin: 0 auto;
  197. }
  198. .button-name {
  199. margin-top: 15rpx;
  200. height: 28rpx;
  201. line-height: 28rpx;
  202. font-size: 28rpx;
  203. text-align: center;
  204. color: #333;
  205. }
  206. }
  207. }
  208. .button-two-box {
  209. z-index: 5;
  210. width: 690rpx;
  211. height: 120rpx;
  212. display: flex;
  213. margin: 20rpx 30rpx 0;
  214. .button-big-box {
  215. width: 335rpx;
  216. display: flex;
  217. border-radius: 20rpx;
  218. img {
  219. display: block;
  220. margin: 20rpx 31rpx 0 36rpx;
  221. height: 80rpx;
  222. width: 80rpx;
  223. }
  224. .button-min-box {
  225. view:nth-child(1) {
  226. line-height: 32rpx;
  227. height: 32rpx;
  228. font-size: 32rpx;
  229. color: #333;
  230. margin: 20rpx 0 18rpx;
  231. }
  232. view:nth-child(2) {
  233. line-height: 28rpx;
  234. height: 28rpx;
  235. font-size: 28rpx;
  236. color: #999;
  237. }
  238. }
  239. }
  240. }
  241. .button-three-box {
  242. z-index: 5;
  243. width: 690rpx;
  244. height: 150rpx;
  245. margin: 20rpx 30rpx 0;
  246. .button-big-box {
  247. border-radius: 20rpx;
  248. background-color: #FFF0DD;
  249. display: flex;
  250. img {
  251. display: block;
  252. width: 134rpx;
  253. height: 104rpx;
  254. margin: 23rpx 34rpx 0 30rpx;
  255. }
  256. .button-min-box {
  257. view:nth-child(1) {
  258. line-height: 30rpx;
  259. height: 30rpx;
  260. font-size: 30rpx;
  261. color: #FF8C00;
  262. margin: 35rpx 0 20rpx;
  263. }
  264. view:nth-child(2) {
  265. line-height: 26rpx;
  266. height: 26rpx;
  267. font-size: 26rpx;
  268. color: #666666;
  269. }
  270. }
  271. }
  272. }
  273. }
  274. </style>