dedsudiyu 1 月之前
父節點
當前提交
c6a137c69b

+ 6 - 2
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -75,8 +75,8 @@
 		<!-- 	<view class="sub-btn" @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary">开展检查</view> -->
 		<!-- 	<view class="sub-btn" @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary">开展检查</view> -->
 
 
 		<view class="subBtn">
 		<view class="subBtn">
-			<img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')">
-			<img @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary" style="margin-left: 184rpx;"
+			<!-- <img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')"> -->
+			<img @click="submitBtn(1)" v-if="pageType==0 && optionData.manageStatus !=2" style="margin-left: 184rpx;"
 				:src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
 				:src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
 		</view>
 		</view>
 
 
@@ -362,6 +362,7 @@
 							let infoData = data.data[0];
 							let infoData = data.data[0];
 							infoData.pageType = this.pageType;
 							infoData.pageType = this.pageType;
 							infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
 							infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
+							infoData.manageId = this.optionData.manageId;
 							uni.navigateTo({
 							uni.navigateTo({
 								url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
 								url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
 									encodeURIComponent(
 									encodeURIComponent(
@@ -390,6 +391,7 @@
 							let infoData = data.data[0];
 							let infoData = data.data[0];
 							infoData.pageType = this.tabIndexTow;
 							infoData.pageType = this.tabIndexTow;
 							infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
 							infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
+							infoData.manageId = this.optionData.manageId;
 							uni.navigateTo({
 							uni.navigateTo({
 								url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
 								url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
 									encodeURIComponent(
 									encodeURIComponent(
@@ -415,6 +417,7 @@
 				infoData.itemsStatus = this.curTabTow;
 				infoData.itemsStatus = this.curTabTow;
 				infoData.setOptionId = row.setOptionId;
 				infoData.setOptionId = row.setOptionId;
 				infoData.hazardCheckPro = row.hazardCheckPro;
 				infoData.hazardCheckPro = row.hazardCheckPro;
+				infoData.manageId = this.optionData.manageId;
 				/* infoData.checkCategory = this.optionData.checkCategory;
 				/* infoData.checkCategory = this.optionData.checkCategory;
 				infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList; */
 				infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList; */
 				if (this.pageType == 0 && this.curTabTow == 0) {
 				if (this.pageType == 0 && this.curTabTow == 0) {
@@ -644,6 +647,7 @@
 					//开展检查
 					//开展检查
 					let infoData = this.checkPlanList[0];
 					let infoData = this.checkPlanList[0];
 					infoData.manageId = this.optionData.manageId;
 					infoData.manageId = this.optionData.manageId;
+					infoData.manageStatus = this.optionData.manageStatus;
 					infoData.planSetId = this.optionData.planSetId;
 					infoData.planSetId = this.optionData.planSetId;
 					infoData.hazardCheckPro = this.checkPlanList[0].hazardCheckPro;
 					infoData.hazardCheckPro = this.checkPlanList[0].hazardCheckPro;
 					infoData.pageType = this.pageType;
 					infoData.pageType = this.pageType;

+ 132 - 7
pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail.vue

@@ -117,10 +117,10 @@
 		</scroll-view>
 		</scroll-view>
 		<view class="subBtn">
 		<view class="subBtn">
 			<!-- 检查 -->
 			<!-- 检查 -->
-			<img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')">
-			<img @click="submitBtn(1)" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus"
+			<!-- <img @click="saoCode()" v-if="pageType==0" :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')"> -->
+			<img @click="submitBtn(1)" v-if="pageType==0 && newData.checkSetProgress !=100 && !hiddenDangerRecordStatus && optionData.manageStatus !=2"
 				style="margin-left: 60rpx;" :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
 				style="margin-left: 60rpx;" :src="imagesUrl('safetyCheck/icon_aqjc_bianji.png')" />
-			<img @click="submitBtn(2)" v-if="pageType==0 && newData.checkSetProgress !=100" style="margin-left: 60rpx;" 
+			<img @click="submitBtn(2)" v-if="pageType==0 && newData.checkSetProgress !=100 && optionData.manageStatus !=2" style="margin-left: 60rpx;" 
 				:src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
 				:src="imagesUrl('safetyCheck/icon_aqjc_jiancha.png')" />
 			<!-- 整改 -->	
 			<!-- 整改 -->	
 			<img @click="submitBtn(1)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
 			<img @click="submitBtn(1)" v-if="pageType==2 && !hiddenDangerRecordStatus && !newData.finishRectify"
@@ -153,6 +153,8 @@
 		securityAppCheckDangerReviewSubList,
 		securityAppCheckDangerReviewSubList,
 		securityAppCheckDangerGetCheckDangerSubList,
 		securityAppCheckDangerGetCheckDangerSubList,
 		securityAppCheckManageList,
 		securityAppCheckManageList,
+		securityAppCheckPlanSetGetOptionList,
+		securityCheckOptionSelAllList,
 	} from '@/pages_safetyCheck/api/index.js'
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 	export default {
 		name: "snapshotDetail",
 		name: "snapshotDetail",
@@ -176,13 +178,11 @@
 				optionData: null,
 				optionData: null,
 				lotName: null,
 				lotName: null,
 				hiddenDangerRecordStatus: null, //判断是否是从隐患列表页面跳转过来
 				hiddenDangerRecordStatus: null, //判断是否是从隐患列表页面跳转过来
-
+				checkPlanList:[],
 			}
 			}
 		},
 		},
 		onLoad(option) {
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
-			console.log('详情', optionData)
-
 			this.$set(this, 'pageType', optionData.pageType);
 			this.$set(this, 'pageType', optionData.pageType);
 			this.$set(this, 'itemsStatus', optionData.itemsStatus);
 			this.$set(this, 'itemsStatus', optionData.itemsStatus);
 			this.$set(this, 'setOptionId', optionData.setOptionId);
 			this.$set(this, 'setOptionId', optionData.setOptionId);
@@ -205,6 +205,7 @@
 		},
 		},
 		mounted() {
 		mounted() {
 			if (this.pageType == 0) {
 			if (this.pageType == 0) {
+				this.securityCheckOptionSelAllList();
 				this.securityAppCheckPlanCheckInfo();
 				this.securityAppCheckPlanCheckInfo();
 			} else if (this.pageType == 1 || this.pageType == 2) {
 			} else if (this.pageType == 1 || this.pageType == 2) {
 				//复查-整改
 				//复查-整改
@@ -520,7 +521,28 @@
 				} else if (status == 2) {
 				} else if (status == 2) {
 					//继续检查
 					//继续检查
 					if (this.pageType == 0) {
 					if (this.pageType == 0) {
-						this.securityAppCheckSetOptionList(this.optionData, 0)
+						//开展检查
+						let infoData = this.checkPlanList[0];
+						console.log('infoData',infoData)
+						console.log('optionData',this.optionData)
+						infoData.manageId = this.optionData.manageId;
+						infoData.manageStatus = this.optionData.manageStatus;
+						infoData.planSetId = this.optionData.planSetId;
+						infoData.hazardCheckPro = this.checkPlanList[0].hazardCheckPro;
+						infoData.pageType = this.pageType;
+						infoData.itemsStatus = this.curTabTow;
+						infoData.checkCategory = this.optionData.checkCategory;
+						infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
+						infoData.subId = this.optionData.subId;
+						infoData.subName = this.optionData.subName;
+						infoData.roomNum = this.optionData.roomNum;
+						infoData.subRoom = this.optionData.subRoom;
+						uni.redirectTo({
+							url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+								encodeURIComponent(
+									JSON
+									.stringify(infoData))
+						});
 					} else {
 					} else {
 						let infoData = this.optionData;
 						let infoData = this.optionData;
 						uni.redirectTo({
 						uni.redirectTo({
@@ -562,6 +584,109 @@
 			reviewCollapse(row) {
 			reviewCollapse(row) {
 				row.reviewCollapse = !row.reviewCollapse
 				row.reviewCollapse = !row.reviewCollapse
 			},
 			},
+			//基础检查项检查
+			async securityCheckOptionSelAllList() {
+				let self = this;
+				const {
+					data
+				} = await securityCheckOptionSelAllList({});
+				if (data.code == 200) {
+					let maxList = this.getCascaderData(JSON.parse(JSON.stringify(data.data)), 2)
+					this.$nextTick(() => {
+							this.securityAppCheckPlanSetGetOptionList(maxList);
+					})
+				}
+			},
+			//查询批次下-检查项
+			async securityAppCheckPlanSetGetOptionList(maxList){
+				let self = this;
+				const {
+					data
+				} = await securityAppCheckPlanSetGetOptionList({
+					planSetId:this.optionData.planSetId,
+					searchValue: this.searchValue
+				});
+				if (data.code == 200) {
+					if (data.data[0]) {
+						let minList = JSON.parse(JSON.stringify(data.data))
+						this.newCascadeData(maxList, minList);
+					}
+				}
+			},
+			newCascadeData(maxList, minList) {
+				let list = [];
+				for (let i = 0; i < maxList.length; i++) {
+					for (let o = 0; o < maxList[i].children.length; o++) {
+						for (let x = 0; x < minList.length; x++) {
+							if (maxList[i].children[o].id == minList[x].parentId) {
+								// //三级
+								minList[x].level = 3;
+								minList[x].hazardCheckPro = minList[x].id
+								minList[x].hazardCheckCode = minList[x].code
+								minList[x].hazardCheckName = minList[x].name
+								minList[x].hazardCheckPro2 = maxList[i].children[o].id
+								minList[x].hazardCheckCode2 = maxList[i].children[o].code
+								minList[x].hazardCheckName2 = maxList[i].children[o].name
+								minList[x].hazardCheckPro1 = maxList[i].id
+								minList[x].hazardCheckCode1 = maxList[i].code
+								minList[x].hazardCheckName1 = maxList[i].name
+								minList[x].hazardCheckPoint = minList[x].mainPoint.split('#')[0]
+								list.push(minList[x])
+							}
+						}
+					}
+				}
+				this.$set(this, 'checkPlanList', JSON.parse(JSON.stringify(list)));
+			},
+			getCascaderData(list, type) {
+				let self = this
+				for (let i = 0; i < list.length; i++) {
+					if (list[i].level == type) {
+						delete list[i].children
+					} else if (list[i].children) {
+						if (list[i].children[0]) {
+							list[i].children = self.getCascaderData(list[i].children, type)
+						} else {
+							list.splice(i, 1)
+							i--
+						}
+					} else {
+						list.splice(i, 1)
+						i--
+					}
+				}
+				for (let i = 0; i < list.length; i++) {
+					if (list[i].level == type) {
+						delete list[i].children
+					} else if (list[i].children) {
+						if (list[i].children[0]) {
+							list[i].children = self.getCascaderData(list[i].children, type)
+						} else {
+							list.splice(i, 1)
+							i--
+						}
+					} else {
+						list.splice(i, 1)
+						i--
+					}
+				}
+				for (let i = 0; i < list.length; i++) {
+					if (list[i].level == type) {
+						delete list[i].children
+					} else if (list[i].children) {
+						if (list[i].children[0]) {
+							list[i].children = self.getCascaderData(list[i].children, type)
+						} else {
+							list.splice(i, 1)
+							i--
+						}
+					} else {
+						list.splice(i, 1)
+						i--
+					}
+				}
+				return list
+			},
 		}
 		}
 	}
 	}
 </script>
 </script>