|
@@ -79,7 +79,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getGentleIdentifier
|
|
|
+ securityDataStatisticsGetUserIdentity
|
|
|
} from '@/pages/api/index.js'
|
|
|
import {
|
|
|
pageRestrictVerify
|
|
@@ -124,7 +124,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ this.securityDataStatisticsGetUserIdentity()
|
|
|
},
|
|
|
methods: {
|
|
|
goHome() {
|
|
@@ -158,7 +158,6 @@
|
|
|
uni.navigateTo({
|
|
|
url: "/pages_safetyCheck/views/safetyCheck",
|
|
|
});
|
|
|
- //this.getGentleIdentifier();
|
|
|
} else if (type == 'securityExamination') {
|
|
|
//安全考试
|
|
|
|
|
@@ -208,51 +207,35 @@
|
|
|
|
|
|
}
|
|
|
}, //获取用户身份标识"adminGentle": false, 管理员身份 "rectifyGentle": false, 院级管理员collegeGentle 整改身份"applyGentle": false 检查者身份
|
|
|
- async getGentleIdentifier(routeUrl) {
|
|
|
+ async securityDataStatisticsGetUserIdentity(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
|
|
|
- });
|
|
|
- }
|
|
|
+ } = 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');
|
|
|
}
|
|
|
},
|
|
|
/* 扫一扫*/
|