|
@@ -79,9 +79,6 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- securityDataStatisticsGetUserIdentity
|
|
|
- } from '@/pages/api/index.js'
|
|
|
- import {
|
|
|
pageRestrictVerify
|
|
|
} from '@/utils/index'
|
|
|
import {
|
|
@@ -111,7 +108,8 @@
|
|
|
dataPageType: false,
|
|
|
title: '实验室安全智慧化管控系统',
|
|
|
background: '#0183FA',
|
|
|
- rectangleLogo: uni.getStorageSync('rectangleLogo')
|
|
|
+ rectangleLogo: uni.getStorageSync('rectangleLogo'),
|
|
|
+ identityData:uni.getStorageSync('identityData'),
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -124,7 +122,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.securityDataStatisticsGetUserIdentity()
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
goHome() {
|
|
@@ -155,9 +153,19 @@
|
|
|
|
|
|
} else if (type == 'securityCheck') {
|
|
|
//安全检查
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages_safetyCheck/views/safetyCheck",
|
|
|
- });
|
|
|
+ if(this.identityData){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages_safetyCheck/views/safetyCheck",
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ mask: true,
|
|
|
+ icon: "none",
|
|
|
+ position: "center",
|
|
|
+ title: '您不是校/院级管理员或督导组成员,无法使用该功能.',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
} else if (type == 'securityExamination') {
|
|
|
//安全考试
|
|
|
|
|
@@ -206,38 +214,7 @@
|
|
|
//化学品管控
|
|
|
|
|
|
}
|
|
|
- }, //获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 院级管理员collegeGentle 整改身份"applyGentle": false 检查者身份
|
|
|
- async securityDataStatisticsGetUserIdentity(routeUrl) {
|
|
|
- let self = this;
|
|
|
- const {
|
|
|
- data
|
|
|
- } = await securityDataStatisticsGetUserIdentity();
|
|
|
- if(data.schoolAdmin){
|
|
|
- //校级管理员
|
|
|
- uni.setStorageSync('identityData',{
|
|
|
- type:'schoolAdmin'
|
|
|
- });
|
|
|
- }else if(data.collegeAdmin){
|
|
|
- //院级管理员
|
|
|
- uni.setStorageSync('identityData',{
|
|
|
- type:'collegeAdmin'
|
|
|
- });
|
|
|
- }else if(data.schoolGroup){
|
|
|
- //校级督导组
|
|
|
- uni.setStorageSync('identityData',{
|
|
|
- type:'schoolGroup',
|
|
|
- groupIds:data.groupIds
|
|
|
- });
|
|
|
- }else if(data.collegeGroup){
|
|
|
- //院级督导组
|
|
|
- uni.setStorageSync('identityData',{
|
|
|
- type:'collegeGroup',
|
|
|
- groupIds:data.groupIds
|
|
|
- });
|
|
|
- }else{
|
|
|
- uni.removeStorageSync('identityType');
|
|
|
- }
|
|
|
- },
|
|
|
+ },
|
|
|
/* 扫一扫*/
|
|
|
saoCode() {
|
|
|
let self = this;
|