dedsudiyu 1 月之前
父节点
当前提交
ba25b0f72b
共有 1 个文件被更改,包括 175 次插入11 次删除
  1. 175 11
      pages_manage/views/laboratory/safetyCardScan.vue

+ 175 - 11
pages_manage/views/laboratory/safetyCardScan.vue

@@ -96,8 +96,6 @@
 			<img class="position-button-p-2" @click="goPage('snapshot','')"
 				:src="imagesUrl('safetyCheck/icon_aqjc_suishoupai.png')">
 		</view>
-		<!-- 安全检查 -->
-		<scanCodeCheck v-if="securityCheck" :subjectData="subjectData"></scanCodeCheck>
 		<!-- 物联控制 -->
 		<iotControl ref="iotControl" v-if="pageType == 1" :subjectData="subjectData"></iotControl>
 		<!-- 进出记录 -->
@@ -106,6 +104,25 @@
 		<voiceBroadcast v-if="broadcastPage" :subjectData="subjectData"></voiceBroadcast>
 		<!-- 空调弹窗 -->
 		<airConditioning v-if="conditioningPage" :airConditioningData="airConditioningData"></airConditioning>
+		<view class="shade-box" v-if="securityCheck">
+			<view class="null-box" @click="goPage('securityCheck',false)"></view>
+			<view class="shade_n">
+				<view class="title">
+					<view>请选择实验室</view>
+				</view>
+				<view class="batch">
+					<view class="batch-li" @click="batchClickTow(item)" v-for="(item,index) in securityCheckList">
+						<view class="batch-li-l">
+							<text>{{item.planTitle}}-{{item.checkName}}</text>
+							<text>{{item.subName}}{{item.roomNum?'('+item.roomNum+')':''}}</text>
+						</view>
+						<view class="batch-li-r">
+							<img :src="imagesUrl('commonality/icon_wd_gd@1x.png')">
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 
 </template>
@@ -127,14 +144,15 @@
 		airConditioning
 	} from '@/pages_manage/views/laboratory/airConditioning.vue'
 	import {
-		scanCodeCheck
-	} from '@/pages_manage/views/laboratory/scanCodeCheck.vue'
-	import {
 		config
 	} from '@/api/request/config.js'
 	import {
 
 	} from '@/pages/api/index.js'
+	
+	import {
+		securityAppCheckPlanScanCode,
+	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "safetyCardScan",
 		components: {
@@ -142,7 +160,6 @@
 			accessRecord,
 			voiceBroadcast,
 			airConditioning,
-			scanCodeCheck,
 		},
 		data() {
 			return {
@@ -177,6 +194,7 @@
 				// 空调弹窗
 				airConditioningData: null,
 				securityCheck: false,
+				securityCheckList:[],
 				form: {},
 			}
 		},
@@ -293,11 +311,7 @@
 					});
 					return
 				} else if (type == 'securityCheck') {
-					if (status) {
-						this.$set(this, "securityCheck", true)
-					} else {
-						this.$set(this, "securityCheck", false)
-					}
+					this.securityAppCheckPlanScanCode(this.newData.subId,);
 				} else if (type == 'snapshot') {
 					console.log(111)
 					console.log(this.newData)
@@ -320,6 +334,61 @@
 					});
 				}
 			},
+			//查询计划
+			async securityAppCheckPlanScanCode(subId,planSetId) {
+				let self = this;
+				let checkCategory = null;
+				if(uni.getStorageSync('identityData')){
+					if(uni.getStorageSync('identityData').type=='collegeAdmin'){
+						checkCategory=2
+					}else if(uni.getStorageSync('identityData').type=='schoolAdmin'){
+						checkCategory=1
+					}
+				}
+				let obj = {
+					subId:subId,
+					checkCategory:checkCategory,
+				};
+				if(planSetId){
+					obj.planSetId = planSetId;
+				}
+				const {
+					data
+				} = await securityAppCheckPlanScanCode(obj);
+				if (data.code == 200) {
+					if(data.data[0]){
+						if(data.data[1]){
+							//多个
+							self.$set(self,'securityCheckList',data.data);
+							self.$set(self,'securityCheck',true);
+						}else{
+							//单个
+							let infoData = data.data[0];
+							infoData.pageType = 0;
+							uni.navigateTo({
+								url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
+									JSON.stringify(infoData))
+							});
+						}
+					}else{
+						//没有
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+					}
+				}
+			},
+			batchClickTow(row) {
+				let infoData = row;
+				infoData.pageType = 0;
+				uni.navigateTo({
+					url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
+						JSON.stringify(infoData))
+				});
+			},
 		}
 	}
 </script>
@@ -756,6 +825,101 @@
 			.position-button-p-2 {}
 		}
 
+		.shade-box {
+			height: 100%;
+			width: 100%;
+			position: fixed;
+			display: flex;
+			flex-direction: column;
+			z-index: 200;
+			background: rgba(0, 0, 0, 0.2);
+			top: 0;
+		
+			.null-box {
+				flex: 1;
+			}
+		
+			.shade_n {
+				position: absolute;
+				bottom: 0;
+				left: 0;
+				width: 750rpx;
+				height: 466rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx 20rpx 0rpx 0rpx;
+				overflow-y: auto;
+		
+				.title {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					padding: 0 50rpx 0 284rpx;
+					box-sizing: border-box;
+					border-bottom: 1rpx solid #E0E0E0;
+		
+					>view {
+						font-size: 30rpx;
+						color: #3D3D3D;
+						line-height: 90rpx;
+						text-align: left;
+					}
+		
+					>img {
+						width: 24rpx;
+						height: 12rpx;
+					}
+				}
+		
+				.batch {
+					padding: 0 30rpx;
+					box-sizing: border-box;
+		
+					.batch-li {
+						display: flex;
+						justify-content: space-between;
+						align-items: center;
+						border-bottom: 1rpx solid #E0E0E0;
+						padding: 20rpx 0 16rpx 0rpx;
+						box-sizing: border-box;
+		
+						.batch-li-l {
+							>text:nth-of-type(1) {
+								display: block;
+								font-size: 30rpx;
+								color: #333333;
+								line-height: 42rpx;
+								text-align: left;
+							}
+		
+							>text:nth-of-type(2) {
+								display: block;
+								font-size: 28rpx;
+								color: #666666;
+								line-height: 39rpx;
+								text-align: left;
+								margin-top: 6rpx;
+							}
+						}
+		
+						.batch-li-r {
+							font-size: 28rpx;
+							color: #666666;
+							line-height: 39rpx;
+							text-align: left;
+							display: flex;
+							justify-content: flex-start;
+							align-items: center;
+		
+							>img {
+								width: 24rpx;
+								height: 24rpx;
+								margin-left: 9rpx;
+							}
+						}
+					}
+				}
+			}
+		}
 
 	}
 </style>