heyang hai 6 meses
pai
achega
132de76dee

+ 2 - 1
api/request/config.js

@@ -1,7 +1,7 @@
 const config = {
 	// base_url: 'http://192.168.1.43/api', //43服务器
 	// base_url: 'http://192.168.1.8/api',//1.8服务器
-	base_url: 'http://192.168.1.9:8080',//柴
+	//base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	// base_url: 'http://192.168.1.17:8080',//小飞
@@ -21,6 +21,7 @@ const config = {
 	// base_url: 'https://lab.zjznai.com/kdwclabSystem/', //矿大文昌地址
 	// base_url: 'https://znyj.zjznai.suda.edu.cn/labSystem/', //苏大临时地址
 	// base_url: 'https://labcontrol.nwafu.edu.cn/labSystem/', //西北农林
+	 base_url: 'https://lab.zjznai.com/labapp/', //43测试
 }
 export {
 	config

+ 6 - 0
pages.json

@@ -926,6 +926,12 @@
 						"navigationBarTitleText": "开始检查"
 					}
 				},
+				{
+					"path": "views/inspectManage/conductInspections",
+					"style": {
+						"navigationBarTitleText": "开展检查"
+					}
+				},
 				{
 					"path": "views/inspectManage/hiddenDangerRecord",
 					"style": {

+ 8 - 1
pages_safetyCheck/api/index.js

@@ -227,7 +227,14 @@ export const securityAppCheckSetOptionFinishCheck = (data) => {
     })
 };
 
-
+//隐患整改列表
+export const securityAppCheckDangerGetCheckDangerBySub = (data) => {
+    return apiResquest({
+        url: '/security/appCheckDanger/getCheckDangerBySub',
+       method: 'POST',
+       data: { ...data }
+    })
+};
 
 
 

+ 981 - 0
pages_safetyCheck/views/inspectManage/conductInspections.vue

@@ -0,0 +1,981 @@
+<!-- 开展检查 -->
+<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}} <</view>
+			</view>
+			<view class="items-number">此检查项在当前实验室累计出现<text>{{hazardCheckNum}}</text>次隐患</view>
+			<view class="list">
+				<view class="list-li">
+					<view>检查要点</view>
+					<view>
+						<img src="@/pages_safetyCheck/images/icon_06.png">
+					</view>
+				</view>
+				<view class="hidden-content">{{newData.hazardCheckPoint}}
+				</view>
+				<view class="radio_group">
+					<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>
+				<textarea v-if="!form.checkFlag" class="describe" type="text" v-model="form.hazardDescribe"
+					maxlength="200" placeholder="请填写隐患描述" placeholder-style="font-size:24rpx;color:#999;"></textarea>
+				<view v-if="!form.checkFlag" class="check-for-img-max-box">
+					<view class="left-title-p"></view>
+					<view class="right-img-box">
+						<view class="img-box" v-for="(imgUrl,imgIndex) in form.photoList" :key="imgIndex">
+							<img class="img-data" :src="baseUrl+imgUrl.fileUrl">
+							<img class="position-img" src="@/pages_safetyCheck/images/icon_ssp_closure.png"
+								@click="delImg(imgIndex)">
+						</view>
+						<img class="add-button" src="@/pages_safetyCheck/images/img_ssp_pz@1x.png"
+							@click="selectImage()" v-if="form.photoList.length<5">
+					</view>
+				</view>
+			</view>
+			<view class="voice">
+				<view class="voice_t">
+					<view class="voice_t_t" v-if="!form.voiceList[0]">语音备注:(选填)</view>
+					<view class="voice_t_b" v-if="form.voiceList[0]">语音备注:({{form.voiceList.length}})</view>
+				</view>
+				<view class="voice_b" v-if="form.voiceList[0]" v-for="(voiceItem,voiceIndex) in form.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>
+					<img class="voice_b_r" src="@/pages_safetyCheck/images/icon_yybz_sc.png"
+						@tap="voiceDele('',voiceIndex)" />
+				</view>
+				<view class="voice-btn">
+					<img class="voice_t_r" src="@/pages_safetyCheck/images/icon_sskz_azsh.png"
+						@longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton"
+						@touchend.stop="sendButton(item,$event)" />
+					<text>按住说话</text>
+				</view>
+			</view>
+		</scroll-view>
+		<checkItemModule :propsData="propsData" v-if="checkItemModuleType"></checkItemModule>
+		<view class="sub-btn">
+			<view @click="submitForm(1)">保存草稿</view>
+			<view @click="submitForm(2)">提交</view>
+		</view>
+	</view>
+
+</template>
+
+<script>
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		securityAppCheckPlanCheckInfo,
+		securityAppCheckSetOptionCheckCommit,
+		securityDraftFindBySetOptionId,
+		securityAppCheckPhotoGetCheckNumBySub,
+	} from '@/pages_safetyCheck/api/index.js'
+	import {
+		checkItemModule
+	} from '@/pages_safetyCheck/component/checkItemModule.vue'
+	export default {
+		name: "inspectAdd",
+		components: {
+			checkItemModule
+		},
+		data() {
+			return {
+				baseUrl: config.base_url,
+				form: {
+					checkFlag: false,
+					photoList: [],
+					voiceList: [],
+				},
+				newData: {},
+				radioList: [{
+						id: 1,
+						name: '符合',
+						checked: false,
+					},
+					{
+						id: 0,
+						name: '不符合',
+						checked: true,
+					},
+				],
+				pageType: '',
+				itemsStatus: '',
+				setOptionId: '', //检查项id
+				manageId: '', //检查管理id
+				subId: '',
+				hazardCheckPro: '',
+				hazardCheckNum: 0,
+				sendLock: true, //发送锁,当为true时上锁,false时解锁发送
+				recorderManager: wx.getRecorderManager(),
+				optionData: null,
+				//检查项组件数据
+				checkItemModuleType: false,
+				propsData: {},
+			}
+		},
+		onLoad(option) {
+			let optionData = JSON.parse(decodeURIComponent(option.infoData));
+			uni.setNavigationBarTitle({
+				title: optionData.subName + '(' + (optionData.pageType == 0 ? optionData.roomNum : optionData
+					.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);
+
+		},
+		onShow() {
+
+		},
+		mounted() {
+			if (this.pageType == 0) {
+				//检查
+				if (this.itemsStatus == 0 || this.itemsStatus == 1) {
+					//开始检查-提交的详情
+					this.securityAppCheckPlanCheckInfo();
+				} else if (this.itemsStatus == 2) {
+					//保存草稿详情
+					this.securityDraftFindBySetOptionId();
+
+
+				}
+			}
+			this.securityAppCheckPhotoGetCheckNumBySub();
+		},
+		methods: {
+			//获取提交详情
+			async securityAppCheckPlanCheckInfo() {
+				let obj = {
+					setOptionId: this.setOptionId,
+					manageId: this.manageId,
+				}
+				const {
+					data
+				} = await securityAppCheckPlanCheckInfo(obj);
+				if (data.code == 200) {
+					this.$set(this, 'newData', data.data);
+					//编辑的时候
+					this.$set(this.form, 'checkFlag', data.data.checkFlag ? data.data.checkFlag : false);
+					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe : '');
+					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
+					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
+
+				}
+			},
+			//获取草稿详情
+			async securityDraftFindBySetOptionId() {
+				let obj = {
+					setOptionId: this.setOptionId,
+				}
+				const {
+					data
+				} = await securityDraftFindBySetOptionId(obj);
+				if (data.code == 200) {
+					//编辑的时候
+					this.$set(this, 'newData', data.data);
+					this.$set(this.newData, 'checkPlanSetVoList', this.optionData.checkPlanSetVoList);
+					this.$set(this.form, 'checkFlag', data.data.checkFlag ? data.data.checkFlag : false);
+					this.$set(this.form, 'hazardDescribe', data.data.hazardDescribe ? data.data.hazardDescribe : '');
+					this.$set(this.form, 'photoList', data.data.photoList ? data.data.photoList : []);
+					this.$set(this.form, 'voiceList', data.data.voiceList ? data.data.voiceList : []);
+				}
+			},
+			//获取检查项在当前实验室出现的次数
+			async securityAppCheckPhotoGetCheckNumBySub() {
+				let obj = {
+					subId: this.subId,
+					hazardCheckPro: this.hazardCheckPro,
+				}
+				const {
+					data
+				} = await securityAppCheckPhotoGetCheckNumBySub(obj);
+				if (data.code == 200) {
+					this.$set(this, 'hazardCheckNum', data.data);
+
+				}
+			},
+			checkItemModuleButton(type, item) {
+				if (type == 'open') {
+					let obj = {
+						infoType: this.pageType,
+						checkType: 0,
+					}
+					if (this.pageType == 0) {
+						//检查
+						obj.manageId = this.optionData.manageId
+					} 
+					this.$set(this, 'propsData', obj);
+					this.$set(this, 'checkItemModuleType', true);
+				} else if (type == 'out') {
+					this.$set(this, 'checkItemModuleType', false);
+					this.$set(this, 'propsData', {});
+				} else if (type == 'submit') {
+					//this.itemsClick(item);
+					this.$set(this.newData, 'hazardCheckCode', item.hazardCheckCode);
+					this.$set(this.newData, 'hazardCheckName', item.hazardCheckName);
+					this.$set(this.newData, 'hazardCheckCode2', item.hazardCheckCode2);
+					this.$set(this.newData, 'hazardCheckName2', item.hazardCheckName2);
+					this.$set(this.newData, 'hazardCheckPoint', item.hazardCheckPoint);
+					this.$set(this, 'hazardCheckPro', item.hazardCheckPro);
+					this.securityAppCheckPhotoGetCheckNumBySub();
+					this.$set(this, 'checkItemModuleType', false);
+				}
+			},
+			//提交
+			async submitForm(status) {
+				if (!this.form.checkFlag) {
+					if (!this.form.hazardDescribe) {
+						uni.showToast({
+							title: '请填写隐患描述!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+					if (!this.form.photoList[0]) {
+						uni.showToast({
+							title: '请选择现场照片!',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+						return
+					}
+				}
+				let obj = {
+					checkFlag: this.form.checkFlag,
+					checkStatus: status == 1 ? 2 : 1,
+					hazardDescribe: this.form.hazardDescribe,
+					setOptionId: this.setOptionId,
+					photoList: this.form.photoList,
+					voiceList: this.form.voiceList,
+				}
+				const {
+					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
+						});
+					}
+					let infoData = {
+						setOptionId: this.setOptionId,
+						manageId: this.manageId,
+						subId: this.subId,
+						hazardCheckPro: this.hazardCheckPro,
+						pageType: this.pageType,
+						itemsStatus: status == 1 ? 2 : 0,
+						checkPlanSetVoList: this.optionData.checkPlanSetVoList,
+						subName: this.optionData.subName,
+						roomNum: this.optionData.roomNum,
+						subRoom: this.optionData.subRoom,
+					};
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+							encodeURIComponent(JSON
+								.stringify(infoData))
+					});
+				}
+			},
+			//滚动事件
+			scrollGet() {},
+			//单选按钮
+			radioClick(d) {
+				let self = this;
+				d.checked = !d.checked
+				if (d.checked) {
+					//如果有选中的,循环把其他选中的取消
+					this.radioList.forEach(function(item) {
+						if (item.id == d.id) {
+							self.$set(self.form, 'checkFlag', item.id);
+						} else {
+							item.checked = false;
+						}
+					})
+				} else {
+
+				}
+
+			},
+			/******图片上传******/
+			selectImage() {
+				let self = this;
+				if (this.form.photoList.length > 4) {
+					uni.showToast({
+						title: '最多上传5张图片',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				wx.chooseImage({
+					count: 1,
+					sizeType: ["original", "compressed"],
+					sourceType: ["album", "camera"],
+					success: function(res) {
+						let tempFilePaths = res.tempFilePaths[0];
+						self.uploadImg(tempFilePaths);
+					}
+				});
+			},
+			async uploadImg(tempFilePaths) {
+				var self = this;
+				uni.showLoading({
+					title: '上传中',
+					mask: true
+				});
+				uni.uploadFile({
+					url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
+					header: {
+						'Authorization': uni.getStorageSync('token')
+					},
+					filePath: tempFilePaths,
+					name: 'file',
+					formData: {
+						'user': 'test'
+					},
+					success: (uploadFileRes) => {
+						let res = JSON.parse(uploadFileRes.data);
+						if (res.code == 200) {
+							this.form.photoList.push({
+								'fileUrl': res.data.url,
+								'fileName': res.data.name
+							});
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					},
+					fail: err => {},
+					complete: () => {
+						uni.hideLoading()
+					}
+				});
+			},
+			//删除图片
+			delImg(minIndex) {
+				this.form.photoList.splice(minIndex, 1);
+				this.$forceUpdate();
+			},
+			/******语音备注  *******/
+			//语音备忘播放
+			async voicePlay(item) {
+				myaudio.src = config.base_url + item;
+				myaudio.play();
+			},
+			//语音备忘删除
+			async voiceDele(item, voiceIndex) {
+				let self = this;
+				uni.showModal({
+					title: '',
+					cancelColor: '#999999',
+					confirmColor: '#FF6E6E',
+					content: '确定删除此语音吗?',
+					success(res) {
+						if (res.confirm) {
+							console.log('用户点击确定')
+							self.form.voiceList.splice(voiceIndex, 1);
+							self.$forceUpdate();
+						} else if (res.cancel) {
+							console.log('用户点击取消')
+
+						}
+					}
+				})
+
+			},
+			//录制
+			recordButton(item, e) {
+				console.log("按下")
+				let self = this;
+				if (this.form.voiceList.length >= 5) {
+					uni.showToast({
+						title: '语音备忘最多只能上传5条',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+				this.liveType = true;
+				console.log('录制', e)
+				this.startPoint = e.touches[0]; //记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
+				const options = {
+					duration: 60000,
+					sampleRate: 16000,
+					numberOfChannels: 1,
+					encodeBitRate: 48000,
+					format: 'mp3',
+					frameSize: 50
+				}
+				this.recorderManager.start(options); //开始录音
+				this.recorderManager.onStart(() => {
+					console.log('recorder start')
+				})
+				this.recorderManager.onError((res) => {
+					console.log(res);
+				})
+				wx.showToast({
+					title: "正在录音,上划取消发送",
+					icon: "none",
+					duration: 60000 //先定义个60秒,后面可以手动调用wx.hideToast()隐藏
+				});
+				this.sendLock = false; //长按时是不上锁的。
+			},
+			//取消
+			cancelButton(e) {
+				console.log("移动")
+				let self = this;
+
+				this.liveType = false;
+				console.log('取消', e)
+				let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
+				if (Math.abs(moveLenght) > 50) {
+					wx.showToast({
+						title: "松开手指,取消发送",
+						icon: "none",
+						duration: 60000
+					});
+					this.sendLock = true; //触发了上滑取消发送,上锁
+				} else {
+					wx.showToast({
+						title: "正在录音,上划取消发送",
+						icon: "none",
+						duration: 60000
+					});
+					this.sendLock = false; //上划距离不足,依然可以发送,不上锁
+				}
+			},
+			//发送
+			sendButton(item, e) {
+				console.log("松开")
+				let self = this;
+
+				this.liveType = false;
+				console.log('发送', e)
+				wx.hideToast(); //结束录音、隐藏Toast提示框
+				this.recorderManager.stop(); //结束录音
+				this.recorderManager.onStop((res) => {
+
+					if (!this.sendLock) {
+
+						this.uploadVoice(item, res.duration, res.tempFilePath);
+					}
+					console.log('停止录音', res.tempFilePath)
+					console.log("sendLock", this.sendLock);
+				})
+			},
+			//上传MP3
+			async uploadVoice(item, times, tempFilePaths) {
+
+				var self = this;
+				uni.uploadFile({
+					url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
+					header: {
+						'Authorization': uni.getStorageSync('token')
+					},
+					filePath: tempFilePaths,
+					name: 'file',
+					formData: {
+						'user': 'test'
+					},
+					success: (uploadFileRes) => {
+						let res = JSON.parse(uploadFileRes.data);
+						if (res.code == 200) {
+							console.log("上传成功", res)
+							console.log(item)
+							let seconds = Math.round((parseInt(times) % (1000 * 60)) / 1000);
+							this.form.voiceList.push({
+								'fileLength': seconds,
+								'fileUrl': res.data.url,
+								'fileName': res.data.name
+							})
+							console.log(JSON.stringify(self.voice))
+							//self.textParseUrlIps(res.data.url);
+							// self.newData.imgList.push(res.data.url);
+						} else {
+							uni.showToast({
+								title: res.msg,
+								icon: "none",
+								mask: true,
+								duration: 2000
+							});
+						}
+					},
+					fail: err => {
+						uni.hideLoading()
+					},
+					complete: () => {}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="stylus" scoped>
+	.inspectAdd {
+		height: 100%;
+		display flex;
+		box-sizing: border-box;
+		padding-bottom: 160rpx;
+		box-sizing: border-box;
+
+		#bgColor-A {
+			color: #FFD400;
+		}
+
+		#bgColor-B {
+			color: #FF8C00;
+		}
+
+		#bgColor-C {
+			color: #E11608;
+		}
+
+		.tip {
+			width: 750rpx;
+			height: 80rpx;
+			background: rgba(1, 131, 250, 0.2);
+			font-weight: normal;
+			font-size: 28rpx;
+			color: #0183FA;
+			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: 690rpx;
+			margin: 20rpx 30rpx 0;
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 20rpx 20rpx;
+
+			.list-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;
+
+					>img {
+						width: 24rpx;
+						height: 12rpx;
+						margin-left: 10rpx;
+					}
+				}
+
+			}
+
+			.hidden-content {
+				width: 630rpx;
+				min-height: 200rpx;
+				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;
+			}
+
+			.photo {
+				display: flex;
+				justify-content: flex-start;
+				flex-wrap: wrap;
+				margin-top: 20rpx;
+				padding: 0 30rpx;
+				box-sizing: border-box;
+
+				>img {
+					width: 150rpx;
+					height: 150rpx;
+					border-radius: 10rpx 10rpx 10rpx 10rpx;
+					margin: 0 10rpx 10rpx 0;
+				}
+			}
+
+			.describe {
+				width: 636rpx;
+				height: 120rpx;
+				border-radius: 10rpx 10rpx 10rpx 10rpx;
+				border: 1rpx solid #E0E0E0;
+				margin: 20rpx 0 0 28rpx;
+				padding: 12rpx 16rpx;
+				box-sizing: border-box;
+			}
+
+			.check-for-img-max-box {
+				margin: 20px 28rpx;
+
+				.left-title-p {
+					width: 100%;
+					text-align: left;
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 80rpx;
+				}
+
+				.right-img-box {
+					.img-box {
+						display inline-block;
+						height: 150rpx;
+						width: 150rpx;
+						position relative;
+						margin: 0 14rpx 20rpx 0;
+						border-radius 10rpx;
+						overflow hidden;
+
+						.img-data {
+							height: 150rpx;
+							width: 150rpx;
+						}
+
+						.position-img {
+							position absolute;
+							right: 0;
+							top: 0;
+							width: 36rpx;
+							height: 36rpx;
+						}
+					}
+
+					.img-box:nth-of-type(3n+3) {
+						margin-right: 0rpx;
+					}
+
+					.add-button {
+						margin: 0 0rpx 20rpx 0;
+						border-radius 10rpx;
+						overflow hidden;
+						display inline-block;
+						height: 150rpx;
+						width: 150rpx;
+					}
+				}
+			}
+
+			.list-li:last-of-type {
+				border: none;
+			}
+
+			.radio_group {
+				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;
+					}
+				}
+
+				.radio:nth-of-type(1) {
+					margin-right: 54rpx;
+				}
+			}
+		}
+
+		/* 语音备注 */
+		.voice {
+			width: 690rpx;
+			min-height: 100rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 20rpx 20rpx;
+			margin: 0rpx 30rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			overflow: hidden;
+
+			.voice_t {
+				height: 100rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.voice_t_t {
+					width: 100%;
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 100rpx;
+					text-align: center;
+				}
+
+				.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;
+
+				.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;
+				}
+			}
+		}
+
+	}
+
+	.sub-btn {
+		display: flex;
+		justify-content: center;
+		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;
+		}
+	}
+</style>

+ 80 - 8
pages_safetyCheck/views/inspectManage/hiddenDangerRecord.vue

@@ -2,15 +2,16 @@
 <template>
 	<view class="hiddenDangerRecord">
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-			<view class="tip">此检查项在当前实验室累计出现 3 次隐患</view>
+			<view class="tip">此检查项在当前实验室累计出现 {{total}} 次隐患</view>
 			<view class="list">
-				<view class="list-li" v-for="(item,index) in dataList">
-					<view>{{item.name}}</view>
-					<view>{{item.time}}
+				<view class="list-li" v-for="(item,index) in dataList" @click="clickInfo(item)">
+					<view>{{item.flagType==1?'检查时间':'上报时间'}}</view>
+					<view>{{item.checkTime}}
 						<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
 					</view>
 				</view>
 			</view>
+			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
 		</scroll-view>
 	</view>
 </template>
@@ -20,7 +21,9 @@
 		config
 	} from '@/api/request/config.js'
 	import {} from '@/pages/api/index.js'
-	import {} from '@/pages_safetyCheck/api/index.js'
+	import {
+		securityAppCheckDangerGetCheckDangerBySub
+	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "hiddenDangerRecord",
 		components: {
@@ -30,6 +33,14 @@
 			return {
 				baseUrl: config.base_url,
 				pageType: 0,
+				// 查询参数
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+				},
+				total:0,
+				getDataType: false,
+				optionData:null,
 				dataList: [{
 						name: '检查时间',
 						time: '2024-09-06',
@@ -47,17 +58,73 @@
 			}
 		},
 		onLoad(option) {
-			this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
+			let optionData = JSON.parse(decodeURIComponent(option.infoData));
+			uni.setNavigationBarTitle({
+				title: optionData.subName + '(' + (optionData.pageType == 0 ? optionData.roomNum : optionData
+					.subRoom) + ')'
+			})
+			this.$set(this, 'optionData', optionData);
 		},
 		onShow() {
 
 		},
 		mounted() {
-
+			this.getList();
 		},
 		methods: {
 			//滚动事件
-			scrollGet() {},
+			scrollGet() {
+				let self = this;
+				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			clickInfo(row){
+				let infoData = this.optionData;
+				if(row.flagType==1){
+					//检查时间
+					uni.navigateTo({
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+							encodeURIComponent(JSON
+								.stringify(infoData))
+					});
+				}else if(row.flagType==2){
+					//上报时间
+					let infoData=this.optionData;
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/snapshotManage/snapshotDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
+					});
+				}
+			},
+			async getList() {
+				let self = this;
+				let obj = JSON.parse(JSON.stringify(this.queryParams))
+				obj.hazardCheckPro = this.optionData.hazardCheckPro;
+				obj.subId = this.optionData.subId;
+				const {
+					data
+				} = await securityAppCheckDangerGetCheckDangerBySub(obj);
+				if (data.code == 200) {
+					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);
+						}
+					}
+				}
+			},
 
 
 		}
@@ -123,5 +190,10 @@
 			}
 		}
 
+		.get-data-null-p {
+			height: 100rpx;
+			line-height: 100rpx;
+			text-align: center;
+		}
 	}
 </style>

+ 10 - 6
pages_safetyCheck/views/inspectManage/inspectAdd.vue

@@ -125,12 +125,14 @@
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
+			console.log('新增',optionData)
 			uni.setNavigationBarTitle({
 				title: optionData.subName + '(' + (optionData.pageType == 0 ? optionData.roomNum : optionData
 					.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);
@@ -257,7 +259,9 @@
 							duration: 2000
 						});
 					}
-					let infoData = {
+					let infoData = this.optionData;
+					infoData.itemsStatus = status==1?2:0;
+					/* let infoData = {
 						setOptionId:this.setOptionId,
 						manageId:this.manageId,
 						subId:this.subId,
@@ -265,10 +269,14 @@
 						pageType:this.pageType,
 						itemsStatus:status==1?2:0,
 						checkPlanSetVoList:this.optionData.checkPlanSetVoList,
+						checkCategory:this.optionData.checkCategory,
+						planTitle:this.optionData.planTitle,
+						checkTypeName:this.optionData.checkTypeName,
+						crossCheck:this.optionData.crossCheck,
 						subName:this.optionData.subName,
 						roomNum:this.optionData.roomNum,
 						subRoom:this.optionData.subRoom,
-					};
+					}; */
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' + encodeURIComponent(JSON
 							.stringify(infoData))
@@ -340,7 +348,6 @@
 								'fileUrl': res.data.url,
 								'fileName': res.data.name
 							});
-							console.log(res.data.url)
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -471,9 +478,6 @@
 			},
 			//上传MP3
 			async uploadVoice(item, times, tempFilePaths) {
-				console.log(item)
-				console.log(times)
-				console.log(tempFilePaths)
 
 				var self = this;
 				uni.uploadFile({

+ 2 - 3
pages_safetyCheck/views/inspectManage/inspectList.vue

@@ -112,9 +112,7 @@
 				//级别
 				levelList: [],
 				levelId: null,
-				optionData: {
-					planCategory: [], //检查类别
-				},
+				optionData:null,
 				//实验室/房间号
 				searchValue: '',
 				subId: '',
@@ -131,6 +129,7 @@
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData))
+			console.log(optionData)
 			uni.setNavigationBarTitle({
 				title: optionData.checkPlanSetVoList.checkName
 			})

+ 42 - 30
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -134,7 +134,7 @@
 		},
 		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
 					.subRoom) + ')'
@@ -210,7 +210,7 @@
 				this.$set(this, 'curTabTow', value);
 				this.$set(this, 'total', 0);
 				this.$set(this, 'dataList', []);
-				this.$nextTick(()=>{
+				this.$nextTick(() => {
 					this.getList();
 				})
 			},
@@ -256,16 +256,15 @@
 			},
 			//检查项选中
 			itemsClick(row) {
-				let infoData = row;
+				let infoData = this.newData;
 				infoData.pageType = this.pageType;
 				infoData.itemsStatus = this.curTabTow;
-				infoData.checkCategory=this.newData.checkCategory;
-				infoData.checkPlanSetVoList = this.newData.checkPlanSetVoList;
+				infoData.setOptionId = row.setOptionId;
+				infoData.hazardCheckPro = row.hazardCheckPro;
+				/* infoData.checkCategory = this.newData.checkCategory;
+				infoData.checkPlanSetVoList = this.newData.checkPlanSetVoList; */
 				if (this.pageType == 0 && this.curTabTow == 0) {
 					//待检查
-					infoData.subName=this.newData.subName;
-					infoData.roomNum=this.newData.roomNum;
-					infoData.subRoom=this.newData.subRoom;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
 							JSON
@@ -274,9 +273,6 @@
 				}
 				if (this.pageType == 0 && this.curTabTow == 2) {
 					//检查中
-					infoData.subName=this.newData.subName;
-					infoData.roomNum=this.newData.roomNum;
-					infoData.subRoom=this.newData.subRoom;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
@@ -292,23 +288,20 @@
 					});
 				} else if (this.pageType == 1 && this.curTabTow == 0) {
 					//待复查
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
 							encodeURIComponent(JSON
 								.stringify(infoData))
 					});
-				}else if (this.pageType == 1 && this.curTabTow == 1) {
+				} else if (this.pageType == 1 && this.curTabTow == 1) {
 					//复查完毕
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
 								.stringify(infoData))
 					});
-				}else if (this.pageType == 1 && this.curTabTow == 2) {
+				} else if (this.pageType == 1 && this.curTabTow == 2) {
 					//退回整改
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
@@ -316,24 +309,20 @@
 					});
 				} else if (this.pageType == 2 && this.curTabTow == 2) {
 					//待整改
-					
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
 							encodeURIComponent(JSON
 								.stringify(infoData))
 					});
-				}else if (this.pageType == 2 && this.curTabTow == 1) {
+				} else if (this.pageType == 2 && this.curTabTow == 1) {
 					//已完成
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
 								.stringify(infoData))
 					});
-				}else if (this.pageType == 2 && this.curTabTow == 4) {
+				} else if (this.pageType == 2 && this.curTabTow == 4) {
 					//暂无法整改
-					infoData.subId=this.newData.subId;
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
 							encodeURIComponent(JSON
@@ -345,6 +334,13 @@
 			hiddenDangerClick(row) {
 				let infoData = row;
 				infoData.pageType = this.pageType;
+				infoData.itemsStatus = this.curTabTow;
+				infoData.checkCategory = this.newData.checkCategory;
+				infoData.checkPlanSetVoList = this.newData.checkPlanSetVoList;
+				infoData.subName = this.newData.subName;
+				infoData.roomNum = this.newData.roomNum;
+				infoData.subRoom = this.newData.subRoom;
+				infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
 				uni.redirectTo({
 					url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
 						encodeURIComponent(JSON.stringify(infoData))
@@ -431,9 +427,24 @@
 			},
 			//检查完成
 			async submitBtn(status) {
-				if(status==1){
+				if (status == 1) {
 					//开展检查
-				}else if(status==2){
+
+					let infoData = this.dataList[0];
+					infoData.pageType = this.pageType;
+					infoData.itemsStatus = this.curTabTow;
+					infoData.checkCategory = this.newData.checkCategory;
+					infoData.checkPlanSetVoList = this.newData.checkPlanSetVoList;
+					infoData.subName = this.newData.subName;
+					infoData.roomNum = this.newData.roomNum;
+					infoData.subRoom = this.newData.subRoom;
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
+							encodeURIComponent(
+								JSON
+								.stringify(infoData))
+					});
+				} else if (status == 2) {
 					//检查完成
 					let obj = {
 						manageId: this.newData.manageId,
@@ -442,14 +453,15 @@
 						data
 					} = await securityAppCheckSetOptionFinishCheck(obj);
 					if (data.code == 200) {
-						let infoData=this.newData;
+						let infoData = this.newData;
 						uni.redirectTo({
-							url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON
-								.stringify(infoData))
+							url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' +
+								encodeURIComponent(JSON
+									.stringify(infoData))
 						});
 					}
 				}
-				
+
 			},
 
 		}
@@ -729,7 +741,7 @@
 			position: fixed;
 			left: 30rpx;
 			bottom: 30rpx;
-		
+
 			>view:nth-of-type(1) {
 				width: 345rpx;
 				height: 100rpx;
@@ -740,7 +752,7 @@
 				line-height: 100rpx;
 				text-align: center;
 			}
-		
+
 			>view:nth-of-type(2) {
 				width: 345rpx;
 				height: 100rpx;

+ 31 - 9
pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail.vue

@@ -13,7 +13,7 @@
 					{{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}
 				</view>
 			</view>
-			<view class="items-number" v-if="newData.hazardCheckName!=''">
+			<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()">
@@ -98,19 +98,19 @@
 				</view>
 			</view>
 		</scroll-view>
-		<view class="sub-btn" v-if="pageType==0 && !newData.checkFlag">
+		<view class="sub-btn" v-if="pageType==0 && !newData.checkFlag && !hiddenDangerRecordStatus">
 			<view @click="submitBtn(1)">编辑</view>
 			<view @click="submitBtn(2)">继续检查</view>
 		</view>
-		<view class="sub-btn" v-if="pageType==1">
+		<view class="sub-btn" v-if="pageType==1 && !hiddenDangerRecordStatus">
 			<view @click="submitBtn(1)">编辑</view>
 			<view @click="submitBtn(2)">继续复查</view>
 		</view>
-		<view class="sub-btn" v-if="pageType==2">
+		<view class="sub-btn" v-if="pageType==2 && !hiddenDangerRecordStatus">
 			<view @click="submitBtn(1)">编辑</view>
 			<view @click="submitBtn(2)">继续整改</view>
 		</view>
-		<view v-if="pageType==0 && newData.checkFlag" @click="submitBtn(2)" class="sub-btn-tow">继续检查</view>
+		<view v-if="pageType==0 && newData.checkFlag && !hiddenDangerRecordStatus" @click="submitBtn(2)" class="sub-btn-tow">继续检查</view>
 	</view>
 
 </template>
@@ -147,6 +147,7 @@
 				itemsStatus:'',
 				optionData:null,
 				lotName: null,
+				hiddenDangerRecordStatus: null,//判断是否是从隐患列表页面跳转过来
 
 			}
 		},
@@ -164,9 +165,11 @@
 			this.$set(this, 'manageId', optionData.manageId);
 			this.$set(this, 'subId', optionData.subId);
 			this.$set(this, 'hazardCheckPro', optionData.hazardCheckPro);
+			this.$set(this, 'hiddenDangerRecordStatus', optionData.hiddenDangerRecordStatus);
 			this.$set(this, 'optionData', optionData);
 			
 			
+			
 		},
 		onShow() {
 
@@ -283,13 +286,25 @@
 
 				}
 			},
+			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))
+					});
+				}
+			},
 			//检查-按钮
 			submitBtn(status) {
 				if (status == 1) {
 					//编辑
 					if(this.pageType==0){
 						//检查
-						let infoData = {
+						/* let infoData = {
 							setOptionId: this.setOptionId,
 							manageId: this.manageId,
 							subId: this.subId,
@@ -298,7 +313,9 @@
 							itemsStatus: this.itemsStatus,
 							checkPlanSetVoList: this.optionData.checkPlanSetVoList,
 							editStatus:true,
-						};
+						}; */
+						let infoData = this.optionData;
+						infoData.editStatus = true;
 						uni.redirectTo({
 							url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
 								JSON
@@ -341,15 +358,20 @@
 					
 				} else if (status == 2) {
 					//继续检查
-					let infoData = {
+					let infoData = this.optionData;
+					/* let infoData = {
 						subId: this.subId,
 						checkCategory:this.optionData.checkCategory,
+						planTitle:this.optionData.planTitle,
+						checkTypeName:this.optionData.checkTypeName,
+						crossCheck:this.optionData.crossCheck,
+						
 						subName: this.newData.subName,
 						roomNum: this.newData.roomNum,
 						manageId: this.manageId,
 						checkPlanSetVoList: this.optionData.checkPlanSetVoList,
 						pageType: this.pageType,
-					};
+					}; */
 
 					uni.redirectTo({
 						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +

+ 29 - 3
pages_safetyCheck/views/itemsManage/hiddenDangerRectification.vue

@@ -11,8 +11,8 @@
 					{{newData.hazardCheckName2}} < {{newData.hazardCheckCode1}} {{newData.hazardCheckName1}}
 				</view>
 			</view>
-			<view class="items-number" v-if="newData.hazardCheckName!=''">
-				此检查项在当前实验室累计出现<text>{{newData.hazardCheckNum}}</text>次隐患</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>
@@ -153,6 +153,7 @@
 		securityAppCheckDangerGetCheckProDetail,
 		securityAppCheckDangerCheckRectify,
 		securityAppCheckDangerApprove,
+		securityAppCheckPhotoGetCheckNumBySub,
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "snapshotDetail",
@@ -169,6 +170,7 @@
 					rectifyProjectName: '',
 					rectifyProjectUrl: '',
 				},
+				hazardCheckNum: 0,
 				newData: {},
 				optionData: null,
 				fontNum:0,
@@ -178,7 +180,6 @@
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
-			console.log('整改',optionData)
 			this.$set(this, 'pageType', optionData.pageType);
 			this.$set(this, 'optionData', optionData);
 			this.$set(this, 'editStatus', optionData.editStatus);
@@ -188,6 +189,7 @@
 		},
 		mounted() {
 			this.securityAppCheckDangerGetCheckProDetail();
+			this.securityAppCheckPhotoGetCheckNumBySub();
 		},
 		methods: {
 			//详情
@@ -244,6 +246,30 @@
 			sumfontnum(e) {
 				this.fontNum = e.detail.value.length
 			},
+			//获取检查项在当前实验室出现的次数
+			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);
+			
+				}
+			},
+			hiddenDangerClick(row) {
+				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))
+				});
+			},
 			//滚动事件
 			scrollGet() {},
 			/******文件上传******/

+ 0 - 1
pages_safetyCheck/views/snapshotManage/snapshotDetail.vue

@@ -121,7 +121,6 @@
 			rectificationBtn(){
 				let self=this;
 				let infoData=self.newData;
-				console.log(self.newData)
 				uni.redirectTo({
 					url: '/pages_safetyCheck/views/snapshotManage/snapshotRectification?infoData=' + encodeURIComponent(JSON.stringify(infoData))
 				});

+ 0 - 4
pages_safetyCheck/views/snapshotManage/snapshotItems.vue

@@ -36,9 +36,6 @@
 						</view>
 						<view>{{item.hazardCheckCode}}{{item.hazardCheckName}}</view>
 					</view>
-					<view v-if="pageType == 2 && item.dangerNum" class="list-li-b" @click="hiddenDangerClick(item)">
-						此检查项在当前实验室累计出现<text>{{item.dangerNum}}</text>次隐患
-					</view>
 				</view>
 			</view>
 			<view class="get-data-p" v-if="!getDataType">
@@ -99,7 +96,6 @@
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
-			console.log(optionData)
 			uni.setNavigationBarTitle({
 				title: optionData.subName + '(' + optionData.subRoom + ')'
 			})

+ 0 - 3
pages_safetyCheck/views/snapshotManage/snapshotList.vue

@@ -295,7 +295,6 @@
 								'fileUrl': res.data.url,
 								'fileName': res.data.name
 							});
-							console.log(res.data.url)
 						} else {
 							uni.showToast({
 								title: res.msg,
@@ -350,7 +349,6 @@
 			},
 			//确认搜索房间
 			popupClickItem(item) {
-				console.log(item)
 				this.$set(this.form, "subId", item.subId)
 				this.$set(this.form, "subName", item.subName)
 				this.$set(this.form, "subRoom", item.roomNum)
@@ -403,7 +401,6 @@
 			//上报
 			async submitForm() {
 				let self = this;
-				console.log(self.form)
 				if (!this.form.subId) {
 					uni.showToast({
 						title: '请选择实验室!',

+ 0 - 3
pages_safetyCheck/views/snapshotManage/snapshotRectification.vue

@@ -105,9 +105,7 @@
 			}
 		},
 		onLoad(option) {
-			console.log(option.infoData)
 			this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
-			console.log(this.newData)
 		},
 		onShow() {
 
@@ -125,7 +123,6 @@
 				  count: 1,
 				  type: 'file',
 				  success (res) {
-					  console.log(res)
 				    // tempFilePath可以作为img标签的src属性显示图片
 				    const tempFilePaths = res.tempFiles[0].path
 					self.form.rectifyProjectName=res.tempFiles[0].name