heyang 6 달 전
부모
커밋
5e98c3d750

+ 16 - 2
pages_safetyCheck/api/index.js

@@ -64,8 +64,22 @@ export const securityAppCheckPlanTitleList = (data) => {
        data: { ...data }
     })
 };
-
-
+//根据id查询计划方法
+export const securityCheckPlanFindCheckPlan = (data) => {
+	return apiResquest({
+		url: `/security/checkPlan/findCheckPlan`,
+		method: 'GET',
+		data: data,
+	})
+};
+//根据条件获取检查计划列表
+export const securityAppCheckManageList = (data) => {
+    return apiResquest({
+        url: '/security/appCheckManage/list',
+       method: 'POST',
+       data: { ...data }
+    })
+};
 
 
 

+ 118 - 55
pages_safetyCheck/views/inspectManage/inspectList.vue

@@ -3,10 +3,13 @@
 	<view class="snapshotList">
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 			<view class="title" @click="planClick()">
-				<view class="title-l" >
-					<view class="title-l-t">{{newData.data10}}</view>
+				<view class="title-l">
+					<view class="title-l-t">{{newData.planTitle}}</view>
 					<view class="title-l-b">
-						<view v-for="(item,index) in newData.data11" :key="index">{{item}}</view>
+						<view v-if="newData.checkCategory">
+							{{newData.checkCategory==1?'校院巡查':(newData.checkCategory==2?'学院自查':'')}}</view>
+						<view v-if="newData.checkTypeName">{{newData.checkTypeName}}</view>
+						<view v-if="newData.crossCheck==1">交叉互检</view>
 					</view>
 				</view>
 				<img class="title-r" src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
@@ -17,8 +20,8 @@
 			</view>
 			<view>
 				<view class="srearch">
-					<picker @change="deptChange" :value="deptIndex" :range="deptArray">
-						<view class="college">{{!deptIndex?'学院':deptArray[deptIndex]}}
+					<picker @change="deptChange" :value="deptIndex" :range="deptList"  :range-key="'deptName'">
+						<view class="college">{{queryParams.deptName?queryParams.deptName:'学院'}}
 							<img src="@/pages_safetyCheck/images/icon_06.png">
 						</view>
 					</picker>
@@ -26,7 +29,8 @@
 						<view class="srearch-l" @click="popupClick(1)">
 							<img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
 						</view>
-						<input class="srearch-c" type="text" @confirm="carriageReturnRequest" v-model="form.searchValue" placeholder="实验室/房间号" />
+						<input class="srearch-c" type="text" @confirm="carriageReturnRequest" v-model="form.searchValue"
+							placeholder="实验室/房间号" />
 						<view class="srearch-r" @click="saoCode()">
 							<img src="@/pages_safetyCheck/images/icon_aqjc_sm.png">
 						</view>
@@ -38,10 +42,10 @@
 				</view>
 			</view>
 			<view class="hidden">
-				<view class="hidden-li" @click="listClick(item)" v-for="(item,index) in hiddenList">
+				<view class="hidden-li" @click="listClick(item)" v-for="(item,index) in dataList">
 					<img class="hidden-li-l" src="@/pages_safetyCheck/images/icon_sys_xz@1x.png">
 					<view class="hidden-li-c">{{item.subName}}</view>
-					<view class="hidden-li-r">待检查{{item.num}}项
+					<view class="hidden-li-r">待检查{{item.unCheckCount}}项
 						<img src="@/pages_safetyCheck/images/icon_ssp_gd@1x.png">
 					</view>
 				</view>
@@ -71,10 +75,13 @@
 	import {
 		config
 	} from '@/api/request/config.js'
-	import {} from '@/pages/api/index.js'
+	import {
+		systemDeptDropList,
+	} from '@/pages/api/index.js'
 	import {
 		laboratorySubRelInfoGetRelList,
 		checkOptionListNew,
+		securityAppCheckManageList
 	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "snapshotList",
@@ -89,12 +96,10 @@
 				tabListTow: ['检查任务', '复查验证', '隐患整改'],
 				tabIndexTow: 0,
 				//学院选择
-				deptIndex:null,
-				deptArray:['学院A','学院B'],
-				deptList:[{deptId:1,deptName:'学院A'},{deptId:2,deptName:'学院B'},],
+				deptIndex: null,
+				deptList: [],
 				newData: {
-					data10: '计划标题计划标题计划标题计划标题计划标题计标题计划标题计划标题',
-					data11: ['校级检查', '全面检查', '交叉检查'],
+					planCategory: [], //检查类别
 				},
 				form: {
 					rectifyDescribe: '',
@@ -104,35 +109,33 @@
 				popupType: false,
 				roomList: [],
 				checkOptionList: [],
-				hiddenList: [{
-						subName: '实验室名称实验室名称实验室名称实验室名称',
-						num: 3,
-					},
-					{
-						subName: '实验室名称实验室名称实验室名称实验室名称',
-						num: 3,
-					},
-					{
-						subName: '实验室名称实验室名称实验室名称实验室名称',
-						num: 3,
-					},
-				],
 				levelList: ['一级', '二级', '三级', '四级'],
 				levelIndex: 0,
+				// 查询参数
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+					deptId: '',
+					deptName: '',
+					manageStatus:'',//0待检查,1检查中,2已检查
+					planSetId:'',//计划批次Id
+				},
+				dataList:[],
 			}
 		},
 		onLoad(option) {
-			//this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
-			this.pageType = option.infoData.pageType;
-			console.log( this.newData)
+			this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
+			this.pageType = this.newData.pageType;
+			console.log(this.newData)
 			uni.setNavigationBarTitle({
-				title: '第1次检查'
+				title: this.newData.checkPlanSetVoList[0].checkName
 			})
+			this.queryParams.planSetId= this.newData.checkPlanSetVoList[0].planSetId
 			if (this.pageType == 0) {
-				//检查
+				//校级检查
 				this.tabListTow = ['检查任务', '复查验证', '隐患整改'];
 			} else if (this.pageType == 1) {
-				//
+				//学院自
 				this.tabListTow = ['自查任务', '复查验证', '隐患整改'];
 			}
 
@@ -141,11 +144,29 @@
 
 		},
 		mounted() {
-
+			this.systemDeptDropList();
+			this.getList();
 		},
 		methods: {
 			//滚动事件
-			scrollGet() {},
+			scrollGet() {
+				let self = this;
+				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						if(this.pageType==0){
+							//检查任务
+							this.getList();
+						}else if(this.pageType==1){
+							
+						}else if(this.pageType==2){
+							
+						}
+					})
+				}
+			},
 			levelClick(index) {
 				this.levelIndex = index;
 			},
@@ -153,17 +174,21 @@
 				this.tabIndexTow = index;
 				this.pageType = index;
 			},
-			planClick(){
-				let infoData='';
+			planClick() {
+				let infoData = {
+					planId: this.newData.planId
+				};
 				uni.navigateTo({
-					url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(infoData))
+					url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(
+						infoData))
 				});
 			},
-			listClick(row){
-				let infoData=row;
-				infoData.pageType=this.tabIndexTow;
+			listClick(row) {
+				let infoData = row;
+				infoData.pageType = this.tabIndexTow;
 				uni.navigateTo({
-					url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(JSON.stringify(infoData))
+					url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
+						JSON.stringify(infoData))
 				});
 			},
 			/******搜索房间弹层开关******/
@@ -200,15 +225,8 @@
 			},
 			//确认搜索房间
 			popupClickItem(item) {
-				console.log(item)
-				this.$set(this.form, "subId", item.subId)
-				this.$set(this.form, "subName", item.subName)
-				this.$set(this.form, "deptId", item.deptId)
-				for (let i = 0; i < this.collegeList.length; i++) {
-					if (item.deptId == this.collegeList[i].deptId) {
-						this.$set(this.form, "deptName", this.collegeList[i].deptName)
-					}
-				}
+				this.$set(this.queryParams, "subId", item.subId)
+				this.$set(this.queryParams, "levelId", item.levelId)
 				this.popupType = false;
 			},
 			/******调用摄像头******/
@@ -237,15 +255,57 @@
 				});
 			},
 			//学院选择
-			deptChange(e){
-				if (this.deptList[0]) {
-					this.deptIndex = parseInt(e.target.value);
+			deptChange(e) {
+				let self = this;
+				self.deptList.forEach(function(item, index) {
+					if (index == e.detail.value) {
+						self.$set(self.queryParams, 'deptId', item.deptId)
+						self.$set(self.queryParams, 'deptName', item.deptName)
+					}
+				})
+			},
+			//获取院系
+			async systemDeptDropList() {
+				const {
+					data
+				} = await systemDeptDropList({
+					deptName: '',
+					level: 2,
+					deptType: 1
+				});
+				if (data.code == 200) {
+					this.deptList = data.data
 				}
 			},
 			//回车触发
-			carriageReturnRequest(){
+			carriageReturnRequest() {
 				console.log('123123')
 			},
+			//检查任务
+			async getList() {
+				let self = this;
+				const {
+					data
+				} = await securityAppCheckManageList(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);
+						}
+					}
+				}
+			},
+			
+			
+			
 
 		}
 	}
@@ -375,6 +435,9 @@
 				align-items: center;
 				padding: 0 26rpx;
 				box-sizing: border-box;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
 
 				>img {
 					width: 24rpx;

+ 119 - 82
pages_safetyCheck/views/materialAttachments.vue

@@ -1,103 +1,140 @@
 <!-- 材料附件 -->
 <template>
-  <view class="materialAttachments">
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<view class="list"> 
-			<view class="list-li" v-for="(item,index) in newData.data1">
-				<img src="@/pages_safetyCheck/images/icon_djc_wj.png">
-				<view>{{item}}</view>
-				<view>查看</view>
+	<view class="materialAttachments">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<view class="list">
+				<view class="list-li" v-for="(item,index) in newData">
+					<img src="@/pages_safetyCheck/images/icon_djc_wj.png">
+					<view>{{item.fileName}}</view>
+					<view @click="attachmentPreview(item)">查看</view>
+				</view>
 			</view>
-		</view>
-	</scroll-view>
-  </view>
+		</scroll-view>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import {chemicalAppletGetStockDetail} from '@/pages/api/index.js'
-export default {
-  name: "materialAttachments",
-  components: {
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		chemicalAppletGetStockDetail
+	} from '@/pages/api/index.js'
+	export default {
+		name: "materialAttachments",
+		components: {
 
-  },
-  data() {
-    return {
-		baseUrl:config.base_url,
-		pageType:0,
-		newData:{
-			data1:['文件标题文件标题文件标题文件标题文件标题文件标题文件标题文件标题','文件标题文件标题文件标题文件标题',],
 		},
-	}
-  },
-  onLoad(option) {
-	
+		data() {
+			return {
+				baseUrl: config.base_url,
+				pageType: 0,
+				newData: {},
+			}
+		},
+		onLoad(option) {
+			this.newData = JSON.parse(decodeURIComponent(option.infoData))
 
-  },
-  onShow() {
+		},
+		onShow() {
 
-  },
-  mounted(){
-	
-  },
-  methods: {
-		//滚动事件
-		scrollGet(){},
-		
-  }
-}
+		},
+		mounted() {
+
+		},
+		methods: {
+			//滚动事件
+			scrollGet() {},
+			attachmentPreview(item) {
+				uni.showLoading({
+					title: '下载中'
+				});
+				wx.downloadFile({
+					url: config.base_url + item.fileUrl,
+					header: {
+						Authorization: uni.getStorageSync('token')
+					},
+					success: function(res) {
+						uni.hideLoading();
+						const filePath = res.tempFilePath
+						wx.openDocument({
+							filePath: filePath,
+							success: function(res) {
+								console.log('打开文档成功')
+							}
+						})
+					},
+					fail: function(res) {
+						uni.hideLoading();
+						uni.showToast({
+							title: '下载失败',
+							icon: "none",
+							mask: true,
+							duration: 2000
+						});
+					}
+				})
+			},
+
+		}
+	}
 </script>
 
 <style lang="stylus" scoped>
-.materialAttachments{
-	height:100%;
-	display flex;
-	box-sizing: border-box;
-	padding: 0 30rpx;
-	box-sizing: border-box;
-	.list{
-		width: 690rpx;
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 20rpx 20rpx;
+	.materialAttachments {
+		height: 100%;
+		display flex;
+		box-sizing: border-box;
 		padding: 0 30rpx;
 		box-sizing: border-box;
-		margin-bottom: 20rpx;
-		margin-top: 20rpx;
-		.list-li{
-			height: 100rpx;
-			border-bottom: 1rpx solid #E0E0E0;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			>img{
-				width: 30rpx;
-				height: 30rpx;
-				margin-right: 16rpx;
-			}
-			>view:nth-of-type(1){
-				flex: 1;
-				font-size: 28rpx;
-				color: #333333;
-				line-height: 39rpx;
-				text-align: left;
-				overflow: hidden;
-				text-overflow: ellipsis;
-				white-space: nowrap;
-				margin-right: 56rpx;
+	
+	.list {
+			width: 690rpx;
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 20rpx 20rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin-bottom: 20rpx;
+			margin-top: 20rpx;
+
+			.list-li {
+				height: 100rpx;
+				border-bottom: 1rpx solid #E0E0E0;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				>img {
+					width: 30rpx;
+					height: 30rpx;
+					margin-right: 16rpx;
+				}
+
+				>view:nth-of-type(1) {
+					flex: 1;
+					font-size: 28rpx;
+					color: #333333;
+					line-height: 39rpx;
+					text-align: left;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					margin-right: 56rpx;
+				}
+
+				>view:nth-of-type(2) {
+					font-size: 28rpx;
+					color: #0183FA;
+					line-height: 39rpx;
+					text-align: left;
+				}
 			}
-			>view:nth-of-type(2){
-				font-size: 28rpx;
-				color: #0183FA;
-				line-height: 39rpx;
-				text-align: left;
+
+			.list-li:last-of-type {
+				border: none;
 			}
 		}
-		.list-li:last-of-type{
-			border: none;
-		}
-	}
-
-}
 
+	}
 </style>

+ 48 - 28
pages_safetyCheck/views/planDetail.vue

@@ -3,57 +3,59 @@
 	<view class="planDetail">
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 			<view class="title">
-				<view class="title-t">{{newData.data1}}</view>
+				<view class="title-t">{{newData.planTitle}}</view>
 				<view class="title-b">
-					<view v-for="(item,index) in newData.data2" :key="index">{{item}}</view>
+					<view v-if="newData.checkCategory">{{newData.checkCategory==1?'校院巡查':(newData.checkCategory==2?'学院自查':'')}}</view>
+					<view v-if="newData.checkTypeName">{{newData.checkTypeName}}</view>
+					<view v-if="newData.crossCheck==1">交叉互检</view>
 				</view>
 			</view>
 			<view class="box">
 				<view class="content-li">
 					<view>检查周期</view>
-					<view>{{newData.data3}}</view>
+					<view>{{newData.cycleStartTime}}至{{newData.cycleEndTime}}</view>
 				</view>
 				<view class="content-li">
 					<view>检查范围</view>
-					<view>{{newData.data4}}</view>
+					<view>共 {{newData.subjectNum}} 间实验室</view>
 				</view>
 				<view class="content-li">
 					<view>检查组织</view>
-					<view>{{newData.data5}}</view>
+					<view>{{newData.checkGroupName}}</view>
 				</view>
-				<view class="content-li-tow">
+				<view class="content-li-tow" v-if="newData.checkDemand">
 					<view>检查要求</view>
-					<view>{{newData.data6}}</view>
+					<view>{{newData.checkDemand}}</view>
 				</view>
 			</view>
-			<view class="small-title">
+			<view class="small-title" v-if="newData.uploadDtoList">
 				<view>材料附件</view>
-				<view>
-					<text>{{newData.data7}}个</text>
+				<view @click="attachmentClick(newData.uploadDtoList)">
+					<text>{{newData.uploadDtoList.length}}个</text>
 					<img src="@/pages_safetyCheck/images/icon_wd_gd@1x.png">
 				</view>
 			</view>
-			<view class="list" v-for="(item,index) in newData.data8">
+			<view class="list" v-for="(item,index) in newData.checkPlanSetDtoList">
 				<view class="subscript">{{index+1}}</view>
 				<view class="list-li">
-					<view>第1次检查</view>
-					<view :id="item.status==0?'color-A':(item.status==1?'color-B':'color-C')">{{item.data1}}</view>
+					<view>{{item.checkName}}</view>
+					<view >进度 {{item.checkSetProgress}} %</view>
 				</view>
 				<view class="list-li">
 					<view>检查开始日期</view>
-					<view>{{item.data2}}</view>
+					<view>{{item.checkStartTime}}</view>
 				</view>
 				<view class="list-li">
 					<view>整改期限</view>
 					<view class="rectify-term">
-						<text class="rectify-term-l" v-if="item.status==4">逾期未完成整改关闭实验室</text>
-						<text class="rectify-term-c" v-if="item.status==4">丨</text>
-						<text class="rectify-term-r">{{item.data3}}</text>
+						<text class="rectify-term-l" v-if="item.overdueUnrectify==1">逾期未完成整改关闭实验室</text>
+						<text class="rectify-term-c" v-if="item.overdueUnrectify==1">丨</text>
+						<text class="rectify-term-r">{{item.rectifyDeadline}}</text>
 					</view>
 				</view>
 				<view class="list-li">
 					<view>检查依据</view>
-					<view>{{item.data4}}</view>
+					<view>{{item.checkBasisName}}</view>
 				</view>
 			</view>
 		</scroll-view>
@@ -66,8 +68,8 @@
 		config
 	} from '@/api/request/config.js'
 	import {
-		chemicalAppletGetStockDetail
-	} from '@/pages/api/index.js'
+		securityCheckPlanFindCheckPlan,
+	} from '@/pages_safetyCheck/api/index.js'
 	export default {
 		name: "planDetail",
 		components: {
@@ -101,22 +103,39 @@
 						},
 					],
 				},
+				planId:'',
 			}
 		},
 		onLoad(option) {
-
-			//this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
+			this.planId=JSON.parse(decodeURIComponent(option.infoData)).planId
 		},
 		onShow() {
 
 		},
 		mounted() {
-
+			this.securityCheckPlanFindCheckPlan();
 		},
 		methods: {
 			//滚动事件
 			scrollGet() {},
-
+			//材料附件跳转
+			attachmentClick(row){
+				let infoData=row;
+				uni.navigateTo({
+					url: '/pages_safetyCheck/views/materialAttachments?infoData=' + encodeURIComponent(JSON.stringify(infoData))
+				});
+			},
+			async securityCheckPlanFindCheckPlan() {
+				let self = this;
+				const {
+					data
+				} = await securityCheckPlanFindCheckPlan({
+					planId: this.planId
+				});
+				if (data.code == 200) {
+					this.$set(this, 'newData', data.data);
+				}
+			},
 		}
 	}
 </script>
@@ -224,11 +243,12 @@
 			justify-content: space-between;
 			padding: 0 30rpx;
 			box-sizing: border-box;
+			margin-top: 20rpx;
 
 			>view:nth-of-type(1) {
 				font-size: 30rpx;
 				color: #333333;
-				line-height: 80rpx;
+				line-height: 40rpx;
 				text-align: left;
 			}
 
@@ -240,7 +260,7 @@
 				>text {
 					font-size: 28rpx;
 					color: #0183FA;
-					line-height: 80rpx;
+					line-height: 40rpx;
 					text-align: left;
 				}
 
@@ -260,9 +280,8 @@
 			border-radius: 20rpx 20rpx 20rpx 20rpx;
 			padding: 0 30rpx;
 			box-sizing: border-box;
-			margin-bottom: 20rpx;
+			margin-top: 20rpx;
 			position: relative;
-
 			.subscript {
 				position: absolute;
 				left: 0;
@@ -281,6 +300,7 @@
 				border-bottom: 1rpx solid #E0E0E0;
 				display: flex;
 				justify-content: space-between;
+				
 
 				>view:nth-of-type(1) {
 					font-size: 28rpx;

+ 14 - 4
pages_safetyCheck/views/safetyCheck.vue

@@ -42,7 +42,7 @@
 					<img src="@/pages_safetyCheck/images/icon_06.png">
 				</view>
 				<view class="batch">
-					<view class="batch-li" @click="batchClick(item)" v-for="(item,index) in batchList">
+					<view class="batch-li" @click="batchClick(batchList.checkPlanSetVoList)" v-for="(item,index) in batchList.checkPlanSetVoList">
 						<view class="batch-li-l">
 							<text>{{item.checkName}}</text>
 							<text>开始检查日期:{{item.checkStartTime}}</text>
@@ -164,9 +164,19 @@
 				});
 			},
 			planClick(row) {
-				//如果只有1个检查批次不弹窗
-				this.dialogVisible = true;
-				this.$set(this, 'batchList', row.checkPlanSetVoList);
+				if(row.checkPlanSetVoList.length>1){
+					this.dialogVisible = true;
+					this.$set(this, 'batchList', row);
+				}else{
+					//如果只有1个检查批次不弹窗
+					let infoData = row;
+					infoData.pageType = this.curTab;
+					uni.navigateTo({
+						url: '/pages_safetyCheck/views/inspectManage/inspectList?infoData=' + encodeURIComponent(JSON
+							.stringify(
+								infoData))
+					});
+				}
 			},
 			dialogClose() {
 				this.dialogVisible = false;