heyang 2 anni fa
parent
commit
6b2823f872

+ 100 - 18
api/index.js

@@ -4,6 +4,14 @@ import { apiResquestJsonList } from './request/request.js'
 import { apiResquestFormVideo } from './request/request.js'
 import { apiResquestTimer } from './request/request.js'
 //3.3.3安全检查--------------------------------
+//数据统计
+export const dataStatistics  = (data) => {
+    return apiResquest({
+        url: `/security/DataStatistics/countApp`,
+        method: 'GET',
+        data: data,
+    })
+};
 //巡查计划--添加
 export const checkPlanAdd  = (data) => {
     return apiResquest({
@@ -143,16 +151,48 @@ export const subjectList = (data) => {
     })
 };
 
-//开展检查-------------------------------------------	
+//开展检查-------------------------------------------
+//开展检查-获取巡查计划管理列表
+export const checkManageList  = (data) => {
+	return apiResquest({
+		url: `/zd-security/checkManage/list`,
+		method: 'POST',
+		data: {...data}
+	})
+};
+//开展检查-安全隐患列表(在开展检查列表里待复核)
+export const checkHazardList = (data) => {
+    return apiResquestForm({
+        url: '/security/checkHazard/list',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查-通过id查询巡查管理
+export const findCheckManage = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/checkManage/findCheckManage',
+        method: 'GET',
+        data: data
+    })
+};
 
 //开展检查--新增
-export const checkOptionAdd  = (data) => {
+export const checkManageAdd  = (data) => {
     return apiResquest({
-        url: `/security/checkOption/add`,
-        method: 'POST',
+        url: `/zd-security/checkManage/update`,
+        method: 'PUT',
         data: {...data}
     })
 };
+//项目检查库-树状列表
+export const checkOptionListNew = (data) => {
+    return apiResquestForm({
+        url: '/zd-security/checkOption/list',
+        method: 'GET',
+		data: data
+    })
+};
 //开展检查-根据实验室id查询该实验室有关计划
 export const getCheckPlanBySubId = (data) => {
     return apiResquestForm({
@@ -161,6 +201,62 @@ export const getCheckPlanBySubId = (data) => {
         data: data
     })
 };
+//问题整改重大项-判断是否上传签名
+export const checkSign = (data) => {
+    return apiResquestForm({
+        url: '/laboratory/checkRecord/checkSign',
+        method: 'GET',
+    })
+};
+
+//问题整改重大项-判断是否上传电子签章
+export const queryDeptSignByUserId = (data) => {
+    return apiResquestForm({
+        url: '/base/app/sysuser/api/queryDeptSignByUserId',
+        method: 'GET',
+    })
+};
+//安全隐患---------------------------------------------------------------
+//开展检查-安全隐患列表
+export const checkHazardAppList = (data) => {
+    return apiResquestForm({
+        url: '/security/checkHazard/appList',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查-安全隐患详情
+export const getHazardById = (data) => {
+    return apiResquestForm({
+        url: '/security/checkHazard/getHazardById',
+        method: 'GET',
+        data: data
+    })
+};
+//开展检查-获取巡查计划管理列表
+export const checkHazardAdd  = (data) => {
+	return apiResquest({
+		url: `/security/checkRectify/addOrApprove`,
+		method: 'POST',
+		data: {...data}
+	})
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
@@ -1548,21 +1644,7 @@ export function checkRecordUpdate(data) {
         data: {...data}
     })
 }
-//问题整改重大项-判断是否上传签名
-export const checkSign = (data) => {
-    return apiResquestForm({
-        url: '/laboratory/checkRecord/checkSign',
-        method: 'GET',
-    })
-};
 
-//问题整改重大项-判断是否上传电子签章
-export const queryDeptSignByUserId = (data) => {
-    return apiResquestForm({
-        url: '/base/app/sysuser/api/queryDeptSignByUserId ',
-        method: 'GET',
-    })
-};
 
 
 //获取检查单位

+ 2 - 2
api/request/config.js

@@ -1,5 +1,5 @@
 const config = {
-	//base_url: 'http://192.168.1.9:8080',//柴
+	base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.7:8080',//刘波
 	 //base_url: 'http://192.168.1.17:8080',//小飞
 	 //base_url: 'http://192.168.1.20:8080',//志伟
@@ -9,7 +9,7 @@ const config = {
 	// base_url: 'https://demo.sxitdlc.com/xzgd/',
 
 	// base_url: 'https://lab.sxitdlc.com/labNhSystem/',//43服务器高升测试
-	base_url: 'https://lab.sxitdlc.com/labAppTest/',//43服务器线上
+	//base_url: 'https://lab.sxitdlc.com/labAppTest/',//43服务器线上
     // base_url: 'https://lab.sxitdlc.com/appTest/',//88服务器线上
 	// base_url: 'https://lab.sxitdlc.com/labSystem/', //矿大地址
       // base_url: 'https://lab.sxitdlc.com/labSaasSystem/', //矿大化工

+ 7 - 7
pages.json

@@ -2,6 +2,12 @@
 	"pages": [
 		
 	
+	{
+		"path": "pages/pages_safetyExamine/dangerManage/dangerManage",
+		"style": {
+			"navigationBarTitleText": "隐患整改"
+		}
+	},
 		
 		{
 			"path": "pages/safetyExamineWorkbench",//安全检查
@@ -72,12 +78,7 @@
 				"navigationBarTitleText": "校院巡查管理"
 			}
 		},
-		{
-			"path": "pages/pages_safetyExamine/dangerManage/dangerManage",
-			"style": {
-				"navigationBarTitleText": "隐患整改"
-			}
-		},
+		
 		{
 			"path": "pages/pages_safetyExamine/dangerManage/dangerList",
 			"style": {
@@ -132,7 +133,6 @@
 				"navigationBarBackgroundColor": "#0183FA" //导航背景色
 			}
 		},
-
 		{
 			"path": "pages/supplierWorkbench",
 			"style": {

+ 230 - 109
pages/pages_safetyExamine/dangerManage/dangerDetail.vue

@@ -3,106 +3,139 @@
   <view class="examine">
 	<scroll-view scroll-x @scrolltolower="scrollGet"  class="header">
 		<view class="tabTitle_tow">
-			<view class="tabTitle_tow_li" @tap="tabClickTow(index)"  :key="index" v-for="(item,index) in tabTextTow">
-				<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item}}</view>
+			<view class="tabTitle_tow_li" @tap="tabClickTow(item,index)"  :key="index" v-for="(item,index) in tabTextTow">
+				<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
 				<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
 			</view>
 		</view>
 	</scroll-view>
 	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 		<!-- 隐患检查 -->
-		<view v-if="pageType==0">
+		<view v-if="curTabIndex=='detail'">
 			<view class="basics">
 				<view class="basics_li">
 					<text>学院:</text>
-					<text>环测学院</text>
+					<text>{{infoData.collegeName}}</text>
 				</view>
 				<view class="basics_li">
 					<text>实验室:</text>
-					<text>实验室名称-房间号</text>	
+					<text>{{infoData.subjectName}}-{{infoData.roomNumber}}</text>	
 				</view>
 				<view class="basics_li">
 					<text>楼栋:</text>
-					<text>楼栋名称</text>
+					<text>{{infoData.subjectName}}</text>
 				</view>
 				<view class="basics_li">
 					<text>检查类型:</text>
-					<text>校级巡查</text>
+					<text>{{infoData.checkType==1?'校园巡查':(infoData.checkType==2?'实验室自查':'')}}</text>
 				</view>
 				<view class="basics_li">
 					<text>检查范围:</text>
-					<text>全校</text>
+					<text>{{infoData.checkRange==1?'全校':(infoData.checkRange==2?'学院':'实验室')}}</text>
 				</view>
 				<view class="basics_li" style="border:none;">
 					<text>检查计划:</text>
-					<text>2023年3月份校级督导检查</text>
-				</view>
-			</view>
-			<view class="attachment">
-				<view class="attachment_t">
-					<text>材料附件</text>
-					<text>点击文件标题查看</text>
-				</view>
-				<view class="attachment_li">
-					<img src="@/images/Version3.3.3/icon_djc_wj.png"/>
-					<text>文件标题文件标题</text>
-					<img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
+					<text>{{infoData.title}}</text>
 				</view>
 			</view>
 			<view class="basics">
 				<view class="basics_li">
 					<text>检查结果:</text>
-					<text>不符合</text>
+					<text>{{infoData.checkResult==0?'不符合':(infoData.checkResult==1?'符合':'')}}</text>
 				</view>
 				<view class="basics_li">
 					<text>整改期限:</text>
-					<text>2023-04-06</text>	
+					<text>{{infoData.rectifyDeadline}}</text>	
 				</view>	
 				<view class="basics_li">
 					<text>整改通知:</text>
-					<text style="color: #0183FA;">整改告知书</text>
+					<text style="color: #0183FA;">{{infoData.rectifyNotice == 1?'整改告知书':(infoData.rectifyNotice == 2?'整改通知书':'')}}</text>
 				</view>
 				<view class="basics_li">
 					<text>检查者:</text>
-					<text>管理员</text>
+					<text>{{infoData.checkUser}}</text>
 				</view>
 				<view class="basics_li" style="border:none;">
 					<text>检查时间:</text>
-					<text>2023-04-06</text>
+					<text>{{infoData.checkTime}}</text>
 				</view>
 			</view>
 			<view class="danger">
 				<view class="danger_title">不符合项</view>
 				<view class="grade">
 					<text>隐患等级:</text>
-					<text>一般隐患</text>
+					<text>{{infoData.checkHazardApplyDto.hazardLevel==0?'一般隐患':(infoData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoData.checkHazardApplyDto.hazardLevel==2?'管理问题':''))}}</text>
 				</view>
 				<view class="project">
 					<view class="project_t">检查项目:</view>
-					<view class="project_b">1检查项目名称—1.1检查项目名称名称名称名称—1.1.1检查项目名称名称名称名称名称名称名称名称</view>
-					<view class="project_b2">此检查项在当前实验室累计出现9次隐患</view>
+					<view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckProStr}}</view>
+					<view class="project_b2" v-if="infoData.checkHazardApplyDto.hazardCheckCount>0">此检查项在当前实验室累计出现{{infoData.checkHazardApplyDto.hazardCheckCount}}次隐患</view>
 				</view>
 				<view class="project">
 					<view class="project_t">检查要点:</view>
-					<view class="project_b">检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点</view>
+					<view class="project_b">{{infoData.checkHazardApplyDto.hazardCheckPoint}}</view>
 				</view>
 				<view class="project">
 					<view class="project_t">隐患描述:</view>
-					<view class="project_b">检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点检查要点</view>
+					<view class="project_b">{{infoDialogData.checkHazardApplyDto.hazardDescribe}}</view>
 				</view>
 				<view class="picture">
 					<view class="picture_t">隐患照片</view>
 					<view class="picture_b">
-						<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-						<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-						<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-						<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
+						<img  :src="imgItem.fileUrl"  v-for="(imgItem,index) in infoData.checkHazardApplyDto.uploadDtoList" :key="index"  @click="lockImg(infoData.checkHazardApplyDto.uploadDtoList)"/>
 					</view>
 				</view>
 			</view>
 		</view>
+		<view v-for="(item,index) in infoData.checkRectifyApplyList" :key="index" v-if="curTabIndex== index">
+		    <!-- 整改结果 -->
+			<view v-if="item.applyFlag == 1" class="abarbeitung_result danger">
+				<view class="grade">
+					<text>整改结果:</text>
+					<text style="color: #0183FA;">{{item.rectifyResult == 1?'已整改':(item.rectifyResult == 0?'暂无法整改':'')}}</text>
+				</view>
+				<view class="project">
+					<view class="project_t">整改措施:</view>
+					<view class="project_b">{{item.rectifyMeasure}}</view>
+				</view>
+				<view class="picture">
+					<view class="picture_t">整改照片:</view>
+					<view class="picture_b">
+						<img :src="imgItem.fileUrl" @click="lockImg(imgItem)" v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
+					</view>
+				</view>
+				<view class="grade">
+					<text>整改人:</text>
+					<text>{{item.createName}}</text>
+				</view>
+				<view class="grade" style="border:none;">
+					<text>整改时间:</text>
+					<text >{{item.createTime}}</text>
+				</view>
+			</view>
+			<!-- 复核结果 -->
+			<view v-if="item.applyFlag == 2" class="review_result danger">
+				<view class="audit">
+					<text>审核结果:</text>
+					<img v-if="item.examineResult == 0" src="@/images/Version3.3.3/icon_ywc.png"/>
+					<img v-if="item.examineResult == 1" src="@/images/Version3.3.3/icon_cg.png"/>
+				</view>
+				<view class="project">
+					<view class="project_t">审核意见:</view>
+					<view class="project_b">{{item.examineOpinion}}</view>
+				</view>
+				<view class="grade">
+					<text>审核人:</text>
+					<text>{{item.reviewedName}}</text>
+				</view>
+				<view class="grade" style="border:none;">
+					<text>审核时间:</text>
+					<text >{{item.reviewedTime}}</text>
+				</view>
+			</view>
+		</view>
 		<!-- 待整改 -->
-		<view v-if="pageType==1">
+		<view v-if="rectifyStatus==2 && curTabIndex=='add'">
 			<view class="await">
 				<view class="result">
 					<view class="result_l">整改结果</view>
@@ -114,26 +147,26 @@
 					</view>
 				</view>
 				<view class="describe">
-					<view class="describe_l">原因描述:</view>
-					<textarea class="describe_r" type="text" v-model="form.yhMs" maxlength="50" placeholder="请输入原因描述" placeholder-style="font-size:28rpx;color:#999;"></textarea>
+					<view class="describe_l">{{form.rectifyResult==1?'整改措施:':'原因描述:'}}</view>
+					<textarea class="describe_r" type="text" v-model="form.rectifyMeasure" maxlength="50" placeholder="请输入原因描述" placeholder-style="font-size:28rpx;color:#999;"></textarea>
 				</view>
 				<view class="check-for-img-max-box">
 					<view class="left-title-p">隐患照片(最多上传5张):</view>
 					<view class="right-img-box">
-						<view class="img-box" v-for="(imgUrl,imgIndex) in form.yhImg" :key="imgIndex">
+						<view class="img-box" v-for="(imgUrl,imgIndex) in form.uploadDtoList" :key="imgIndex">
 							<img class="img-data" :src="configURL+imgUrl">
 							<img class="position-img" src="@/pages_manage/images/icon_ssp_closure.png" @click="delImg(imgIndex)">
 						</view>
-						<img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage()" v-if="form.yhImg.length<5">
+						<img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage()" v-if="form.uploadDtoList.length<5">
 					</view>
 				</view>
 			</view>
 		</view>
 		<!-- 待复核 -->
-		<view v-if="pageType==2" class="review">
+		<view v-if="rectifyStatus==3 && curTabIndex=='check'" class="review">
 			<view class="describe">
 				<view class="describe_l">审核意见:</view>
-				<textarea class="describe_r" type="text" v-model="form.opinion" maxlength="50" placeholder="请输入审核意见" placeholder-style="font-size:28rpx;color:#999;"></textarea>
+				<textarea class="describe_r" type="text" v-model="form.examineOpinion" maxlength="50" placeholder="请输入审核意见" placeholder-style="font-size:28rpx;color:#999;"></textarea>
 			</view>
 			<view class="quick">
 				<view class="quick_l">审核意见快捷输入</view>
@@ -143,7 +176,7 @@
 			</view>
 		</view>
 		<!-- 暂无法整改 -->
-		<view v-if="pageType==3" class="incapable danger">
+		<view v-if="rectifyStatus==4" class="incapable danger">
 			<view class="grade">
 				<text>整改结果:</text>
 				<text style="color: #0183FA;">暂无法整改</text>
@@ -170,58 +203,13 @@
 				<text >2023-04-0114:00</text>
 			</view>
 		</view>
-		<!-- 整改结果 -->
-		<view v-if="pageType==4" class="abarbeitung_result danger">
-			<view class="grade">
-				<text>整改结果:</text>
-				<text style="color: #0183FA;">已整改</text>
-			</view>
-			<view class="project">
-				<view class="project_t">整改措施:</view>
-				<view class="project_b">已更换电池</view>
-			</view>
-			<view class="picture">
-				<view class="picture_t">隐患照片:</view>
-				<view class="picture_b">
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-					<img  src="@/images/Version3.3.3/icon_xyxc_syszc.png"/>
-				</view>
-			</view>
-			<view class="grade">
-				<text>整改人:</text>
-				<text>褚朝朝</text>
-			</view>
-			<view class="grade" style="border:none;">
-				<text>整改时间:</text>
-				<text >2023-04-0114:00</text>
-			</view>
-		</view>
-		<!-- 复核结果 -->
-		<view v-if="pageType==5" class="review_result danger">
-			<view class="audit">
-				<text>审核结果:</text>
-				<img  src="@/images/Version3.3.3/icon_cg.png"/>
-			</view>
-			<view class="project">
-				<view class="project_t">审核意见:</view>
-				<view class="project_b">整改不合格</view>
-			</view>
-			<view class="grade">
-				<text>整改人:</text>
-				<text>褚朝朝</text>
-			</view>
-			<view class="grade" style="border:none;">
-				<text>整改时间:</text>
-				<text >2023-04-0114:00</text>
-			</view>
-		</view>
+		
+	
 	</scroll-view>
-	<view class="bottom_btn" @click="handleClick('subBtn')" v-if="pageType==1">提交</view>
-	<view class="bottom_btn_tow" v-if="pageType==2">
-		<text>驳回</text>
-		<text>通过</text>
+	<view class="bottom_btn" @click="submitForm('rectify')" v-if="rectifyStatus==2">提交</view>
+	<view class="bottom_btn_tow" v-if="rectifyStatus==3">
+		<text @click="submitForm('pass')">驳回</text>
+		<text @click="submitForm('reject')">通过</text>
 	</view>
   </view>
 
@@ -229,7 +217,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {getHazardById,checkHazardAdd} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -237,6 +225,7 @@ export default {
   },
   data() {
     return {
+		id:'',
 		pageType:0,
 		configURL:config.base_url,
 		//列表请求参数
@@ -244,25 +233,37 @@ export default {
 		 pageNum:1,
 		 pageSize:20,
 		},
-		tabTextTow:['隐患检查','隐患整改','整改复核','暂无法整改','整改结果','复核结果'],
+		tabTextTow:[],
 		curTabTow:0,
+		curTabIndex:'detail',//随顶部按钮点击变化索引
 		resultIndex:0,
 		resultArray:['已整改','暂无法整改'],
 		form:{
-			yhMs:'',
-			yhImg:[],
-			opinion:'',
+			checkHazardId:'',// 隐患id
+			rectifyType:'',// 整改类型:1是院校巡查,2是自查
+			rectifyResult:'1',//1是已整改,0是暂无法整改
+			rectifyMeasure:'',//整改措施
+			uploadDtoList:[],
+			//复核---------------
+			id:'',
+			examineResult:'',//审核结果1是通过,0是驳回
+			examineOpinion:'',
 		},
 		quickIndex:0,
 		quickArray:[{name:'复核驳回',type:false},{name:'驳回在整改',type:false},{name:'请补充材料',type:false},{name:'请补充描述',type:false},{name:'未解决',type:false}],
-		
+		infoData:{},
+		item:{},
+		rectifyStatus:'',//1已完成 2待整改 3待复核 4 暂无法整改
 		
 	}
   },
   onLoad(option) {
-	 if(option.form){
-		//this.form=JSON.parse(decodeURIComponent(option.form)); 
-		//console.log(this.form)
+	 if(option.item){
+		 this.item=JSON.parse(decodeURIComponent(option.item)); 
+		 this.id=this.item.id
+		 this.rectifyStatus=this.item.rectifyStatus;
+		 
+		 this.getHazardById()
 	 }
   },
   onShow() {
@@ -275,11 +276,80 @@ export default {
 	    //整改结果
 	    tabClick(index) {
 	  	  this.resultIndex = index;
+		  if(index==0){
+			  this.form.resultArray=1
+		  }else if(idnex==1){
+			  this.form.resultArray=0
+		  }
 	    },
 		//顶部tab点击
-		tabClickTow(index) {
+		tabClickTow(item,index) {
 			this.curTabTow = index;
 			this.pageType=index;
+			if(item.type=='detail' || item.type=='add' || item.type=='check'){
+				this.curTabIndex=item.type
+			}else{
+				this.curTabIndex=index-1;
+			}
+			console.log(this.curTabIndex)
+			
+		},
+		//详情
+		async getHazardById(){
+			let _this = this;
+			const {data} = await getHazardById({id:this.id});
+			if(data.code == 200){
+					this.infoData=data.data
+					this.form.checkHazardId=data.data.checkHazardApplyDto.id;
+					this.form.rectifyType=data.data.checkType;
+					
+					if(data.data.checkRectifyApplyList[0]){
+						this.tabTextTow.push({'type':'detail','name':'隐患检查'})
+						for(let i=0;i<data.data.checkRectifyApplyList.length;i++){
+							if(i == 0){
+							  this.tabTextTow.push({'type':'item','name':'隐患整改'})
+							}else if(i == 1){
+							  this.tabTextTow.push({'type':'item','name':'整改复核'})
+							}else{
+							  let nameLeft = this.frequencyCalculation(i,data.data.checkRectifyApplyList[i].applyFlag);
+							  let nameRight = data.data.checkRectifyApplyList[i].applyFlag == 1?'整改':'复核';
+							  this.tabTextTow.push({'type':'item','name':nameLeft+nameRight})
+							}
+						}
+						if(this.rectifyStatus==3){
+						  this.tabTextTow.push({'type':'check','name':'整改复核'})
+						}
+					}else{
+						if(this.rectifyStatus==2){
+						  this.tabTextTow=[{'type':'detail','name':'隐患检查'},{'type':'add','name':'隐患整改'}]
+						}
+					}
+					
+			}
+		},
+		//多次名称匹配
+		frequencyCalculation(length,type){
+			console.log(length)
+			console.log(type)
+			let textList = [
+			  {value:'二次',key:'2'},{value:'三次',key:'3'},{value:'四次',key:'4'},{value:'五次',key:'5'}, {value:'六次',key:'6'}, {value:'七次',key:'7'},
+			  {value:'八次',key:'8'},{value:'九次',key:'9'},{value:'十次',key:'10'}
+			]
+			let num = type === 2?Math.ceil(length/2):Math.floor(length/2)
+			if(type == 1){
+			  num++
+			}
+			if (num > 10){
+			  return '再次'
+			} else{
+			  for(let i=0;i<textList.length;i++){
+				if(num == textList[i].key){
+				  return textList[i].value
+				  console.log(textList[i].value)
+				}
+			  }
+			}
+			
 		},
 		//滚动事件
 		scrollGet(){},
@@ -289,10 +359,28 @@ export default {
 			  console.log(11)
 		  }
 	    },
+		//查看图片
+		lockImg(list){
+			console.log(list)
+			if(!list[0]){
+				return
+			}
+			let urlList=[];
+			for(let i=0;i<list.length;i++){
+				urlList.push(list[i].fileUrl)
+			}
+			wx.previewImage({
+				urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
+				current: '', // 当前显示图片的http链接,默认是第一个
+				success: function(res) {},
+				fail: function(res) {},
+				complete: function(res) {},
+			})
+		},
 		//快捷选择
 		quickSelect(index) {
 		      this.quickArray[index].type = !this.quickArray[index].type
-			  this.form.opinion=this.quickArray[index].name
+			  this.form.examineOpinion=this.quickArray[index].name
 		      let _this = this;
 		      if (_this.quickArray[index].type == true) {
 		        _this.quickArray.forEach(function(item2) {
@@ -303,13 +391,13 @@ export default {
 		          }
 		        })
 		      }else{
-				  this.form.opinion='';
+				  this.form.examineOpinion='';
 			  }
 		    },
 		// 图片上传
 		selectImage(item) {
 		    let self = this;
-		    if(this.form.yhImg.length>4){
+		    if(this.form.uploadDtoList.length>4){
 		        uni.showToast({
 		            title: '最多上传5张图片',
 		            icon:"none",
@@ -345,8 +433,7 @@ export default {
 		        success: (uploadFileRes) => {
 		            let res = JSON.parse(uploadFileRes.data);
 					if(res.code == 200){
-						this.form.yhImg.push(res.data.url);
-						console.log(res.data.url)
+						this.form.uploadDtoList.push({'fileUrl':res.data.url,'fileName':res.data.name});
 					}else{
 						uni.showToast({
 							title: res.msg,
@@ -364,9 +451,40 @@ export default {
 		},
 		//删除图片
 		delImg(minIndex){
-		    this.form.yhImg.splice(minIndex,1);
+		    this.form.uploadDtoList.splice(minIndex,1);
 			this.$forceUpdate();
 		},
+		
+		async submitForm(doType){
+			let _this = this;
+			let obj={};
+			if(doType=='rectify'){//整改
+				obj.checkHazardId=this.form.checkHazardId;
+				obj.rectifyType=this.form.rectifyType;
+				obj.rectifyResult=this.form.rectifyResult;
+				obj.rectifyMeasure=this.form.rectifyMeasure;
+				obj.uploadDtoList=this.form.uploadDtoList;
+			}else if(doType=='reject' ){//复核 驳回
+				obj.id=this.form.id;
+				obj.examineResult=0;
+				obj.examineOpinion=this.form.examineOpinion;
+				
+			}else if(doType=='pass'){//复核 通过
+				obj.id=this.form.id;
+				obj.examineResult=1;
+				obj.examineOpinion=this.form.examineOpinion;
+			}
+			const {data} = await checkHazardAdd(obj);
+			if(data.code == 200){
+			    uni.showToast({
+			        title: '提交成功',
+			        icon:"none",
+			        mask:true,
+			        duration: 2000
+			    });
+			   
+			}
+		},
 	  
   }
 }
@@ -464,6 +582,9 @@ export default {
 				color: #333333;
 				line-height: 80rpx;
 				text-align: right;
+				white-space: nowrap;
+			    overflow: hidden;
+			    text-overflow: ellipsis;
 			}
 		}
 	}

+ 119 - 48
pages/pages_safetyExamine/dangerManage/dangerManage.vue

@@ -17,7 +17,7 @@
 		<view class="lab_title">
 			<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
 				<view class="lab_title_l_n">
-					<view>{{collegeArray[collegeIndex]}}</view>
+					<view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
 					<img src="@/images/Version3.3.3/icon_06.png">
 				</view>
 			</picker>
@@ -25,32 +25,36 @@
 				<view class="lab_title_r_btn" @click="searchBtn">
 					<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 				</view>
-				<input type="text" v-model="getData.name" placeholder="实验室/房间号" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<input type="text" v-model="getData.searchValue" placeholder="实验室/房间号" maxlength="50" placeholder-style="color: #CCCCCC;font-size:22rpx;">
+				<view class="clear" @click="clearBtn">清除</view>
 			</view>
 		</view>
 	</view>
 	
 	<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 		<view class="list_three">
-			<view class="list_three_li" v-for="(item,index) in  dataList" :key="index" @click="handleClick('','detail')">
+			<view class="list_three_li" v-for="(item,index) in  dataList" :key="index" @click="handleClick(item,'detail')">
 				<view class="list_three_li_t">
 					<view class="list_three_li_t_l">
 						<img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
 						<text></text>
 					</view>
-					<view class="list_three_li_t_c">实验室名称-房间号</view>
-					<view class="list_three_li_t_c2">已逾期</view>
+					<view class="list_three_li_t_c">{{item.subRoom}}</view>
+					<view class="list_three_li_t_c2" v-if="item.overdueStatus==1">已逾期</view>
 					<view class="list_three_li_t_r"></view>
 				</view>
 				<view class="list_three_li_m">
-					<view class="list_three_li_m_t">计划标题计划标题计划标题计划标题计划标题计划...</view>
+					<view class="list_three_li_m_t">{{item.title}}</view>
 					<view class="list_three_li_m_b">
-						<text class="blue_color">待整改</text>
-						<text>校院巡查</text>
-						<text>环境与测绘学院</text>
+						<text class="green_color" v-if="item.rectifyStatus==1">已完成</text>
+						<text class="blue_color" v-if="item.rectifyStatus==2">待整改</text>
+						<text class="orange_color" v-if="item.rectifyStatus==3">待复核</text>
+						<text class="gray_color" v-if="item.rectifyStatus==4">暂无法整改</text>
+						<text>{{item.hazardType==1?'校院巡查':'实验室自查'}}</text>
+						<text>{{item.collegeName}}</text>
 					</view>
 				</view>
-				<view class="list_three_li_b">整改期限:2023-01-01</view>
+				<view class="list_three_li_b">整改期限:{{item.rectifyDeadline}}</view>
 			</view>
 		</view>
 	</scroll-view>
@@ -60,7 +64,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkHazardAppList,conditionCollegeInfo} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -71,8 +75,11 @@ export default {
 		pageType:0,
 		//列表请求参数
 		getData:{
-		 pageNum:1,
-		 pageSize:20,
+			pageNum:1,
+			pageSize:20,
+		    hazardType:'1',//1是院校巡查,2是实验室自查
+			rectifyStatus:'',//1已完成 2待整改 3待复核 4 暂无法整改
+			searchValue:'',
 		},
 		tabText:['校院巡查隐患','实验室自查隐患'],
 		curTab:0,
@@ -92,8 +99,8 @@ export default {
 		},
 		collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
 		collegeIndex :0,
-		collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
-		dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
+		collegeArray:[],
+		dataList:[],
 	}
   },
   onLoad(option) {
@@ -115,72 +122,120 @@ export default {
 	  
   },
   mounted(){
-	  
+	  this.getList();
+	  this.conditionCollegeInfo();
   },
   methods: {
 		tabClick(index) {
 			this.curTab = index;
+			this.getData.pageNum=1;
+			this.getData.searchValue='';
+			this.getData.deptId='';
+			this.getData.deptName='';
+			this.getData.rectifyStatus='';
+			this.curTabTow=0;
+			this.dataList=[];
+			if(index==0){//校院
+				this.getData.hazardType=1;
+			}else if(index==1){//实验室
+				this.getData.hazardType=2;
+			}
+			this.getList()
 		},
 		//顶部tab点击
 		tabClickTow(index) {
 			this.curTabTow = index;
+			this.getData.pageNum=1;
+			this.getData.searchValue='';
+			this.getData.deptId='';
+			this.getData.deptName='';
+			this.dataList=[];
+			if(index==0){
+				this.getData.rectifyStatus='';
+			}else if(index==1){//待整改
+				this.getData.rectifyStatus=2;
+			}else if(index==2){//待复核
+				this.getData.rectifyStatus=3;
+			}else if(index==3){//已完成
+				this.getData.rectifyStatus=1;
+			}else if(index==4){//暂无法整改
+				this.getData.rectifyStatus=4;
+			}
+			this.getList()
 		},
 		//选择学院
 		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.dataList=[];
-			this.getList();  
+			this.getList(); 
 		},
 		//实验室搜索
 		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();
+		},
 		//滚动事件
 		scrollGet(){
 			let self=this;
-			if(self.total<=self.getData.pageNum){
-			    console.log('没有更多数据!')
-			}else{
-					setTimeout(function(){
-						self.getData.pageNum += 1;
-						self.getList(); 
-					},1000)
-						 
+			if(this.pageType==1){//当页面切换到检查管理列表里的时候
+				if(self.total/self.getData.pageSize<=self.getData.pageNum){
+				    console.log('没有更多数据!')
+				}else{
+						setTimeout(function(){
+							self.getData.pageNum += 1;
+							self.getList(); 
+						},1000)
+							 
+				}
 			}
+			
 		},
-	    
-		//学院选择
-		collegeSelete(index){
-			this.collegeList[index].type = !this.collegeList[index].type
+		//查询学院列表
+		async conditionCollegeInfo(){
+			let _this = this;
+			const {data} = await conditionCollegeInfo();
+			if(data.code == 200){
+				data.data.forEach(function(item){
+					item.type=false;
+				})
+				_this.collegeList=data.data;
+				
+				//检查管理
+				for(let i=0;i<data.data.length;i++){
+					_this.collegeArray.push(data.data[i].deptName)
+				}
+			}
 		},
-	    handleClick(item,doType){
+	    handleClick(row,doType){
 		  let self=this;
 		  if( doType=='subBtn'){//	
 		  
 		  }else if(doType=='detail'){//详情
 			  uni.navigateTo({
-			  	 url: '/pages/pages_safetyExamine/dangerManage/dangerDetail?form='+encodeURIComponent(JSON.stringify(this.form))
+			  	 url: '/pages/pages_safetyExamine/dangerManage/dangerDetail?item='+encodeURIComponent(JSON.stringify(row))
 			  })
 		  }
 		  
 	    },
 		async getList(){
-				  let list=[{name:'实验室名称-房间号',type:false,id:4},{name:'实验室名称-房间号',type:false,id:5}]
-				  this.total=5;
-				  this.dataList=[...this.dataList,...list]
-				
-				  
-		 //    let self = this;
-		 //    let obj = {
-		 //        pageNum:this.getData.page,
-		 //        pageSize:this.getData.pageSize,
-		 //    };
-		 //    const {data} = await groupList(obj);
-		 //    if(data.code==200){
-					 //  this.total=data.total;
-					 //  this.dataList=[...this.dataList,...data.data]
-				  // }
+			let self = this;
+			const {data} = await checkHazardAppList(this.getData);
+			if(data.code==200){
+				this.dataList=[...this.dataList,...data.data.records]
+				this.total=data.data.total;
+			}
 		},
 	  
   }
@@ -357,6 +412,9 @@ export default {
 						margin-left:20rpx;
 						color: #999999;
 						font-size:28rpx;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
 					}
 					>img{
 						width: 14rpx;
@@ -377,6 +435,7 @@ export default {
 					position: absolute;
 					top: 0rpx;
 					left:0rpx;
+					z-index: 100;
 					>img{
 						width: 20rpx;
 						height: 20rpx;
@@ -386,12 +445,24 @@ export default {
 					}
 				}
 				>input{
-					width: 360rpx;
+					width: 274rpx;
 					height: 60rpx;
 					position: absolute;
 					top: 0rpx;
 					left: 60rpx;
 				}
+				.clear{
+					width: 60rpx;
+					height: 60rpx;
+					position: absolute;
+					top: 0rpx;
+					right:20rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #0183FA;
+					line-height: 60rpx;
+				}
 			}
 		}
 		
@@ -511,7 +582,7 @@ export default {
 					}
 					>text:nth-of-type(3){
 						display: inline-block;
-						width: 380rpx;
+						width: 290rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
 						font-weight: 400;

+ 209 - 48
pages/pages_safetyExamine/examineManage/examineAdd.vue

@@ -6,7 +6,7 @@
 			<view class="basics_li">
 				<view class="basics_li_l">实验室</view>
 				<view class="basics_li_r lab_r">
-					<input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.fjNumber" placeholder="请选择房间" placeholder-style="font-size: 30rpx;color:#333;">
+					<input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subjectName" placeholder="请选择房间" placeholder-style="font-size: 30rpx;color:#333;">
 					<view class="img-box" @click.stop="saoCode">
 						<img src="@/images/Version3.3.3/icon_aqjc_sm.png">
 					</view>
@@ -16,7 +16,7 @@
 				<view class="basics_li_l">学院</view>
 				<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="scope_r">
 					<view class="basics_li_r college_r">
-						<view>{{form.deptName?form.deptName:'选择学院'}}</view>
+						<view>{{form.collegeName?form.collegeName:'选择学院'}}</view>
 						<img src="@/images/Version3.3.3/icon_06.png">
 					</view>
 				</picker>
@@ -24,14 +24,14 @@
 			<view class="basics_li">
 				<view class="basics_li_l">楼栋</view>
 				<view class="basics_li_r building_r">
-					<input class="picker-text"  type="text" disabled v-model="form.fjNumber" placeholder="选择实验室后自动匹配" placeholder-style="font-size: 30rpx;color:#333;">
+					<input class="picker-text"  type="text" disabled v-model="form.buildName" placeholder="选择实验室后自动匹配" placeholder-style="font-size: 30rpx;color:#333;">
 				</view>
 			</view>
 			<view class="basics_li">
 				<view class="basics_li_l">检查类型</view>
 				<picker @change="categoryChange" :value="categoryIndex" :range="categoryArray" class="scope_r">
 					<view class="basics_li_r college_r">
-						<view>{{categoryArray[categoryIndex]}}</view>
+						<view>{{form.checkType?(form.checkType==1?'校院巡查':'实验室自查'):'选择检查类型'}}</view>
 						<img src="@/images/Version3.3.3/icon_06.png">
 					</view>
 				</picker>
@@ -40,44 +40,33 @@
 				<view class="basics_li_l">计划标题</view>
 				<picker @change="planChange" :value="planIndex" :range="planArray" class="scope_r">
 					<view class="basics_li_r college_r">
-						<view>{{planArray[planIndex]}}</view>
+						<view>{{form.title?form.title:'选择检查类型'}}</view>
 						<img src="@/images/Version3.3.3/icon_06.png">
 					</view>
 				</picker>
 			</view>
-			<view class="custom">自定义输入</view>
-		</view>
-		<view class="attachment">
-			<view class="attachment_t">
-				<text>材料附件</text>
-				<text>点击文件标题查看</text>
-			</view>
-			<view class="attachment_li">
-				<img src="@/images/Version3.3.3/icon_djc_wj.png"/>
-				<text>文件标题文件标题</text>
-				<img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
-			</view>
+			<view class="custom"  @click="customFun">自定义输入</view>
 		</view>
 		<view class="inspect">
 			<view class="inspect_li">
 				<view class="inspect_li_l">检查结果</view>
 				<picker @change="resultChange" :value="resultIndex" :range="resultArray" class="scope_r">
 					<view class="inspect_li_r college_r">
-						<view>{{resultArray[resultIndex]}}</view>
+						<view>{{form.checkResult==1?'符合':'不符合'}}</view>
 						<img src="@/images/Version3.3.3/icon_06.png">
 					</view>
 				</picker>
 			</view>
-			<view class="inspect_li" v-if="form.inspectResult==0">
+			<view class="inspect_li" v-if="form.checkResult==0">
 				<view class="inspect_li_l">整改日期</view>
 				<picker mode="date" @change="startChange(form,$event)">
 					<view class="inspect_li_r date_r">
-						<input disabled class="picker-text" type="text" v-model="form.startTime" placeholder="请选择日期" placeholder-style="font-size: 30rpx;color:#333;">
+						<input disabled class="picker-text" type="text" v-model="form.rectifyDeadline" placeholder="请选择日期" placeholder-style="font-size: 30rpx;color:#333;">
 						<img src="@/images/Version3.3.3/icon_rl.png">
 					</view>
 				</picker>
 			</view>
-			<view class="inspect_li" v-if="form.inspectResult==0">
+			<view class="inspect_li" v-if="form.checkResult==0">
 				<view class="inspect_li_l">整改通知</view>
 				<view class="inform_r"> 
 					<view v-for="(item,index) in informArray" :key="index" @click="tabClick(index)"><text :class="informIndex==index?'checked':'inform_r_l' "></text><text class="inform_r_r">{{item}}</text></view>
@@ -101,16 +90,29 @@
 				</view>
 			</view>
 		</view>
-	</view>	
-	<view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.inspectResult==0">下一步</view>
-	<view class="bottom_btn" @click="handleClick('subBtn')" v-if="form.inspectResult==1">提交</view>
+	</view>
+	<!-- 检查名称弹窗 -->
+	<uni-popup ref="popup" class="inspect_name" type="bottom">
+		<view class="popup-content">
+			<view class="inspect_name_t">
+				<input type="text" v-model="customTitle" maxlength="20" placeholder="请输入计划标题"/>
+			</view>
+			
+			<view class="inspect_name_b">
+				<text @click="titleCancel()">取消</text>
+				<text @click="titleConfirm()">确定</text>
+			</view>
+		</view>
+	</uni-popup>
+	<view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0">下一步</view>
+	<view class="bottom_btn" @click="submitForm()" v-if="form.checkResult==1">提交</view>
   </view>
 
 </template>
 
 <script>
 import { config } from '@/api/request/config.js'
-import { getSelectInfoByRoom,conditionCollegeInfo,subjectList,getCheckPlanBySubId} from '@/api/index.js'
+import { getSelectInfoByRoom,conditionCollegeInfo,subjectList,getCheckPlanBySubId,checkManageAdd,findCheckManage} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -118,26 +120,52 @@ export default {
   },
   data() {
     return {
+		id:'',
 		pageType:0,
 		//列表请求参数
 		getData:{
 		 pageNum:1,
 		 pageSize:20,
 		},
+		customTitle:'',
 		form:{
-			name:'',
-			startTime:'',
-			inspectResult:0,//检查结果
+			id:'',
+			checkPlanId:'',
+			manageStatus:'',//保存1  提交2
+			subId:'',//实验室
+			subjectName:'',
+			title:'',//计划标题
+			deptId:'',//学院
+			collegeName:'',
+			buildId:'',//楼栋
+			buildName:'',
+			checkType:'',// 检查类型(1校院巡查 2实验室自查)    
+			checkResult:'1',// 检查结果 0不符合 1符合 
+			rectifyDeadline:'',//整改期限
+			rectifyNotice:'1',//整改通知(1整改告知书 2整改通知书)
+			checkHazardDtoList:[
+				{
+					voiceRemark:[],//语音备忘存储
+					hazardLevel:'0',//隐患等级
+					hazardLevelName:'一般隐患',//隐患等级
+					hazardCheckCode:'', //检查项目code序号 
+					hazardCheckName:'', //检查项目名称 
+					hazardCheckPro:'', //最后一级的id  
+					hazardCheckPoint:'',// 检查要点  
+					hazardDescribe:'', //隐患描述 
+					uploadDtoList:[],//隐患照片
+				}
+			],
 		},
 		collegeIndex :0,
 		collegeArray:[],
 		categoryIndex :0,
-		categoryArray:['校级巡查','院级巡查'],
+		categoryArray:['校院巡查','实验室自查'],
 		planIndex :0,
 		planArray:[],
 		planList:[],
 		resultIndex :0,
-		resultArray:['不符合','符合'],
+		resultArray:['符合','符合'],
 		informIndex:0,
 		informArray:['整改告知书','整改通知书'],
 		
@@ -147,11 +175,15 @@ export default {
 		//房间搜索字段
 		room:"",
 		roomList:[],
+		item:{},
 		
 	}
   },
   onLoad(option) {
-	 
+	 if(option.id){
+	 		 this.id=option.id
+	 		 this.findCheckManage()
+	 }
   },
   onShow() {
 	  
@@ -166,13 +198,52 @@ export default {
 		  let self=this;
 		  if( doType=='nextStep'){//下一步	
 			  uni.redirectTo({
-				  url: '/pages/pages_safetyExamine/examineManage/examineAddTow'
+				  url: '/pages/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
 			  });
-		  }else if(doType=='subBtn'){//提交
-			  
 		  }
 		  
 	    },
+		customFun(){
+			let self=this;
+			self.$refs.popup.open()
+		},
+		titleCancel(){
+			let self=this;
+			self.$refs.popup.close()
+		},
+		titleConfirm(){
+			let self=this;
+			this.form.title=this.customTitle;
+			self.$refs.popup.close()
+		},
+		//详情
+		async findCheckManage(){
+			let _this = this;
+			const {data} = await findCheckManage({id:this.id});
+			if(data.code == 200){
+					this.form.id=data.data.id;
+					this.form.checkPlanId=data.data.checkPlanId;
+					this.form.subId=data.data.subId;
+					this.form.subjectName=data.data.subjectName;
+					this.form.title=data.data.title;
+					this.form.deptId=data.data.deptId;
+					this.form.collegeName=data.data.collegeName;
+					this.form.buildId=data.data.buildId;
+					this.form.buildName=data.data.buildName;
+					this.form.checkType=data.data.checkType;
+					this.form.checkResult=data.data.checkResult==null?'1':data.data.checkResult;
+					this.form.rectifyDeadline=data.data.rectifyDeadline;
+					this.form.rectifyNotice=data.data.rectifyNotice==null?'1':data.data.rectifyNotice;
+					if(data.data.checkHazardDtoList.length>0){//隐患项
+						this.form.checkHazardDtoList=data.data.checkHazardDtoList;
+					}
+					this.form.id=data.data.id;
+					//根据实验室id查询实验室计划
+					if(data.data.subId){
+						this.getCheckPlanBySubId(data.data.subId)
+					}
+			}
+		},
 		//查询学院列表
 		async conditionCollegeInfo(){
 			let _this = this;
@@ -203,23 +274,42 @@ export default {
 			 this.form.deptId=this.collegeList[e.target.value].deptId
 			 this.form.deptName=this.collegeList[e.target.value].deptName
 		},
+		//检查类型
 		categoryChange(e){
 			this.categoryIndex = e.target.value;
+			if(e.target.value==0){
+				this.form.checkType=1
+			}else if(e.target.value==1){
+				this.form.checkType=2
+			} 
 		},
+		//计划
 		planChange(e){
 			this.planIndex = e.target.value;
+			this.form.title=this.planList[e.target.value].title
+			this.form.checkPlanId=this.planList[e.target.value].id
 		},
 		resultChange(e){
 			this.resultIndex = e.target.value;
-			this.form.inspectResult=e.target.value;
+			if(e.target.value==0){
+				this.form.checkResult=1;
+			}else if(e.target.value==1){
+				this.form.checkResult=0;
+			}
+			
 		},
 		//开始时间选中事件
 		startChange(form,e){
-			form.startTime=e.target.value
+			form.rectifyDeadline=e.target.value
 		},
-		//顶部tab点击
+		//整改通知
 		tabClick(index) {
 			this.informIndex = index;
+			if(index==0){
+				this.rectifyNotice='1';
+			}else if(index==1){
+				this.rectifyNotice='2';
+			}
 		
 		},
 		//搜索房间弹层开关
@@ -260,18 +350,13 @@ export default {
 		},
 		//确认搜索房间
 		popupClickItem(item){
-			this.$set(this.form,"fjNumber",item.room)
-			this.$set(this.form,"deptName",item.deptName)
-			this.$set(this.form,"buildingId",item.building)
+			this.$set(this.form,"subId",item.id)
+			this.$set(this.form,"subjectName",item.name)
 			this.$set(this.form,"deptId",item.deptId)
-			this.$set(this.form,"laboratoryId",item.id)
-			this.$set(this.form,"buildingName",item.buildName)
-			this.$set(this.form,"laboratoryName",item.name)
-			this.$set(this.form,"fzrId",item.userId)
-			this.$set(this.form,"fzrName",item.safeUserName)
-			this.$set(this.form,"fzrLxfs",item.safeUserPhone)
+			this.$set(this.form,"collegeName",item.deptName)
+			this.$set(this.form,"buildId",item.building)
+			this.$set(this.form,"buildName",item.buildName)
 			this.popupType = false;
-			
 			this.getCheckPlanBySubId(item.id)
 		},
 		//调用摄像头
@@ -309,7 +394,20 @@ export default {
 				}
 			});
 		},
-	  
+	    //提交
+	    async submitForm(){
+			let _this = this;
+			this.form.manageStatus=2;
+			const {data} = await checkManageAdd(_this.form);
+			if(data.code == 200){
+				uni.showToast({
+					title: '提交成功',
+					icon:"none",
+					mask:true,
+					duration: 2000
+				});
+			}
+		  },
   }
 }
 </script>
@@ -671,6 +769,69 @@ export default {
 			}
 		}
 	}
+	/* 计划标题 */
+	.inspect_name{
+	
+		.popup-content{
+			width: 750rpx;
+			height: 350rpx;
+			background: #FFFFFF;
+			border-radius: 10rpx 10rpx 0px 0px;
+			padding :0 50rpx;
+			box-sizing :border-box;
+			overflow :hidden;
+			.inspect_name_t{
+				margin-top:66rpx;
+				padding: 0 30rpx;
+				box-sizing: border-box;
+				>input{
+					width:100%;
+					height:80rpx;
+					border: 2rpx solid #E0E0E0;
+					color:#A2A2A2;
+					font-size:28rpx;
+					line-height 80rpx
+					border-radius:10rpx;
+					padding: 0 20rpx;
+					box-sizing: border-box;
+				}
+			}
+			.inspect_name_b{
+				margin-top :64rpx;
+				display: flex;
+				justify-content: center;
+				>text:nth-of-type(1){
+					width: 160rpx;
+					height: 60rpx;
+					border-radius: 40rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+					line-height: 60rpx;
+					text-align :center;
+					margin-right: 120rpx;
+					border: 2rpx solid #e0e0e0;
+				}
+				>text:nth-of-type(2){
+					width: 160rpx;
+					height: 60rpx;
+					background: linear-gradient(-35deg, #309CFF, #0183FA);
+					border-radius: 40rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #FFFFFF;
+					line-height: 60rpx;
+					text-align :center;
+				}
+				
+				
+			}
+	
+		}
+	
+	}
 	.bottom_btn{
 		position: fixed;
 		bottom: 26rpx;

+ 147 - 206
pages/pages_safetyExamine/examineManage/examineAddTow.vue

@@ -4,12 +4,12 @@
 		<scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
 			<viwe class="list">
 				<view class="title">不符合项</view>
-				<view class="check-for-big-box" v-for="(item,index) in form.detailsList" :key="index">
+				<view class="check-for-big-box" v-for="(item,index) in form.checkHazardDtoList" :key="index">
 					<view class="grade">
 						<view class="grade_l">隐患等级:</view>
 						<picker @change="gradeChange(item,$event)" :value="gradeIndex" :range="gradeArray" class="scope_r">
 							<view class="grade_r">
-								<view>{{item.grade}}</view>
+								<view>{{item.hazardLevel==0?'一般隐患':(item.hazardLevel==1?'重大隐患':'问题管理')}}</view>
 								<img src="@/images/Version3.3.3/icon_06.png">
 							</view>
 						</picker>
@@ -17,27 +17,27 @@
 					<view class="project" v-if="checkOptionList.length>0">
 						<view class="project_l">检查项目:</view>
 						<uni-data-picker :ellipsis="false" :localdata="checkOptionList[index]" :map="{text:'name',value:'id'}"
-						popup-title="请选择所属目录" @change="(e)=>onchange(e,index)" @nodeclick="onnodeclick"
+						popup-title="请选择所属目录" @change="(e)=>onchange(e,index)" @nodeclick="onnodeclick()"
 						ref="uniDataPicker" :addType="true" :addIndex="index">
-							<view  class="project_r">{{item.jcxName?item.jcxName:'请选择检查项'}}</view>
+							<view  class="project_r">{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}</view>
 						</uni-data-picker>
 					</view>
 					<view class="point">
 						<view class="point_l">检查要点:</view>
-						<textarea class="point_r" type="text" v-model="item.yhMs" maxlength="50" placeholder="未查到此项检查要点,可在此输入添加" placeholder-style="font-size:28rpx;color:#999;"></textarea>
+						<textarea class="point_r" type="text" v-model="item.hazardCheckPoint" maxlength="50" placeholder="未查到此项检查要点,可在此输入添加" placeholder-style="font-size:28rpx;color:#999;"></textarea>
 					</view>
 					<view class="check-for-input-max-box">
 						<view class="left-title-p">隐患描述:</view>
-						<textarea type="text" v-model="item.yhMs" maxlength="50" placeholder="请输入隐患描述" placeholder-style="font-size:28rpx;color:#999;"></textarea>
+						<textarea type="text" v-model="item.hazardDescribe" maxlength="50" placeholder="请输入隐患描述" placeholder-style="font-size:28rpx;color:#999;"></textarea>
 					</view>
 					<view class="check-for-img-max-box">
 						<view class="left-title-p">隐患照片(最多上传5张):</view>
 						<view class="right-img-box">
-							<view class="img-box" v-for="(imgUrl,imgIndex) in item.yhImg" :key="imgIndex">
-								<img class="img-data" :src="configURL+imgUrl">
+							<view class="img-box" v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
+								<img class="img-data" :src="configURL+imgItem.fileUrl">
 								<img class="position-img" src="@/pages_manage/images/icon_ssp_closure.png" @click="delImg(index,imgIndex)">
 							</view>
-							<img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage(item)" v-if="item.yhImg.length<5">
+							<img class="add-button" src="@/pages_manage/images/icon_07.png" @click="selectImage(item)" v-if="item.uploadDtoList.length<5">
 						</view>
 					</view>
 				   <view class="voice">
@@ -45,12 +45,12 @@
 						   <view class="voice_t_l">语音备注:</view>
 						   <img class="voice_t_r" src="@/images/Version3.3.3/icon_ksjc_yysr.png" @longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton"  @touchend.stop="sendButton(item,$event)">
 					   </view>
-					   <view class="voice_b" v-for="(voiceItem,voiceIndex) in item.voice" :key="voiceIndex">
+					   <view class="voice_b" v-for="(voiceItem,voiceIndex) in item.voiceRemark" :key="voiceIndex">
 						   <view class="voice_b_l" @tap="voicePlay(voiceItem.url)"><img class="add-button" src="@/pages_manage/images/icon_yyt.png"/>{{voiceItem.times}}″</view>
 						   <img class="voice_b_r" src="@/pages_manage/images/Version2.3/icon_sczl_sc.png" @tap="voiceDele(index,voiceIndex)"/>
 					   </view>
 				   </view>
-					<view class="check-for-big-box-position-img-box" v-if="form.detailsList.length>1" @click="delDetailsList(index)">
+					<view class="check-for-big-box-position-img-box" v-if="form.checkHazardDtoList.length>1" @click="delDetailsList(index)">
 						<img src="@/pages_manage/images/icon_ssp_closure.png">
 					</view>
 				</view>
@@ -66,7 +66,7 @@
 <script>
 	const myaudio  = uni.createInnerAudioContext();
     import { config } from '@/api/request/config.js'
-    import { checkRecordAddC,checkRecordAdd,getSelectInfoByRoom, checkOptionList, treeselect,treeDepselect, addTempCheckOption,recordDettailsList,checkRecordUpdate } from '@/api/index.js'
+    import {checkOptionListNew,treeDepselect,checkManageAdd} from '@/api/index.js'
     export default {
         name: "startChecking",
         data() {
@@ -74,33 +74,36 @@
 
 				configURL:config.base_url,
 				id:"",
-				//新增项or固有
-				isLingshi:0,
                 //页面子状态
                 minPageType:1,
 				//临时存储隐患信息ID
 				hiddenDangerIdList:[],
 				//数据
 				form:{
-					checkName:'',//检查名称
-					fjNumber:"",
-					buildingId:"",
-					buildingName:"",
-					laboratoryId:"",
-					laboratoryName:"",
-					fzrId:"",
-					fzrName:"",
-					fzrLxfs:"",
-					jcDw:"",
-					detailsList:[
+					id:'',
+					checkPlanId:'',
+					manageStatus:'',//保存1  提交2
+					subId:'',//实验室
+					subjectName:'',
+					title:'',//计划标题
+					deptId:'',//学院
+					collegeName:'',
+					buildId:'',//楼栋
+					buildName:'',
+					checkType:'',// 检查类型(1校院巡查 2实验室自查)  
+					checkResult:'1',// 检查结果 0不符合 1符合 
+					rectifyDeadline:'',//整改期限
+					rectifyNotice:'1',//整改通知(1整改告知书 2整改通知书)
+					checkHazardDtoList:[
 						{
-							isLingshi:0,
-							yhImg:[],
-							voice:[],//语音备忘存储
-							yhMs:"",
-							jcxId:"",
-							jcxName:"",
-							grade:'一般隐患',//隐患等级
+							voiceRemark:[],//语音备忘存储
+							hazardLevel:'0',//隐患等级
+							hazardCheckCode:'', //检查项目code序号 
+							hazardCheckName:'', //检查项目名称 
+							hazardCheckPro:'', //最后一级的id  
+							hazardCheckPoint:'',// 检查要点  
+							hazardDescribe:'', //隐患描述 
+							uploadDtoList:[],//隐患照片
 						}
 					],
 				},
@@ -112,7 +115,6 @@
 				searchNullType:true,
 				//检查项
 				checkOptionList:[],
-				checkOptionListExamination:[],
 				//新增检查项
 				openIndex:"",
 				open:false,
@@ -129,28 +131,23 @@
 				recorderManager : wx.getRecorderManager(),
 				temporaryData:[],
 				gradeIndex :0,
-				gradeArray:['一般隐患','重大隐患'],
+				gradeArray:['一般隐患','重大隐患','问题管理'],
 				bottomBtnList:['上一步','保存','提交'],
             }
         },
         onLoad(option) {
-			this.getCheckOptionListTwo();
-			this.treeselect();
-			if(option.id){
-				this.id = option.id;
-				this.getInfo();
-			}else{
-				this.getCheckOptionList();
+			if(option.form){
+				this.form=JSON.parse(decodeURIComponent(option.form)); 
 			}
         },
         onShow() {
-
-
+			this.getCheckOptionList();
         },
         methods: {
 			//隐患等级
 			gradeChange(item,e){
-				item.grade=this.gradeArray[e.target.value]
+				item.hazardLevel=e.target.value
+				
 			},
 			//语音备忘播放
 			async voicePlay(item){
@@ -168,7 +165,7 @@
 				  success (res) {
 				    if (res.confirm) {
 				      console.log('用户点击确定')
-					  self.form.detailsList[index].voice.splice(voiceIndex,1);
+					  self.form.checkHazardDtoList[index].voiceRemark.splice(voiceIndex,1);
 					  self.$forceUpdate();
 				    } else if (res.cancel) {
 				      console.log('用户点击取消')
@@ -182,7 +179,7 @@
 			recordButton(item,e){
 				console.log("按下")
 				let self = this;
-				if(item.voice.length>=5){
+				if(item.voiceRemark.length>=5){
 					uni.showToast({
 						title: '语音备忘最多只能上传5条',
 						icon:"none",
@@ -277,7 +274,7 @@
 							console.log("上传成功",res)
 							console.log(item)
 							let seconds = Math.round((parseInt(times) % (1000 * 60)) / 1000);
-							item.voice.push({'times':seconds,'url':res.data.url})
+							item.voiceRemark.push({'times':seconds,'url':res.data.url})
 							console.log(JSON.stringify(self.voice))
 							//self.textParseUrlIps(res.data.url);
 							// self.newData.imgList.push(res.data.url);
@@ -297,17 +294,37 @@
 			        }
 			    });
 			},
+			
+			
+            /**************************检查项***************************/
+			
+			//获取检查项
+			async getCheckOptionList() {
+				const {data} = await checkOptionListNew();
+				if(data.code == 200){
+					let list = this.getTreeData(data.data);
+					this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
+				}
+			},
+			getTreeData(data){
+			  for(var i=0;i<data.length>0;i++){
+				if(data[i].children == null||data[i].children.length<=0){
+				  // children若为空数组,则将children设为undefined
+				  data[i].children = undefined;
+				}else {
+				  // children若不为空数组,则继续 递归调用 本方法
+				  this.getTreeData(data[i].children);
+				}
+			  }
+			  return data;
+			},
+			/**************************搜索项***************************/
 			//搜索特定检查项
 			async searchClick(text,index){
 				console.log("搜索text",text);
 				console.log("搜索index",index);
-				let newObj = {
-					level:4,
-					searchValue:text
-				}
-				const {data} = await checkOptionList(newObj);
+				const {data} = await checkOptionListNew({'searchValue':text});
 				if(data.code == 200){
-
 					if(data.data[0]){
 						let list = JSON.parse(JSON.stringify(this.checkOptionList));
 						list[index] = this.getTreeData(data.data);
@@ -327,12 +344,8 @@
 			//重置检查项
 			async resetClick(index){
 				console.log("重置index",index);
-				let newObj = {
-					level:4,
-				}
-				const {data} = await checkOptionList(newObj);
+				const {data} = await checkOptionListNew();
 				if(data.code == 200){
-
 					let list = JSON.parse(JSON.stringify(this.checkOptionList));
 					list[index] = this.getTreeData(data.data);
 					this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
@@ -340,75 +353,39 @@
 				}
 			},
 			
-            /**************************检查项***************************/
-			
-			//获取检查项
-			async getCheckOptionList() {
-				let newObj = {
-					level:4,
-				}
-				const {data} = await checkOptionList(newObj);
-				if(data.code == 200){
-
-					let list = this.getTreeData(data.data);
-					this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
-				}
-			},
-			async getCheckOptionListTwo() {
-				let newObj = {
-					level:3,
-				}
-				const {data} = await checkOptionList(newObj);
-				if(data.code == 200){
-					let list = this.getTreeData(data.data);
-					this.checkOptionListExamination = JSON.parse(JSON.stringify(list));
-				}
-			},
-			async treeselect() {
+			//选中固有检查项(新)
+			onchange(e,index) {
 				let self = this;
-				  const {data} = await treeselect({});
-				  if(data.code == 200){
-					let list = [];
-					for(let i=0;i<data.data[0].children.length;i++){
-						let obj = {
-							id:data.data[0].children[i].id,
-							label:data.data[0].children[i].label,
-						}
-						if(data.data[0].children[i].children){
-							for(let o=0;o<data.data[0].children[i].children.length;o++){
-								let obj = {
-									id:data.data[0].children[i].children[o].id,
-									label:data.data[0].children[i].children[o].label,
-								}
-								self.inspectionUnitArray.push(data.data[0].children[i].children[o].label)
-								list.push(obj);
-							}
-						}else{
-							self.inspectionUnitArray.push(data.data[0].children[i].label)
-							list.push(obj);
-						}
+				//hazardCheckCode:'', //检查项目code序号
+				//hazardCheckName:'', //检查项目名称 
+				//hazardCheckPro:'', //最后一级的id 
+				let jcxSstkNum=this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value)
+				this.$set(this.form.checkHazardDtoList[index],'hazardCheckPro',e.detail.value[e.detail.value.length-1].value);
+				this.$set(this.form.checkHazardDtoList[index],'hazardCheckCode',jcxSstkNum);
+				this.$set(this.form.checkHazardDtoList[index],'hazardCheckName',e.detail.value[e.detail.value.length-1].text);
+			},
+			  //根据id查找父元素
+			getTreeName(list,id){
+			   let _this=this
+			  for (let i = 0; i < list.length; i++) {
+				let a=list[i]
+				if(a.id===id){
+				  return a.code
+				}else{
+				  if(a.children && a.children.length>0){
+					let res=_this.getTreeName(a.children,id)
+					if(res){
+					  return res
 					}
-					this.inspectionUnitArrayData = list;
 				  }
-			},
-
-
-			getTreeData(data){
-			  for(var i=0;i<data.length>0;i++){
-				if(data[i].children == null||data[i].children.length<=0){
-				  // children若为空数组,则将children设为undefined
-				  data[i].children = undefined;
-				}else {
-				  // children若不为空数组,则继续 递归调用 本方法
-				  this.getTreeData(data[i].children);
 				}
 			  }
-			  return data;
 			},
+			onnodeclick(node) {},
             // 图片上传
             selectImage(item) {
                 let self = this;
-                if(item.yhImg.length>4){
+                if(item.uploadDtoList.length>4){
                     uni.showToast({
                         title: '最多上传5张图片',
                         icon:"none",
@@ -444,7 +421,7 @@
                     success: (uploadFileRes) => {
                         let res = JSON.parse(uploadFileRes.data);
 						if(res.code == 200){
-							item.yhImg.push(res.data.url);
+							item.uploadDtoList.push({'fileUrl':res.data.url,'fileName':res.data.name});
 							console.log(res.data.url)
 						}else{
 							uni.showToast({
@@ -463,12 +440,12 @@
             },
             //删除图片
             delImg(index,minIndex){
-                this.form.detailsList[index].yhImg.splice(minIndex,1);
+                this.form.checkHazardDtoList[index].uploadDtoList.splice(minIndex,1);
 				this.$forceUpdate();
 			},
             //添加隐患
             addDanger(){
-				if(this.form.detailsList.length>19){
+				if(this.form.checkHazardDtoList.length>19){
 					uni.showToast({
 						title: '最多添加20个隐患',
 						icon:"none",
@@ -478,22 +455,23 @@
 					return
 				}
 				let obj = {
-					isLingshi:0,
-					yhImg:[],
-					voice:[],
-					yhMs:"",
-					jcxId:"",
-					jcxName:"",
-					grade:"一般隐患",
+					voiceRemark:[],//语音备忘存储
+					hazardLevel:'0',//隐患等级
+					hazardCheckCode:'', //检查项目code序号 
+					hazardCheckName:'', //检查项目名称 
+					hazardCheckPro:'', //最后一级的id  
+					hazardCheckPoint:'',// 检查要点  
+					hazardDescribe:'', //隐患描述 
+					uploadDtoList:[],//隐患照片
 				}
-				this.form.detailsList.push(obj);
+				this.form.checkHazardDtoList.push(obj);
 				this.getCheckOptionList();
 				this.$forceUpdate();
             },
 			//删除隐患
 			delDetailsList(index){
-				this.hiddenDangerIdList.push(this.form.detailsList[index].id)
-				this.form.detailsList.splice(index,1);
+				this.hiddenDangerIdList.push(this.form.checkHazardDtoList[index].id)
+				this.form.checkHazardDtoList.splice(index,1);
 				this.$forceUpdate();
 			},
             //子页面切换
@@ -503,87 +481,50 @@
 					uni.redirectTo({
 					    url: '/pages/pages_safetyExamine/examineManage/examineAdd?form='+encodeURIComponent(JSON.stringify(this.form))
 					});
-				}else if(index == 2 || index ==3){
+				}else if(index == 1 || index == 2){
+					this.form.manageStatus=index;//1保存 2提交
+					for(let i=0;i<self.form.checkHazardDtoList.length;i++){
+						let num = i+1;
+						if(!self.form.checkHazardDtoList[i].hazardCheckName){
+							uni.showToast({
+								title: '第'+num+'未选择隐患项',
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+							return
+						}else if(!self.form.checkHazardDtoList[i].hazardDescribe && self.form.checkHazardDtoList[i].voiceRemark.length<=0){
+							uni.showToast({
+								title: '请输入第'+num+'项隐患描述!',
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+							return
+						}
+					}
+					this.submitForm();
+				}
+            },
+			//提交
+			async submitForm(){
+				let _this = this;
+				
+				const {data} = await checkManageAdd(_this.form);
+				if(data.code == 200){
+					uni.showToast({
+						title: '提交成功',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
 					uni.redirectTo({
 					    url: '/pages/pages_safetyExamine/examineManage/examineList?form='+encodeURIComponent(JSON.stringify(this.form))
 					});
-					// for(let i=0;i<self.form.detailsList.length;i++){
-					// 	let num = i+1;
-					// 	if(!self.form.detailsList[i].jcxName){
-					// 		uni.showToast({
-					// 			title: '第'+num+'未选择隐患项',
-					// 			icon:"none",
-					// 			mask:true,
-					// 			duration: 2000
-					// 		});
-					// 		return
-					// 	}else if(!self.form.detailsList[i].yhMs && self.form.detailsList[i].voice.length<=0){
-					// 		uni.showToast({
-					// 			title: '请输入第'+num+'项隐患描述!',
-					// 			icon:"none",
-					// 			mask:true,
-					// 			duration: 2000
-					// 		});
-					// 		return
-					// 	}
-					// }
 				}
-            },
+			  },
 			
-            /**************************搜索项***************************/
             
-			//选中固有检查项(新)
-			onchange(e,index) {
-				let self = this;
-				let val = e.detail.value[e.detail.value.length-1].value
-				let num = 0;
-				for(let i=0;i<self.temporaryIdList.length;i++){
-					if(self.temporaryIdList[i] == val){
-						num++
-					}
-				}
-				if(num == 0){
-					this.$set(this.form.detailsList[index],'isLingshi',0);
-				}else{
-					this.$set(this.form.detailsList[index],'isLingshi',1);
-				}
-				let list = [];
-				let listName=[];
-				for(let i=0;i<e.detail.value.length;i++){
-					list.push(e.detail.value[i].value)
-
-					if(i<3){
-						listName.push(e.detail.value[i].text)
-					}
-
-				}
-				let jcxSstkNum=this.getTreeName(this.checkOptionList[0],e.detail.value[e.detail.value.length-1].value)
-
-				this.$set(this.form.detailsList[index],'jcxSstkNum',jcxSstkNum);
-				this.$set(this.form.detailsList[index],'jcxId',list);
-				this.$set(this.form.detailsList[index],'jcxSstkMs',listName.join('-'));
-				this.$set(this.form.detailsList[index],'jcxName',e.detail.value[e.detail.value.length-1].text);
-			},
-			  //根据id查找父元素
-			getTreeName(list,id){
-			   let _this=this
-			  for (let i = 0; i < list.length; i++) {
-				let a=list[i]
-				if(a.id===id){
-				  return a.code
-				}else{
-				  if(a.children && a.children.length>0){
-					let res=_this.getTreeName(a.children,id)
-					if(res){
-					  return res
-					}
-				  }
-				}
-			  }
-			},
-			onnodeclick(node) {
-				console.log("node",node)
-			},
         }
     }
 </script>

+ 157 - 3
pages/pages_safetyExamine/examineManage/examineDetail.vue

@@ -101,14 +101,14 @@
 			<view class="pack_up" @click="switchFun(item)">{{item.switch?'收起':'展开'}}<img v-if="item.switch" src="@/images/Version3.3.3/icon_06_1.png"/><img v-if="!item.switch" src="@/images/Version3.3.3/icon_06.png"/></view>
 		</view>
 	</scroll-view>
-	<view class="report">整改报告</view>	
+	<view class="report" @change="buttonChange">整改报告</view>	
   </view>
 
 </template>
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkSign,queryDeptSignByUserId} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -164,7 +164,161 @@ export default {
 		//隐患小项收起展开
 		switchFun(item){
 			item.switch=!item.switch
-		}
+		},
+		//查看报告按钮
+		async buttonChange(e){
+			let namestatus;
+			let sealstatus;
+			//判断有没有电子签名
+			const {data} = await checkSign();
+			if(data.code==200){
+				namestatus=data.data
+				if(data.data==false){//true有电子签名false没有电子签名
+		
+					uni.showModal({
+					  title: '',
+					  cancelColor:'#999999',
+					  confirmColor:'#FF6E6E',
+					  cancelText: "取消", // 取消按钮的文字
+					  confirmText: "去上传", // 确认按钮文字
+					  content: '您未上传电子签名,无法生成整改通知书/整改报告!',
+					  success (res) {
+						if (res.confirm) {
+						  console.log('用户点击确定')
+						  uni.navigateTo({
+							  url: '/pages_manage/workbench/signature/signature'
+						  });
+		
+						} else if (res.cancel) {
+						  console.log('用户点击取消')
+		
+						}
+					  }
+					})
+				}else{
+		
+				}
+			}
+			//如果有电子签名判断有没有电子签章
+			if(namestatus){
+				const {data} = await queryDeptSignByUserId();
+				if(data.code==200){
+					console.log(data.data.data.isUpload)
+					sealstatus=data.data.data.isUpload
+					if(data.data.data.isUpload==false){
+						uni.showToast({
+							title: '学院未上传电子签章,无法生成整改通知书/整改报告',
+							icon:"none",
+							mask:true,
+							duration: 2000
+						});
+					}
+				};
+			}
+			//如果有电子签名和电气签章开始下载
+			if(namestatus==true && sealstatus==true){
+				if(this.buttonArrayType == 1){
+					if(e.target.value == 0){
+						this.genNotice();
+					}else if(e.target.value == 1){
+						this.genReport();
+					}
+				}else if(this.buttonArrayType == 2){
+					this.genNotice();
+				}
+			}
+		
+		},
+		genNotice(){
+			uni.showLoading({
+				title: '下载中'
+			});
+			wx.downloadFile({
+				url: config.base_url+'/laboratory/checkOption/genNotice/' + this.newData.id,
+				header: {
+					Authorization: uni.getStorageSync('token')
+				},
+				success: function (res) {
+					const fileManager = wx.getFileSystemManager()
+					const filePath = wx.env.USER_DATA_PATH + '/整改通知书.docx'
+					fileManager.saveFile({
+						tempFilePath: res.tempFilePath,
+						filePath,
+						success: () => {
+							uni.hideLoading();
+							wx.openDocument({
+							filePath: filePath,
+							showMenu: true,
+							fileType: 'docx'
+							})
+						},
+						fail: function (res){
+							uni.hideLoading();
+							uni.showToast({
+								title: '下载失败',
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+						}
+					})
+				},
+				fail: function (res){
+					uni.hideLoading();
+					uni.showToast({
+						title: '下载失败',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}
+			})
+		},
+		genReport(){
+			uni.showLoading({
+				title: '下载中'
+			});
+			wx.downloadFile({
+				url: config.base_url+'/laboratory/checkOption/genReport/' + this.newData.id,
+				header: {
+					Authorization: uni.getStorageSync('token')
+				},
+				success: function (res) {
+					const fileManager = wx.getFileSystemManager()
+					const filePath = wx.env.USER_DATA_PATH + '/整改报告.docx'
+					fileManager.saveFile({
+						tempFilePath: res.tempFilePath,
+						filePath,
+						success: () => {
+							uni.hideLoading();
+							wx.openDocument({
+								filePath: filePath,
+								showMenu: true,
+								fileType: 'docx'
+							})
+						},
+						fail: function (res){
+							uni.hideLoading();
+							uni.showToast({
+								title: '下载失败',
+								icon:"none",
+								mask:true,
+								duration: 2000
+							});
+						}
+					})
+				},
+				fail: function (res){
+					uni.hideLoading();
+					uni.showToast({
+						title: '下载失败',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}
+			})
+		},
 	  
   }
 }

+ 162 - 64
pages/pages_safetyExamine/examineManage/examineList.vue

@@ -11,7 +11,7 @@
 		<view class="lab_title">
 			<picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="lab_title_l">
 				<view class="lab_title_l_n">
-					<view>{{collegeArray[collegeIndex]}}</view>
+					<view>{{getData.deptName?getData.deptName:'选择学院'}}</view>
 					<img src="@/images/Version3.3.3/icon_06.png">
 				</view>
 			</picker>
@@ -19,7 +19,8 @@
 				<view class="lab_title_r_btn" @click="searchBtn">
 					<img src="@/images/Version3.3.3/icon_aqjc_ss.png"/>
 				</view>
-				<input type="text" v-model="getData.name" placeholder="请输入实验室名称" maxlength="50" placeholder-style="color: #CCCCCC;font-size:26rpx;">
+				<input type="text" v-model="getData.searchValue" placeholder="计划标题/实验室/房间号" maxlength="50" placeholder-style="color: #CCCCCC;font-size:22rpx;">
+				<view class="clear" @click="clearBtn">清除</view>
 			</view>
 		</view>
 	</view>
@@ -32,26 +33,29 @@
 						<img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
 						<text></text>
 					</view>
-					<view class="list_three_li_t_c">实验室名称-房间号</view>
-					<view class="list_three_li_t_c2">已逾期</view>
+					<view class="list_three_li_t_c">{{item.subjectName}}-{{item.roomNumber}}</view>
+					<view class="list_three_li_t_c2"  v-if="item.isOverdue==1">已逾期</view>
 					<view class="list_three_li_t_r"></view>
 				</view>
 				<view class="list_three_li_m">
-					<view class="list_three_li_m_t">计划标题计划标题计划标题计划标题计划标题计划...</view>
+					<view class="list_three_li_m_t">{{item.title}}</view>
 					<view class="list_three_li_m_b">
-						<text class="blue_color">未开始</text>
-						<text>校院巡查</text>
-						<text>环境与测绘学院</text>
+						<text class="blue_color" v-if="item.manageStatus==0">待检查</text>
+						<text class="red_color" v-if="item.manageStatus==1">检查中</text>
+						<text class="green_color" v-if="item.manageStatus==2">已检查</text>
+						<text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
+						<text>{{item.collegeName}}</text>
 					</view>
 				</view>
 				<!-- 开始检查 -->
-				<view v-if="index==0" class="list_three_li_b">开始检查</view>
-				<view v-if="index==1" class="list_three_li_b">编辑</view>
-				<view v-if="index==2" class="list_three_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
-				<view v-if="index==3" class="list_three_li_b_three">
+				<view v-if="item.manageStatus==0 && item.notStarted" class="list_three_li_b" @click="handleClick(item,'add')">开始检查</view>
+				<view v-if="item.manageStatus==1" class="list_three_li_b" @click="handleClick(item,'edit')">编辑</view>
+				<view v-if="!item.notStarted" class="list_three_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
+				<view v-if="item.manageStatus==2" class="list_three_li_b_three">
 					<img src="@/images/Version3.3.3/icon_djcsys.png"/>
 					<text>整改进度:</text>
-					<text>待检查22/待复核1/已完成/暂无法整改</text>
+					<text>{{item.rectifySchedule}}</text>
+					<text class="report">整改报告</text>
 				</view>
 			</view>
 		</view>
@@ -63,7 +67,7 @@
 
 <script>
 import { config } from '@/api/request/config.js'
-import { } from '@/api/index.js'
+import {checkManageList,conditionCollegeInfo} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -74,8 +78,11 @@ export default {
 		pageType:0,
 		//列表请求参数
 		getData:{
-		 pageNum:1,
-		 pageSize:20,
+			pageNum:1,
+			pageSize:20,
+		    checkType:'',//检查类型(0全部1校院巡查2实验室自查)
+			manageStatus:'',//管理状态(-1全部 0待检查,1检查中,2已检查)
+			searchValue:'',
 		},
 		tabTextTow:['全部','待检查','检查中','已检查'],
 		curTabTow:0,
@@ -91,92 +98,158 @@ export default {
 			patrolIndex:'',
 			seleteListMember:[],
 		},
-		collegeList:[{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},{name:'学院名称',type:false},],
+		collegeList:[],
 		collegeIndex :0,
-		collegeArray:['选择学院','学院名称1','学院名称2','学院名称3',],
-		dataList:[{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',},{name:'计划标题计划标题计划标题计划标题',}],
+		collegeArray:[],
+		dataList:[],
+		currentDate:'',
 	}
   },
   onLoad(option) {
-	 if(option.form){
-		this.form=JSON.parse(decodeURIComponent(option.form)); 
-		console.log(this.form)
-	 }
 	 if(option.pageType==1){
-		  uni.setNavigationBarTitle({
-				title:'校院巡查管理'
-		  })
+	 		  this.getData.checkType=option.pageType
+	 		  uni.setNavigationBarTitle({
+	 		  		title:'校院巡查'
+	 		  })
 	 }else if(option.pageType==2){
-		  uni.setNavigationBarTitle({
-				title:'实验室自查管理'
-		  })
+	 		   this.getData.checkType=option.pageType
+	 		  uni.setNavigationBarTitle({
+	 		  		title:'实验室自查'
+	 		  })
 	 }
   },
   onShow() {
-	  
+	 //获取当前日期
+	 this.currentDate=this.getNowFormatDate() 
   },
   mounted(){
+	 
+	  this.getList(); 
+	  this.conditionCollegeInfo();
 	  
   },
   methods: {
 		//顶部tab点击
 		tabClickTow(index) {
 			this.curTabTow = index;
+			this.getData.pageNum=1;
+			this.dataList=[];
+			if(index==0){
+				this.getData.manageStatus=-1;
+			}else if(index==1){
+				this.getData.manageStatus=0;
+			}else if(index==2){
+				this.getData.manageStatus=1;
+			}else if(index==3){
+				this.getData.manageStatus=2;
+			}
+			this.getList()
 		},
 		//选择学院
 		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.dataList=[];
-			this.getList();  
+			this.getList(); 
 		},
 		//实验室搜索
 		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();
+		},
 		//滚动事件
 		scrollGet(){
 			let self=this;
-			if(self.total<=self.getData.pageNum){
-			    console.log('没有更多数据!')
-			}else{
-					setTimeout(function(){
-						self.getData.pageNum += 1;
-						self.getList(); 
-					},1000)
-						 
+			if(this.pageType==1){//当页面切换到检查管理列表里的时候
+				if(self.total/self.getData.pageSize<=self.getData.pageNum){
+				    console.log('没有更多数据!')
+				}else{
+						setTimeout(function(){
+							self.getData.pageNum += 1;
+							self.getList(); 
+						},1000)
+							 
+				}
 			}
+			
 		},
-	    
-		//学院选择
-		collegeSelete(index){
-			this.collegeList[index].type = !this.collegeList[index].type
+		//查询学院列表
+		async conditionCollegeInfo(){
+			let _this = this;
+			const {data} = await conditionCollegeInfo();
+			if(data.code == 200){
+				data.data.forEach(function(item){
+					item.type=false;
+				})
+				_this.collegeList=data.data;
+				
+				//检查管理
+				for(let i=0;i<data.data.length;i++){
+					_this.collegeArray.push(data.data[i].deptName)
+				}
+			}
 		},
-	    handleClick(doType){
+	    handleClick(row,doType){
 		  let self=this;
-		  if( doType=='startInspect'){//开始检查	
+		  if( doType=='add'){//开始检查	
+			  uni.navigateTo({
+			      url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
+			  });
+		  }else if(doType=='edit'){
 			  uni.navigateTo({
-			      url: '/pages/pages_safetyExamine/examineManage/examineAdd'
+			      url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
 			  });
 		  }
 		  
 	    },
+		//获取当前日期函数
+		getNowFormatDate() {
+		  let date = new Date(),
+		    year = date.getFullYear(), //获取完整的年份(4位)
+		    month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+		    strDate = date.getDate() // 获取当前日(1-31)
+		  if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
+		  if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
+		 
+		  return `${year}-${month}-${strDate}`
+		},
+		//是否可以开始检查
+		compareTime(date1){
+		        if(!date1){
+				   return false
+			    } else {
+				   const oDate1 = new Date(date1);
+				   const oDate2 = new Date(this.currentDate)
+					   
+				   if(oDate1.getTime() <= oDate2.getTime()){
+					   return true; //可以开始
+				   } else {
+					   return false; //不能开始
+				   }
+			    }   
+		},
 		async getList(){
-				  let list=[{name:'实验室名称-房间号',type:false,id:4},{name:'实验室名称-房间号',type:false,id:5}]
-				  this.total=5;
-				  this.dataList=[...this.dataList,...list]
-				
-				  
-		 //    let self = this;
-		 //    let obj = {
-		 //        pageNum:this.getData.page,
-		 //        pageSize:this.getData.pageSize,
-		 //    };
-		 //    const {data} = await groupList(obj);
-		 //    if(data.code==200){
-					 //  this.total=data.total;
-					 //  this.dataList=[...this.dataList,...data.data]
-				  // }
+			let self = this;
+			const {data} = await checkManageList(this.getData);
+			if(data.code==200){
+				//判断计划是否开始
+				data.data.records.forEach(function(item){
+					item.notStarted=self.compareTime(item.cycleStartTime)
+				})
+				this.dataList=[...this.dataList,...data.data.records]
+				this.total=data.data.total;
+			}
 		},
 	  
   }
@@ -282,6 +355,9 @@ export default {
 						margin-left:20rpx;
 						color: #999999;
 						font-size:28rpx;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
 					}
 					>img{
 						width: 14rpx;
@@ -302,6 +378,7 @@ export default {
 					position: absolute;
 					top: 0rpx;
 					left:0rpx;
+					z-index: 100;
 					>img{
 						width: 20rpx;
 						height: 20rpx;
@@ -311,12 +388,24 @@ export default {
 					}
 				}
 				>input{
-					width: 360rpx;
+					width: 274rpx;
 					height: 60rpx;
 					position: absolute;
 					top: 0rpx;
 					left: 60rpx;
 				}
+				.clear{
+					width: 60rpx;
+					height: 60rpx;
+					position: absolute;
+					top: 0rpx;
+					right:20rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #0183FA;
+					line-height: 60rpx;
+				}
 			}
 		}
 		
@@ -368,7 +457,7 @@ export default {
 					overflow: hidden;
 					text-overflow:ellipsis;
 					white-space: nowrap;
-					padding-right: 60rpx;
+					padding-right: 120rpx;
 					box-sizing: border-box;
 				}
 				.list_three_li_t_c2{
@@ -436,7 +525,7 @@ export default {
 					}
 					>text:nth-of-type(3){
 						display: inline-block;
-						width: 380rpx;
+						width: 350rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
 						font-weight: 400;
@@ -492,6 +581,7 @@ export default {
 				display: flex;
 				justify-content: flex-start;
 				align-items: center;
+				width: 100%;
 				border-top: 1rpx solid #E0E0E0;
 				>img{
 					width: 24rpx;
@@ -517,6 +607,14 @@ export default {
 					overflow: hidden;
 					text-overflow: ellipsis;
 				}
+				.report{
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #0183FA;
+					line-height: 28rpx;
+					margin-right: 40rpx;
+				}
 			}
 		}
 	}

+ 60 - 2
pages/pages_safetyExamine/patrolPlan/patrolPlanEdit.vue

@@ -84,7 +84,7 @@
 				</view>
 				<view class="attachment_li" v-for="item in form.uploadDtoList">
 					<img src="@/images/Version3.3.3/icon_djc_wj.png"/>
-					<text>{{item.fileName}}</text>
+					<text @click="attachmentPreview(item)">{{item.fileName}}</text>
 					<img class="attachment_li_del" src="@/images/Version3.3.3/icon_fjgk_sc.png"/>
 				</view>
 			</view>
@@ -260,6 +260,61 @@ export default {
 			this.dataList=[];
 			this.getList()
 		},
+		attachmentPreview(item){
+			uni.showLoading({
+				title: '下载中'
+			});
+			wx.downloadFile({
+				url: config.base_url+item.fileUrl,
+				header: {
+					Authorization: uni.getStorageSync('token')
+				},
+				success: function (res) {
+					uni.hideLoading();
+					const filePath = res.tempFilePath
+					wx.openDocument({
+					  filePath: filePath,
+					  success: function (res) {
+						console.log('打开文档成功')
+					  }
+					})
+					// console.log("resresresresresres",res)
+					// const fileManager = wx.getFileSystemManager()
+					// const filePath = wx.env.USER_DATA_PATH + '/' + item.fileName
+					// console.log('filePath',filePath);
+					// fileManager.saveFile({
+					// 	tempFilePath: res.tempFilePath,
+					// 	filePath,
+					// 	success: () => {
+					// 		uni.hideLoading();
+					// 		wx.openDocument({
+					// 			filePath: filePath,
+					// 			showMenu: true,
+					// 			fileType: fileType.type
+					// 		})
+					// 	},
+					// 	fail: function (res){
+					// 		uni.hideLoading();
+					// 		uni.showToast({
+					// 			title: '下载失败',
+					// 			icon:"none",
+					// 			mask:true,
+					// 			duration: 2000
+					// 		});
+					// 	}
+					// })
+				},
+				fail: function (res){
+					uni.hideLoading();
+					uni.showToast({
+						title: '下载失败',
+						icon:"none",
+						mask:true,
+						duration: 2000
+					});
+				}
+			})
+		},
 		//选择学院
 		collegeChange(e){
 			this.collegeIndex = e.target.value;
@@ -511,7 +566,10 @@ export default {
 				this.form.checkSchedule=data.data.checkSchedule;
 				
 				this.scopeIndex=Number(data.data.checkRange)-1;//检查范围
-				this.checkGroupDetail(data.data.checkGroupId);
+				if(data.data.checkGroupId){//判断如果有巡查组id
+					this.checkGroupDetail(data.data.checkGroupId);
+				}
+				
 			}
 		},
 		//根据id查询巡查组员

+ 1 - 1
pages/pages_safetyExamine/patrolPlan/patrolPlanList.vue

@@ -286,7 +286,7 @@ export default {
 					}
 				}
 				.list_li_t_c{
-					width: 630rpx;
+					width: 570rpx;
 					height: 110rpx;
 					position: absolute;
 					left: 30rpx;

+ 19 - 1
pages/pages_safetyExamine/snapshotManage/snapshotDetail.vue

@@ -17,7 +17,7 @@
 			</view>
 			<view class="picture">
 				<view class="picture_t">隐患照片:</view>
-				<view class="picture_b">
+				<view class="picture_b" @click="lockImg(item.yhDtoList)">
 					<img  :src="item.fileUrl" v-for="(item,index) in item.yhDtoList"/>
 				</view>
 			</view>
@@ -167,6 +167,24 @@ export default {
 		  }
 		  
 	    },
+		//查看图片
+		lockImg(list){
+			console.log(list)
+			if(!list[0]){
+				return
+			}
+			let urlList=[];
+			for(let i=0;i<list.length;i++){
+				urlList.push(list[i].fileUrl)
+			}
+			wx.previewImage({
+				urls: urlList, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
+				current: '', // 当前显示图片的http链接,默认是第一个
+				success: function(res) {},
+				fail: function(res) {},
+				complete: function(res) {},
+			})
+		},
 		
 		// 图片上传
 		selectImage() {

+ 231 - 29
pages/safetyExamineWorkbench.vue

@@ -74,26 +74,37 @@
 					</view>
 				</view>
 				<view class="list_tow" v-if="pageType==1">
-					<view class="list_tow_li" v-for="(item,index) in  dataList" :key="index" @click="handleClick(item,'edit')">
+					<view class="list_tow_li" v-for="(item,index) in  dataList2" :key="index">
 						<view class="list_tow_li_t">
 							<view class="list_tow_li_t_l">
 								<img src="@/images/Version3.3.3/icon_xyxc_qx.png"/>
 								<text></text>
 							</view>
-							<view class="list_tow_li_t_c">实验室名称-房间号</view>
-							<view class="list_tow_li_t_c2">已逾期</view>
+							<view class="list_tow_li_t_c">{{item.subjectName}}-{{item.roomNumber}}</view>
+							<view class="list_tow_li_t_c2" v-if="item.isOverdue==1">已逾期</view>
 							<view class="list_tow_li_t_r"></view>
 						</view>
 						<view class="list_tow_li_m">
-							<view class="list_tow_li_m_t">计划标题计划标题计划标题计划标题计划标题计划...</view>
+							<view class="list_tow_li_m_t">{{item.title}}</view>
 							<view class="list_tow_li_m_b">
-								<text class="blue_color">未开始</text>
-								<text>校院巡查</text>
-								<text>环境与测绘学院</text>
+								<text class="blue_color" v-if="item.manageStatus==0">待检查</text>
+								<text class="red_color" v-if="item.manageStatus==1">检查中</text>
+								<text class="green_color" v-if="item.manageStatus==2">已检查</text>
+								<text class="orange_color" v-if="item.rectifyStatus==3">待审核</text>
+								<text>{{item.checkType==1?'校院巡查':'实验室自查'}}</text>
+								<text>{{item.collegeName}}</text>
 							</view>
 						</view>
-						<view class="list_tow_li_b">
-							<text>开始检查</text>
+						<!-- 开始检查 -->
+						<view v-if="item.rectifyStatus==3" class="list_tow_li_b" @click="handleTowClick(item,'check')">复核</view>
+						<view v-if="item.manageStatus==0 && item.notStarted" class="list_tow_li_b" @click="handleTowClick(item,'add')">开始检查</view>
+						<view v-if="item.manageStatus==1" class="list_tow_li_b" @click="handleTowClick(item,'edit')">编辑</view>
+						<view v-if="!item.notStarted" class="list_tow_li_b_tow"><img src="@/images/Version3.3.3/icon_xyxcgl_jhwks.png"/>计划未开始</view>
+						<view v-if="item.manageStatus==2" class="list_tow_li_b_three">
+							<img src="@/images/Version3.3.3/icon_djcsys.png"/>
+							<text>整改进度:</text>
+							<text>{{item.rectifySchedule}}</text>
+							<text class="report">整改报告</text>
 						</view>
 					</view>
 				</view>
@@ -155,14 +166,13 @@
 	</scroll-view>	
 	<view class="bottom_btn"  @click="handleClick('','start')">开展检查</view>
 	<img class="scan_btn" src="@/images/Version3.3.3/icon_xyxc_sm.png"/>
-	
   </view>
 
 </template>
 
 <script>
 import { config } from '@/api/request/config.js'
-import {checkPlanList,getCheckStatusCount} from '@/api/index.js'
+import {checkPlanList,getCheckStatusCount,dataStatistics,checkManageList,checkHazardList} from '@/api/index.js'
 export default {
   name: "rectifyList",
   components: {
@@ -170,26 +180,34 @@ export default {
   },
   data() {
     return {
-	  pageType:0,
+	  pageType:1,
       //列表请求参数
       getData:{
         pageNum:1,
         pageSize:20,
 		checkStatus:1,
       },
-	  total:0,
+	  getData2:{
+	    pageNum:1,
+	    pageSize:20,
+		checkType:'',
+	  	manageStatus:0,//管理状态(-1全部 0待检查,1检查中,2已检查)
+		rectifyStatus:'',
+	  },
+	 
+	  userType:1,//人员类型 3整改人 2检查人 1管理员
 	  statisticsList:[
-		  {name:'本月已检查',value:'20'},
-		  {name:'本月检查隐患',value:'10'},
-		  {name:'本月已整改',value:'5'},
+		  {name:'本月已检查',value:'0'},
+		  {name:'本月检查隐患',value:'0'},
+		  {name:'本月已整改',value:''},
 		  {name:'本月检查合格率',value:'40%'},
-		  {name:'本月已检查',value:'20'},
-		  {name:'本月复核通过率',value:'30%'},
+		  {name:'本月已检查',value:'0'},
+		  {name:'本月复核通过率',value:'0%'},
 	  ],
 	  statisticsListThree:[
-		  {name:'本月已检查',value:'20'},
-		  {name:'本月已整改',value:'60%'},
-		  {name:'本月复核通过率',value:'30%'},
+		  {name:'本月已检查',value:'0'},
+		  {name:'本月已整改',value:'0%'},
+		  {name:'本月复核通过率',value:'0%'},
 	  ],
 	  tabText:[{name:'未开始',num:0,},{name:'进行中',num:0}],
 	  curTab:0,
@@ -197,17 +215,31 @@ export default {
 	  curTabTow:0,
 	  tabTextThree:['隐患待整改','随手拍整改'],
 	  curTabThree:0,
-	  dataList:[],
+	  total:0,
+	  dataList:[],//管理员
+	  total2:0,
+	  dataList2:[],//检查者
+	  currentDate:'',
+	  
     }
   },
   onLoad() {
 
   },
   onShow() {
-      this.getList(); 
+	   //获取当前日期
+	   this.currentDate=this.getNowFormatDate()
   },
   mounted(){
+	 
 	  this.getCheckStatusCount();
+	  this.dataStatistics();
+	  if(this.pageType==0){//管理员
+		   this.getList();
+	  }else if(this.pageType==1){//检查者
+		   this.getList2();
+	  }
+	 
   },
   methods: {
 	  //滚动事件
@@ -238,6 +270,19 @@ export default {
 	  },
 	  tabClickTow(index) {
 	  	this.curTabTow = index;
+		this.getData2.pageNum=1;
+		this.dataList2=[];
+		if(index==0){//未开始
+			this.getData2.manageStatus=0
+			this.getList2()
+		}else if(index==1){//进行中
+			this.getData2.manageStatus=1
+			this.getList2()
+		}else if(index==2){//待复核
+			this.getData2.rectifyStatus=3
+			this.checkHazardList()
+		} 
+		
 	  },
 	  tabClickThree(index) {
 	  	this.curTabThree = index;
@@ -292,6 +337,71 @@ export default {
 		  }
 		  
 	  },
+	  //检查者
+	  handleTowClick(row,doType){
+		  if(doType=='add'){//开始检查
+				uni.navigateTo({
+				    url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
+				});
+		  }else if(doType=='edit'){//编辑
+			  uni.navigateTo({
+			      url: '/pages/pages_safetyExamine/examineManage/examineAdd?id='+row.id
+			  });
+		  }else if(doType=='check'){//复核
+			  
+		  }
+	  },
+	  
+	  //数据统计
+	  async dataStatistics(){
+	      let self = this;
+	      const {data} = await dataStatistics({'userType':this.userType,});
+	      if(data.code==200){
+			  if(this.userType==1 || this.userType==1){//管理员和检查者
+				  this.statisticsList=[
+				  	  {name:'本月已检查',value:data.data.checkTotal},
+				  	  {name:'本月检查隐患',value:data.data.hazardTotal},
+				  	  {name:'本月已整改',value:data.data.rectifyTotal},
+				  	  {name:'本月检查合格率',value:data.data.qualifyRate},
+				  	  {name:'本月整改率',value:data.data. rectificationRate},
+				  	  {name:'本月复核通过率',value:data.data.passRate},
+				  ]
+			  }else if(this.userType==3){//整改者
+				  this.statisticsListThree=[
+				  		{name:'本月已检查',value:data.data.checkTotal},
+				  		{name:'本月已整改',value:data.data.rectifyTotal},
+				  		{name:'本月复核通过率',value:data.data.passRate},
+				  ]
+			  }
+	  			
+	  	  }
+	  },
+	  //获取当前日期函数
+	  getNowFormatDate() {
+	    let date = new Date(),
+	      year = date.getFullYear(), //获取完整的年份(4位)
+	      month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
+	      strDate = date.getDate() // 获取当前日(1-31)
+	    if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
+	    if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
+	   
+	    return `${year}-${month}-${strDate}`
+	  },
+	  //是否可以开始检查
+	   compareTime(date1){
+	          if(!date1){
+	  		   return false
+	  	    } else {
+	  		   const oDate1 = new Date(date1);
+	  		   const oDate2 = new Date(this.currentDate)
+			   
+	  		   if(oDate1.getTime() <= oDate2.getTime()){
+	  			   return true; //可以开始
+	  		   } else {
+	  			   return false; //不能开始
+	  		   }
+	  	    }   
+	  },
 	  //检查计划各检查状态数据数量
 	  async getCheckStatusCount(){
 	      let self = this;
@@ -301,6 +411,7 @@ export default {
 			  this.tabText[1].num=data.data.start;
 	  	  }
 	  },
+	  //管理员
 	  async getList(){
 	      let self = this;
 	      const {data} = await checkPlanList(this.getData);
@@ -308,7 +419,33 @@ export default {
 			  this.dataList=[...this.dataList,...data.data.records]
 			  this.total=data.data.total;
 		  }
-      }
+      },
+	  //检查者
+	  async getList2(){
+	  	let self = this;
+	  	const {data} = await checkManageList(this.getData2);
+	  	if(data.code==200){
+	  		//判断计划是否开始
+	  		data.data.records.forEach(function(item){
+	  			item.notStarted=self.compareTime(item.cycleStartTime)
+	  		})
+	  		this.dataList2=[...this.dataList,...data.data.records]
+	  		this.total2=data.data.total;
+	  	}
+	  },
+	  //待复核列表
+	  async checkHazardList(){
+	  	let self = this;
+	  	const {data} = await checkHazardList(this.getData2);
+	  	if(data.code==200){
+	  		//判断计划是否开始
+	  		data.data.records.forEach(function(item){
+	  			item.notStarted=self.compareTime(item.cycleStartTime)
+	  		})
+	  		this.dataList2=[...this.dataList,...data.data.records]
+	  		this.total2=data.data.total;
+	  	}
+	  },
   }
 }
 </script>
@@ -334,6 +471,11 @@ export default {
 		color: #1FA50D;
 		border: 1rpx solid #1FA50D;
 	}
+	.orange_color{
+		color: #FA8E1B;
+		border: 1rpx solid #FA8E1B;
+	}
+	
 	.statistics{
 		background: #fff;
 		display: flex;
@@ -750,7 +892,7 @@ export default {
 					overflow: hidden;
 					text-overflow:ellipsis;
 					white-space: nowrap;
-					padding-right: 60rpx;
+					padding-right: 120rpx;
 					box-sizing: border-box;
 				}
 				.list_tow_li_t_c2{
@@ -819,7 +961,7 @@ export default {
 					}
 					>text:nth-of-type(3){
 						display: inline-block;
-						width: 380rpx;
+						width: 350rpx;
 						font-size: 26rpx;
 						font-family: PingFang SC-Medium, PingFang SC;
 						font-weight: 400;
@@ -838,16 +980,76 @@ export default {
 				position: absolute;
 				top: 278rpx;
 				left: 0;
+				border-top: 1rpx solid #E0E0E0;
+				font-size: 28rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 80rpx;
+				text-align: center;
+			}
+			.list_tow_li_b_tow{
+				height: 80rpx;
+				width: 100%;
+				position: absolute;
+				top: 278rpx;
+				left: 0;
+				border-top: 1rpx solid #E0E0E0;
+				font-size: 28rpx;
+				font-family: PingFang SC-Medium, PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 80rpx;
 				display: flex;
 				justify-content: center;
 				align-items: center;
+				>img{
+					width: 28rpx;
+					height: 30rpx;
+					margin-right: 12rpx;
+				}
+			}
+			.list_tow_li_b_three{
+				height: 80rpx;
+				position: absolute;
+				top: 278rpx;
+				left: 0;
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				width: 100%;
+				border-top: 1rpx solid #E0E0E0;
+				>img{
+					width: 24rpx;
+					height: 30rpx;
+					margin-right: 26rpx;
+					margin-left: 30rpx;
+				}
 				>text:nth-of-type(1){
-					font-size: 26rpx;
+					font-size: 28rpx;
 					font-family: PingFang SC-Medium, PingFang SC;
 					font-weight: 400;
 					color: #333333;
-					line-height: 26rpx;
-					
+					line-height: 28rpx;
+				}
+				>text:nth-of-type(2){
+					flex:1;
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #0183FA;
+					line-height: 28rpx;
+					white-space: nowrap;
+					overflow: hidden;
+					text-overflow: ellipsis;
+				}
+				.report{
+					font-size: 28rpx;
+					font-family: PingFang SC-Medium, PingFang SC;
+					font-weight: 400;
+					color: #0183FA;
+					line-height: 28rpx;
+					margin-right: 40rpx;
 				}
 			}
 		}