dedsudiyu преди 3 месеца
родител
ревизия
3bc7c9fd04
променени са 10 файла, в които са добавени 526 реда и са изтрити 18 реда
  1. 38 0
      api/index.js
  2. BIN
      images/icon_wd_zw.png
  3. BIN
      images/icon_wd_zw2.png
  4. BIN
      images/icon_zw_bk.png
  5. 9 0
      pages.json
  6. 26 16
      pages/alarmInfo/alarmInfo.vue
  7. 10 0
      pages/emergencyEvacuationBig.vue
  8. 405 0
      pages/fingerprint.vue
  9. 28 2
      pages/mine.vue
  10. 10 0
      pages_manage/workbench/laboratory/monitor.vue

+ 38 - 0
api/index.js

@@ -19,6 +19,44 @@ export const getDemoInfoList  = (data) => {
         data: data,
     })
 };
+//指纹-查询用户指纹录取数量
+export const fingerprintQuantity  = (data) => {
+    return apiResquest({
+        url: `/laboratory/haikang/userFinger/queryCount/`+data,
+        method: 'GET',
+    })
+};
+//指纹-查询用户指纹数据
+export const fingerprintQueryList  = (data) => {
+    return apiResquest({
+        url: `/laboratory/haikang/userFinger/queryList/`+data,
+        method: 'GET',
+    })
+};
+//指纹-查询当前用户已授权门禁列表
+export const fingerprintQeryMySubList  = (data) => {
+    return apiResquest({
+        url: `/laboratory/haikang/user/queryMySubList`,
+        method: 'GET',
+		data: data,
+    })
+};
+//指纹-指纹采集
+export const fingerprintGther  = (data) => {
+    return apiResquest({
+        url: `/laboratory/haikang/userFinger/capture/`+data.hardId+'/'+data.num,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//指纹-指纹同步设备
+export const fingerprintGtherSync  = (data) => {
+    return apiResquest({
+        url: `/laboratory/haikang/userFinger/print/`+data,
+        method: 'POST',
+        data: {...data}
+    })
+};
 //气瓶列表-列表
 export const gasList  = (data) => {
     return apiResquest({

BIN
images/icon_wd_zw.png


BIN
images/icon_wd_zw2.png


BIN
images/icon_zw_bk.png


+ 9 - 0
pages.json

@@ -82,6 +82,15 @@
 				"navigationBarBackgroundColor": "#0183FA" //导航背景色
 			}
 		},
+		{
+			"path": "pages/fingerprint",//指纹信息
+			"style": {
+				"navigationBarTitleText": "指纹信息",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
+		
 		//登录
 		{
 			"path": "pages/login",//登录

+ 26 - 16
pages/alarmInfo/alarmInfo.vue

@@ -63,7 +63,7 @@
 				</view>
 				<view class="broadcast_m">
 					<view class="broadcast_m_t" :class="liveType?'broadcast_m_t_back_a':'broadcast_m_t_back_b'" @longpress.stop="recordButton" @touchmove.stop="cancelButton"  @touchend.stop="sendButton">
-						
+
 						{{liveType?'松开发送':'按住说话'}}
 					</view>
 					<view class="broadcast_m_b" v-if="!liveType">按住说话,录入广播内容</view>
@@ -71,9 +71,9 @@
 				</view>
 			</view>
 		</view>
-		
+
 	</view>
-	
+
 </template>
 
 <script>
@@ -83,7 +83,7 @@
         data() {
             return {
 				form:{
-				
+
 				},
 				broadcastType:false,
 				//喇叭数据
@@ -100,7 +100,7 @@
 			this.getDeviceList()
         },
         onShow(){
-			
+
         },
 		methods:{
 			MonitorBtn(){
@@ -129,6 +129,16 @@
 			//点击选择喇叭
 			trumpetClick(index){
 				this.trumpetList[index].type = !this.trumpetList[index].type
+        let _this=this;
+        if(_this.trumpetList[index].type==true){
+          _this.trumpetList.forEach(function(item2) {
+            if(item2.deviceSn==_this.trumpetList[index].deviceSn){
+              item2.type=true
+            }else{
+              item2.type=false
+            }
+          })
+        }
 			},
 			//录制
 			recordButton(e){
@@ -213,7 +223,7 @@
 				let num = 0;
 				for(let i=0;i<self.trumpetList.length;i++){
 					if(self.trumpetList[i].type){
-			
+
 						num++
 					}
 				}
@@ -265,9 +275,9 @@
 					});
 				}
 			},
-			
+
 		}
-        
+
 	}
 </script>
 
@@ -309,7 +319,7 @@
 					line-height: 28rpx;
 				}
 			}
-			.alarm_t_b{ 
+			.alarm_t_b{
 				font-size: 28rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
@@ -368,7 +378,7 @@
 					}
 				}
 			}
-			
+
 		}
 		.alarm_b{
 			width: 650rpx;
@@ -388,14 +398,14 @@
 				height: 100rpx;
 				background: linear-gradient(-45deg, #FA9901, #F28E26);
 				border-radius: 50rpx 0px 0px 50rpx;
-				
+
 			}
 			.alarm_b_r{
 				width: 325rpx;
 				height: 100rpx;
 				background: linear-gradient(-35deg, #309CFF, #0183FA);
 				border-radius: 0px 50rpx 50rpx 0px;
-				
+
 			}
 		}
 		.shade-max-big-box{
@@ -461,7 +471,7 @@
 								margin :12rpx 20rpx 0 25rpx;
 							}
 						}
-		
+
 						.trumpet-color-a{
 							border:1px solid #0183FA;
 							color:#0183FA;
@@ -487,7 +497,7 @@
 								width: 142rpx;
 								height: 142rpx;
 								position :absolute;
-		
+
 							}
 							>label{
 								width :100%;
@@ -544,9 +554,9 @@
 					}
 				}
 			}
-				
+
 	}
-	
+
 	/deep/.input-value-border{
 		display :none !important;
 	}

+ 10 - 0
pages/emergencyEvacuationBig.vue

@@ -358,6 +358,16 @@
 			//点击选择喇叭
 			trumpetClick(index){
 				this.trumpetList[index].type = !this.trumpetList[index].type
+        let _this=this;
+        if(_this.trumpetList[index].type==true){
+          _this.trumpetList.forEach(function(item2) {
+            if(item2.deviceSn==_this.trumpetList[index].deviceSn){
+              item2.type=true
+            }else{
+              item2.type=false
+            }
+          })
+        }
 			},
 			//录制
 			recordButton(e){

+ 405 - 0
pages/fingerprint.vue

@@ -0,0 +1,405 @@
+<!-- 指纹 -->
+<template>
+	<view id="fingerprint">
+		<view class="fingerprint_one" v-if="pageType==1">
+			<view class="fingerprint_one_li" @click="goPage(item)" v-for="(item,index) in fingerprintList" :key="index">
+				<view class="fingerprint_one_li_l">{{item.name}}</view>
+				<view :class="item.isConfig?'colorB':'colorA'">{{item.isConfig?'已配置':'无'}}</view>
+				<img  class="fingerprint_one_li_r" src="@/images/icon_04.png">
+			</view>
+		</view>
+		<view class="tip_tow" v-if="pageType==2">
+			<view class="tip_tow_l">提醒</view>
+			<view class="tip_tow_l">请选中门禁点击【指纹采集】并在当前门禁上录入指纹</view>
+		</view>
+		<view class="fingerprint_tow" v-if="pageType==2">
+			<view class="input_tip">请选择可采集的指纹门禁:</view>
+			<input class="input_search"  type="text" v-model="dialogForm.searchValue" placeholder="请输入门禁名称" @blur="searchGuard()"/>
+			<view class="fingerprint_tow_border_li" v-for="(item2,index2) in yesUseList" @click="selectGuard(item2,index2)" :key="index2">
+				<view :class="item2.isCheck?'colorD':'colorC'">{{item2.subName +'+'+ item2.hardName}}</view>
+				<img  v-if="item2.isCheck" class="fingerprint_tow_border_li_r" src="@/images/Version2.2/icon_xzwt_xz.png">
+			</view>
+		</view>
+		<view v-if="pageType==1" class="tip_one">至少添加一个指纹才可以通过指纹开锁</view>
+		<view v-if="pageType==1" class="out-button" @click="fingerprintGtherSyncFun">确定</view>
+		<view v-if="pageType==2" class="out-button" @click="gather">指纹采集</view>
+		<!-- 指纹采集遮罩-->
+		  <view class="shade-outfire" v-if="dialogVisible">
+			<view class="null-box" @click="dialogClose()"></view>
+			<view class="shade-outfire-n">
+			  <view class="shade-outfire-n-t">门禁名称</view>
+			  <img  class="shade-outfire-n-t2" src="@/images/icon_zw_bk.png" />
+			  <img class="shade-outfire-n-m" src="@/images/icon_wd_zw2.png" />
+			  <view class="shade-outfire-n-b">指纹采集中...</view>
+			</view>
+		  </view>
+	</view>
+</template>
+
+<script>
+    import { config } from '@/api/request/config.js'
+    import {fingerprintQeryMySubList,fingerprintGther,fingerprintQueryList,fingerprintGtherSync} from '@/api/index.js'
+	export default {
+		
+		data() {
+			return {
+				//页面状态
+				pageType:1,
+				//签名
+				checked:true,
+				name:'',
+				dialogVisible:false,
+				dialogForm:{
+					searchValue:'',
+				},
+				fingerprintList:[
+					{
+						name:'第一个指纹',
+						num:1,
+						isConfig:false,
+					},
+					{
+						name:'第二个指纹',
+						num:2,
+						isConfig:false,
+					},
+					{
+						name:'第三个指纹',
+						num:3,
+						isConfig:false,
+					},
+					{
+						name:'第四个指纹',
+						num:4,
+						isConfig:false,
+					},
+					{
+						name:'第五个指纹',
+						num:5,
+						isConfig:false,
+					},
+				],
+				yesUseList:[],
+				fingerNum:null,//第几个指纹
+				
+				
+			}
+		},
+		onLoad() {
+			this.impowerUseList();
+			this.fingerprintClick();
+		},
+		onShow(){
+			
+		    
+		},
+		
+		methods: {
+			//指紋采集
+			gather(){
+				 this.dialogVisible=true;
+				 this.fingerprintGtherFun()
+			},
+		   dialogClose(){
+			   this.dialogVisible=false;
+		   },
+		   searchGuard(){
+			   this.impowerUseList();
+		   },
+		   selectGuard(d,index){
+			   let _this=this;
+			   //选中
+				d.isCheck=!d.isCheck
+				this.$set(this.yesUseList,index,d)
+			 //循环实现单选
+			  if(_this.yesUseList[index].isCheck==true){
+			    _this.yesUseList.forEach(function(item2) {
+			      if(item2.hardId==_this.yesUseList[index].hardId){
+			        item2.isCheck=true
+			      }else{
+			        item2.isCheck=false
+			      }
+			    })
+			  }
+			 
+			  
+			   console.log(this.yesUseList)
+		   },
+		   //查询用户指纹录取数据
+		   async fingerprintClick(){
+		   	let _this=this;
+		       const {data} = await fingerprintQueryList(uni.getStorageSync('userId'));
+				if(data.code == 200){
+					if(data.rows.length>0){
+						_this.fingerprintList.forEach(function(item){
+							data.rows.forEach(function(item2){
+								if(item.num==item2.fingerNum){
+									item.isConfig=true;
+								}
+							})
+						})
+					}
+				}
+		   },
+		   //指纹采集
+		   async fingerprintGtherFun(){
+		       let _this=this;
+			   let obj={}
+			   this.yesUseList.forEach(function(item){
+					  if(item.isCheck){
+						  obj.hardId=item.hardId
+						  obj.num=_this.fingerNum
+					  }
+			   })
+		       const {data} = await fingerprintGther(obj)
+				if(data.code == 200){
+					_this.dialogVisible=false;
+					_this.pageType=1;
+					_this.fingerprintClick();
+				}else if(data.code==500){
+					_this.dialogVisible=false;
+					uni.showToast({
+						mask:true,
+						icon:"none",
+						position:"center",
+						title: data.msg,
+						duration: 5000
+					});
+				}
+		   },
+		   //指纹同步
+		   async fingerprintGtherSyncFun(){
+		       let _this=this;
+		       const {data} = await fingerprintGtherSync(uni.getStorageSync('userId'))
+					if(data.code == 200){
+						uni.redirectTo({
+						    url: '/pages/mine',
+						});
+					}
+		   },
+			//查询当前用户已授权门禁列表
+			async impowerUseList(){
+				let _this=this;
+			    const {data} = await fingerprintQeryMySubList(_this.dialogForm)
+				if(data.code == 200){
+					_this.yesUseList=data.data;
+					_this.yesUseList.forEach(function(item){
+						item.isCheck=false;
+					})
+				}
+			},
+			//页面跳转
+            goPage(d){
+                this.pageType=2;
+				this.fingerNum=d.num;
+			},
+		
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#fingerprint{
+		height: 100%;
+		  width: 100%;
+		  display: flex;
+		  flex-direction: column;
+		  overflow-y: scroll;
+		.fingerprint_one{
+			width: 710rpx;
+			height: 507rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			margin: 20rpx;
+			.fingerprint_one_li{
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				height: 100rpx;
+				margin: 0 20rpx;
+				border-bottom: 1px solid #E0E0E0;
+				.fingerprint_one_li_l{
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					text-align: left;
+					flex: 1;
+					
+				}
+				.fingerprint_one_li_r{
+					width: 12rpx;
+					height: 24rpx;
+				}
+				.colorA{
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+					text-align: right;
+					margin-right: 40rpx;
+					flex: 1;
+				}
+				.colorB{
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #0183FA;
+					text-align: right;
+					margin-right: 40rpx;
+					flex: 1;
+				}
+			}
+			.fingerprint_one_li:last-child{
+				border-bottom: none;
+			}
+		}
+		.tip_tow{
+			margin: 10rpx 0;
+			.tip_tow_l{
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #FF0000;
+				line-height: 36rpx;
+				text-align: left;
+				margin-left: 36rpx;
+			}
+		}
+		.fingerprint_tow{
+			width: 710rpx;
+			background: #FFFFFF;
+			border-radius: 10px;
+			margin: 0 20rpx;
+			padding: 0 20rpx;
+			box-sizing: border-box;
+			overflow: hidden;	
+			.input_tip{
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+				line-height: 30rpx;
+				margin: 34rpx 0;
+			}
+			.input_search{
+				width: 670rpx;
+				height: 80rpx;
+				background: #FFFFFF;
+				border: 1px solid #E0E0E0;
+				border-radius: 10rpx;
+				padding-left: 20rpx;
+				box-sizing: border-box;
+				margin-bottom: 32rpx;
+			}
+			.fingerprint_tow_border_li{
+				height: 100rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				margin: 0 20rpx;
+				border-bottom: 1px solid #E0E0E0;
+				.fingerprint_tow_border_li_l{}
+				.fingerprint_tow_border_li_r{
+					width: 30rpx;
+					height: 20rpx;
+				}
+				.colorC{
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+				} 
+				.colorD{
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #0183FA;
+				}
+			}
+			.fingerprint_tow_border_li:last-child{
+				border-bottom: none;
+			}
+		}
+		.tip_one{
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #FF0000;
+			line-height: 30rpx;
+			margin-top: 36rpx;
+			text-align: center;
+		}
+		.out-button{
+			position absolute
+			bottom:140rpx;
+			left:25rpx;
+			width:700rpx;
+			height:100rpx;
+			line-height:100rpx;
+			border-radius:10rpx;
+			text-align center
+			background #0183FA;
+			color:#FFFFFF;
+			font-size: 30rpx;
+			margin:0 auto;
+		}
+	    /* 指纹采集 */
+	    .shade-outfire {
+	      height: 100%;
+	      width: 100%;
+	      position: fixed;
+	      display: flex;
+	      flex-direction: column;
+	      z-index: 10;
+	      background: rgba(0, 0, 0, 0.2);
+	      .null-box {
+	        flex: 1;
+	      }
+	      .shade-outfire-n {
+	        width: 625rpx;
+	        height: 550rpx;
+	        background: #FFFFFF;
+	        border-radius: 20rpx;
+	        position: absolute;
+	        top: 370rpx;
+	        left: 62rpx;
+	
+	        .shade-outfire-n-t {
+				 font-size: 30rpx;
+				 font-family: PingFang SC;
+				 font-weight: 500;
+				 color: #333333;
+				 text-align: center;
+				 margin-top: 32rpx;
+	        }
+			.shade-outfire-n-t2 {
+			  width: 182rpx;
+			  height: 202rpx;
+			  position: absolute;
+			  left: 222rpx;
+			  top: 106rpx;
+			}
+	
+	        .shade-outfire-n-m {
+	          width: 84rpx;
+	          height: 108rpx;
+	          position: absolute;
+	          left: 266rpx;
+	          top: 150rpx;
+	        }
+	
+	        .shade-outfire-n-b {
+				width: 100%;
+	         font-size: 30rpx;
+	         font-family: PingFang SC;
+	         font-weight: 500;
+	         color: #0183FA;
+			 text-align: center;
+			 position: absolute;
+			 top: 358rpx;
+	        }
+	      }
+	    }
+	  }
+</style>

+ 28 - 2
pages/mine.vue

@@ -88,6 +88,12 @@
 					<view class="view-three-type" :class="!isUpload?'colorA':'marginType'">{{!isUpload?'未上传':'已上传'}}</view>
 					<img class="right-img" src="@/images/icon_04.png">
 				</view>
+				<view class="button-max-box" @click="fingerprintClick()">
+					<img class="left-img" src="@/images/icon_wd_zw.png">
+					<view>指纹</view>
+					<view class="view-three-type" :class="Quantity>0?'marginType':'colorA'">{{Quantity>0?'已配置'+Quantity+'个':''}}</view>
+					<img class="right-img" src="@/images/icon_04.png">
+				</view>
 				<view class="button-max-box" @click="goPage('upStudentCard')" v-if="userType==2&&certification.auditStatus">
 					<img class="left-img" src="@/images/icon_03.png">
 					<view>学生卡绑定</view>
@@ -105,7 +111,7 @@
 
 <script>
     import { config } from '@/api/request/config.js'
-    import { logout,studentinfoFacemy,simpleInfo,getSafeWarnList,getMyPointsLogInfo,querySignature} from '@/api/index.js'
+    import { logout,studentinfoFacemy,simpleInfo,getSafeWarnList,getMyPointsLogInfo,querySignature,fingerprintQuantity,fingerprintQueryList} from '@/api/index.js'
 	import { tabBar } from '@/component/tabBar.vue'
 	export default {
 		components: {
@@ -138,6 +144,7 @@
 				ifFaceFeature:"",
 				//签名
 				isUpload:"",
+				Quantity:0,//指纹录取数量
 				
 			}
 		},
@@ -145,12 +152,12 @@
          
 		},
 		onShow(){
-			
 		    if(uni.getStorageSync('token')&&uni.getStorageSync('userId')&&uni.getStorageSync('userType')){
                 this.userType = uni.getStorageSync('userType')
 				this.studentinfoFacemy();
                 this.simpleInfo();
 				this.querySignature();
+				this.fingerprintQuantityFun();
 			}else{
                 uni.removeStorageSync('token');
                 uni.removeStorageSync('userId');
@@ -204,6 +211,25 @@
 				}
             },
 			
+			//查询用户指纹录取数量
+			async fingerprintQuantityFun(){
+				let _this=this;
+			    const {data} = await fingerprintQuantity(uni.getStorageSync('userId'));
+				if(data.code == 200){
+					_this.Quantity=data.data;
+				
+				}
+			},
+			//查询用户指纹录取数据
+			async fingerprintClick(){
+				let _this=this;
+			    const {data} = await fingerprintQueryList(uni.getStorageSync('userId'));
+				if(data.code == 200){
+					uni.navigateTo({
+						url: '/pages/fingerprint',//指纹信息
+					});
+				}
+			},
 			
 			//查询用户电子签名
 			async querySignature(){

+ 10 - 0
pages_manage/workbench/laboratory/monitor.vue

@@ -155,6 +155,16 @@ export default {
     //点击选择喇叭
     trumpetClick(index){
       this.trumpetList[index].type = !this.trumpetList[index].type
+      let _this=this;
+      if(_this.trumpetList[index].type==true){
+        _this.trumpetList.forEach(function(item2) {
+          if(item2.deviceSn==_this.trumpetList[index].deviceSn){
+            item2.type=true
+          }else{
+            item2.type=false
+          }
+        })
+      }
     },
     //录制
     recordButton(e){