heyang преди 6 месеца
родител
ревизия
783a8dd793
променени са 3 файла, в които са добавени 123 реда и са изтрити 136 реда
  1. 13 0
      pages_safetyCheck/api/index.js
  2. 16 2
      pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue
  3. 94 134
      pages_safetyCheck/views/safetyCheck.vue

+ 13 - 0
pages_safetyCheck/api/index.js

@@ -56,6 +56,19 @@ export const securityAppCheckPhotoList = (data) => {
 		data: { ...data }
 	})
 };
+//安全检查-校级检查/学院自查列表
+export const securityAppCheckPlanTitleList = (data) => {
+    return apiResquest({
+        url: '/security/appCheckPlan/titleList',
+       method: 'POST',
+       data: { ...data }
+    })
+};
+
+
+
+
+
 
 
 

+ 16 - 2
pages_safetyCheck/views/itemsManage/hiddenDangerItems.vue

@@ -11,8 +11,7 @@
 			<view class="line"></view>
 			<view class="search">
 				<view class="search-l">
-					<view>符合</view>
-					<view>不符合</view>
+					<view @click="searchClick(item,index)" :class="item.selected?'search-B':'search-A'" v-for="(item,index) in searchList">{{item.name}}</view>
 				</view>
 				<view class="search-r" @click="inspectionItemsClick()">
 					<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
@@ -79,6 +78,17 @@
 				total: 0,
 				dataList: [],
 				getDataType: false,
+				searchList:[
+					{
+						name:'符合',
+						selected:false,
+					},
+					{
+						name:'不符合',
+						selected:false,
+					},
+				],
+				searchIndex:0,
 
 			}
 		},
@@ -133,6 +143,10 @@
 			dialogClose() {
 				this.dialogVisible = false;
 			},
+			searchClick(row,index){
+				row.selected=row.selected?false:true
+				
+			},
 			//搜索项跳转
 			inspectionItemsClick() {
 				this.newData.pageType = 2; //1随手拍检查项

+ 94 - 134
pages_safetyCheck/views/safetyCheck.vue

@@ -7,7 +7,8 @@
 				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
 					<view class="tabTitle_text">
 						<img :src="item.img">
-						<view :id="curTab==index && curTab==0?'fontColor-A':(curTab==index && curTab==1?'fontColor-B':'')">
+						<view
+							:id="curTab==index && curTab==0?'fontColor-A':(curTab==index && curTab==1?'fontColor-B':'')">
 							{{item.name}}
 						</view>
 						<view>{{item.title}}</view>
@@ -22,8 +23,8 @@
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
 			<view class="list">
 				<view class="list-li" @click="planClick(item)" v-for="(item,index) in dataList">
-					<view :id="item.status==0?'bgColor-A':'bgColor-B'">{{item.status==0?'全部检查':'专项检查'}}</view>
-					<view>{{item.title}}</view>
+					<img src="@/pages_safetyCheck/images/icon_aqjc_jh@1x.png">
+					<view>{{item.planTitle}}</view>
 					<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
 				</view>
 			</view>
@@ -43,10 +44,10 @@
 				<view class="batch">
 					<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
 						<view class="batch-li-l">
-							<text>{{item.title}}</text>
-							<text>开始检查日期:{{item.time}}</text>
+							<text>{{item.checkName}}</text>
+							<text>开始检查日期:{{item.checkStartTime}}</text>
 						</view>
-						<view class="batch-li-r">检查进度{{item.schedule}}
+						<view class="batch-li-r">检查进度{{item.checkSetProgress}}%
 							<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
 						</view>
 					</view>
@@ -61,7 +62,9 @@
 	import {
 		config
 	} from '@/api/request/config.js'
-	import {} from '@/pages/api/index.js'
+	import {
+		securityAppCheckPlanTitleList,
+	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "planDetail",
 		components: {
@@ -93,89 +96,16 @@
 					},
 				],
 				curTab: 0,
-				queryParams:{
-					page:1,
-					pageSize:20,
+				queryParams: {
+					page: 1,
+					pageSize: 20,
+					checkCategory:1,//1校院巡查 2学院自查
 				},
-				total:0,
-				dataList: [
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 0,
-						title: '计划标题计划标题计划标题计划标题计划标题计划标题计划标题计划标题',
-					},
-					{
-						status: 1,
-						title: '计划标题计划标题计划标题计划标题',
-					},
-				],
+				total: 0,
+				dataList: [],
 				getDataType: false,
 				dialogVisible: false,
-				batchList: [{
-						title: '第3次检查',
-						time: '2024-04-01',
-						schedule: '0%',
-					},
-					{
-						title: '第3次检查',
-						time: '2024-04-01',
-						schedule: '0%',
-					},
-					{
-						title: '第3次检查',
-						time: '2024-04-01',
-						schedule: '0%',
-					},
-					{
-						title: '第3次检查',
-						time: '2024-04-01',
-						schedule: '0%',
-					},
-					{
-						title: '第3次检查',
-						time: '2024-04-01',
-						schedule: '0%',
-					},
-				],
+				batchList: [],
 			}
 		},
 		onLoad(option) {
@@ -186,7 +116,7 @@
 
 		},
 		mounted() {
-
+			this.getList()
 		},
 		methods: {
 			//滚动加载事件
@@ -196,22 +126,26 @@
 					this.$set(this, 'getDataType', true);
 				} else {
 					console.log('滚动加载触发')
-					// this.queryParams.page += 1;
-					// this.$nextTick(() => {
-					// 	this.getList();
-					// })
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
 				}
 			},
 			//顶部tab点击
 			tabClick(index) {
-				if(this.curTab != index){
+				if (this.curTab != index) {
 					if (index == 0) {
 						//校级检查
-						this.$set(this,'curTab',index);
+						this.$set(this, 'curTab', index);
+						this.$set(this.queryParams, 'checkCategory', 1);
+						this.getList()
 					} else if (index == 1) {
 						//学院自查
-						this.$set(this,'curTab',index);
-					}else if (index == 2) {
+						this.$set(this, 'curTab', index);
+						this.$set(this.queryParams, 'checkCategory', 2);
+						this.getList()
+					} else if (index == 2) {
 						//随手拍
 						uni.navigateTo({
 							url: "/pages_safetyCheck/views/snapshotManage/snapshotList",
@@ -224,17 +158,40 @@
 				let infoData = row;
 				infoData.pageType = this.curTab;
 				uni.navigateTo({
-					url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON.stringify(
-						infoData))
+					url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON
+						.stringify(
+							infoData))
 				});
 			},
 			planClick(row) {
 				//如果只有1个检查批次不弹窗
 				this.dialogVisible = true;
+				this.$set(this, 'batchList', row.checkPlanSetVoList);
 			},
 			dialogClose() {
 				this.dialogVisible = false;
 			},
+			async getList() {
+				let self = this;
+				const {
+					data
+				} = await securityAppCheckPlanTitleList(this.queryParams);
+				if (data.code == 200) {
+					if (self.queryParams.page == 1) {
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					} else {
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
 
 		}
 	}
@@ -243,11 +200,12 @@
 <style lang="stylus" scoped>
 	.planDetail {
 		height: 100%;
-		display:flex;
+		display: flex;
 		flex-direction: column;
+
 		.header {
 			width: 100%;
-			height:235px;
+			height: 235px;
 			// position: fixed;
 			// top: 0rpx;
 			// z-index: 100;
@@ -343,17 +301,21 @@
 
 			}
 		}
-		.for-max-box{
+
+		.for-max-box {
 			flex: 1;
 			overflow-y scroll;
+
 			.list {
 				width: 690rpx;
 				margin-left: 30rpx;
 				background: #FFFFFF;
 				border-radius: 20rpx 20rpx 20rpx 20rpx;
-				.list-li:nth-child(1){
-					border-top:none;
+
+				.list-li:nth-child(1) {
+					border-top: none;
 				}
+
 				.list-li {
 					border-top: 1rpx dashed #E0E0E0;
 					height: 80rpx;
@@ -362,19 +324,8 @@
 					align-items: center;
 					padding: 0 30rpx;
 					box-sizing: border-box;
-			
+
 					>view:nth-of-type(1) {
-						width: 120rpx;
-						height: 40rpx;
-						background: rgba(1, 131, 250, 0.2);
-						border-radius: 10rpx 10rpx 10rpx 10rpx;
-						font-size: 24rpx;
-						color: #0183FA;
-						line-height: 40rpx;
-						text-align: center;
-					}
-			
-					>view:nth-of-type(2) {
 						flex: 1;
 						font-size: 28rpx;
 						color: #333333;
@@ -385,30 +336,39 @@
 						text-overflow: ellipsis;
 						white-space: nowrap;
 					}
-			
-					>img {
+
+					>img:nth-of-type(1) {
+						width: 42rpx;
+						height: 42rpx;
+					}
+
+					>img:nth-of-type(2) {
 						width: 24rpx;
 						height: 24rpx;
 					}
-			
+
 				}
 			}
-			.get-data-p{
-				height:100rpx;
+
+			.get-data-p {
+				height: 100rpx;
 				text-align: center;
-				.get-data-img{
-					width:30rpx;
-					height:30rpx;
-					margin:0 auto;
-					margin-top:15rpx;
+
+				.get-data-img {
+					width: 30rpx;
+					height: 30rpx;
+					margin: 0 auto;
+					margin-top: 15rpx;
 				}
-				.get-data-text{
+
+				.get-data-text {
 					text-align: center;
 				}
 			}
-			.get-data-null-p{
-				height:100rpx;
-				line-height:100rpx;
+
+			.get-data-null-p {
+				height: 100rpx;
+				line-height: 100rpx;
 				text-align: center;
 			}
 		}
@@ -507,23 +467,23 @@
 				}
 			}
 		}
-		
+
 		#fontColor-A {
 			color: #0040C1;
 		}
-		
+
 		#fontColor-B {
 			color: #009519;
 		}
-		
+
 		#bgColor-A {
 			color: #0183FA;
 			background: rgba(1, 131, 250, 0.2);
 		}
-		
+
 		#bgColor-B {
 			color: #16B531;
 			background: rgba(22, 181, 49, 0.2);
 		}
 	}
-</style>
+</style>