pupilHome.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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('securityExamination')">
  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('securityAdmittance')">
  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('hierarchicalControl')">
  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('securityResponsibility')">
  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('snapshot')"
  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('remoteDoorOpening')"
  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('chemicalsManagement')">
  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 == 'dataBoard'){
  98. //数据看板
  99. }else if(type == 'securityCheck'){
  100. //安全检查
  101. }else if(type == 'securityExamination'){
  102. //安全考试
  103. }else if(type == 'securityAdmittance'){
  104. //安全准入
  105. }else if(type == 'hierarchicalControl'){
  106. //分级管控
  107. }else if(type == 'securityResponsibility'){
  108. //安全责任
  109. }else if(type == 'deviceManagement'){
  110. //设备管理
  111. }else if(type == 'emergencyDisposal'){
  112. //应急处置
  113. }else if(type == 'cageSiteManagement'){
  114. //笼位管理
  115. }else if(type == 'snapshot'){
  116. //随手拍
  117. }else if(type == 'remoteDoorOpening'){
  118. //远程开门
  119. }else if(type == 'chemicalsManagement'){
  120. //化学品管控
  121. }
  122. },
  123. }
  124. }
  125. </script>
  126. <style lang="stylus" scoped>
  127. .pupilHome {
  128. flex: 1;
  129. display: flex;
  130. flex-direction: column;
  131. overflow: hidden;
  132. .top-page-title {
  133. text-align: center;
  134. font-size: 28rpx;
  135. background-color: #0183FA;
  136. color: #fff;
  137. }
  138. .top-back-img {
  139. position: absolute;
  140. top: 0;
  141. left: 0;
  142. width: 750rpx;
  143. height: 539rpx;
  144. background: url("@/pages/images/newImage/img_sy_bg@1x.png");
  145. background-size 100%;
  146. background-repeat: no-repeat;
  147. .position-img {
  148. z-index: 5;
  149. position: absolute;
  150. left: 0;
  151. top: 10rpx;
  152. width: 400rpx;
  153. height: 88rpx;
  154. }
  155. .position-data-button {
  156. z-index: 5;
  157. position: absolute;
  158. right: 0;
  159. top: 40rpx;
  160. width: 160rpx;
  161. height: 50rpx;
  162. line-height: 50rpx;
  163. background-color: #0183fa;
  164. color: #fff;
  165. font-size: 28rpx;
  166. text-align: center;
  167. border-top-left-radius: 30rpx;
  168. border-bottom-left-radius: 30rpx;
  169. }
  170. }
  171. .button-one-box {
  172. z-index: 5;
  173. background: #fff;
  174. width: 690rpx;
  175. border-radius: 20rpx;
  176. padding: 13px 0 20px;
  177. overflow: hidden;
  178. margin: 330rpx 30rpx 0;
  179. .button-min {
  180. display: inline-block;
  181. overflow: hidden;
  182. width: 172rpx;
  183. height: 123rpx;
  184. margin-top: 23rpx;
  185. .button-img {
  186. display: block;
  187. width: 80rpx;
  188. height: 80rpx;
  189. margin: 0 auto;
  190. }
  191. .button-name {
  192. margin-top: 15rpx;
  193. height: 28rpx;
  194. line-height: 28rpx;
  195. font-size: 28rpx;
  196. text-align: center;
  197. color: #333;
  198. }
  199. }
  200. }
  201. .button-two-box {
  202. z-index: 5;
  203. width: 690rpx;
  204. height: 120rpx;
  205. display: flex;
  206. margin: 20rpx 30rpx 0;
  207. .button-big-box {
  208. width: 335rpx;
  209. display: flex;
  210. border-radius: 20rpx;
  211. img {
  212. display: block;
  213. margin: 20rpx 31rpx 0 36rpx;
  214. height: 80rpx;
  215. width: 80rpx;
  216. }
  217. .button-min-box {
  218. view:nth-child(1) {
  219. line-height: 32rpx;
  220. height: 32rpx;
  221. font-size: 32rpx;
  222. color: #333;
  223. margin: 20rpx 0 18rpx;
  224. }
  225. view:nth-child(2) {
  226. line-height: 28rpx;
  227. height: 28rpx;
  228. font-size: 28rpx;
  229. color: #999;
  230. }
  231. }
  232. }
  233. }
  234. .button-three-box {
  235. z-index: 5;
  236. width: 690rpx;
  237. height: 150rpx;
  238. margin: 20rpx 30rpx 0;
  239. .button-big-box {
  240. border-radius: 20rpx;
  241. background-color: #FFF0DD;
  242. display: flex;
  243. img {
  244. display: block;
  245. width: 134rpx;
  246. height: 104rpx;
  247. margin: 23rpx 34rpx 0 30rpx;
  248. }
  249. .button-min-box {
  250. view:nth-child(1) {
  251. line-height: 30rpx;
  252. height: 30rpx;
  253. font-size: 30rpx;
  254. color: #FF8C00;
  255. margin: 35rpx 0 20rpx;
  256. }
  257. view:nth-child(2) {
  258. line-height: 26rpx;
  259. height: 26rpx;
  260. font-size: 26rpx;
  261. color: #666666;
  262. }
  263. }
  264. }
  265. }
  266. }
  267. </style>