heyang 2 년 전
부모
커밋
c05bc34baa
6개의 변경된 파일474개의 추가작업 그리고 5개의 파일을 삭제
  1. 39 0
      api/index.js
  2. 4 4
      api/request/config.js
  3. BIN
      images/icon_wd_zw.png
  4. BIN
      images/icon_zw_bk.png
  5. 405 0
      pages/fingerprint.vue
  6. 26 1
      pages/mine.vue

+ 39 - 0
api/index.js

@@ -20,6 +20,45 @@ 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({

+ 4 - 4
api/request/config.js

@@ -1,17 +1,17 @@
 const config = {
-	base_url: 'http://192.168.1.9:8080',//柴
+	//base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	// base_url: 'http://192.168.1.17:8080',//小飞
 	// base_url: 'http://192.168.1.20:8080',//志伟
     // base_url: 'http://192.168.1.8:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
-    // base_url: 'http://192.168.1.43:9800',//43服务器
+     //base_url: 'http://192.168.1.43:9800',//43服务器
 	// base_url: 'https://demo.sxitdlc.com/xzgd/',
 
 	// base_url: 'https://lab.sxitdlc.com/labNhSystem/',//43服务器高升测试
-	// base_url: 'https://lab.sxitdlc.com/labAppTest',//43服务器线上
+	 //base_url: 'https://lab.sxitdlc.com/labAppTest',//43服务器线上
     // base_url: 'https://lab.sxitdlc.com/appTest/',//88服务器线上
-	// base_url: 'https://lab.sxitdlc.com/labSystem/', //矿大地址
+	 base_url: 'https://lab.sxitdlc.com/labSystem/', //矿大地址
 	// base_url: 'https://lab.sxitdlc.com/jdlabSystem/', //交大地址
     // base_url: 'https://lab.sxitdlc.com/jndxlabSystem/', //暨大地址
     //  base_url: 'https://lab.sxitdlc.com/kdwclabSystem/', //矿大文昌地址

BIN
images/icon_wd_zw.png


BIN
images/icon_zw_bk.png


+ 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>

+ 26 - 1
pages/mine.vue

@@ -96,6 +96,12 @@
 					</view>
 					<img class="right-img" v-if="certification.auditStatus.code == 2 || certification.auditStatus.code == 3" 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>
 		</view>
 		<view class="out-button" @click="clickOut">退出登录</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,//指纹录取数量
 
 			}
 		},
@@ -204,7 +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(){
 				let _this=this;