heyang 2 年之前
父節點
當前提交
d89deaa4a8

+ 16 - 5
component/tabBar.vue

@@ -78,11 +78,22 @@
 			},
             tabBarGoPage(type){
                 if(type === 1){
-                    if (this.currentRoute !== 'pages/home') {
-                        uni.redirectTo({
-                            url: '/pages/home',
-                        });
-                    }
+					let safetyIdentity=uni.getStorageSync('gentleIdentifier')
+					if(safetyIdentity=='mine'){//安全检查模块判断身份是否有权限
+						uni.showToast({
+						  title: '暂无安全检查权限',
+						  mask:true,
+						  icon:"none",
+						  duration: 2000
+						});
+					}else{
+						if (this.currentRoute !== 'pages/home') {
+							uni.redirectTo({
+								url: '/pages/home',
+							});
+						}
+					}
+                    
 				}else if(type === 2){
                     if (this.currentRoute !== 'pages/information/information') {
                         uni.redirectTo({

+ 47 - 4
pages/login.vue

@@ -39,7 +39,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { login,getLogoInfo,getDemoInfoList,getOpenId,getUrlConfig} from '@/api/index.js'
+import { login,getLogoInfo,getDemoInfoList,getOpenId,getUrlConfig,getGentleIdentifier} from '@/api/index.js'
 import { Encrypt,Decrypt} from '@/utils/secret.js'
 export default {
   data() {
@@ -52,6 +52,7 @@ export default {
       infoList:[],//模板消息Id
 	  tabText:['师生登录','供应商登录'],
 	  curTab:0,
+	  pageType:0,
     }
   },
 
@@ -79,6 +80,46 @@ export default {
 	  	this.curTab = index;
 	
 	  },
+	//获取用户身份标识"adminGentle": false,   管理员身份 "rectifyGentle": false,   整改身份"applyGentle": false    检查者身份
+	async getGentleIdentifier(){
+		let self = this;
+		const {data} = await getGentleIdentifier();
+		if(data.code==200){
+		 
+		  // 如果是管理员 检查者和整改者 
+		  if(data.data.adminGentle && data.data.applyGentle && data.data.rectifyGentle){
+			   self.pageType=0
+		  }else if(data.data.adminGentle && data.data.applyGentle && !data.data.rectifyGentle){
+			  self.pageType=0
+		  }else if(data.data.adminGentle && !data.data.applyGentle && data.data.rectifyGentle){
+			  self.pageType=0
+		  }else if(!data.data.adminGentle && data.data.applyGentle && data.data.rectifyGentle){
+			  self.pageType=1
+		  }else if(data.data.adminGentle && !data.data.applyGentle && !data.data.rectifyGentle){
+			  self.pageType=0
+		  }else if(!data.data.adminGentle && data.data.applyGentle && !data.data.rectifyGentle){
+			  self.pageType=1
+		  }else if(!data.data.adminGentle && !data.data.applyGentle && data.data.rectifyGentle){
+			  self.pageType=2
+		  }else if(!data.data.adminGentle && !data.data.applyGentle && !data.data.rectifyGentle){
+			  console.log('暂无权限')
+			  self.pageType='mine'
+		  }
+		  uni.setStorageSync('gentleIdentifier',self.pageType)
+		  console.log('安全检查身份',self.pageType)
+		  if(self.pageType=='mine'){
+			  uni.redirectTo({
+			    url: '/pages/mine',
+			  });
+		  }else{
+			  uni.redirectTo({
+			    url: '/pages/home',
+			  });
+		  }
+		 
+		 
+		}
+	},
     //获取openID
     async getOpenId(){
       let _this=this;
@@ -173,9 +214,11 @@ export default {
           uni.removeStorageSync('userName')
           uni.removeStorageSync('password')
         }
-        uni.redirectTo({
-          url: '/pages/home',
-        });
+		//获取身份标识
+		this.getGentleIdentifier();
+       
+		
+		
 
       }
     },

+ 15 - 4
pages/pages_safetyExamine/dangerManage/dangerDetail.vue

@@ -206,8 +206,8 @@
 		
 	
 	</scroll-view>
-	<view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2">提交</view>
-	<view class="bottom_btn_tow" v-if="rectifyStatus==3">
+	<view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2 && rectifyGentle">提交</view>
+	<view class="bottom_btn_tow" v-if="rectifyStatus==3 && applyGentle">
 		<text @click="submitForm('reject')">驳回</text>
 		<text @click="submitForm('pass')">通过</text>
 	</view>
@@ -255,6 +255,8 @@ export default {
 		item:{},
 		rectifyStatus:'',//1已完成 2待整改 3待复核 4 暂无法整改
 		checkType:null,
+		applyGentle:false,//待复核-有没有审核权限
+		rectifyGentle:false,//待整改-有没有整改权限
 		
 	}
   },
@@ -304,6 +306,10 @@ export default {
 					this.infoData=data.data
 					this.form.checkHazardId=data.data.checkHazardApplyDto.id;
 					this.form.rectifyType=data.data.checkType;
+					
+					this.applyGentle=data.data.checkHazardApplyDto.applyGentle
+					this.rectifyGentle=data.data.checkHazardApplyDto.rectifyGentle
+					
 					if(data.data.checkRectifyApplyList.length>0){
 						for(let i=0;i<data.data.checkRectifyApplyList.length;i++){
 							this.form.id=data.data.checkRectifyApplyList[i].id;
@@ -324,12 +330,17 @@ export default {
 							  this.tabTextTow.push({'type':'item','name':nameLeft+nameRight})
 							}
 						}
-						if(this.rectifyStatus==3){
+						
+						if(this.rectifyStatus==3 && this.applyGentle){
 						  this.tabTextTow.push({'type':'check','name':'整改复核'})
+						}else if(this.rectifyStatus==2 && this.rectifyGentle){
+						  this.tabTextTow.push({'type':'add','name':'隐患整改'})
 						}
 					}else{
-						if(this.rectifyStatus==2){
+						if(this.rectifyStatus==2 && this.rectifyGentle){//有整改权限
 						  this.tabTextTow=[{'type':'detail','name':'隐患检查'},{'type':'add','name':'隐患整改'}]
+						}else{
+							 this.tabTextTow=[{'type':'detail','name':'隐患检查'}]
 						}
 					}
 					

+ 7 - 1
pages/pages_safetyExamine/dangerManage/dangerList.vue

@@ -51,6 +51,7 @@
 				<view class="list_three_li_b">整改期限:{{item.rectifyDeadline}}</view>
 			</view>
 		</view>
+		<img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
 	</scroll-view>
   </view>
 
@@ -246,7 +247,12 @@ export default {
 		color: #A2A2A2;
 		border: 1rpx solid #A2A2A2;
 	}
-	
+	.null-img{
+		display block
+		width:276rpx;
+		height:321rpx;
+		margin:100rpx 0 0 274rpx;
+	}
 	.info-max-box{
 		flex: 1;
 		overflow: scroll;

+ 8 - 1
pages/pages_safetyExamine/dangerManage/dangerManage.vue

@@ -57,6 +57,7 @@
 				<view class="list_three_li_b">整改期限:{{item.rectifyDeadline}}</view>
 			</view>
 		</view>
+		<img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
 	</scroll-view>
   </view>
 
@@ -270,7 +271,13 @@ export default {
 		color: #A2A2A2;
 		border: 1rpx solid #A2A2A2;
 	}
-	
+	.info-max-box{
+		flex: 1;
+		overflow: scroll;
+		
+		padding: 220rpx 0rpx 0;
+		box-sizing: border-box;
+	}
 	.info-max-box{
 		flex: 1;
 		overflow: scroll;

+ 25 - 0
pages/pages_safetyExamine/examineManage/examineDetail.vue

@@ -99,6 +99,7 @@
 		</view>
 	</scroll-view>
 	<view class="report" @change="buttonChange" v-if="manageStatus==2">整改报告</view>	
+	<view class="bottom_btn" v-if="manageStatus==0" @click="handleClick('','startInspect')">开始检查</view>
   </view>
 
 </template>
@@ -150,6 +151,14 @@ export default {
 		scrollGet(){
 			
 		},
+		//开展检查
+		handleClick(row,doType){
+			if(doType=='startInspect'){
+				uni.navigateTo({
+				    url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+this.id
+				});
+			}
+		},
 		//详情
 		async findCheckManage(){
 			let _this = this;
@@ -619,5 +628,21 @@ export default {
 		right: 0;
 		text-align: center;
 	}
+	.bottom_btn{
+		position: fixed;
+		bottom: 26rpx;
+		left: 30rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC-Medium, PingFang SC;
+		font-weight: 400;
+		color: #FFFFFF;
+		line-height: 90rpx;
+		width: 690rpx;
+		height: 90rpx;
+		background: #0183FA;
+		border-radius: 20rpx;
+		text-align: center;
+		
+	}
 }
 </style>

+ 17 - 14
pages/pages_safetyExamine/examineManage/examineList.vue

@@ -59,6 +59,7 @@
 				</view>
 			</view>
 		</view>
+		<img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
 	</scroll-view>	
 	<view class="bottom_btn" @click="handleClick('','startInspect')">开始检查</view>
   </view>
@@ -109,12 +110,12 @@ export default {
 	 if(option.pageType==1){
 	 		  this.getData.checkType=option.pageType
 	 		  uni.setNavigationBarTitle({
-	 		  		title:'校院巡查'
+	 		  		title:'校院巡查管理'
 	 		  })
 	 }else if(option.pageType==2){
 	 		   this.getData.checkType=option.pageType
 	 		  uni.setNavigationBarTitle({
-	 		  		title:'实验室自查'
+	 		  		title:'实验室自查管理'
 	 		  })
 	 }
   },
@@ -171,16 +172,14 @@ export default {
 		//滚动事件
 		scrollGet(){
 			let self=this;
-			if(this.pageType==1){//当页面切换到检查管理列表里的时候
-				if(self.total/self.getData.pageSize<=self.getData.pageNum){
-				    console.log('没有更多数据!')
-				}else{
-						setTimeout(function(){
-							self.getData.pageNum += 1;
-							self.getList(); 
-						},1000)
-							 
-				}
+			if(self.total/self.getData.pageSize<=self.getData.pageNum){
+			    console.log('没有更多数据!')
+			}else{
+					setTimeout(function(){
+						self.getData.pageNum += 1;
+						self.getList(); 
+					},1000)
+						 
 			}
 			
 		},
@@ -257,7 +256,6 @@ export default {
 				})
 				this.dataList=[...this.dataList,...data.data.records]
 				this.total=data.data.total;
-				console.log(this.dataList)
 			}
 		},
 	  
@@ -285,7 +283,12 @@ export default {
 		color: #1FA50D;
 		border: 1rpx solid #1FA50D;
 	}
-	
+	.null-img{
+		display block
+		width:276rpx;
+		height:321rpx;
+		margin:100rpx 0 0 274rpx;
+	}
 	.info-max-box{
 		flex: 1;
 		overflow: scroll;

+ 35 - 25
pages/pages_safetyExamine/patrolPlan/patrolPlanAdd.vue

@@ -39,7 +39,7 @@
 			<view class="scope_text" v-if="scopeIndex==0 || scopeIndex==1">已选择<text>{{form.collegeNum}}</text>个学院,共<text>{{form.subjectNum}}</text>间实验室</view>
 			<view class="scope_text" v-if="scopeIndex==2">已选择<text>{{form.subjectNum}}</text>间实验室</view>
 		</view>
-		<view class="patrol_group">
+		<view class="patrol_group" v-if="form.checkType==1">
 			<view class="patrol">
 				<view class="patrol_l">巡查组</view>
 				<view class="patrol_r_n" @click="patrolChange">
@@ -96,7 +96,6 @@ export default {
 			cycleStartTime:'',
 			cycleEndTime:'',
 			checkRange:0,//检查范围 1全校 2学院 3实验室
-			checkGroupId:[],//巡查组id
 			checkLevel:'',//巡查组层级
 			checkGroupMemberList:[],//巡查组成员
 			collegeIds:'',//学院id组
@@ -197,31 +196,42 @@ export default {
 		//检查范围
 		scopeChange(e){
 			let _this=this;
-			uni.showModal({
-				content: '重新选择会删除现有选择的实验室,是否重选?',
-				cancelColor:"#999",
-				confirmColor:"#0183FA",
-				success: function (res) {
-				  if (res.confirm) {
-					_this.scopeIndex = e.target.value;
-					_this.form.checkRange=Number(e.target.value)+1;//检查范围
-					
-					_this.form.collegeIds ='';
-					_this.form.collegeNum =0;
-					_this.form.subIds ='';
-					_this.form.subjectNum =0;
-					if(e.target.value==1){//选择学院
-						_this.conditionCollegeInfo();
-					}else if(e.target.value==0){//全校
-						_this.getAllSubNum();
-					}else if(e.target.value==2){
-						console.log('选择实验室')
+			_this.scopeIndex = e.target.value;
+			_this.form.checkRange=Number(e.target.value)+1;//检查范围
+			if(this.form.subjectNum>0){
+				uni.showModal({
+					content: '重新选择会删除现有选择的实验室,是否重选?',
+					cancelColor:"#999",
+					confirmColor:"#0183FA",
+					success: function (res) {
+					  if (res.confirm) {
+						
+						_this.form.collegeIds ='';
+						_this.form.collegeNum =0;
+						_this.form.subIds ='';
+						_this.form.subjectNum =0;
+						if(e.target.value==1){//选择学院
+							_this.conditionCollegeInfo();
+						}else if(e.target.value==0){//全校
+							_this.getAllSubNum();
+						}else if(e.target.value==2){
+							console.log('选择实验室')
+						}
+					  } else if (res.cancel) {
+						  
+					  }
 					}
-				  } else if (res.cancel) {
-					  
-				  }
+				});
+			}else{
+				if(e.target.value==1){//选择学院
+					_this.conditionCollegeInfo();
+				}else if(e.target.value==0){//全校
+					_this.getAllSubNum();
+				}else if(e.target.value==2){
+					console.log('选择实验室')
 				}
-			});
+			}
+			
 			
 		},
 		timeSlotChange (val) {

+ 1 - 1
pages/pages_safetyExamine/patrolPlan/patrolPlanEdit.vue

@@ -559,7 +559,7 @@ export default {
 				this.form.checkRange=data.data.checkRange;
 				this.form.checkGroupId=data.data.checkGroupId;
 				this.form.collegeIds=data.data.collegeIds;
-				this.form.collegeIds=data.data.collegeIds;
+				this.form.collegeNum=data.data.collegeNum;
 				this.form.subIds=data.data.subIds;
 				this.form.subjectNum=data.data.subjectNum;
 				this.form.uploadDtoList=data.data.uploadDtoList;

+ 8 - 8
pages/pages_safetyExamine/patrolPlan/patrolPlanList.vue

@@ -1,14 +1,14 @@
 <!-- 安全检查-发起巡查计划 -->
 <template>
   <view class="examine">
+	  <view class="tabTitle">
+		<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
+			<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
+			<view :class="{on:curTab==index}" class="tabTitle_across"></view>
+		</view>
+	  </view>
 	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 		<view>
-			<view class="tabTitle">
-				<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-					<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-				    <view :class="{on:curTab==index}" class="tabTitle_across"></view>
-				</view>
-			</view>
 			<view class="search">
 				<view class="search_btn"  @click="searchBtn">
 					<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
@@ -83,12 +83,12 @@ export default {
 	  if(option.pageType==1){
 		  this.getData.checkType=option.pageType
 		  uni.setNavigationBarTitle({
-		  		title:'校院巡查'
+		  		title:'校院巡查计划'
 		  })
 	  }else if(option.pageType==2){
 		   this.getData.checkType=option.pageType
 		  uni.setNavigationBarTitle({
-		  		title:'实验室自查'
+		  		title:'实验室自查计划'
 		  })
 	  }
 		

+ 7 - 1
pages/pages_safetyExamine/snapshotManage/snapshotList.vue

@@ -36,6 +36,7 @@
 				</view>
 			</view>
 		</view>
+		<img class="null-img" v-if="!dataList[0]" src="@/images/null-data-1.png">
 	</scroll-view>
   </view>
 
@@ -187,7 +188,12 @@ export default {
 		color: #A2A2A2;
 		border: 1rpx solid #A2A2A2;
 	}
-	
+	.null-img{
+		display block
+		width:276rpx;
+		height:321rpx;
+		margin:100rpx 0 0 274rpx;
+	}
 	.info-max-box{
 		flex: 1;
 		overflow: scroll;

+ 27 - 11
pages/safetyExamineWorkbench.vue

@@ -220,7 +220,7 @@ export default {
   },
   data() {
     return {
-	  pageType:0,
+	  pageType:uni.getStorageSync('gentleIdentifier'),
       //列表请求参数
       getData:{
         pageNum:1,
@@ -281,14 +281,19 @@ export default {
   onShow() {
 	 
   },
+  beforeCreate() {
+	   
+  },
   mounted(){
+	 
 	  //获取当前日期
 	  this.currentDate=this.getNowFormatDate()
-	  //this.getGentleIdentifier();//查询身份标识
+	  
 	  this.getCheckStatusCount();
 	  this.getManageStatusCount();
 	  this.dataStatistics();
 	  this.checkClapListAllNum();//随手拍待整改总数
+	  
 	  if(this.pageType==0){//管理员
 		   this.getList();
 	  }else if(this.pageType==1){//检查者
@@ -632,15 +637,26 @@ export default {
 	      let self = this;
 	      const {data} = await getGentleIdentifier();
 	      if(data.code==200){
-	  		   if(data.data.rectifyGentle){//整改者
-				   self.pageType==2
-			   }else if(data.data.applyGentle){//检查者
-				   self.pageType==1
-			   }else if(data.data.adminGentle){//管理员
-				   self.pageType==0
-			   }else{
-				   self.pageType==0
-			   }	 
+			 
+			  // 如果是管理员 检查者和整改者 
+			  if(data.data.adminGentle && data.data.applyGentle && data.data.rectifyGentle){
+				   self.pageType=0
+			  }else if(data.data.adminGentle && data.data.applyGentle && !data.data.rectifyGentle){
+				  self.pageType=0
+			  }else if(data.data.adminGentle && !data.data.applyGentle && data.data.rectifyGentle){
+				  self.pageType=0
+			  }else if(!data.data.adminGentle && data.data.applyGentle && data.data.rectifyGentle){
+				  self.pageType=1
+			  }else if(data.data.adminGentle && !data.data.applyGentle && !data.data.rectifyGentle){
+				  self.pageType=0
+			  }else if(!data.data.adminGentle && data.data.applyGentle && !data.data.rectifyGentle){
+				  self.pageType=1
+			  }else if(!data.data.adminGentle && !data.data.applyGentle && data.data.rectifyGentle){
+				  self.pageType=2
+			  }else if(!data.data.adminGentle && !data.data.applyGentle && !data.data.rectifyGentle){
+				  console.log('暂无权限')
+				  self.pageType=0
+			  }
 	  	  }
 	  },
 	  //检查计划各检查状态数据数量