dedsudiyu 1 месяц назад
Родитель
Сommit
282173a079

+ 2 - 2
api/request/config.js

@@ -2,7 +2,7 @@ const config = {
 	/************************************ 后台服务地址 ************************************/
 	
 	// base_url: 'http://192.168.1.43/api', //43服务器
-	// base_url: 'http://192.168.1.8/api',//1.8服务器
+	base_url: 'http://192.168.1.8/api',//1.8服务器
 	// base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
@@ -22,7 +22,7 @@ const config = {
 	// base_url: 'https://lab.zjznai.com/api/', //暨大化材
 	// base_url: 'https://lab.zjznai.com/kdwclabSystem/', //矿大文昌地址
     //base_url: 'https://znyj.zjznai.suda.edu.cn/labSystem/', //苏大临时地址
-	base_url: 'https://labcontrol.nwafu.edu.cn/api/', //西北农林
+	// base_url: 'https://labcontrol.nwafu.edu.cn/api/', //西北农林
 	// base_url: 'http://172.16.0.65/api/', //西北农林
 	//base_url: 'https://lab.zjznai.com/labapp/', //43测试
 	// base_url: 'https://metersphere.zjznai.com/labSystem/', //中国海关

+ 12 - 0
pages.json

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

+ 52 - 1
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')">
@@ -216,6 +225,11 @@
 					uni.navigateTo({
 						url: "/pages_manage/views/accessControl/remoteOpen",
 					});
+				} else if (type == 'leaveCheckPupilTeacher') {
+					//离开检查
+					uni.navigateTo({
+						url: "/pages_basics/views/photoInspection",
+					});
 				} else if (type == 'chemicalsManagement') {
 					//化学品管控
 
@@ -392,10 +406,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 {

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

@@ -0,0 +1,451 @@
+<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="data1" 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.data1}}</view>
+						<view class="for-button-box">
+							<view class="for-button-null-p"></view>
+							<view class="for-button-p" v-if="!item.data3" @click="delButton(item)">删除</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.data3" class="position-top-right" :src="imagesUrl('commonality/img_sqjl_yk@1x.png')">
+					<img v-if="!item.data3" 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.data4}}</view>
+						</view>
+						<view class="for-user-right-box">
+							<img :src="imagesUrl('commonality/icon_sqjl_sqr@1x.png')">
+							<view>授权人:</view>
+							<view>{{item.data5}}</view>
+						</view>
+					</view>
+					<view class="for-time-box">
+						<img :src="imagesUrl('commonality/icon_aqbj_sj.png')">
+						<view>开门时间:</view>
+						<view><span style="margin-right:30rpx;">{{item.data6}}</span><span>{{item.data7}}</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>
+	export default {
+		data() {
+			return {
+				data1: '',
+				subId: '',
+				subName: '',
+				typeList: [{
+						typeId: '1',
+						typeName: '已开'
+					},
+					{
+						typeId: '0',
+						typeName: '未开'
+					},
+				],
+				typeListIndex: "",
+				typeId: '',
+				validBeginTime: '', //申请期限开始
+				currentDate: '', //当前日期
+				getDataType: false,
+				getData: {
+					page: 1,
+					pageSize: 20,
+				},
+				dataList: [{
+						data1: '实验室名称',
+						data2: '209',
+						data3: true,
+						data4: '李呀呀同学',
+						data5: '张呀呀老师',
+						data6: '2025-10-10',
+						data7: '08:00 - 10:00',
+					},
+					{
+						data1: '实验室名称',
+						data2: '209',
+						data3: false,
+						data4: '李呀呀同学',
+						data5: '张呀呀老师',
+						data6: '2025-10-10',
+						data7: '08:00 - 10:00',
+					}, {
+						data1: '实验室名称实验室名称实验室名称实验室名称实验室名称实验室名称',
+						data2: '209',
+						data3: true,
+						data4: '李呀呀同学',
+						data5: '张呀呀老师',
+						data6: '2025-10-10',
+						data7: '08:00 - 10:00',
+					},
+					{
+						data1: '实验室名称实验室名称实验室名称实验室名称实验室名称',
+						data2: '209',
+						data3: false,
+						data4: '李呀呀同学',
+						data5: '张呀呀老师',
+						data6: '2025-10-10',
+						data7: '08:00 - 10:00',
+					},
+				],
+				total: 0,
+			}
+		},
+		onLoad(option) {
+			if (option.item) {
+				//选中实验室返回
+				let subData = JSON.parse(decodeURIComponent(option.item));
+				this.$set(this, 'subId', subData.subId);
+				this.$set(this, 'subName', subData.subName);
+			}
+		},
+		onShow() {
+
+		},
+		mounted() {
+
+		},
+		methods: {
+			//删除按钮
+			delButton(item){
+				let self = this;
+				uni.showModal({
+					content: '是否确认删除?',
+					cancelColor: "#999",
+					confirmColor: "#0183FA",
+					success: function(res) {
+						if (res.confirm) {
+							
+						} else if (res.cancel) {}
+					}
+				});
+			}, 
+			//滚动加载事件
+			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))
+				const {
+					data
+				} = await systemSubjectGetAppSubject(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);
+						}
+					}
+				}
+			},
+			// 打开实验室查询
+			checkSubButton() {
+				uni.navigateTo({
+					url: '/pages_manage/views/accessControl/searchSub'
+				});
+			},
+			// 搜索按钮
+			searchButton() {
+
+			},
+			//状态选择
+			buttonChange(e) {
+				this.typeListIndex = e.mp.detail.value;
+				this.typeId = this.typeList[this.typeListIndex].typeId;
+				this.laboratoryAppletOutCheckList()
+			},
+			//时间选择触发-开始
+			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>

+ 21 - 1
pages_manage/views/accessControl/remoteOpen.vue

@@ -22,6 +22,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">
@@ -85,6 +86,12 @@
 			this.systemSubjectGetAppSubject();
 		},
 		methods: {
+			//跳转授权记录
+			goPage(){
+				uni.navigateTo({
+					url: '/pages_manage/views/accessControl/authorizationRecord'
+				});
+			},
 			openButton(row) {
 				let self = this;
 				uni.showModal({
@@ -281,13 +288,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="data1" 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.room?'('+item.room+')':''}}</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>
+	export default {
+		data() {
+			return {
+				data1:'',
+				getDataType: false,
+				getData: {
+					page: 1,
+					pageSize: 20,
+				},
+				dataList: [
+					{subName:'实验室测试',room:'102',subId:'1'},
+					{subName:'实验室测试实验室测试实验室测试',room:'102',subId:'12'},
+					{subName:'实验室测试实验室测试实验室测试实验室测试实验室测试实验室测试',room:'102',subId:'13'},
+				],
+				total: 0,
+			}
+		},
+		onLoad(option) {
+			// if(option.subName){
+			// 	//有查询过
+			// 	this.$set(this,'data1',option.subName);
+			// 	this.scrollGet();
+			// }else{
+			// 	//无查询过
+			// 	this.scrollGet();
+			// }
+		},
+		onShow() {
+
+		},
+		mounted() {
+
+		},
+		methods: {
+			//选择实验室
+			checkSub(item){
+				uni.redirectTo({
+					url: '/pages_manage/views/accessControl/authorizationRecord?item=' + encodeURIComponent(JSON.stringify(item))
+				});
+			},
+			//滚动加载事件
+			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))
+				const {
+					data
+				} = await systemSubjectGetAppSubject(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() {
+
+			},
+		},
+	}
+</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>