heyang 2 years ago
parent
commit
4f72f50894

+ 1 - 1
pages/manageWorkbench.vue

@@ -376,7 +376,7 @@ export default {
       }else if(type == 'safetyInspect'){//安全检查
 
         uni.navigateTo({
-          url: '/pages_manage/workbench/securityCheck/safetyInspect',//安全警报
+          url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
         });
       }
       else if(type == 'alarm'){

+ 1 - 1
pages/studentWorkbench.vue

@@ -188,7 +188,7 @@ export default {
       }else if(type == 'safetyInspect'){//安全检查
 
         uni.navigateTo({
-          url: '/pages_manage/workbench/securityCheck/safetyInspect',//安全检查
+          url: '/pages_manage/workbench/problemRectification/rectifyList',//安全检查
         });
       }else if(type == 'gas'){//气瓶管理
         uni.navigateTo({

+ 68 - 11
pages_manage/workbench/problemRectification/rectifyList.vue

@@ -1,7 +1,13 @@
 <!-- 整改列表 -->
 <template>
 	<view id="safetyInspect" style="display: flex;flex-direction: column;flex: 1;">
-        <view class="top-button-box">
+		<view class="tabTitle" v-if="userType==1">
+			<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="top-button-box" :style="userType==1?'margin-top: 116rpx;':'margin-top: 0rpx;'">
             <view class="left-title">检查状态</view>
             <picker @change="bindPickerChange" :value="pickerIndex" :range="pickerArray" class="right-button-big-box">
                 <view class="right-button-box">
@@ -41,6 +47,7 @@
 		name: "rectifyList",
 		data() {
 			return {
+				userType:uni.getStorageSync('userType'),
 				infoList:[],
 				//列表请求参数
 				getData:{
@@ -53,6 +60,8 @@
 					getType:true,
 					nullDataType:true,
 				},
+				curTab:1,
+				tabText:['检查记录','问题整改',],
 				//下拉框
                 pickerIndex:0,
                 pickerArray:['全部','待整改','待复核','驳回','已完成','逾期'],
@@ -69,19 +78,30 @@
 			}
 		},
 		onLoad() {
-
+			//判断如果是学生端进入只显示问题整改
+			if(this.userType==2){
+				this.pageType=1
+			}
 		},
 		onShow() {
 
 			this.infoList=[];
+			this.getList();
 
 		},
 		mounted(){
-			uni.setStorageSync('First', 'true')//设置关键字和其值
-			this.infoList=[];
-			this.getList();
+			
 		},
 		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				if(index==0){
+					uni.redirectTo({
+					    url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
+					});
+				}
+			
+			},
 			//去详情
 			async goInfo(item){
 				console.log(item)
@@ -208,17 +228,54 @@
 
 <style lang="stylus" scoped>
 	#safetyInspect{
-		/* height:100%;
-		flex:1;
-		display flex
-		flex-direction column
-		overflow: hidden */
+		height:100%;
+		 width: 100%;
+		display flex;
+		flex-direction column;
+		.tabTitle{
+			position: fixed;
+			z-index: 1000;
+			display flex;
+			width:100%;
+			height: 100rpx;
+			background: #fff;
+		
+			.tabTitle_li{
+				width:146rpx;
+				text-align center;
+				.tabTitle_text{
+					display: inline-block;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 70rpx;
+					&.on{
+						color:#0183FA;
+					}
+				}
+				.tabTitle_across{
+					width: 80rpx;
+					height: 5rpx;
+					background: #0183FA;
+					border-radius: 3rpx;
+					margin-left 34rpx;
+					display none;
+					&.on{
+						display block;
+					}
+				}
+		
+			}
+		
+		
+		}
 		.top-button-box{
 			height:150rpx;
 			margin-bottom:20rpx;
 			display flex;
 			padding:0 20rpx;
-			background #fff
+			background #fff;
 			.left-title{
 				line-height:150rpx;
 				margin-right:15rpx;

+ 60 - 16
pages_manage/workbench/securityCheck/inspectionRecords.vue

@@ -1,7 +1,13 @@
 <!--检查记录-->
 <template>
     <view id="safetyInspect" style="display: flex;flex-direction: column;flex: 1;">
-		<view class="top-button-box">
+		<view class="tabTitle"  v-if="userType==1">
+			<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="top-button-box" :style="userType==1?'margin-top: 116rpx;':'margin-top: 0rpx;'">
 		    <view class="left-title">检查状态</view>
 		    <picker @change="bindPickerChange" :value="pickerIndex" :range="pickerArray" class="right-button-big-box">
 		        <view class="right-button-box">
@@ -53,8 +59,7 @@
         name: "inspectionRecords",
         data() {
             return {
-
-				pageType:0,
+				userType:uni.getStorageSync('userType'),
 				//列表请求参数
 				getData:{
 				    pageNum:1,
@@ -72,26 +77,27 @@
             }
         },
         onLoad() {
-
+			//判断如果是学生端进入只显示问题整改
+			if(this.userType==2){
+				this.pageType=1
+			}
         },
         onShow() {
 			this.dataList=[];
+			this.getList();
         },
 		mounted(){
-			let First = uni.getStorageSync('First')
-			console.log(First)
-			if(First){//非第一次进入
-				this.getList();
-			}else{//第一次进入
-			  uni.setStorageSync('First', 'true')//设置关键字和其值
-			}
+			
 		},
         methods: {
 			//顶部tab点击
 			tabClick(index) {
-				this.curTab = index;
-
-				this.pageType=index;
+				
+				if(index==1){
+					uni.redirectTo({
+					    url: '/pages_manage/workbench/problemRectification/rectifyList',//问题整改
+					});
+				}
 
 			},
             //开始检查
@@ -203,17 +209,55 @@
 
 <style lang="stylus" scoped>
     #safetyInspect{
-       height: 100%;
+		height: 100%;
         width: 100%;
         display flex;
         flex-direction column;
+		.tabTitle{
+			position: fixed;
+			z-index: 1000;
+			display flex;
+			width:100%;
+			height: 100rpx;
+			background: #fff;
+
+			.tabTitle_li{
+				width:146rpx;
+				text-align center;
+				.tabTitle_text{
+					display: inline-block;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 70rpx;
+					&.on{
+						color:#0183FA;
+					}
+				}
+				.tabTitle_across{
+					width: 80rpx;
+					height: 5rpx;
+					background: #0183FA;
+					border-radius: 3rpx;
+					margin-left 34rpx;
+					display none;
+					&.on{
+						display block;
+					}
+				}
+
+			}
+
+
+		}
 
 		.top-button-box{
 		    height:150rpx;
 		    margin-bottom:20rpx;
 		    display flex
 		    padding:0 20rpx;
-		    background #fff
+		    background #fff;
 		    .left-title{
 		        line-height:150rpx;
 		        margin-right:15rpx;

+ 1 - 1
pages_student/workbench/workbench.vue

@@ -181,7 +181,7 @@
 				}else if(type == 'safetyInspect'){//安全检查
 
 					uni.navigateTo({
-					    url: '/pages_manage/workbench/securityCheck/safetyInspect',//安全检查
+					    url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
 					});
                 }
             },