heyang 11 달 전
부모
커밋
d57bf7a854

+ 1 - 1
pages/views/login/login.vue

@@ -52,7 +52,7 @@
 			return {
 				identityStatus: 1,
 				// username:"dedsudiyu",//学生
-				username: "sudiyu",//教职工
+				username: "1001",//教职工
 				password: "zd123456",
 				checkedType: false,
 				loginBanner: uni.getStorageSync('loginBanner'),

+ 154 - 0
pages_safetyExamine/api/index.js

@@ -40,8 +40,162 @@ export const laboratorySubRelInfoGetRelList = (data) => {
 		data: { ...data }
 	})
 };
+//字典
+export const getDicts = (dictType) => {
+	return apiResquest({
+		url: '/system/dict/item/option?dictCode=' + dictType,
+		method: 'get',
+	})
+};
 
 
+/***开展检查***/
+//开展检查-获取巡查计划管理列表
+export const checkManageList  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkManage/appList`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//开展检查-根据实验室id查询该实验室有关计划
+export const getCheckPlanBySubId = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/checkManage/getCheckPlanBySubId',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查--新增--有计划的时候
+export const checkManageUpdate  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkManage/appUpdate`,
+        method: 'PUT',
+        data: {...data}
+    })
+};
+//开展检查--新增-该实验室没有计划的时候
+export const checkManageAdd  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkManage/add`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//开展检查-通过id查询巡查管理
+export const findCheckManage = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/checkManage/appFindCheckManage',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查-根据计划id查询附件列表
+export const findByPlanIdAttachment = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/upload/findByCheckPlanId',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查-根据实验室id查询该实验室详情
+export const subjectFindSubjectInfo = (data) => {
+    return apiResquestForm({
+        url: '/zd-laboratory/subject/findSubjectInfo',
+        method: 'GET',
+        data: data
+    })
+};
+//项目检查库-树状列表
+export const checkOptionListNew = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/checkOption/list',
+        method: 'GET',
+        data: data
+    })
+};
+
+//专项检查-根据选择的设备id生成检查项
+export const getHazardInfoByJoinIds  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkManage/getHazardInfoByJoinIds`,
+        method: 'GET',
+        data: data,
+    })
+};
+//专项检查-根据选择的检查项查询当前项出现的次数
+export const countHazardNum  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkHazard/countHazardNum`,
+        method: 'GET',
+        data: data,
+    })
+};
 
+//专项检查-根据实验室id查询设备
+export const getHazardInfoBySubId  = (data) => {
+    return apiResquest({
+        url: `/laboratory/hazard/getHazardInfoBySubId`,
+        method: 'GET',
+        data: data,
+    })
+};
+/* 巡查计划------------------------------ */
+//巡查计划--列表
+export const checkPlanList  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/appList`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--添加
+export const checkPlanAdd  = (data) => {
+    return apiResquest({
+        url: `/zd-security/checkPlan/appAdd`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//巡查计划--全校学院/实验室数量
+export const getAllSubNum  = (data) => {
+    return apiResquest({
+        url: `/laboratory/subject/getAllSubNum`,
+        method: 'GET',
+        data: data,
+    })
+};
+//巡查计划-查询是否院级用户
+export const isSCollege  = (data) => {
+    return apiResquest({
+        url: `/security/collegCheck/isSCollege`,
+        method: 'GET',
+        data: data,
+    })
+};
 
+//专项检查/巡查计划-检查类型
+export const dangerList  = (data) => {
+    return apiResquest({
+        url: `/system/dict/data/listNotPower?dictType=lab_hazard_type`,
+        method: 'GET',
+        data: data,
+    })
+};
+//专项检查/巡查计划-设备查询
+export const findDeviceList  = (data) => {
+    return apiResquest({
+        url: `/laboratory/hazard/queryHazardList`,
+        method: 'POST',
+        data: {...data}
+    })
+};
+//专项检查/巡查计划-设备确定提交
+export const haveHazardInSub  = (data) => {
+    return apiResquest({
+        url: `/laboratory/hazard/haveHazardInSub`,
+        method: 'POST',
+        data: {...data}
+    })
+};
 

+ 8 - 30
pages_safetyExamine/views/examineManage/examineAdd.vue

@@ -169,20 +169,12 @@
 		config
 	} from '@/api/request/config.js'
 	import {
-		buildBySub,
-		listDepartments,
-		subjectList,
 		getCheckPlanBySubId,
 		checkManageUpdate,
 		checkManageAdd,
 		findCheckManage,
-		buildFloorGetlist,
-		buildBySubList,
 		findByPlanIdAttachment,
-		subjectFindSubjectInfo
-	} from '@/api/apiDemo/index.js'
-
-	import {
+		subjectFindSubjectInfo,
 		systemDeptDropList,
 		laboratoryBigViewGetBuildByBigView,
 		laboratorySubRelInfoGetListByFloor,
@@ -592,7 +584,7 @@
 			},
 			//查询学院列表
 			async listDepartments() {
-				let self=this;
+				let self = this;
 				const {
 					data
 				} = await systemDeptDropList({
@@ -708,22 +700,6 @@
 				this.planIndex = e.target.value;
 				this.form.id = this.planList[e.target.value].id
 				this.findCheckManage('check', this.planList[e.target.value].id);
-				// this.form.title=this.planList[e.target.value].title
-				// this.form.checkPlanId=this.planList[e.target.value].checkPlanId
-
-				// this.form.subIds=this.planList[e.target.value].subId;
-				// this.form.subjectName=this.planList[e.target.value].subjectName;
-				// this.form.deptId=this.planList[e.target.value].deptId;
-				// this.form.collegeName=this.planList[e.target.value].collegeName;
-				// this.form.buildId=this.planList[e.target.value].buildId;
-				// this.form.buildName=this.planList[e.target.value].buildName;
-				// this.form.checkType=this.planList[e.target.value].checkType;
-				// this.form.cycleStartTime=this.planList[e.target.value].cycleStartTime;
-				// this.form.cycleEndTime=this.planList[e.target.value].cycleEndTime;
-
-
-
-
 			},
 			resultChange(e) {
 				this.resultIndex = e.target.value;
@@ -936,7 +912,7 @@
 							duration: 2000
 						});
 						uni.redirectTo({
-							url: '/pages_safetyExamine/examineManage/examineList?pageType=' + this.form
+							url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
 								.checkType
 						});
 					}
@@ -952,7 +928,7 @@
 							duration: 2000
 						});
 						uni.redirectTo({
-							url: '/pages_safetyExamine/examineManage/examineList?pageType=' + this.form
+							url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
 								.checkType
 						});
 					}
@@ -1357,7 +1333,8 @@
 			background rgba(0, 0, 0, 0.2);
 			display flex;
 			flex-direction column;
-			 .popup-null {
+
+			.popup-null {
 				flex: 1;
 			}
 
@@ -1366,7 +1343,8 @@
 				border-top-right-radius: 20rpx;
 
 				background #fff;
-				 .popup-input-box {
+
+				.popup-input-box {
 					padding: 30rpx 20rpx;
 					display: flex;
 

+ 291 - 273
pages_safetyExamine/views/examineManage/examineAddContent.vue

@@ -1,312 +1,330 @@
 <!-- 安全检查-发起巡查计划-选择内容 -->
 <template>
-  <view class="examine">
-	  <view class="lab_title">
-		<view class="lab_title_r">
-			<view class="lab_title_r_btn" @click="searchBtn">
-				<img src="@/pages_safetyExamine/images/icon_aqjc_ss.png"/>
+	<view class="examine">
+		<view class="lab_title">
+			<view class="lab_title_r">
+				<view class="lab_title_r_btn" @click="searchBtn">
+					<img src="@/pages_safetyExamine/images/icon_aqjc_ss.png" />
+				</view>
+				<input type="text" v-model="getData.searchValue" placeholder="设备名称/型号" maxlength="50"
+					placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<!-- <img class="scanBtn"  @click="scanBtn" src="@/pages_safetyExamine/images/icon_aqjc_sm.png"/> -->
 			</view>
-			<input type="text" v-model="getData.searchValue" placeholder="设备名称/型号" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
-			<!-- <img class="scanBtn"  @click="scanBtn" src="@/pages_safetyExamine/images/icon_aqjc_sm.png"/> -->
 		</view>
-	  </view>
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<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.chName}}</text>
-					<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<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.chName}}</text>
+						<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+					</view>
 				</view>
 			</view>
-		</view>
-	</scroll-view>
-	<div class="bottom">
-		<view class="bottom_l" @click="clearForm">取消</view>
-		<view class="bottom_r" @click="submitForm">确定</view>
-	</div>
-  </view>
+		</scroll-view>
+		<div class="bottom">
+			<view class="bottom_l" @click="clearForm">取消</view>
+			<view class="bottom_r" @click="submitForm">确定</view>
+		</div>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import {conditionCollegeInfo,conditionSubjectInfo,findDeviceList,haveHazardInSub,getHazardInfoBySubId} from '@/api/apiDemo/index.js'
-export default {
-  name: "rectifyList",
-  components: {
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		getHazardInfoBySubId
+	} from '@/api/apiDemo/index.js'
+	export default {
+		name: "rectifyList",
+		components: {
 
-  },
-  data() {
-    return {
-	  pageType:0,
-      //列表请求参数
-      getData:{
-        pageNum:1,
-        pageSize:200,
-		searchValue:'',
-		subId:'',
-      },
-	  total:0,
-	  collegeIndex :0,
-	  collegeArray:[],
-	  collegeList:[],
-	  dataList:[],
-	  seleteListDevice:[],//临时存储选中的
-	  form:{},
-	}
-  },
-  onLoad(option) {
-	  if(option.form){
-		 this.form=JSON.parse(decodeURIComponent(option.form));
-	  }
-	  if(option.pageType){//pageType=1添加页面进入2编辑页面进入
-	  	 this.pageType=option.pageType
-	  }
-  },
-  onShow() {
+		},
+		data() {
+			return {
+				pageType: 0,
+				//列表请求参数
+				getData: {
+					pageNum: 1,
+					pageSize: 200,
+					searchValue: '',
+					subId: '',
+				},
+				total: 0,
+				collegeIndex: 0,
+				collegeArray: [],
+				collegeList: [],
+				dataList: [],
+				seleteListDevice: [], //临时存储选中的
+				form: {},
+			}
+		},
+		onLoad(option) {
+			if (option.form) {
+				this.form = JSON.parse(decodeURIComponent(option.form));
+			}
+			if (option.pageType) { //pageType=1添加页面进入2编辑页面进入
+				this.pageType = option.pageType
+			}
+		},
+		onShow() {
 
-  },
-  mounted(){
-	  this.dataList=[];
-	  this.getList();
-  },
-  methods: {
-	  //滚动事件
-	  scrollGet(){
-		  // let self=this;
-	   //    if(self.total/self.getData.pageSize<=self.getData.pageNum){
-	   //        console.log('没有更多数据!')
-	   //    }else{
-			 //  setTimeout(function(){
-				//   self.getData.pageNum += 1;
-				//   self.getList();
-			 //  },1000)
+		},
+		mounted() {
+			this.dataList = [];
+			this.getList();
+		},
+		methods: {
+			//滚动事件
+			scrollGet() {
+		
+			},
+			//点击选择实验室
+			labSelete(index) {
+				this.dataList[index].type = !this.dataList[index].type
 
-		  // }
-	  },
-	  //点击选择实验室
-	  labSelete(index){
-	  	this.dataList[index].type = !this.dataList[index].type
+				if (this.dataList[index].type) { //判断是选中还是取消
+					if (this.seleteListDevice.length > 0) {
+						if (this.seleteListDevice.findIndex((item) => item.joinHazardId === this.dataList[index]
+								.joinHazardId) == -1) { //等于-1说明数组里没有当前选中元素,可以添加
+							this.seleteListDevice.push(this.dataList[index])
+						}
+					} else {
+						this.seleteListDevice.push(this.dataList[index])
+					}
+				} else {
+					this.seleteListDevice.splice(this.seleteListDevice.indexOf(this.dataList[index]), 1);
+				}
+			},
+			//实验室搜索
+			searchBtn() {
+				this.dataList = [];
+				this.getList();
+			},
+			handleClick(doType) {
+				let self = this;
+				if (doType == 'subBtn') { //保存数据
 
-		if(this.dataList[index].type){//判断是选中还是取消
-			if(this.seleteListDevice.length>0){
-				if(this.seleteListDevice.findIndex((item)=>item.joinHazardId===this.dataList[index].joinHazardId) ==-1){//等于-1说明数组里没有当前选中元素,可以添加
-					this.seleteListDevice.push(this.dataList[index])
 				}
-			}else{
-				this.seleteListDevice.push(this.dataList[index])
+			},
+			//扫码
+			scanBtn() {
+				uni.redirectTo({
+					url: '/pages/saoCode/scan?form=' + encodeURIComponent(JSON.stringify(this.form))
+				});
+			},
+
+			//取消
+			clearForm() {
+				uni.navigateTo({
+					url: '/pages_safetyExamine/views/examineManage/examineAdd?form=' + encodeURIComponent(JSON
+						.stringify(this.form))
+				});
+			},
+			//设备-保存
+			async submitForm() {
+				let _this = this;
+				let hazardIds = [];
+				let joinHazardIds = [];
+				//this.$set(this.form,'hazardNum', this.seleteListDevice.length)
+				//this.$set(this.form,'seleteListDevice', this.seleteListDevice)
+				if (this.seleteListDevice.length > 0) {
+					this.seleteListDevice.forEach(function(item) {
+						hazardIds.push(item.hazardId)
+						joinHazardIds.push(item.joinHazardId)
+					})
+					this.$set(this.form, 'hazardIds', hazardIds.join(','))
+					this.$set(this.form, 'joinHazardIds', joinHazardIds.join(','))
+				} else {
+					this.$set(this.form, 'hazardIds', '')
+					this.$set(this.form, 'joinHazardIds', '')
+					uni.showToast({
+						title: '请选择检查内容!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return
+				}
+
+				uni.redirectTo({
+					url: '/pages_safetyExamine/examineManage/examineAddTow?form=' + encodeURIComponent(JSON
+						.stringify(this.form)) + '&joinHazardIds=' + this.form.joinHazardIds
+				});
+
+
+			},
+			async getList() {
+				let _this = this;
+				this.getData.subId = this.form.subIds;
+				const {
+					data
+				} = await getHazardInfoBySubId(this.getData);
+				if (data.code == 200) {
+					data.data.forEach(function(item) {
+						item.type = false;
+					})
+					this.dataList = [...this.dataList, ...data.data]
+					_this.total = data.total;
+					if (this.form.joinHazardIds) {
+						let joinHazardIds = this.form.joinHazardIds.split(',')
+						for (let i = 0; i < this.dataList.length; i++) {
+							for (let b = 0; b < joinHazardIds.length; b++) {
+								if (this.dataList[i].joinHazardId == joinHazardIds[b]) {
+									this.seleteListDevice.push(this.dataList[i]);
+									this.dataList[i].type = true;
+								}
+							}
+						}
+					}
+				}
 			}
-		}else{
-			this.seleteListDevice.splice(this.seleteListDevice.indexOf(this.dataList[index]),1);
 		}
-	  },
-	  //实验室搜索
-	  searchBtn(){
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  handleClick(doType){
-		  let self=this;
-		  if( doType=='subBtn'){//保存数据
+	}
+</script>
 
-		  }
-	  },
-	  //扫码
-	  scanBtn(){
-		 uni.redirectTo({
-		 	url: '/pages/saoCode/scan?form='+encodeURIComponent(JSON.stringify(this.form))
-		 });
-	  },
+<style lang="stylus" scoped>
+	.examine {
+		height: 100%;
+		display flex;
 
-	  //取消
-	  clearForm(){
-		uni.navigateTo({
-			url: '/pages_safetyExamine/views/examineManage/examineAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-		});
-	  },
-	  //设备-保存
-	  async submitForm(){
-	  	let _this = this;
-		let hazardIds=[];
-		let joinHazardIds=[];
-		//this.$set(this.form,'hazardNum', this.seleteListDevice.length)
-		//this.$set(this.form,'seleteListDevice', this.seleteListDevice)
-		if(this.seleteListDevice.length>0){
-			this.seleteListDevice.forEach(function(item){
-				hazardIds.push(item.hazardId)
-				joinHazardIds.push(item.joinHazardId)
-			})
-			this.$set(this.form,'hazardIds', hazardIds.join(','))
-			this.$set(this.form,'joinHazardIds', joinHazardIds.join(','))
-		}else{
-			this.$set(this.form,'hazardIds','')
-			this.$set(this.form,'joinHazardIds','')
-			uni.showToast({
-				title: '请选择检查内容!',
-				icon:"none",
-				mask:true,
-				duration: 2000
-			});
-			return
+		.info-max-box {
+			flex: 1;
+			overflow: scroll;
+			padding: 120rpx 0rpx 100rpx;
+			box-sizing: border-box;
 		}
 
-		uni.redirectTo({
-			url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))+'&joinHazardIds='+this.form.joinHazardIds
-		});
+		.lab_title {
+			width: 750rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			position: fixed;
+			top: 0;
+			padding: 10rpx 30rpx;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: flex-start;
 
+			.lab_title_r {
+				width: 690rpx;
+				height: 80rpx;
+				position: relative;
+				border-radius: 10rpx;
+				border: 1rpx solid #E0E0E0;
 
-	  },
-	  async getList(){
-	      let _this = this;
-		  this.getData.subId=this.form.subIds;
-	      const {data} = await getHazardInfoBySubId(this.getData);
-	      if(data.code==200){
-			  data.data.forEach(function(item){
-				  item.type=false;
-			  })
-			  this.dataList=[...this.dataList,...data.data]
-			  _this.total=data.total;
-			  if(this.form.joinHazardIds){
-				  let joinHazardIds=this.form.joinHazardIds.split(',')
-				 for( let i=0;i<this.dataList.length;i++){
-					 for( let b=0;b<joinHazardIds.length;b++){
-						if(this.dataList[i].joinHazardId==joinHazardIds[b]){
-							this.seleteListDevice.push(this.dataList[i]);
-							this.dataList[i].type=true;
-						}
-					 }
-				 }
-			  }
-		  }
-      }
-  }
-}
-</script>
+				.lab_title_r_btn {
+					width: 60rpx;
+					height: 80rpx;
+					position: absolute;
+					top: 0rpx;
+					left: 0rpx;
 
-<style lang="stylus" scoped>
-.examine{
-	height:100%;
-	display flex;
-	.info-max-box{
-		flex: 1;
-		overflow: scroll;
-		padding: 120rpx 0rpx 100rpx;
-		box-sizing: border-box;
-	}
-	.lab_title{
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
-		position: fixed;
-		top: 0;
-		padding: 10rpx 30rpx;
-		box-sizing: border-box;
-		display: flex;
-		justify-content: flex-start;
-		.lab_title_r{
-			width: 690rpx;
-			height: 80rpx;
-			position:relative;
-			border-radius: 10rpx;
-			border: 1rpx solid #E0E0E0;
-			.lab_title_r_btn{
-				width: 60rpx;
-				height: 80rpx
-				position: absolute;
-				top: 0rpx;
-				left:0rpx;
-				>img{
-					width: 26rpx;
-					height: 26rpx;
+					>img {
+						width: 26rpx;
+						height: 26rpx;
+						position: absolute;
+						top: 30rpx;
+						left: 24rpx;
+					}
+				}
+
+				>input {
+					width: 274rpx;
+					height: 80rpx;
 					position: absolute;
-					top: 30rpx;
-					left: 24rpx;
+					top: 0rpx;
+					left: 60rpx;
+				}
+
+				.scanBtn {
+					width: 30rpx;
+					height: 30rpx;
+					position: absolute;
+					top: 26rpx;
+					right: 26rpx;
 				}
 			}
-			>input{
-				width: 274rpx;
+		}
+
+		.list {
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin: 0 30rpx;
+
+			.list_li {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
 				height: 80rpx;
-				position: absolute;
-				top: 0rpx;
-				left: 60rpx;
+				border-bottom: 1rpx solid #E0E0E0;
+
+				>text {
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					line-height: 80rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+
+				>img {
+					width: 24rpx;
+					height: 16rpx;
+					margin-right: 14rpx;
+				}
+			}
+
+			.list_li:last-child {
+				border: none;
 			}
-			.scanBtn{
-				width: 30rpx;
-				height: 30rpx
-				position: absolute;
-				top: 26rpx;
-				right:26rpx;
+
+			.color_A {
+				color: #333333;
+			}
+
+			.color_B {
+				color: #0183FA;
 			}
 		}
-	}
-	.list{
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 0rpx 0rpx;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		margin: 0 30rpx;
-		.list_li{
+
+		.bottom {
+			width: 750rpx;
+			height: 90rpx;
+			background: #FFFFFF;
+			position: fixed;
+			left: 0;
+			bottom: 0;
 			display: flex;
-			justify-content:space-between;
-			align-items: center;
-			height: 80rpx;
-			border-bottom: 1rpx solid #E0E0E0;
-			>text{
-				font-size: 28rpx;
+			justify-content: flex-start;
+
+			.bottom_l {
+				font-size: 30rpx;
 				font-family: PingFang SC-Medium, PingFang SC;
 				font-weight: 400;
-				line-height: 80rpx;
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
+				color: #333333;
+				line-height: 90rpx;
+				width: 50%;
+				height: 90rpx;
+				background: #fff;
+				text-align: center;
 			}
-			>img{
-				width: 24rpx;
-				height: 16rpx;
-				margin-right: 14rpx;
+
+			.bottom_r {
+				font-size: 30rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 90rpx;
+				width: 50%;
+				height: 90rpx;
+				background: #0183FA;
+				text-align: center;
 			}
 		}
-		.list_li:last-child{
-			border: none;
-		}
-		.color_A{
-			color: #333333;
-		}
-		.color_B{
-			color: #0183FA;
-		}
-	}
-	.bottom{
-		width: 750rpx;
-		height: 90rpx;
-		background: #FFFFFF;
-		position: fixed;
-		left: 0;
-		bottom: 0;
-		display: flex;
-		justify-content: flex-start;
-		.bottom_l{
-			font-size: 30rpx;
-			font-family: PingFang SC-Medium, PingFang SC;
-			font-weight: 400;
-			color: #333333;
-			line-height: 90rpx;
-			width: 50%;
-			height: 90rpx;
-			background: #fff;
-			text-align: center;
-		}
-		.bottom_r{
-			font-size: 30rpx;
-			font-family: PingFang SC-Medium, PingFang SC;
-			font-weight: 400;
-			color: #FFFFFF;
-			line-height: 90rpx;
-			width: 50%;
-			height: 90rpx;
-			background: #0183FA;
-			text-align: center;
-		}
 	}
-}
 </style>

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 831 - 676
pages_safetyExamine/views/examineManage/examineAddTow.vue


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 931 - 846
pages_safetyExamine/views/examineManage/examineDetail.vue


+ 0 - 2
pages_safetyExamine/views/examineManage/examineList.vue

@@ -83,8 +83,6 @@
 	} from '@/api/request/config.js'
 	import {
 		checkManageList,
-	} from '@/api/apiDemo/index.js'
-	import {
 		systemDeptDropList
 	} from '@/pages_safetyExamine/api/index.js'
 

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 971 - 865
pages_safetyExamine/views/patrolPlan/patrolPlanAdd.vue


+ 365 - 331
pages_safetyExamine/views/patrolPlan/patrolPlanAddContent.vue

@@ -1,369 +1,403 @@
 <!-- 安全检查-发起巡查计划-选择内容 -->
 <template>
-  <view class="examine">
-	  <view class="lab_title">
-		<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
-			<view class="lab_title_l_n">
-				<view>{{getData.hazardTypeModeName?getData.hazardTypeModeName:'选择类型'}}</view>
-				<img src="@/pages_safetyExamine/images/icon_06.png">
-			</view>
-		</picker>
-		<view class="lab_title_r">
-			<input type="text" v-model="getData.searchValue" placeholder="请输入检查内容" name="search" @confirm='searchBtn'  confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
-			<view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
-				<img src="@/pages_safetyExamine/images/clear.png"/>
+	<view class="examine">
+		<view class="lab_title">
+			<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
+				<view class="lab_title_l_n">
+					<view>{{getData.hazardTypeModeName?getData.hazardTypeModeName:'选择类型'}}</view>
+					<img src="@/pages_safetyExamine/images/icon_06.png">
+				</view>
+			</picker>
+			<view class="lab_title_r">
+				<input type="text" v-model="getData.searchValue" placeholder="请输入检查内容" name="search"
+					@confirm='searchBtn' confirm-type='search' maxlength="50"
+					placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
+					<img src="@/pages_safetyExamine/images/clear.png" />
+				</view>
 			</view>
 		</view>
-	  </view>
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<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.chName}}</text>
-					<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<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.chName}}</text>
+						<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+					</view>
 				</view>
 			</view>
-		</view>
-	</scroll-view>
-	<view class="bottom_btn" @click="submitForm">确定</view>
-  </view>
+		</scroll-view>
+		<view class="bottom_btn" @click="submitForm">确定</view>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import {conditionCollegeInfo,conditionSubjectInfo,dangerList,findDeviceList,haveHazardInSub} from '@/api/apiDemo/index.js'
-export default {
-  name: "rectifyList",
-  components: {
-
-  },
-  data() {
-    return {
-	  pageType:0,
-      //列表请求参数
-      getData:{
-        pageNum:1,
-        pageSize:20,
-		hazardTypeMode:'',//类型id
-		hazardTypeModeName:'',
-		searchValue:'',
-		filtType:'',
-		hazardIds:[],
-		selectedHazardIds:[],
-      },
-	  total:0,
-	  collegeIndex :0,
-	  collegeArray:[],
-	  collegeList:[],
-	  dataList:[],
-	  seleteListDevice:[],//临时存储选中的
-	  form:{},
-	}
-  },
-  onLoad(option) {
-      this.form=JSON.parse(decodeURIComponent(option.form));
-	  if(this.form.seleteListDevice.length>0){
-		  this.seleteListDevice=this.form.seleteListDevice;
-	  }
-	  if(option.pageType){//pageType=1添加页面进入2编辑页面进入
-	  	 this.pageType=option.pageType
-	  }
-  },
-  onShow() {
-
-  },
-  mounted(){
-	  this.dataList=[];
-	  this.dangerList();
-	  this.getList();
-  },
-  methods: {
-	  //滚动事件
-	  scrollGet(){
-		  let self=this;
-	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
-	          console.log('没有更多数据!')
-	      }else{
-			  setTimeout(function(){
-				  self.getData.pageNum += 1;
-				  self.getList();
-			  },1000)
-
-		  }
-	  },
-	  //选择学院
-	  collegeChange(e){
-		  this.collegeIndex = e.target.value;
-		  this.getData.hazardTypeMode=this.collegeList[e.target.value].dictValue
-		  this.getData.hazardTypeModeName=this.collegeList[e.target.value].dictLabel
-		  this.getData.pageNum=1;
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //点击选择实验室
-	  labSelete(index){
-	  	this.dataList[index].type = !this.dataList[index].type
-
-		if(this.dataList[index].type){//判断是选中还是取消
-			if(this.seleteListDevice.length>0){
-				if(this.seleteListDevice.findIndex((item)=>item.id===this.dataList[index].id) ==-1){//等于-1说明数组里没有当前选中元素,可以添加
-					this.seleteListDevice.push(this.dataList[index])
-				}
-			}else{
-				this.seleteListDevice.push(this.dataList[index])
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		getDicts,
+		findDeviceList,
+		haveHazardInSub,
+	} from '@/pages_safetyExamine/api/index.js'
+	export default {
+		name: "rectifyList",
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 0,
+				//列表请求参数
+				getData: {
+					pageNum: 1,
+					pageSize: 20,
+					hazardTypeMode: '', //类型id
+					hazardTypeModeName: '',
+					searchValue: '',
+					filtType: '',
+					hazardIds: [],
+					selectedHazardIds: [],
+				},
+				total: 0,
+				collegeIndex: 0,
+				collegeArray: [],
+				collegeList: [],
+				dataList: [],
+				seleteListDevice: [], //临时存储选中的
+				form: {},
 			}
-		}else{
-			this.seleteListDevice.splice(this.seleteListDevice.indexOf(this.dataList[index]),1);
-		}
-	  },
-	  //实验室搜索
-	  searchBtn(){
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //清除
-	  clearBtn(){
-		  this.getData.pageNum=1;
-		  this.collegeIndex=0;
-		  this.getData.deptId='';
-		  this.getData.deptName='';
-		  this.getData.searchValue='';
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  handleClick(doType){
-		  let self=this;
-		  if( doType=='subBtn'){//保存数据
-
-		  }
-	  },
-	  //设备-保存
-	  async submitForm(){
-	  	let _this = this;
-		let hazardIds=[];
-		this.$set(this.form,'hazardNum', this.seleteListDevice.length)
-		this.$set(this.form,'seleteListDevice', this.seleteListDevice)
-		if(this.seleteListDevice.length>0){
-			this.seleteListDevice.forEach(function(item){
-				hazardIds.push(item.id)
-			})
-			this.$set(this.form,'hazardIds', hazardIds.join(','))
-		}else{
-			uni.showToast({
-			    title: '请选择检查内容!',
-			    icon:"none",
-			    mask:true,
-			    duration: 2000
-			});
-			return;
-		}
+		},
+		onLoad(option) {
+			this.form = JSON.parse(decodeURIComponent(option.form));
+			if (this.form.seleteListDevice.length > 0) {
+				this.seleteListDevice = this.form.seleteListDevice;
+			}
+			if (option.pageType) { //pageType=1添加页面进入2编辑页面进入
+				this.pageType = option.pageType
+			}
+		},
+		onShow() {
+
+		},
+		mounted() {
+			this.dataList = [];
+			this.dangerList();
+			this.getList();
+		},
+		methods: {
+			//滚动事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.getData.pageSize <= self.getData.pageNum) {
+					console.log('没有更多数据!')
+				} else {
+					setTimeout(function() {
+						self.getData.pageNum += 1;
+						self.getList();
+					}, 1000)
+
+				}
+			},
+			//选择学院
+			collegeChange(e) {
+				this.collegeIndex = e.target.value;
+				this.getData.hazardTypeMode = this.collegeList[e.target.value].dictValue
+				this.getData.hazardTypeModeName = this.collegeList[e.target.value].dictLabel
+				this.getData.pageNum = 1;
+				this.dataList = [];
+				this.getList();
+			},
+			//点击选择实验室
+			labSelete(index) {
+				this.dataList[index].type = !this.dataList[index].type
+
+				if (this.dataList[index].type) { //判断是选中还是取消
+					if (this.seleteListDevice.length > 0) {
+						if (this.seleteListDevice.findIndex((item) => item.id === this.dataList[index].id) == -
+							1) { //等于-1说明数组里没有当前选中元素,可以添加
+							this.seleteListDevice.push(this.dataList[index])
+						}
+					} else {
+						this.seleteListDevice.push(this.dataList[index])
+					}
+				} else {
+					this.seleteListDevice.splice(this.seleteListDevice.indexOf(this.dataList[index]), 1);
+				}
+			},
+			//实验室搜索
+			searchBtn() {
+				this.dataList = [];
+				this.getList();
+			},
+			//清除
+			clearBtn() {
+				this.getData.pageNum = 1;
+				this.collegeIndex = 0;
+				this.getData.deptId = '';
+				this.getData.deptName = '';
+				this.getData.searchValue = '';
+				this.dataList = [];
+				this.getList();
+			},
+			handleClick(doType) {
+				let self = this;
+				if (doType == 'subBtn') { //保存数据
+
+				}
+			},
+			//设备-保存
+			async submitForm() {
+				let self = this;
+				let hazardIds = [];
+				this.$set(this.form, 'hazardNum', this.seleteListDevice.length)
+				this.$set(this.form, 'seleteListDevice', this.seleteListDevice)
+				if (this.seleteListDevice.length > 0) {
+					this.seleteListDevice.forEach(function(item) {
+						hazardIds.push(item.id)
+					})
+					this.$set(this.form, 'hazardIds', hazardIds.join(','))
+				} else {
+					uni.showToast({
+						title: '请选择检查内容!',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+					return;
+				}
+
+				//实验室是否有当前设备
+				let obj = {
+					"checkRange": this.form.checkRange,
+					"collegeIds": this.form.checkRange == 2 ? this.form.collegeIds + '' : '', //学院ID转换字符串
+					"subIds": this.form.checkRange == 3 ? this.form.subIds + '' : '', //实验室ID
+					"hazardIds": this.form.hazardIds,
+				}
+				const {
+					data
+				} = await haveHazardInSub(obj);
+				if (data.code == 200) {
+					let pages = getCurrentPages();
+					let prevPage = pages[pages.length - 2]; //上一个页面
+					prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
+					uni.navigateBack()
+					// if(this.pageType==1){
+					// 	uni.redirectTo({
+					// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
+					// 	});
+					// }else if(this.pageType==2){
+					// 	uni.redirectTo({
+					// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?form='+encodeURIComponent(JSON.stringify(this.form))
+					// 	});
+					// }
+				}
 
-		//实验室是否有当前设备
-		let obj={
-		  "checkRange":this.form.checkRange,
-		  "collegeIds":this.form.checkRange==2?this.form.collegeIds+'':'',//学院ID转换字符串
-		  "subIds":this.form.checkRange == 3?this.form.subIds+'':'',//实验室ID
-		  "hazardIds":this.form.hazardIds,
-		}
-		const {data} = await haveHazardInSub(obj);
-		if(data.code == 200){
-			let pages=getCurrentPages();
-			let prevPage=pages[pages.length-2];//上一个页面
-			prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
-			uni.navigateBack()
-			// if(this.pageType==1){
-			// 	uni.redirectTo({
-			// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-			// 	});
-			// }else if(this.pageType==2){
-			// 	uni.redirectTo({
-			// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?form='+encodeURIComponent(JSON.stringify(this.form))
-			// 	});
-			// }
-		}
 
+			},
 
-	  },
+			//检查类型
+			async dangerList() {
+				let self = this;
+				const {
+					data
+				} = await getDicts('lab_hazard_type');
+				if (data.code == 200) {
+					for (let i = 0; i < data.data.length; i++) {
+						self.collegeArray.push(data.data[i].label)
+					}
+					self.collegeList = data.data;
+				}
+			},
+			async getList() {
+				let self = this;
+				const {
+					data
+				} = await findDeviceList(self.getData);
+				if (data.code == 200) {
+					data.rows.forEach(function(item) {
+						item.type = false;
+					})
+					this.dataList = [...this.dataList, ...data.rows]
+					self.total = data.total;
+					if (this.seleteListDevice.length > 0) { //如果有选中的数据
+						for (let i = 0; i < this.dataList.length; i++) {
+							if (this.seleteListDevice.findIndex((item) => item.id === this.dataList[i].id) != -
+								1) { //不等于-1说明数组里有当前元素,可以改为选中
+								this.dataList[i].type = true;
+							} else {
 
-	  //查询学院列表
-	  async dangerList(){
-	  	let _this = this;
-	  	const {data} = await dangerList();
-	  	if(data.code == 200){
-			for(let i=0;i<data.rows.length;i++){
-				_this.collegeArray.push(data.rows[i].dictLabel)
+							}
+						}
+					}
+				}
 			}
-			_this.collegeList=data.rows;
-	  	}
-	  },
-	  async getList(){
-	      let _this = this;
-	      const {data} = await findDeviceList(_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.seleteListDevice.length>0){//如果有选中的数据
-			  		for(let i=0;i<this.dataList.length;i++){
-			  			if(this.seleteListDevice.findIndex((item)=>item.id===this.dataList[i].id) !=-1){//不等于-1说明数组里有当前元素,可以改为选中
-			  				this.dataList[i].type=true;
-			  			}else{
-
-			  			}
-			  		}
-			  }
-		  }
-      }
-  }
-}
+		}
+	}
 </script>
 
 <style lang="stylus" scoped>
-.examine{
-	height:100%;
-	display flex;
-	.info-max-box{
-		flex: 1;
-		overflow: scroll;
-		padding: 120rpx 0rpx 30rpx;
-		box-sizing: border-box;
-	}
-	.lab_title{
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
-		position: fixed;
-		top: 0;
-		padding: 10rpx 30rpx;
-		box-sizing: border-box;
-		display: flex;
-		justify-content: flex-start;
-
-		.lab_title_l{
-			width: 250rpx;
-			height: 80rpx;
-			margin-right: 20rpx;
-			.lab_title_l_n{
+	.examine {
+		height: 100%;
+		display flex;
+
+		.info-max-box {
+			flex: 1;
+			overflow: scroll;
+			padding: 120rpx 0rpx 30rpx;
+			box-sizing: border-box;
+		}
+
+		.lab_title {
+			width: 750rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			position: fixed;
+			top: 0;
+			padding: 10rpx 30rpx;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: flex-start;
+
+			.lab_title_l {
 				width: 250rpx;
 				height: 80rpx;
+				margin-right: 20rpx;
+
+				.lab_title_l_n {
+					width: 250rpx;
+					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;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+					>img {
+						width: 14rpx;
+						height: 8rpx;
+						margin-right: 30rpx;
+					}
+				}
+			}
+
+			.lab_title_r {
+				width: 420rpx;
+				height: 80rpx;
+				position: relative;
 				border-radius: 10rpx;
 				border: 1rpx solid #E0E0E0;
+
+				.lab_title_r_btn {
+					width: 60rpx;
+					height: 80rpx;
+					position: absolute;
+					top: 0rpx;
+					right: 0rpx;
+
+					>img {
+						width: 20rpx;
+						height: 20rpx;
+						position: absolute;
+						top: 30rpx;
+						left: 24rpx;
+					}
+				}
+
+				>input {
+					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 {
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin: 0 30rpx;
+
+			.list_li {
 				display: flex;
-				justify-content: flex-start;
+				justify-content: space-between;
 				align-items: center;
-				>view{
-					flex:1;
-					line-height:80rpx;
-					margin-left:20rpx;
-					color: #999999;
-					font-size:28rpx;
-			        white-space: nowrap;
+				height: 80rpx;
+				border-bottom: 1rpx solid #E0E0E0;
+
+				>text {
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					line-height: 80rpx;
 					overflow: hidden;
 					text-overflow: ellipsis;
+					white-space: nowrap;
 				}
-				>img{
-					width: 14rpx;
-					height: 8rpx;
-					margin-right: 30rpx;
+
+				>img {
+					width: 24rpx;
+					height: 16rpx;
+					margin-right: 14rpx;
 				}
 			}
-		}
-		.lab_title_r{
-			width: 420rpx;
-			height: 80rpx;
-			position:relative;
-			border-radius: 10rpx;
-			border: 1rpx solid #E0E0E0;
-			.lab_title_r_btn{
-				width: 60rpx;
-				height: 80rpx
-				position: absolute;
-				top: 0rpx;
-				right:0rpx;
-				>img{
-					width: 20rpx;
-					height: 20rpx;
-					position: absolute;
-					top: 30rpx;
-					left: 24rpx;
-				}
+
+			.list_li:last-child {
+				border: none;
 			}
-			>input{
-				width: 274rpx;
-				height: 80rpx;
-				position: absolute;
-				top: 0rpx;
-				left: 60rpx;
+
+			.color_A {
+				color: #333333;
 			}
-			.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_B {
 				color: #0183FA;
-				line-height: 80rpx;
 			}
 		}
-	}
-	.list{
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 0rpx 0rpx;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		margin: 0 30rpx;
-		.list_li{
-			display: flex;
-			justify-content:space-between;
-			align-items: center;
-			height: 80rpx;
-			border-bottom: 1rpx solid #E0E0E0;
-			>text{
-				font-size: 28rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 400;
-				line-height: 80rpx;
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
-			}
-			>img{
-				width: 24rpx;
-				height: 16rpx;
-				margin-right: 14rpx;
-			}
-		}
-		.list_li:last-child{
-			border: none;
-		}
-		.color_A{
-			color: #333333;
-		}
-		.color_B{
-			color: #0183FA;
-		}
-	}
-	.bottom_btn{
-		position: fixed;
-		bottom: 26rpx;
-		left: 30rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC-Medium, PingFang SC;
-		font-weight: 400;
-		color: #FFFFFF;
-		line-height: 90rpx;
-		width: 690rpx;
-		height: 90rpx;
-		background: #0183FA;
-		border-radius: 20rpx;
-		text-align: center;
 
+		.bottom_btn {
+			position: fixed;
+			bottom: 26rpx;
+			left: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC-Medium, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 90rpx;
+			width: 690rpx;
+			height: 90rpx;
+			background: #0183FA;
+			border-radius: 20rpx;
+			text-align: center;
+
+		}
 	}
-}
 </style>

+ 341 - 316
pages_safetyExamine/views/patrolPlan/patrolPlanAddLab.vue

@@ -1,351 +1,376 @@
 <!-- 安全检查-发起巡查计划-选择实验室 -->
 <template>
-  <view class="examine">
-	  <view class="lab_title">
-		<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
-			<view class="lab_title_l_n">
-				<view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
-				<img src="@/pages_safetyExamine/images/icon_06.png">
-			</view>
-		</picker>
-		<view class="lab_title_r">
-			<input type="text" v-model="getData.searchValue" placeholder="请输入实验室名称" name="search" @confirm='searchBtn'  confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
-			<view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
-				<img src="@/pages_safetyExamine/images/clear.png"/>
+	<view class="examine">
+		<view class="lab_title">
+			<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
+				<view class="lab_title_l_n">
+					<view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
+					<img src="@/pages_safetyExamine/images/icon_06.png">
+				</view>
+			</picker>
+			<view class="lab_title_r">
+				<input type="text" v-model="getData.searchValue" placeholder="请输入实验室名称" name="search"
+					@confirm='searchBtn' confirm-type='search' maxlength="50"
+					placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<view v-if="getData.searchValue>0" class="lab_title_r_btn" @click="clearBtn">
+					<img src="@/pages_safetyExamine/images/clear.png" />
+				</view>
 			</view>
 		</view>
-	  </view>
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<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.subjectName}}-{{item.roomNumber}}</text>
-					<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<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.subName}}-{{item.roomNum}}</text>
+						<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+					</view>
 				</view>
 			</view>
-		</view>
-	</scroll-view>
-	<view class="bottom_btn" @click="submitForm">保存</view>
-  </view>
+		</scroll-view>
+		<view class="bottom_btn" @click="submitForm">保存</view>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import {conditionCollegeInfo,conditionSubjectInfo} from '@/api/apiDemo/index.js'
-export default {
-  name: "rectifyList",
-  components: {
-
-  },
-  data() {
-    return {
-	  pageType:0,
-      //列表请求参数
-      getData:{
-        pageNum:1,
-        pageSize:20,
-		deptId:'',//学院id
-		deptName:'',
-		searchValue:'',
-		selectedSubIds:[],
-		subIds:[],
-      },
-	  total:0,
-	  collegeIndex :0,
-	  collegeArray:[],
-	  collegeList:[],
-	  dataList:[],
-	  seleteListLab:[],//临时存储选中的
-	  form:{},
-	}
-  },
-  onLoad(option) {
-      this.form=JSON.parse(decodeURIComponent(option.form));
-	  if(this.form.seleteListLab.length>0){
-		  this.seleteListLab=this.form.seleteListLab;
-	  }
-	  if(option.pageType){//pageType=1添加页面进入2编辑页面进入
-	  	 this.pageType=option.pageType
-	  }
-  },
-  onShow() {
-
-  },
-  mounted(){
-	  this.dataList=[];
-	  this.conditionCollegeInfo();
-	  this.getList();
-  },
-  methods: {
-	  //滚动事件
-	  scrollGet(){
-		  let self=this;
-	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
-	          console.log('没有更多数据!')
-	      }else{
-			  setTimeout(function(){
-				  self.getData.pageNum += 1;
-				  self.getList();
-			  },1000)
-
-		  }
-	  },
-	  //选择学院
-	  collegeChange(e){
-		  this.collegeIndex = e.target.value;
-		  this.getData.deptId=this.collegeList[e.target.value].deptId
-		  this.getData.deptName=this.collegeList[e.target.value].deptName
-		  this.getData.pageNum=1;
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //点击选择实验室
-	  labSelete(index){
-	  	this.dataList[index].type = !this.dataList[index].type
-
-		if(this.dataList[index].type){//判断是选中还是取消
-			if(this.seleteListLab.length>0){
-				if(this.seleteListLab.findIndex((item)=>item.subId===this.dataList[index].subId) ==-1){//等于-1说明数组里没有当前选中元素,可以添加
-					this.seleteListLab.push(this.dataList[index])
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		systemDeptDropList,
+		laboratorySubRelInfoGetRelList
+	} from '@/pages_safetyExamine/api/index.js'
+	export default {
+		name: "rectifyList",
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 0,
+				//列表请求参数
+				getData: {
+					pageNum: 1,
+					pageSize: 20,
+					deptId: '', //学院id
+					deptName: '',
+					searchValue: '',
+					selectedSubIds: [],
+					subIds: [],
+				},
+				total: 0,
+				collegeIndex: 0,
+				collegeArray: [],
+				collegeList: [],
+				dataList: [],
+				seleteListLab: [], //临时存储选中的
+				form: {},
+			}
+		},
+		onLoad(option) {
+			this.form = JSON.parse(decodeURIComponent(option.form));
+			if (this.form.seleteListLab.length > 0) {
+				this.seleteListLab = this.form.seleteListLab;
+			}
+			if (option.pageType) { //pageType=1添加页面进入2编辑页面进入
+				this.pageType = option.pageType
+			}
+		},
+		onShow() {
+
+		},
+		mounted() {
+			this.dataList = [];
+			this.conditionCollegeInfo();
+			this.getList();
+		},
+		methods: {
+			//滚动事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.getData.pageSize <= self.getData.pageNum) {
+					console.log('没有更多数据!')
+				} else {
+					setTimeout(function() {
+						self.getData.pageNum += 1;
+						self.getList();
+					}, 1000)
+
+				}
+			},
+			//选择学院
+			collegeChange(e) {
+				this.collegeIndex = e.target.value;
+				this.getData.deptId = this.collegeList[e.target.value].deptId
+				this.getData.deptName = this.collegeList[e.target.value].deptName
+				this.getData.pageNum = 1;
+				this.dataList = [];
+				this.getList();
+			},
+			//点击选择实验室
+			labSelete(index) {
+				this.dataList[index].type = !this.dataList[index].type
+
+				if (this.dataList[index].type) { //判断是选中还是取消
+					if (this.seleteListLab.length > 0) {
+						if (this.seleteListLab.findIndex((item) => item.subId === this.dataList[index].subId) == -
+							1) { //等于-1说明数组里没有当前选中元素,可以添加
+							this.seleteListLab.push(this.dataList[index])
+						}
+					} else {
+						this.seleteListLab.push(this.dataList[index])
+					}
+				} else {
+					this.seleteListLab.splice(this.seleteListLab.indexOf(this.dataList[index]), 1);
+				}
+			},
+			//实验室搜索
+			searchBtn() {
+				this.dataList = [];
+				this.getList();
+			},
+			//清除
+			clearBtn() {
+				this.getData.pageNum = 1;
+				this.collegeIndex = 0;
+				this.getData.deptId = '';
+				this.getData.deptName = '';
+				this.getData.searchValue = '';
+				this.dataList = [];
+				this.getList();
+			},
+			handleClick(doType) {
+				let self = this;
+				if (doType == 'subBtn') { //保存数据
+
+				}
+			},
+			//实验室-保存
+			async submitForm() {
+				let _this = this;
+				let subIds = [];
+				this.$set(this.form, 'subjectNum', this.seleteListLab.length)
+				this.$set(this.form, 'seleteListLab', this.seleteListLab)
+				if (this.seleteListLab.length > 0) {
+					this.seleteListLab.forEach(function(item) {
+						subIds.push(item.subId)
+					})
+					this.$set(this.form, 'subIds', subIds.join(','))
+				}
+				let pages = getCurrentPages();
+				let prevPage = pages[pages.length - 2]; //上一个页面
+				prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
+				uni.navigateBack()
+
+
+			},
+
+			//查询学院列表
+			async conditionCollegeInfo() {
+				let self = this;
+				const {
+					data
+				} = await systemDeptDropList({
+					deptName: '',
+					level: 2,
+					deptType: 1
+				});
+				if (data.code == 200) {
+					for (let i = 0; i < data.data.length; i++) {
+						self.collegeArray.push(data.data[i].deptName)
+					}
+					self.collegeList = data.data;
+				}
+			},
+			async getList() {
+				let _this = this;
+				const {
+					data
+				} = await laboratorySubRelInfoGetRelList(_this.getData);
+				if (data.code == 200) {
+					data.data.forEach(function(item) {
+						item.type = false;
+					})
+					this.dataList = [...this.dataList, ...data.data]
+					_this.total = data.total;
+					if (this.seleteListLab.length > 0) { //如果有选中的数据
+						for (let i = 0; i < this.dataList.length; i++) {
+							if (this.seleteListLab.findIndex((item) => item.subId === this.dataList[i].subId) != -
+								1) { //不等于-1说明数组里有当前元素,可以改为选中
+								this.dataList[i].type = true;
+							} else {
+
+							}
+						}
+					}
 				}
-			}else{
-				this.seleteListLab.push(this.dataList[index])
 			}
-		}else{
-			this.seleteListLab.splice(this.seleteListLab.indexOf(this.dataList[index]),1);
-		}
-	  },
-	  //实验室搜索
-	  searchBtn(){
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //清除
-	  clearBtn(){
-		  this.getData.pageNum=1;
-		  this.collegeIndex=0;
-		  this.getData.deptId='';
-		  this.getData.deptName='';
-		  this.getData.searchValue='';
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  handleClick(doType){
-		  let self=this;
-		  if( doType=='subBtn'){//保存数据
-
-		  }
-	  },
-	  //实验室-保存
-	  async submitForm(){
-	  	let _this = this;
-		let subIds=[];
-		this.$set(this.form,'subjectNum', this.seleteListLab.length)
-		this.$set(this.form,'seleteListLab', this.seleteListLab)
-		if(this.seleteListLab.length>0){
-			this.seleteListLab.forEach(function(item){
-				subIds.push(item.subId)
-			})
-			this.$set(this.form,'subIds', subIds.join(','))
 		}
-		let pages=getCurrentPages();
-		let prevPage=pages[pages.length-2];//上一个页面
-		prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
-		uni.navigateBack()
-		// if(this.pageType==1){
-		// 	uni.redirectTo({
-		// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-		// 	});
-		// }else if(this.pageType==2){
-		// 	uni.redirectTo({
-		// 		url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?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;
-	  	}
-	  },
-	  async getList(){
-	      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.subId===this.dataList[i].subId) !=-1){//不等于-1说明数组里有当前元素,可以改为选中
-			  				this.dataList[i].type=true;
-			  			}else{
-
-			  			}
-			  		}
-			  }
-		  }
-      }
-  }
-}
+	}
 </script>
 
 <style lang="stylus" scoped>
-.examine{
-	height:100%;
-	display flex;
-	.info-max-box{
-		flex: 1;
-		overflow: scroll;
-		padding: 120rpx 0rpx 30rpx;
-		box-sizing: border-box;
-	}
-	.lab_title{
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
-		position: fixed;
-		top: 0;
-		padding: 10rpx 30rpx;
-		box-sizing: border-box;
-		display: flex;
-		justify-content: flex-start;
-
-		.lab_title_l{
-			width: 250rpx;
-			height: 80rpx;
-			margin-right: 20rpx;
-			.lab_title_l_n{
+	.examine {
+		height: 100%;
+		display flex;
+
+		.info-max-box {
+			flex: 1;
+			overflow: scroll;
+			padding: 120rpx 0rpx 30rpx;
+			box-sizing: border-box;
+		}
+
+		.lab_title {
+			width: 750rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			position: fixed;
+			top: 0;
+			padding: 10rpx 30rpx;
+			box-sizing: border-box;
+			display: flex;
+			justify-content: flex-start;
+
+			.lab_title_l {
 				width: 250rpx;
 				height: 80rpx;
+				margin-right: 20rpx;
+
+				.lab_title_l_n {
+					width: 250rpx;
+					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;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+					}
+
+					>img {
+						width: 14rpx;
+						height: 8rpx;
+						margin-right: 30rpx;
+					}
+				}
+			}
+
+			.lab_title_r {
+				width: 420rpx;
+				height: 80rpx;
+				position: relative;
 				border-radius: 10rpx;
 				border: 1rpx solid #E0E0E0;
+
+				.lab_title_r_btn {
+					width: 60rpx;
+					height: 80rpx;
+					position: absolute;
+					top: 0rpx;
+					right: 0rpx;
+
+					>img {
+						width: 20rpx;
+						height: 20rpx;
+						position: absolute;
+						top: 30rpx;
+						left: 24rpx;
+					}
+				}
+
+				>input {
+					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 {
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin: 0 30rpx;
+
+			.list_li {
 				display: flex;
-				justify-content: flex-start;
+				justify-content: space-between;
 				align-items: center;
-				>view{
-					flex:1;
-					line-height:80rpx;
-					margin-left:20rpx;
-					color: #999999;
-					font-size:28rpx;
-			        white-space: nowrap;
+				height: 80rpx;
+				border-bottom: 1rpx solid #E0E0E0;
+
+				>text {
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					line-height: 80rpx;
 					overflow: hidden;
 					text-overflow: ellipsis;
+					white-space: nowrap;
 				}
-				>img{
-					width: 14rpx;
-					height: 8rpx;
-					margin-right: 30rpx;
+
+				>img {
+					width: 24rpx;
+					height: 16rpx;
+					margin-right: 14rpx;
 				}
 			}
-		}
-		.lab_title_r{
-			width: 420rpx;
-			height: 80rpx;
-			position:relative;
-			border-radius: 10rpx;
-			border: 1rpx solid #E0E0E0;
-			.lab_title_r_btn{
-				width: 60rpx;
-				height: 80rpx
-				position: absolute;
-				top: 0rpx;
-				right:0rpx;
-				>img{
-					width: 20rpx;
-					height: 20rpx;
-					position: absolute;
-					top: 30rpx;
-					left: 24rpx;
-				}
+
+			.list_li:last-child {
+				border: none;
 			}
-			>input{
-				width: 274rpx;
-				height: 80rpx;
-				position: absolute;
-				top: 0rpx;
-				left: 60rpx;
+
+			.color_A {
+				color: #333333;
 			}
-			.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_B {
 				color: #0183FA;
-				line-height: 80rpx;
-			}
-		}
-	}
-	.list{
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 0rpx 0rpx;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		margin: 0 30rpx;
-		.list_li{
-			display: flex;
-			justify-content:space-between;
-			align-items: center;
-			height: 80rpx;
-			border-bottom: 1rpx solid #E0E0E0;
-			>text{
-				font-size: 28rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 400;
-				line-height: 80rpx;
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
-			}
-			>img{
-				width: 24rpx;
-				height: 16rpx;
-				margin-right: 14rpx;
 			}
 		}
-		.list_li:last-child{
-			border: none;
-		}
-		.color_A{
-			color: #333333;
-		}
-		.color_B{
-			color: #0183FA;
-		}
-	}
-	.bottom_btn{
-		position: fixed;
-		bottom: 26rpx;
-		left: 30rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC-Medium, PingFang SC;
-		font-weight: 400;
-		color: #FFFFFF;
-		line-height: 90rpx;
-		width: 690rpx;
-		height: 90rpx;
-		background: #0183FA;
-		border-radius: 20rpx;
-		text-align: center;
 
+		.bottom_btn {
+			position: fixed;
+			bottom: 26rpx;
+			left: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC-Medium, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 90rpx;
+			width: 690rpx;
+			height: 90rpx;
+			background: #0183FA;
+			border-radius: 20rpx;
+			text-align: center;
+
+		}
 	}
-}
 </style>

+ 298 - 270
pages_safetyExamine/views/patrolPlan/patrolPlanAddMember.vue

@@ -1,298 +1,326 @@
 <!-- 安全检查-发起巡查计划-巡查组 -->
 <template>
-  <view class="examine">
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<view>
-			<view class="lab_title">
-				<view class="lab_title_n">
-					<input type="text" v-model="getData.searchValue" placeholder="请输入巡查组名称" name="search" @confirm='searchBtn'  confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
-
-					<view class="lab_title_r_btn" v-if="getData.searchValue>0" @click="clearBtn">
-						<img src="@/pages_safetyExamine/images/clear.png"/>
+	<view class="examine">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<view>
+				<view class="lab_title">
+					<view class="lab_title_n">
+						<input type="text" v-model="getData.searchValue" placeholder="请输入巡查组名称" name="search"
+							@confirm='searchBtn' confirm-type='search' maxlength="50"
+							placeholder-style="color: #CCCCCC;font-size:26rpx;">
+
+						<view class="lab_title_r_btn" v-if="getData.searchValue>0" @click="clearBtn">
+							<img src="@/pages_safetyExamine/images/clear.png" />
+						</view>
 					</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.groupName}}</text>
-					<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+				<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.groupName}}</text>
+						<img v-if="item.type" src="@/pages_safetyExamine/images/icon_xzwt_xz.png">
+					</view>
 				</view>
 			</view>
-		</view>
-	</scroll-view>
-	<view class="bottom_btn" @click="submitForm">保存</view>
-  </view>
+		</scroll-view>
+		<view class="bottom_btn" @click="submitForm">保存</view>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import { checkGroupList,checkGroupDetail} from '@/api/apiDemo/index.js'
-export default {
-  name: "rectifyList",
-  components: {
-
-  },
-  data() {
-    return {
-	  pageType:0,
-      //列表请求参数
-      getData:{
-		checkLevel:'0',
-		searchValue:'',
-		checkLevel:'',
-
-
-      },
-	  total:0,
-	  dataList:[],
-	  seleteListMember:[],//临时存储选中巡查组
-	  checkMemberDtoList:[],//临时存储选中的
-	  form:{},
-	}
-  },
-  onLoad(option) {
-	  if(option.form){
-		  this.form=JSON.parse(decodeURIComponent(option.form));
-		  if(this.form.seleteListMember.length>0){
-		  	 this.seleteListMember=this.form.seleteListMember;
-		  }
-		  this.getData.checkLevel=this.form.groupDataType
-	  }
-	  if(option.pageType){//pageType=1添加页面进入2编辑页面进入
-		  this.pageType=option.pageType
-	  }
-  },
-  onShow() {
-	  this.dataList=[];
-      this.getList();
-  },
-  mounted(){
-
-  },
-  methods: {
-	  //滚动事件
-	  scrollGet(){
-		  let self=this;
-	      if(self.total<=self.getData.pageNum){
-	          console.log('没有更多数据!')
-	      }else{
-			  setTimeout(function(){
-				  self.getData.pageNum += 1;
-				  self.getList();
-			  },1000)
-
-		  }
-	  },
-	  //点击选择实验室
-	  labSelete(index){
-		let _this = this;
-		this.seleteListMember=[];
-	  	this.dataList[index].type = !this.dataList[index].type
-		if (_this.dataList[index].type == true) {
-			_this.dataList.forEach(function(item2) {
-			  if (item2.id == _this.dataList[index].id) {
-				item2.type = true
-			  } else {
-				item2.type = false
-			  }
-			})
-		}
-		this.seleteListMember.push(this.dataList[index])
-		// if(this.dataList[index].type){//判断是选中还是取消
-		// 	this.seleteListMember.push(this.dataList[index])
-		// }else{
-		// 	this.seleteListMember=[];
-		// }
-	  },
-	  //实验室搜索
-	  searchBtn(){
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //清除按钮
-	  clearBtn(){
-	  		this.getData.pageNum=1;
-	  		this.getData.searchValue= '';
-	  		this.dataList=[];
-	  		this.getList();
-	  },
-	  handleClick(doType){
-		  let self=this;
-		  if( doType=='subBtn'){//保存数据
-
-		  }
-	  },
-	  //巡查组-保存
-	  async submitForm(){
-	  	let _this = this;
-		console.log(this.seleteListMember)
-		let id=this.seleteListMember[0].id
-		this.form.checkMemberDtoList=[];
-
-		this.$set(this.form,'checkGroupId',this.seleteListMember[0].id)
-		this.$set(this.form,'checkGroupName',this.seleteListMember[0].groupName)
-	  	const {data} = await checkGroupDetail({id:id,selectEnable:'1'});
-	  	if(data.code == 200){
-			let obj={};
-			for(let i=0;i<data.data.checkGroupMemberList.length;i++){
-				 obj={
-					"deptId":data.data.checkGroupMemberList[i].deptId,
-					"deptName":data.data.checkGroupMemberList[i].deptName,
-					"enable":data.data.checkGroupMemberList[i].enable,
-					"jobNum":data.data.checkGroupMemberList[i].jobNum,
-					"name":data.data.checkGroupMemberList[i].name,
-					"userId":data.data.checkGroupMemberList[i].userId,
-					"userType":data.data.checkGroupMemberList[i].userType
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		checkGroupList,
+		checkGroupDetail
+	} from '@/api/apiDemo/index.js'
+	export default {
+		name: "rectifyList",
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 0,
+				//列表请求参数
+				getData: {
+					checkLevel: '0',
+					searchValue: '',
+					checkLevel: '',
+
+
+				},
+				total: 0,
+				dataList: [],
+				seleteListMember: [], //临时存储选中巡查组
+				checkMemberDtoList: [], //临时存储选中的
+				form: {},
+			}
+		},
+		onLoad(option) {
+			if (option.form) {
+				this.form = JSON.parse(decodeURIComponent(option.form));
+				if (this.form.seleteListMember.length > 0) {
+					this.seleteListMember = this.form.seleteListMember;
 				}
-				this.form.checkMemberDtoList.push(obj)
+				this.getData.checkLevel = this.form.groupDataType
 			}
-			let pages=getCurrentPages();
-			let prevPage=pages[pages.length-2];//上一个页面
-			prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
-			uni.navigateBack()
-
-
-			// if(this.pageType==1){
-			// 	uni.redirectTo({
-			// 	    url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
-			// 	});
-			// }else if(this.pageType==2){
-			// 	uni.redirectTo({
-			// 	    url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?form='+encodeURIComponent(JSON.stringify(this.form))
-			// 	});
-			// }
-
-	  	}
-
-	  },
-
-	  async getList(){
-
-	      let _this = this;
-	      const {data} = await checkGroupList(_this.getData);
-	      if(data.code==200){
-
-			  if(data.data){
-				  data.data.forEach(function(item){
-					  item.type=false
-				  })
-			  }
-			  this.dataList=[...this.dataList,...data.data]
-			  //如果有选中的数据
-			  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;
+			if (option.pageType) { //pageType=1添加页面进入2编辑页面进入
+				this.pageType = option.pageType
+			}
+		},
+		onShow() {
+			this.dataList = [];
+			this.getList();
+		},
+		mounted() {
+
+		},
+		methods: {
+			//滚动事件
+			scrollGet() {
+				let self = this;
+				if (self.total <= self.getData.pageNum) {
+					console.log('没有更多数据!')
+				} else {
+					setTimeout(function() {
+						self.getData.pageNum += 1;
+						self.getList();
+					}, 1000)
+
+				}
+			},
+			//点击选择实验室
+			labSelete(index) {
+				let _this = this;
+				this.seleteListMember = [];
+				this.dataList[index].type = !this.dataList[index].type
+				if (_this.dataList[index].type == true) {
+					_this.dataList.forEach(function(item2) {
+						if (item2.id == _this.dataList[index].id) {
+							item2.type = true
+						} else {
+							item2.type = false
+						}
+					})
+				}
+				this.seleteListMember.push(this.dataList[index])
+				// if(this.dataList[index].type){//判断是选中还是取消
+				// 	this.seleteListMember.push(this.dataList[index])
+				// }else{
+				// 	this.seleteListMember=[];
+				// }
+			},
+			//实验室搜索
+			searchBtn() {
+				this.dataList = [];
+				this.getList();
+			},
+			//清除按钮
+			clearBtn() {
+				this.getData.pageNum = 1;
+				this.getData.searchValue = '';
+				this.dataList = [];
+				this.getList();
+			},
+			handleClick(doType) {
+				let self = this;
+				if (doType == 'subBtn') { //保存数据
+
+				}
+			},
+			//巡查组-保存
+			async submitForm() {
+				let _this = this;
+				console.log(this.seleteListMember)
+				let id = this.seleteListMember[0].id
+				this.form.checkMemberDtoList = [];
+
+				this.$set(this.form, 'checkGroupId', this.seleteListMember[0].id)
+				this.$set(this.form, 'checkGroupName', this.seleteListMember[0].groupName)
+				const {
+					data
+				} = await checkGroupDetail({
+					id: id,
+					selectEnable: '1'
+				});
+				if (data.code == 200) {
+					let obj = {};
+					for (let i = 0; i < data.data.checkGroupMemberList.length; i++) {
+						obj = {
+							"deptId": data.data.checkGroupMemberList[i].deptId,
+							"deptName": data.data.checkGroupMemberList[i].deptName,
+							"enable": data.data.checkGroupMemberList[i].enable,
+							"jobNum": data.data.checkGroupMemberList[i].jobNum,
+							"name": data.data.checkGroupMemberList[i].name,
+							"userId": data.data.checkGroupMemberList[i].userId,
+							"userType": data.data.checkGroupMemberList[i].userType
+						}
+						this.form.checkMemberDtoList.push(obj)
+					}
+					let pages = getCurrentPages();
+					let prevPage = pages[pages.length - 2]; //上一个页面
+					prevPage.onShow(encodeURIComponent(JSON.stringify(this.form)))
+					uni.navigateBack()
+
+
+					// if(this.pageType==1){
+					// 	uni.redirectTo({
+					// 	    url: '/pages_safetyExamine/patrolPlan/patrolPlanAdd?form='+encodeURIComponent(JSON.stringify(this.form))
+					// 	});
+					// }else if(this.pageType==2){
+					// 	uni.redirectTo({
+					// 	    url: '/pages_safetyExamine/patrolPlan/patrolPlanEdit?form='+encodeURIComponent(JSON.stringify(this.form))
+					// 	});
+					// }
+
+				}
+
+			},
+
+			async getList() {
+
+				let _this = this;
+				const {
+					data
+				} = await checkGroupList(_this.getData);
+				if (data.code == 200) {
+
+					if (data.data) {
+						data.data.forEach(function(item) {
+							item.type = false
+						})
+					}
+					this.dataList = [...this.dataList, ...data.data]
+					//如果有选中的数据
+					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.data.total;
-		  }
-      }
-  }
-}
+					this.total = data.data.total;
+				}
+			}
+		}
+	}
 </script>
 
 <style lang="stylus" scoped>
-.examine{
-	height:100%;
-	display flex;
-	.info-max-box{
-		flex: 1;
-		overflow: scroll;
-		padding: 120rpx 0rpx 30rpx;
-		box-sizing: border-box;
-	}
-	.lab_title{
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
-		position: fixed;
-		top: 0;
-		padding: 10rpx 30rpx;
-		box-sizing: border-box;
-		.lab_title_n{
-			width: 690rpx;
-			height: 80rpx;
-			position:relative;
-			border-radius: 10rpx;
-			border: 1rpx solid #E0E0E0;
-			.lab_title_r_btn{
-				width: 60rpx;
-				height: 80rpx
-				position: absolute;
-				top: 0rpx;
-				right: 0rpx;
-				>img{
-					width: 20rpx;
-					height: 20rpx;
+	.examine {
+		height: 100%;
+		display flex;
+
+		.info-max-box {
+			flex: 1;
+			overflow: scroll;
+			padding: 120rpx 0rpx 30rpx;
+			box-sizing: border-box;
+		}
+
+		.lab_title {
+			width: 750rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			position: fixed;
+			top: 0;
+			padding: 10rpx 30rpx;
+			box-sizing: border-box;
+
+			.lab_title_n {
+				width: 690rpx;
+				height: 80rpx;
+				position: relative;
+				border-radius: 10rpx;
+				border: 1rpx solid #E0E0E0;
+
+				.lab_title_r_btn {
+					width: 60rpx;
+					height: 80rpx;
 					position: absolute;
-					top: 30rpx;
-					left: 24rpx;
+					top: 0rpx;
+					right: 0rpx;
+
+					>img {
+						width: 20rpx;
+						height: 20rpx;
+						position: absolute;
+						top: 30rpx;
+						left: 24rpx;
+					}
+				}
+
+				>input {
+					width: 360rpx;
+					height: 80rpx;
+					position: absolute;
+					top: 0rpx;
+					left: 60rpx;
 				}
 			}
-			>input{
-				width: 360rpx;
+		}
+
+		.list {
+			background: #FFFFFF;
+			border-radius: 20rpx 20rpx 0rpx 0rpx;
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin: 0 30rpx;
+
+			.list_li {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
 				height: 80rpx;
-				position: absolute;
-				top: 0rpx;
-				left: 60rpx;
+				border-bottom: 1rpx solid #E0E0E0;
+
+				>text {
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					line-height: 80rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+
+				>img {
+					width: 24rpx;
+					height: 16rpx;
+					margin-right: 14rpx;
+				}
 			}
-		}
-	}
-	.list{
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 0rpx 0rpx;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		margin: 0 30rpx;
-		.list_li{
-			display: flex;
-			justify-content:space-between;
-			align-items: center;
-			height: 80rpx;
-			border-bottom: 1rpx solid #E0E0E0;
-			>text{
-				font-size: 28rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 400;
-				line-height: 80rpx;
-				overflow: hidden;
-				text-overflow:ellipsis;
-				white-space: nowrap;
+
+			.list_li:last-child {
+				border: none;
 			}
-			>img{
-				width: 24rpx;
-				height: 16rpx;
-				margin-right: 14rpx;
+
+			.color_A {
+				color: #333333;
+			}
+
+			.color_B {
+				color: #0183FA;
 			}
 		}
-		.list_li:last-child{
-			border: none;
-		}
-		.color_A{
-			color: #333333;
-		}
-		.color_B{
-			color: #0183FA;
-		}
-	}
-	.bottom_btn{
-		position: fixed;
-		bottom: 26rpx;
-		left: 30rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC-Medium, PingFang SC;
-		font-weight: 400;
-		color: #FFFFFF;
-		line-height: 90rpx;
-		width: 690rpx;
-		height: 90rpx;
-		background: #0183FA;
-		border-radius: 20rpx;
-		text-align: center;
 
+		.bottom_btn {
+			position: fixed;
+			bottom: 26rpx;
+			left: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC-Medium, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 90rpx;
+			width: 690rpx;
+			height: 90rpx;
+			background: #0183FA;
+			border-radius: 20rpx;
+			text-align: center;
+
+		}
 	}
-}
 </style>

+ 428 - 385
pages_safetyExamine/views/patrolPlan/patrolPlanList.vue

@@ -1,439 +1,482 @@
 <!-- 安全检查-发起巡查计划 -->
 <template>
-  <view class="examine">
-	  <view class="tabTitle">
-		<view class="tabTitle_li" @tap="tabClick(index)"  :key="index" v-for="(item,index) in tabText">
-			<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
-			<view :class="{on:curTab==index}" class="tabTitle_across"></view>
+	<view class="examine">
+		<view class="tabTitle">
+			<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
+				<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
+				<view :class="{on:curTab==index}" class="tabTitle_across"></view>
+			</view>
 		</view>
-	  </view>
-	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
-		<view>
-			<view class="search">
-				<input type="text" v-model="getData.searchValue" placeholder="计划标题" name="search" @confirm='searchBtn'  confirm-type='search' maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
-				<view class="search_btn" v-if="getData.searchValue>0" @click="clearBtn">
-					<img src="@/pages_safetyExamine/images/clear.png"/>
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
+			<view>
+				<view class="search">
+					<input type="text" v-model="getData.searchValue" placeholder="计划标题" name="search"
+						@confirm='searchBtn' confirm-type='search' maxlength="50"
+						placeholder-style="color: #CCCCCC;font-size:26rpx;">
+					<view class="search_btn" v-if="getData.searchValue>0" @click="clearBtn">
+						<img src="@/pages_safetyExamine/images/clear.png" />
+					</view>
 				</view>
-			</view>
-			<view class="list">
-				<view class="list_li" v-for="(item,index) in  dataList" :key="index" @click="handleClick(item,'edit')">
-					<view class="list_li_t">
-						<view class="list_li_t_l">
-							<img v-if="item.checkRange==1" src="@/pages_safetyExamine/images/icon_xyxc_qx.png"/>
-							<img v-if="item.checkRange==2" src="@/pages_safetyExamine/images/icon_xyxc_xy.png"/>
-							<img v-if="item.checkRange==3" src="@/pages_safetyExamine/images/icon_xyxc_sys.png"/>
-							<text></text>
+				<view class="list">
+					<view class="list_li" v-for="(item,index) in  dataList" :key="index"
+						@click="handleClick(item,'edit')">
+						<view class="list_li_t">
+							<view class="list_li_t_l">
+								<img v-if="item.checkRange==1" src="@/pages_safetyExamine/images/icon_xyxc_qx.png" />
+								<img v-if="item.checkRange==2" src="@/pages_safetyExamine/images/icon_xyxc_xy.png" />
+								<img v-if="item.checkRange==3" src="@/pages_safetyExamine/images/icon_xyxc_sys.png" />
+								<text></text>
+							</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_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">计划周期:{{item.cycleStartTime}}至{{item.cycleEndTime}}</view>
-						<view class="list_li_m_b">
-							<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 class="list_li_m">
+							<view class="list_li_m_t">计划周期:{{item.cycleStartTime}}至{{item.cycleEndTime}}</view>
+							<view class="list_li_m_b">
+								<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="@/pages_safetyExamine/images/icon_djcsys.png" />
+							<text v-if="item.checkStatus==1">待检查实验室:</text>
+							<text v-if="item.checkStatus==1">{{item.subjectNum}}间</text>
+							<text v-if="item.checkStatus==2 || item.checkStatus==3">检查进度:</text>
+							<text v-if="item.checkStatus==2 || item.checkStatus==3">{{item.checkSchedule}}间</text>
 						</view>
-					</view>
-					<view class="list_li_b">
-						<img src="@/pages_safetyExamine/images/icon_djcsys.png"/>
-						<text v-if="item.checkStatus==1">待检查实验室:</text>
-						<text v-if="item.checkStatus==1">{{item.subjectNum}}间</text>
-						<text v-if="item.checkStatus==2 || item.checkStatus==3">检查进度:</text>
-						<text v-if="item.checkStatus==2 || item.checkStatus==3">{{item.checkSchedule}}间</text>
 					</view>
 				</view>
 			</view>
-		</view>
-		<img class="null-img" v-if="!dataList[0]" src="@/pages_safetyExamine/images/null-data-1.png">
-	</scroll-view>
-	<view class="bottom_btn" @click="handleClick('','subBtn')">{{subBtnTitle}}</view>
-  </view>
+			<img class="null-img" v-if="!dataList[0]" src="@/pages_safetyExamine/images/null-data-1.png">
+		</scroll-view>
+		<view class="bottom_btn" @click="handleClick('','subBtn')">{{subBtnTitle}}</view>
+	</view>
 
 </template>
 
 <script>
-import { config } from '@/api/request/config.js'
-import {checkPlanList} from '@/api/apiDemo/index.js'
-export default {
-  name: "rectifyList",
-  components: {
-
-  },
-  data() {
-    return {
-	  pageType:0,
-      //列表请求参数
-      getData:{
-        pageNum:1,
-        pageSize:20,
-		searchValue:'',
-		checkType:'',
-      },
-	  total:0,
-	  tabText:['全部','未开始','进行中','已结束'],
-	  curTab:0,
-	  dataList:[],
-	  subBtnTitle:'发起巡查计划',
-    }
-  },
-  onLoad(option) {
-	  console.log(option.pageType)
-	  if(option.pageType==1){
-		  this.getData.checkType=option.pageType
-		  uni.setNavigationBarTitle({
-		  		title:'校院巡查计划'
-		  })
-		  this.subBtnTitle='发起巡查计划';
-	  }else if(option.pageType==2){
-		   this.getData.checkType=option.pageType
-		  uni.setNavigationBarTitle({
-		  		title:'实验室自查计划'
-		  })
-		  this.subBtnTitle='发起自查计划';
-	  }
-
-  },
-  onShow() {
-	  this.dataList=[];
-      this.getList();
-  },
-  mounted(){
-
-  },
-
-  methods: {
-	  //实验室搜索
-	  searchBtn(){
-	  	  this.dataList=[];
-	  	  this.getList();
-	  },
-	  //清除按钮
-	  clearBtn(){
-		  this.getData.pageNum=1;
-		  this.getData.searchValue= '';
-		  this.dataList=[];
-		  this.getList();
-	  },
-	  //滚动事件
-	  scrollGet(){
-		  let self=this;
-	      if(self.total/self.getData.pageSize<=self.getData.pageNum){
-	          console.log('没有更多数据!')
-	      }else{
-			  setTimeout(function(){
-				  self.getData.pageNum += 1;
-				  self.getList();
-			  },1000)
-
-		  }
-	  },
-
-	  //顶部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_safetyExamine/views/patrolPlan/patrolPlanAdd?pageType='+this.getData.checkType
-			 });
-		  }else if(doType=='edit'){//编辑
-			  uni.navigateTo({
-			      url: '/pages_safetyExamine/views/patrolPlan/patrolPlanEdit?pageType='+row.checkType+'&id='+row.id
-			  });
-		  }
-
-	  },
-	  async getList(){
-		  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;
-		  }
-      }
-  }
-}
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		checkPlanList
+	} from '@/pages_safetyExamine/api/index.js'
+	export default {
+		name: "rectifyList",
+		components: {
+
+		},
+		data() {
+			return {
+				pageType: 0,
+				//列表请求参数
+				getData: {
+					pageNum: 1,
+					pageSize: 20,
+					searchValue: '',
+					checkType: '',
+				},
+				total: 0,
+				tabText: ['全部', '未开始', '进行中', '已结束'],
+				curTab: 0,
+				dataList: [],
+				subBtnTitle: '发起巡查计划',
+			}
+		},
+		onLoad(option) {
+			console.log(option.pageType)
+			if (option.pageType == 1) {
+				this.getData.checkType = option.pageType
+				uni.setNavigationBarTitle({
+					title: '校院巡查计划'
+				})
+				this.subBtnTitle = '发起巡查计划';
+			} else if (option.pageType == 2) {
+				this.getData.checkType = option.pageType
+				uni.setNavigationBarTitle({
+					title: '实验室自查计划'
+				})
+				this.subBtnTitle = '发起自查计划';
+			}
+
+		},
+		onShow() {
+			this.dataList = [];
+			this.getList();
+		},
+		mounted() {
+
+		},
+
+		methods: {
+			//实验室搜索
+			searchBtn() {
+				this.dataList = [];
+				this.getList();
+			},
+			//清除按钮
+			clearBtn() {
+				this.getData.pageNum = 1;
+				this.getData.searchValue = '';
+				this.dataList = [];
+				this.getList();
+			},
+			//滚动事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.getData.pageSize <= self.getData.pageNum) {
+					console.log('没有更多数据!')
+				} else {
+					setTimeout(function() {
+						self.getData.pageNum += 1;
+						self.getList();
+					}, 1000)
+
+				}
+			},
+
+			//顶部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_safetyExamine/views/patrolPlan/patrolPlanAdd?pageType=' + this.getData
+							.checkType
+					});
+				} else if (doType == 'edit') { //编辑
+					uni.navigateTo({
+						url: '/pages_safetyExamine/views/patrolPlan/patrolPlanEdit?pageType=' + row.checkType +
+							'&id=' + row.id
+					});
+				}
+
+			},
+			async getList() {
+				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;
+				}
+			}
+		}
+	}
 </script>
 
 <style lang="stylus" scoped>
-.examine{
-	height:100%;
-	display flex;
-	.null-img{
-		display block
-		width:276rpx;
-		height:321rpx;
-		margin:100rpx 0 0 274rpx;
-	}
-	.info-max-box{
-		flex: 1;
-		overflow: scroll;
-		padding-bottom: 128rpx;
-		padding-top: 100rpx;
-	}
-	.blue_color{
-		color: #0183FA;
-		border: 1rpx solid #0183FA;
-	}
-	.red_color{
-		color: #FF4545;
-		border: 1rpx solid #FF4545;
-	}
-	.green_color{
-		color: #1FA50D;
-		border: 1rpx solid #1FA50D;
-	}
-	/* 切换按钮 */
-	.tabTitle{
-		width:100%;
-		height: 100rpx;
-		background: #fff;
+	.examine {
+		height: 100%;
 		display flex;
-		justify-content: flex-start;
-		align-items: center;
-		position: fixed;
-		top: 0;
-		z-index: 100;
-		.tabTitle_li{
-			position: relative;
-			width:146rpx;
-			text-align center;
-			.tabTitle_text{
-				display: inline-block;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-				line-height: 46rpx;
+
+		.null-img {
+			display block;
+			 width: 276rpx;
+			height: 321rpx;
+			margin: 100rpx 0 0 274rpx;
+		}
+
+		.info-max-box {
+			flex: 1;
+			overflow: scroll;
+			padding-bottom: 128rpx;
+			padding-top: 100rpx;
+		}
+
+		.blue_color {
+			color: #0183FA;
+			border: 1rpx solid #0183FA;
+		}
+
+		.red_color {
+			color: #FF4545;
+			border: 1rpx solid #FF4545;
+		}
+
+		.green_color {
+			color: #1FA50D;
+			border: 1rpx solid #1FA50D;
+		}
+
+		/* 切换按钮 */
+		.tabTitle {
+			width: 100%;
+			height: 100rpx;
+			background: #fff;
+			display flex;
+			justify-content: flex-start;
+			align-items: center;
+			position: fixed;
+			top: 0;
+			z-index: 100;
+
+			.tabTitle_li {
 				position: relative;
-				&.on{
-					color:#0183FA;
+				width: 146rpx;
+				text-align center;
+
+				.tabTitle_text {
+					display: inline-block;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 46rpx;
+					position: relative;
+
+					&.on {
+						color: #0183FA;
+					}
 				}
-			}
-			.tabTitle_across{
-				width: 50rpx;
-				height: 4rpx;
-				background: #0183FA;
-				border-radius: 2rpx;
-				margin-left: 46rpx;
-				display none;
-				&.on{
-					display block;
+
+				.tabTitle_across {
+					width: 50rpx;
+					height: 4rpx;
+					background: #0183FA;
+					border-radius: 2rpx;
+					margin-left: 46rpx;
+					display none;
+
+					&.on {
+						display block;
+					}
 				}
-			}
 
+			}
 		}
-	}
-	.search{
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
-		padding: 20rpx 30rpx;
-		box-sizing: border-box;
-		position: relative;
-		margin-top: 20rpx;
-		>input{
-			position: absolute;
-			top: 20rpx;
-			left: 30rpx;
-			width: 690rpx;
-			height: 60rpx;
-			border-radius: 50rpx;
-			opacity: 1;
-			border: 1rpx solid #E0E0E0;
-			padding:0  74rpx 0 30rpx;
+
+		.search {
+			width: 750rpx;
+			height: 100rpx;
+			background: #FFFFFF;
+			padding: 20rpx 30rpx;
 			box-sizing: border-box;
-		}
-		.search_btn{
-			width: 70rpx;
-			height: 60rpx;
-			position: absolute;
-			top: 20rpx;
-			right: 30rpx;
-			z-index: 200;
-			>img{
-				width: 20rpx;
-				height: 20rpx;
+			position: relative;
+			margin-top: 20rpx;
+
+			>input {
 				position: absolute;
 				top: 20rpx;
-				left: 24rpx;
+				left: 30rpx;
+				width: 690rpx;
+				height: 60rpx;
+				border-radius: 50rpx;
+				opacity: 1;
+				border: 1rpx solid #E0E0E0;
+				padding: 0 74rpx 0 30rpx;
+				box-sizing: border-box;
 			}
-		}
-	}
-	.list{
-		padding: 0 30rpx;
-		box-sizing: border-box;
-		margin-top: 20rpx;
-		.list_li{
-			position: relative;
-			width: 690rpx;
-			height: 360rpx;
-			background: #fff;
-			border-radius: 10rpx;
-			overflow: hidden;
-			margin-bottom: 20rpx;
-			.list_li_t{
-				width: 100%;
+
+			.search_btn {
+				width: 70rpx;
+				height: 60rpx;
 				position: absolute;
-				left: 0;
-				top: 0;
-				.list_li_t_l{
-					>img{
-						width: 70rpx;
-						height: 70rpx;
+				top: 20rpx;
+				right: 30rpx;
+				z-index: 200;
+
+				>img {
+					width: 20rpx;
+					height: 20rpx;
+					position: absolute;
+					top: 20rpx;
+					left: 24rpx;
+				}
+			}
+		}
+
+		.list {
+			padding: 0 30rpx;
+			box-sizing: border-box;
+			margin-top: 20rpx;
+
+			.list_li {
+				position: relative;
+				width: 690rpx;
+				height: 360rpx;
+				background: #fff;
+				border-radius: 10rpx;
+				overflow: hidden;
+				margin-bottom: 20rpx;
+
+				.list_li_t {
+					width: 100%;
+					position: absolute;
+					left: 0;
+					top: 0;
+
+					.list_li_t_l {
+						>img {
+							width: 70rpx;
+							height: 70rpx;
+						}
+
+						>text {
+							position: absolute;
+							left: -15rpx;
+							top: 76rpx;
+							display: inline-block;
+							width: 30rpx;
+							height: 30rpx;
+							background: #F5F5F5;
+							border-radius: 15rpx;
+						}
 					}
-					>text{
+
+					.list_li_t_c {
+						width: 570rpx;
+						height: 110rpx;
 						position: absolute;
-						left: -15rpx;
+						left: 30rpx;
+						top: 0;
+						font-size: 30rpx;
+						font-family: PingFang SC-Medium, PingFang SC;
+						font-weight: 400;
+						color: #333333;
+						line-height: 110rpx;
+						border-bottom: 1rpx dashed #D8D8D8;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						white-space: nowrap;
+						padding-right: 60rpx;
+						box-sizing: border-box;
+					}
+
+					.list_li_t_c2 {
+						position: absolute;
+						right: 20rpx;
+						top: 38rpx;
+						width: 120rpx;
+						height: 40rpx;
+						font-size: 28rpx;
+						font-family: PingFang SC-Medium, PingFang SC;
+						font-weight: 400;
+						color: #FF5757;
+						line-height: 40rpx;
+						border: 1rpx solid #FF5757;
+						border-radius: 6rpx;
+						text-align: center;
+					}
+
+					.list_li_t_r {
+						position: absolute;
+						right: -15rpx;
 						top: 76rpx;
-						display: inline-block;
 						width: 30rpx;
 						height: 30rpx;
 						background: #F5F5F5;
 						border-radius: 15rpx;
 					}
 				}
-				.list_li_t_c{
-					width: 570rpx;
-					height: 110rpx;
+
+				.list_li_m {
 					position: absolute;
-					left: 30rpx;
-					top: 0;
-					font-size: 30rpx;
-					font-family: PingFang SC-Medium, PingFang SC;
-					font-weight: 400;
-					color: #333333;
-					line-height: 110rpx;
-					border-bottom: 1rpx dashed #D8D8D8;
-					overflow: hidden;
-					text-overflow:ellipsis;
-					white-space: nowrap;
-					padding-right: 60rpx;
+					top: 110rpx;
+					left: 0;
+					width: 690rpx;
+					height: 168rpx;
+					border-bottom: 1rpx solid #E0E0E0;
+					padding-left: 30rpx;
 					box-sizing: border-box;
+
+					.list_li_m_t {
+						font-size: 28rpx;
+						font-family: PingFang SC-Medium, PingFang SC;
+						font-weight: 400;
+						color: #666666;
+						line-height: 40rpx;
+						margin-top: 22rpx;
+					}
+
+					.list_li_m_b {
+						margin-top: 26rpx;
+
+						>text:nth-of-type(1) {
+							font-size: 26rpx;
+							font-family: PingFang SC-Medium, PingFang SC;
+							font-weight: 400;
+							line-height: 40rpx;
+							border-radius: 6rpx;
+							padding: 0 20rpx;
+							margin-right: 14rpx;
+						}
+
+						>text:nth-of-type(2) {
+							font-size: 26rpx;
+							font-family: PingFang SC-Medium, PingFang SC;
+							font-weight: 400;
+							color: #0183FA;
+							line-height: 40rpx;
+							padding: 0 8rpx;
+							border-radius: 6rpx;
+							background: rgba(1, 131, 250, 0.1);
+						}
+					}
 				}
-				.list_li_t_c2{
-					position: absolute;
-					right: 20rpx;
-					top: 38rpx;
-					width: 120rpx;
-					height: 40rpx;
-					font-size: 28rpx;
-					font-family: PingFang SC-Medium, PingFang SC;
-					font-weight: 400;
-					color: #FF5757;
-					line-height: 40rpx;
-					border: 1rpx solid #FF5757;
-					border-radius: 6rpx;
-					text-align: center;
-				}
-				.list_li_t_r{
+
+				.list_li_b {
+					height: 80rpx;
 					position: absolute;
-					right:-15rpx;
-					top: 76rpx;
-					width: 30rpx;
-					height: 30rpx;
-					background:#F5F5F5;
-					border-radius: 15rpx;
-				}
-			}
-			.list_li_m{
-				position: absolute;
-				top: 110rpx;
-				left: 0;
-				width: 690rpx;
-				height: 168rpx;
-				border-bottom: 1rpx solid #E0E0E0;
-				padding-left: 30rpx;
-				box-sizing: border-box;
-				.list_li_m_t{
-					font-size: 28rpx;
-					font-family: PingFang SC-Medium, PingFang SC;
-					font-weight: 400;
-					color: #666666;
-					line-height: 40rpx;
-					margin-top:22rpx;
-				}
-				.list_li_m_b{
-					margin-top:26rpx;
-					>text:nth-of-type(1){
-						font-size: 26rpx;
+					top: 278rpx;
+					left: 0;
+					display: flex;
+					justify-content: flex-start;
+					align-items: center;
+
+					>img {
+						width: 24rpx;
+						height: 30rpx;
+						margin-right: 26rpx;
+						margin-left: 30rpx;
+					}
+
+					>text:nth-of-type(1) {
+						font-size: 28rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
 						font-weight: 400;
-						line-height: 40rpx;
-						border-radius: 6rpx;
-						padding: 0 20rpx;
-						margin-right: 14rpx;
+						color: #333333;
+						line-height: 28rpx;
 					}
-					>text:nth-of-type(2){
-						font-size: 26rpx;
+
+					>text:nth-of-type(2) {
+						font-size: 28rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
 						font-weight: 400;
 						color: #0183FA;
-						line-height: 40rpx;
-						padding: 0 8rpx;
-						border-radius: 6rpx;
-						background: rgba(1,131,250,0.1);
+						line-height: 28rpx;
 					}
 				}
 			}
-			.list_li_b{
-				height: 80rpx;
-				position: absolute;
-				top: 278rpx;
-				left: 0;
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				>img{
-					width: 24rpx;
-					height: 30rpx;
-					margin-right: 26rpx;
-					margin-left: 30rpx;
-				}
-				>text:nth-of-type(1){
-					font-size: 28rpx;
-					font-family: PingFang SC-Medium, PingFang SC;
-					font-weight: 400;
-					color: #333333;
-					line-height: 28rpx;
-				}
-				>text:nth-of-type(2){
-					font-size: 28rpx;
-					font-family: PingFang SC-Medium, PingFang SC;
-					font-weight: 400;
-					color: #0183FA;
-					line-height: 28rpx;
-				}
-			}
 		}
-	}
 
-	.bottom_btn{
-		position: fixed;
-		bottom: 26rpx;
-		left: 30rpx;
-		font-size: 30rpx;
-		font-family: PingFang SC-Medium, PingFang SC;
-		font-weight: 400;
-		color: #FFFFFF;
-		line-height: 90rpx;
-		width: 690rpx;
-		height: 90rpx;
-		background: #0183FA;
-		border-radius: 20rpx;
-		text-align: center;
+		.bottom_btn {
+			position: fixed;
+			bottom: 26rpx;
+			left: 30rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC-Medium, PingFang SC;
+			font-weight: 400;
+			color: #FFFFFF;
+			line-height: 90rpx;
+			width: 690rpx;
+			height: 90rpx;
+			background: #0183FA;
+			border-radius: 20rpx;
+			text-align: center;
+
+		}
 
 	}
-
-}
 </style>