dedsudiyu 6 ヶ月 前
コミット
559aed4c25

+ 2 - 2
api/request/config.js

@@ -1,7 +1,7 @@
 const config = {
-	// base_url: 'http://192.168.1.43/api', //43服务器
+	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.9:8080',//柴
+	 //base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	//base_url: 'http://192.168.1.17:8080',//小飞

+ 1 - 0
pages/views/dataBoard/dataBoard.vue

@@ -104,6 +104,7 @@
 				total: 0,
 				tabTextTow: ['实验室','危险源','危化品','安全隐患','预警处置','设备管控','大仪预约','笼位预约','资源预约'],
 				curTabTow: 0,
+				getDataType: false,
 			}
 		},
 		created() {

+ 0 - 1
pages/views/saoCode/saoCode.vue

@@ -33,7 +33,6 @@
 				list.forEach((item) => {
 					codeData[item.split("=")[0]] = item.split("=")[1];
 				})
-				console.log(codeData)
 				if (!uni.getStorageSync('token')) {
 					uni.setStorageSync('codeData', codeData);
 					uni.reLaunch({

+ 2 - 1
pages/views/teacherPage/laboratoryList.vue

@@ -293,7 +293,8 @@
 				});
 				if (data.code == 200) {
 					uni.navigateTo({
-						url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))
+						url: '/pages_manage/views/laboratory/safetyCardScan?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
+						// url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))
 					});
 				}
 			},

+ 26 - 19
pages_manage/views/laboratory/accessRecord.vue

@@ -7,28 +7,30 @@
 				<view>{{item.name}}</view>
 			</view>
 		</view>
-		<view class="list" v-for="(item,index) in dataList" :key="index">
-			<view class="list-t">{{item.showInTime}}</view>
-			<view class="list-b" v-for="(item2,index2) in item.list" :key="index2">
-				<view class="list-b-t">
-					<img v-if="item2.avatar" :src="baseUrl+item2.avatar">
-					<img v-else src="@/pages_basics/images/icon_01.png">
-					<view>{{item2.userName}}</view>
-					<view>{{item2.phone}}</view>
-					<view
-						:class="item2.accessStatus==1?'color-A':(item2.accessStatus==2?'color-B':(item2.accessStatus==3?'color-C':''))">
-						{{item2.accessStatusStr}}
+		<scroll-view scroll-x @scrolltolower="scrollGet" style="padding-bottom:20rpx;">
+			<view class="list" v-for="(item,index) in dataList" :key="index">
+				<view class="list-t">{{item.showInTime}}</view>
+				<view class="list-b" v-for="(item2,index2) in item.list" :key="index2">
+					<view class="list-b-t">
+						<img v-if="item2.avatar" :src="baseUrl+item2.avatar">
+						<img v-else src="@/pages_basics/images/icon_01.png">
+						<view>{{item2.userName}}</view>
+						<view>{{item2.phone}}</view>
+						<view
+							:class="item2.accessStatus==1?'color-A':(item2.accessStatus==2?'color-B':(item2.accessStatus==3?'color-C':''))">
+							{{item2.accessStatusStr}}
+						</view>
+					</view>
+					<img class="list-b-img" src="@/pages_manage/images/for_min_bg.png">
+					<view class="list-b-b">
+						<view>签到时间:{{item2.inTime?item2.inTime:'-'}}</view>
+						<view>离开时间:{{item2.outTime?item2.outTime:'-'}}</view>
+						<view>停留时间:{{item2.hoursMinutes?item2.hoursMinutes:'-'}}</view>
 					</view>
-				</view>
-				<img class="list-b-img" src="@/pages_manage/images/for_min_bg.png">
-				<view class="list-b-b">
-					<view>签到时间:{{item2.inTime?item2.inTime:'-'}}</view>
-					<view>离开时间:{{item2.outTime?item2.outTime:'-'}}</view>
-					<view>停留时间:{{item2.hoursMinutes?item2.hoursMinutes:'-'}}</view>
-				</view>
 
+				</view>
 			</view>
-		</view>
+		</scroll-view>
 		<view v-if="!dataList[0]" style="text-align: center;line-height:300rpx;color:#999;">暂无数据</view>
 	</view>
 </template>
@@ -73,6 +75,7 @@
 					subId: '',
 				},
 				total: 0,
+				getDataType: false,
 			}
 		},
 		created() {
@@ -155,6 +158,10 @@
 
 <style lang="stylus" scoped>
 	.accessRecord {
+		flex:1;
+		display: flex;
+		flex-direction: column;
+		overflow: hidden;
 		width: 750rpx;
 
 		.title {

+ 4 - 1
pages_manage/views/laboratory/iotControl.vue

@@ -225,6 +225,7 @@
 					subjectId: this.subId
 				});
 				if (data.code == 200) {
+					let VOList = [];
 					data.data.forEach((item) => {
 						if (item.hardwareTypeKey == 'airConditioner') {
 							if (item.reservedThree == 0) {
@@ -242,9 +243,11 @@
 								item.functionType = '';
 								item.orderType = '';
 							}
+						}else{
+							VOList.push(item)
 						}
 					})
-					this.$set(this, 'labHardwareVOList', data.data);
+					this.$set(this, 'labHardwareVOList', VOList);
 					let list = [{
 							type: 'video',
 							hardwareName: '视频监控',

+ 2 - 1
pages_manage/views/laboratory/meLaboratory.vue

@@ -240,7 +240,8 @@
 				});
 				if (data.code == 200) {
 					uni.navigateTo({
-						url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))
+						// url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))
+						url: '/pages_manage/views/laboratory/safetyCardScan?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
 					});
 				}
 			},

+ 71 - 48
pages_manage/views/laboratory/safetyCardScan.vue

@@ -82,16 +82,18 @@
 				</view>
 			</view>
 		</view>
-		<view class="position-button-box">
-			<view class="position-button-p-null"></view>
+		<view class="position-button-box" v-if="pageType == 0">
 			<view class="position-button-p-1" @click="goPage('securityCheck')">安全检查</view>
-			<view class="position-button-p-4" @click="goPage('snapshot')">随手拍</view>
-			<view class="position-button-p-null"></view>
+			<view class="position-button-p-2" @click="goPage('snapshot')">随手拍</view>
 		</view>
 		<!-- 物联控制 -->
 		<iotControl ref="iotControl" v-if="pageType == 1" :subjectData="subjectData"></iotControl>
 		<!-- 进出记录 -->
 		<accessRecord v-if="pageType == 2" :subjectData="subjectData"></accessRecord>
+		<!-- 语音广播弹窗 -->
+		<voiceBroadcast v-if="broadcastPage" :subjectData="subjectData"></voiceBroadcast>
+		<!-- 空调弹窗 -->
+		<airConditioning v-if="conditioningPage" :airConditioningData="airConditioningData"></airConditioning>
 	</view>
 
 </template>
@@ -106,6 +108,12 @@
 	import {
 		accessRecord
 	} from '@/pages_manage/views/laboratory/accessRecord.vue'
+	import {
+		voiceBroadcast
+	} from '@/pages_manage/views/laboratory/voiceBroadcast.vue'
+	import {
+		airConditioning
+	} from '@/pages_manage/views/laboratory/airConditioning.vue'
 	import {
 		config
 	} from '@/api/request/config.js'
@@ -117,6 +125,8 @@
 		components: {
 			iotControl,
 			accessRecord,
+			voiceBroadcast,
+			airConditioning,
 		},
 		data() {
 			return {
@@ -144,6 +154,13 @@
 				},
 				subjectData: null,
 				identityData: uni.getStorageSync('identityData'),
+				//语音广播弹窗
+				broadcastPage: false,
+				//空调弹窗
+				conditioningPage: false,
+				// 空调弹窗
+				airConditioningData: null,
+				saoCodeType:false,
 
 			}
 		},
@@ -177,6 +194,46 @@
 
 		},
 		methods: {
+			//拨打电话
+			callPhone(tel){
+				uni.makePhoneCall({
+					phoneNumber: tel
+				})
+			},
+			goVideoPage(){
+				console.log('视频')
+				let obj = {
+					type:4,
+					subId:this.newData.subId
+				}
+				uni.navigateTo({
+						url: '/pages_manage/views/laboratory/videoPlayer?item='+encodeURIComponent(JSON.stringify(obj))
+				});
+			},
+			getIotControlData(){
+				this.$refs['iotControl'].iotAppHardwareFindByType();
+			},
+			buttonClick(type, row) {
+				let self = this;
+				if (type == 'subDetail') {
+					//实验室详情
+				} else if (type == 'broadcastOpen') {
+					//语音弹窗开启
+					this.$set(this, 'broadcastPage', true);
+				} else if (type == 'broadcastClose') {
+					//语音弹窗关闭
+					this.$set(this, 'broadcastPage', false);
+				} else if (type == 'conditioningOpen') {
+					//空调弹窗开启
+					this.$set(this, 'airConditioningData', row);
+					this.$set(this, 'conditioningPage', true);
+				} else if (type == 'conditioningClose') {
+					//空调弹窗关闭
+					this.$set(this, 'conditioningPage', false);
+				} else if (type == 'back') {
+					this.$set(this, 'pageType', 2);
+				}
+			},
 			//展开/收起操作
 			unfoldPackUp(type, index) {
 				if (type == 'subAdminShowType') {
@@ -231,10 +288,7 @@
 
 <style lang="stylus" scoped>
 	.safetyCardScan {
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		overflow: hidden;
+		height:100%;
 
 		#fontColor-A {
 			color: #00DEDE;
@@ -249,6 +303,7 @@
 		}
 
 		.header {
+			height:192rpx;
 			width: 100%;
 			// position: fixed;
 			// top: 0rpx;
@@ -335,10 +390,7 @@
 
 		/* 安全信息牌 */
 		.safetyCard {
-			flex: 1;
-			overflow-y: scroll;
 			padding-bottom: 150rpx;
-
 			.lab-info {
 				background: #FFFFFF;
 
@@ -628,59 +680,30 @@
 		}
 
 		.position-button-box {
-			position: absolute;
+			position: fixed;
 			bottom: 25rpx;
-			left: 60rpx;
-			width: 640rpx;
+			left: 30rpx;
+			width: 690rpx;
 			height: 100rpx;
 			display: flex;
 			color: #fff;
 			overflow: hidden;
-
-			view:nth-child(2) {
-				border-top-left-radius: 10rpx;
-				border-bottom-left-radius: 10rpx;
-			}
-
-			view:nth-last-child(2) {
-				border-top-right-radius: 10rpx;
-				border-bottom-right-radius: 10rpx;
-			}
-
-			.position-button-p-null {
-				flex: 1;
-			}
+			border-radius: 50rpx;
 
 			.position-button-p-1 {
-				width: 160rpx;
+				width: 345rpx;
 				line-height: 100rpx;
 				font-size: 30rpx;
 				text-align: center;
-				background-color: #0183FA;
+				background-color: #FF8C00;
 			}
 
 			.position-button-p-2 {
-				width: 160rpx;
-				line-height: 100rpx;
-				font-size: 30rpx;
-				text-align: center;
-				background-color: #16B531;
-			}
-
-			.position-button-p-3 {
-				width: 160rpx;
+				width: 345rpx;
 				line-height: 100rpx;
 				font-size: 30rpx;
 				text-align: center;
-				background-color: #00DEDE;
-			}
-
-			.position-button-p-4 {
-				width: 160rpx;
-				line-height: 100rpx;
-				font-size: 30rpx;
-				text-align: center;
-				background-color: #FF8C00;
+				background-color: #0183FA;
 			}
 		}
 	}