|  | @@ -13,7 +13,7 @@
 | 
											
												
													
														|  |  											<text style="padding-right: 5px;">{{measureIdx+1}})</text>
 |  |  											<text style="padding-right: 5px;">{{measureIdx+1}})</text>
 | 
											
												
													
														|  |  											<text>{{measure.measureContent}}</text>
 |  |  											<text>{{measure.measureContent}}</text>
 | 
											
												
													
														|  |  									</view>
 |  |  									</view>
 | 
											
												
													
														|  | -									<view class="status">{{measure.checkResult|checkResultFilter}}</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +									<view class="status">【<span class="text">{{measure.checkResult|checkResultFilter}}</span>】</view>
 | 
											
												
													
														|  |  								</view>
 |  |  								</view>
 | 
											
												
													
														|  |  							</view>
 |  |  							</view>
 | 
											
												
													
														|  |  						</view>				
 |  |  						</view>				
 | 
											
										
											
												
													
														|  | @@ -21,9 +21,9 @@
 | 
											
												
													
														|  |  				</view>
 |  |  				</view>
 | 
											
												
													
														|  |  				<view class="handle-container">	
 |  |  				<view class="handle-container">	
 | 
											
												
													
														|  |  					<view class="handle" @click="handleSubmit(1)">全部通过</view>
 |  |  					<view class="handle" @click="handleSubmit(1)">全部通过</view>
 | 
											
												
													
														|  | -					<view class="handle" @click="handleSubmit(2)">全不通过</view>	
 |  | 
 | 
											
												
													
														|  | -					<view class="handle submit" @click="handleSubmit(3)">提交</view>
 |  | 
 | 
											
												
													
														|  | -					<view class="handle danger" @click="handleSubmit('danger')">登记隐患</view>
 |  | 
 | 
											
												
													
														|  | 
 |  | +					<view class="handle" @click="handleSubmit(2)">全不通过</view>
 | 
											
												
													
														|  | 
 |  | +					<view class="handle submit" @click="handleSubmit(3)" v-if="submit_bt_state">提交</view>
 | 
											
												
													
														|  | 
 |  | +<!-- 					<view class="handle danger" @click="handleSubmit('danger')" v-if="danger_bt_state">登记隐患</view> -->
 | 
											
												
													
														|  |  					<view class="more" @mouseenter="hover(1)" @mouseleave="hover">
 |  |  					<view class="more" @mouseenter="hover(1)" @mouseleave="hover">
 | 
											
												
													
														|  |  						<text class="text">更多</text>
 |  |  						<text class="text">更多</text>
 | 
											
												
													
														|  |  						<view class="list" v-if="showMore">
 |  |  						<view class="list" v-if="showMore">
 | 
											
										
											
												
													
														|  | @@ -54,6 +54,8 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  				accountInfo:{},
 |  |  				accountInfo:{},
 | 
											
												
													
														|  |  				divider: false,
 |  |  				divider: false,
 | 
											
												
													
														|  |  				edit: true,
 |  |  				edit: true,
 | 
											
												
													
														|  | 
 |  | +				danger_bt_state:false,
 | 
											
												
													
														|  | 
 |  | +				submit_bt_state:false,
 | 
											
												
													
														|  |  				itemList:[],
 |  |  				itemList:[],
 | 
											
												
													
														|  |  				recordId:undefined,
 |  |  				recordId:undefined,
 | 
											
												
													
														|  |  				checklistId:undefined,
 |  |  				checklistId:undefined,
 | 
											
										
											
												
													
														|  | @@ -94,7 +96,21 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  				getChecklistHazardRecordView(recordId).then((res)=>{
 |  |  				getChecklistHazardRecordView(recordId).then((res)=>{
 | 
											
												
													
														|  |  					if(!res.data.hazardList)return					
 |  |  					if(!res.data.hazardList)return					
 | 
											
												
													
														|  |  					this.itemList=res.data.hazardList
 |  |  					this.itemList=res.data.hazardList
 | 
											
												
													
														|  | -					this.status=res.data.status				
 |  | 
 | 
											
												
													
														|  | 
 |  | +					this.status=res.data.status		
 | 
											
												
													
														|  | 
 |  | +					let items=[]						
 | 
											
												
													
														|  | 
 |  | +					for(let i=0;i<this.itemList.length;i++){
 | 
											
												
													
														|  | 
 |  | +						if(this.itemList[i].riskList){
 | 
											
												
													
														|  | 
 |  | +							this.itemList[i].riskList.map(child=>{
 | 
											
												
													
														|  | 
 |  | +								child.recordList.map(measure=>{
 | 
											
												
													
														|  | 
 |  | +									items.push(measure)
 | 
											
												
													
														|  | 
 |  | +								})
 | 
											
												
													
														|  | 
 |  | +							})
 | 
											
												
													
														|  | 
 |  | +						}						
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  | 
 |  | +					let index=items.findIndex(item=>item.checkResult===-1)
 | 
											
												
													
														|  | 
 |  | +					let _index=items.findIndex(item=>item.checkResult===0)	
 | 
											
												
													
														|  | 
 |  | +					this.submit_bt_state=_index<0								
 | 
											
												
													
														|  | 
 |  | +					this.danger_bt_state=index>-1?true:false
 | 
											
												
													
														|  |  				})
 |  |  				})
 | 
											
												
													
														|  |  			},
 |  |  			},
 | 
											
												
													
														|  |  			check(measure){		
 |  |  			check(measure){		
 | 
											
										
											
												
													
														|  | @@ -106,6 +122,7 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  			handleSubmit(type){
 |  |  			handleSubmit(type){
 | 
											
												
													
														|  |  				let recordId=this.recordId;
 |  |  				let recordId=this.recordId;
 | 
											
												
													
														|  |  				let checklistId=this.checklistId;
 |  |  				let checklistId=this.checklistId;
 | 
											
												
													
														|  | 
 |  | +				const self=this;				
 | 
											
												
													
														|  |  				if(type===1){
 |  |  				if(type===1){
 | 
											
												
													
														|  |  					batchUpdateChecklistHazardRecordDoing(recordId,1).then(()=>{
 |  |  					batchUpdateChecklistHazardRecordDoing(recordId,1).then(()=>{
 | 
											
												
													
														|  |  						this.getchecklistRecord(recordId)
 |  |  						this.getchecklistRecord(recordId)
 | 
											
										
											
												
													
														|  | @@ -117,16 +134,21 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  					})
 |  |  					})
 | 
											
												
													
														|  |  				}				
 |  |  				}				
 | 
											
												
													
														|  |  				if(type===3){//完成
 |  |  				if(type===3){//完成
 | 
											
												
													
														|  | -					completeCheckTask(recordId).then(()=>{				
 |  | 
 | 
											
												
													
														|  | -						uni.switchTab({
 |  | 
 | 
											
												
													
														|  | -							url:'/pages/index/index'
 |  | 
 | 
											
												
													
														|  | -						})
 |  | 
 | 
											
												
													
														|  | -					}).catch(()=>{
 |  | 
 | 
											
												
													
														|  | -						uni.showToast({
 |  | 
 | 
											
												
													
														|  | -							icon:"none",
 |  | 
 | 
											
												
													
														|  | -							title:"操作失败"
 |  | 
 | 
											
												
													
														|  | -						})
 |  | 
 | 
											
												
													
														|  | -					})
 |  | 
 | 
											
												
													
														|  | 
 |  | +					if(this.danger_bt_state){
 | 
											
												
													
														|  | 
 |  | +						uni.showModal({
 | 
											
												
													
														|  | 
 |  | +							title: '提示',
 | 
											
												
													
														|  | 
 |  | +							content: '本次检查有未通过项,是否需要登记隐患?',
 | 
											
												
													
														|  | 
 |  | +							success: function (res) {
 | 
											
												
													
														|  | 
 |  | +								if (res.confirm) {
 | 
											
												
													
														|  | 
 |  | +									self.submitDanger(recordId)
 | 
											
												
													
														|  | 
 |  | +								} else if (res.cancel) {
 | 
											
												
													
														|  | 
 |  | +									self.completeTask(recordId)
 | 
											
												
													
														|  | 
 |  | +								}
 | 
											
												
													
														|  | 
 |  | +							}
 | 
											
												
													
														|  | 
 |  | +						});
 | 
											
												
													
														|  | 
 |  | +					}else{
 | 
											
												
													
														|  | 
 |  | +						this.completeTask(recordId)
 | 
											
												
													
														|  | 
 |  | +					}
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  				if(type===4){//放弃
 |  |  				if(type===4){//放弃
 | 
											
												
													
														|  |  					cancelCheckTask(recordId).then(()=>{
 |  |  					cancelCheckTask(recordId).then(()=>{
 | 
											
										
											
												
													
														|  | @@ -147,7 +169,7 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  					})
 |  |  					})
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  				if(type==="danger"){
 |  |  				if(type==="danger"){
 | 
											
												
													
														|  | -					let href="http://h5.xazhyc.com/danger/views/create.html";
 |  | 
 | 
											
												
													
														|  | 
 |  | +					let href=`${this.$h5}/danger/views/create.html`;
 | 
											
												
													
														|  |  					let name= '登记隐患'
 |  |  					let name= '登记隐患'
 | 
											
												
													
														|  |  					completeCheckTask(recordId).then(()=>{
 |  |  					completeCheckTask(recordId).then(()=>{
 | 
											
												
													
														|  |  						uni.redirectTo({
 |  |  						uni.redirectTo({
 | 
											
										
											
												
													
														|  | @@ -161,6 +183,26 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  					})
 |  |  					})
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  			},
 |  |  			},
 | 
											
												
													
														|  | 
 |  | +			completeTask(recordId){
 | 
											
												
													
														|  | 
 |  | +				completeCheckTask(recordId).then(()=>{				
 | 
											
												
													
														|  | 
 |  | +					uni.reLaunch({
 | 
											
												
													
														|  | 
 |  | +						url:'/pages/index/index'
 | 
											
												
													
														|  | 
 |  | +					})
 | 
											
												
													
														|  | 
 |  | +				}).catch(()=>{
 | 
											
												
													
														|  | 
 |  | +					uni.showToast({
 | 
											
												
													
														|  | 
 |  | +						icon:"none",
 | 
											
												
													
														|  | 
 |  | +						title:"操作失败"
 | 
											
												
													
														|  | 
 |  | +					})
 | 
											
												
													
														|  | 
 |  | +				})					
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  | 
 |  | +			submitDanger(recordId){
 | 
											
												
													
														|  | 
 |  | +				let href=`${this.$h5}/danger/views/create.html`;
 | 
											
												
													
														|  | 
 |  | +				let name= '登记隐患'	
 | 
											
												
													
														|  | 
 |  | +				completeCheckTask(recordId)								
 | 
											
												
													
														|  | 
 |  | +				uni.redirectTo({
 | 
											
												
													
														|  | 
 |  | +					url:`/pages/webview/webview?href=${href}&name=${name}`
 | 
											
												
													
														|  | 
 |  | +				})
 | 
											
												
													
														|  | 
 |  | +			},
 | 
											
												
													
														|  |  			hover(state){
 |  |  			hover(state){
 | 
											
												
													
														|  |  				this.showMore=state===1
 |  |  				this.showMore=state===1
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
										
											
												
													
														|  | @@ -235,6 +277,12 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  						.pointContent{
 |  |  						.pointContent{
 | 
											
												
													
														|  |  							flex: 1;
 |  |  							flex: 1;
 | 
											
												
													
														|  |  						}
 |  |  						}
 | 
											
												
													
														|  | 
 |  | +						.status{
 | 
											
												
													
														|  | 
 |  | +							.text{
 | 
											
												
													
														|  | 
 |  | +								color: #3384FF;
 | 
											
												
													
														|  | 
 |  | +								font-weight: 800;
 | 
											
												
													
														|  | 
 |  | +							}
 | 
											
												
													
														|  | 
 |  | +						}
 | 
											
												
													
														|  |  					}
 |  |  					}
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
										
											
												
													
														|  | @@ -268,6 +316,7 @@ import {cancelCheckTask,completeCheckTask} from '@/api/aqpt/task.js'
 | 
											
												
													
														|  |  				&.submit{
 |  |  				&.submit{
 | 
											
												
													
														|  |  					background-color: #3384FF;	
 |  |  					background-color: #3384FF;	
 | 
											
												
													
														|  |  					color: #fff;
 |  |  					color: #fff;
 | 
											
												
													
														|  | 
 |  | +				   padding: 18rpx 38rpx;
 | 
											
												
													
														|  |  				}
 |  |  				}
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  			.more{
 |  |  			.more{
 |