heyang 6 月之前
父節點
當前提交
ca0dc916e6

+ 3 - 5
pages_safetyCheck/views/inspectManage/conductInspections.vue

@@ -39,7 +39,7 @@
 				<textarea v-if="!form.checkFlag && !checkItemModuleType" class="describe" type="text"
 					v-model="form.hazardDescribe" maxlength="200" placeholder="请填写隐患描述"
 					placeholder-style="font-size:24rpx;color:#999;"></textarea>
-				<view class="list-li" v-if="form.photoList[0]">
+				<view class="list-li">
 					<view>现场照片</view>
 				</view>
 				<view v-if="!form.checkFlag" class="check-for-img-max-box">
@@ -203,8 +203,7 @@
 					console.log(data.data.hazardCheckPoin)
 					//编辑的时候
 					this.$set(this.form, 'checkFlag', data.data.checkFlag ? data.data.checkFlag : false);
-					this.$set(this.form, 'hazardDescribe', data.data.hazardCheckPoint ? data.data.hazardCheckPoint :
-						'');
+					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe:data.data.hazardCheckPoint);
 					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
 					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
 
@@ -222,8 +221,7 @@
 					//编辑的时候
 					data.data.inspectDot = true;
 					this.$set(this, 'newData', data.data);
-					this.$set(this.form, 'hazardDescribe', data.data.hazardCheckPoint ? data.data.hazardCheckPoint :
-						"");
+					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe:data.data.hazardCheckPoint);
 					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 : []);

+ 3 - 3
pages_safetyCheck/views/inspectManage/inspectAdd.vue

@@ -203,10 +203,10 @@
 						this.radioList[1].checked = true
 					}
 
-					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe : '');
+					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe:data.data.hazardCheckPoint);
 					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
 					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
-
+					
 				}
 			},
 			//获取草稿详情
@@ -230,7 +230,7 @@
 						this.radioList[0].checked = false
 						this.radioList[1].checked = true
 					}
-					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe : '');
+				    this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe: data.data.hazardCheckPoint);
 					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
 					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
 				}

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

@@ -27,21 +27,12 @@
 						@click="levelClick(item.levelId)" v-for="(item,index) in levelList">{{item.levelName}}</view>
 				</view>
 				<view class="srearch">
-					<!-- <picker @change="deptChange" :value="deptData.index" :range="deptData.list" :range-key="'deptName'">
-						<view class="college">
-							<view>{{deptData.name?deptData.name:'学院'}}</view>
-							<img src="@/pages_safetyCheck/images/icon_06.png">
-						</view>
-					</picker> -->
-					<view class="srearch-n">
+					<view class="srearch-n" @click="srearchClick()">
 						<view class="srearch-l">
 							<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
 						</view>
-						<input class="srearch-c" type="text" @confirm="carriageReturnRequest" v-model="searchValue"
+						<input class="srearch-c" type="text"  v-model="searchValue"
 							placeholder="搜索实验室" />
-						<!-- <view class="srearch-r" @click="saoCode()">
-							<img src="@/pages_safetyCheck/images/icon_aqjc_sm.png">
-						</view> -->
 					</view>
 				</view>
 				
@@ -195,6 +186,21 @@
 					this.getList();
 				})
 			},
+			//实验室搜索框跳转
+			srearchClick(){
+				let infoData = {};
+				infoData.pageType = this.tabIndexTow;
+				infoData.laboratoryStatus = this.tabIndexTow;
+				infoData.planTitle = this.optionData.planTitle;
+				infoData.checkCategory = this.optionData.checkCategory;
+				infoData.checkTypeName = this.optionData.checkTypeName;
+				infoData.crossCheck = this.optionData.crossCheck;
+				infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
+				uni.navigateTo({
+					url: '/pages_safetyCheck/views/snapshotManage/laboratorySearch?form=' + encodeURIComponent(
+						JSON.stringify(infoData))
+				});
+			},
 			//计划详情
 			planClick() {
 				let infoData = {

+ 22 - 3
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -76,7 +76,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 && (curTabTow==0 || curTabTow==2) && total !=0">
+		<view class="sub-btn" v-if="pageType==0 && total !=0">
 			<view @click="submitBtn(1)">开展检查</view>
 			<view @click="submitBtn(2)">检查完成</view>
 		</view>
@@ -130,6 +130,7 @@
 				//检查项组件数据
 				checkItemModuleType: false,
 				propsData: {},
+				inspectRemporary:[],//临时存储待检查和检查中数据
 			}
 		},
 		onLoad(option) {
@@ -189,7 +190,10 @@
 
 		},
 		mounted() {
-
+			if(this.pageType==0){
+				this.securityAppCheckSetOptionList(0)
+				this.securityAppCheckSetOptionList(2)
+			}
 		},
 		methods: {
 			//滚动事件
@@ -343,6 +347,20 @@
 						encodeURIComponent(JSON.stringify(infoData))
 				});
 			},
+			//判断当前实验室是否有待检查检查中数据
+			async securityAppCheckSetOptionList(checkStatus){
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.queryParams))
+				obj.manageId = this.newData.manageId;
+				obj.checkStatus = checkStatus;
+				obj.checkFlag = this.checkFlag;
+				const {
+					data
+				} = await securityAppCheckSetOptionList(obj);
+				if (data.code == 200) {
+					this.inspectRemporary = [...this.inspectRemporary, ...data.data.records]
+				}
+			},
 			//
 			async getList() {
 				let self = this;
@@ -424,9 +442,10 @@
 			},
 			//检查完成
 			async submitBtn(status) {
+				
 				if (status == 1) {
+					console.log(this.inspectRemporary)
 					//开展检查
-
 					let infoData = this.dataList[0];
 					infoData.pageType = this.pageType;
 					infoData.itemsStatus = this.curTabTow;

+ 130 - 55
pages_safetyCheck/views/snapshotManage/laboratorySearch.vue

@@ -23,8 +23,7 @@
 								:style="'border:1rpx solid '+item.levelColor+';background:'+item.levelColorTow+';'">
 								<text
 									:style="'border-right:1rpx solid '+item.levelColor+';color:'+item.levelColor+';'">{{item.levelName?item.levelName:''}}</text>
-								<text
-									:style="'color:'+item.levelColor+';'">{{item.typeName?item.typeName:''}}</text>
+								<text :style="'color:'+item.levelColor+';'">{{item.typeName?item.typeName:''}}</text>
 							</view>
 						</view>
 						<view class="lab-info-c-b">
@@ -34,7 +33,7 @@
 					</view>
 				</view>
 			</view>
-			
+
 		</scroll-view>
 	</view>
 
@@ -50,7 +49,10 @@
 	} from '@/api/commonality/permission.js'
 	import {
 		securityCheckOptionList,
-		laboratorySubRelInfoGetRelList
+		laboratorySubRelInfoGetRelList,
+		securityAppCheckManageList,
+		securityAppCheckDangerReviewSubList,
+		securityAppCheckDangerGetCheckDangerSubList,
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "hiddenDangerItemsSearch",
@@ -74,6 +76,7 @@
 					subId: '',
 				},
 				total: 0,
+				laboratoryStatus: 0, // 0检查任务1复查验证2隐患整改 3从随手拍页面进入
 
 			}
 		},
@@ -81,8 +84,11 @@
 			if (option.form) {
 				this.form = JSON.parse(decodeURIComponent(option.form));
 				console.log(this.form)
-				if(this.form.subId){
-					this.queryParams.subId=this.form.subId
+				if (this.form.subId) {
+					this.queryParams.subId = this.form.subId
+				}
+				if (this.form.laboratoryStatus) {
+					this.laboratoryStatus = this.form.laboratoryStatus
 				}
 			}
 		},
@@ -95,7 +101,6 @@
 		methods: {
 			//滚动事件
 			scrollGet() {
-				console.log(1)
 				let self = this;
 				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
 					this.$set(this, 'getDataType', true);
@@ -113,7 +118,7 @@
 			},
 			//取消
 			cancelBtn() {
-				let self=this;
+				let self = this;
 				self.queryParams.searchValue = '';
 				self.dataList = [];
 				self.getList();
@@ -129,39 +134,58 @@
 				return `RGB(${red}, ${green}, ${blue},${opacity})`;
 			},
 			listClick(item) {
-				this.$set(this.form, "subId", item.subId)
-				this.$set(this.form, "subName", item.subName)
-				this.$set(this.form, "subRoom", item.roomNum)
-				this.$set(this.form, "deptId", item.deptId)
-				this.$set(this.form, "deptName", item.deptName)
-				this.$set(this.form, "buildId", item.buildId)
-				this.$set(this.form, "buildName", item.buildName)
-				this.$set(this.form, "floorId", item.floorId)
-				this.$set(this.form, "floorName", item.floorName)
-				this.$set(this.form, "typeId", item.typeId)
-				this.$set(this.form, "classTypeNames", item.classTypeNames)
-				this.$set(this.form, "levelId", item.levelId)
-				this.$set(this.form, "classLevelName", item.classLevelName)
-				uni.redirectTo({
-					url: '/pages_safetyCheck/views/snapshotManage/snapshotList?form=' +
-						encodeURIComponent(JSON.stringify(this.form))
-				});
+				if (this.form.laboratoryStatus == 0 || this.form.laboratoryStatus == 1 || this.form.laboratoryStatus ==
+					2) {
+					let infoData = {
+						...item,
+						...this.form
+					};
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
+							encodeURIComponent(
+								JSON.stringify(infoData))
+					});
+				} else if (this.form.laboratoryStatus == 3) { //从计划实验室列表返回
+					this.$set(this.form, "subId", item.subId)
+					this.$set(this.form, "subName", item.subName)
+					this.$set(this.form, "subRoom", item.roomNum)
+					this.$set(this.form, "deptId", item.deptId)
+					this.$set(this.form, "deptName", item.deptName)
+					this.$set(this.form, "buildId", item.buildId)
+					this.$set(this.form, "buildName", item.buildName)
+					this.$set(this.form, "floorId", item.floorId)
+					this.$set(this.form, "floorName", item.floorName)
+					this.$set(this.form, "typeId", item.typeId)
+					this.$set(this.form, "classTypeNames", item.classTypeNames)
+					this.$set(this.form, "levelId", item.levelId)
+					this.$set(this.form, "classLevelName", item.classLevelName)
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/snapshotManage/snapshotList?form=' +
+							encodeURIComponent(JSON.stringify(this.form))
+					});
+				}
+
 
 			},
 
 			//搜索房间接口
 			async getList() {
 				let self = this;
-				const {
-					data
-				} = await laboratorySubRelInfoSelectByPage(this.queryParams);
-				if (data.code == 200) {
-					if (data.data.records[0]) {
+				let obj = JSON.parse(JSON.stringify(this.queryParams));
+				if (this.laboratoryStatus == 0) {
+					obj.planSetId = this.form.checkPlanSetVoList.planSetId;
+					obj.planId = this.form.checkPlanSetVoList.planId;
+					//检查计划
+					const {
+						data
+					} = await securityAppCheckManageList(obj);
+					if (data.code == 200) {
+
 						data.data.records.forEach(function(item) {
-							if(item.levelColor){
-								item.levelColorTow = self.hexToRgb(item.levelColor, 0.2)
+							if (item.classLevelColor) {
+								item.classLevelColorTow = self.hexToRgb(item.classLevelColor, 0.2)
 							}
-							
+
 						})
 						if (self.queryParams.page == 1) {
 							this.dataList = data.data.records;
@@ -176,15 +200,64 @@
 								this.$set(this, 'getDataType', true);
 							}
 						}
-					} else {
-						uni.showToast({
-							title: '未找到相关实验室',
-							icon: "none",
-							mask: true,
-							duration: 2000
-						});
+
+					}
+				} else if (this.laboratoryStatus == 1) {
+					obj.planSetId = this.form.checkPlanSetVoList.planSetId;
+					obj.planId = this.form.checkPlanSetVoList.planId;
+					const {
+						data
+					} = await securityAppCheckDangerReviewSubList(obj);
+					if (data.code == 200) {
+						this.dataList = data.data;
+						this.$set(this, 'getDataType', true);
+					}
+				} else if (this.laboratoryStatus == 2) {
+					obj.planSetId = this.form.checkPlanSetVoList.planSetId;
+					obj.planId = this.form.checkPlanSetVoList.planId;
+					const {
+						data
+					} = await securityAppCheckDangerGetCheckDangerSubList(obj);
+					if (data.code == 200) {
+						this.dataList = data.data;
+						this.$set(this, 'getDataType', true);
+					}
+				} else if (this.laboratoryStatus == 3) {
+					const {
+						data
+					} = await laboratorySubRelInfoSelectByPage(this.queryParams);
+					if (data.code == 200) {
+						if (data.data.records[0]) {
+							data.data.records.forEach(function(item) {
+								if (item.levelColor) {
+									item.levelColorTow = self.hexToRgb(item.levelColor, 0.2)
+								}
+
+							})
+							if (self.queryParams.page == 1) {
+								this.dataList = data.data.records;
+								this.total = data.data.total;
+								if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+									this.$set(this, 'getDataType', true);
+								}
+							} else {
+								this.dataList = [...this.dataList, ...data.data.records]
+								this.total = data.data.total;
+								if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+									this.$set(this, 'getDataType', true);
+								}
+							}
+						} else {
+							uni.showToast({
+								title: '未找到相关实验室',
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
 					}
 				}
+
 			},
 
 		}
@@ -196,8 +269,8 @@
 		height: 100%;
 		display flex;
 		overflow: hidden;
-		.info-max-box {
-		}
+
+		.info-max-box {}
 
 		#totalColor-A {
 			color: #0183FA;
@@ -285,15 +358,17 @@
 				border-bottom: 1rpx solid #E0E0E0;
 			}
 		}
-		.lab{
+
+		.lab {
 			margin-top: 120rpx;
+
 			.lab-info {
 				background: #FFFFFF;
 				display: flex;
 				justify-content: space-between;
 				border: 2rpx dashed #D8D8D8;
-				
-			
+
+
 				.lab-info-l {
 					width: 80rpx;
 					height: 80rpx;
@@ -303,15 +378,15 @@
 					margin-top: 30rpx;
 					margin-bottom: 42rpx;
 				}
-			
+
 				.lab-info-c {
 					margin: 24rpx 30rpx 0 20rpx;
 					flex: 1;
-			
+
 					.lab-info-c-t {
 						display: flex;
 						justify-content: space-between;
-			
+
 						.lab-info-c-t-l {
 							font-size: 30rpx;
 							color: #333333;
@@ -321,7 +396,7 @@
 							text-overflow: ellipsis;
 							white-space: nowrap;
 						}
-			
+
 						.lab-info-c-t-r {
 							display: flex;
 							justify-content: flex-start;
@@ -329,7 +404,7 @@
 							width: 180rpx;
 							height: 40rpx;
 							margin-left: 10rpx;
-			
+
 							>text {
 								display: inline-block;
 								flex: 1;
@@ -340,19 +415,19 @@
 							}
 						}
 					}
-			
+
 					.lab-info-c-b {
 						margin-top: 16rpx;
 						display: flex;
 						justify-content: space-between;
-			
+
 						>text:nth-of-type(1) {
 							font-size: 30rpx;
 							color: #666666;
 							line-height: 30rpx;
 							text-align: left;
 						}
-			
+
 						>text:nth-of-type(2) {
 							font-size: 30rpx;
 							color: #666666;
@@ -362,8 +437,8 @@
 					}
 				}
 			}
-				
+
 		}
-		
+
 	}
 </style>

+ 5 - 4
pages_safetyCheck/views/snapshotManage/snapshotList.vue

@@ -21,7 +21,7 @@
 					<view class="list-li" style="margin-bottom: 20rpx;border:none;">
 						<view>{{form.subRoom?form.subRoom:''}}房间&{{form.buildName?form.buildName:'楼栋'}}&{{form.deptName?form.deptName:'学院单位'}}</view>
 					</view>
-					<view class="list-li"  v-if="form.imgDtoList[0]">
+					<view class="list-li">
 						<view>现场照片</view>
 						<view></view>
 					</view>
@@ -57,9 +57,9 @@
 					</view>
 				</view>
 				<view class="subBtn">
-					<img class="subBtn-l" @click="saoCode()" src="@/pages_safetyCheck/images/icon_aqjc_saoma.png">
-					<img class="subBtn-c" @click="selectImage()" src="@/pages_safetyCheck/images/icon_aqjc_paizhao.png">
-					<img class="subBtn-r" @click="submitForm" src="@/pages_safetyCheck/images/icon_aqjc_tijiao.png">
+					<img class="subBtn-l" @click="saoCode()" src="@/pages_safetyCheck/images/icon_aqjc_saoma.png"/>
+					<img class="subBtn-c" @click="selectImage()" src="@/pages_safetyCheck/images/icon_aqjc_paizhao.png"/>
+					<img class="subBtn-r" @click="submitForm" src="@/pages_safetyCheck/images/icon_aqjc_tijiao.png"/>
 				</view>
 			</view>
 			<!-- 上报记录 -->
@@ -232,6 +232,7 @@
 			//实验室
 			laboratoryClick(){
 				this.form.subId='';
+				this.form.laboratoryStatus=3// 标识是从那个页面进入的实验室搜索页面
 				uni.navigateTo({
 					url: '/pages_safetyCheck/views/snapshotManage/laboratorySearch?form=' + encodeURIComponent(
 						JSON.stringify(this.form))