teacherHome.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. <!-- 教师首页 -->
  2. <template>
  3. <view class="teacherHome" :style="{paddingTop:navHeight+'rpx'}">
  4. <view class="data-board" v-if="pageType == 1">
  5. </view>
  6. <view class="home-page" v-if="pageType == 2">
  7. <nav-bar :title="title"></nav-bar>
  8. <view class="top-back-img" :style="{top:navHeight+'rpx'}">
  9. <view class="position-data-button" @click="goPage('dataBoard')"
  10. v-if="dataPageType">数据看板</view>
  11. <img class="position-img" :src="rectangleLogo">
  12. </view>
  13. <view class="button-one-box">
  14. <view class="button-min" @click="goPage('securityCheck')">
  15. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqjc@1x.png">
  16. <view class="button-name">安全检查</view>
  17. </view>
  18. <view class="button-min" @click="goPage('securityExamination')">
  19. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqks@1x.png">
  20. <view class="button-name">安全考试</view>
  21. </view>
  22. <view class="button-min" @click="goPage('securityAdmittance')">
  23. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqzr@1x.png">
  24. <view class="button-name">安全准入</view>
  25. </view>
  26. <view class="button-min" @click="goPage('hierarchicalControl')">
  27. <img class="button-img" src="@/pages/images/newImage/icon_sy_fjgk@1x.png">
  28. <view class="button-name">分级管控</view>
  29. </view>
  30. <view class="button-min" @click="goPage('securityResponsibility')">
  31. <img class="button-img" src="@/pages/images/newImage/icon_sy_aqzrr@1x.png">
  32. <view class="button-name">安全责任</view>
  33. </view>
  34. <view class="button-min" @click="goPage('deviceManagement')">
  35. <img class="button-img" src="@/pages/images/newImage/icon_sy_sbgl@1x.png">
  36. <view class="button-name">设备管理</view>
  37. </view>
  38. <view class="button-min" @click="goPage('emergencyDisposal')">
  39. <img class="button-img" src="@/pages/images/newImage/icon_sy_yjcz@1x.png">
  40. <view class="button-name">应急处置</view>
  41. </view>
  42. <view class="button-min" @click="goPage('cageSiteManagement')">
  43. <img class="button-img" src="@/pages/images/newImage/icon_sy_lwgl@1x.png">
  44. <view class="button-name">笼位管理</view>
  45. </view>
  46. </view>
  47. <view class="button-two-box">
  48. <view class="button-big-box" @click="goPage('snapshot')"
  49. style="background-color: #DFF0FF;margin-right:20rpx;">
  50. <img src="@/pages/images/newImage/icon_sy_ssp@1x.png">
  51. <view class="button-min-box">
  52. <view>随手拍</view>
  53. <view>发现隐患</view>
  54. </view>
  55. </view>
  56. <view class="button-big-box" @click="goPage('remoteDoorOpening')"
  57. style="background-color: #D6EBDA;">
  58. <img src="@/pages/images/newImage/img_sy_yckm@1x.png">
  59. <view class="button-min-box">
  60. <view>远程开门</view>
  61. <view>立即开门</view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="button-three-box">
  66. <view class="button-big-box" @click="goPage('chemicalsManagement')">
  67. <img src="@/pages/images/newImage/img_bg_hxpgk@1x.png">
  68. <view class="button-min-box">
  69. <view>化学品智能管控</view>
  70. <view>申购审批丨使用台账丨实验室库存</view>
  71. </view>
  72. </view>
  73. </view>
  74. <tab-bar></tab-bar>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import { pageRestrictVerify } from '@/utils/index'
  80. import {
  81. tabBar
  82. } from '@/pages/component/tabBar.vue'
  83. import {navBar} from '@/pages/component/navbar.vue'
  84. export default {
  85. name: "teacherHome",
  86. components: {
  87. tabBar,
  88. navBar,
  89. },
  90. data() {
  91. return {
  92. pageType:2,
  93. navHeight: uni.getStorageSync('navHeight'),
  94. dataPageType:false,
  95. title: '实验室安全智慧化管控系统',
  96. rectangleLogo:uni.getStorageSync('rectangleLogo')
  97. }
  98. },
  99. created() {
  100. if(pageRestrictVerify('dataBoard')){
  101. this.dataPageType = true;
  102. // this.pageType = 1;
  103. }
  104. },
  105. mounted() {
  106. },
  107. methods: {
  108. goPage(type){
  109. if (!pageRestrictVerify(type)) {
  110. uni.showToast({
  111. title: '没有相关权限,请联系管理员',
  112. icon: "none",
  113. mask: true,
  114. duration: 2000
  115. });
  116. return
  117. }
  118. if(type == 'dataBoard'){
  119. //数据看板
  120. }else if(type == 'securityCheck'){
  121. //安全检查
  122. }else if(type == 'securityExamination'){
  123. //安全考试
  124. }else if(type == 'securityAdmittance'){
  125. //安全准入
  126. }else if(type == 'hierarchicalControl'){
  127. //分级管控
  128. }else if(type == 'securityResponsibility'){
  129. //安全责任
  130. }else if(type == 'deviceManagement'){
  131. //设备管理
  132. }else if(type == 'emergencyDisposal'){
  133. //应急处置
  134. }else if(type == 'cageSiteManagement'){
  135. //笼位管理
  136. }else if(type == 'snapshot'){
  137. //随手拍
  138. }else if(type == 'remoteDoorOpening'){
  139. //远程开门
  140. }else if(type == 'chemicalsManagement'){
  141. //化学品管控
  142. }
  143. },
  144. }
  145. }
  146. </script>
  147. <style lang="stylus" scoped>
  148. .teacherHome {
  149. flex:1;
  150. display: flex;
  151. flex-direction: column;
  152. overflow: hidden;
  153. .data-board {
  154. flex:1;
  155. display: flex;
  156. flex-direction: column;
  157. overflow: hidden;
  158. }
  159. .home-page {
  160. flex:1;
  161. display: flex;
  162. flex-direction: column;
  163. overflow: scroll;
  164. .top-page-title{
  165. text-align: center;
  166. font-size:28rpx;
  167. background-color:#0183FA;
  168. color:#fff;
  169. }
  170. .top-back-img{
  171. position: absolute;
  172. top:0;
  173. left:0;
  174. width:750rpx;
  175. height:539rpx;
  176. background: url("@/pages/images/newImage/img_sy_bg@1x.png");
  177. background-size 100%;
  178. background-repeat: no-repeat;
  179. .position-img{
  180. z-index:5;
  181. position: absolute;
  182. left: 0;
  183. top: 10rpx;
  184. width: 400rpx;
  185. height: 88rpx;
  186. }
  187. .position-data-button{
  188. z-index:5;
  189. position: absolute;
  190. right:0;
  191. top:40rpx;
  192. width:160rpx;
  193. height:50rpx;
  194. line-height:50rpx;
  195. background-color:#0183fa;
  196. color:#fff;
  197. font-size:28rpx;
  198. text-align: center;
  199. border-top-left-radius: 30rpx;
  200. border-bottom-left-radius: 30rpx;
  201. }
  202. }
  203. .button-one-box{
  204. z-index:5;
  205. background: #fff;
  206. width: 690rpx;
  207. border-radius:20rpx;
  208. padding:13px 0 20px;
  209. overflow: hidden;
  210. margin:330rpx 30rpx 0;
  211. .button-min{
  212. display: inline-block;
  213. overflow: hidden;
  214. width:172rpx;
  215. height:123rpx;
  216. margin-top:23rpx;
  217. .button-img{
  218. display: block;
  219. width:80rpx;
  220. height:80rpx;
  221. margin:0 auto;
  222. }
  223. .button-name{
  224. margin-top:15rpx;
  225. height:28rpx;
  226. line-height:28rpx;
  227. font-size:28rpx;
  228. text-align: center;
  229. color:#333;
  230. }
  231. }
  232. }
  233. .button-two-box{
  234. z-index:5;
  235. width: 690rpx;
  236. height: 120rpx;
  237. display: flex;
  238. margin:20rpx 30rpx 0;
  239. .button-big-box{
  240. width:335rpx;
  241. display: flex;
  242. border-radius:20rpx;
  243. img{
  244. display: block;
  245. margin:20rpx 31rpx 0 36rpx;
  246. height:80rpx;
  247. width:80rpx;
  248. }
  249. .button-min-box{
  250. view:nth-child(1){
  251. line-height:32rpx;
  252. height:32rpx;
  253. font-size:32rpx;
  254. color:#333;
  255. margin:20rpx 0 18rpx;
  256. }
  257. view:nth-child(2){
  258. line-height:28rpx;
  259. height:28rpx;
  260. font-size:28rpx;
  261. color:#999;
  262. }
  263. }
  264. }
  265. }
  266. .button-three-box{
  267. z-index:5;
  268. width: 690rpx;
  269. height: 150rpx;
  270. margin:20rpx 30rpx 0;
  271. .button-big-box{
  272. border-radius:20rpx;
  273. background-color: #FFF0DD;
  274. display: flex;
  275. img{
  276. display: block;
  277. width:134rpx;
  278. height:104rpx;
  279. margin:23rpx 34rpx 0 30rpx;
  280. }
  281. .button-min-box{
  282. view:nth-child(1){
  283. line-height:30rpx;
  284. height:30rpx;
  285. font-size:30rpx;
  286. color:#FF8C00;
  287. margin:35rpx 0 20rpx;
  288. }
  289. view:nth-child(2){
  290. line-height:26rpx;
  291. height:26rpx;
  292. font-size:26rpx;
  293. color:#666666;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. </style>