dedsudiyu 1 miesiąc temu
rodzic
commit
d61c2c7272

+ 1 - 1
api/request/config.js

@@ -9,7 +9,7 @@ const config = {
 	// base_url: 'http://192.168.1.17:8080',//小飞
 	// base_url: 'http://192.168.1.43/api',//小飞
 	// base_url: 'http://192.168.1.20:8080',//志伟
-	// base_url: 'http://192.168.1.39:8080',//高升
+	base_url: 'http://192.168.1.39:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试

+ 12 - 0
pages.json

@@ -715,6 +715,18 @@
 						"navigationBarTitleText": "远程开门"
 					}
 				},
+				{
+					"path": "views/accessControl/authorizationRecord",
+					"style": {
+						"navigationBarTitleText": "授权记录"
+					}
+				},
+				{
+					"path": "views/accessControl/searchSub",
+					"style": {
+						"navigationBarTitleText": "实验室"
+					}
+				},
 				//应急处置-实验室列表
 				{
 					"path": "views/emergencyEvacuationSubList", //应急疏散

+ 10 - 1
pages/api/index.js

@@ -520,4 +520,13 @@ export const authGetAppletUser  = (data) => {
 				method: 'POST',
 				data: { ...data }
     })
-};
+};
+
+//查询是否是同位素实验并且有签退
+export const laboratorySubPassOutIsotopeSubSign  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subPassOut/isotopeSubSign`,
+        method: 'GET',
+        data: data,
+    })
+};

+ 7 - 1
pages/views/login/login.vue

@@ -1,5 +1,6 @@
 <template>
 	<view id="login">
+		<img class="logo-img" :src="imagesUrl('commonality/logo%401x.png')">
 		<view class="title-1">欢迎使用</view>
 		<view class="title-2">实验室安全智慧化管控系统</view>
 		<view class="null-p"></view>
@@ -51,6 +52,11 @@
 		display: flex;
 		flex-direction: column;
 		position: relative;
+		.logo-img{
+			width:370rpx;
+			height:68rpx;
+			margin:320rpx 190rpx 0;
+		}
 		.position-top-right-box{
 			position: absolute;
 			top:0;
@@ -77,7 +83,7 @@
 			height:55rpx;
 			text-align: center;
 			color:#333;
-			margin:200rpx 0 31rpx;
+			margin:90rpx 0 31rpx;
 		}
 		.title-2{
 			font-size:38rpx;

+ 31 - 3
pages/views/pupilPage/pupilHome.vue

@@ -67,6 +67,9 @@
 		pageRestrictVerify
 	} from '@/utils/index'
 	import {
+		laboratorySubPassOutIsotopeSubSign,
+	} from '@/pages/api/index.js'
+	import {
 		tabBar
 	} from '@/pages/component/tabBar.vue'
 	import {
@@ -162,17 +165,20 @@
 						if(res.result.indexOf('type') != -1){
 							//项目二维码
 							let list = res.result.split("?")[1].split("&");
+								console.log('list',list)
 							let codeData = {};
 							list.forEach((item) => {
 								codeData[item.split("=")[0]] = item.split("=")[1];
 							})
-							if (codeData.type == 1 || codeData.type == 2 || codeData.type == 3 || codeData.type ==
-								5 || codeData.type == 7 ||
+								console.log('codeData',codeData)
+							if (codeData.type == 1 || codeData.type == 2 || codeData.type == 3 || codeData.type == 7 ||
 								codeData.type == 8 || codeData.type == 9 || codeData.type == 10 ||
 								codeData.type == 11 || codeData.type == 12 || codeData.type == 13 || codeData.type == 14) {
-								uni.navigateTo({
+								uni.reLaunch({
 									url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(res.result)
 								});
+							}else if(codeData.type == 5){
+								self.laboratorySubPassOutIsotopeSubSign(codeData.subId,res.result);
 							}
 						}else{
 							//化学品信息
@@ -183,6 +189,28 @@
 					}
 				});
 			},
+			//分类下拉列表
+			async laboratorySubPassOutIsotopeSubSign(subId,result) {
+				const {
+					data
+				} = await laboratorySubPassOutIsotopeSubSign({subId:subId});
+				if (data.code == 200) {
+					if(data.data.isotope){
+						let obj = {
+							subId:subId,
+							subName:data.data.subName,
+						}
+						console.log('====',obj)
+						uni.navigateTo({
+							url: "/pages_basics/views/photoInspection?item=" + encodeURIComponent(JSON.stringify(obj)),
+						});
+					}else{
+						uni.reLaunch({
+							url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(result)
+						});
+					}
+				}
+			},
 		}
 	}
 </script>

+ 80 - 3
pages/views/teacherPage/teacherHome.vue

@@ -60,6 +60,15 @@
 					</view>
 				</view>
 			</view>
+			<view class="button-three-box-1">
+				<view class="button-big-box" @click="goPage('leaveCheckPupilTeacher')">
+					<img :src="imagesUrl('home/img_lkjc@1x.png')">
+					<view class="button-min-box">
+						<view>离开检查</view>
+						<view>拍照检查</view>
+					</view>
+				</view>
+			</view>
 			<view class="button-three-box">
 				<view class="button-big-box" @click="goPage()">
 					<img :src="imagesUrl('home/img_bg_hxpgk@1x.png')">
@@ -81,6 +90,9 @@
 		pageRestrictVerify
 	} from '@/utils/index'
 	import {
+		laboratorySubPassOutIsotopeSubSign,
+	} from '@/pages/api/index.js'
+	import {
 		tabBar
 	} from '@/pages/component/tabBar.vue'
 	import {
@@ -216,6 +228,11 @@
 					uni.navigateTo({
 						url: "/pages_manage/views/accessControl/remoteOpen",
 					});
+				} else if (type == 'leaveCheckPupilTeacher') {
+					//离开检查
+					uni.navigateTo({
+						url: "/pages_basics/views/photoInspection",
+					});
 				} else if (type == 'chemicalsManagement') {
 					//化学品管控
 
@@ -234,13 +251,14 @@
 							list.forEach((item) => {
 								codeData[item.split("=")[0]] = item.split("=")[1];
 							})
-							if (codeData.type == 1 || codeData.type == 2 || codeData.type == 3 || codeData.type ==
-								5 || codeData.type == 7 ||
+							if (codeData.type == 1 || codeData.type == 2 || codeData.type == 3 || codeData.type == 7 ||
 								codeData.type == 8 || codeData.type == 9 || codeData.type == 10 ||
 								codeData.type == 11 || codeData.type == 12 || codeData.type == 13 || codeData.type == 14) {
 								uni.reLaunch({
 									url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(res.result)
 								});
+							}else if(codeData.type == 5){
+								self.laboratorySubPassOutIsotopeSubSign(codeData.subId,res.result);
 							}
 						}else{
 							//化学品信息
@@ -251,6 +269,28 @@
 					}
 				});
 			},
+			//分类下拉列表
+			async laboratorySubPassOutIsotopeSubSign(subId,result) {
+				const {
+					data
+				} = await laboratorySubPassOutIsotopeSubSign({subId:subId});
+				if (data.code == 200) {
+					if(data.data.isotope){
+						let obj = {
+							subId:subId,
+							subName:data.data.subName,
+						}
+						console.log('====',obj)
+						uni.navigateTo({
+							url: "/pages_basics/views/photoInspection?item=" + encodeURIComponent(JSON.stringify(obj)),
+						});
+					}else{
+						uni.reLaunch({
+							url: '/pages/views/saoCode/saoCode?q=' + encodeURIComponent(result)
+						});
+					}
+				}
+			},
 		}
 	}
 </script>
@@ -392,10 +432,47 @@
 				}
 			}
 
+			.button-three-box-1 {
+				z-index: 5;
+				width: 690rpx;
+				height: 130rpx;
+				margin: 20rpx 30rpx 0;
+
+				.button-big-box {
+					border-radius: 20rpx;
+					background-color: #CDE7FF;
+					display: flex;
+
+					img {
+						display: block;
+						width: 134rpx;
+						height: 104rpx;
+						margin: 23rpx 34rpx 0 30rpx;
+					}
+
+					.button-min-box {
+						view:nth-child(1) {
+							line-height: 30rpx;
+							height: 30rpx;
+							font-size: 30rpx;
+							color: #0183FA;
+							margin: 27rpx 0 15rpx;
+						}
+
+						view:nth-child(2) {
+							line-height: 26rpx;
+							height: 26rpx;
+							font-size: 26rpx;
+							color: #666666;
+						}
+					}
+				}
+			}
+
 			.button-three-box {
 				z-index: 5;
 				width: 690rpx;
-				height: 150rpx;
+				height: 130rpx;
 				margin: 20rpx 30rpx 0;
 
 				.button-big-box {

+ 18 - 7
pages_basics/views/photoInspection.vue

@@ -66,16 +66,23 @@
 					fileType: 'png',
 					quality: 0.85,
 					minSize: 320
-				}
-
+				},
+				isotope:false,
 			}
 		},
 		onLoad(option) {
-			// this.newData = JSON.parse(decodeURIComponent(option.newData));
-			// console.log(this.newData)
+			if(option.item){
+				let obj = JSON.parse(decodeURIComponent(option.item))
+				this.$set(this,'isotope',true);
+				this.$set(this,'subList',[obj]);
+				this.$set(this,'subListIndex','0');
+				this.$set(this,'subId',obj.subId);
+				this.laboratoryAppletOutCheckList()
+			}else{
+				this.laboratoryAppletSignSubList();
+			}
 		},
 		onShow() {
-			this.laboratoryAppletSignSubList();
 		},
 		methods: {
 			buttonChange(e) {
@@ -103,7 +110,6 @@
 					if(data.data.list[0]){
 						this.outCheckData = data.data;
 					}else{
-
 						this.laboratoryAppletSignOutSubmit()
 					}
 				}
@@ -170,6 +176,7 @@
 				let self = this;
 				let obj = {
 					photoList: [],
+					isotope:this.isotope
 				}
 				for (let i = 0; i < self.outCheckData.list.length; i++) {
 					obj.photoList.push({
@@ -197,9 +204,13 @@
 			//直接离开
 			async laboratoryAppletSignOutSubmit() {
 				let self = this;
+				let obj = {
+					subId:this.subId,
+					isotope:this.isotope,
+				}
 				const {
 					data
-				} = await laboratoryAppletSignOutSubmit({subId:this.subId});
+				} = await laboratoryAppletSignOutSubmit(obj);
 				if (data.code == 200) {
 					uni.showToast({
 						title: '签退成功!',

+ 1 - 0
pages_basics/views/record/index.vue

@@ -29,6 +29,7 @@
 						</view>
 						<view class="position-right"></view>
 					</view>
+					<view class="titme-bottom-p">{{minItem.subName}}{{minItem.roomNum?'('+minItem.roomNum+')':''}}</view>
 					<view class="titme-bottom-p">签到时间:{{minItem.inTime?minItem.inTime:'-'}}</view>
 					<view class="titme-bottom-p">离开时间:{{minItem.outTime?minItem.outTime:'-'}}</view>
 					<view class="titme-bottom-p">停留时间:{{minItem.hoursMinutes?minItem.hoursMinutes:'-'}}</view>

+ 1 - 0
pages_basics/views/record/infoPage.vue

@@ -13,6 +13,7 @@
 				</view>
 				<view class="position-right"></view>
 			</view>
+			<view class="titme-bottom-p">{{minItem.subName}}{{minItem.roomNum?'('+minItem.roomNum+')':''}}</view>
 			<view class="titme-bottom-p">签到时间:{{minItem.inTime?minItem.inTime:'-'}}</view>
 			<view class="titme-bottom-p">离开时间:{{minItem.outTime?minItem.outTime:'-'}}</view>
 			<view class="titme-bottom-p">停留时间:{{minItem.hoursMinutes?minItem.hoursMinutes:'-'}}</view>

+ 44 - 0
pages_manage/api/index.js

@@ -267,5 +267,49 @@ export function applyRemoteOpenLockConfirm(data) {
 		data: data
 	})
 }
+//授权记录
+export function laboratoryAppletLabLockApplyList(data) {
+	return apiResquest({
+		url: '/laboratory/applet/labLockApply/list',
+		method: 'post',
+		data: {
+			...data
+		}
+	})
+}
+
+//删除-授权记录
+export function laboratoryAppletLabLockApplyDelete(data) {
+	return apiResquest({
+		url: '/laboratory/applet/labLockApply/delete',
+		method: 'post',
+		data: {
+			...data
+		}
+	})
+}
+
+//查询-负责人/安全员 所属的实验室列表
+export function systemSubjectGetAppSubjectByLogin(data) {
+	return apiResquest({
+		url: '/system/subject/getAppSubjectByLogin',
+		method: 'post',
+		data: {
+			...data
+		}
+	})
+}
+
+
+//远程开门-记录开门时间/开门状态
+export function laboratoryLabOpenLockLogUpdateLockData(data) {
+	return apiResquest({
+		url: '/laboratory/labOpenLockLog/updateLockData',
+		method: 'post',
+		data: {
+			...data
+		}
+	})
+}
 
 

+ 448 - 0
pages_manage/views/accessControl/authorizationRecord.vue

@@ -0,0 +1,448 @@
+<template>
+	<view id="authorizationRecord">
+		<view class="top-max-big-box">
+			<view class="search-box">
+				<img class="img-view" :src="imagesUrl('commonality/icon_aqjc_ss.png')">
+				<input type="text" v-model="searchValue" placeholder="姓名/学工号" maxlength="20">
+				<view class="button-view" @click="searchButton()">搜索</view>
+			</view>
+			<view class="check-button-max-box">
+				<view class="check-button-box" style="width:260rpx;">
+					<view class="picker-min-box" @click="checkSubButton()">
+						<view class="picker-name">{{subId?subName:'实验室'}}</view>
+						<img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
+					</view>
+				</view>
+				<view class="check-button-box" style="width:200rpx;">
+					<picker @change="buttonChange" :range-key="'typeName'" :value="typeId" :range="typeList">
+						<view class="picker-min-box">
+							<view class="picker-name">{{typeListIndex?typeList[typeListIndex].typeName:'开门状态'}}</view>
+							<img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
+						</view>
+					</picker>
+				</view>
+				<view class="check-button-box" style="width:230rpx;">
+					<picker mode="date" v-model="validBeginTime" :start="currentDate" fields="day" @change="beginDateChange">
+						<view class="picker-min-box">
+							<view class="picker-name">{{validBeginTime?validBeginTime:'开始时间'}}</view>
+							<img class="picker-img" :src="imagesUrl('commonality/icon_06.png')">
+						</view>
+					</picker>
+				</view>
+			</view>
+		</view>
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="list">
+			<view class="for-max-big-box" v-for="(item,index) in dataList" :key="index">
+				<view class="for-top-box">
+					<view class="for-title-box">
+						<view class="for-title">{{item.subjectName}}</view>
+						<view class="for-button-box">
+							<view class="for-button-null-p"></view>
+							<view class="for-button-p" v-if="item.openStatus == 0" @click="delButton(item,index)">删除</view>
+							<view class="for-button-null-p"></view>
+						</view>
+					</view>
+					<view class="for-border-box"></view>
+					<view class="position-left"></view>
+					<view class="position-right"></view>
+					<img v-if="item.openStatus == 1" class="position-top-right" :src="imagesUrl('commonality/img_sqjl_yk@1x.png')">
+					<img v-if="item.openStatus == 0" class="position-top-right" :src="imagesUrl('commonality/img_sqjl_wk@1x.png')">
+				</view>
+				<view class="for-bottom-box">
+					<view class="for-user-box">
+						<view class="for-user-left-box">
+							<img :src="imagesUrl('commonality/icon_sqjl_bsqr@1x.png')">
+							<view>被授权人:</view>
+							<view>{{item.userName}}</view>
+						</view>
+						<view class="for-user-right-box">
+							<img :src="imagesUrl('commonality/icon_sqjl_sqr@1x.png')">
+							<view>授权人:</view>
+							<view>{{item.createByName}}</view>
+						</view>
+					</view>
+					<view class="for-time-box">
+						<img :src="imagesUrl('commonality/icon_aqbj_sj.png')">
+						<view>开门时间:</view>
+						<view></view>
+					</view>
+					<view class="for-time-box" style="margin-top:20rpx;">
+						<img>
+						<view></view>
+						<view><span style="margin-right:30rpx;">{{item.validBeginTime}}</span>至 <span style="margin-left:30rpx;">{{item.validEndTime}}</span></view>
+					</view>
+				</view>
+			</view>
+			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
+			<view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		laboratoryAppletLabLockApplyList,
+		laboratoryAppletLabLockApplyDelete
+	} from '@/pages_manage/api/index.js'
+	import {
+		parseTime
+	} from '@/component/public.js'
+	export default {
+		data() {
+			return {
+				searchValue: '',
+				subId: '',
+				subName: '',
+				typeList: [{
+						typeId: '1',
+						typeName: '已开'
+					},
+					{
+						typeId: '0',
+						typeName: '未开'
+					},
+				],
+				typeListIndex: "",
+				typeId: '',
+				validBeginTime: '', //申请期限开始
+				currentDate: '', //当前日期
+				getDataType: false,
+				getData: {
+					page: 1,
+					pageSize: 10,
+				},
+				dataList: [],
+				total: 0,
+			}
+		},
+		onShow() {
+			if (uni.getStorageSync('searchSubData')) {
+				let subData = JSON.parse(uni.getStorageSync('searchSubData'));
+				uni.removeStorageSync('searchSubData');
+				this.$set(this, 'subId', subData.subId);
+				this.$set(this, 'subName', subData.subName);
+			}else{
+				this.searchButton();
+			}
+		},
+		methods: {
+			//删除按钮
+			delButton(item,index){
+				let self = this;
+				uni.showModal({
+					content: '是否确认删除?',
+					cancelColor: "#999",
+					confirmColor: "#0183FA",
+					success: function(res) {
+						if (res.confirm) {
+							self.laboratoryAppletLabLockApplyDelete(item.id,index);
+						} else if (res.cancel) {}
+					}
+				});
+			}, 
+			//删除 授权记录
+			async laboratoryAppletLabLockApplyDelete(id,index) {
+				let self = this;
+				const {
+					data
+				} = await laboratoryAppletLabLockApplyDelete({id:id});
+				if (data.code == 200) {
+					uni.showToast({
+						title: '操作成功',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					this.dataList.splice(index,1);
+				}
+			},
+			//滚动加载事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.getData.pageSize <= self.getData.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.getData.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//授权记录列表
+			async getList() {
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.getData))
+				obj.searchValue = this.searchValue;
+				obj.subjectId = this.subId;
+				obj.openStatus = this.typeId;
+				obj.validBeginTime = this.validBeginTime?this.validBeginTime+'T00:00:00':'';
+				const {
+					data
+				} = await laboratoryAppletLabLockApplyList(obj);
+				if (data.code == 200) {
+					for(let i=0;i<data.data.records.length;i++){
+						data.data.records[i].validBeginTime = parseTime(data.data.records[i].validBeginTime, "{y}-{m}-{d} {h}:{i}")
+						data.data.records[i].validEndTime = parseTime(data.data.records[i].validEndTime, "{y}-{m}-{d} {h}:{i}")
+					}
+					if (self.getData.page == 1) {
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.getData.pageSize <= self.getData.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					} else {
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.getData.pageSize <= self.getData.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
+			// 打开实验室查询
+			checkSubButton() {
+				uni.navigateTo({
+					url: '/pages_manage/views/accessControl/searchSub'
+				});
+			},
+			// 搜索按钮
+			searchButton() {
+				this.$set(this.getData,'page',1);
+				this.getList();
+			},
+			//状态选择
+			buttonChange(e) {
+				this.typeListIndex = e.mp.detail.value;
+				this.typeId = this.typeList[this.typeListIndex].typeId;
+			},
+			//时间选择触发-开始
+			beginDateChange(data) {
+				this.validBeginTime = data.detail.value;
+			},
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#authorizationRecord {
+		height: 100%;
+		display flex;
+		flex-direction column;
+
+		.top-max-big-box {
+			width: 750rpx;
+			height: 180rpx;
+			background: #FFFFFF;
+			padding: 20rpx 30rpx;
+			box-sizing: border-box;
+
+			.search-box {
+				width: 690rpx;
+				height: 78rpx;
+				border: 1rpx solid #E0E0E0;
+				border-radius: 50rpx;
+				display: flex;
+
+				.img-view {
+					display: inline-block;
+					margin: 27rpx 17rpx 0 37rpx;
+					width: 26rpx;
+					height: 26rpx;
+				}
+
+				input {
+					height: 78rpx;
+					line-height: 78rpx;
+					flex: 1;
+					font-size: 24rpx;
+				}
+
+				.button-view {
+					width: 100rpx;
+					line-height: 78rpx;
+					text-align: center;
+					font-size: 24rpx;
+					color: #0183FA;
+				}
+			}
+		}
+
+		.check-button-max-box {
+			display: flex;
+
+			.check-button-box {
+				.picker-min-box {
+					display: flex;
+
+					.picker-name {
+						line-height: 80rpx;
+						flex: 1;
+						text-align: right;
+						display: block;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+						font-size:28rpx;
+					}
+
+					.picker-img {
+						margin: 34rpx 0 0 20rpx;
+						width: 24rpx;
+						height: 12rpx;
+					}
+				}
+			}
+		}
+
+		.list {
+			flex: 1;
+			overflow-y scroll;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+
+			.for-max-big-box {
+				background-color: #fff;
+				border-radius: 20rpx;
+				overflow: hidden;
+				margin-top: 20rpx;
+
+				.for-top-box {
+					position: relative;
+
+					.for-title-box {
+						display: flex;
+
+						.for-title {
+							flex: 1;
+							line-height: 42rpx;
+							padding: 20rpx 37rpx;
+							font-size: 30rpx;
+						}
+
+						.for-button-box {
+							width: 100rpx;
+							display: flex;
+							flex-direction: column;
+							margin-right: 75rpx;
+
+							.for-button-null-p {
+								flex: 1;
+							}
+
+							.for-button-p {
+								width: 100rpx;
+								height: 50rpx;
+								line-height: 50rpx;
+								text-align: center;
+								font-size: 28rpx;
+								color: #fff;
+								background-color: #0183FA;
+								border-radius: 10rpx;
+							}
+						}
+					}
+
+					.for-border-box {
+						height: 37rpx;
+						margin: 0 40rpx;
+						border-top: 1rpx dashed #E0E0E0;
+					}
+
+					.position-left {
+						width: 50rpx;
+						height: 50rpx;
+						border-radius: 50%;
+						background-color: #E0E0E0;
+						position: absolute;
+						left: -25rpx;
+						bottom: 13rpx;
+					}
+
+					.position-right {
+						width: 50rpx;
+						height: 50rpx;
+						border-radius: 50%;
+						background-color: #E0E0E0;
+						position: absolute;
+						right: -25rpx;
+						bottom: 13rpx;
+					}
+
+					.position-top-right {
+						position: absolute;
+						top: 0;
+						right: 0;
+						width: 64rpx;
+						height: 57rpx;
+					}
+				}
+
+				.for-bottom-box {
+					font-size: 28rpx;
+					padding: 0 0 22rpx 40rpx;
+
+					.for-user-box {
+						display: flex;
+						margin-bottom: 35rpx;
+
+						.for-user-left-box {
+							display: flex;
+							flex: 1;
+
+							img {
+								width: 30rpx;
+								height: 30rpx;
+								margin-right:18rpx;
+							}
+
+							view {
+								height: 30rpx;
+								line-height: 30rpx;
+								font-size: 28rpx;
+							}
+						}
+
+						.for-user-right-box {
+							display: flex;
+							width:320rpx;
+							img {
+								width: 30rpx;
+								height: 30rpx;
+								margin-right:18rpx;
+							}
+
+							view {
+								height: 30rpx;
+								line-height: 30rpx;
+								font-size: 28rpx;
+							}
+						}
+					}
+
+					.for-time-box {
+						display: flex;
+
+						img {
+							width: 30rpx;
+							height: 30rpx;
+							margin-right:18rpx;
+						}
+
+						view {
+							height: 30rpx;
+							line-height: 30rpx;
+							font-size: 28rpx;
+						}
+					}
+				}
+			}
+
+			.get-data-null-p {
+				text-align: center;
+				line-height: 100rpx;
+				padding-bottom: 80px;
+				color: #999;
+			}
+		}
+	}
+</style>

+ 53 - 16
pages_manage/views/accessControl/remoteOpen.vue

@@ -7,12 +7,11 @@
 				<view class="header-r" v-if="getData.searchValue" @click="clearSearch()">
 					<img :src="imagesUrl('commonality/clear.png')">
 				</view>
-
 			</view>
 		</view>
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="list">
 			<view class="list-li" v-for="(item,index) in dataList">
-				<view class="list-li-l">{{item.subName}}{{item.roomNum}}</view>
+				<view class="list-li-l">{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</view>
 				<view class="list-li-r" @click="openButton(item)">
 					<view class="null-p"></view>
 					<view>开门</view>
@@ -22,6 +21,7 @@
 			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
 			<view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
 		</scroll-view>
+		<view class="position-button" @click="goPage()">授权记录</view>
 		<view class="success" v-if="successVisible">
 			<view class="null-box" @click="closeTip()"></view>
 			<view class="panel">
@@ -41,9 +41,10 @@
 		config
 	} from '@/api/request/config.js'
 	import {
-		systemSubjectGetAppSubject,
+		systemSubjectGetAppSubjectByLogin,
 		laboratoryApplyRemoteOpenLock,
-		applyRemoteOpenLockConfirm
+		applyRemoteOpenLockConfirm,
+		laboratoryLabOpenLockLogUpdateLockData
 	} from '@/pages_manage/api/index.js'
 	export default {
 		components: {
@@ -69,7 +70,7 @@
 					page: 1,
 					pageSize: 20,
 					searchValue: '',
-					adminId: uni.getStorageSync('userId'),
+					// adminId: uni.getStorageSync('userId'),
 				},
 				getDataType: false,
 				msgId:'',
@@ -82,9 +83,15 @@
 
 		},
 		mounted() {
-			this.systemSubjectGetAppSubject();
+			this.systemSubjectGetAppSubjectByLogin();
 		},
 		methods: {
+			//跳转授权记录
+			goPage(){
+				uni.navigateTo({
+					url: '/pages_manage/views/accessControl/authorizationRecord'
+				});
+			},
 			openButton(row) {
 				let self = this;
 				uni.showModal({
@@ -112,7 +119,7 @@
 						this.$set(this, 'msgId', data.data[0])
 						this.$set(this, 'authorizeStatus', 3)
 						this.$set(this, 'successVisible', true)
-						this.getMsg();
+						this.getMsg(row.subId);
 					}else{
 						this.$set(this, 'authorizeStatus', 2)
 						this.$set(this, 'successVisible', true)
@@ -120,7 +127,7 @@
 					}
 				}
 			},
-			async applyRemoteOpenLockConfirm() {
+			async applyRemoteOpenLockConfirm(subId) {
 				let self = this;
 				let obj = {
 					messageId: this.msgId,
@@ -132,15 +139,32 @@
 					if (data.data) {
 						this.$set(this, 'authorizeStatus', 1)
 						this.$set(this, 'successVisible', true)
+						this.laboratoryLabOpenLockLogUpdateLockData(subId,1);
 						this.getCode();
 					} else {
 						this.$set(this, 'authorizeStatus', 2)
 						this.$set(this, 'successVisible', true)
+						this.laboratoryLabOpenLockLogUpdateLockData(subId,0);
 						this.getCode();
 					}
 					this.$set(this, 'msgId','')
 				}
 			},
+			async laboratoryLabOpenLockLogUpdateLockData(subId,type) {
+				let self = this;
+				let obj = {
+					subjectId: subId,
+					userId: uni.getStorageSync('userId'),
+					openStatus:type
+				}
+				const {
+					data
+				} = await laboratoryLabOpenLockLogUpdateLockData(obj);
+				if(data.code == 200) {
+					
+				}
+			},
+			
 			//滚动加载事件
 			scrollGet() {
 				let self = this;
@@ -149,16 +173,16 @@
 				} else {
 					this.getData.page += 1;
 					this.$nextTick(() => {
-						this.systemSubjectGetAppSubject();
+						this.systemSubjectGetAppSubjectByLogin();
 					})
 				}
 			},
 			//获取实验室
-			async systemSubjectGetAppSubject() {
+			async systemSubjectGetAppSubjectByLogin() {
 				let self = this;
 				const {
 					data
-				} = await systemSubjectGetAppSubject(this.getData);
+				} = await systemSubjectGetAppSubjectByLogin(this.getData);
 				if (data.code == 200) {
 					if (self.getData.page == 1) {
 						this.dataList = data.data.records;
@@ -181,7 +205,7 @@
 				this.$set(this, 'dataList', []);
 				this.$set(this, 'total', 0);
 				this.$set(this.getData, 'page', 1);
-				this.systemSubjectGetAppSubject();
+				this.systemSubjectGetAppSubjectByLogin();
 			},
 			//实验室搜索框清除
 			clearSearch() {
@@ -190,10 +214,10 @@
 				this.$set(this, 'total', 0);
 				this.$set(this.getData, 'page', 1);
 				this.$set(this.getData, 'searchValue', '');
-				this.systemSubjectGetAppSubject();
+				this.systemSubjectGetAppSubjectByLogin();
 			},
 			//关闭弹框倒计时
-			getMsg() {
+			getMsg(subId) {
 				let self = this;
 				const TIME_COUNT = 5;
 				if (!self.timer) {
@@ -206,7 +230,7 @@
 							self.successVisible = false;
 							clearInterval(self.timer);
 							self.timer = null;
-							self.applyRemoteOpenLockConfirm();
+							self.applyRemoteOpenLockConfirm(subId);
 						}
 					}, 1000);
 				}
@@ -281,13 +305,26 @@
 			}
 
 		}
-
+		.position-button{
+			position: absolute;
+			bottom:50rpx;
+			left:75rpx;
+			width:600rpx;
+			height:100rpx;
+			line-height:100rpx;
+			text-align: center;
+			background-color: #0183FA;
+			font-size:28rpx;
+			color:#fff;
+			border-radius:20rpx;
+		}
 		.list {
 			flex: 1;
 			overflow-y scroll;
 			padding: 0 30rpx;
 			box-sizing: border-box;
 			background: #fff;
+			padding-bottom:160rpx;
 
 			.list-li {
 				// height: 90rpx;

+ 196 - 0
pages_manage/views/accessControl/searchSub.vue

@@ -0,0 +1,196 @@
+<template>
+	<view id="searchSub">
+		<view class="top-max-big-box">
+			<view class="search-box">
+				<img class="img-view" :src="imagesUrl('commonality/icon_aqjc_ss.png')">
+				<input type="text" v-model="searchValue" placeholder="实验室名称" maxlength="20">
+				<view class="button-view" @click="searchButton()">搜索</view>
+			</view>
+		</view>
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="list">
+			<view class="for-sub-box" v-for="(item,index) in dataList" :key="index">
+				<view class="for-text-box">{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</view>
+				<view class="for-right-button" @click="checkSub(item)">
+					<view></view>
+					<view>选择</view>
+					<view></view>
+				</view>
+			</view>
+			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
+			<view class="get-data-null-p" v-else="getDataType">- 滑动加载更多 -</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		systemSubjectGetAppSubjectByLogin
+	} from '@/pages_manage/api/index.js'
+	export default {
+		data() {
+			return {
+				searchValue:'',
+				getDataType: false,
+				getData: {
+					page: 1,
+					pageSize: 20,
+				},
+				dataList: [],
+				total: 0,
+			}
+		},
+		onLoad(option) {
+			// if(option.subName){
+			// 	//有查询过
+			// 	this.$set(this,'data1',option.subName);
+			// 	this.scrollGet();
+			// }else{
+			// 	//无查询过
+			// 	this.scrollGet();
+			// }
+		},
+		onShow() {
+
+		},
+		mounted() {
+			this.getList();
+		},
+		methods: {
+			//选择实验室
+			checkSub(item){
+				uni.setStorageSync('searchSubData', JSON.stringify(item));
+				uni.navigateBack();
+			},
+			//滚动加载事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.getData.pageSize <= self.getData.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.getData.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//获取实验室
+			async getList() {
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.getData))
+				obj.searchValue = this.searchValue
+				const {
+					data
+				} = await systemSubjectGetAppSubjectByLogin(obj);
+				if (data.code == 200) {
+					if (self.getData.page == 1) {
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.getData.pageSize <= self.getData.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					} else {
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.getData.pageSize <= self.getData.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
+
+			// 搜索按钮
+			searchButton() {
+				this.$set(this.getData,'page',1);
+				this.getList();
+			},
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#searchSub {
+		height: 100%;
+		display flex;
+		flex-direction column;
+
+		.top-max-big-box {
+			width: 750rpx;
+			height: 120rpx;
+			background: #FFFFFF;
+			padding: 20rpx 30rpx;
+			box-sizing: border-box;
+
+			.search-box {
+				width: 690rpx;
+				height: 78rpx;
+				border: 1rpx solid #E0E0E0;
+				border-radius: 50rpx;
+				display: flex;
+
+				.img-view {
+					display: inline-block;
+					margin: 27rpx 17rpx 0 37rpx;
+					width: 26rpx;
+					height: 26rpx;
+				}
+
+				input {
+					height: 78rpx;
+					line-height: 78rpx;
+					flex: 1;
+					font-size: 24rpx;
+				}
+
+				.button-view {
+					width: 100rpx;
+					line-height: 78rpx;
+					text-align: center;
+					font-size: 24rpx;
+					color: #0183FA;
+				}
+			}
+		}
+
+		.list {
+			flex: 1;
+			overflow-y scroll;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			padding-bottom: 160rpx;
+			margin-top:20rpx;
+			background-color: #fff;
+			.for-sub-box{
+				display: flex;
+				border-bottom: 1rpx dashed #E0E0E0;
+				.for-text-box{
+					flex:1;
+					line-height:42rpx;
+					padding:40rpx 0 40rpx 0;
+				}
+				.for-right-button{
+					width:100rpx;
+					display: flex;
+					flex-direction: column;
+					view:nth-child(1){
+						flex:1;
+					}
+					view:nth-child(2){
+						line-height:42rpx;
+						text-align: right;
+						color:#0183FA;
+						font-size:28rpx;
+					}
+					view:nth-child(3){
+						flex:1;
+					}
+				}
+			}
+			.get-data-null-p {
+				text-align: center;
+				line-height: 100rpx;
+				padding-bottom: 80px;
+				color: #999;
+			}
+		}
+	}
+</style>