|
@@ -16,7 +16,7 @@
|
|
|
<img class="button-img" src="@/pages/images/newImage/icon_sy_aqjc@1x.png">
|
|
|
<view class="button-name">安全检查</view>
|
|
|
</view>
|
|
|
- <view class="button-min" @click="goPage('securityExamination')">
|
|
|
+ <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>
|
|
@@ -45,6 +45,7 @@
|
|
|
<view class="button-name">笼位管理</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <topWarn></topWarn>
|
|
|
<view class="button-two-box">
|
|
|
<view class="button-big-box" @click="goPage('snapshot')"
|
|
|
style="background-color: #DFF0FF;margin-right:20rpx;">
|
|
@@ -78,16 +79,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ getGentleIdentifier
|
|
|
+ } from '@/pages/api/index.js'
|
|
|
import { pageRestrictVerify } from '@/utils/index'
|
|
|
import {
|
|
|
tabBar
|
|
|
} from '@/pages/component/tabBar.vue'
|
|
|
import {navBar} from '@/pages/component/navbar.vue'
|
|
|
+ import {topWarn} from '@/pages/component/topWarn.vue'
|
|
|
export default {
|
|
|
name: "teacherHome",
|
|
|
components: {
|
|
|
tabBar,
|
|
|
navBar,
|
|
|
+ topWarn,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -109,6 +115,15 @@
|
|
|
},
|
|
|
methods: {
|
|
|
goPage(type){
|
|
|
+ if(!type){
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂未开放',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!pageRestrictVerify(type)) {
|
|
|
uni.showToast({
|
|
|
title: '没有相关权限,请联系管理员',
|
|
@@ -123,16 +138,20 @@
|
|
|
|
|
|
}else if(type == 'securityCheck'){
|
|
|
//安全检查
|
|
|
-
|
|
|
+ this.getGentleIdentifier();
|
|
|
}else if(type == 'securityExamination'){
|
|
|
//安全考试
|
|
|
|
|
|
}else if(type == 'securityAdmittance'){
|
|
|
//安全准入
|
|
|
-
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_manage/views/accessQualification/accessQualification",
|
|
|
+ });
|
|
|
}else if(type == 'hierarchicalControl'){
|
|
|
//分级管控
|
|
|
-
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_manage/views/gradingControl/gradingControl",
|
|
|
+ });
|
|
|
}else if(type == 'securityResponsibility'){
|
|
|
//安全责任
|
|
|
|
|
@@ -141,20 +160,73 @@
|
|
|
|
|
|
}else if(type == 'emergencyDisposal'){
|
|
|
//应急处置
|
|
|
-
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_manage/views/emergencyEvacuationBig",
|
|
|
+ });
|
|
|
}else if(type == 'cageSiteManagement'){
|
|
|
//笼位管理
|
|
|
|
|
|
}else if(type == 'snapshot'){
|
|
|
//随手拍
|
|
|
-
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_safetyExamine/views/snapshotManage/snapshotAdd",
|
|
|
+ });
|
|
|
}else if(type == 'remoteDoorOpening'){
|
|
|
//远程开门
|
|
|
-
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_manage/views/accessControl/remoteOpen",
|
|
|
+ });
|
|
|
}else if(type == 'chemicalsManagement'){
|
|
|
//化学品管控
|
|
|
|
|
|
}
|
|
|
+ },//获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 院级管理员collegeGentle 整改身份"applyGentle": false 检查者身份
|
|
|
+ async getGentleIdentifier(routeUrl) {
|
|
|
+ let self = this;
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await getGentleIdentifier();
|
|
|
+ if (data.code == 200) {
|
|
|
+ let pageType = null
|
|
|
+ // 如果是管理员 检查者和整改者
|
|
|
+ let list = [];
|
|
|
+ if (data.data.adminGentle || data.data.collegeGentle) { //校级管理员
|
|
|
+ list.push({
|
|
|
+ name: '管理员',
|
|
|
+ pageType: 1
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.applyGentle || data.data.myApplyGentle) {
|
|
|
+ list.push({
|
|
|
+ name: '检查者',
|
|
|
+ pageType: 2
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (data.data.rectifyGentle) {
|
|
|
+ list.push({
|
|
|
+ name: '整改者',
|
|
|
+ pageType: 3
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (!data.data.adminGentle && !data.data.applyGentle && !data.data.myApplyGentle && !data.data
|
|
|
+ .rectifyGentle && !data.data.collegeGentle) {
|
|
|
+
|
|
|
+ }
|
|
|
+ uni.setStorageSync('gentleIdentifier', list)
|
|
|
+ uni.setStorageSync('gentleIdentifierData', data.data)
|
|
|
+ if (list.length > 0) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_safetyExamine/views/safetyExamineWorkbench",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: '您没有管理员/检查者/整改者身份,请联系管理员',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
}
|