123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- <!-- 学生首页 -->
- <template>
- <view class="pupilHome" :style="{paddingTop:navHeight+'rpx'}">
- <nav-bar :title="title"></nav-bar>
- <view class="top-back-img" :style="{top:navHeight+'rpx'}">
- <img class="position-img" :src="rectangleLogo">
- </view>
- <view class="button-one-box">
- <view class="button-min" @click="goPage()">
- <img class="button-img" src="@/pages/images/newImage/icon_sy_aqks@1x.png">
- <view class="button-name">安全考试</view>
- </view>
- <view class="button-min" @click="goPage('securityAdmittancePupil')">
- <img class="button-img" src="@/pages/images/newImage/icon_sy_aqzr@1x.png">
- <view class="button-name">安全准入</view>
- </view>
- <view class="button-min" @click="goPage('chemicalsPupil')">
- <img class="button-img" src="@/pages/images/newImage/icon_sy_hxp@1x.png">
- <view class="button-name">化学品</view>
- </view>
- <view class="button-min" @click="goPage('cageSiteSubscribePupil')">
- <img class="button-img" src="@/pages/images/newImage/icon_sy_lwgl@1x.png">
- <view class="button-name">笼位预约</view>
- </view>
- </view>
- <view class="button-two-box">
- <view class="button-big-box" @click="goPage('snapshotPupil')"
- style="background-color: #DFF0FF;margin-right:20rpx;">
- <img src="@/pages/images/newImage/icon_sy_ssp@1x.png">
- <view class="button-min-box">
- <view>随手拍</view>
- <view>发现隐患</view>
- </view>
- </view>
- <view class="button-big-box" @click="goPage('leaveCheckPupil')"
- style="background-color: #D6EBDA;">
- <img src="@/pages/images/newImage/img_sy_lkjc@1x.png">
- <view class="button-min-box">
- <view>离开检查</view>
- <view>拍照检查</view>
- </view>
- </view>
- </view>
- <view class="button-three-box">
- <view class="button-big-box" @click="goPage('violationRecordPupil')">
- <img src="@/pages/images/newImage/img_wd_wgjl@1x.png">
- <view class="button-min-box">
- <view>违规记录</view>
- <view>实验室安全违规行为查询</view>
- </view>
- </view>
- </view>
- <tab-bar></tab-bar>
- </view>
- </template>
- <script>
- import {
- pageRestrictVerify
- } from '@/utils/index'
- import {
- tabBar
- } from '@/pages/component/tabBar.vue'
- import {navBar} from '@/pages/component/navbar.vue'
- export default {
- name: "pupilHome",
- components: {
- tabBar,
- navBar,
- },
- data() {
- return {
- pageType:2,
- navHeight: uni.getStorageSync('navHeight'),
- title: '实验室安全智慧化管控系统',
- rectangleLogo:uni.getStorageSync('rectangleLogo')
- }
- },
- created() {
- },
- mounted() {
- },
- methods: {
- goPage(type){
- if(!type){
- uni.showToast({
- title: '暂未开放',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- if (!pageRestrictVerify(type)) {
- uni.showToast({
- title: '没有相关权限,请联系管理员',
- icon: "none",
- mask: true,
- duration: 2000
- });
- return
- }
- if(type == 'securityExaminationPupil'){
- //安全考试
-
- }else if(type == 'securityAdmittancePupil'){
- //安全准入
- uni.navigateTo({
- url: "/pages_student/views/accessApplication/safeAccess",
- });
- }else if(type == 'chemicalsPupil'){
- //化学品
-
- }else if(type == 'cageSiteSubscribePupil'){
- //笼位预约
-
- }else if(type == 'snapshotPupil'){
- //随手拍
- uni.navigateTo({
- url: "/pages_safetyExamine/views/snapshotManage/snapshotAdd",
- });
- }else if(type == 'leaveCheckPupil'){
- //离开检查
- uni.navigateTo({
- url: "/pages_basics/views/photoInspection",
- });
- }else if(type == 'violationRecordPupil'){
- //违规记录
- uni.navigateTo({
- url: "/pages_student/views/meViolation/meViolation",
- });
- }
- },
- }
- }
- </script>
- <style lang="stylus" scoped>
- .pupilHome {
- flex: 1;
- display: flex;
- flex-direction: column;
- overflow: hidden;
- .top-page-title {
- text-align: center;
- font-size: 28rpx;
- background-color: #0183FA;
- color: #fff;
- }
- .top-back-img {
- position: absolute;
- top: 0;
- left: 0;
- width: 750rpx;
- height: 539rpx;
- background: url("@/pages/images/newImage/img_sy_bg@1x.png");
- background-size 100%;
- background-repeat: no-repeat;
- .position-img {
- z-index: 5;
- position: absolute;
- left: 0;
- top: 10rpx;
- width: 400rpx;
- height: 88rpx;
- }
- .position-data-button {
- z-index: 5;
- position: absolute;
- right: 0;
- top: 40rpx;
- width: 160rpx;
- height: 50rpx;
- line-height: 50rpx;
- background-color: #0183fa;
- color: #fff;
- font-size: 28rpx;
- text-align: center;
- border-top-left-radius: 30rpx;
- border-bottom-left-radius: 30rpx;
- }
- }
- .button-one-box {
- z-index: 5;
- background: #fff;
- width: 690rpx;
- border-radius: 20rpx;
- padding: 13px 0 20px;
- overflow: hidden;
- margin: 330rpx 30rpx 0;
- .button-min {
- display: inline-block;
- overflow: hidden;
- width: 172rpx;
- height: 123rpx;
- margin-top: 23rpx;
- .button-img {
- display: block;
- width: 80rpx;
- height: 80rpx;
- margin: 0 auto;
- }
- .button-name {
- margin-top: 15rpx;
- height: 28rpx;
- line-height: 28rpx;
- font-size: 28rpx;
- text-align: center;
- color: #333;
- }
- }
- }
- .button-two-box {
- z-index: 5;
- width: 690rpx;
- height: 120rpx;
- display: flex;
- margin: 20rpx 30rpx 0;
- .button-big-box {
- width: 335rpx;
- display: flex;
- border-radius: 20rpx;
- img {
- display: block;
- margin: 20rpx 31rpx 0 36rpx;
- height: 80rpx;
- width: 80rpx;
- }
- .button-min-box {
- view:nth-child(1) {
- line-height: 32rpx;
- height: 32rpx;
- font-size: 32rpx;
- color: #333;
- margin: 20rpx 0 18rpx;
- }
- view:nth-child(2) {
- line-height: 28rpx;
- height: 28rpx;
- font-size: 28rpx;
- color: #999;
- }
- }
- }
- }
- .button-three-box {
- z-index: 5;
- width: 690rpx;
- height: 150rpx;
- margin: 20rpx 30rpx 0;
- .button-big-box {
- border-radius: 20rpx;
- background-color: #FFF0DD;
- display: flex;
- img {
- display: block;
- width: 134rpx;
- height: 104rpx;
- margin: 23rpx 34rpx 0 30rpx;
- }
- .button-min-box {
- view:nth-child(1) {
- line-height: 30rpx;
- height: 30rpx;
- font-size: 30rpx;
- color: #FF8C00;
- margin: 35rpx 0 20rpx;
- }
- view:nth-child(2) {
- line-height: 26rpx;
- height: 26rpx;
- font-size: 26rpx;
- color: #666666;
- }
- }
- }
- }
- }
- </style>
|