heyang vor 2 Jahren
Ursprung
Commit
94e119188d

+ 108 - 0
api/index.js

@@ -3,6 +3,114 @@ import { apiResquestForm } from './request/request.js'
 import { apiResquestJsonList } from './request/request.js'
 import { apiResquestFormVideo } from './request/request.js'
 import { apiResquestTimer } from './request/request.js'
+//3.3.3安全检查--------------------------------
+//巡查计划--添加
+export const checkPlanAdd  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/add`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--列表
+export const checkPlanList  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/list`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--详情
+export const checkPlanById  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/findCheckPlan`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划--修改
+export const checkPlanEdit  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/update`,
+        method: 'PUT',
+        data: {...data}
+    })
+};
+//巡查计划--检查计划各检查状态数据数量
+export const getCheckStatusCount  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/getCheckStatusCount`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划--获取巡查组列表
+export const checkGroupList  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkGroup/list`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--巡查组详情
+export const checkGroupDetail  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkGroup/find`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划--查询学院数据
+export const conditionCollegeInfo  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subject/conditionCollegeInfo`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划--条件查询实验室信息(分页)
+export const conditionSubjectInfo  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subject/conditionSubjectInfo`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--全校学院/实验室数量
+export const getAllSubNum  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subject/getAllSubNum`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划--检查计划id查询巡查管理列表(分页)
+export const findByCheckPlanId  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkManage/findByCheckPlanId`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 //管理端--------------------------------
 //获取openid
 export const getOpenId  = (data) => {

+ 2 - 2
api/request/config.js

@@ -2,14 +2,14 @@ const config = {
 	//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',//志伟
+	 base_url: 'http://192.168.1.20:8080',//志伟
     // base_url: 'http://192.168.1.8:8080',//高升
 	// base_url: 'http://192.168.1.29:8080',//何成
     // base_url: 'http://192.168.1.43:9800',//43服务器
 	// base_url: 'https://demo.sxitdlc.com/xzgd/',
 
 	// base_url: 'https://lab.sxitdlc.com/labNhSystem/',//43服务器高升测试
-	base_url: 'https://lab.sxitdlc.com/labAppTest/',//43服务器线上
+	//base_url: 'https://lab.sxitdlc.com/labAppTest/',//43服务器线上
     // base_url: 'https://lab.sxitdlc.com/appTest/',//88服务器线上
 	// base_url: 'https://lab.sxitdlc.com/labSystem/', //矿大地址
       // base_url: 'https://lab.sxitdlc.com/labSaasSystem/', //矿大化工

+ 141 - 85
pages/pages_safetyExamine/patrolPlan/patrolPlanAdd.vue

@@ -5,21 +5,21 @@
 		<view class="basics">
 			<view class="title">
 				<view class="title_t">计划标题</view>
-				<textarea class="title_b" type="text" v-model="form.name" maxlength="200" placeholder="请输入检查计划标题" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
+				<textarea class="title_b" type="text" v-model="form.title" maxlength="200" placeholder="请输入检查计划标题" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
 			</view>
 			<view class="type">
 				<view class="type_l">检查类型</view>
-				<input class="type_r" type="text" v-model="form.type" placeholder="" disabled maxlength="20">
+				<input class="type_r" type="text" v-model="form.checkTypeName" placeholder="" disabled maxlength="20">
 			</view>
 			<view class="period">		
 				<view class="period_l">检查周期</view>
 				<view class="period_r">
 					<picker mode="date" @change="startChange(form,$event)">
-						<input class="picker-text"  disabled type="text" v-model="form.startTime" placeholder="开始时间">
+						<input class="picker-text"  disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
 					</picker>
 					<view>至</view>
 					<picker mode="date"  @change="endChange(form,$event)">
-						<input class="picker-text2" disabled type="text" v-model="form.endTime" placeholder="结束时间">
+						<input class="picker-text2" disabled type="text" v-model="form.cycleEndTime" placeholder="结束时间">
 					</picker>
 				</view>
 			</view>
@@ -36,30 +36,26 @@
 				</picker>
 			</view>
 			<view class="scope_btn" v-if="scopeIndex==1 || scopeIndex==2" @click="collegeOrLab()">{{scopeIndex==1?'选择学院':'选择实验室'}}</view>
-			<view class="scope_text" v-if="scopeIndex==0 || scopeIndex==1">已选择<text>{{form.inspectScope.length}}</text>个学院,共<text>0</text>间实验室</view>
-			<view class="scope_text" v-if="scopeIndex==2">已选择<text>{{form.seleteListLab.length}}</text>间实验室</view>
+			<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">
 				<view class="patrol_l">巡查组</view>
-				<picker @change="patrolChange" :value="patrolIndex" :range="patrolArray" class="patrol_r">
-					<view class="patrol_r_n">
-						<view>{{patrolArray[patrolIndex]}}</view>
-						<img src="@/images/Version3.3.3/icon_06.png">
-					</view>
-				</picker>
+				<view class="patrol_r_n" @click="patrolChange">
+					<view>{{form.checkGroupName?form.checkGroupName:'请选择巡查组'}}</view>
+					<img src="@/images/Version3.3.3/icon_06.png">
+				</view>
 			</view>
 			<view class="list">
 				<view class="list_title"><img src="@/images/Version3.3.3/icon_jcjh_cy.png">成员</view>
 				<view class="list_header"><text>工号</text><text>姓名</text></view>
-				<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-				<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-				<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-				<view class="list_bottom">无数据</view>
+				<view class="list_li" v-for="(item,index) in form.checkGroupMemberList"><text>12345678</text><text>{{item.name}}</text></view>
+				<view class="list_bottom" v-if="form.checkGroupMemberList.length==0">无数据</view>
 			</view>
 		</view>
 	</scroll-view>	
-	<view class="bottom_btn" @click="handleClick('subBtn')">保存</view>
+	<view class="bottom_btn" @click="submitForm()">保存</view>
 	 <!-- 选择学院-->
 	<view class="shade" v-if="dialogVisible">
 		<view class="null-box" @click="dialogClose()"></view>
@@ -67,7 +63,7 @@
 			<view class="shade_n_title"><text>选择学院</text><text @click="collegeConfirm">确定</text></view>
 			<view class="shade_n_b">
 				<view class="shade_n_b_li" v-for="(item,index) in  collegeList" :key="index" @click="collegeSelete(index)">
-					<text :class="item.type?'color_B':'color_A'">{{item.name}}</text>
+					<text :class="item.type?'color_B':'color_A'">{{item.deptName}}</text>
 					<img v-if="item.type" src="@/images/Version3.3.3/icon_xzwt_xz.png">
 				</view>
 			</view>
@@ -79,7 +75,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import { checkPlanAdd,conditionCollegeInfo,getAllSubNum} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -94,41 +90,55 @@ export default {
 		 pageSize:20,
 		},
 		form:{
-			name:'',
-			type:'校院巡查',
-			startTime:'',
-			endTime:'',
-			inspectScope:[],
+			title:'',
+			checkType:'1',//1校院巡查 2实验室自查
+			checkTypeName:'校院巡查',//1校院巡查 2实验室自查
+			cycleStartTime:'',
+			cycleEndTime:'',
+			checkRange:0,//检查范围 1全校 2学院 3实验室
+			checkGroupId:[],//巡查组id
+			checkLevel:'',//巡查组层级
+			checkGroupMemberList:[],//巡查组成员
+			collegeIds:'',//学院id组
+			collegeNum:0,//学院数量
+			subIds:'',//实验室id组
+			subjectNum:0,//实验室数量
 			tiemQuickList:[],
 			scopeIndex:'',
 			seleteListLab:[],
-			patrolIndex:'',
 			seleteListMember:[],
 		},
 		tiemQuickList:[{name:'本月',type:false},{name:'本季度',type:false},{name:'全年',type:false}],
 		scopeIndex:0,
 		scopeArray:['全校','学院','实验室'],
-		patrolIndex:0,
-		patrolArray:['请选择巡查组','校级巡查组','院级巡查组'],
 		dialogVisible:false,
-		collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},]
+		collegeList:[]
 	  
 	}
   },
   onLoad(option) {
+	  
 	 if(option.form){
 		this.form=JSON.parse(decodeURIComponent(option.form)); 
 		this.tiemQuickList=this.form.tiemQuickList//时间快捷
 		this.scopeIndex=this.form.scopeIndex//检查范围
-		this.patrolIndex=this.form.patrolIndex//巡查组
 		console.log(this.form)
 	 }
+	 if(option.pageType){
+		 if(option.pageType==1){//校院巡查
+			 this.form.checkType=option.pageType;
+			 this.form.checkTypeName='校院巡查';
+		 }else if(option.pageType==2){//实验室自查
+			  this.form.checkType=option.pageType;
+			  this.form.checkTypeName='实验室自查';
+		 }
+	 }
   },
   onShow() {
 	  
   },
   mounted(){
-	  
+	this.getAllSubNum();
   },
   methods: {
 		//滚动事件
@@ -140,7 +150,7 @@ export default {
 		},
 	    //开始时间选中事件
 		startChange(form,e){
-			if(new Date(e.target.value).getTime()>=new Date(form.endTime).getTime()){
+			if(new Date(e.target.value).getTime()>=new Date(form.cycleEndTime).getTime()){
 				 uni.showToast({
 					title: '结束时间不能小于开始时间',
 					icon:"none",
@@ -148,12 +158,12 @@ export default {
 					duration: 2000
 				});
 			}else{
-				form.startTime=e.target.value
+				form.cycleStartTime=e.target.value
 			}
 		},
 	    //结束时间选中事件
 		endChange(form,e){
-			if(new Date(form.startTime).getTime()>=new Date(e.target.value).getTime()){
+			if(new Date(form.cycleStartTime).getTime()>=new Date(e.target.value).getTime()){
 				 uni.showToast({
 					title: '结束时间不能小于开始时间',
 					icon:"none",
@@ -161,7 +171,7 @@ export default {
 					duration: 2000
 				});
 			}else{
-				form.endTime=e.target.value
+				form.cycleEndTime=e.target.value
 			}
 		},
 		//检查周期快捷
@@ -180,30 +190,42 @@ export default {
 				_this.timeSlotChange(_this.tiemQuickList[index].name)
 			}else{
 				console.log('取消选中')
-				_this.form.startTime='';
-				_this.form.endTime='';
+				_this.form.cycleStartTime='';
+				_this.form.cycleEndTime='';
 			}
 			
 		},
 		//检查范围
 		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.inspectScope=[]
+					_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 (res.cancel) {
 					  
 				  }
 				}
 			});
+			
 		},
 		timeSlotChange (val) {
 			  let _this=this;	
-		      let startTime, endTime;
+		      let cycleStartTime, cycleEndTime;
 		      let now = new Date(); //当前日期 
 		      let nowDayOfWeek = now.getDay(); //今天本周的第几天 
 		      let nowDay = now.getDate(); //当前日 
@@ -212,24 +234,24 @@ export default {
 		      let jd=Math.ceil((nowMonth + 1) / 3)
 		      switch (val) {
 		        case "本周":
-		          startTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
-		          endTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
+		          cycleStartTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
+		          cycleEndTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
 		          break;
 		        case "本月":
-		          startTime = new Date(nowYear, nowMonth, 1)
-		          endTime = new Date(nowYear, nowMonth + 1, 0)
+		          cycleStartTime = new Date(nowYear, nowMonth, 1)
+		          cycleEndTime = new Date(nowYear, nowMonth + 1, 0)
 		          break;
 		        case "本季度":
-		          startTime = new Date(nowYear, (jd-1)*3, 1)
-		          endTime = new Date(nowYear, jd*3, 0)
+		          cycleStartTime = new Date(nowYear, (jd-1)*3, 1)
+		          cycleEndTime = new Date(nowYear, jd*3, 0)
 		          break
 		          case "全年":
-		          startTime = new Date(nowYear, 0, 1)
-		          endTime = new Date(nowYear, 11, 31)
+		          cycleStartTime = new Date(nowYear, 0, 1)
+		          cycleEndTime = new Date(nowYear, 11, 31)
 		          break
 		      }
-			  _this.form.startTime=_this.formatDateTime(startTime)
-			  _this.form.endTime=_this.formatDateTime(endTime)
+			  _this.form.cycleStartTime=_this.formatDateTime(cycleStartTime)
+			  _this.form.cycleEndTime=_this.formatDateTime(cycleEndTime)
 		},
 		// 中国标准时间 转换成 年月日
 		 formatDateTime (date) {
@@ -245,21 +267,12 @@ export default {
 		  return y + '-' + m + '-' + d
 		},
 		//巡查组
-		patrolChange(e){
-			console.log(e)
-			this.patrolIndex = e.target.value;
+		patrolChange(){
 			this.form.tiemQuickList=this.tiemQuickList//检查周期快捷存储
 			this.form.scopeIndex=this.scopeIndex//检查范围
-			this.form.patrolIndex=this.patrolIndex//巡查组
-			if(this.patrolIndex==1){//校级巡查组
-				uni.navigateTo({
-				    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
-				});
-			}else if(this.patrolIndex==2){//院级巡查组
-				uni.navigateTo({
-				    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
-				});
-			}
+			uni.navigateTo({
+			    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
+			});
 		},
 		//选择学院或者实验室
 		collegeOrLab(){
@@ -283,17 +296,44 @@ export default {
 			let _this=this;
 			this.dialogVisible=false;
 			let list=[];
+			let collegeIds=[];
+			let subjectNum=0;
 			_this.collegeList.forEach(function(item){
 				if(item.type==true){
 					list.push(item)
+					collegeIds.push(item.deptId);
+					subjectNum+=item.subNum;
 				}
 			})
-			_this.form.inspectScope=list;
+			_this.form.collegeIds=collegeIds.join(',');
+			_this.form.subjectNum=subjectNum;
+			_this.form.collegeNum=list.length;
 		},
 		//学院选择
 		collegeSelete(index){
 			this.collegeList[index].type = !this.collegeList[index].type
 		},
+		//查询学院列表
+		async conditionCollegeInfo(){
+			let _this = this;
+			const {data} = await conditionCollegeInfo();
+			if(data.code == 200){
+				data.data.forEach(function(item){
+					item.type=false;
+				})
+				_this.collegeList=data.data;
+			}
+		},
+		//查询全校学院和实验室数量
+		async getAllSubNum(){
+			let _this = this;
+			const {data} = await getAllSubNum();
+			if(data.code == 200){
+				this.form.collegeNum=data.data.collegeCount
+				this.form.subjectNum=data.data.subCount
+			}
+		},
+		
 	    handleClick(doType){
 		  let self=this;
 		  
@@ -302,6 +342,25 @@ export default {
 		  }
 		  
 	    },
+		//巡查计划-添加
+		async submitForm(){
+			let _this = this;
+			const {data} = await checkPlanAdd(_this.form);
+			if(data.code == 200){
+			    uni.showToast({
+			        title: '提交成功',
+			        icon:"none",
+			        mask:true,
+			        duration: 2000
+			    });
+				uni.redirectTo({
+					url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanList?pageType='+this.form.checkType
+				});
+			   
+			}
+		},
+		
+		
 	  
   }
 }
@@ -533,28 +592,25 @@ export default {
 				line-height: 42rpx;
 				text-align: left;
 			}
-			.patrol_r{
-				flex: 1;
-				.patrol_r_n{
-					width: 490rpx;
-					height: 80rpx;
-					border-radius: 10rpx;
-					border: 1rpx solid #E0E0E0;
-					display: flex;
-					justify-content: flex-start;
-					align-items: center;
-					>view{
-						flex:1;
-						line-height:80rpx;
-						margin-left:20rpx;
-						color: #999999;
-						font-size:28rpx;
-					}
-					>img{
-						width: 14rpx;
-						height: 8rpx;
-						margin-right: 30rpx;
-					}
+			.patrol_r_n{
+				width: 490rpx;
+				height: 80rpx;
+				border-radius: 10rpx;
+				border: 1rpx solid #E0E0E0;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				>view{
+					flex:1;
+					line-height:80rpx;
+					margin-left:20rpx;
+					color: #999999;
+					font-size:28rpx;
+				}
+				>img{
+					width: 14rpx;
+					height: 8rpx;
+					margin-right: 30rpx;
 				}
 			}
 		}

+ 90 - 40
pages/pages_safetyExamine/patrolPlan/patrolPlanAddLab.vue

@@ -14,25 +14,26 @@
 					<view class="lab_title_r_btn" @click="searchBtn">
 						<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 					</view>
-					<input type="text" v-model="getData.name" placeholder="请输入实验室名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+					<input type="text" v-model="getData.searchValue" placeholder="请输入实验室名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+					<view class="clear" @click="clearBtn">清除</view>
 				</view>
 			</view>
 			<view class="list">
 				<view class="list_li" v-for="(item,index) in  dataList" :key="index" @click="labSelete(index)">
-					<text :class="item.type?'color_B':'color_A'">{{item.name}}</text>
+					<text :class="item.type?'color_B':'color_A'">{{item.subjectName}}-{{item.roomNumber}}</text>
 					<img v-if="item.type" src="@/images/Version3.3.3/icon_xzwt_xz.png">
 				</view>
 			</view>
 		</view>
 	</scroll-view>	
-	<view class="bottom_btn" @click="handleClick('subBtn')">保存</view>
+	<view class="bottom_btn" @click="submitForm">保存</view>
   </view>
 
 </template>
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {conditionCollegeInfo,conditionSubjectInfo} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -45,12 +46,16 @@ export default {
       getData:{
         pageNum:1,
         pageSize:20,
-		name:'',
+		deptId:'',//学院id
+		searchValue:'',
+		selectedSubIds:[],
+		subIds:[],
       },
 	  total:0,
 	  collegeIndex :0,
-	  collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
-	  dataList:[{name:'实验室名称-房间号',type:false,id:1},{name:'实验室名称-房间号',type:false,id:2},{name:'实验室名称-房间号',type:false,id:3}],
+	  collegeArray:[],
+	  collegeList:[],
+	  dataList:[],
 	  seleteListLab:[],//临时存储选中的 
 	  form:{},
 	}
@@ -62,16 +67,17 @@ export default {
 	  }
   },
   onShow() {
-      this.getList(); 
+      
   },
   mounted(){
-	  
+	  this.conditionCollegeInfo();
+	  this.getList(); 
   },
   methods: {
 	  //滚动事件
 	  scrollGet(){
 		  let self=this;
-	      if(self.total<=self.getData.pageNum){
+	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
 	          console.log('没有更多数据!')
 	      }else{
 			  setTimeout(function(){
@@ -84,9 +90,9 @@ export default {
 	  //选择学院
 	  collegeChange(e){
 		  this.collegeIndex = e.target.value;
+		  this.getData.deptId=this.collegeList[e.target.value].deptId
 		  this.dataList=[];
 		  this.getList();
-		  
 	  },
 	  //点击选择实验室
 	  labSelete(index){
@@ -94,8 +100,7 @@ export default {
 		
 		if(this.dataList[index].type){//判断是选中还是取消
 			if(this.seleteListLab.length>0){
-				//console.log(this.seleteListLab.findIndex((item)=>item.id===this.dataList[index].id))
-				if(this.seleteListLab.findIndex((item)=>item.id===this.dataList[index].id) ==-1){//等于-1说明数组里没有当前选中元素,可以添加
+				if(this.seleteListLab.findIndex((item)=>item.subId===this.dataList[index].subId) ==-1){//等于-1说明数组里没有当前选中元素,可以添加
 					this.seleteListLab.push(this.dataList[index])
 				}
 			}else{
@@ -110,40 +115,70 @@ export default {
 		  this.dataList=[];
 		  this.getList();
 	  },
+	  //清除
+	  clearBtn(){
+		  this.getData.pageNum=1;
+		  this.collegeIndex=0;
+		  this.getData.deptId='';
+		  this.getData.searchValue='';
+		  this.dataList=[];
+		  this.getList();
+	  },
 	  handleClick(doType){
 		  let self=this;
 		  if( doType=='subBtn'){//保存数据
-			  this.$set(this.form,'seleteListLab',this.seleteListLab)
-			  uni.redirectTo({
-			      url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-			  });
+			
 		  }
 	  },
+	  //实验室-保存
+	  async submitForm(){
+	  	let _this = this;
+		let subIds=[];
+		this.$set(this.form,'subjectNum', this.seleteListLab.length)
+		if(this.seleteListLab.length>0){
+			this.seleteListLab.forEach(function(item){
+				subIds.push(item.subId)
+			})
+			this.$set(this.form,'subId', subIds.join(','))
+		}
+		uni.redirectTo({
+			url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
+		});
+	  		
+	  },
+	 
+	  //查询学院列表
+	  async conditionCollegeInfo(){
+	  	let _this = this;
+	  	const {data} = await conditionCollegeInfo();
+	  	if(data.code == 200){
+			
+			for(let i=0;i<data.data.length;i++){
+				_this.collegeArray.push(data.data[i].deptName)
+			}
+			_this.collegeList=data.data;
+			console.log()
+	  	}
+	  },
 	  async getList(){
-		  let list=[{name:'实验室名称-房间号',type:false,id:4},{name:'实验室名称-房间号',type:false,id:5}]
-		  this.total=5;
-		  this.dataList=[...this.dataList,...list]
-		  if(this.seleteListLab.length>0){//如果有选中的数据
-			  for(let i=0;i<this.dataList.length;i++){
-				  if(this.seleteListLab.findIndex((item)=>item.id===this.dataList[i].id) !=-1){//不等于-1说明数组里有当前元素,可以改为选中
-				  	 this.dataList[i].type=true;
-				  }else{
-					  
-				  }
+	      let _this = this;
+	      const {data} = await conditionSubjectInfo(_this.getData);
+	      if(data.code==200){
+			  data.rows.forEach(function(item){
+				  item.type=false;
+			  })
+			  this.dataList=[...this.dataList,...data.rows]
+			  this.total=data.total;
+			  if(this.seleteListLab.length>0){//如果有选中的数据
+			  		for(let i=0;i<this.dataList.length;i++){
+			  			if(this.seleteListLab.findIndex((item)=>item.id===this.dataList[i].id) !=-1){//不等于-1说明数组里有当前元素,可以改为选中
+			  				this.dataList[i].type=true;
+			  			}else{
+			  					  
+			  			}
+			  		}
 			  }
 		  }
-		
-		  
-	   //    let self = this;
-	   //    let obj = {
-	   //        pageNum:this.getData.page,
-	   //        pageSize:this.getData.pageSize,
-	   //    };
-	   //    const {data} = await groupList(obj);
-	   //    if(data.code==200){
-			 //  this.total=data.total;
-			 //  this.dataList=[...this.dataList,...data.data]
-		  // }
       }
   }
 }
@@ -188,6 +223,9 @@ export default {
 					margin-left:20rpx;
 					color: #999999;
 					font-size:28rpx;
+			        white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
 				}
 				>img{
 					width: 14rpx;
@@ -217,12 +255,24 @@ export default {
 				}
 			}
 			>input{
-				width: 360rpx;
+				width: 274rpx;
 				height: 80rpx;
 				position: absolute;
 				top: 0rpx;
 				left: 60rpx;
 			}
+			.clear{
+				width: 60rpx;
+				height: 80rpx
+				position: absolute;
+				top: 0rpx;
+				right:20rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 80rpx;
+			}
 		}
 	}
 	.list{

+ 44 - 31
pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember.vue

@@ -8,25 +8,25 @@
 					<view class="lab_title_r_btn" @click="searchBtn">
 						<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 					</view>
-					<input type="text" v-model="getData.name" placeholder="请输入巡查组名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+					<input type="text" v-model="getData.groupName" placeholder="请输入巡查组名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
 				</view>
 			</view>
 			<view class="list">
 				<view class="list_li" v-for="(item,index) in  dataList" :key="index" @click="labSelete(index)">
-					<text :class="item.type?'color_B':'color_A'">{{item.name}}</text>
+					<text :class="item.type?'color_B':'color_A'">{{item.groupName}}</text>
 					<img v-if="item.type" src="@/images/Version3.3.3/icon_xzwt_xz.png">
 				</view>
 			</view>
 		</view>
 	</scroll-view>	
-	<view class="bottom_btn" @click="handleClick('subBtn')">保存</view>
+	<view class="bottom_btn" @click="submitForm">保存</view>
   </view>
 
 </template>
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import { checkGroupList,checkGroupDetail} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -39,10 +39,11 @@ export default {
       getData:{
         pageNum:1,
         pageSize:20,
-		name:'',
+		groupName:'',
+		
       },
 	  total:0,
-	  dataList:[{name:'巡查组名称',type:false,id:1},{name:'巡查组名称',type:false,id:2},{name:'巡查组名称',type:false,id:3}],
+	  dataList:[],
 	  
 	  seleteListMember:[],//临时存储选中的 
 	  form:{},
@@ -103,36 +104,48 @@ export default {
 	  handleClick(doType){
 		  let self=this;
 		  if( doType=='subBtn'){//保存数据
-			  this.$set(this.form,'seleteListMember',this.seleteListMember)
-			  uni.redirectTo({
-			      url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-			  });
+			  
 		  }
 	  },
+	  //巡查组-保存
+	  async submitForm(){
+	  	let _this = this;
+		let id=this.seleteListMember[0].id
+		
+		this.$set(this.form,'checkGroupId',this.seleteListMember[0].id)
+		this.$set(this.form,'checkGroupName',this.seleteListMember[0].groupName)
+	  	const {data} = await checkGroupDetail({id:id});
+	  	if(data.code == 200){
+	  	    this.$set(this.form,'checkGroupMemberList',data.data.checkGroupMemberList)
+			uni.redirectTo({
+			    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
+			});
+	  	}
+		
+	  },
+	  
 	  async getList(){
-		  let list=[{name:'巡查组名称',type:false,id:4},{name:'巡查组名称',type:false,id:5}]
-		  this.total=5;
-		  this.dataList=[...this.dataList,...list]
-		  //如果有选中的数据
-		  if(this.seleteListMember.length>0){
-			  for(let i=0;i<this.dataList.length;i++){
-				  if(this.seleteListMember[0].id==this.dataList[i].id){
-					  this.dataList[i].type=true;
-				  }
+		 
+	      let _this = this;
+	      const {data} = await checkGroupList(_this.getData);
+	      if(data.code==200){
+			  
+			  if(data.data.records){
+				  data.data.records.forEach(function(item){
+					  item.type=false
+				  })
+			  }
+			  this.dataList=[...this.dataList,...data.data.records]
+			  //如果有选中的数据
+			  if(this.seleteListMember.length>0){
+					for(let i=0;i<this.dataList.length;i++){
+						if(this.seleteListMember[0].id==this.dataList[i].id){
+							this.dataList[i].type=true;
+						}
+					}
 			  }
+			  this.total=data.total;
 		  }
-		
-		  
-	   //    let self = this;
-	   //    let obj = {
-	   //        pageNum:this.getData.page,
-	   //        pageSize:this.getData.pageSize,
-	   //    };
-	   //    const {data} = await groupList(obj);
-	   //    if(data.code==200){
-			 //  this.total=data.total;
-			 //  this.dataList=[...this.dataList,...data.data]
-		  // }
       }
   }
 }

+ 263 - 165
pages/pages_safetyExamine/patrolPlan/patrolPlanEdit.vue

@@ -26,7 +26,7 @@
 				<view class="lab_title_r_btn" @click="searchBtn">
 					<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 				</view>
-				<input type="text" v-model="getData.name" placeholder="请输入实验室名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<input type="text" v-model="getData.searchValue" placeholder="请输入实验室名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
 			</view>
 		</view>
 	</view>
@@ -42,21 +42,21 @@
 			<view class="basics">
 				<view class="title">
 					<view class="title_t">计划标题</view>
-					<textarea class="title_b" type="text" v-model="form.name" maxlength="200" placeholder="请输入检查计划标题" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
+					<textarea class="title_b" type="text" v-model="form.title" maxlength="200" placeholder="请输入检查计划标题" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
 				</view>
 				<view class="type">
 					<view class="type_l">检查类型</view>
-					<input class="type_r" type="text" v-model="form.type" placeholder="" disabled maxlength="20">
+					<input class="type_r" type="text" v-model="form.checkTypeName" placeholder="" disabled maxlength="20">
 				</view>
 				<view class="period">		
 					<view class="period_l">检查周期</view>
 					<view class="period_r">
 						<picker mode="date" @change="startChange(form,$event)">
-							<input class="picker-text"  disabled type="text" v-model="form.startTime" placeholder="开始时间">
+							<input class="picker-text"  disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
 						</picker>
 						<view>至</view>
 						<picker mode="date"  @change="endChange(form,$event)">
-							<input class="picker-text2" disabled type="text" v-model="form.endTime" placeholder="结束时间">
+							<input class="picker-text2" disabled type="text" v-model="form.cycleStartTime" placeholder="结束时间">
 						</picker>
 					</view>
 				</view>
@@ -73,37 +73,33 @@
 					</picker>
 				</view>
 				<view class="scope_btn" v-if="scopeIndex==1 || scopeIndex==2" @click="collegeOrLab()">{{scopeIndex==1?'选择学院':'选择实验室'}}</view>
-				<view class="scope_text" v-if="scopeIndex==0 || scopeIndex==1">已选择<text>{{form.inspectScope.length}}</text>个学院,共<text>0</text>间实验室</view>
-				<view class="scope_text" v-if="scopeIndex==2">已选择<text>{{form.seleteListLab.length}}</text>间实验室</view>
+				<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="attachment">
+			<view class="attachment" v-if="form.uploadDtoList.length>0">
 				<view class="attachment_t">
 					<text>材料附件</text>
 					<text>点击文件标题查看</text>
 				</view>
-				<view class="attachment_li">
+				<view class="attachment_li" v-for="item in form.uploadDtoList">
 					<img src="@/images/Version3.3.3/icon_djc_wj.png"/>
-					<text>文件标题文件标题</text>
+					<text>{{item.fileName}}</text>
 					<img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
 				</view>
 			</view>
 			<view class="patrol_group">
 				<view class="patrol">
 					<view class="patrol_l">巡查组</view>
-					<picker @change="patrolChange" :value="patrolIndex" :range="patrolArray" class="patrol_r">
-						<view class="patrol_r_n">
-							<view>{{patrolArray[patrolIndex]}}</view>
-							<img src="@/images/Version3.3.3/icon_06.png">
-						</view>
-					</picker>
+					<view class="patrol_r_n" @click="patrolChange">
+						<view>{{form.checkGroupName?form.checkGroupName:'请选择巡查组'}}</view>
+						<img src="@/images/Version3.3.3/icon_06.png">
+					</view>
 				</view>
 				<view class="list">
 					<view class="list_title"><img src="@/images/Version3.3.3/icon_jcjh_cy.png">成员</view>
 					<view class="list_header"><text>工号</text><text>姓名</text></view>
-					<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-					<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-					<view class="list_li"><text>12345678</text><text>刘洋</text></view>
-					<view class="list_bottom">无数据</view>
+					<view class="list_li" v-for="(item,index) in form.checkGroupMemberList"><text>12345678</text><text>{{item.name}}</text></view>
+					<view class="list_bottom" v-if="form.checkGroupMemberList.length==0">无数据</view>
 				</view>
 			</view>
 		</view>
@@ -135,10 +131,8 @@
 				</view>
 			</view>
 		</view>
-		
-	
 	</scroll-view>	
-	<view class="bottom_btn" @click="handleClick('','subBtn')">保存</view>
+	<view class="bottom_btn" @click="submitForm()">保存</view>
 	 <!-- 选择学院-->
 	<view class="shade" v-if="dialogVisible">
 		<view class="null-box" @click="dialogClose()"></view>
@@ -158,7 +152,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkPlanById,conditionCollegeInfo,checkGroupDetail,getAllSubNum,checkPlanEdit,findByCheckPlanId} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -166,11 +160,15 @@ export default {
   },
   data() {
     return {
+		id:'',
 		pageType:0,
 		//列表请求参数
 		getData:{
 		 pageNum:1,
 		 pageSize:20,
+		 checkPlanId:'',
+		 deptId:'',
+		 searchValue:'',
 		},
 		inspectState:0,//检查状态 0 未开始 1进行中
 		tabText:['检查计划','检查管理'],
@@ -178,43 +176,64 @@ export default {
 		tabTextTow:['全部','未开始','进行中','已结束'],
 		curTabTow:0,
 		form:{
-			name:'',
-			type:'校院巡查',
-			startTime:'',
-			endTime:'',
-			inspectScope:[],
+			id:'',
+			title:'',
+			checkType:'1',//1校院巡查 2实验室自查
+			checkTypeName:'校院巡查',//1校院巡查 2实验室自查
+			cycleStartTime:'',
+			cycleEndTime:'',
+			checkRange:0,//检查范围 1全校 2学院 3实验室
+			checkGroupId:[],//巡查组id
+			checkLevel:'',//巡查组层级
+			checkGroupMemberList:[],//巡查组成员
+			collegeIds:'',//学院id组
+			collegeNum:0,//学院数量
+			subIds:'',//实验室id组
+			subjectNum:0,//实验室数量
 			tiemQuickList:[],
 			scopeIndex:'',
 			seleteListLab:[],
-			patrolIndex:'',
 			seleteListMember:[],
+			uploadDtoList:[],
 		},
 		tiemQuickList:[{name:'本月',type:false},{name:'本季度',type:false},{name:'全年',type:false}],
 		scopeIndex:0,
 		scopeArray:['全校','学院','实验室'],
-		patrolIndex:0,
-		patrolArray:['请选择巡查组','校级巡查组','院级巡查组'],
 		dialogVisible:false,
-		collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
+		collegeList:[],
 		collegeIndex :0,
-		collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
+		collegeArray:[],
 		dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
 	}
   },
   onLoad(option) {
+	  console.log(option)
 	 if(option.form){
-		this.form=JSON.parse(decodeURIComponent(option.form)); 
-		this.tiemQuickList=this.form.tiemQuickList//时间快捷
-		this.scopeIndex=this.form.scopeIndex//检查范围
-		this.patrolIndex=this.form.patrolIndex//巡查组
-		console.log(this.form)
+	 		this.form=JSON.parse(decodeURIComponent(option.form)); 
+	 		this.tiemQuickList=this.form.tiemQuickList//时间快捷
+	 		this.scopeIndex=this.form.scopeIndex//检查范围
+	 		console.log(this.form)
+	 }
+	 if(option.id){
+		 
+		 this.id=option.id
+		 this.checkPlanById()
+	 }
+	 if(option.pageType){
+	 		 if(option.pageType==1){//校院巡查
+	 			 this.form.checkType=option.pageType;
+	 			 this.form.checkTypeName='校院巡查';
+	 		 }else if(option.pageType==2){//实验室自查
+	 			  this.form.checkType=option.pageType;
+	 			  this.form.checkTypeName='实验室自查';
+	 		 }
 	 }
   },
   onShow() {
 	  
   },
   mounted(){
-	  
+	  this.conditionCollegeInfo();
   },
   methods: {
 		//顶部tab点击
@@ -229,8 +248,9 @@ export default {
 		//选择学院
 		collegeChange(e){
 			this.collegeIndex = e.target.value;
+			this.getData.deptId=this.collegeList[e.target.value].deptId
 			this.dataList=[];
-			this.getList();  
+			this.getList(); 
 		},
 		//实验室搜索
 		searchBtn(){
@@ -251,71 +271,82 @@ export default {
 			}
 		},
 	    //开始时间选中事件
-		startChange(form,e){
-			if(new Date(e.target.value).getTime()>=new Date(form.endTime).getTime()){
-				 uni.showToast({
-					title: '结束时间不能小于开始时间',
-					icon:"none",
-					mask:true,
-					duration: 2000
-				});
-			}else{
-				form.startTime=e.target.value
-			}
-		},
+	    startChange(form,e){
+	    	if(new Date(e.target.value).getTime()>=new Date(form.cycleEndTime).getTime()){
+	    		 uni.showToast({
+	    			title: '结束时间不能小于开始时间',
+	    			icon:"none",
+	    			mask:true,
+	    			duration: 2000
+	    		});
+	    	}else{
+	    		form.cycleStartTime=e.target.value
+	    	}
+	    },
 	    //结束时间选中事件
-		endChange(form,e){
-			if(new Date(form.startTime).getTime()>=new Date(e.target.value).getTime()){
-				 uni.showToast({
-					title: '结束时间不能小于开始时间',
-					icon:"none",
-					mask:true,
-					duration: 2000
-				});
-			}else{
-				form.endTime=e.target.value
-			}
-		},
-		//检查周期快捷
-		tiemQuick(index){
-			this.tiemQuickList[index].type = !this.tiemQuickList[index].type
-			let _this = this;
-			if (_this.tiemQuickList[index].type == true) {
-				_this.tiemQuickList.forEach(function(item2) {
-				  if (item2.name == _this.tiemQuickList[index].name) {
-					item2.type = true
-				  } else {
-					item2.type = false
-				  }
-				})
-				//快捷本月-本季度-全年
-				_this.timeSlotChange(_this.tiemQuickList[index].name)
-			}else{
-				console.log('取消选中')
-				_this.form.startTime='';
-				_this.form.endTime='';
-			}
-			
-		},
-		//检查范围
-		scopeChange(e){
-			uni.showModal({
-				content: '重新选择会删除现有选择的实验室,是否重选?',
-				cancelColor:"#999",
-				confirmColor:"#0183FA",
-				success: function (res) {
-				  if (res.confirm) {
-					this.scopeIndex = e.target.value;
-					this.form.inspectScope=[]
-				  } else if (res.cancel) {
-					  
-				  }
-				}
-			});
-		},
+	    endChange(form,e){
+	    	if(new Date(form.cycleStartTime).getTime()>=new Date(e.target.value).getTime()){
+	    		 uni.showToast({
+	    			title: '结束时间不能小于开始时间',
+	    			icon:"none",
+	    			mask:true,
+	    			duration: 2000
+	    		});
+	    	}else{
+	    		form.cycleEndTime=e.target.value
+	    	}
+	    },
+	    //检查周期快捷
+	    tiemQuick(index){
+	    	this.tiemQuickList[index].type = !this.tiemQuickList[index].type
+	    	let _this = this;
+	    	if (_this.tiemQuickList[index].type == true) {
+	    		_this.tiemQuickList.forEach(function(item2) {
+	    		  if (item2.name == _this.tiemQuickList[index].name) {
+	    			item2.type = true
+	    		  } else {
+	    			item2.type = false
+	    		  }
+	    		})
+	    		//快捷本月-本季度-全年
+	    		_this.timeSlotChange(_this.tiemQuickList[index].name)
+	    	}else{
+	    		console.log('取消选中')
+	    		_this.form.cycleStartTime='';
+	    		_this.form.cycleEndTime='';
+	    	}
+	    	
+	    },
+	    //检查范围
+	    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 (res.cancel) {
+	    			  
+	    		  }
+	    		}
+	    	});
+	    },
 		timeSlotChange (val) {
 			  let _this=this;	
-		      let startTime, endTime;
+		      let cycleStartTime, cycleEndTime;
 		      let now = new Date(); //当前日期 
 		      let nowDayOfWeek = now.getDay(); //今天本周的第几天 
 		      let nowDay = now.getDate(); //当前日 
@@ -324,24 +355,24 @@ export default {
 		      let jd=Math.ceil((nowMonth + 1) / 3)
 		      switch (val) {
 		        case "本周":
-		          startTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
-		          endTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
+		          cycleStartTime = new Date(nowYear, nowMonth, nowDay - nowDayOfWeek)
+		          cycleEndTime = new Date(nowYear, nowMonth, nowDay + 6 - nowDayOfWeek)
 		          break;
 		        case "本月":
-		          startTime = new Date(nowYear, nowMonth, 1)
-		          endTime = new Date(nowYear, nowMonth + 1, 0)
+		          cycleStartTime = new Date(nowYear, nowMonth, 1)
+		          cycleEndTime = new Date(nowYear, nowMonth + 1, 0)
 		          break;
 		        case "本季度":
-		          startTime = new Date(nowYear, (jd-1)*3, 1)
-		          endTime = new Date(nowYear, jd*3, 0)
+		          cycleStartTime = new Date(nowYear, (jd-1)*3, 1)
+		          cycleEndTime = new Date(nowYear, jd*3, 0)
 		          break
 		          case "全年":
-		          startTime = new Date(nowYear, 0, 1)
-		          endTime = new Date(nowYear, 11, 31)
+		          cycleStartTime = new Date(nowYear, 0, 1)
+		          cycleEndTime = new Date(nowYear, 11, 31)
 		          break
 		      }
-			  _this.form.startTime=_this.formatDateTime(startTime)
-			  _this.form.endTime=_this.formatDateTime(endTime)
+			  _this.form.cycleStartTime=_this.formatDateTime(cycleStartTime)
+			  _this.form.cycleEndTime=_this.formatDateTime(cycleEndTime)
 		},
 		// 中国标准时间 转换成 年月日
 		 formatDateTime (date) {
@@ -357,21 +388,12 @@ export default {
 		  return y + '-' + m + '-' + d
 		},
 		//巡查组
-		patrolChange(e){
-			console.log(e)
-			this.patrolIndex = e.target.value;
+		patrolChange(){
 			this.form.tiemQuickList=this.tiemQuickList//检查周期快捷存储
 			this.form.scopeIndex=this.scopeIndex//检查范围
-			this.form.patrolIndex=this.patrolIndex//巡查组
-			if(this.patrolIndex==1){//校级巡查组
-				uni.navigateTo({
-				    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
-				});
-			}else if(this.patrolIndex==2){//院级巡查组
-				uni.navigateTo({
-				    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
-				});
-			}
+			uni.navigateTo({
+			    url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAddMember?form='+encodeURIComponent(JSON.stringify(this.form))
+			});
 		},
 		//选择学院或者实验室
 		collegeOrLab(){
@@ -395,17 +417,84 @@ export default {
 			let _this=this;
 			this.dialogVisible=false;
 			let list=[];
+			let collegeIds=[];
+			let subjectNum=0;
 			_this.collegeList.forEach(function(item){
 				if(item.type==true){
 					list.push(item)
+					collegeIds.push(item.deptId);
+					subjectNum+=item.subNum;
 				}
 			})
-			_this.form.inspectScope=list;
+			_this.form.collegeIds=collegeIds.join(',');
+			_this.form.subjectNum=subjectNum;
+			_this.form.collegeNum=list.length;
 		},
 		//学院选择
 		collegeSelete(index){
 			this.collegeList[index].type = !this.collegeList[index].type
 		},
+		//查询学院列表
+		async conditionCollegeInfo(){
+			let _this = this;
+			const {data} = await conditionCollegeInfo();
+			if(data.code == 200){
+				data.data.forEach(function(item){
+					item.type=false;
+				})
+				_this.collegeList=data.data;
+				
+				//检查管理
+				for(let i=0;i<data.data.length;i++){
+					_this.collegeArray.push(data.data[i].deptName)
+				}
+			}
+		},
+		//查询全校学院和实验室数量
+		async getAllSubNum(){
+			let _this = this;
+			const {data} = await getAllSubNum();
+			if(data.code == 200){
+				this.form.collegeNum=data.data.collegeCount
+				this.form.subjectNum=data.data.subCount
+			}
+		},
+		//查询详情
+		async checkPlanById(id){
+			console.log('详情')
+			let _this = this;
+			const {data} = await checkPlanById({id:this.id});
+			if(data.code == 200){
+				this.form.id=data.data.id;
+				this.form.title=data.data.title;
+				this.form.checkType=data.data.checkType;
+				this.form.checkTypeName=data.data.checkType==1?'校院巡查':'实验室自查';
+				this.form.cycleStartTime=data.data.cycleStartTime;
+				this.form.cycleEndTime=data.data.cycleEndTime;
+				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.subIds=data.data.subIds;
+				this.form.subjectNum=data.data.subjectNum;
+				this.form.uploadDtoList=data.data.uploadDtoList;
+				
+				this.scopeIndex=Number(data.data.checkRange)-1;//检查范围
+				this.checkGroupDetail(data.data.checkGroupId);
+			}
+		},
+		//根据id查询巡查组员
+		async checkGroupDetail(id){
+			let _this = this;
+			const {data} = await checkGroupDetail({id:id});
+			if(data.code == 200){
+				 this.$set(this.form,'checkGroupMemberList',data.data.checkGroupMemberList)
+				 this.$set(this.form,'checkGroupName',data.data.groupName)
+				 
+			}
+		},
+		
+		
 	    handleClick(item,doType){
 		  let self=this;
 		  
@@ -418,22 +507,31 @@ export default {
 		  }
 		  
 	    },
-		async getList(){
-				  let list=[{name:'实验室名称-房间号',type:false,id:4},{name:'实验室名称-房间号',type:false,id:5}]
-				  this.total=5;
-				  this.dataList=[...this.dataList,...list]
-				
-				  
-		 //    let self = this;
-		 //    let obj = {
-		 //        pageNum:this.getData.page,
-		 //        pageSize:this.getData.pageSize,
-		 //    };
-		 //    const {data} = await groupList(obj);
-		 //    if(data.code==200){
-					 //  this.total=data.total;
-					 //  this.dataList=[...this.dataList,...data.data]
-				  // }
+		//巡查计划-修改
+		async submitForm(){
+			let _this = this;
+			
+			const {data} = await checkPlanEdit(_this.form);
+			if(data.code == 200){
+			    uni.showToast({
+			        title: '提交成功',
+			        icon:"none",
+			        mask:true,
+			        duration: 2000
+			    });
+				uni.redirectTo({
+					url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanList?pageType='+this.form.checkType
+				});
+			   
+			}
+		},
+		async getList(){ 
+		    let self = this;
+		    const {data} = await findByCheckPlanId(this.getData);
+		    if(data.code==200){
+					this.total=data.total;
+					this.dataList=[...this.dataList,...data.data]
+			}
 		},
 	  
   }
@@ -846,28 +944,25 @@ export default {
 				line-height: 42rpx;
 				text-align: left;
 			}
-			.patrol_r{
-				flex: 1;
-				.patrol_r_n{
-					width: 490rpx;
-					height: 80rpx;
-					border-radius: 10rpx;
-					border: 1rpx solid #E0E0E0;
-					display: flex;
-					justify-content: flex-start;
-					align-items: center;
-					>view{
-						flex:1;
-						line-height:80rpx;
-						margin-left:20rpx;
-						color: #999999;
-						font-size:28rpx;
-					}
-					>img{
-						width: 14rpx;
-						height: 8rpx;
-						margin-right: 30rpx;
-					}
+			.patrol_r_n{
+				width: 490rpx;
+				height: 80rpx;
+				border-radius: 10rpx;
+				border: 1rpx solid #E0E0E0;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				>view{
+					flex:1;
+					line-height:80rpx;
+					margin-left:20rpx;
+					color: #999999;
+					font-size:28rpx;
+				}
+				>img{
+					width: 14rpx;
+					height: 8rpx;
+					margin-right: 30rpx;
 				}
 			}
 		}
@@ -1023,6 +1118,9 @@ export default {
 						margin-left:20rpx;
 						color: #999999;
 						font-size:28rpx;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
 					}
 					>img{
 						width: 14rpx;

+ 37 - 28
pages/pages_safetyExamine/patrolPlan/patrolPlanList.vue

@@ -10,10 +10,10 @@
 				</view>
 			</view>
 			<view class="search">
-				<view class="search_btn">
+				<view class="search_btn"  @click="searchBtn">
 					<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 				</view>
-				<input type="text" v-model="name" placeholder="计划标题" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<input type="text" v-model="getData.searchValue" placeholder="计划标题" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
 			</view>
 			<view class="list">
 				<view class="list_li" v-for="(item,index) in  dataList" :key="index" @click="handleClick(item,'edit')">
@@ -22,21 +22,23 @@
 							<img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
 							<text></text>
 						</view>
-						<view class="list_li_t_c">{{item.name}}</view>
-						<view class="list_li_t_c2">已逾期</view>
+						<view class="list_li_t_c">{{item.title}}</view>
+						<view class="list_li_t_c2" v-if="item.isOverdue==1">已逾期</view>
 						<view class="list_li_t_r"></view>
 					</view>
 					<view class="list_li_m">
-						<view class="list_li_m_t">计划周期:2023-03-12至2023-03-15</view>
+						<view class="list_li_m_t">计划周期:{{item.cycleStartTime}}至{{item.cycleEndTime}}</view>
 						<view class="list_li_m_b">
-							<text class="blue_color">未开始</text>
-							<text>校院巡查</text>
+							<text class="blue_color" v-if="item.checkStatus==1">未开始</text>
+							<text class="red_color" v-if="item.checkStatus==2">进行中</text>
+							<text class="green_color" v-if="item.checkStatus==3">已结束</text>
+							<text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
 						</view>
 					</view>
 					<view class="list_li_b">
 						<img src="@/images/Version3.3.3/icon_djcsys.png"/>
 						<text>待检查实验室:</text>
-						<text>22间</text>
+						<text>{{item.subjectNum}}间</text>
 					</view>
 				</view>
 			</view>
@@ -49,7 +51,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkPlanList} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -62,19 +64,24 @@ export default {
       getData:{
         pageNum:1,
         pageSize:20,
+		searchValue:'',
+		checkType:'',
       },
 	  total:0,
 	  tabText:['全部','未开始','进行中','已结束'],
 	  curTab:0,
-	  dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
+	  dataList:[],
     }
   },
   onLoad(option) {
+	  console.log(option.pageType)
 	  if(option.pageType==1){
+		  this.getData.checkType=option.pageType
 		  uni.setNavigationBarTitle({
 		  		title:'校院巡查'
 		  })
 	  }else if(option.pageType==2){
+		   this.getData.checkType=option.pageType
 		  uni.setNavigationBarTitle({
 		  		title:'实验室自查'
 		  })
@@ -91,7 +98,7 @@ export default {
 	  //滚动事件
 	  scrollGet(){
 		  let self=this;
-	      if(self.total<=self.getData.pageNum){
+	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
 	          console.log('没有更多数据!')
 	      }else{
 			  setTimeout(function(){
@@ -101,40 +108,41 @@ export default {
 			 
 		  }
 	  },
+	  //实验室搜索
+	  searchBtn(){
+		  console.log(1)
+		  this.dataList=[];
+		  this.getList();
+	  },
 	  //顶部tab点击
 	  tabClick(index) {
 	  	this.curTab = index;
+		this.getData.pageNum=1;
+		this.dataList=[];
+		this.getData.checkStatus=index;
+		this.getList()
 	  },
 	  handleClick(row,doType){
 		  let self=this;
 		  
 		  if( doType=='subBtn'){//发起巡查计划	
 			 uni.navigateTo({
-			     url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd'
+			     url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanAdd?pageType='+this.getData.checkType
 			 });
 		  }else if(doType=='edit'){//编辑
 			  uni.navigateTo({
-			      url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanEdit'
+			      url: '/pages/pages_safetyExamine/patrolPlan/patrolPlanEdit?pageType='+row.checkType+'&id='+row.id
 			  });
 		  }
 		  
 	  },
 	  async getList(){
-		  console.log('getList')
-		  let list=[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}]
-		  this.total=5;
-		  this.dataList=[...this.dataList,...list]
-		  
-	   //    let self = this;
-	   //    let obj = {
-	   //        pageNum:this.getData.page,
-	   //        pageSize:this.getData.pageSize,
-	   //    };
-	   //    const {data} = await groupList(obj);
-	   //    if(data.code==200){
-			 //  this.total=data.total;
-			 //  this.dataList=[...this.dataList,...data.data]
-		  // }
+		  let self = this;
+		  const {data} = await checkPlanList(this.getData);
+		  if(data.code==200){
+			  this.dataList=[...this.dataList,...data.data.records]
+			  this.total=data.data.total;
+		  }
       }
   }
 }
@@ -217,6 +225,7 @@ export default {
 			position: absolute;
 			top: 20rpx;
 			left: 30rpx;
+			z-index: 200;
 			>img{
 				width: 20rpx;
 				height: 20rpx;

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

@@ -217,7 +217,7 @@ export default {
 					height: 4rpx;
 					background: #0183FA;
 					border-radius: 2rpx;
-					margin-left: 33%;
+					margin-left: 38%;
 					display none;
 					&.on{
 						display block;

+ 38 - 27
pages/safetyExamineWorkbench.vue

@@ -33,7 +33,7 @@
 				<!--管理员------------- -->
 				<view class="tabTitle" v-if="pageType==0">
 					<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-						<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}<text>2</text></view>
+						<view :class="{on:curTab==index}" class="tabTitle_text">{{item.name}}<text>{{item.num}}</text></view>
 					    <view :class="{on:curTab==index}" class="tabTitle_across"></view>
 					</view>
 				</view>
@@ -44,20 +44,21 @@
 								<img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
 								<text></text>
 							</view>
-							<view class="list_li_t_c">{{item.name}}</view>
+							<view class="list_li_t_c">{{item.title}}</view>
 							<view class="list_li_t_r"></view>
 						</view>
 						<view class="list_li_m">
-							<view class="list_li_m_t">计划周期:2023-03-12至2023-03-15</view>
+							<view class="list_li_m_t">计划周期:{{item.cycleStartTime}}至{{item.cycleEndTime}}</view>
 							<view class="list_li_m_b">
-								<text class="blue_color">未开始</text>
-								<text>校院巡查</text>
+								<text class="blue_color" v-if="item.checkStatus==1">未开始</text>
+								<text class="red_color" v-if="item.checkStatus==2">进行中</text>
+								<text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
 							</view>
 						</view>
 						<view class="list_li_b">
 							<img src="@/images/Version3.3.3/icon_djcsys.png"/>
 							<text>待检查实验室:</text>
-							<text>22间</text>
+							<text>{{item.subjectNum}}间</text>
 						</view>
 					</view>
 				</view>
@@ -157,7 +158,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkPlanList,getCheckStatusCount} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -170,6 +171,7 @@ export default {
       getData:{
         pageNum:1,
         pageSize:20,
+		checkStatus:1,
       },
 	  total:0,
 	  statisticsList:[
@@ -185,13 +187,13 @@ export default {
 		  {name:'本月已整改',value:'60%'},
 		  {name:'本月复核通过率',value:'30%'},
 	  ],
-	  tabText:['未开始','进行中'],
+	  tabText:[{name:'未开始',num:0,},{name:'进行中',num:0}],
 	  curTab:0,
 	  tabTextTow:['待检查','检查中','待复核'],
 	  curTabTow:0,
 	  tabTextThree:['隐患待整改','随手拍整改'],
 	  curTabThree:0,
-	  dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
+	  dataList:[],
     }
   },
   onLoad() {
@@ -201,13 +203,13 @@ export default {
       this.getList(); 
   },
   mounted(){
-	  
+	  this.getCheckStatusCount();
   },
   methods: {
 	  //滚动事件
 	  scrollGet(){
 		  let self=this;
-	      if(self.total<=self.getData.pageNum){
+	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
 	          console.log('没有更多数据!')
 	      }else{
 			  setTimeout(function(){
@@ -217,9 +219,18 @@ export default {
 			 
 		  }
 	  },
-	  //顶部tab点击
+	  //管理员
 	  tabClick(index) {
 	  	this.curTab = index;
+		this.getData.pageNum=1;
+		this.dataList=[];
+		if(index==0){//未开始
+			this.getData.checkStatus=1
+			this.getList()
+		}else if(index==1){//进行中
+			this.getData.checkStatus=2
+			this.getList()
+		}
 	  },
 	  tabClickTow(index) {
 	  	this.curTabTow = index;
@@ -277,22 +288,22 @@ export default {
 		  }
 		  
 	  },
+	  //检查计划各检查状态数据数量
+	  async getCheckStatusCount(){
+	      let self = this;
+	      const {data} = await getCheckStatusCount();
+	      if(data.code==200){
+			  this.tabText[0].num=data.data.noStart;
+			  this.tabText[1].num=data.data.start;
+	  	  }
+	  },
 	  async getList(){
-		  console.log('getList')
-		  let list=[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}]
-		  this.total=5;
-		  this.dataList=[...this.dataList,...list]
-		  
-	   //    let self = this;
-	   //    let obj = {
-	   //        pageNum:this.getData.page,
-	   //        pageSize:this.getData.pageSize,
-	   //    };
-	   //    const {data} = await groupList(obj);
-	   //    if(data.code==200){
-			 //  this.total=data.total;
-			 //  this.dataList=[...this.dataList,...data.data]
-		  // }
+	      let self = this;
+	      const {data} = await checkPlanList(this.getData);
+	      if(data.code==200){
+			  this.dataList=[...this.dataList,...data.data.records]
+			  this.total=data.data.total;
+		  }
       }
   }
 }