heyang 6 місяців тому
батько
коміт
a4c3b3b199

+ 19 - 1
pages_safetyCheck/api/index.js

@@ -135,7 +135,8 @@ export const securityCheckSetOptionUnCheckList = (data) => {
        method: 'GET',
        data: { ...data }
     })
-};//开始检查-获取检查信息
+};
+//开始检查-提交-详情
 export const securityAppCheckPlanCheckInfo = (data) => {
     return apiResquest({
         url: '/security/appCheckPlan/checkInfo',
@@ -143,6 +144,14 @@ export const securityAppCheckPlanCheckInfo = (data) => {
        data: { ...data }
     })
 };
+//开始检查-保存草稿-详情
+export const securityDraftFindBySetOptionId = (data) => {
+    return apiResquest({
+        url: '/security/draft/findBySetOptionId',
+       method: 'GET',
+       data: { ...data }
+    })
+};
 //开始检查-提交
 export const securityAppCheckSetOptionCheckCommit = (data) => {
     return apiResquest({
@@ -159,6 +168,15 @@ export const securityAppCheckPhotoGetCheckNumBySub = (data) => {
        data: { ...data }
     })
 };
+//检查项-检查完成
+export const securityAppCheckSetOptionFinishCheck = (data) => {
+    return apiResquest({
+        url: '/security/appCheckSetOption/finishCheck',
+       method: 'GET',
+       data: { ...data }
+    })
+};
+
 
 
 

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

@@ -49,10 +49,10 @@
 			</view>
 			<view class="voice">
 				<view class="voice_t">
-					<view class="voice_t_t" v-if="!voiceList[0]">语音备注:(选填)</view>
-					<view class="voice_t_b" v-if="voiceList[0]">语音备注:({{voiceList.length}})</view>
+					<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="voiceList[0]" v-for="(voiceItem,voiceIndex) in voiceList" :key="voiceIndex">
+				<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}}″
@@ -83,6 +83,7 @@
 	import {
 		securityAppCheckPlanCheckInfo,
 		securityAppCheckSetOptionCheckCommit,
+		securityDraftFindBySetOptionId,
 		securityAppCheckPhotoGetCheckNumBySub,
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
@@ -96,6 +97,7 @@
 				form: {
 					checkFlag: false,
 					photoList: [],
+					voiceList: [],
 				},
 				newData: {},
 				radioList: [{
@@ -109,7 +111,8 @@
 						checked: true,
 					},
 				],
-				voiceList: [],
+				pageType:'',
+				itemsStatus:'',
 				setOptionId: '', //检查项id
 				manageId: '', //检查管理id
 				subId: '',
@@ -117,25 +120,40 @@
 				hazardCheckNum:0,
 				sendLock: true, //发送锁,当为true时上锁,false时解锁发送
 				recorderManager: wx.getRecorderManager(),
+				optionData:null,
 			}
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
+			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() {
-			this.securityAppCheckPlanCheckInfo();
+			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,
@@ -146,6 +164,30 @@
 				} = 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, 'checkName', this.optionData.checkName);
+					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:[]);
 				}
 			},
 			//获取检查项在当前实验室出现的次数
@@ -190,7 +232,7 @@
 					hazardDescribe: this.form.hazardDescribe,
 					setOptionId: this.setOptionId,
 					photoList: this.form.photoList,
-					voiceList: this.voiceList,
+					voiceList: this.form.voiceList,
 				}
 				const {
 					data
@@ -211,6 +253,18 @@
 							duration: 2000
 						});
 					}
+					let infoData = {
+						setOptionId:this.setOptionId,
+						manageId:this.manageId,
+						subId:this.subId,
+						hazardCheckPro:this.hazardCheckPro,
+						pageType:this.pageType,
+						itemsStatus:this.itemsStatus,
+					};
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' + encodeURIComponent(JSON
+							.stringify(infoData))
+					});
 				}
 			},
 			//滚动事件
@@ -316,7 +370,7 @@
 					success(res) {
 						if (res.confirm) {
 							console.log('用户点击确定')
-							this.voiceList.splice(voiceIndex, 1);
+							self.form.voiceList.splice(voiceIndex, 1);
 							self.$forceUpdate();
 						} else if (res.cancel) {
 							console.log('用户点击取消')
@@ -330,7 +384,7 @@
 			recordButton(item, e) {
 				console.log("按下")
 				let self = this;
-				if (this.voiceList.length >= 5) {
+				if (this.form.voiceList.length >= 5) {
 					uni.showToast({
 						title: '语音备忘最多只能上传5条',
 						icon: "none",
@@ -430,7 +484,7 @@
 							console.log("上传成功", res)
 							console.log(item)
 							let seconds = Math.round((parseInt(times) % (1000 * 60)) / 1000);
-							this.voiceList.push({
+							this.form.voiceList.push({
 								'fileLength': seconds,
 								'fileUrl': res.data.url,
 								'fileName': res.data.name

+ 4 - 0
pages_safetyCheck/views/inspectManage/inspectList.vue

@@ -203,6 +203,10 @@
 			listClick(row) {
 				let infoData = row;
 				infoData.pageType = 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/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(

+ 144 - 59
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -5,7 +5,8 @@
 			<view class="lotName" :class="pageType != 0?'lotNameOne':''" v-if="lotName">{{lotName}}</view>
 			<view class="line"></view>
 			<view class="tabTitle_tow">
-				<view class="tabTitle_tow_li" @tap="tabClickTow(item.value)" :key="index" v-for="(item,index) in tabTextTow">
+				<view class="tabTitle_tow_li" @tap="tabClickTow(item.value)" :key="index"
+					v-for="(item,index) in tabTextTow">
 					<view :class="{on:curTabTow==item.value}" class="tabTitle_tow_text">{{item.label}}</view>
 					<view :class="{on:curTabTow==item.value}" class="tabTitle_tow_across"></view>
 				</view>
@@ -26,13 +27,19 @@
 		</view>
 		<scroll-view scroll-y style="overflow-y: scroll;flex:1;" @scrolltolower="scrollGet" class="info-max-box">
 			<view class="list">
-				<view class="total" :class="curTabTow == 0?'total-color-1':(curTabTow == 2?'total-color-3':(curTabTow == 1?'total-color-2':''))" v-if="pageType == 0">
+				<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+'项':''))}}
 				</view>
-				<view class="total" :class="curTabTow == 0?'total-color-1':(curTabTow == 1?'total-color-2':(curTabTow == 2?'total-color-3':''))"v-if="pageType == 1">
+				<view class="total"
+					:class="curTabTow == 0?'total-color-1':(curTabTow == 1?'total-color-2':(curTabTow == 2?'total-color-3':''))"
+					v-if="pageType == 1">
 					{{curTabTow == 0?'待复查共'+total+'项':(curTabTow == 1?'复查完毕共'+total+'项':(curTabTow == 2?'退回整改共'+total+'项':''))}}
 				</view>
-				<view class="total" :class="curTabTow == 2?'total-color-1':(curTabTow == 0?'total-color-2':(curTabTow == 4?'total-color-3':''))"v-if="pageType == 2">
+				<view class="total"
+					:class="curTabTow == 2?'total-color-1':(curTabTow == 0?'total-color-2':(curTabTow == 4?'total-color-3':''))"
+					v-if="pageType == 2">
 					{{curTabTow == 2?'待整改共'+total+'项':(curTabTow == 1?'已整改共'+total+'项':(curTabTow == 4?'暂无法整改共'+total+'项':''))}}
 				</view>
 				<view class="list-li" v-for="(item,index) in dataList" :key="index">
@@ -40,9 +47,9 @@
 						<view v-if="pageType == 0">
 							<img v-if="item.checkFlag==null" src="@/pages_safetyCheck/images/icon_zg_zh@1x.png">
 							<img v-if="item.checkFlag==false" src="@/pages_safetyCheck/images/icon_xz_zg@1x.png">
-							<img v-if="item.checkFlag==true"  src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
+							<img v-if="item.checkFlag==true" src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
 						</view>
-						<view >{{item.hazardCheckCode}}{{item.hazardCheckName}}</view>
+						<view>{{item.hazardCheckCode}}{{item.hazardCheckName}}</view>
 					</view>
 					<view v-if="item.hazardCheckId" class="list-li-b" @click="hiddenDangerClick(item)">
 						此检查项在当前实验室累计出现<text>{{item.hazardCheckNum}}</text>次隐患
@@ -56,6 +63,7 @@
 			<view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
 		</scroll-view>
 		<checkItemModule :propsData="propsData" v-if="checkItemModuleType"></checkItemModule>
+		<view v-if="pageType==0" @click="submitBtn()" class="sub-btn">检查完成</view>
 	</view>
 
 </template>
@@ -68,6 +76,7 @@
 		securityAppCheckSetOptionList,
 		securityAppCheckDangerReviewList,
 		securityAppCheckDangerGetCheckDangerSubId,
+		securityAppCheckSetOptionFinishCheck,
 	} from '@/pages_safetyCheck/api/index.js'
 	import {
 		checkItemModule
@@ -97,31 +106,60 @@
 					pageSize: 10,
 				},
 				//符合/不符合
-				checkFlag:null,
+				checkFlag: null,
 				total: 0,
 				dataList: [],
 				getDataType: false,
 				searchIndex: 0,
 				//检查项组件数据
-				checkItemModuleType:false,
-				propsData:{},
+				checkItemModuleType: false,
+				propsData: {},
 			}
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
 			uni.setNavigationBarTitle({
-				title: optionData.subName + '(' + (optionData.pageType == 0 ? optionData.roomNum : optionData.subRoom) + ')'
+				title: optionData.subName + '(' + (optionData.pageType == 0 ? optionData.roomNum : optionData
+					.subRoom) + ')'
 			})
 			this.$set(this, 'pageType', optionData.pageType);
 			this.$set(this, 'lotName',
 				optionData.pageType == 0 ? optionData.checkPlanSetVoList.checkName : (
-					optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList.checkStartTime +
+					optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList
+					.checkStartTime +
 					'(逾期未完成整改关闭实验室)' : '整改期限' + optionData.checkPlanSetVoList.checkStartTime));
 			this.$set(this, 'tabTextTow',
-				optionData.pageType == 0 ? [{value: '0',label: '待检查'}, {value: '2',label: '检查中'}, {value: '1',label: '已检查'}] : (
-				optionData.pageType == 1 ? [{value: '0',label: '待复查'}, {value: '1',label: '复查完毕'}, {value: '2',label: '退回整改'}] : (
-				optionData.pageType == 2 ? [{value: '2',label: '待整改'}, {value: '1',label: '已整改'}, {value: '4',label: '暂无法整改'}] : []
-			)))
+				optionData.pageType == 0 ? [{
+					value: '0',
+					label: '待检查'
+				}, {
+					value: '2',
+					label: '检查中'
+				}, {
+					value: '1',
+					label: '已检查'
+				}] : (
+					optionData.pageType == 1 ? [{
+						value: '0',
+						label: '待复查'
+					}, {
+						value: '1',
+						label: '复查完毕'
+					}, {
+						value: '2',
+						label: '退回整改'
+					}] : (
+						optionData.pageType == 2 ? [{
+							value: '2',
+							label: '待整改'
+						}, {
+							value: '1',
+							label: '已整改'
+						}, {
+							value: '4',
+							label: '暂无法整改'
+						}] : []
+					)))
 			this.$set(this, 'curTabTow', optionData.pageType == 0 ? '0' : (optionData.pageType == 1 ? '0' : (optionData
 				.pageType == 2 ? '2' : '')));
 			this.$set(this, 'newData', optionData);
@@ -150,11 +188,11 @@
 			},
 			//顶部tab点击
 			tabClickTow(value) {
-				this.$set(this,'hazardCheckPro',null);
-				this.$set(this,'checkFlag',null);
-				this.$set(this.queryParams,'page',1);
-				this.$set(this,'curTabTow',value);
-				this.$set(this,'dataList',[]);
+				this.$set(this, 'hazardCheckPro', null);
+				this.$set(this, 'checkFlag', null);
+				this.$set(this.queryParams, 'page', 1);
+				this.$set(this, 'curTabTow', value);
+				this.$set(this, 'dataList', []);
 				this.getList();
 			},
 			dialogOpen() {
@@ -164,36 +202,36 @@
 				this.dialogVisible = false;
 			},
 			//符合/不符合
-			checkFlagChange(type){
-				if(this.checkFlag == type){
-					this.$set(this,'checkFlag',null);
-				}else{
-					this.$set(this,'checkFlag',type);
+			checkFlagChange(type) {
+				if (this.checkFlag == type) {
+					this.$set(this, 'checkFlag', null);
+				} else {
+					this.$set(this, 'checkFlag', type);
 				}
-				this.$set(this.queryParams,'page',1);
+				this.$set(this.queryParams, 'page', 1);
 				this.getList()
 			},
-			checkItemModuleButton(type,item){
-				if(type == 'open'){
+			checkItemModuleButton(type, item) {
+				if (type == 'open') {
 					let obj = {
-						infoType:this.pageType,
-						checkType:this.curTabTow,
+						infoType: this.pageType,
+						checkType: this.curTabTow,
 					}
-					if(this.curTabTow == 0){
+					if (this.curTabTow == 0) {
 						//检查
 						obj.manageId = this.newData.manageId
-					}else if(this.curTabTow != 0){
+					} else if (this.curTabTow != 0) {
 						//复查/整改
 						obj.planId = this.newData.planId;
 						obj.planSetId = this.newData.planSetId;
 						obj.subId = this.newData.subId;
 					}
-					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.$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);
 				}
 			},
@@ -201,30 +239,40 @@
 			itemsClick(row) {
 				let infoData = row;
 				infoData.pageType = this.pageType;
-				if(this.pageType==0 && this.curTabTow==0){
+				infoData.itemsStatus = this.curTabTow;
+				if (this.pageType == 0 && this.curTabTow == 0) {
 					//待检查
 					uni.redirectTo({
-						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(JSON
+						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
+							JSON
 							.stringify(infoData))
 					});
-				}if(this.pageType==0 && this.curTabTow==1){
+				}
+				if (this.pageType == 0 && this.curTabTow == 2) {
 					//检查中
+					infoData.checkName=this.newData.checkPlanSetVoList.checkName;
+					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
-							.stringify(infoData))
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+							encodeURIComponent(JSON
+								.stringify(infoData))
 					});
-				}if(this.pageType==0 && this.curTabTow==2){
+				}
+				if (this.pageType == 0 && this.curTabTow == 1) {
 					//已检查
 					uni.redirectTo({
-						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' + encodeURIComponent(JSON
-							.stringify(infoData))
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
+							encodeURIComponent(JSON
+								.stringify(infoData))
 					});
-				}else if(this.pageType==1 && this.curTabTow==0){
+				} else if (this.pageType == 1 && this.curTabTow == 0) {
 					//待复查
-				}else if(this.pageType==1 && this.curTabTow==0){
+				} else if (this.pageType == 1 && this.curTabTow == 0) {
 					//待整改
 				}
-				
+
 			},
 			hiddenDangerClick(row) {
 				let infoData = row;
@@ -291,7 +339,9 @@
 					obj.planSetId = this.newData.planSetId;
 					obj.subId = this.newData.subId;
 					obj.appReviewStatus = this.curTabTow;
-					const { data } = await securityAppCheckDangerGetCheckDangerSubId(obj);
+					const {
+						data
+					} = await securityAppCheckDangerGetCheckDangerSubId(obj);
 					if (data.code == 200) {
 						if (self.queryParams.page == 1) {
 							this.dataList = data.data.records;
@@ -309,7 +359,22 @@
 					}
 				}
 			},
-
+			//检查完成
+			async submitBtn() {
+				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))
+					});
+				}
+			},
 
 		}
 	}
@@ -500,15 +565,18 @@
 				box-sizing: border-box;
 				margin-bottom: 20rpx;
 			}
-			.total-color-1{
+
+			.total-color-1 {
 				background: rgba(1, 131, 250, 0.2);
 				color: #0183FA;
 			}
-			.total-color-2{
-				background: rgba(22,181,49,0.2);
+
+			.total-color-2 {
+				background: rgba(22, 181, 49, 0.2);
 				color: #16B531;
 			}
-			.total-color-3{
+
+			.total-color-3 {
 				background: #F7E0C4;
 				color: #FF8C00;
 			}
@@ -525,14 +593,16 @@
 					padding: 12rpx 20rpx 14rpx 14rpx;
 					box-sizing: border-box;
 					margin: 20rpx 0;
-					>view:nth-of-type(1){
-						>img{
+
+					>view:nth-of-type(1) {
+						>img {
 							width: 24rpx;
 							height: 24rpx;
 							margin-right: 30rpx;
 						}
 					}
-					>view:nth-of-type(2){
+
+					>view:nth-of-type(2) {
 						flex: 1;
 						font-size: 24rpx;
 						color: #3D3D3D;
@@ -576,5 +646,20 @@
 			line-height: 100rpx;
 			text-align: center;
 		}
+
+		.sub-btn {
+			width: 686rpx;
+			height: 100rpx;
+			background: #0183FA;
+			border-radius: 50rpx 50rpx 50rpx 50rpx;
+			position: fixed;
+			left: 30rpx;
+			bottom: 30rpx;
+			font-weight: 400;
+			font-size: 30rpx;
+			color: #FFFFFF;
+			line-height: 100rpx;
+			text-align: center;
+		}
 	}
-</style>
+</style>

+ 93 - 15
pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail.vue

@@ -32,7 +32,7 @@
 				</view>
 				<view class="hidden-content" v-if="!newData.checkFlag">{{newData.hazardDescribe}}
 				</view>
-				<view class="photo" v-if="!newData.checkFlag">
+				<view class="photo" v-if="!newData.checkFlag" @click="lockImg(newData.photoList)">
 					<img v-for="(item,index) in newData.photoList" :src="baseUrl+item.fileUrl">
 				</view>
 				<view class="list-li">
@@ -64,6 +64,7 @@
 	} from '@/component/public.js'
 	import {
 		securityAppCheckPlanCheckInfo,
+		securityDraftFindBySetOptionId,
 		securityAppCheckPhotoGetCheckNumBySub,
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
@@ -82,29 +83,48 @@
 				hazardCheckPro: '',
 				hazardCheckNum: 0,
 				pageType: 0, //0检查 1复查 2整改
+				itemsStatus:'',
+				optionData:null,
 
 			}
 		},
 		onLoad(option) {
 			let optionData = JSON.parse(decodeURIComponent(option.infoData));
-
+			
 			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() {
-			this.securityAppCheckPlanCheckInfo();
+			if(this.pageType==0){
+				//检查
+				if(this.itemsStatus==0 || this.itemsStatus==1){
+					//开始检查-提交的详情
+					this.securityAppCheckPlanCheckInfo();
+				}else if(this.itemsStatus==2){
+					//保存草稿详情
+					this.securityDraftFindBySetOptionId();
+					
+					
+				}
+			}
+			
+			
+			
+			
 			this.securityAppCheckPhotoGetCheckNumBySub();
 		},
 		methods: {
 			//滚动事件
 			scrollGet() {},
-			//获取详情
+			//获取检查提交详情
 			async securityAppCheckPlanCheckInfo() {
 				let obj = {
 					setOptionId: this.setOptionId,
@@ -120,8 +140,29 @@
 					})
 					this.$set(this, 'newData', data.data);
 					this.$set(this.newData, 'checkTime', parseTime(data.data.checkTime, "{y}-{m}-{d}"));
+					
 				}
 			},
+			//获取草稿详情
+			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.subRoom) + ')'
+					})
+					this.$set(this, 'newData', data.data);
+					this.$set(this.newData, 'checkName', this.optionData.checkName);
+					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 securityAppCheckPhotoGetCheckNumBySub() {
 				let obj = {
@@ -137,23 +178,60 @@
 				}
 			},
 			//检查-按钮
-			submitBtn(status){
-				if(status==1){
+			submitBtn(status) {
+				if (status == 1) {
 					//编辑
 					let infoData = {
-						setOptionId:this.setOptionId,
-						manageId:this.manageId,
-						subId:this.subId,
-						hazardCheckPro:this.hazardCheckPro,
-						pageType:this.pageType,
+						setOptionId: this.setOptionId,
+						manageId: this.manageId,
+						subId: this.subId,
+						hazardCheckPro: this.hazardCheckPro,
+						pageType: this.pageType,
+						itemsStatus: this.itemsStatus,
+						checkName: this.newData.checkName,
 					};
 					uni.redirectTo({
-						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(JSON
+						url: '/pages_safetyCheck/views/inspectManage/inspectAdd?infoData=' + encodeURIComponent(
+							JSON
 							.stringify(infoData))
 					});
-				}else if(status==2){
+				} else if (status == 2) {
 					//继续检查
+					let infoData = {
+						subName: this.newData.subName,
+						roomNum: this.newData.roomNum,
+						manageId: this.manageId,
+						checkPlanSetVoList: {
+							checkName: this.newData.checkName,
+							overdueUnrectify: this.newData.overdueUnrectify,
+							checkStartTime: this.newData.checkStartTime,
+						},
+						pageType: this.pageType,
+					};
+
+					uni.redirectTo({
+						url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
+							encodeURIComponent(JSON
+								.stringify(infoData))
+					});
+				}
+			},
+			//图片预览
+			lockImg(list) {
+				if (!list[0]) {
+					return
 				}
+				let urlList = [];
+				for (let i = 0; i < list.length; i++) {
+					urlList.push(config.base_url + list[i].photoUrl)
+				}
+				wx.previewImage({
+					urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
+					current: '', // 当前显示图片的http链接,默认是第一个
+					success: function(res) {},
+					fail: function(res) {},
+					complete: function(res) {},
+				})
 			},
 			//整改页面
 			rectificationBtn() {
@@ -424,7 +502,7 @@
 		position: fixed;
 		left: 30rpx;
 		bottom: 30rpx;
-	
+
 		>view:nth-of-type(1) {
 			width: 345rpx;
 			height: 100rpx;
@@ -435,7 +513,7 @@
 			line-height: 100rpx;
 			text-align: center;
 		}
-	
+
 		>view:nth-of-type(2) {
 			width: 345rpx;
 			height: 100rpx;