heyang 6 months ago
parent
commit
d9c36c5623

+ 2 - 2
api/request/config.js

@@ -20,10 +20,10 @@ 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: '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://lab.zjznai.com/labapp/', //43测试
 }
 export {
 	config

+ 22 - 378
pages_manage/views/laboratory/safetyCardScan.vue

@@ -91,31 +91,13 @@
 			</view>
 		</view>
 		<view class="position-button-box" v-if="pageType == 0">
-			<img class="position-button-p-1" @click="goPage('securityCheck')"
+			<img class="position-button-p-1" @click="goPage('securityCheck',true)"
 				src="@/pages_safetyCheck/images/icon_aqjc_anquanjiancha.png">
 			<img class="position-button-p-2" @click="goPage('snapshot')"
 				src="@/pages_safetyCheck/images/icon_aqjc_suishoupai.png">
 		</view>
-		<view class="shade" v-if="dialogVisible">
-			<view class="null-box" @click="dialogClose()"></view>
-			<view class="shade_n">
-				<view class="title">
-					<view>{{dialogTtile}}</view>
-					<!-- <img src="@/pages_safetyCheck/images/icon_06.png"> -->
-				</view>
-				<view class="batch">
-					<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
-						<view class="batch-li-l">
-							<text v-if="dialogStatus==0">{{item.planTitle}}</text>
-							<text v-if="dialogStatus==1">{{item.checkName}}</text>
-						</view>
-						<view class="batch-li-r">
-							<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
+		<!-- 安全检查 -->
+		<scanCodeCheck v-if="securityCheck"  :subjectData="subjectData"></scanCodeCheck>
 		<!-- 物联控制 -->
 		<iotControl ref="iotControl" v-if="pageType == 1" :subjectData="subjectData"></iotControl>
 		<!-- 进出记录 -->
@@ -133,11 +115,6 @@
 		pageRestrictVerify
 	} from '@/utils/index'
 	import {
-		securityAppCheckPlanAppTitleList,
-		securityAppCheckManageList,
-		securityAppCheckSetOptionList,
-	} from '@/pages_safetyCheck/api/index.js'
-	import {
 		iotControl
 	} from '@/pages_manage/views/laboratory/iotControl.vue'
 	import {
@@ -150,6 +127,9 @@
 		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 {
@@ -162,6 +142,7 @@
 			accessRecord,
 			voiceBroadcast,
 			airConditioning,
+			scanCodeCheck,
 		},
 		data() {
 			return {
@@ -191,30 +172,8 @@
 				identityData: uni.getStorageSync('identityData'),
 				//语音广播弹窗
 				broadcastPage: false,
-				//空调弹窗
-				conditioningPage: false,
-				// 空调弹窗
-				airConditioningData: null,
-				saoCodeType: false,
-				dialogVisible: false,
-				dialogTtile: '',
-				dialogStatus: 0, //0计划 1批次 2实验室
-				batchList: [],
-				queryParams: {
-					page: 1,
-					pageSize: 100,
-					checkCategory: '', //1校院巡查 2学院自查
-					subId: '',
-				},
-				checkPlanSetVoList: null,
-				form: {},
-				OptionListArr:[],//临时存储检查项
-				planId:'',
-				planTitle:'',
-				checkTypeName:'',
-				crossCheck:'',
-				
-
+				broadcastPage: false,
+				securityCheck:false,
 			}
 		},
 		// 父页面
@@ -250,10 +209,6 @@
 
 		},
 		methods: {
-			dialogClose() {
-				this.dialogStatus = 0;
-				this.dialogVisible = false;
-			},
 			//十六进制颜色值和RGB格式转换
 			hexToRgb(hex, opacity = 1) {
 				// 去除#号
@@ -264,222 +219,6 @@
 				var blue = parseInt(color.substring(4, 6), 16);
 				return `RGB(${red}, ${green}, ${blue},${opacity})`;
 			},
-			batchClick(row) {
-				let self = this;
-				if (this.dialogStatus == 0) { //计划点击
-					this.$set(this, 'planId', row.planId);
-					this.$set(this, 'planTitle', row.planTitle);
-					this.$set(this, 'checkTypeName', row.checkTypeName);
-					this.$set(this, 'crossCheck', row.crossCheck);
-					if (row.checkPlanSetVoList.length == 1) {
-						//如果只有1个检查批次不弹窗
-						let planSetId = row.checkPlanSetVoList[0].planSetId
-						self.checkPlanSetVoList = row.checkPlanSetVoList[0];
-						self.securityAppCheckManageList(planSetId)
-					} else if (row.checkPlanSetVoList.length == 0) {
-						this.dialogStatus = 0;
-						uni.showToast({
-							title: '该实验室暂无检查计划!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-						return
-					} else {
-						this.$set(this, 'batchList', row.checkPlanSetVoList);
-						this.dialogStatus = 1;
-						this.dialogTtile = '批次';
-						this.dialogVisible = true;
-
-					}
-				} else if (this.dialogStatus == 1) { //批次点击
-					/* this.dialogStatus = 2;
-					this.dialogTtile = '实验室'; */
-					let planSetId = row.planSetId
-					self.checkPlanSetVoList = row;
-					this.securityAppCheckManageList(planSetId)
-				}
-			},
-			//查询计划
-			async securityAppCheckPlanAppTitleList() {
-				console.log(this.newData.subId)
-				this.queryParams.subId = this.newData.subId;
-				this.queryParams.checkStatus = 0;
-				let self = this;
-				const {
-					data
-				} = await securityAppCheckPlanAppTitleList(this.queryParams);
-				if (data.code == 200) {
-					//循环过滤掉当前计划中批次中已经检查完成的
-					data.data.records.forEach(function(item, index) {
-						let list = [];
-						item.checkPlanSetVoList.forEach(function(item2) {
-							if (item2.checkSetProgress != 100) {
-								list.push(item2)
-							}
-						})
-						item.checkPlanSetVoList = list
-					})
-					let list2 = []
-					list2 = data.data.records.filter(function(item) {
-						return item.checkPlanSetVoList.length != 0
-					});
-					data.data.records = list2
-
-					if (data.data.records.length == 1) { //一个计划
-						this.$set(this, 'planId', data.data.records[0].planId);
-						this.$set(this, 'planTitle', data.data.records[0].planTitle);
-						this.$set(this, 'checkTypeName', data.data.records[0].checkTypeName);
-						this.$set(this, 'crossCheck', data.data.records[0].crossCheck);
-						if (data.data.records[0].checkPlanSetVoList.length == 1) { //1个批次
-							let planSetId = data.data.records[0]
-							if (data.data.records[0].checkPlanSetVoList[0]) { //一个批次
-								let planSetId = data.data.records[0].checkPlanSetVoList[0].planSetId
-								self.checkPlanSetVoList = data.data.records[0].checkPlanSetVoList[0];
-								self.securityAppCheckManageList(planSetId)
-							}
-						} else if (data.data.records[0].checkPlanSetVoList.length == 0) {
-							this.dialogStatus = 0;
-							uni.showToast({
-								title: '该实验室暂无检查计划!',
-								icon: "none",
-								mask: true,
-								duration: 2000
-							});
-							return
-						} else { //多个批次
-							this.dialogStatus = 1;
-							this.batchList = data.data.records[0].checkPlanSetVoList;
-							this.dialogVisible = true;
-							this.dialogTtile = '批次';
-						}
-
-					} else if (data.data.records.length==0) {
-						this.dialogStatus = 0;
-						uni.showToast({
-							title: '该实验室暂无检查计划!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-						return
-					} else { //多个计划
-						this.batchList = data.data.records;
-						this.dialogVisible = true;
-						this.dialogTtile = '计划标题';
-					}
-				}
-			},
-			//检查任务-在此结果里对比实验室Id判断是否有实验室
-			async securityAppCheckManageList(planSetId) {
-				let self = this;
-				let obj = {
-					page: 1,
-					pageSize: 20,
-					planSetId: planSetId,
-					subId: self.newData.subId,
-				}
-				const {
-					data
-				} = await securityAppCheckManageList(obj);
-				if (data.code == 200) {
-					//this.shadeList = data.data.records;
-					if (data.data.records[0]) {
-						let manageId = data.data.records[0].manageId;
-						self.securityAppCheckSetOptionList(data.data.records[0],0);
-					} else {
-						self.dialogStatus = 0;
-						self.dialogVisible = false;
-						uni.showToast({
-							title: '该实验室暂无检查计划!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-						return
-					}
-
-				}
-			},
-			//查询检查项
-			async securityAppCheckSetOptionList(item,checkStatus) {
-				let self = this;
-				let upData = item;
-				let obj = {
-					page: 1,
-					pageSize: 20,
-					checkStatus: checkStatus,
-					manageId: upData.manageId,
-				}
-				const {
-					data
-				} = await securityAppCheckSetOptionList(obj);
-				if (data.code == 200 && checkStatus==0) {//先查询待检查数据
-					if (data.data.records[0]) {
-						let infoData = {};
-						infoData.pageType = 0;
-						infoData.itemsStatus = 0;
-						infoData.subName = upData.subName;
-						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
-						infoData.planId = self.planId;
-						infoData.planTitle = self.planTitle;
-						infoData.checkTypeName = self.checkTypeName;
-						infoData.crossCheck = self.crossCheck;
-						
-						infoData.roomNum = upData.roomNum;
-						infoData.subId = data.data.records[0].subId;
-						infoData.manageId = data.data.records[0].manageId;
-						infoData.setOptionId = data.data.records[0].setOptionId;
-						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
-						infoData.checkCategory = data.data.records[0].checkCategory;
-						uni.navigateTo({
-							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
-								encodeURIComponent(
-									JSON
-									.stringify(infoData))
-						});
-					} else {
-						self.securityAppCheckSetOptionList(item,2);
-						
-					}
-				}else if (data.code == 200 && checkStatus==2) {//查询检查中数据
-					if (data.data.records[0]) {
-						let infoData = {};
-						infoData.pageType = 0;
-						infoData.itemsStatus = 0;
-						infoData.subName = upData.subName;
-						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
-						infoData.planId = self.planId;
-						infoData.planTitle = self.planTitle;
-						infoData.checkTypeName = self.checkTypeName;
-						infoData.crossCheck = self.crossCheck;
-						infoData.roomNum = upData.roomNum;
-						infoData.subId = data.data.records[0].subId;
-						infoData.manageId = data.data.records[0].manageId;
-						infoData.setOptionId = data.data.records[0].setOptionId;
-						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
-						infoData.checkCategory = data.data.records[0].checkCategory;
-						uni.navigateTo({
-							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
-								encodeURIComponent(
-									JSON
-									.stringify(infoData))
-						});
-					} else {
-						self.dialogStatus = 0;
-						self.dialogVisible = false;
-						uni.showToast({
-							title: '该实验室暂无检查项!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-						return
-					}
-				}
-			},
-
-
 			//拨打电话
 			callPhone(tel) {
 				uni.makePhoneCall({
@@ -517,7 +256,7 @@
 				} else if (type == 'conditioningClose') {
 					//空调弹窗关闭
 					this.$set(this, 'conditioningPage', false);
-				} else if (type == 'back') {
+				}else if (type == 'back') {
 					this.$set(this, 'pageType', 2);
 				}
 			},
@@ -538,7 +277,7 @@
 					this.$set(this, 'pageType', index);
 				}
 			},
-			goPage(type) {
+			goPage(type,status) {
 				if (!pageRestrictVerify(type)) {
 					uni.showToast({
 						title: '没有相关权限,请联系管理员',
@@ -547,15 +286,14 @@
 						duration: 2000
 					});
 					return
-				}
-				if (type == 'securityCheck') {
-					//安全检查
-					this.securityAppCheckPlanAppTitleList();
-					/* uni.navigateTo({
-						url: "/pages_safetyCheck/views/safetyCheck",
-					}); */
+				}else if (type == 'securityCheck') {
+					if(status){
+						this.$set(this, "securityCheck", true)
+					}else{
+						this.$set(this, "securityCheck", false)
+					}
 				} else if (type == 'snapshot') {
-					console.log(this.newData)
+					
 					this.$set(this.form, "subId", this.newData.subId)
 					this.$set(this.form, "subName", this.newData.subName)
 					this.$set(this.form, "subRoom", this.newData.roomNum)
@@ -988,13 +726,13 @@
 
 		.position-button-box {
 			position: fixed;
-			bottom: 26rpx;
+			bottom: 40rpx;
 			display: flex;
 			justify-content: center;
 
 			>img {
-				width: 130rpx;
-				height: 130rpx;
+				width: 160rpx;
+				height: 160rpx;
 			}
 
 			.position-button-p-1 {
@@ -1005,100 +743,6 @@
 			.position-button-p-2 {}
 		}
 
-		.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>

+ 407 - 0
pages_manage/views/laboratory/scanCodeCheck.vue

@@ -0,0 +1,407 @@
+<template>
+	<view class="shade">
+		<view class="null-box" @click="dialogClose()"></view>
+		<view class="shade_n">
+			<view class="title">
+				<view>{{dialogTtile}}</view>
+				<!-- <img src="@/pages_safetyCheck/images/icon_06.png"> -->
+			</view>
+			<view class="batch">
+				<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
+					<view class="batch-li-l">
+						<text v-if="dialogStatus==0">{{item.planTitle}}</text>
+						<text v-if="dialogStatus==1">{{item.checkName}}</text>
+					</view>
+					<view class="batch-li-r">
+						<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		securityAppCheckPlanAppTitleList,
+		securityAppCheckManageList,
+		securityAppCheckSetOptionList,
+	} from '@/pages_safetyCheck/api/index.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	export default {
+		name: "iotControl",
+		props: {
+			subjectData: {},
+		},
+		data() {
+			return {
+				baseUrl: config.base_url,
+				newData:{},
+				dialogTtile: '',
+				dialogStatus: 0, //0计划 1批次 2实验室
+				batchList: [],
+				queryParams: {
+					page: 1,
+					pageSize: 100,
+					checkCategory: '', //1校院巡查 2学院自查
+					subId: '',
+				},
+				checkPlanSetVoList: null,
+				form: {},
+				OptionListArr:[],//临时存储检查项
+				planId:'',
+				planTitle:'',
+				checkTypeName:'',
+				crossCheck:'',
+			}
+		},
+		created() {
+			
+		},
+		mounted() {
+			this.$set(this, 'newData', this.subjectData);
+			console.log(this.subjectData)
+			this.$set(this.queryParams, 'subId', this.subjectData.subId);
+			this.securityAppCheckPlanAppTitleList();
+		},
+		methods: {
+			dialogClose() {
+				this.dialogStatus = 0;
+				this.$parent.goPage('securityCheck',false);
+				
+				
+			},
+			//十六进制颜色值和RGB格式转换
+			hexToRgb(hex, opacity = 1) {
+				// 去除#号
+				var color = hex.replace("#", "");
+				// 分割成红、绿、蓝三部分的16进制字符串
+				var red = parseInt(color.substring(0, 2), 16);
+				var green = parseInt(color.substring(2, 4), 16);
+				var blue = parseInt(color.substring(4, 6), 16);
+				return `RGB(${red}, ${green}, ${blue},${opacity})`;
+			},
+			batchClick(row) {
+				let self = this;
+				if (this.dialogStatus == 0) { //计划点击
+					this.$set(this, 'planId', row.planId);
+					this.$set(this, 'planTitle', row.planTitle);
+					this.$set(this, 'checkTypeName', row.checkTypeName);
+					this.$set(this, 'crossCheck', row.crossCheck);
+					if (row.checkPlanSetVoList.length == 1) {
+						//如果只有1个检查批次不弹窗
+						let planSetId = row.checkPlanSetVoList[0].planSetId
+						self.checkPlanSetVoList = row.checkPlanSetVoList[0];
+						self.securityAppCheckManageList(planSetId)
+					} else if (row.checkPlanSetVoList.length == 0) {
+						this.dialogStatus = 0;
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					} else {
+						this.$set(this, 'batchList', row.checkPlanSetVoList);
+						this.dialogStatus = 1;
+						this.dialogTtile = '批次';
+						this.$parent.goPage('securityCheck',true);
+			
+					}
+				} else if (this.dialogStatus == 1) { //批次点击
+					/* this.dialogStatus = 2;
+					this.dialogTtile = '实验室'; */
+					let planSetId = row.planSetId
+					self.checkPlanSetVoList = row;
+					this.securityAppCheckManageList(planSetId)
+				}
+			},
+			//查询计划
+			async securityAppCheckPlanAppTitleList() {
+				this.queryParams.subId = this.newData.subId;
+				this.queryParams.checkStatus = 0;
+				let self = this;
+				const {
+					data
+				} = await securityAppCheckPlanAppTitleList(this.queryParams);
+				if (data.code == 200) {
+					//循环过滤掉当前计划中批次中已经检查完成的
+					data.data.records.forEach(function(item, index) {
+						let list = [];
+						item.checkPlanSetVoList.forEach(function(item2) {
+							if (item2.checkSetProgress != 100) {
+								list.push(item2)
+							}
+						})
+						item.checkPlanSetVoList = list
+					})
+					let list2 = []
+					list2 = data.data.records.filter(function(item) {
+						return item.checkPlanSetVoList.length != 0
+					});
+					data.data.records = list2
+			
+					if (data.data.records.length == 1) { //一个计划
+						this.$set(this, 'planId', data.data.records[0].planId);
+						this.$set(this, 'planTitle', data.data.records[0].planTitle);
+						this.$set(this, 'checkTypeName', data.data.records[0].checkTypeName);
+						this.$set(this, 'crossCheck', data.data.records[0].crossCheck);
+						if (data.data.records[0].checkPlanSetVoList.length == 1) { //1个批次
+							let planSetId = data.data.records[0]
+							if (data.data.records[0].checkPlanSetVoList[0]) { //一个批次
+								let planSetId = data.data.records[0].checkPlanSetVoList[0].planSetId
+								self.checkPlanSetVoList = data.data.records[0].checkPlanSetVoList[0];
+								self.securityAppCheckManageList(planSetId)
+							}
+						} else if (data.data.records[0].checkPlanSetVoList.length == 0) {
+							this.dialogStatus = 0;
+							uni.showToast({
+								title: '该实验室暂无检查计划!',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+							return
+						} else { //多个批次
+							this.dialogStatus = 1;
+							this.batchList = data.data.records[0].checkPlanSetVoList;
+							this.$parent.goPage('securityCheck',true);
+							this.dialogTtile = '批次';
+						}
+			
+					} else if (data.data.records.length==0) {
+						this.dialogStatus = 0;
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					} else { //多个计划
+						this.batchList = data.data.records;
+						this.$parent.goPage('securityCheck',true);
+						this.dialogTtile = '计划标题';
+					}
+				}
+			},
+			//检查任务-在此结果里对比实验室Id判断是否有实验室
+			async securityAppCheckManageList(planSetId) {
+				let self = this;
+				let obj = {
+					page: 1,
+					pageSize: 20,
+					planSetId: planSetId,
+					subId: self.newData.subId,
+				}
+				const {
+					data
+				} = await securityAppCheckManageList(obj);
+				if (data.code == 200) {
+					//this.shadeList = data.data.records;
+					if (data.data.records[0]) {
+						let manageId = data.data.records[0].manageId;
+						self.securityAppCheckSetOptionList(data.data.records[0],0);
+					} else {
+						self.dialogStatus = 0;
+						this.$parent.goPage('securityCheck',false);
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+			
+				}
+			},
+			//查询检查项
+			async securityAppCheckSetOptionList(item,checkStatus) {
+				let self = this;
+				let upData = item;
+				let obj = {
+					page: 1,
+					pageSize: 20,
+					checkStatus: checkStatus,
+					manageId: upData.manageId,
+				}
+				const {
+					data
+				} = await securityAppCheckSetOptionList(obj);
+				if (data.code == 200 && checkStatus==0) {//先查询待检查数据
+					if (data.data.records[0]) {
+						let infoData = {};
+						infoData.pageType = 0;
+						infoData.itemsStatus = 0;
+						infoData.subName = upData.subName;
+						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
+						infoData.planId = self.planId;
+						infoData.planTitle = self.planTitle;
+						infoData.checkTypeName = self.checkTypeName;
+						infoData.crossCheck = self.crossCheck;
+						
+						infoData.roomNum = upData.roomNum;
+						infoData.subId = data.data.records[0].subId;
+						infoData.manageId = data.data.records[0].manageId;
+						infoData.setOptionId = data.data.records[0].setOptionId;
+						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
+						infoData.checkCategory = data.data.records[0].checkCategory;
+						uni.navigateTo({
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+								encodeURIComponent(
+									JSON
+									.stringify(infoData))
+						});
+					} else {
+						self.securityAppCheckSetOptionList(item,2);
+						
+					}
+				}else if (data.code == 200 && checkStatus==2) {//查询检查中数据
+					if (data.data.records[0]) {
+						let infoData = {};
+						infoData.pageType = 0;
+						infoData.itemsStatus = 0;
+						infoData.subName = upData.subName;
+						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
+						infoData.planId = self.planId;
+						infoData.planTitle = self.planTitle;
+						infoData.checkTypeName = self.checkTypeName;
+						infoData.crossCheck = self.crossCheck;
+						infoData.roomNum = upData.roomNum;
+						infoData.subId = data.data.records[0].subId;
+						infoData.manageId = data.data.records[0].manageId;
+						infoData.setOptionId = data.data.records[0].setOptionId;
+						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
+						infoData.checkCategory = data.data.records[0].checkCategory;
+						uni.navigateTo({
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+								encodeURIComponent(
+									JSON
+									.stringify(infoData))
+						});
+					} else {
+						self.dialogStatus = 0;
+						this.$parent.goPage('securityCheck',false);
+						uni.showToast({
+							title: '该实验室暂无检查项!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+				}
+			},
+
+
+		},
+		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>

+ 2 - 39
pages_safetyCheck/component/checkItemModule.vue

@@ -188,7 +188,6 @@
 			getSearchValue() {
 				if (this.optionData.infoType == 0) {
 					//检查
-					this.dataList = [];
 					this.securityAppCheckSetOptionList();
 				} else if (this.optionData.infoType == 1) {
 					//复查
@@ -235,7 +234,6 @@
 				} else if (item.level == 2) {
 					this.$set(this, 'levelListThree', item);
 					this.$set(this, 'checkList', item.children);
-					console.log(this.checkList)
 				} else if (item.level == 3) {
 					this.checkItemButton(item, item2);
 
@@ -279,7 +277,7 @@
 					data
 				} = await securityAppCheckSetOptionList({
 					manageId: this.optionData.manageId,
-					checkStatus: '0',
+					checkStatus: this.optionData.checkType,
 					searchValue: this.searchValue
 				});
 				if (data.code == 200) {
@@ -288,50 +286,15 @@
 						let minList = JSON.parse(JSON.stringify(data.data))
 						this.cascadeData(maxList, minList);
 					}
-					console.log(data.data)
 					if (data.data[0]) {
 						data.data.forEach(function(item) {
-							console.log(item)
-							console.log(item.hazardCheckPoint)
 							if (item.hazardCheckPoint) {
 								item.hazardCheckPointList = item.hazardCheckPoint.split('#')
 							}
 						})
 					}
-					console.log(data.data)
 					//查询数据
-					this.dataList = [...this.dataList, ...JSON.parse(JSON.stringify(data.data))]
-					//this.$set(this, 'dataList', JSON.parse(JSON.stringify(data.data)));
-					this.securityAppCheckSetOptionListTow()
-				}
-			},
-			async securityAppCheckSetOptionListTow(maxList) {
-				let self = this;
-				const {
-					data
-				} = await securityAppCheckSetOptionList({
-					manageId: this.optionData.manageId,
-					checkStatus: '2',
-					searchValue: this.searchValue
-				});
-				if (data.code == 200) {
-					//级联数据
-					if (maxList) {
-						let minList = JSON.parse(JSON.stringify(data.data))
-						this.cascadeData(maxList, minList);
-					}
-					if (data.data[0]) {
-						data.data.forEach(function(item) {
-							console.log(item)
-							console.log(item.hazardCheckPoint)
-							if (item.hazardCheckPoint) {
-								item.hazardCheckPointList = item.hazardCheckPoint.split('#')
-							}
-						})
-					}
-					//查询数据
-					this.dataList = [...this.dataList, ...JSON.parse(JSON.stringify(data.data))]
-					//this.$set(this, 'dataList', JSON.parse(JSON.stringify(data.data)));
+					this.$set(this, 'dataList', JSON.parse(JSON.stringify(data.data)));
 				}
 			},
 			/********************** 复查相关查询 **********************/

BIN
pages_safetyCheck/images/icon_aqjc_bianji.png


BIN
pages_safetyCheck/images/icon_aqjc_jiancha.png


BIN
pages_safetyCheck/images/icon_aqjc_noYinhuan.png


BIN
pages_safetyCheck/images/icon_aqjc_yinhuan.png


+ 71 - 248
pages_safetyCheck/views/inspectManage/conductInspections.vue

@@ -2,15 +2,6 @@
 <template>
 	<view class="inspectAdd">
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<!-- <view class="tip">{{optionData.checkPlanSetVoList.checkName}}</view> -->
-			<!-- <view class="items">
-				<view class="items-t" @click="checkItemModuleButton('open')">
-					<view class="items-t-r">{{newData.hazardCheckCode}} {{newData.hazardCheckName}}</view>
-					<img class="items-t-img" src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
-				</view>
-				<view class="items-b">< {{newData.hazardCheckCode2}} {{newData.hazardCheckName2}}
-					<{{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}</view>
-			</view> -->
 			<view class="list">
 				<view class="list-li srearch">
 					<view class="srearch-l">{{newData.subName?newData.subName:'实验室名称'}}</view>
@@ -36,7 +27,7 @@
 							@click="selectImage()" v-if="form.photoList.length<6"> -->
 					</view>
 				</view>
-				<view class="list-li" @click="checkItemModuleButton('open')">
+				<view class="list-li" @click="checkItemModuleButton('open')" style="border-bottom: none;">
 					<view> {{newData.hazardCheckCode?newData.hazardCheckCode:''}}
 						{{newData.hazardCheckName?newData.hazardCheckName:'检查项'}}
 					</view>
@@ -44,28 +35,13 @@
 						<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
 					</view>
 				</view>
-				<!-- <view class="list-li" v-if="newData.hazardCheckName!=''" @click="inspectDot()">
-					<view>检查要点</view>
-					<view>
-						<img v-if="!newData.inspectDot" src="@/pages_safetyCheck/images/icon_06.png">
-						<img v-if="newData.inspectDot" src="@/pages_safetyCheck/images/icon_06_1.png">
-					</view>
+				<view class="hazardCheckNum" @click="hiddenDangerClick()">
+					<img class="hazardCheckNum-l" src="@/pages_safetyCheck/images/icon_aqjc_yinhuan.png">
+					<view class="hazardCheckNum-r">{{'已连续出现'+hazardCheckNum+'次隐患'}} </view>
 				</view>
-				<view class="hidden-content" v-if="newData.hazardCheckName!='' && newData.inspectDot">
-					{{newData.hazardCheckPoint}}
-				</view> -->
-				<!-- <view class="radio_group" v-if="newData.inspectDot">
-					<view class="radio" v-for="(item,index) in radioList" :key="index" @click="radioClick(item)">
-						<img v-if="!item.checked" src="@/pages_safetyCheck/images/icon_aqjc_5.png">
-						<img v-if="item.checked" src="@/pages_safetyCheck/images/icon_aqjc_6.png">
-						<text>{{item.name}}</text>
-					</view>
-				</view> -->
 				<view class="list-li" v-if="!form.checkFlag">
 					<view>隐患描述</view>
-					<view>
-						<!-- <img src="@/pages_safetyCheck/images/icon_06.png"> -->
-					</view>
+					<view></view>
 				</view>
 				<view class="describe">
 					<textarea v-if="!form.checkFlag && !checkItemModuleType" cursor-spacing="40" class="describe-n" type="text"
@@ -105,7 +81,6 @@
 			<img @longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton"
 				@touchend.stop="sendButton(item,$event)" src="@/pages_safetyCheck/images/icon_aqjc_luyin.png" />
 			<img @click="selectImage()" src="@/pages_safetyCheck/images/icon_aqjc_paizhao.png" />
-			<img @click="submitForm(1)" src="@/pages_safetyCheck/images/icon_aqjc_baocun.png" />
 			<img @click="submitForm(2)" src="@/pages_safetyCheck/images/icon_aqjc_tijiao.png" />
 		</view>
 	</view>
@@ -120,7 +95,7 @@
 	import {
 		securityAppCheckPlanCheckInfo,
 		securityAppCheckSetOptionCheckCommit,
-		securityDraftFindBySetOptionId,
+		securityAppCheckPhotoGetCheckNumBySub,
 	} from '@/pages_safetyCheck/api/index.js'
 	import {
 		checkItemModule
@@ -151,17 +126,13 @@
 					},
 				],
 				pageType: '',
-				itemsStatus: '',
-				setOptionId: '', //检查项id
-				manageId: '', //检查管理id
-				subId: '',
-				hazardCheckPro: '',
 				sendLock: true, //发送锁,当为true时上锁,false时解锁发送
 				recorderManager: wx.getRecorderManager(),
 				optionData: null,
 				//检查项组件数据
 				checkItemModuleType: false,
 				propsData: {},
+				hazardCheckNum:0,
 			}
 		},
 		onLoad(option) {
@@ -174,11 +145,6 @@
 					.subRoom : '-')) + ')'
 			})
 			this.$set(this, 'pageType', optionData.pageType);
-			this.$set(this, 'itemsStatus', optionData.itemsStatus);
-			this.$set(this, 'setOptionId', optionData.setOptionId);
-			this.$set(this, 'manageId', optionData.manageId);
-			this.$set(this, 'subId', optionData.subId);
-			this.$set(this, 'hazardCheckPro', optionData.hazardCheckPro);
 			this.$set(this, 'optionData', optionData);
 
 		},
@@ -187,32 +153,21 @@
 		},
 		mounted() {
 			if (this.pageType == 0) {
-				if(this.optionData.checkDraftVo){//检查中,已检查
-					if(this.optionData.checkDraftVo.checkStatus==2){//检查中
-						//保存草稿详情
-						this.securityDraftFindBySetOptionId();
-					}else{
-						//开始检查-提交的详情
-						this.securityAppCheckPlanCheckInfo();
-					}
-				}else{//待见擦汗
-					//开始检查-提交的详情
-					this.securityAppCheckPlanCheckInfo();
-				}
+				this.securityAppCheckPlanCheckInfo();
+				this.securityAppCheckPhotoGetCheckNumBySub();
 			}
 		},
 		methods: {
 			//折叠展开
 			inspectDot() {
-				console.log(11)
-				console.log(this.newData.inspectDot)
+				
 				this.newData.inspectDot = !this.newData.inspectDot
 			},
 			//获取提交详情
 			async securityAppCheckPlanCheckInfo() {
 				let obj = {
-					setOptionId: this.setOptionId,
-					manageId: this.manageId,
+					setOptionId: this.optionData.setOptionId,
+					manageId: this.optionData.manageId,
 				}
 				const {
 					data
@@ -235,32 +190,18 @@
 
 				}
 			},
-			//获取草稿详情
-			async securityDraftFindBySetOptionId() {
-				let obj = {
-					setOptionId: this.setOptionId,
-				}
-				const {
-					data
-				} = await securityDraftFindBySetOptionId(obj);
-				if (data.code == 200) {
-					//编辑的时候
-					data.data.inspectDot = true;
-					this.$set(this, 'newData', data.data);
-					if(data.data.hazardDescribe){
-						this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe);
-					}else{
-						let list=[];
-						list=data.data.hazardCheckPoint.split('#');
-						this.$set(this.form, 'hazardDescribe', list[0]);
-					}
-					this.$set(this.newData, 'checkPlanSetVoList', this.optionData.checkPlanSetVoList);
-					this.$set(this.form, 'checkFlag', data.data.checkFlag ? data.data.checkFlag : false);
-					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
-					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
+			hiddenDangerClick(row) {
+				if(!this.hiddenDangerRecordStatus){
+					let infoData = this.optionData;
+					infoData.subName=this.newData.subName;
+					infoData.roomNum=this.newData.roomNum;
+					infoData.hiddenDangerRecordStatus = true;//判断是否跳转隐患列表
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
+							encodeURIComponent(JSON.stringify(infoData))
+					});
 				}
 			},
-
 			checkItemModuleButton(type, item,keyPoint) {
 				if (type == 'open') {
 					let obj = {
@@ -284,9 +225,10 @@
 					this.$set(this.newData, 'hazardCheckName2', item.hazardCheckName2);
 					this.$set(this.newData, 'hazardCheckPoint', item.hazardCheckPoint);
 					this.$set(this.form, 'hazardDescribe', keyPoint);
-					this.$set(this, 'setOptionId', item.setOptionId);
-					this.$set(this, 'hazardCheckPro', item.hazardCheckPro);
+					this.$set(this.optionData, 'setOptionId', item.setOptionId);
+					this.$set(this.optionData, 'hazardCheckPro', item.hazardCheckPro);
 					this.$set(this, 'checkItemModuleType', false);
+					this.securityAppCheckPhotoGetCheckNumBySub();
 				}
 			},
 			//提交
@@ -313,9 +255,9 @@
 				}
 				let obj = {
 					checkFlag: this.form.checkFlag,
-					checkStatus: status == 1 ? 2 : 1,
+					checkStatus: 1,
 					hazardDescribe: this.form.hazardDescribe,
-					setOptionId: this.setOptionId,
+					setOptionId: this.optionData.setOptionId,
 					photoList: this.form.photoList,
 					voiceList: this.form.voiceList,
 				}
@@ -323,24 +265,14 @@
 					data
 				} = await securityAppCheckSetOptionCheckCommit(obj);
 				if (data.code == 200) {
-					if (status == 1) {
-						uni.showToast({
-							title: '保存成功!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-					} else if (status == 2) {
-						uni.showToast({
-							title: '提交成功!',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
-					}
+					uni.showToast({
+						title: '提交成功!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					
 					let infoData = this.optionData;
-					infoData.setOptionId = this.setOptionId,
-					infoData.itemsStatus = status == 1 ? 2 : 0;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
@@ -348,6 +280,20 @@
 					});
 				}
 			},
+			//获取检查项在当前实验室出现的次数
+			async securityAppCheckPhotoGetCheckNumBySub() {
+				let obj = {
+					subId: this.optionData.subId,
+					hazardCheckPro: this.optionData.hazardCheckPro,
+				}
+				const {
+					data
+				} = await securityAppCheckPhotoGetCheckNumBySub(obj);
+				if (data.code == 200) {
+					this.$set(this, 'hazardCheckNum', data.data);
+			
+				}
+			},
 			//滚动事件
 			scrollGet() {},
 			//单选按钮
@@ -598,21 +544,8 @@
 		height: 100%;
 		display flex;
 		box-sizing: border-box;
-		padding-bottom: 160rpx;
+		padding-bottom: 230rpx;
 		box-sizing: border-box;
-
-		#bgColor-A {
-			color: #FFD400;
-		}
-
-		#bgColor-B {
-			color: #FF8C00;
-		}
-
-		#bgColor-C {
-			color: #E11608;
-		}
-
 		.tip {
 			width: 750rpx;
 			height: 80rpx;
@@ -623,107 +556,7 @@
 			line-height: 80rpx;
 			text-align: center;
 		}
-
-
-		.items {
-			width: 690rpx;
-			min-height: 165rpx;
-			background: #FFFFFF;
-			border-radius: 20rpx 20rpx 20rpx 20rpx;
-			margin: 20rpx 0 0 30rpx;
-
-			.items-li {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				border-bottom: 1rpx solid #E0E0E0;
-
-				>view:nth-of-type(1) {
-					font-size: 30rpx;
-					color: #333333;
-					line-height: 80rpx;
-					text-align: left;
-				}
-
-				>view:nth-of-type(2) {
-					font-size: 28rpx;
-					color: #666666;
-					line-height: 80rpx;
-					text-align: left;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-				}
-			}
-
-			.items-t {
-				border-bottom: 1rpx solid #E0E0E0;
-				height: 80rpx;
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				padding: 0 30rpx;
-				box-sizing: border-box;
-
-				.items-t-l {
-					width: 175rpx;
-					height: 50rpx;
-					background: #E11608;
-					border-radius: 50rpx 50rpx 50rpx 50rpx;
-					font-size: 30rpx;
-					color: #FFFFFF;
-					line-height: 50rpx;
-					text-align: center;
-					margin-right: 14rpx;
-				}
-
-				.items-t-r {
-					font-size: 30rpx;
-					color: #333333;
-					line-height: 42rpx;
-					text-align: left;
-					overflow: hidden;
-					text-overflow: ellipsis;
-					white-space: nowrap;
-					flex: 1;
-				}
-
-				.items-t-img {
-					width: 24rpx;
-					height: 24rpx;
-					margin-left: 76rpx;
-					margin-right: 34rpx;
-				}
-			}
-
-			.items-b {
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				height: 80rpx;
-				font-size: 28rpx;
-				color: #666666;
-				line-height: 80rpx;
-				text-align: left;
-			}
-		}
-
-		.items-number {
-			font-size: 24rpx;
-			color: #3D3D3D;
-			line-height: 34rpx;
-			text-align: right;
-			margin: 20rpx 60rpx 0 0;
-
-			>text {
-				font-size: 24rpx;
-				color: #FF0000;
-				line-height: 34rpx;
-				text-align: right;
-			}
-		}
-
+		
 		.list {
 			width: 750rpx;
 			margin: 20rpx 0rpx 0;
@@ -742,7 +575,7 @@
 				>view:nth-of-type(1) {
 					font-size: 30rpx;
 					color: #333333;
-					line-height: 80rpx;
+					line-height: 100rpx;
 					text-align: left;
 					overflow: hidden;
 					text-overflow: ellipsis;
@@ -752,7 +585,7 @@
 				>view:nth-of-type(2) {
 					font-size: 28rpx;
 					color: #666666;
-					line-height: 80rpx;
+					line-height: 100rpx;
 					text-align: left;
 					display: flex;
 					justify-content: space-between;
@@ -822,7 +655,7 @@
 				padding: 20px 28rpx;
 				box-sizing: border-box;
 				background: #fff;
-
+				border-bottom: 2rpx solid #E0E0E0;
 				.left-title-p {
 					width: 100%;
 					text-align: left;
@@ -875,36 +708,26 @@
 			.list-li:last-of-type {
 				border: none;
 			}
-
-			.radio_group {
+			.hazardCheckNum{
+				border-bottom: 2rpx solid #E0E0E0;
+				padding: 30rpx 40rpx 34rpx 40rpx;
+				box-sizing: border-box;
+				background: #fff;
 				display: flex;
 				justify-content: flex-end;
-				padding: 32rpx 30rpx 22rpx 30rpx;
-				box-sizing: border-box;
-				border-bottom: 1rpx solid #E0E0E0;
-
-				.radio {
-					display: flex;
-					justify-content: flex-start;
-					align-items: center;
-
-					>img {
-						width: 30rpx;
-						height: 30rpx;
-						margin-right: 34rpx;
-					}
-
-					>text {
-						font-size: 30rpx;
-						color: #333333;
-						line-height: 42rpx;
-						text-align: left;
-					}
+				align-items: center;
+				.hazardCheckNum-l{
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 18rpx;
 				}
-
-				.radio:nth-of-type(1) {
-					margin-right: 54rpx;
+				.hazardCheckNum-r{
+					font-size: 28rpx;
+					color: #FF5900;
+					line-height: 40rpx;
+					text-align: left;
 				}
+				
 			}
 		}
 
@@ -1043,8 +866,8 @@
 		box-sizing: border-box;
 
 		>img {
-			width: 130rpx;
-			height: 130rpx;
+			width: 160rpx;
+			height: 160rpx;
 		}
 	}
 </style>

+ 88 - 8
pages_safetyCheck/views/inspectManage/inspectList.vue

@@ -24,6 +24,10 @@
 					<view class="level-li"
 						:style="levelId==item.levelId?'border:1rpx solid '+item.levelColor+';background:'+item.levelColorTow+';':'levelColor-B'"
 						@click="levelClick(item.levelId)" v-for="(item,index) in levelList">{{item.levelName}}</view>
+					<view class="level-r" v-if="pageType == 0">
+						<view :class="manageStatus == 1 ?'level-r-B':'level-r-A'" @click="checkFlagChange(1)">未完成</view>
+						<view :class="manageStatus == 0 ?'level-r-B':'level-r-A'" @click="checkFlagChange(0)">已完成</view>
+					</view>	
 				</view>
 				<view class="srearch">
 					<view class="srearch-n" @click="srearchClick()">
@@ -37,7 +41,9 @@
 			</view>
 			<view class="hidden">
 				<view class="lab-info" @click="listClick(item)" v-for="(item,index) in dataList">
-					<img class="lab-info-l" src="@/pages_safetyCheck/images/icon_aqjc_shiyanshi.png">
+					<img v-if="pageType!=0" class="lab-info-l" src="@/pages_safetyCheck/images/icon_aqjc_shiyanshi.png">
+					<view :class="item.manageStatus==2?'finished':'notFinished'" v-if="pageType==0">
+						{{item.manageStatus==2?'已完成':'未完成'}}</view>
 					<view class="lab-info-c">
 						<view class="lab-info-c-t">
 							<view class="lab-info-c-t-l">{{item.subName}}</view>
@@ -117,6 +123,7 @@
 				dataList: [],
 				total: 0,
 				getDataType: false,
+				manageStatus: null,
 			}
 		},
 		onLoad(option) {
@@ -166,6 +173,16 @@
 				this.$set(this.queryParams, 'page', 1);
 				this.getList();
 			},
+			//符合/不符合
+			checkFlagChange(type) {
+				if (this.manageStatus == type) {
+					this.$set(this, 'manageStatus', null);
+				} else {
+					this.$set(this, 'manageStatus', type);
+				}
+				this.$set(this.queryParams, 'page', 1);
+				this.getList()
+			},
 			//查询类型切换
 			tabClickTow(index) {
 				this.$set(this.queryParams, 'page', 1);
@@ -375,6 +392,7 @@
 				} else if (this.tabIndexTow == 2) {
 					//整改计划
 					obj.planId = this.optionData.planId;
+					obj.userId = uni.getStorageSync('userId');
 					const {
 						data
 					} = await securityAppCheckDangerGetCheckDangerSubList(obj);
@@ -466,6 +484,7 @@
 				obj.deptId = this.deptData.id ? this.deptData.id : '';
 				obj.searchValue = this.searchValue ? this.searchValue : '';
 				obj.levelId = this.levelId ? this.levelId : '';
+				obj.manageStatus = this.manageStatus ? this.manageStatus : '';
 				if (this.tabIndexTow == 0) {
 					//检查计划
 					const {
@@ -522,6 +541,7 @@
 				} else if (this.tabIndexTow == 2) {
 					//整改计划
 					obj.planId = this.optionData.planId;
+					obj.userId = uni.getStorageSync('userId');
 					const {
 						data
 					} = await securityAppCheckDangerGetCheckDangerSubList(obj);
@@ -774,6 +794,40 @@
 				line-height: 50rpx;
 				text-align: center;
 			}
+			.level-r {
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				margin: 0 20rpx 0 30rpx;
+			
+				.level-r-A {
+					border-radius: 50rpx 50rpx 50rpx 50rpx;
+					border: 1rpx solid #E0E0E0;
+					width: 100rpx;
+					height: 60rpx;
+					background: #E0E0E0;
+					font-weight: normal;
+					font-size: 24rpx;
+					color: #333333;
+					line-height: 60rpx;
+					text-align: center;
+					margin-right: 10rpx;
+				}
+			
+				.level-r-B {
+					border-radius: 50rpx 50rpx 50rpx 50rpx;
+					border: 1rpx solid #0183FA;
+					width: 100rpx;
+					height: 60rpx;
+					background: #0183FA;
+					font-weight: normal;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					line-height: 60rpx;
+					text-align: center;
+					margin-right: 10rpx;
+				}
+			}
 
 			#levelColor-A {
 				background: rgba(255, 0, 0, 0.2);
@@ -927,6 +981,34 @@
 					margin-bottom: 42rpx;
 				}
 
+				.finished {
+					width: 90rpx;
+					height: 90rpx;
+					background: #0183FA;
+					border-radius: 100rpx 100rpx 100rpx 100rpx;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					line-height: 90rpx;
+					text-align: center;
+					margin-left: 30rpx;
+					margin-top: 30rpx;
+					margin-bottom: 32rpx;
+				}
+
+				.notFinished {
+					width: 90rpx;
+					height: 90rpx;
+					background: #E0E0E0;
+					border-radius: 100rpx 100rpx 100rpx 100rpx;
+					font-size: 24rpx;
+					color: #999999;
+					line-height: 90rpx;
+					text-align: center;
+					margin-left: 30rpx;
+					margin-top: 30rpx;
+					margin-bottom: 32rpx;
+				}
+
 				.lab-info-c {
 					margin: 24rpx 30rpx 0 20rpx;
 					flex: 1;
@@ -968,15 +1050,16 @@
 						margin-top: 16rpx;
 						display: flex;
 						justify-content: space-between;
-
+						>text{
+							overflow: hidden;
+							text-overflow: ellipsis;
+							white-space: nowrap;
+						}
 						>text:nth-of-type(1) {
 							font-size: 30rpx;
 							color: #666666;
 							line-height: 30rpx;
 							text-align: left;
-							overflow: hidden;
-							text-overflow: ellipsis;
-							white-space: nowrap;
 						}
 
 						>text:nth-of-type(2) {
@@ -984,9 +1067,6 @@
 							color: #666666;
 							line-height: 30rpx;
 							text-align: left;
-							overflow: hidden;
-							text-overflow: ellipsis;
-							white-space: nowrap;
 						}
 					}
 				}

+ 56 - 97
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -13,12 +13,7 @@
 			</view>
 			<view class="line"></view>
 			<view class="search">
-				<view class="search-l" v-if="pageType == 0 && curTabTow != 0 && curTabTow != 2">
-					<view :class="checkFlag == 1 ?'search-B':'search-A'" @click="checkFlagChange(1)">符合</view>
-					<view :class="checkFlag == 0 ?'search-B':'search-A'" @click="checkFlagChange(0)">不符合</view>
-				</view>
-				<view class="search-r" :class="(pageType == 0 && curTabTow == 0 || curTabTow == 2)||(pageType != 0) ?'search-r-margin':''"
-					@click="checkItemModuleButton('open')">
+				<view class="search-r search-r-margin" @click="checkItemModuleButton('open')">
 					<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
 					{{newData.hazardCheckCode?newData.hazardCheckCode:''}}{{newData.hazardCheckName?newData.hazardCheckName:'搜索检查项'}}
 				</view>
@@ -30,7 +25,7 @@
 				<view class="total"
 					:class="curTabTow == 0?'total-color-1':(curTabTow == 2?'total-color-3':(curTabTow == 1?'total-color-2':''))"
 					v-if="pageType == 0">
-					{{curTabTow == 0?'待检查共'+total+'项':(curTabTow == 2?'检查中草稿箱共'+total+'项':(curTabTow == 1?'已检查共'+total+'项':''))}}
+					{{curTabTow == 0?'待检查共'+total+'项':(curTabTow == 1?'已检查共'+total+'项':'')}}
 				</view>
 				<view class="total"
 					:class="curTabTow == 0?'total-color-1':(curTabTow == 1?'total-color-2':(curTabTow == 2?'total-color-3':''))"
@@ -76,10 +71,7 @@
 			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
 		</scroll-view>
 		<checkItemModule :propsData="propsData" v-if="checkItemModuleType"></checkItemModule>
-		<view class="sub-btn" v-if="pageType==0 && inspectRemporary">
-			<view @click="submitBtn(1)">开展检查</view>
-			<view @click="submitBtn(2)">检查完成</view>
-		</view>
+		<view class="sub-btn" @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary">开展检查</view>
 	</view>
 
 </template>
@@ -130,17 +122,18 @@
 				//检查项组件数据
 				checkItemModuleType: false,
 				propsData: {},
-				inspectRemporary:false,//待检查和检查中数据状态
-				inspectRemporaryList:[],//待检查和检查中数据状态
+				inspectRemporary: false, //待检查和检查中数据状态
+				inspectRemporaryList: [], //待检查和检查中数据状态
 			}
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
-			console.log('检查项列表',optionData)
+			console.log('检查项列表', optionData)
 			uni.setNavigationBarTitle({
-				title: optionData.subName + '(' + (optionData.pageType == 0 ? (optionData.roomNum?optionData.roomNum:'-') : (optionData
-					.subRoom?optionData
-					.subRoom:'-')) + ')'
+				title: optionData.subName + '(' + (optionData.pageType == 0 ? (optionData.roomNum ? optionData
+					.roomNum : '-') : (optionData
+					.subRoom ? optionData
+					.subRoom : '-')) + ')'
 			})
 			this.$set(this, 'pageType', optionData.pageType);
 			this.$set(this, 'lotName',
@@ -153,9 +146,6 @@
 					value: '0',
 					label: '待检查'
 				}, {
-					value: '2',
-					label: '检查中'
-				}, {
 					value: '1',
 					label: '已检查'
 				}] : (
@@ -191,8 +181,8 @@
 
 		},
 		mounted() {
-			if(this.pageType==0){
-				this.securityAppCheckSetOptionList(this.newData,0)
+			if (this.pageType == 0) {
+				this.securityAppCheckSetOptionList(this.newData, 0)
 			}
 		},
 		methods: {
@@ -269,19 +259,12 @@
 				infoData.hazardCheckPro = row.hazardCheckPro;
 				/* infoData.checkCategory = this.newData.checkCategory;
 				infoData.checkPlanSetVoList = this.newData.checkPlanSetVoList; */
-				if (this.pageType == 0) {
+				if (this.pageType == 0 && this.curTabTow == 0) {
 					//待检查
 					uni.redirectTo({
-						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
-							JSON
-							.stringify(infoData))
-					});
-				}/* 
-				if (this.pageType == 0 && this.curTabTow == 2) {
-					//检查中
-					uni.redirectTo({
-						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
-							encodeURIComponent(JSON
+						url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+							encodeURIComponent(
+								JSON
 								.stringify(infoData))
 					});
 				}
@@ -292,7 +275,25 @@
 							encodeURIComponent(JSON
 								.stringify(infoData))
 					});
-				} */ else if (this.pageType == 1 && this.curTabTow == 0) {
+				}
+				/* 
+								if (this.pageType == 0 && this.curTabTow == 2) {
+									//检查中
+									uni.redirectTo({
+										url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+											encodeURIComponent(JSON
+												.stringify(infoData))
+									});
+								}
+								if (this.pageType == 0 && this.curTabTow == 1) {
+									//已检查
+									uni.redirectTo({
+										url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+											encodeURIComponent(JSON
+												.stringify(infoData))
+									});
+								} */
+				else if (this.pageType == 1 && this.curTabTow == 0) {
 					//待复查
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
@@ -339,7 +340,7 @@
 			},
 			hiddenDangerClick(row) {
 				let infoData = this.newData;
-				infoData.hazardCheckPro = row.hazardCheckPro; 
+				infoData.hazardCheckPro = row.hazardCheckPro;
 				infoData.pageType = this.pageType;
 				infoData.itemsStatus = this.curTabTow;
 				infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
@@ -348,7 +349,7 @@
 						encodeURIComponent(JSON.stringify(infoData))
 				});
 			},
-			
+
 			//
 			async getList() {
 				let self = this;
@@ -429,7 +430,7 @@
 				}
 			},
 			//查询检查项
-			async securityAppCheckSetOptionList(item,checkStatus) {
+			async securityAppCheckSetOptionList(item, checkStatus) {
 				let self = this;
 				let upData = item;
 				let obj = {
@@ -438,30 +439,19 @@
 					checkStatus: checkStatus,
 					manageId: upData.manageId,
 				}
-				this.inspectRemporaryList=[];
+				this.inspectRemporaryList = [];
 				const {
 					data
 				} = await securityAppCheckSetOptionList(obj);
-				if (data.code == 200 && checkStatus==0) {//先查询待检查数据
+				if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
 					if (data.data.records[0]) {
 						self.inspectRemporary = true;
-						this.inspectRemporaryList = [...this.inspectRemporaryList, ...JSON.parse(JSON.stringify(data.data.records))]
-					} else {
-						self.securityAppCheckSetOptionList(item,2);
-						
-					}
-				}else if (data.code == 200 && checkStatus==2) {//查询检查中数据
-					if (data.data.records[0]) {
-						self.inspectRemporary = true;
-						this.inspectRemporaryList = [...this.inspectRemporaryList, ...JSON.parse(JSON.stringify(data.data.records))]
-					} else {
-						self.inspectRemporary = false;
-					}
-				}
+						this.inspectRemporaryList = JSON.parse(JSON.stringify(data.data.records))
+					} 
+				} 
 			},
 			//检查完成
 			async submitBtn(status) {
-				
 				if (status == 1) {
 					//开展检查
 					let infoData = this.inspectRemporaryList[0];
@@ -478,24 +468,7 @@
 								JSON
 								.stringify(infoData))
 					});
-				} else if (status == 2) {
-					//检查完成
-					let obj = {
-						manageId: this.newData.manageId,
-					}
-					const {
-						data
-					} = await securityAppCheckSetOptionFinishCheck(obj);
-					if (data.code == 200) {
-						let infoData = this.newData;
-						uni.redirectTo({
-							url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' +
-								encodeURIComponent(JSON
-									.stringify(infoData))
-						});
-					}
 				}
-
 			},
 
 		}
@@ -546,7 +519,7 @@
 			}
 
 			.tabTitle_tow {
-				width: 520rpx;
+				width: 320rpx;
 				height: 80rpx;
 
 				display flex;
@@ -726,17 +699,17 @@
 
 					>view:nth-of-type(2) {
 						flex: 1;
-						font-size: 24rpx;
+						font-size: 28rpx;
 						color: #3D3D3D;
-						line-height: 34rpx;
+						line-height: 40rpx;
 						text-align: left;
 					}
 				}
 
 				.list-li-b {
-					font-size: 24rpx;
+					font-size: 28rpx;
 					color: #3D3D3D;
-					line-height: 24rpx;
+					line-height: 40rpx;
 					text-align: right;
 
 					>text {
@@ -775,28 +748,14 @@
 			position: fixed;
 			left: 30rpx;
 			bottom: 30rpx;
-
-			>view:nth-of-type(1) {
-				width: 345rpx;
-				height: 100rpx;
-				background: #FF8C00;
-				border-radius: 50rpx 0rpx 0rpx 50rpx;
-				font-size: 30rpx;
-				color: #FFFFFF;
-				line-height: 100rpx;
-				text-align: center;
-			}
-
-			>view:nth-of-type(2) {
-				width: 345rpx;
-				height: 100rpx;
-				background: #0183FA;
-				border-radius: 0rpx 50rpx 50rpx 0rpx;
-				font-size: 30rpx;
-				color: #FFFFFF;
-				line-height: 100rpx;
-				text-align: center;
-			}
+			width: 690rpx;
+			height: 100rpx;
+			background: #0183FA;
+			border-radius: 50rpx 50rpx 50rpx 50rpx;
+			font-size: 30rpx;
+			color: #FFFFFF;
+			line-height: 100rpx;
+			text-align: center;
 		}
 	}
 </style>

+ 291 - 253
pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail.vue

@@ -2,54 +2,63 @@
 <template>
 	<view class="snapshotDetail">
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<!-- <view class="tip" v-if="pageType==0">{{optionData.checkPlanSetVoList.checkName}}</view>
-			<view class="tip-tow" v-if="pageType==1 || pageType==2">{{optionData.checkPlanSetVoList.checkName}}</view> -->
-			<view class="lotName" :class="pageType != 0?'lotNameOne':''" v-if="lotName">{{lotName}}</view>
-			<view class="items">
-				<view class="items-t" v-if="newData.hazardCheckName!=''">
-					<view class="items-t-r">{{newData.hazardCheckCode}} {{newData.hazardCheckName}}</view>
-				</view>
-				<view class="items-b" v-if="newData.hazardCheckName!=''">< {{newData.hazardCheckCode2}}
-					{{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}
-				</view>
-			</view>
-			<view class="items-number" v-if="newData.hazardCheckName!=''" @click="hiddenDangerClick()">
-				此检查项在当前实验室累计出现<text>{{hazardCheckNum}}</text>次隐患</view>
 			<view class="list">
-				<!-- <view class="list-li" v-if="newData.hazardCheckName!=''" @click="inspectDot()">
-					<view>检查要点</view>
-					<view>
-						<img v-if="!newData.inspectDot" src="@/pages_safetyCheck/images/icon_06.png">
-						<img v-if="newData.inspectDot" src="@/pages_safetyCheck/images/icon_06_1.png">
-					</view>
+				<view class="list-li srearch">
+					<view class="srearch-l">{{newData.subName?newData.subName:'实验室名称'}}</view>
 				</view>
-				<view v-if="newData.hazardCheckName!='' && newData.inspectDot" class="hidden-content">{{newData.hazardCheckPoint}}
-				</view> -->
-				<view class="list-li" @click="checkCollapse()">
-					<view>{{newData.checkFlag?'检查结果':'检查隐患'}}</view>
-					<view :id="newData.checkFlag?'fontColor-B':'fontColor-C'">
-						{{newData.checkFlag?'符合':'不符合'}}
-						<img v-if="!newData.checkCollapse" src="@/pages_safetyCheck/images/icon_06.png">
-						<img v-if="newData.checkCollapse" src="@/pages_safetyCheck/images/icon_06_1.png">
+				<view class="list-li" style="margin-bottom: 20rpx;border:none;">
+					<view>
+						{{newData.roomNum?newData.roomNum:''}}房间&{{newData.buildName?newData.buildName:'楼栋'}}&{{newData.deptName?newData.deptName:'学院单位'}}
 					</view>
 				</view>
+				
 				<view v-if="newData.checkCollapse">
-					<view class="hidden-content" v-if="!newData.checkFlag">{{newData.hazardDescribe}}
+					<view class="list-li">
+						<view>现场照片</view>
 					</view>
 					<view v-if="pageType==0" class="photo" @click="lockImg(newData.photoList)">
 						<img v-for="(item,index) in newData.photoList" :src="baseUrl+item.fileUrl">
 					</view>
+					<view class="list-li"  style="border-bottom: none;">
+						<view> {{newData.hazardCheckCode?newData.hazardCheckCode:''}}
+							{{newData.hazardCheckName?newData.hazardCheckName:'检查项'}}
+						</view>
+					</view>
+					<view class="hazardCheckNum" @click="hiddenDangerClick()">
+						<img class="hazardCheckNum-l" src="@/pages_safetyCheck/images/icon_aqjc_yinhuan.png">
+						<view class="hazardCheckNum-r">{{'已连续出现'+hazardCheckNum+'次隐患'}} </view>
+					</view>
+					<view class="list-li">
+						<view>隐患描述</view>
+						<view></view>
+					</view>
+					<view class="hidden" v-if="!newData.checkFlag">
+						<view class="hidden-content">{{newData.hazardDescribe}}</view>
+					</view>
 					<view v-if="pageType==1 || pageType==2" class="photo" @click="lockImg(newData.yhDtoList)">
 						<img v-for="(item,index) in newData.yhDtoList" :src="baseUrl+item.fileUrl">
 					</view>
 					<view class="list-li">
-						<view>姓名:</view>
+						<view>检查人:</view>
 						<view>{{newData.checkUserName}}</view>
 					</view>
 					<view class="list-li">
 						<view>检查时间</view>
 						<view>{{newData.checkTime}}</view>
 					</view>
+					<view class="voice">
+						<view class="voice_t">
+							<view class="voice_t_t" v-if="!newData.voiceList[0]"><text>语音备注:</text><text></text></view>
+							<view class="voice_t_b" v-if="newData.voiceList[0]">语音备注:({{newData.voiceList.length}})</view>
+						</view>
+						<view class="voice_b" v-if="newData.voiceList[0]" v-for="(voiceItem,voiceIndex) in newData.voiceList"
+							:key="voiceIndex">
+							<view class="voice_b_l" @tap="voicePlay(voiceItem.fileUrl)">
+								<img class="add-button" src="@/pages_safetyCheck/images//icon_yybz_yy.png" />
+								{{voiceItem.fileLength}}″
+							</view>
+						</view>
+					</view>
 				</view>
 				<view v-if="pageType==1 || pageType==2" v-for="(item,index) in newData.checkRectifyVoList" :key="index">
 					<view class="list-li" v-if="item.rectifyTime" @click="rectifyCollapse(item)">
@@ -61,7 +70,8 @@
 						</view>
 					</view>
 					<view v-if="item.rectifyCollapse && item.rectifyTime">
-						<view v-if="item.rectifyMeasure" class="hidden-content">{{item.rectifyMeasure}}
+						<view v-if="item.rectifyMeasure" class="hidden">
+							<view class="hidden-content">{{item.rectifyMeasure}}</view>
 						</view>
 						<view class="photo"  @click="lockImg(item.rectifyUploadList)">
 							<img v-for="(item2,index2) in item.rectifyUploadList" :src="baseUrl+item2.fileUrl">
@@ -84,7 +94,10 @@
 						</view>
 					</view>
 					<view v-if="item.reviewCollapse && item.reviewTime">
-						<view v-if="item.examineOpinion" class="hidden-content" >{{item.examineOpinion}}
+						<view v-if="item.examineOpinion"  class="hidden">
+							<view class="hidden">
+								<view class="hidden-content">{{item.examineOpinion}}</view>
+							</view>
 						</view>
 						<view class="photo"  @click="lockImg(item.examineUploadList)">
 							<img v-for="(item3,index3) in item.examineUploadList" :src="baseUrl+item3.fileUrl">
@@ -101,13 +114,13 @@
 				</view>
 			</view>
 		</scroll-view>
-		<view class="sub-btn" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus">
-			<view @click="submitBtn(1)">编辑</view>
-			<view @click="submitBtn(2)">继续检查</view>
+		<view class="subBtn" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus">
+			<img @click="submitBtn(1)" src="@/pages_safetyCheck/images/icon_aqjc_bianji.png" />
+			<img @click="submitBtn(2)" src="@/pages_safetyCheck/images/icon_aqjc_jiancha.png" />
 		</view>
-	<!-- 	<view class="sub-btn" v-if="pageType==1 && !hiddenDangerRecordStatus">
+		<!-- <view class="sub-btn" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus">
 			<view @click="submitBtn(1)">编辑</view>
-			<view @click="submitBtn(2)">继续查</view>
+			<view @click="submitBtn(2)">继续查</view>
 		</view> -->
 		<view class="sub-btn-tow" v-if="pageType==1 && !hiddenDangerRecordStatus" @click="submitBtn(2)">继续复查</view>
 		<view class="sub-btn" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify">
@@ -120,6 +133,7 @@
 </template>
 
 <script>
+	const myaudio = uni.createInnerAudioContext();
 	import {
 		config
 	} from '@/api/request/config.js'
@@ -128,9 +142,9 @@
 	} from '@/component/public.js'
 	import {
 		securityAppCheckPlanCheckInfo,
-		securityDraftFindBySetOptionId,
 		securityAppCheckPhotoGetCheckNumBySub,
 		securityAppCheckDangerGetCheckProDetail,
+		securityAppCheckSetOptionList,
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "snapshotDetail",
@@ -181,15 +195,7 @@
 		},
 		mounted() {
 			if(this.pageType==0){
-				//检查
-				if(this.itemsStatus==0 || this.itemsStatus==1){
-					//开始检查-提交的详情
-					this.securityAppCheckPlanCheckInfo();
-				}else if(this.itemsStatus==2){
-					//保存草稿详情
-					this.securityDraftFindBySetOptionId();
-					
-				}
+				this.securityAppCheckPlanCheckInfo();
 			}else if(this.pageType==1 || this.pageType==2){
 				//复查-整改
 				this.securityAppCheckDangerGetCheckProDetail();
@@ -220,27 +226,6 @@
 					
 				}
 			},
-			//获取草稿详情
-			async securityDraftFindBySetOptionId() {
-				let obj = {
-					setOptionId: this.setOptionId,
-				}
-				const {
-					data
-				} = await securityDraftFindBySetOptionId(obj);
-				if (data.code == 200) {
-					uni.setNavigationBarTitle({
-						title: this.optionData.subName + '(' + (this.pageType == 0 ? this.optionData.roomNum?this.optionData.roomNum:'-' : this.optionData.subRoom?this.optionData.subRoom:'-') + ')'
-					})
-					data.data.checkCollapse=true;
-					data.data.inspectDot=false;
-					this.$set(this, 'newData', data.data);
-					this.$set(this.newData, 'checkPlanSetVoList', this.optionData.checkPlanSetVoList);
-					this.$set(this.newData, 'subName', this.optionData.subName);
-					this.$set(this.newData, 'roomNum', this.optionData.roomNum);
-					this.$set(this.newData, 'checkTime', parseTime(data.data.checkTime, "{y}-{m}-{d}"));
-				}
-			},
 			//整改详情
 			async securityAppCheckDangerGetCheckProDetail() {
 				let obj = {
@@ -274,7 +259,42 @@
 			
 				}
 			},
-			
+			async securityAppCheckSetOptionList(item, checkStatus) {
+				let self = this;
+				let upData = item;
+				let obj = {
+					page: 1,
+					pageSize: 20,
+					checkStatus: checkStatus,
+					manageId: upData.manageId,
+				}
+				this.inspectRemporaryList = [];
+				const {
+					data
+				} = await securityAppCheckSetOptionList(obj);
+				if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
+					if (data.data.records[0]) {
+						let infoData = self.optionData;
+						uni.redirectTo({
+							url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
+								encodeURIComponent(JSON
+									.stringify(infoData))
+						});
+					} else {
+						uni.showToast({
+							title: '该实验室暂无检查工作!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+					}
+				} 
+			},
+			//语音备忘播放
+			async voicePlay(item) {
+				myaudio.src = config.base_url + item;
+				myaudio.play();
+			},
 			//获取检查项在当前实验室出现的次数
 			async securityAppCheckPhotoGetCheckNumBySub() {
 				let obj = {
@@ -308,15 +328,9 @@
 					if(this.pageType==0){
 						//检查
 						let infoData = this.optionData;
-						if(this.itemsStatus==2){
-							infoData.checkDraftVo={
-								checkStatus:2,
-							}
-						}
-						
 						infoData.editStatus = true;
 						uni.redirectTo({
-							url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' + encodeURIComponent(
 								JSON
 								.stringify(infoData))
 						});
@@ -324,15 +338,6 @@
 						//复核
 						let infoData=this.optionData
 						infoData.editStatus=true;
-						/* let infoData = {
-							subId: this.subId,
-							hazardCheckPro: this.hazardCheckPro,
-							checkCategory:this.optionData.checkCategory,
-							pageType: this.pageType,
-							itemsStatus: this.itemsStatus,
-							checkPlanSetVoList: this.optionData.checkPlanSetVoList,
-							editStatus:true,
-						}; */
 						uni.redirectTo({
 							url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' + encodeURIComponent(
 								JSON
@@ -342,15 +347,6 @@
 						//整改
 						let infoData=this.optionData
 						infoData.editStatus=true;
-						/* let infoData = {
-							subId: this.subId,
-							hazardCheckPro: this.hazardCheckPro,
-							checkCategory:this.optionData.checkCategory,
-							pageType: this.pageType,
-							itemsStatus: this.itemsStatus,
-							checkPlanSetVoList: this.optionData.checkPlanSetVoList,
-							editStatus:true,
-						}; */
 						uni.redirectTo({
 							url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' + encodeURIComponent(
 								JSON
@@ -361,13 +357,17 @@
 					
 				} else if (status == 2) {
 					//继续检查
-					let infoData = this.optionData;
-
-					uni.redirectTo({
-						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
-							encodeURIComponent(JSON
-								.stringify(infoData))
-					});
+					if(this.pageType==0){
+						this.securityAppCheckSetOptionList(this.optionData,0)
+					}else{
+						let infoData = this.optionData;
+						uni.redirectTo({
+							url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
+								encodeURIComponent(JSON
+									.stringify(infoData))
+						});
+					}
+					
 				}
 			},
 			//图片预览
@@ -412,31 +412,6 @@
 		padding-bottom: 160rpx;
 		box-sizing: border-box;
 
-		#bgColor-A {
-			color: #FFD400;
-		}
-
-		#bgColor-B {
-			color: #FF8C00;
-		}
-
-		#bgColor-C {
-			color: #E11608;
-		}
-
-		#fontColor-A {
-			color: #0183FA;
-		}
-
-		#fontColor-B {
-			color: #16B531;
-		}
-
-		#fontColor-C {
-
-			color: #FF8C00;
-		}
-
 		.tip {
 			width: 750rpx;
 			height: 80rpx;
@@ -458,133 +433,28 @@
 			line-height: 80rpx;
 			text-align: center;
 		}
-		.lotName {
-			height: 70rpx;
-			line-height: 70rpx;
-			font-size: 28rpx;
-			background: rgba(1, 131, 250, 0.2);
-			color: #0183FA;
-			text-align: center;
-		}
 		
-		.lotNameOne {
-			background: #F7E0C4;
-			color: #FF8C00;
-		}
-
-		.items {
-			width: 690rpx;
-			min-height: 165rpx;
-			background: #FFFFFF;
-			border-radius: 20rpx 20rpx 20rpx 20rpx;
-			margin: 20rpx 0 0 30rpx;
-
-			.items-li {
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				border-bottom: 1rpx solid #E0E0E0;
-
-				>view:nth-of-type(1) {
-					font-size: 30rpx;
-					color: #333333;
-					line-height: 80rpx;
-					text-align: left;
-				}
-
-				>view:nth-of-type(2) {
-					font-size: 28rpx;
-					color: #666666;
-					line-height: 80rpx;
-					text-align: left;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-				}
-			}
-
-			.items-t {
-				border-bottom: 1rpx solid #E0E0E0;
-				height: 80rpx;
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				padding: 0 30rpx;
-				box-sizing: border-box;
-
-				.items-t-l {
-					width: 175rpx;
-					height: 50rpx;
-					background: #E11608;
-					border-radius: 50rpx 50rpx 50rpx 50rpx;
-					font-size: 30rpx;
-					color: #FFFFFF;
-					line-height: 50rpx;
-					text-align: center;
-					margin-right: 14rpx;
-				}
-
-				.items-t-r {
-					font-size: 30rpx;
-					color: #333333;
-					line-height: 42rpx;
-					text-align: left;
-				}
-			}
-
-			.items-b {
-				padding: 0 30rpx;
-				box-sizing: border-box;
-				height: 80rpx;
-				font-size: 28rpx;
-				color: #666666;
-				line-height: 80rpx;
-				text-align: left;
-			}
-		}
-
-		.items-number {
-			font-size: 24rpx;
-			color: #3D3D3D;
-			line-height: 34rpx;
-			text-align: right;
-			margin: 20rpx 60rpx 0 0;
-
-			>text {
-				font-size: 24rpx;
-				color: #FF0000;
-				line-height: 34rpx;
-				text-align: right;
-			}
-		}
-
 		.list {
-			width: 690rpx;
-			margin: 20rpx 30rpx 0;
-			background: #FFFFFF;
-			border-radius: 20rpx 20rpx 20rpx 20rpx;
-
+			width: 750rpx;
 			.list-li {
 				display: flex;
 				justify-content: space-between;
 				align-items: center;
+				border-bottom: 1rpx solid #E0E0E0;
+				background: #FFFFFF;
 				padding: 0 30rpx;
 				box-sizing: border-box;
-				border-bottom: 1rpx solid #E0E0E0;
-
 				>view:nth-of-type(1) {
 					font-size: 30rpx;
 					color: #333333;
-					line-height: 80rpx;
+					line-height: 100rpx;
 					text-align: left;
 				}
 
 				>view:nth-of-type(2) {
 					font-size: 28rpx;
 					color: #666666;
-					line-height: 80rpx;
+					line-height: 100rpx;
 					text-align: left;
 					display: flex;
 					justify-content: space-between;
@@ -628,29 +498,35 @@
 					height: 30rpx;
 				}
 			}
-
-			.hidden-content {
-				width: 630rpx;
-				min-height: 120rpx;
-				background: #F5F5F5;
-				border-radius: 20rpx 20rpx 20rpx 20rpx;
-				margin: 20rpx 30rpx 0;
-				padding: 20rpx;
-				box-sizing: border-box;
-				font-size: 28rpx;
-				color: #666666;
-				line-height: 39rpx;
-				text-align: left;
+			.hidden{
+				width: 750rpx;
+				background: #fff;
+				overflow: hidden;
+				border-bottom: 2rpx solid #E0E0E0;
+				.hidden-content {
+					border-radius: 20rpx 20rpx 20rpx 20rpx;
+					width: 690rpx;
+					min-height: 180rpx;
+					background: #F5F5F5;
+					margin: 40rpx 30rpx;
+					padding: 20rpx;
+					box-sizing: border-box;
+					font-size: 28rpx;
+					color: #666666;
+					line-height: 44rpx;
+					text-align: left;
+				}
+				
 			}
-
+			
 			.photo {
 				display: flex;
 				justify-content: flex-start;
 				flex-wrap: wrap;
-				margin-top: 20rpx;
-				padding: 0 30rpx;
+				padding: 20rpx 30rpx 0;
 				box-sizing: border-box;
-
+				background: #fff;
+				border-bottom: 2rpx solid #E0E0E0;
 				>img {
 					width: 150rpx;
 					height: 150rpx;
@@ -665,10 +541,172 @@
 			/* .list-li:last-of-type {
 				border: none;
 			} */
+			.hazardCheckNum{
+				border-bottom: 2rpx solid #E0E0E0;
+				padding: 30rpx 40rpx 34rpx 40rpx;
+				box-sizing: border-box;
+				background: #fff;
+				display: flex;
+				justify-content: flex-end;
+				align-items: center;
+				.hazardCheckNum-l{
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 18rpx;
+				}
+				.hazardCheckNum-r{
+					font-size: 28rpx;
+					color: #FF5900;
+					line-height: 40rpx;
+					text-align: left;
+				}
+				
+			}
+		}
+		
+		.srearch {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+		
+			.srearch-l {
+				font-size: 30rpx;
+				color: #333333;
+				line-height: 100rpx;
+				text-align: left;
+			}
+		
+			.srearch-r {
+				width: 30rpx;
+				height: 30rpx;
+				margin-right: 0rpx;
+			}
 		}
 
 	}
-
+	/* 语音备注 */
+	.voice {
+		width: 750rpx;
+		min-height: 100rpx;
+		background: #FFFFFF;
+		border-radius: 20rpx 20rpx 20rpx 20rpx;
+		
+		overflow: hidden;
+	
+		.voice_t {
+			height: 100rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			border-bottom: 2rpx solid #E0E0E0;
+			margin-bottom: 40rpx;
+			.voice_t_t {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				>text:nth-of-type(1) {
+					font-size: 30rpx;
+					color: #333333;
+					line-height: 100rpx;
+				}
+				>text:nth-of-type(2) {
+					font-size: 28rpx;
+					color: #999999;
+					line-height: 100rpx;
+				}
+			}
+	
+			.voice_t_b {
+				width: 100%;
+				font-size: 30rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #333333;
+				line-height: 100rpx;
+				text-align: left;
+				
+			}
+		}
+	
+		.voice_b {
+			display flex;
+			justify-content flex-start;
+			align-items center;
+			margin-bottom: 20rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			.voice_b_l {
+				width: 400rpx;
+				height: 40rpx;
+				background: #0183FA;
+				border-radius: 10rpx;
+				display flex;
+				justify-content flex-start;
+				align-items center;
+				font-size: 24rpx;
+				color: #FFFFFF;
+				line-height: 30rpx;
+				text-align: left;
+	
+				>img {
+					width: 20rpx;
+					height: 20rpx;
+					margin-left: 16rpx;
+					margin-right: 20rpx;
+				}
+			}
+	
+			.voice_b_r {
+				width: 28rpx;
+				height: 28rpx;
+				margin-left: 20rpx;
+			}
+		}
+	
+		.voice-btn {
+			width: 150rpx;
+			height: 150rpx;
+			position: fixed;
+			right: 24rpx;
+			bottom: 176rpx;
+	
+			>img {
+				width: 150rpx;
+				height: 150rpx;
+				position: absolute;
+			}
+	
+			>text {
+				font-size: 24rpx;
+				color: #999999;
+				line-height: 30rpx;
+				text-align: center;
+				position: absolute;
+				top: 84rpx;
+				left: 26rpx;
+			}
+		}
+	}
+	
+	.subBtn {
+		display: flex;
+		justify-content: center;
+		position: fixed;
+		bottom: 30rpx;
+		width: 750rpx;
+		padding: 0 46rpx;
+		box-sizing: border-box;
+	
+		>img {
+			width: 160rpx;
+			height: 160rpx;
+		}
+		>img:nth-of-type(1) {
+			margin-right: 184rpx;
+		}
+	}
 	.sub-btn {
 		display: flex;
 		justify-content: center;

+ 60 - 1
pages_safetyCheck/views/safetyCheck.vue

@@ -35,6 +35,12 @@
 			</view>
 			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
 		</scroll-view>
+		<view class="subBtn">
+			<img class="subBtn-img" @click="saoCode()"
+				src="@/pages_safetyCheck/images/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>
@@ -68,10 +74,14 @@
 	import {
 		securityAppCheckPlanTitleList,
 	} from '@/pages_safetyCheck/api/index.js'
+	import {
+		scanCodeCheck
+	} from '@/pages_safetyCheck/views/scanCodeCheck.vue'
+	
 	export default {
 		name: "planDetail",
 		components: {
-
+			scanCodeCheck,
 		},
 		data() {
 			return {
@@ -111,6 +121,8 @@
 				dialogVisible: false,
 				batchList: [],
 				batchData: {},
+				securityCheck:false,
+				subjectData: {},
 			}
 		},
 		onLoad(option) {
@@ -136,6 +148,43 @@
 					})
 				}
 			},
+			/******调用摄像头******/
+			saoCode() {
+				let self = this;
+				uni.scanCode({
+					onlyFromCamera: true,
+					success: function(res) {
+						let list = res.result.split("?")[1].split("&");
+						let codeData = {};
+						list.forEach((item) => {
+							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)
+						} else {
+							uni.showToast({
+								title: '请扫描正确的二维码',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					}
+				});
+			},
+			//安全检查扫码控制显示隐藏
+			goPage(type,status) {
+				if (type == 'securityCheck') {
+					if(status){
+						this.$set(this, "securityCheck", true)
+					}else{
+						this.$set(this, "securityCheck", false)
+					}
+				} 
+			},
+			
 			//顶部tab点击
 			tabClick(index) {
 				this.$set(this.queryParams, 'page', 1);
@@ -517,5 +566,15 @@
 			color: #16B531;
 			background: rgba(22, 181, 49, 0.2);
 		}
+		.subBtn{
+			position: fixed;
+			bottom: 90rpx;
+			left: 295rpx;
+			z-index: 100;
+			.subBtn-img{
+				width: 160rpx;
+				height: 160rpx;
+			}
+		}
 	}
 </style>

+ 407 - 0
pages_safetyCheck/views/scanCodeCheck.vue

@@ -0,0 +1,407 @@
+<template>
+	<view class="shade">
+		<view class="null-box" @click="dialogClose()"></view>
+		<view class="shade_n">
+			<view class="title">
+				<view>{{dialogTtile}}</view>
+				<!-- <img src="@/pages_safetyCheck/images/icon_06.png"> -->
+			</view>
+			<view class="batch">
+				<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
+					<view class="batch-li-l">
+						<text v-if="dialogStatus==0">{{item.planTitle}}</text>
+						<text v-if="dialogStatus==1">{{item.checkName}}</text>
+					</view>
+					<view class="batch-li-r">
+						<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		securityAppCheckPlanAppTitleList,
+		securityAppCheckManageList,
+		securityAppCheckSetOptionList,
+	} from '@/pages_safetyCheck/api/index.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	export default {
+		name: "iotControl",
+		props: {
+			subjectData: {},
+		},
+		data() {
+			return {
+				baseUrl: config.base_url,
+				newData:{},
+				dialogTtile: '',
+				dialogStatus: 0, //0计划 1批次 2实验室
+				batchList: [],
+				queryParams: {
+					page: 1,
+					pageSize: 100,
+					checkCategory: '', //1校院巡查 2学院自查
+					subId: '',
+				},
+				checkPlanSetVoList: null,
+				form: {},
+				OptionListArr:[],//临时存储检查项
+				planId:'',
+				planTitle:'',
+				checkTypeName:'',
+				crossCheck:'',
+			}
+		},
+		created() {
+			
+		},
+		mounted() {
+			this.$set(this, 'newData', this.subjectData);
+			console.log(this.subjectData)
+			this.$set(this.queryParams, 'subId', this.subjectData.subId);
+			this.securityAppCheckPlanAppTitleList();
+		},
+		methods: {
+			dialogClose() {
+				this.dialogStatus = 0;
+				this.$parent.goPage('securityCheck',false);
+				
+				
+			},
+			//十六进制颜色值和RGB格式转换
+			hexToRgb(hex, opacity = 1) {
+				// 去除#号
+				var color = hex.replace("#", "");
+				// 分割成红、绿、蓝三部分的16进制字符串
+				var red = parseInt(color.substring(0, 2), 16);
+				var green = parseInt(color.substring(2, 4), 16);
+				var blue = parseInt(color.substring(4, 6), 16);
+				return `RGB(${red}, ${green}, ${blue},${opacity})`;
+			},
+			batchClick(row) {
+				let self = this;
+				if (this.dialogStatus == 0) { //计划点击
+					this.$set(this, 'planId', row.planId);
+					this.$set(this, 'planTitle', row.planTitle);
+					this.$set(this, 'checkTypeName', row.checkTypeName);
+					this.$set(this, 'crossCheck', row.crossCheck);
+					if (row.checkPlanSetVoList.length == 1) {
+						//如果只有1个检查批次不弹窗
+						let planSetId = row.checkPlanSetVoList[0].planSetId
+						self.checkPlanSetVoList = row.checkPlanSetVoList[0];
+						self.securityAppCheckManageList(planSetId)
+					} else if (row.checkPlanSetVoList.length == 0) {
+						this.dialogStatus = 0;
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					} else {
+						this.$set(this, 'batchList', row.checkPlanSetVoList);
+						this.dialogStatus = 1;
+						this.dialogTtile = '批次';
+						this.$parent.goPage('securityCheck',true);
+			
+					}
+				} else if (this.dialogStatus == 1) { //批次点击
+					/* this.dialogStatus = 2;
+					this.dialogTtile = '实验室'; */
+					let planSetId = row.planSetId
+					self.checkPlanSetVoList = row;
+					this.securityAppCheckManageList(planSetId)
+				}
+			},
+			//查询计划
+			async securityAppCheckPlanAppTitleList() {
+				this.queryParams.subId = this.newData.subId;
+				this.queryParams.checkStatus = 0;
+				let self = this;
+				const {
+					data
+				} = await securityAppCheckPlanAppTitleList(this.queryParams);
+				if (data.code == 200) {
+					//循环过滤掉当前计划中批次中已经检查完成的
+					data.data.records.forEach(function(item, index) {
+						let list = [];
+						item.checkPlanSetVoList.forEach(function(item2) {
+							if (item2.checkSetProgress != 100) {
+								list.push(item2)
+							}
+						})
+						item.checkPlanSetVoList = list
+					})
+					let list2 = []
+					list2 = data.data.records.filter(function(item) {
+						return item.checkPlanSetVoList.length != 0
+					});
+					data.data.records = list2
+			
+					if (data.data.records.length == 1) { //一个计划
+						this.$set(this, 'planId', data.data.records[0].planId);
+						this.$set(this, 'planTitle', data.data.records[0].planTitle);
+						this.$set(this, 'checkTypeName', data.data.records[0].checkTypeName);
+						this.$set(this, 'crossCheck', data.data.records[0].crossCheck);
+						if (data.data.records[0].checkPlanSetVoList.length == 1) { //1个批次
+							let planSetId = data.data.records[0]
+							if (data.data.records[0].checkPlanSetVoList[0]) { //一个批次
+								let planSetId = data.data.records[0].checkPlanSetVoList[0].planSetId
+								self.checkPlanSetVoList = data.data.records[0].checkPlanSetVoList[0];
+								self.securityAppCheckManageList(planSetId)
+							}
+						} else if (data.data.records[0].checkPlanSetVoList.length == 0) {
+							this.dialogStatus = 0;
+							uni.showToast({
+								title: '该实验室暂无检查计划!',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+							return
+						} else { //多个批次
+							this.dialogStatus = 1;
+							this.batchList = data.data.records[0].checkPlanSetVoList;
+							this.$parent.goPage('securityCheck',true);
+							this.dialogTtile = '批次';
+						}
+			
+					} else if (data.data.records.length==0) {
+						this.dialogStatus = 0;
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					} else { //多个计划
+						this.batchList = data.data.records;
+						this.$parent.goPage('securityCheck',true);
+						this.dialogTtile = '计划标题';
+					}
+				}
+			},
+			//检查任务-在此结果里对比实验室Id判断是否有实验室
+			async securityAppCheckManageList(planSetId) {
+				let self = this;
+				let obj = {
+					page: 1,
+					pageSize: 20,
+					planSetId: planSetId,
+					subId: self.newData.subId,
+				}
+				const {
+					data
+				} = await securityAppCheckManageList(obj);
+				if (data.code == 200) {
+					//this.shadeList = data.data.records;
+					if (data.data.records[0]) {
+						let manageId = data.data.records[0].manageId;
+						self.securityAppCheckSetOptionList(data.data.records[0],0);
+					} else {
+						self.dialogStatus = 0;
+						this.$parent.goPage('securityCheck',false);
+						uni.showToast({
+							title: '该实验室暂无检查计划!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+			
+				}
+			},
+			//查询检查项
+			async securityAppCheckSetOptionList(item,checkStatus) {
+				let self = this;
+				let upData = item;
+				let obj = {
+					page: 1,
+					pageSize: 20,
+					checkStatus: checkStatus,
+					manageId: upData.manageId,
+				}
+				const {
+					data
+				} = await securityAppCheckSetOptionList(obj);
+				if (data.code == 200 && checkStatus==0) {//先查询待检查数据
+					if (data.data.records[0]) {
+						let infoData = {};
+						infoData.pageType = 0;
+						infoData.itemsStatus = 0;
+						infoData.subName = upData.subName;
+						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
+						infoData.planId = self.planId;
+						infoData.planTitle = self.planTitle;
+						infoData.checkTypeName = self.checkTypeName;
+						infoData.crossCheck = self.crossCheck;
+						
+						infoData.roomNum = upData.roomNum;
+						infoData.subId = data.data.records[0].subId;
+						infoData.manageId = data.data.records[0].manageId;
+						infoData.setOptionId = data.data.records[0].setOptionId;
+						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
+						infoData.checkCategory = data.data.records[0].checkCategory;
+						uni.navigateTo({
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+								encodeURIComponent(
+									JSON
+									.stringify(infoData))
+						});
+					} else {
+						self.securityAppCheckSetOptionList(item,2);
+						
+					}
+				}else if (data.code == 200 && checkStatus==2) {//查询检查中数据
+					if (data.data.records[0]) {
+						let infoData = {};
+						infoData.pageType = 0;
+						infoData.itemsStatus = 0;
+						infoData.subName = upData.subName;
+						infoData.checkPlanSetVoList = self.checkPlanSetVoList;
+						infoData.planId = self.planId;
+						infoData.planTitle = self.planTitle;
+						infoData.checkTypeName = self.checkTypeName;
+						infoData.crossCheck = self.crossCheck;
+						infoData.roomNum = upData.roomNum;
+						infoData.subId = data.data.records[0].subId;
+						infoData.manageId = data.data.records[0].manageId;
+						infoData.setOptionId = data.data.records[0].setOptionId;
+						infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
+						infoData.checkCategory = data.data.records[0].checkCategory;
+						uni.navigateTo({
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+								encodeURIComponent(
+									JSON
+									.stringify(infoData))
+						});
+					} else {
+						self.dialogStatus = 0;
+						this.$parent.goPage('securityCheck',false);
+						uni.showToast({
+							title: '该实验室暂无检查项!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+				}
+			},
+
+
+		},
+		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>

+ 47 - 8
pages_safetyCheck/views/snapshotManage/laboratorySearch.vue

@@ -18,7 +18,11 @@
 			</view>
 			<view class="lab">
 				<view class="lab-info" @click="listClick(item)" v-for="(item,index) in dataList">
-					<img class="lab-info-l" src="@/pages_safetyCheck/images/icon_aqjc_shiyanshi.png">
+					<img v-if="laboratoryStatus!=0" class="lab-info-l"
+						src="@/pages_safetyCheck/images/icon_aqjc_shiyanshi.png">
+					<view :class="item.manageStatus==2?'finished':'notFinished'" v-if="laboratoryStatus==0">
+						{{item.manageStatus==2?'已完成':'未完成'}}
+					</view>
 					<view class="lab-info-c">
 						<view class="lab-info-c-t">
 							<view class="lab-info-c-t-l">{{item.subName}}</view>
@@ -30,8 +34,10 @@
 							</view>
 						</view>
 						<view class="lab-info-c-b">
-							<text v-if="laboratoryStatus==0">{{item.roomNum?item.roomNum:'-'}}房间&{{item.buildName}}</text>
-							<text v-if="laboratoryStatus==1 || laboratoryStatus==2">{{item.subRoom?item.subRoom:'-'}}房间&{{item.buildName}}</text>
+							<text
+								v-if="laboratoryStatus==0">{{item.roomNum?item.roomNum:'-'}}房间&{{item.buildName}}</text>
+							<text
+								v-if="laboratoryStatus==1 || laboratoryStatus==2">{{item.subRoom?item.subRoom:'-'}}房间&{{item.buildName}}</text>
 							<text>{{item.deptName}}</text>
 						</view>
 					</view>
@@ -135,7 +141,7 @@
 				/* self.queryParams.searchValue = '';
 				self.dataList = [];
 				self.getList(); */
-				
+
 				if (this.form.laboratoryStatus == 0 || this.form.laboratoryStatus == 1 || this.form.laboratoryStatus ==
 					2) {
 					uni.redirectTo({
@@ -143,16 +149,16 @@
 							encodeURIComponent(
 								JSON.stringify(this.form))
 					});
-					
+
 				} else if (this.form.laboratoryStatus == 3) { //从计划实验室列表返回
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/snapshotManage/snapshotList?form=' +
 							encodeURIComponent(JSON.stringify(this.form))
 					});
-					
+
 				}
-				
-				
+
+
 			},
 			//十六进制颜色值和RGB格式转换
 			hexToRgb(hex, opacity = 1) {
@@ -410,6 +416,34 @@
 					margin-bottom: 42rpx;
 				}
 
+				.finished {
+					width: 90rpx;
+					height: 90rpx;
+					background: #0183FA;
+					border-radius: 100rpx 100rpx 100rpx 100rpx;
+					font-size: 24rpx;
+					color: #FFFFFF;
+					line-height: 90rpx;
+					text-align: center;
+					margin-left: 30rpx;
+					margin-top: 30rpx;
+					margin-bottom: 32rpx;
+				}
+
+				.notFinished {
+					width: 90rpx;
+					height: 90rpx;
+					background: #E0E0E0;
+					border-radius: 100rpx 100rpx 100rpx 100rpx;
+					font-size: 24rpx;
+					color: #999999;
+					line-height: 90rpx;
+					text-align: center;
+					margin-left: 30rpx;
+					margin-top: 30rpx;
+					margin-bottom: 32rpx;
+				}
+
 				.lab-info-c {
 					margin: 24rpx 30rpx 0 20rpx;
 					flex: 1;
@@ -452,6 +486,11 @@
 						display: flex;
 						justify-content: space-between;
 
+						>text {
+							overflow: hidden;
+							text-overflow: ellipsis;
+							white-space: nowrap;
+						}
 						>text:nth-of-type(1) {
 							font-size: 30rpx;
 							color: #666666;