heyang hace 2 años
padre
commit
55c7202a69

+ 2 - 2
api/request/config.js

@@ -1,5 +1,5 @@
 const config = {
-	//base_url: 'http://192.168.1.9:8080',//柴
+	base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	 //base_url: 'http://192.168.1.17:8080',//小飞
 	 //base_url: 'http://192.168.1.20:8080',//志伟
@@ -9,7 +9,7 @@ const config = {
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
-	  base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
+	// base_url: 'https://lab.zjznai.com/labAppTest/',//43服务器线上
     //base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	 //base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址
       // base_url: 'https://lab.zjznai.com/labSaasSystem/', //矿大化工

+ 25 - 21
pages/safetyExamineWorkbench.vue

@@ -95,12 +95,13 @@
 								<text class="red_color" v-if="item.manageStatus==1">检查中</text>
 								<text class="green_color" v-if="item.manageStatus==2">已检查</text>
 								<text class="orange_color" v-if="curTabTow==2 && item.rectifyStatus==3">待审核</text>
-								<text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
+								<text v-if="item.manageStatus==0 || item.manageStatus==1 || item.manageStatus==2">{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
+								<text v-if="curTabTow==2 && item.rectifyStatus==3">{{item.hazardType==1?'校院巡查':'实验室自查'}}</text>
 								<text>{{item.collegeName}}</text>
 							</view>
 						</view>
 						<!-- 开始检查 -->
-						<view v-if="curTabTow==2 && item.rectifyStatus==3" class="list_tow_li_b" @click="handleTowClick(item,'check')">复核</view>
+						<view v-if="curTabTow==2 && item.rectifyStatus==3" class="list_tow_li_b" @click="handleTowClick(item,'check')">{{item.applyGentle?'复核':'详情'}}</view>
 						<view v-if="item.buttonHide && item.isSelfData==1">
 							<view v-if="(curTabTow==0 || curTabTow==1) && item.manageStatus==0 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'add')">开始检查</view>
 							<view v-if="(curTabTow==0 || curTabTow==1) &&item.manageStatus==1 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'edit')">编辑</view>
@@ -236,7 +237,8 @@ export default {
 	  getData2:{
 	    pageNum:1,
 	    pageSize:20,
-		checkType:'',
+		isSelf: 0,//是否本人查询
+		checkType:0,
 	  	manageStatus:0,//管理状态(-1全部 0待检查,1检查中,2已检查)
 		rectifyStatus:'',
 	  },
@@ -285,8 +287,7 @@ export default {
     }
   },
   onLoad() {
-	this.myApplyGentle=uni.getStorageSync('gentleIdentifierData').myApplyGentle
-	this.applyGentle=uni.getStorageSync('gentleIdentifierData').applyGentle
+	
   },
   onShow() {
 	 
@@ -295,7 +296,8 @@ export default {
 	   
   },
   mounted(){
-	 
+	  this.myApplyGentle=uni.getStorageSync('gentleIdentifierData').myApplyGentle
+	  this.applyGentle=uni.getStorageSync('gentleIdentifierData').applyGentle
 	  //获取当前日期
 	  this.currentDate=this.getNowFormatDate()
 	  
@@ -497,7 +499,7 @@ export default {
 	  				let list = newList[0].split("=")[1].split("-")
 	  				subId = list[0];
 	  				if(subId){
-						
+						uni.setStorageSync('saoCodeId',subId);
 						if(self.pageType==1 || self.pageType==2){//管理员和检查者
 							self.getCheckPlanBySubId(subId)
 						}else if(self.pageType==3){//整改者
@@ -540,7 +542,6 @@ export default {
 				    url: '/pages_safetyExamine/examineManage/examineAdd?subId='+id
 				});
 			}else{
-				 let id = uni.setStorageSync('saoCodeId',id);
 				 uni.redirectTo({
 					 url: '/pages_safetyExamine/inforSign'
 				 })
@@ -551,16 +552,18 @@ export default {
 	  //根据实验室id查询隐患
 	  async checkHazardAppList2(obj){
 	  	let self = this;
+		this.hiddenList=[];
 	  	const {data} = await checkHazardAppList(obj);
 	  	if(data.code==200){
-	  			if(data.data.records){
-					data.data.records.forEach(function(item){
-						item.type=false;
-					})
-					this.hiddenList=data.data.records
+	  			if(data.data.records.length>0){
+					for(let i=0;i<data.data.records.length;i++){
+						data.data.records[i].type=false;
+						if(data.data.records[i].rectifyStatus==2 || data.data.records[i].rectifyStatus==3){
+							this.hiddenList.push(data.data.records[i])
+						}
+					}
 	  				this.dialogVisible=true;
 	  			}else{
-	  				 let id = uni.setStorageSync('saoCodeId',id);
 	  				 uni.redirectTo({
 	  					 url: '/pages_safetyExamine/inforSign'
 	  				 })
@@ -611,8 +614,8 @@ export default {
 				  ]
 			  }else if(data.data.userType==3){//整改者
 				  this.statisticsListThree=[
-				  		{name:'本月已检查',value:data.data.checkTotal},
-				  		{name:'本月已整改',value:data.data.rectifyTotal},
+					    {name:'本月已整改',value:data.data.rectifyTotal},
+				  		{name:'本月整改率',value:data.data.rectificationRate},
 				  		{name:'本月复核通过率',value:data.data.passRate},
 				  ]
 			  }
@@ -684,8 +687,6 @@ export default {
 	  		//判断计划是否开始
 			self.buttonHide=false;
 			for(let i=0;i<data.data.records.length;i++){
-				data.data.records[i].notStarted=self.compareTime(data.data.records[i].cycleStartTime)
-				
 				if(data.data.records[i].checkType==1){
 					if(self.myApplyGentle && !self.applyGentle){
 						data.data.records[i].buttonHide=false
@@ -704,6 +705,7 @@ export default {
 						data.data.records[i].buttonHide=true;
 					}
 				}
+				data.data.records[i].notStarted=self.compareTime(data.data.records[i].cycleStartTime)
 				
 			}
 	  		self.dataList2=[...self.dataList2,...data.data.records]
@@ -779,8 +781,9 @@ export default {
 	  		let obj={
 	  			pageNum:this.getData2.pageNum,
 	  			pageSize:this.getData2.pageSize,
+				isSelf: 0,//是否本人查询
 	  			manageStatus:0,
-				checkType:'',
+				checkType:0,
 	  		};
 	  	const {data} = await checkManageList(obj);
 	  	if(data.code==200){
@@ -793,8 +796,9 @@ export default {
 		let obj={
 			pageNum:this.getData2.pageNum,
 			pageSize:this.getData2.pageSize,
-			manageStatus:0,
-			checkType:'',
+			isSelf: 0,//是否本人查询
+			manageStatus:1,
+			checkType:0,
 		};
 	  	const {data} = await checkManageList(obj);
 	  	if(data.code==200){

+ 47 - 31
pages_safetyExamine/dangerManage/dangerDetail.vue

@@ -176,36 +176,6 @@
 				</view>
 			</view>
 		</view>
-		<!-- 暂无法整改 -->
-		<!-- <view v-if="rectifyStatus==4" class="incapable danger">
-			<view class="grade">
-				<text>整改结果:</text>
-				<text style="color: #0183FA;">暂无法整改</text>
-			</view>
-			<view class="project">
-				<view class="project_t">原因描述:</view>
-				<view class="project_b">实验室施工</view>
-			</view>
-			<view class="picture">
-				<view class="picture_t">上传照片:</view>
-				<view class="picture_b">
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-				</view>
-			</view>
-			<view class="grade">
-				<text>整改人:</text>
-				<text>褚朝朝</text>
-			</view>
-			<view class="grade" style="border:none;">
-				<text>整改时间:</text>
-				<text >2023-04-0114:00</text>
-			</view>
-		</view> -->
-		
-	
 	</scroll-view>
 	<view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2 && rectifyGentle">提交</view>
 	<view class="bottom_btn_tow" v-if="rectifyStatus==3 && applyGentle">
@@ -635,6 +605,34 @@ export default {
 			let _this = this;
 			let obj={};
 			if(doType=='rectify'){//整改
+			if(!this.form.rectifyMeasure){
+				if(this.form.rectifyResult==1){
+					uni.showToast({
+						title: '请输入整改措施!',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}else{
+					uni.showToast({
+						title: '请输入原因描述!',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}
+				return
+			}
+			if(this.form.uploadDtoList.length==0){
+				uni.showToast({
+					title: '请上传照片!',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
+			
 				obj.checkHazardId=this.form.checkHazardId;
 				obj.rectifyType=this.form.rectifyType;
 				obj.rectifyResult=this.form.rectifyResult;
@@ -643,17 +641,35 @@ export default {
 			}else if(doType=='reject' ){//复核 驳回
 				obj.id=this.form.id;
 				obj.examineResult=0;
+				if(!this.form.examineOpinion){
+					uni.showToast({
+						title: '请输入审核意见!',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+					return
+				}
 				obj.examineOpinion=this.form.examineOpinion;
 				
 			}else if(doType=='pass'){//复核 通过
 				obj.id=this.form.id;
 				obj.examineResult=1;
+				if(!this.form.examineOpinion){
+					uni.showToast({
+						title: '请输入审核意见!',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+					return
+				}
 				obj.examineOpinion=this.form.examineOpinion;
 			}
 			const {data} = await checkHazardAdd(obj);
 			if(data.code == 200){
 				uni.redirectTo({
-				    url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.checkType
+				    url: '/pages_safetyExamine/dangerManage/dangerList?pageType='+this.checkType
 				});
 			    uni.showToast({
 			        title: '提交成功',

+ 75 - 18
pages_safetyExamine/examineManage/examineAdd.vue

@@ -134,7 +134,7 @@
 		</view>
 	</uni-popup>
 	<view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0">下一步</view>
-	<view class="bottom_btn" @click="submitForm()" v-if="form.checkResult==1">提交</view>
+	<view class="bottom_btn" @click="handleClick('submitForm')" v-if="form.checkResult==1">提交</view>
   </view>
 
 </template>
@@ -265,19 +265,85 @@ export default {
 		scrollGet(){},
 	    handleClick(doType){
 		  let self=this;
-		  if(!this.form.rectifyDeadline){
-			  uni.showToast({
-			  	title: '整改日期不能为空!',
-			  	icon:"none",
-			  	mask:true,
-			  	duration: 2000
-			  });
-			  return
+		  if(!this.form.subIds){
+			uni.showToast({
+				title: '请选择实验室!',
+				icon:"none",
+				mask:true,
+				duration: 2000
+			});
+			return
+		  }
+		  if(!this.form.deptId){
+			uni.showToast({
+				title: '请选择学院!',
+				icon:"none",
+				mask:true,
+				duration: 2000
+			});
+			return
+		  }
+		  if(!this.form.buildId){
+			uni.showToast({
+				title: '请选择楼栋!',
+				icon:"none",
+				mask:true,
+				duration: 2000
+			});
+			return
+		  }
+		  if(!this.form.title){
+			  if(!this.isCustom){
+				  uni.showToast({
+				  	title: '请输入计划标题!',
+				  	icon:"none",
+				  	mask:true,
+				  	duration: 2000
+				  });
+			  }else{
+				  uni.showToast({
+				  	title: '请选择计划标题!',
+				  	icon:"none",
+				  	mask:true,
+				  	duration: 2000
+				  });
+			  }
+			
+			return
+		  }
+		  if(!this.form.cycleStartTime || !this.form.cycleEndTime){
+			uni.showToast({
+				title: '请选择计划周期!',
+				icon:"none",
+				mask:true,
+				duration: 2000
+			});
+			return
+		  }
+		  if(this.currentDate<this.form.cycleStartTime){
+		  	uni.showToast({
+		  		title: '当前时间不在计划周期内',
+		  		icon:"none",
+		  		mask:true,
+		  		duration: 2000
+		  	});
+		  	return
 		  }
 		  if( doType=='nextStep'){//下一步	
+			  if(!this.form.rectifyDeadline){
+			  			  uni.showToast({
+			  			  	title: '整改日期不能为空!',
+			  			  	icon:"none",
+			  			  	mask:true,
+			  			  	duration: 2000
+			  			  });
+			  			  return
+			  }
 			  uni.navigateTo({
 				  url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
 			  });
+		  }else if(doType=='submitForm'){
+			  self.submitForm()
 		  }
 		  
 	    },
@@ -636,15 +702,6 @@ export default {
 	    //提交
 	    async submitForm(){
 			let self = this;
-			if(this.currentDate<this.form.cycleStartTime){
-				uni.showToast({
-					title: '当前时间不在计划周期内',
-					icon:"none",
-					mask:true,
-					duration: 2000
-				});
-				return
-			}
 			this.form.manageStatus=2;
 			let obj=self.form;
 			//复合的情况下,删除隐患项

+ 0 - 9
pages_safetyExamine/examineManage/examineAddTow.vue

@@ -556,15 +556,6 @@
 			//提交
 			async submitForm(){
 				let self = this;
-				if(this.currentDate<this.form.cycleStartTime){
-					uni.showToast({
-						title: '当前时间不在计划周期内',
-						icon:"none",
-						mask:true,
-						duration: 2000
-					});
-					return
-				}
 				let obj=JSON.parse(JSON.stringify(self.form));
 				//语音备注JSON对象转字符串
 				for(let i=0;i<obj.checkHazardDtoList.length;i++){

+ 1 - 1
pages_safetyExamine/examineManage/examineList.vue

@@ -86,6 +86,7 @@ export default {
 		getData:{
 			pageNum:1,
 			pageSize:20,
+			isSelf: 0,//是否本人查询
 		    checkType:'',//检查类型(0全部1校院巡查2实验室自查)
 			manageStatus:-1,//管理状态(-1全部 0待检查,1检查中,2已检查)
 			searchValue:'',
@@ -115,7 +116,6 @@ export default {
 	}
   },
   onLoad(option) {
-	   console.log(uni.getStorageSync('gentleIdentifierData'))
 	  this.myApplyGentle=uni.getStorageSync('gentleIdentifierData').myApplyGentle
 	  this.applyGentle=uni.getStorageSync('gentleIdentifierData').applyGentle
 	  

+ 1 - 0
pages_safetyExamine/inforSign.vue

@@ -73,6 +73,7 @@ export default {
   },
   mounted(){
 	  this.getInforSign()
+	  console.log(uni.getStorageSync('saoCodeId'))
   },
   methods: {
 		//滚动事件

+ 37 - 1
pages_safetyExamine/patrolPlan/patrolPlanAdd.vue

@@ -99,7 +99,7 @@ export default {
 			checkTypeName:'校院巡查',//1校院巡查 2实验室自查
 			cycleStartTime:'',
 			cycleEndTime:'',
-			checkRange:0,//检查范围 1全校 2学院 3实验室
+			checkRange:'',//检查范围 1全校 2学院 3实验室
 			checkLevel:'',//巡查组层级
 			seleteListMember:[],//临时存储选中巡查组
 			checkMemberDtoList:[],//巡查组成员
@@ -391,6 +391,42 @@ export default {
 		//巡查计划-添加
 		async submitForm(){
 			let _this = this;
+			if(!_this.form.title){
+				uni.showToast({
+				    title: '请输入计划标题',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
+			if(!_this.form.cycleStartTime || !_this.form.cycleEndTime){
+				uni.showToast({
+				    title: '请选择计划周期',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
+			if(!_this.form.checkRange){
+				uni.showToast({
+				    title: '请选择检查范围',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
+			if(_this.form.checkRange==3 && _this.form.subjectNum==0){
+				uni.showToast({
+				    title: '请选择实验室',
+				    icon:"none",
+				    mask:true,
+				    duration: 2000
+				});
+				return;
+			}
 			const {data} = await checkPlanAdd(_this.form);
 			if(data.code == 200){
 			    uni.showToast({

+ 27 - 0
pages_safetyExamine/snapshotManage/snapshotAdd.vue

@@ -312,6 +312,33 @@ export default {
 		//添加
 		async submitForm(){
 			let _this = this;
+			if(!this.form.deptId){
+				uni.showToast({
+					title: '请选择学院!',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
+			if(!this.form.subId){
+				uni.showToast({
+					title: '请选择实验室!',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
+			if(this.form.imgDtoList.length==0){
+				uni.showToast({
+					title: '请上传隐患照片!',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+				return
+			}
 			const {data} = await checkClapAdd(_this.form);
 			if(data.code == 200){
 			    uni.showToast({