dedsudiyu 1 mês atrás
pai
commit
6a6613da59

+ 2 - 2
api/request/config.js

@@ -8,14 +8,14 @@ const config = {
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	// 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.20: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服务器高升测试
 	// base_url: 'https://lab.zjznai.com/labTest/',//1.8外网
 	// base_url: 'https://lab.zjznai.com/labapp/',//43服务器线上
-	// base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
+	base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	// base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址
 	// base_url: 'https://lab.zjznai.com/jdlabSystem/', //交大地址
 	// base_url: 'https://lab.zjznai.com/jndxlabSystem/', //暨大地址

+ 176 - 11
pages_safetyCheck/views/inspectManage/inspectList.vue

@@ -109,7 +109,25 @@
 			<img v-if="tabIndexTow==0" class="saoCode" @click="saoCode()"
 				:src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')">
 		</scroll-view>
-		<scanCodeCheck v-if="securityCheck"  :subjectData="subjectData"></scanCodeCheck>
+		<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 subjectData">
+						<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>
 
@@ -128,15 +146,10 @@
 		securityAppCheckDangerReviewSubList,
 		securityAppCheckSetOptionList,
 		securityAppCheckDangerBuildAndFloorList,
+		securityAppCheckPlanScanCode,
 	} from '@/pages_safetyCheck/api/index.js'
-	import {
-		scanCodeCheck
-	} from '@/pages_safetyCheck/views/scanCodeCheck.vue'
 	export default {
 		name: "snapshotList",
-		components: {
-			scanCodeCheck,
-		},
 		data() {
 			return {
 				baseUrl: config.base_url,
@@ -174,7 +187,7 @@
 				getDataType: false,
 				manageStatus: null,
 				securityCheck:false,
-				subjectData: {},
+				subjectData: [],
 				//楼栋楼层数据
 				dataListTow: [],
 				//楼栋楼层绑定数据
@@ -433,9 +446,10 @@
 							codeData[item.split("=")[0]] = item.split("=")[1];
 						})
 						if (codeData.code) {
-							self.$set(self.subjectData, 'subId', codeData.subId);
-							self.$set(self.subjectData, 'planSetId', self.planSetId);
-							self.$set(self, "securityCheck", true)
+							self.securityAppCheckPlanScanCode(codeData.subId,self.planSetId);
+							// self.$set(self.subjectData, 'subId', codeData.subId);
+							// self.$set(self.subjectData, 'planSetId', self.planSetId);
+							// self.$set(self, "securityCheck", true)
 						} else {
 							uni.showToast({
 								title: '请扫描正确的二维码',
@@ -447,6 +461,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,'subjectData',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))
+				});
+			},
 			//扫一扫查询数据
 			async saoList(subId) {
 				let obj = {
@@ -1303,5 +1372,101 @@
 			width: 160rpx;
 			height: 160rpx;
 		}
+		
+		.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>

+ 210 - 0
pages_safetyCheck/views/newScanCodeCheck.vue

@@ -0,0 +1,210 @@
+<template>
+	<view class="shade">
+		<view class="null-box" @click="dialogClose()"></view>
+		<view class="shade_n">
+			<view class="title">
+				<view>请选择实验室222</view>
+			</view>
+			<view class="batch">
+				<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
+					<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>
+</template>
+
+<script>
+	import {
+		securityAppCheckManageList,
+		securityAppCheckSetOptionList,
+		securityAppCheckPlanScanCode,
+	} from '@/pages_safetyCheck/api/index.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	export default {
+		name: "iotControl",
+		props: {
+			subjectData: {},
+		},
+		data() {
+			return {
+				newData:{},
+				batchList: [],
+				checkCategory: null,
+			}
+		},
+		created() {
+			
+		},
+		mounted() {
+			this.$set(this, 'batchList', this.subjectData);
+			// this.securityAppCheckPlanScanCode();
+		},
+		methods: {
+			dialogClose() {
+				this.$parent.goPage('securityCheck',false);
+			},
+			batchClick(row) {
+				let infoData = row;
+				infoData.pageType = 0;
+				uni.navigateTo({
+					url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
+						JSON.stringify(infoData))
+				});
+			},
+			//查询计划
+			async securityAppCheckPlanScanCode() {
+				let self = this;
+				let obj = {
+					subId:this.newData.subId,
+					checkCategory:this.checkCategory,
+				};
+				if(this.newData.planSetId){
+					obj.planSetId = this.newData.planSetId;
+				}
+				const {
+					data
+				} = await securityAppCheckPlanScanCode(obj);
+				if (data.code == 200) {
+					if(data.data[0]){
+						if(data.data[1]){
+							//多个
+							setTimeout(function() {
+							self.$set(self,'batchList',data.data);
+							}, 1000);
+						}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
+						});
+						this.dialogClose();
+					}
+				}
+			},
+		},
+		onHide() {
+		
+		},
+		beforeDestroy() {
+			
+		},
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.shade {
+		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>

+ 176 - 12
pages_safetyCheck/views/safetyCheck.vue

@@ -39,8 +39,6 @@
 			<img class="subBtn-img" @click="saoCode()"
 				:src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')">
 		</view>
-		<!-- 安全检查 -->
-		<scanCodeCheck v-if="securityCheck"  :subjectData="subjectData"></scanCodeCheck>
 		<!-- 弹窗部分 -->
 		<view class="shade" v-if="dialogVisible">
 			<view class="null-box" @click="dialogClose()"></view>
@@ -62,6 +60,25 @@
 				</view>
 			</view>
 		</view>
+		<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 subjectData">
+						<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>
@@ -74,14 +91,10 @@
 		securityAppCheckPlanTitleList,
 	} from '@/pages_safetyCheck/api/index.js'
 	import {
-		scanCodeCheck
-	} from '@/pages_safetyCheck/views/scanCodeCheck.vue'
-	
+		securityAppCheckPlanScanCode,
+	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "planDetail",
-		components: {
-			scanCodeCheck,
-		},
 		data() {
 			return {
 				pageType: 0,
@@ -120,7 +133,7 @@
 				batchList: [],
 				batchData: {},
 				securityCheck:false,
-				subjectData: {},
+				subjectData: [],
 			}
 		},
 		onLoad(option) {
@@ -158,9 +171,10 @@
 							codeData[item.split("=")[0]] = item.split("=")[1];
 						})
 						if (codeData.code) {
-							console.log(codeData.subId)
-							self.$set(self.subjectData, 'subId', codeData.subId);
-							self.$set(self, "securityCheck", true)
+							self.securityAppCheckPlanScanCode(codeData.subId,self.planSetId);
+							// console.log(codeData.subId)
+							// self.$set(self.subjectData, 'subId', codeData.subId);
+							// self.$set(self, "securityCheck", true)
 						} else {
 							uni.showToast({
 								title: '请扫描正确的二维码',
@@ -172,6 +186,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,'subjectData',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))
+				});
+			},
 			//安全检查扫码控制显示隐藏
 			goPage(type,status) {
 				if (type == 'securityCheck') {
@@ -574,5 +643,100 @@
 				height: 160rpx;
 			}
 		}
+		.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>