|
@@ -0,0 +1,315 @@
|
|
|
+<!-- 指纹 -->
|
|
|
+<template>
|
|
|
+ <view id="fingerprint">
|
|
|
+ <view class="fingerprint_one" v-if="pageType==1">
|
|
|
+ <view class="fingerprint_one_li" @click="goPage('add')">
|
|
|
+ <view class="fingerprint_one_li_l">指纹</view>
|
|
|
+ <view :class="!checked?'colorA':'colorB'">{{!checked?'无':'已配置'}}</view>
|
|
|
+ <img class="fingerprint_one_li_r" src="@/images/icon_04.png">
|
|
|
+ </view>
|
|
|
+ <view class="fingerprint_one_li" @click="goPage('add')">
|
|
|
+ <view class="fingerprint_one_li_l">指纹</view>
|
|
|
+ <view :class="!checked?'colorA':'colorB'">{{!checked?'无':'已配置'}}</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="name" placeholder="请输入门禁名称" />
|
|
|
+ <view class="fingerprint_tow_border_li">
|
|
|
+ <view :class="checked?'colorC':'colorD'">实验室名称+门禁名称</view>
|
|
|
+ <img 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="clickOut">确定</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 { } from '@/api/index.js'
|
|
|
+ export default {
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ //页面状态
|
|
|
+ pageType:1,
|
|
|
+ //签名
|
|
|
+ checked:true,
|
|
|
+ name:'',
|
|
|
+ dialogVisible:false,
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+
|
|
|
+ },
|
|
|
+ onShow(){
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ methods: {
|
|
|
+ gather(){
|
|
|
+ this.dialogVisible=true;
|
|
|
+ },
|
|
|
+ dialogClose(){
|
|
|
+ this.dialogVisible=false;
|
|
|
+ },
|
|
|
+ //退出按钮
|
|
|
+ clickOut(){
|
|
|
+ let self = this;
|
|
|
+ uni.showModal({
|
|
|
+ // title: '确认要退出吗?',
|
|
|
+ content: '确认要退出吗',
|
|
|
+ cancelColor:"#999",
|
|
|
+ confirmColor:"#0183FA",
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ self.logout();
|
|
|
+ console.log('用户点击确定');
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //退出登录
|
|
|
+ async logout() {
|
|
|
+ let self = this;
|
|
|
+ const {data} = await logout();
|
|
|
+ if(data.code == 200){
|
|
|
+ uni.removeStorageSync('token');
|
|
|
+ uni.removeStorageSync('userId');
|
|
|
+ uni.removeStorageSync('userType');
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/login',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //页面跳转
|
|
|
+ goPage(type){
|
|
|
+ if(type == 'add'){//学生卡上传
|
|
|
+ this.pageType=2;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ }
|
|
|
+</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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .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>
|