dedsudiyu 10 månader sedan
förälder
incheckning
fe5c96f878

+ 7 - 0
pages/api/index.js

@@ -230,6 +230,13 @@ export const systemNoticeGetNoticeType  = (data) => {
     })
 };
 
+//查询人脸信息与认证状态
+export const studentinfoFacemy  = (data) => {
+    return apiResquest({
+        url: `/base/app/lab/api/studentinfo/my`,
+        method: 'GET',
+    })
+};
 
 /************************未调试************************/
 

+ 22 - 7
pages/component/topWarn.vue

@@ -1,8 +1,9 @@
 <!-- 顶部警告 -->
 <template>
 	<view class="top-warn" v-if="pageType">
+		<view class="left-title">预警</view>
 		<view class="text-view">{{text}}</view>
-		<view class="button-view" @click="buttonClick">查看</view>
+		<view class="button-view" @click="buttonClick">处置</view>
 	</view>
 </template>
 
@@ -179,22 +180,36 @@
 		height: 80rpx;
 		line-height: 80rpx;
 		background rgba(2550, 0, 0, 0.2);
-		margin: 20rpx 0;
+		margin: 20rpx 30rpx 0;
 		display flex;
 		overflow hidden;
-
+		border-radius:20rpx;
+		.left-title{
+			width:100rpx;
+			height:40rpx;
+			text-align: center;
+			line-height:40rpx;
+			margin:20rpx 18rpx 0 30rpx;
+			color:#fff;
+			font-size:28rpx;
+			background-color: #FF0000;
+			border-radius:10rpx;
+		}
 		.text-view {
-			padding-left: 20rpx;
 			color: #FF0000;
 			flex: 1;
-			padding-left: 20rpx;
 			white-space: nowrap;
 		}
 
 		.button-view {
-			width: 140rpx;
-			color: #0183FA;
+			width: 120rpx;
+			height:48rpx;
+			line-height:48rpx;
+			color: #FF0000;
+			border:1px solid #FF0000;
 			text-align center;
+			border-radius:50rpx;
+			margin:16rpx 12rpx 0 0;
 		}
 	}
 </style>

+ 25 - 12
pages/views/pupilPage/pupilHome.vue

@@ -3,12 +3,10 @@
 	<view class="pupilHome" :style="{paddingTop:navHeight+'rpx'}">
 		<nav-bar :title="title"></nav-bar>
 		<view class="top-back-img" :style="{top:navHeight+'rpx'}">
-			<view class="position-data-button" @click="goPage('dataBoard')"
-			v-if="dataPageType">数据看板</view>
 			<img class="position-img" :src="rectangleLogo">
 		</view>
 		<view class="button-one-box">
-			<view class="button-min" @click="goPage('securityExaminationPupil')">
+			<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>
@@ -57,6 +55,9 @@
 </template>
 
 <script>
+	import {
+		pageRestrictVerify
+	} from '@/utils/index'
 	import {
 		tabBar
 	} from '@/pages/component/tabBar.vue'
@@ -71,22 +72,26 @@
 			return {
 				pageType:2,
         navHeight: uni.getStorageSync('navHeight'),
-				dataPageType:false,
         title: '实验室安全智慧化管控系统',
 				rectangleLogo:uni.getStorageSync('rectangleLogo')
 			}
 		},
 		created() {
-			if(pageRestrictVerify('dataBoard')){
-				this.dataPageType = true;
-				// this.pageType = 1;
-			}
 		},
 		mounted() {
 
 		},
 		methods: {
 			goPage(type){
+				if(!type){
+					uni.showToast({
+						title: '暂未开放',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
 				if (!pageRestrictVerify(type)) {
 					uni.showToast({
 						title: '没有相关权限,请联系管理员',
@@ -101,7 +106,9 @@
 					
 				}else if(type == 'securityAdmittancePupil'){
 					//安全准入
-					
+					uni.navigateTo({
+						url: "/pages_student/views/accessApplication/safeAccess",
+					});
 				}else if(type == 'chemicalsPupil'){
 					//化学品
 					
@@ -110,13 +117,19 @@
 					
 				}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",
+					});
 				}
 			},
 		}

+ 57 - 6
pages/views/pupilPage/pupilMine.vue

@@ -5,14 +5,16 @@
 		<!-- 信息面板 -->
 		<view class="user-info-box">
 			<view class="left-img-box">
-				<img v-if="userData.avatar" class="avatar-img" :src="userData.avatar">
+				<img v-if="userData.avatar" class="avatar-img" :src="baseUrl+userData.avatar">
 				<img v-else class="avatar-img" src="@/pages/images/icon_01.png">
 				<img class="edit-img" src="@/pages/images/newImage/icon_wd_bj@1x.png">
 			</view>
 			<view class="right-name-box">
 				<view class="right-name-top-box">
 					<view>{{userData.userName}}</view>
-					<view v-if="negativeType">负面清单</view>
+					<view v-if="userData.status == 2 || userData.status == 3">
+						{{userData.status == 2?'负面清单':(userData.status == 3?'黑名单':'')}}
+					</view>
 				</view>
 				<view class="right-name-bottom-box">{{userData.deptName}}</view>
 			</view>
@@ -35,7 +37,7 @@
 				</view>
 			</view>
 			<view class="border-null-p"></view>
-			<view class="points-big-box">
+			<view class="points-big-box" @click="scanCode()">
 				<view class="num-p colorC">扫一扫</view>
 				<view class="img-box">
 					<img style="margin-left:30rpx;" src="@/pages/images/newImage/icon_wd_dh@1x.png">
@@ -78,6 +80,7 @@
 	import {
 		logout,
 		systemUserProfile,
+		studentinfoFacemy,
 		examPointsRecordGetMyPointsLogInfo,
 	} from '@/pages/api/index.js'
 	import {
@@ -93,10 +96,12 @@
 		},
 		data() {
 			return {
+				baseUrl: config.base_url,
 				userData:{},
 				bonusPoints:null,
 				creditScore:null,
-				negativeType:false,
+				ifFaceFeature:false,
+				isUpload:false,
 			}
 		},
 		created() {
@@ -104,10 +109,43 @@
 		},
 		mounted() {
 			this.systemUserProfile();
+			this.studentinfoFacemy();
 			this.examPointsRecordGetMyPointsLogInfo();
 		},
 		methods: {
+			scanCode(){
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: function(res) {
+						if(res.result.indexOf('mid') != -1 &&
+							 res.result.indexOf('sid') != -1 &&
+							 res.result.indexOf('pid') != -1 &&
+							 res.result.indexOf('pri') != -1 ){
+							uni.navigateTo({
+								url: '/pages_student/views/integralManage/codeSuccess?q=' +
+									encodeURIComponent(JSON.stringify(res.result))
+							});
+						}else{
+							uni.showToast({
+								title: '请扫描正确的二维码',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					}
+				});
+			},
 			goPage(type) {
+				if(!type){
+					uni.showToast({
+						title: '暂未开放',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
 				if (!pageRestrictVerify(type)) {
 					uni.showToast({
 						title: '没有相关权限,请联系管理员',
@@ -122,7 +160,9 @@
 
 				}else if (type == 'identityAuthenticationPupil') {
 					//身份验证
-
+					uni.navigateTo({
+						url: "/pages_basics/views/faceImage",
+					});
 				} else if (type == 'electronicSignaturePupil') {
 					//电子签名
 
@@ -138,7 +178,7 @@
 					uni.setStorageSync('faceImg', data.data.faceImg);
 				}
 			},
-			//查询学生-信用分/奖励分
+			//查询-信用分/奖励分
 			async examPointsRecordGetMyPointsLogInfo() {
 				const {
 					data
@@ -148,6 +188,17 @@
 					this.creditScore = data.data.creditScore;
 				}
 			},
+			//获取当前身份人脸验证状态与学生卡上传状态
+			async studentinfoFacemy(){
+				let obj = {
+					studentsId:uni.getStorageSync('userId')
+				}
+				const {data} = await studentinfoFacemy(obj)
+				if(data.code == 200){
+					this.certification = data.data;
+					this.ifFaceFeature = data.data.ifFaceFeature;
+				}
+			},
 			//退出按钮
 			clickOut() {
 				let self = this;

+ 79 - 7
pages/views/teacherPage/teacherHome.vue

@@ -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
+						});
+					}
+				}
 			},
 		}
 	}

+ 61 - 6
pages/views/teacherPage/teacherMine.vue

@@ -34,7 +34,7 @@
 				</view>
 			</view>
 			<view class="border-null-p"></view>
-			<view class="points-big-box">
+			<view class="points-big-box" @click="scanCode()">
 				<view class="num-p colorC">扫一扫</view>
 				<view class="img-box">
 					<img style="margin-left:30rpx;" src="@/pages/images/newImage/icon_wd_dh@1x.png">
@@ -91,6 +91,7 @@
 	import {
 		logout,
 		systemUserProfile,
+		studentinfoFacemy,
 		examPointsRecordGetMyPointsLogInfo,
 	} from '@/pages/api/index.js'
 	import {
@@ -109,6 +110,8 @@
 				userData:{},
 				bonusPoints:null,
 				creditScore:null,
+				ifFaceFeature:false,
+				isUpload:false,
 			}
 		},
 		created() {
@@ -116,10 +119,43 @@
 		},
 		mounted() {
 			this.systemUserProfile();
+			this.studentinfoFacemy();
 			this.examPointsRecordGetMyPointsLogInfo();
 		},
 		methods: {
+			scanCode(){
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: function(res) {
+						if(res.result.indexOf('mid') != -1 &&
+							 res.result.indexOf('sid') != -1 &&
+							 res.result.indexOf('pid') != -1 &&
+							 res.result.indexOf('pri') != -1 ){
+							uni.navigateTo({
+								url: '/pages_student/views/integralManage/codeSuccess?q=' +
+									encodeURIComponent(JSON.stringify(res.result))
+							});
+						}else{
+							uni.showToast({
+								title: '请扫描正确的二维码',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					}
+				});
+			},
 			goPage(type) {
+				if(!type){
+					uni.showToast({
+						title: '暂未开放',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
 				if (!pageRestrictVerify(type)) {
 					uni.showToast({
 						title: '没有相关权限,请联系管理员',
@@ -131,19 +167,27 @@
 				}
 				if (type == 'riskEarlyWarning') {
 					//风险预警
-
+					uni.navigateTo({
+						url: "/pages_basics/views/earlyWarningManage/earlyWarningList",
+					});
 				} else if (type == 'entryAndExitRecord') {
 					//进出记录
-
+					uni.navigateTo({
+						url: "/pages_basics/views/record/index",
+					});
 				} else if (type == 'accessControlAuthorization') {
 					//门禁授权
-
+					uni.navigateTo({
+						url: "/pages_manage/views/accessControl/empowerOpen",
+					});
 				} else if (type == 'identityAuthentication') {
 					//身份验证
-
+					uni.navigateTo({
+						url: "/pages_basics/views/faceImage",
+					});
 				} else if (type == 'electronicSignature') {
 					//电子签名
-
+					
 				}
 			},
 			//获取个人信息
@@ -166,6 +210,17 @@
 					this.creditScore = data.data.creditScore;
 				}
 			},
+			//获取当前身份人脸验证状态与学生卡上传状态
+			async studentinfoFacemy(){
+				let obj = {
+					studentsId:uni.getStorageSync('userId')
+				}
+				const {data} = await studentinfoFacemy(obj)
+				if(data.code == 200){
+					this.certification = data.data;
+					this.ifFaceFeature = data.data.ifFaceFeature;
+				}
+			},
 			//退出按钮
 			clickOut() {
 				let self = this;