dedsudiyu 2 rokov pred
rodič
commit
dd26fba788

+ 63 - 0
src/api/safetyCheck/index.js

@@ -277,6 +277,8 @@ export function checkManageList(data) {
 
 //检查计划-查询管理详情接口
 //自查任务-查询管理详情接口
+//自查任务-查询管理计划详情接口
+//自查任务-查询管理任务详情接口
 export function findCheckManage(query) {
   return request({
     url: '/zd-security/checkManage/findCheckManage',
@@ -391,6 +393,7 @@ export function checkPlanUpdate(data) {
 }
 
 
+
 /***************************校院巡察组***************************/
 
 //校院巡察组-分页获取校院巡查组列表
@@ -456,6 +459,66 @@ export function findGroupList(data) {
 }
 //校院巡察组-获取巡察组下拉列表ID获取巡查组人员
 
+/***************************安全隐患***************************/
+
+//安全隐患-校院巡察/实验室自查-安全隐患列表
+//安全隐患-校院巡察/批量审核列表
+export function checkHazardList(query) {
+  return request({
+    url: '/zd-security/checkHazard/list',
+    method: 'get',
+    params: query
+  })
+}
+
+//安全隐患-暂无法整改列表数据
+export function unableRectifyList(query) {
+  return request({
+    url: '/zd-security/checkHazard/unableRectifyList',
+    method: 'get',
+    params: query
+  })
+}
+
+//安全隐患-批量审核
+export function batchApprove(data) {
+  return request({
+    url: '/zd-security/checkRectify/batchApprove',
+    method: 'post',
+    data: data
+  })
+}
+
+//安全隐患-隐患详情
+export function getHazardById(query) {
+  return request({
+    url: '/zd-security/checkHazard/getHazardById',
+    method: 'get',
+    params: query
+  })
+}
+
+//安全隐患-隐患整改-隐患审核
+export function addOrApprove(data) {
+  return request({
+    url: '/zd-security/checkRectify/addOrApprove',
+    method: 'post',
+    data: data
+  })
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 

+ 2 - 2
src/views/safetyCheck/checkConfiguration/configDialog.vue

@@ -191,11 +191,11 @@
           },
           {
             key:"3",
-            label:"全部老师",
+            label:"老师",
           },
           {
             key:"4",
-            label:"全部学生",
+            label:"学生",
           },
         ],
         checkType:false,

+ 205 - 188
src/views/safetyCheck/components/infoDialog/infoDialog.vue

@@ -1,20 +1,31 @@
 <!--
 
+  <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
+
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
 
   components: {
     infoDialog,
   },
 
-  <infoDialog v-if="infoDialogType"></infoDialog>
 
   infoDialogType:false,
+  propsInfoDialogData:{},
 
 
   //开关详情页面
   addDialogOpen(type,data){
     if(this.infoDialogType != type){
-      this.$set(this,'infoDialogType',type);
+      if(type){
+        let obj = {
+          id:data.id
+        }
+        this.$set(this,'propsInfoDialogData',obj);
+        this.$set(this,'infoDialogType',type);
+      }else{
+        this.getList();
+        this.$set(this,'infoDialogType',type);
+      }
     }
   },
 
@@ -23,14 +34,15 @@
   <el-dialog class="safetyHazard-info-dialog-box" @close="outDialog"
              :title="infoDialogTitle" :visible.sync="infoDialogType" v-if="infoDialogType"
              width="1184px" append-to-body>
-    <div class="info-dialog-title-box">
+    <div class="info-dialog-title-box scrollbar-box">
       <div class="info-dialog-for-title-box" @click="checkTitleButton('info')" :class="infoDialogCheckIndex == 'info'?'info-dialog-for-check':''">
         <p>隐患检查</p>
         <p></p>
       </div>
       <div class="info-dialog-for-title-box" :class="infoDialogCheckIndex == index?'info-dialog-for-check':''"
-           @click="checkTitleButton(index)" v-for="(item,index) in infoDialogList" :key="index">
-        <p>{{item.name}}</p>
+           @click="checkTitleButton(index)" v-for="(item,index) in infoDialogData.checkRectifyApplyList" :key="index">
+        <!--<p>{{item.applyFlag==1?'隐患整改':(item.applyFlag==2?'整改复核':'')}}</p>-->
+        <p>{{item.titleName}}</p>
         <p></p>
       </div>
       <div class="info-dialog-for-title-box" v-if="addFormType == 1 || addFormType == 2" @click="checkTitleButton('add')" :class="infoDialogCheckIndex == 'add'?'info-dialog-for-check':''">
@@ -42,65 +54,65 @@
       <div class="info-dialog-content-info" v-if="infoDialogCheckIndex == 'info' && imgDocumentType == 0">
         <div class="text-box-box">
           <p>计划标题</p>
-          <p>{{infoDialogData.data1}}</p>
+          <p>{{infoDialogData.title}}</p>
         </div>
         <div class="text-box-two-box">
           <div>
             <p>检查类型</p>
-            <p>{{infoDialogData.data2}}</p>
+            <p>{{infoDialogData.checkType==1?'校园巡查':(infoDialogData.checkType==2?'实验室自查':'')}}</p>
           </div>
           <div>
-            <p>任务周期</p>
-            <p>{{infoDialogData.data3}}</p>
+            <p>{{infoDialogData.checkType==1?'计划周期':(infoDialogData.checkType==2?'任务周期':'')}}</p>
+            <p>{{infoDialogData.cycleStartTime}} 至 {{infoDialogData.cycleEndTime}}</p>
           </div>
         </div>
         <div class="text-box-two-box">
           <div>
             <p>学院</p>
-            <p>{{infoDialogData.data4}}</p>
+            <p>{{infoDialogData.collegeName}}</p>
           </div>
           <div>
             <p>实验室</p>
-            <p>{{infoDialogData.data5}}</p>
+            <p>{{infoDialogData.subjectName}} - {{infoDialogData.roomNumber}}</p>
           </div>
         </div>
         <div class="text-box-two-box">
           <div>
             <p>楼栋</p>
-            <p>{{infoDialogData.data6}}</p>
+            <p>{{infoDialogData.buildName}}</p>
           </div>
         </div>
         <div class="text-box-box">
           <p>检查要求</p>
-          <p>{{infoDialogData.data7}}</p>
+          <p>{{infoDialogData.checkDemand}}</p>
         </div>
         <div class="text-box-two-box">
           <div>
             <p>检查结果</p>
-            <p>{{infoDialogData.data8}}</p>
+            <p>{{infoDialogData.checkResult==0?'不符合':(infoDialogData.checkResult==1?'符合':'')}}</p>
           </div>
           <div>
             <p>整改期限</p>
-            <p>{{infoDialogData.data9}}</p>
+            <p>{{infoDialogData.rectifyDeadline}}</p>
           </div>
         </div>
         <div class="button-box">
-          <p>整改通知书?整改告知书</p>
+          <p>{{infoDialogData.rectifyNotice == 1?'整改告知书':(infoDialogData.rectifyNotice == 2?'整改通知书':'')}}</p>
           <p class="inquire-button-one" @click="lookDocument(1,infoDialogData.data18)">查看</p>
           <p class="add-button-one-90">下载</p>
         </div>
         <div class="text-box-two-box">
           <div>
             <p>检查者</p>
-            <p>{{infoDialogData.data10}}</p>
+            <p>{{infoDialogData.checkUser}}</p>
           </div>
           <div>
-            <p>创建时间</p>
-            <p>{{infoDialogData.data11}}</p>
+            <p>检查时间</p>
+            <p>{{infoDialogData.checkTime}}</p>
           </div>
         </div>
         <div class="table-box">
-          <p class="table-title-p">第1隐患项</p>
+          <p class="table-title-p">隐患项</p>
           <div class="table-min">
             <div class="left-box">
               <p></p>
@@ -109,9 +121,9 @@
             </div>
             <div class="right-box text-two-box">
               <p></p>
-              <p>{{infoDialogData.data12}}</p>
+              <p>{{infoDialogData.checkHazardApplyDto.hazardCheckProStr}}</p>
               <p></p>
-              <p>此检查项在当前实验室累计出现 <span>{{infoDialogData.data13}}</span> 次隐患</p>
+              <p v-if="infoDialogData.checkHazardApplyDto.hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{infoDialogData.checkHazardApplyDto.hazardCheckCount}}</span> 次隐患</p>
               <p></p>
             </div>
           </div>
@@ -123,7 +135,7 @@
             </div>
             <div class="right-box text-box">
               <p></p>
-              <p>{{infoDialogData.data14}}</p>
+              <p>{{infoDialogData.checkHazardApplyDto.hazardDescribe}}</p>
               <p></p>
             </div>
           </div>
@@ -135,7 +147,7 @@
             </div>
             <div class="right-box text-box">
               <p></p>
-              <p>{{infoDialogData.data15}}</p>
+              <p>{{infoDialogData.checkHazardApplyDto.hazardLevel==0?'一般隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==2?'管理问题':''))}}</p>
               <p></p>
             </div>
           </div>
@@ -147,7 +159,7 @@
             </div>
             <div class="right-box text-box">
               <p></p>
-              <p>{{infoDialogData.data16}}</p>
+              <p>{{infoDialogData.checkHazardApplyDto.hazardCheckPoint}}</p>
               <p></p>
             </div>
           </div>
@@ -158,63 +170,63 @@
               <p></p>
             </div>
             <div class="right-box img-box">
-              <img src="" v-for="(imgItem,index) in infoDialogData.data17" :key="index" @click="lookImg(infoDialogData.data17,index)">
+              <img :src="imgItem.fileUrl" v-for="(imgItem,index) in infoDialogData.checkHazardApplyDto.uploadDtoList" :key="index" @click="lookImg(infoDialogData.data17,index)">
             </div>
           </div>
         </div>
       </div>
       <div class="info-dialog-content-type" v-if="infoDialogCheckIndex == index && imgDocumentType == 0"
-           v-for="(item,index) in infoDialogList" :key="index">
+           v-for="(item,index) in infoDialogData.checkRectifyApplyList" :key="index">
         <!--已整改-->
-        <div class="has-rectification" v-if="item.rectificationType == 1">
+        <div class="has-rectification" v-if="item.applyFlag == 1">
           <div class="button-box">
             <p>整改结果</p>
-            <p>{{item.dataA}}</p>
+            <p>{{item.rectifyResult == 1?'已整改':(item.rectifyResult == 0?'暂无法整改':'')}}</p>
           </div>
           <div class="text-box">
             <p>整改措施</p>
-            <p>{{item.dataB}}</p>
+            <p>{{item.rectifyMeasure}}</p>
           </div>
           <div class="img-box">
             <p>整改照片</p>
             <div>
-              <img :src="imgItem.url" @click="lookImg(item.lookImgList,imgIndex)"
-                   v-for="(imgItem,imgIndex) in item.lookImgList" :key="imgIndex">
+              <img :src="imgItem.fileUrl" @click="lookImg(item.lookImgList,imgIndex)"
+                   v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
             </div>
           </div>
           <div class="text-box-two">
             <div>
               <p>整改人</p>
-              <p>{{item.dataC}}</p>
+              <p>{{item.createName}}</p>
             </div>
             <div style="margin-left:26px;">
               <p>整改时间</p>
-              <p>{{item.dataD}}</p>
+              <p>{{item.createTime}}</p>
             </div>
           </div>
         </div>
         <!--已审核-->
-        <div class="has-inspection" v-if="item.rectificationType == 2">
+        <div class="has-inspection" v-if="item.applyFlag == 2">
           <div class="type-box">
             <p>审核结果</p>
-            <img v-if="item.dataE == 1" src="@/assets/ZDimages/safetyCheck/icon_zcgl_cg.png">
-            <img v-else src="@/assets/ZDimages/safetyCheck/icon_zcgl_sb.png">
+            <img v-if="item.examineResult == 0" src="@/assets/ZDimages/safetyCheck/icon_zcgl_sb.png">
+            <img v-if="item.examineResult == 1" src="@/assets/ZDimages/safetyCheck/icon_zcgl_cg.png">
           </div>
           <div class="text-box">
             <p>审核意见</p>
-            <p>{{item.dataF}}</p>
+            <p>{{item.examineOpinion}}</p>
           </div>
           <div class="text-box-two">
             <div>
               <p>审核人</p>
-              <p>{{item.dataG}}</p>
+              <p>{{item.reviewedName}}</p>
             </div>
             <div style="margin-left:26px;">
               <p>审核时间</p>
-              <p>{{item.dataH}}</p>
+              <p>{{item.reviewedTime}}</p>
             </div>
           </div>
-          <div class="button-box">
+          <div class="button-box" v-if="item.examineResult == 1">
             <p>整改报告书</p>
             <p class="inquire-button-one" @click="lookDocument(2,item.dataL)">查看</p>
             <p class="add-button-one-90">下载</p>
@@ -222,29 +234,29 @@
         </div>
       </div>
       <div class="info-dialog-content-add" v-if="infoDialogCheckIndex == 'add' && imgDocumentType == 0">
-        <el-form  :model="addForm" :rules="rules" label-width="90px">
+        <el-form ref="addForm" :model="addForm" :rules="rules" label-width="90px">
           <!--待整改-->
           <div class="stay-rectification" v-if="addFormType == 1">
-            <el-form-item label="整改结果" prop="dataZ">
-              <el-radio-group v-model="addForm.dataZ">
-                <el-radio :label="0">已整改</el-radio>
-                <el-radio :label="1">暂无法整改</el-radio>
+            <el-form-item label="整改结果" prop="rectifyResult">
+              <el-radio-group v-model="addForm.rectifyResult">
+                <el-radio :label="1">已整改</el-radio>
+                <el-radio :label="0">暂无法整改</el-radio>
               </el-radio-group>
             </el-form-item>
-            <el-form-item label="原因描述" prop="dataX">
+            <el-form-item :label="addForm.rectifyResult==1?'整改措施':'原因描述'" prop="rectifyMeasure">
               <el-input
                 type="textarea"
                 :autosize="{ minRows: 4, maxRows: 4}"
-                placeholder="请输入原因描述"
+                :placeholder="addForm.rectifyResult==1?'请输入整改措施':'请输入原因描述'"
                 resize="none"
                 maxlength="100"
                 show-word-limit
-                v-model="addForm.dataX">
+                v-model="addForm.rectifyMeasure">
               </el-input>
             </el-form-item>
-            <el-form-item label="上传照片" prop="upImgList">
-              <div class="for-img-box" v-for="(img,imgIndex) in addForm.upImgList" :key="imgIndex">
-                <img class="for-img" :src="img.url"  @click="lookImg(addForm.upImgList,imgIndex)">
+            <el-form-item label="上传照片" prop="uploadDtoList">
+              <div class="for-img-box" v-for="(img,imgIndex) in addForm.uploadDtoList" :key="imgIndex">
+                <img class="for-img" :src="img.fileUrl"  @click="lookImg(addForm.uploadDtoList,imgIndex)">
                 <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
               </div>
               <el-upload
@@ -262,7 +274,7 @@
           </div>
           <!--待审核-->
           <div class="stay-inspection" v-if="addFormType == 2">
-            <el-form-item label="审核意见" prop="dataY">
+            <el-form-item label="审核意见" prop="examineOpinion">
               <el-input
                 type="textarea"
                 :autosize="{ minRows: 4, maxRows: 4}"
@@ -270,7 +282,7 @@
                 resize="none"
                 maxlength="100"
                 show-word-limit
-                v-model="addForm.dataY">
+                v-model="addForm.examineOpinion">
               </el-input>
             </el-form-item>
             <div class="quick-selection-box">
@@ -282,7 +294,7 @@
         </el-form>
       </div>
       <div class="info-dialog-content-img" v-if="imgDocumentType == 1">
-        <img :src="imgList[imgIndex].url">
+        <img :src="imgList[imgIndex].fileUrl">
         <p class="el-icon-arrow-left left-button-p" @click="infoLeftButton"></p>
         <p class="el-icon-arrow-right right-button-p" @click="infoRightButton"></p>
         <p class="bottom-num-text">{{imgIndex+1}} / {{imgList.length}}</p>
@@ -320,18 +332,22 @@
     <div class="bottom-button-box dialog-footer-box" v-if="infoDialogCheckIndex == 'add'">
       <p class="dialog-footer-button-null"></p>
       <p class="dialog-footer-button-info" @click="outDialog">取消</p>
-      <p class="dialog-footer-button-primary" v-if="addFormType==1">提交</p>
-      <p class="dialog-footer-button-border" v-if="addFormType==2">驳回</p>
-      <p class="dialog-footer-button-primary" v-if="addFormType==2">通过</p>
+      <p class="dialog-footer-button-primary" v-if="addFormType==1" @click="upDataButton(1)">提交</p>
+      <p class="dialog-footer-button-border" v-if="addFormType==2" @click="upDataButton(2)">驳回</p>
+      <p class="dialog-footer-button-primary" v-if="addFormType==2" @click="upDataButton(3)">通过</p>
       <p class="dialog-footer-button-null"></p>
     </div>
   </el-dialog>
 </template>
 
 <script>
+  import { getHazardById,addOrApprove } from '@/api/safetyCheck/index'
   import { getToken } from "@/utils/auth";
   export default {
     name: 'infoDialog',
+    props:{
+      propsInfoDialogData:{},
+    },
     data(){
       return{
         upDataName:"",
@@ -340,115 +356,11 @@
           Authorization: "Bearer " + getToken(),
         },
         infoDialogTitle:"编辑",
-        infoDialogType:true,
+        infoDialogType:false,
         //img 与 document 展示状态
         imgDocumentType:0,
         infoDialogCheckIndex:'info',
-        infoDialogData:{
-          data1:"2023年3月份校级督导检查",
-          data2:"校园巡查",
-          data3:"2023-01-01至2024-01-01",
-          data4:"环境与测绘学院",
-          data5:"管制类化学品暂存库 - A103",
-          data6:"实验大楼",
-          data7:"全部检查",
-          data8:"不符合",
-          data9:"2023-01-01",
-          data10:"李小三",
-          data11:"2023-01-01  13:00",
-          data12:"1 检查项目名称 — 1.1 检查项目名称名称名称名称 — 1.1.1 检查项目名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称名称",
-          data13:"9",
-          data14:"现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患信息隐患信息现场隐患",
-          data15:"一般隐患",
-          data16:"检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要点内容检查要",
-          data17:[
-            {name:"1",url:'https://img2.baidu.com/it/u=3219906533,2982923681&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500'},
-            {name:"2",url:'https://img1.baidu.com/it/u=567782244,1695500002&fm=253&fmt=auto&app=138&f=JPEG?w=753&h=500'},
-            {name:"3",url:'https://img1.baidu.com/it/u=2995157981,91041597&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=750'},
-            {name:"4",url:'https://img0.baidu.com/it/u=561734853,2461096286&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500'},
-            {name:"5",url:'https://img2.baidu.com/it/u=567357414,4240886412&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500'},
-          ],
-          data18:[
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            },
-            {
-              name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-              url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-            }
-          ],
-        },
-        infoDialogList:[
-          {
-            name:"隐患整改",
-            rectificationType:1,
-            dataA:"已整改",
-            dataB:"已更换电源",
-            dataC:"李腾腾",
-            dataD:"2023-03-26  14:00",
-            lookImgList:[
-              {name:"1",url:'https://img2.baidu.com/it/u=3219906533,2982923681&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500'},
-              {name:"2",url:'https://img1.baidu.com/it/u=567782244,1695500002&fm=253&fmt=auto&app=138&f=JPEG?w=753&h=500'},
-              {name:"3",url:'https://img1.baidu.com/it/u=2995157981,91041597&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=750'},
-              {name:"4",url:'https://img0.baidu.com/it/u=561734853,2461096286&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500'},
-              {name:"5",url:'https://img2.baidu.com/it/u=567357414,4240886412&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=500'},
-            ],
-          },
-          {
-            name:"整改复核",
-            rectificationType:2,
-            dataE:"1",
-            dataF:"请补充照片",
-            dataG:"李腾腾",
-            dataH:"2023-03-26  14:00",
-            dataL:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",
-          },
-        ],
+        infoDialogData:{},
         //图片
         imgList:[],
         imgIndex:0,
@@ -458,24 +370,27 @@
         iframeSrcIndex:0,
         iframeSrcList:[],
         // 提交数据
-        addFormType:"2",//1整改 2审核
-        addFormTitle:"二次整改",
+        addFormType:null,//1整改 2审核 默认NULL 回调数据内判定当前状态
+        addFormTitle:null,
         addForm:{
-          dataZ:1,
-          dataX:"已更换电源",
-          dataY:"",
-          upImgList:[],
+          rectifyResult:'',
+          rectifyMeasure:'',
+          uploadDtoList:[],
+          examineOpinion:'',
         },
         rules: {
-          dataZ: [
-            { required: true, message: "请选择隐患等级", trigger: "change" },
+          rectifyResult: [
+            { required: true, message: "请选择整改结果", trigger: "change" },
+          ],
+          uploadDtoList: [
+            { required: true, message: "请选择上传图片", trigger: "change" },
           ],
-          dataX: [
-            { required: true, message: "请选择检查项目", trigger: "change" },
-            { required: true, message: "请输入隐患描述", validator: this.spaceJudgment, trigger: "change" },
+          rectifyMeasure: [
+            { required: true, message: '请输入内容', trigger: "change" },
+            { required: true, message: '请输入内容', validator: this.spaceJudgment, trigger: "change" },
           ],
-          dataY: [
-            { required: true, message: "请输入隐患描述", trigger: "change" },
+          examineOpinion: [
+            { required: true, message: "请输入内容", trigger: "change" },
           ],
         },
         //快速选择
@@ -486,9 +401,85 @@
 
     },
     mounted(){
-
+      this.getHazardById();
     },
     methods:{
+      //提交
+      upDataButton(type){
+        this.$refs["addForm"].validate(valid => {
+          if (valid) {
+            let obj = JSON.parse(JSON.stringify(this.addForm));
+            if(type == 1){
+              //整改
+              obj.checkHazardId = this.infoDialogData.checkHazardApplyDto.id
+              delete obj.examineOpinion
+            }else if(type != 1){
+              //审核
+              obj.id = this.infoDialogData.checkRectifyApplyList[this.infoDialogData.checkRectifyApplyList.length-1].id;
+              obj.examineResult = type==2?0:(type==3?1:'');
+              delete obj.rectifyResult
+              delete obj.rectifyMeasure
+              delete obj.uploadDtoList
+            }
+            addOrApprove(obj).then(response => {
+              this.msgSuccess(response.msg);
+              this.$parent.addDialogOpen(false);
+            })
+          }
+        })
+      },
+      //获取详情
+      getHazardById(){
+        getHazardById({id:this.propsInfoDialogData.id}).then(response => {
+          console.log('response.data.checkRectifyApplyList[0]',response.data.checkRectifyApplyList)
+          if(response.data.checkRectifyApplyList[0]){
+            if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].applyFlag == 1){
+              if(response.data.checkHazardApplyDto.applyGentle){
+                //已整改
+                this.$set(this,'addFormType',2)
+                if(response.data.checkRectifyApplyList.length>2){
+                  this.$set(this,'addFormTitle',this.frequencyCalculation(response.data.checkRectifyApplyList.length,2)+'复核')
+                }else{
+                  this.$set(this,'addFormTitle','整改复核')
+                }
+              }
+            }else if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].applyFlag == 2){
+              if(response.data.checkHazardApplyDto.rectifyGentle){
+                //已复核
+                if(response.data.checkRectifyApplyList[response.data.checkRectifyApplyList.length-1].examineResult == 0){
+                  //复核驳回
+                  this.$set(this,'addFormType',1)
+                  if(response.data.checkRectifyApplyList.length>1){
+                    this.$set(this,'addFormTitle',this.frequencyCalculation(response.data.checkRectifyApplyList.length,1)+'整改')
+                  }else{
+                    this.$set(this,'addFormTitle','隐患整改')
+                  }
+                }
+              }
+            }
+          }else{
+            if(response.data.checkHazardApplyDto.rectifyGentle){
+              //初次整改
+              this.$set(this,'addFormType',1)
+              this.$set(this,'addFormTitle','隐患整改')
+            }
+          }
+          for(let i=0;i<response.data.checkRectifyApplyList.length;i++){
+            console.log("i=",i);
+            if(i == 0){
+              response.data.checkRectifyApplyList[i].titleName = '隐患整改'
+            }else if(i == 1){
+              response.data.checkRectifyApplyList[i].titleName = '整改复核'
+            }else{
+              let nameLeft = this.frequencyCalculation(i,response.data.checkRectifyApplyList[i].applyFlag);
+              let nameRight = response.data.checkRectifyApplyList[i].applyFlag == 1?'整改':'复核';
+              response.data.checkRectifyApplyList[i].titleName = nameLeft+nameRight;
+            }
+          }
+          this.$set(this,'infoDialogData',response.data);
+          this.$set(this,'infoDialogType',true);
+        });
+      },
       //标签切换
       checkTitleButton(index){
         if(this.infoDialogCheckIndex != index){
@@ -498,12 +489,11 @@
       },
       //快速选择内容
       stayInspectionClick(val){
-        this.$set(this.addForm,'dataY',val);
+        this.$set(this.addForm,'examineOpinion',val);
       },
       //点击查看文档
       lookDocument(type,data){
         if(type == 1){
-          console.log('data',data)
           this.$set(this,'iframeSrcIndex',0);
           this.$set(this,'iframeSrcList',data);
           this.$set(this,'iframeSrc',this.urlJudge(data[0].url));
@@ -543,7 +533,7 @@
       },
       /*==========上传相关==========*/
       handleAvatarSuccess(res,item) {
-        if(item.upImgList.length>4){
+        if(item.uploadDtoList.length>4){
           this.msgError('最多只可上传5张')
           return
         }
@@ -555,14 +545,15 @@
           return
         }
         let obj ={
-          name:this.upDataName,
-          url:res.data.url,
+          fileName:this.upDataName,
+          fileUrl:res.data.url,
+          fileType:2,
         };
-        item.upImgList.push(obj);
+        item.uploadDtoList.push(obj);
         this.$forceUpdate()
       },
       beforeAvatarUpload(file,item) {
-        if(item.upImgList.length>4){
+        if(item.uploadDtoList.length>4){
           this.msgError('最多只可上传5张')
           return false
         }
@@ -582,12 +573,32 @@
       },
       // 删除图片
       delImg(imgIndex){
-        this.addForm.upImgList.splice(imgIndex,1);
+        this.addForm.uploadDtoList.splice(imgIndex,1);
       },
       //退出
       outDialog(){
         this.$parent.addDialogOpen(false);
       },
+      //多次名称匹配
+      frequencyCalculation(length,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
+            }
+          }
+        }
+      },
     },
   }
 </script>
@@ -603,6 +614,10 @@
     .info-dialog-title-box{
       border-bottom:1px solid #E0E0E0;
       padding:0 30px;
+      overflow-x: scroll;
+      overflow-y: hidden;
+      height:80px;
+      white-space: nowrap;
       .info-dialog-for-title-box{
         height:80px;
         width: 80px;
@@ -654,12 +669,13 @@
             font-size:16px;
           }
           p:nth-child(2){
-            width:933px;
-            padding:0 20px;
+            width:928px;
+            padding:10px 20px;
             overflow: hidden;
             background: #F5F5F5;
             border-radius:4px;
             font-size:14px;
+            line-height:20px;
           }
         }
         .text-box-two-box{
@@ -977,6 +993,7 @@
                 padding:0 20px;
                 background-color: #F5F5F5;
                 border-radius:4px;
+                overflow: hidden;
               }
             }
 

+ 25 - 3
src/views/safetyCheck/components/infoPage/infoPage.vue

@@ -164,19 +164,23 @@
       </el-form>
     </div>
     <lookImgDialog ref="lookImgDialog"></lookImgDialog>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
     <lookDocumentDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDialog>
     <lookDocumentListDialog v-if="lookDocumentListType" :propsLookDocumentListData="propsLookDocumentListData"></lookDocumentListDialog>
   </div>
 </template>
 
 <script>
+  import { findCheckManage } from '@/api/safetyCheck/index'
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
   import lookDocumentDialog from '@/components/lookDocumentDialog/lookDocumentDialog.vue'
   import lookDocumentListDialog from '@/components/lookDocumentDialog/lookDocumentListDialog.vue'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   export default {
     name: 'infoPage',
+    props:{
+      propsInfoData:{},
+    },
     components: {
       lookImgDialog,
       infoDialog,
@@ -190,6 +194,7 @@
         propsLookDocumentData:{},
         lookDocumentListType:false,
         propsLookDocumentListData:{},
+        propsInfoDialogData:{},
         //页面
         imgType:1,
         infoDialogType:false,
@@ -280,12 +285,29 @@
       }
     },
     created(){},
-    mounted(){},
+    mounted(){
+      this.findCheckManage();
+    },
     methods:{
+      //查询详情
+      findCheckManage(){
+        findCheckManage({id:this.propsInfoData.id}).then(response => {
+          this.$set(this,'addForm',response.data);
+        });
+      },
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
       //返回事件

+ 13 - 5
src/views/safetyCheck/rectificationReport/index.vue

@@ -81,7 +81,7 @@
                   @pagination="getList"
       />
     </div>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
     <lookDocumentDialog v-if="lookDocumentType" :propsLookDocumentData="propsLookDocumentData"></lookDocumentDialog>
   </div>
 </template>
@@ -103,6 +103,7 @@
         infoDialogType:false,
         lookDocumentType:false,
         propsLookDocumentData:{},
+        propsInfoDialogData:{},
         deptSelectList:[],
         queryParams:{
           pageNum:1,
@@ -111,9 +112,7 @@
           searchValue:'',
         },
         dateRange:[],
-        tableList:[{
-          name:"我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容我是内容",
-          url:"statics/bigFile/2023022011/f23a32c8-bf8e-40b5-9e52-04cf73fc6037.docx",},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        tableList:[],
         total:0,
         selectedNum:0,
         ids:[],
@@ -151,7 +150,16 @@
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
       //查看单个文档

+ 170 - 33
src/views/safetyCheck/safetyHazard/batchAudit.vue

@@ -19,7 +19,7 @@
               v-model="dateRange"
               size="small"
               style="width: 240px"
-              value-format="yyyy-MM-dd"
+              value-format="examineOpinion-MM-dd"
               type="daterange"
               range-separator="-"
               start-placeholder="开始日期"
@@ -37,16 +37,24 @@
                    @selection-change="tableChange" :row-key="getRowKeys">
           <el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="220"/>
-          <el-table-column label="安全负责人" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-          <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="整改期限" sortable align="center" prop="deptName" show-overflow-tooltip width="110"/>
-          <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="操作" align="center" prop="deptName" width="80">
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+          <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
+          <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+          <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
+          <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
+          <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="130"/>
+          <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="110">
+            <template slot-scope="scope">
+              <p :class="scope.row.rectifyStatus==1?'rectifyStatusColorA':(scope.row.rectifyStatus==2?'rectifyStatusColorB':(scope.row.rectifyStatus==3?'rectifyStatusColorC':''))">{{scope.row.rectifyStatus==1?'已完成':(scope.row.rectifyStatus==2?'待整改':(scope.row.rectifyStatus==3?'待复核':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="220">
+            <template slot-scope="scope">
+              <p>{{scope.row.rectifyTime}}<span v-if="scope.row.overdueStatus==1" style="margin-left:10px;color:#EE0606;">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="审核状态" align="center" prop="examineResult" show-overflow-tooltip width="80"/>
+          <el-table-column label="操作" align="center" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -67,51 +75,150 @@
       <div class="dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
         <p class="dialog-footer-button-info" @click="outButton">返回</p>
-        <p class="dialog-footer-button-primary">确认</p>
+        <p class="dialog-footer-button-primary" @click="openDialogPage(1)">确认</p>
         <p class="dialog-footer-button-null"></p>
       </div>
     </div>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
+    <el-dialog class="inspectionPlan-dialog-box"
+               title="批量审核" :visible.sync="dialogType" v-if="dialogType"
+               @close="openDialogPage(2)" width="1303px" append-to-body>
+
+      <el-table border :data="dialogTableList">
+        <el-table-column label="序号" align="center"  type="index" width="60" />
+        <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+        <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
+        <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+        <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
+        <el-table-column label="操作" align="center" prop="examineResult" width="140">
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.examineResult" placeholder="请选择">
+              <el-option
+                v-for="item in dialogOptions"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column label="审核意见" align="center" prop="examineOpinion" width="400">
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.examineOpinion" placeholder="请输入审核意见" maxLength="100"></el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
+        <p class="dialog-footer-button-null"></p>
+        <p class="dialog-footer-button-info" @click="openDialogPage(2)">返回</p>
+        <p class="dialog-footer-button-primary" @click="dialogButton">批量审核</p>
+        <p class="dialog-footer-button-null"></p>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
+  import { checkHazardList,batchApprove } from '@/api/safetyCheck/index'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   export default {
     name: 'batchAudit',
+    props:{
+      propsBatchAuditData:{},
+    },
     components: {
       infoDialog
     },
     data(){
       return{
+        //组件传参
+        propsInfoDialogData:{},
         infoDialogType:false,
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          safetyType:"",
-          timeType:0,
+          rectifyStatus:3,
           searchValue:"",
-          data1:""
         },
         dateRange:[],
-        tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        tableList:[],
         total:0,
         tableNum:0,
         tableIds:[],
+        //审批弹窗数据
+        dialogType:false,
+        dialogTableList:[],
+        dialogOptions:[
+          {value:"0",label:"驳回"},
+          {value:"1",label:"通过"},
+        ],
       }
     },
     created(){
 
     },
     mounted(){
-
+      this.getList();
     },
     methods:{
+      //批量审核
+      dialogButton(){
+        let self = this;
+        let list = [];
+        for(let i=0;i<self.dialogTableList.length;i++){
+          if(!self.dialogTableList[i].examineResult){
+            this.msgError('第'+(i+1)+'条数据,未选择审核结果')
+            return
+          }
+          if(!self.dialogTableList[i].examineOpinion){
+            this.msgError('第'+(i+1)+'条数据,未输入审核意见')
+            return
+          }
+          let obj = {
+            id:self.dialogTableList[i].rectifyId,
+            checkHazardId:self.dialogTableList[i].id,
+            examineResult:self.dialogTableList[i].examineResult,
+            examineOpinion:self.dialogTableList[i].examineOpinion,
+
+          };
+          list.push(obj);
+        }
+        batchApprove(list).then(response => {
+          this.msgSuccess(response.msg)
+          this.$parent.goPage(3);
+        });
+      },
+      //批量审核弹窗
+      openDialogPage(type){
+        if(type == 1){
+          if(!this.$refs.multipleTable.selection[0]){
+            this.msgError('请勾选需要审批的数据')
+            return
+          }
+          let list = JSON.parse(JSON.stringify(this.$refs.multipleTable.selection));
+          for(let i=0;i<list.length;i++){
+            list[i].examineResult = '';
+            list[i].examineOpinion = '';
+          }
+          this.$set(this,'dialogTableList',list);
+          this.$set(this,'dialogType',true);
+        }else{
+          this.$set(this,'dialogType',false);
+        }
+      },
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
       //返回
@@ -120,18 +227,41 @@
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'checkTime'){
+          this.$set(this.queryParams,'checkTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyTime'){
+          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyDeadline'){
+          this.$set(this.queryParams,'zgTermOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0];
+        }else{
+          obj.beginTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        obj.hazardType = this.propsBatchAuditData.hazardType
+        checkHazardList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -144,10 +274,8 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          rectifyStatus:3,
           searchValue:"",
-          data1:""
         });
         this.handleQuery();
       },
@@ -156,7 +284,7 @@
         需要在selection 添加 :reserve-selection="true"
       */
       getRowKeys(row) {
-        return row.userId
+        return row.id
       },
       tableChange(selection){
         this.tableNum = selection.length;
@@ -222,6 +350,15 @@
         flex-direction: column;
         padding:0 20px 20px;
         overflow: hidden;
+        .rectifyStatusColorA{
+          color:#23B303;
+        }
+        .rectifyStatusColorB{
+          color:#0183FA;
+        }
+        .rectifyStatusColorC{
+          color:#EE0606;
+        }
       }
       .dialog-footer-box{
         padding:20px 0;

+ 53 - 28
src/views/safetyCheck/safetyHazard/cannotListPage.vue

@@ -5,10 +5,10 @@
       <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
         <div class="form-button-max-big-box">
           <div class="form-button-big-box" style="margin-left:10px;">
-            <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+            <div :class="queryParams.hazardType==1?'checkDiv':''" @click="topLeftClickType(1)">
               <p class="text-p">校院巡查</p>
             </div>
-            <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
+            <div :class="queryParams.hazardType==2?'checkDiv':''" @click="topLeftClickType(2)">
               <p class="text-p">实验室自查</p>
             </div>
           </div>
@@ -44,13 +44,17 @@
     <div class="content-box">
       <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
         <el-table-column label="序号" align="center"  type="index" width="60" />
-        <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-        <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180"/>
-        <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="240"/>
-        <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-        <el-table-column label="处理人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-        <el-table-column label="原因描述" align="center" prop="deptName" show-overflow-tooltip width="435"/>
-        <el-table-column label="操作" align="center" prop="deptName" width="80">
+        <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+        <el-table-column label="检查类型" align="center" prop="deptName" show-overflow-tooltip width="180">
+          <template slot-scope="scope">
+            {{scope.row.hazardType == 1?'校院巡查':(scope.row.hazardType == 2?'实验室自查':'')}}
+          </template>
+        </el-table-column>
+        <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="240"/>
+        <el-table-column label="检查时间" sortable align="center" prop="checkTime" show-overflow-tooltip width="160"/>
+        <el-table-column label="处理人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
+        <el-table-column label="原因描述" align="center" prop="rectifyMeasure" show-overflow-tooltip width="435"/>
+        <el-table-column label="操作" align="center" width="80">
           <template slot-scope="scope">
             <div class="table-button-box">
               <p class="table-button-null"></p>
@@ -68,11 +72,12 @@
                   @pagination="getList"
       />
     </div>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
   </div>
 </template>
 
 <script>
+  import { unableRectifyList } from '@/api/safetyCheck/index'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   export default {
     name: 'cannotListPage',
@@ -81,34 +86,45 @@
     },
     data(){
       return{
+        propsInfoDialogData:{},
         infoDialogType:false,
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          safetyType:"",
-          timeType:0,
+          rectifyStatus:4,
+          hazardType:1,
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
         },
         dateRange:[],
-        tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        tableList:[],
         total:0,
       }
     },
     created(){},
-    mounted(){},
+    mounted(){
+      this.getList();
+    },
     methods:{
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.hazardType != type){
+          this.$set(this.queryParams,'hazardType',type);
           this.getList();
         }
       },
@@ -120,12 +136,21 @@
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0];
+        }else{
+          obj.beginTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        unableRectifyList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -138,10 +163,10 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          rectifyStatus:4,
+          hazardType:1,
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
         });
         this.handleQuery();
       },

+ 121 - 50
src/views/safetyCheck/safetyHazard/departmentListPage.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.rectifyStatus==''?'checkDiv':''" @click="topLeftClickType('')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==''"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+              <div :class="queryParams.rectifyStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
+                <p class="text-p">待整改</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==2"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+              <div :class="queryParams.rectifyStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
+                <p class="text-p">待复核</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==3"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
-                <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+              <div :class="queryParams.rectifyStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
+                <p class="text-p">已完成</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==1"></p>
               </div>
             </div>
           </div>
@@ -46,8 +46,8 @@
               end-placeholder="结束日期"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item label="审核状态" prop="safetyType">
-            <el-select v-model="queryParams.safetyType" placeholder="请选择" style="width: 160px">
+          <el-form-item label="审核状态" prop="examineResult">
+            <el-select v-model="queryParams.examineResult" placeholder="请选择" style="width: 160px">
               <el-option
                 v-for="item in options"
                 :key="item.value"
@@ -73,16 +73,24 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="250"/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-          <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="整改期限" sortable align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="110"/>
-          <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="审核状态" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="操作" align="center" prop="deptName" width="80">
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+          <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
+          <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+          <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
+          <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
+          <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="130"/>
+          <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="110">
+            <template slot-scope="scope">
+              <p :class="scope.row.rectifyStatus==1?'rectifyStatusColorA':(scope.row.rectifyStatus==2?'rectifyStatusColorB':(scope.row.rectifyStatus==3?'rectifyStatusColorC':''))">{{scope.row.rectifyStatus==1?'已完成':(scope.row.rectifyStatus==2?'待整改':(scope.row.rectifyStatus==3?'待复核':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="220">
+            <template slot-scope="scope">
+              <p>{{scope.row.rectifyTime}}<span v-if="scope.row.overdueStatus==1" style="margin-left:10px;color:#EE0606;">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="审核状态" align="center" prop="examineResult" show-overflow-tooltip width="80"/>
+          <el-table-column label="操作" align="center" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -101,12 +109,13 @@
         />
       </div>
     </div>
-    <batchAudit v-if="minPageType == 2"></batchAudit>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <batchAudit v-if="minPageType == 2" :propsBatchAuditData="propsBatchAuditData"></batchAudit>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
   </div>
 </template>
 
 <script>
+  import { checkHazardList } from '@/api/safetyCheck/index'
   import batchAudit from './batchAudit.vue'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   export default {
@@ -117,62 +126,112 @@
     },
     data(){
       return{
+        //子组件参数
+        propsBatchAuditData:{},
+        propsInfoDialogData:{},
         minPageType:1,
         infoDialogType:false,
         options:[
-          {value:"待审核",label:"0"},
-          {value:"已通过",label:"1"},
-          {value:"已驳回",label:"2"},
+          {value:"3",label:"待审核"},
+          {value:"1",label:"已通过"},
+          {value:"2",label:"已驳回"},
         ],
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          safetyType:"",
-          timeType:0,
+          hazardType:2,
+          rectifyStatus:"",
+          examineResult:"",
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:""
         },
         dateRange:[],
-        tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        tableList:[],
         total:0,
       }
     },
     created(){},
-    mounted(){},
+    mounted(){
+      this.getList();
+    },
     methods:{
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
+      //页面切换
       goPage(type){
         if(this.minPageType != type){
-          this.$set(this,'minPageType',type);
+          if(type == 1){
+            //返回
+            this.$set(this,'minPageType',type);
+          }else if(type == 2){
+            //批量审核
+            this.$set(this,'propsBatchAuditData',{hazardType:2,});
+            this.$set(this,'minPageType',type);
+          }else if(type == 3){
+            //返回并刷新
+            this.getList();
+            this.$set(this,'minPageType',1);
+          }
         }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.rectifyStatus != type){
+          this.$set(this.queryParams,'rectifyStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'checkTime'){
+          this.$set(this.queryParams,'checkTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyTime'){
+          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyDeadline'){
+          this.$set(this.queryParams,'zgTermOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0];
+        }else{
+          obj.beginTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        checkHazardList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -185,10 +244,13 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          hazardType:2,
+          rectifyStatus:"",
+          examineResult:"",
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:""
         });
         this.handleQuery();
       },
@@ -252,6 +314,15 @@
         flex-direction: column;
         padding:0 20px 20px;
         overflow: hidden;
+        .rectifyStatusColorA{
+          color:#23B303;
+        }
+        .rectifyStatusColorB{
+          color:#0183FA;
+        }
+        .rectifyStatusColorC{
+          color:#EE0606;
+        }
       }
     }
   }

+ 124 - 50
src/views/safetyCheck/safetyHazard/schoolListPage.vue

@@ -6,21 +6,21 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true" label-width="80px">
           <div class="form-button-max-big-box">
             <div class="form-button-big-box" style="margin-left:10px;">
-              <div :class="queryParams.buttonType==1?'checkDiv':''" @click="topLeftClickType(1)">
+              <div :class="queryParams.rectifyStatus==''?'checkDiv':''" @click="topLeftClickType('')">
                 <p class="text-p">全部</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==1"></p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==''"></p>
               </div>
-              <div :class="queryParams.buttonType==2?'checkDiv':''" @click="topLeftClickType(2)">
-                <p class="text-p">待检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==2"></p>
+              <div :class="queryParams.rectifyStatus==2?'checkDiv':''" @click="topLeftClickType(2)">
+                <p class="text-p">待整改</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==2"></p>
               </div>
-              <div :class="queryParams.buttonType==3?'checkDiv':''" @click="topLeftClickType(3)">
-                <p class="text-p">检查中</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==3"></p>
+              <div :class="queryParams.rectifyStatus==3?'checkDiv':''" @click="topLeftClickType(3)">
+                <p class="text-p">待复核</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==3"></p>
               </div>
-              <div :class="queryParams.buttonType==4?'checkDiv':''" @click="topLeftClickType(4)">
-                <p class="text-p">已检查</p>
-                <p class="el-icon-check icon-p" v-if="queryParams.buttonType==4"></p>
+              <div :class="queryParams.rectifyStatus==1?'checkDiv':''" @click="topLeftClickType(1)">
+                <p class="text-p">已完成</p>
+                <p class="el-icon-check icon-p" v-if="queryParams.rectifyStatus==1"></p>
               </div>
             </div>
           </div>
@@ -46,8 +46,8 @@
               end-placeholder="结束日期"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item label="审核状态" prop="safetyType">
-            <el-select v-model="queryParams.safetyType" placeholder="请选择" style="width: 160px">
+          <el-form-item label="审核状态" prop="examineResult">
+            <el-select v-model="queryParams.examineResult" placeholder="请选择" style="width: 160px">
               <el-option
                 v-for="item in options"
                 :key="item.value"
@@ -73,16 +73,28 @@
       <div class="content-box">
         <el-table  border :data="tableList" ref="multipleTable" @sort-change="sortChange">
           <el-table-column label="序号" align="center"  type="index" width="60" />
-          <el-table-column label="计划标题" align="center" prop="deptName" show-overflow-tooltip/>
-          <el-table-column label="隐患描述" align="center" prop="deptName" show-overflow-tooltip width="250"/>
-          <el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-          <el-table-column label="检查时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="整改人" align="center" prop="deptName" show-overflow-tooltip width="90"/>
-          <el-table-column label="整改期限" sortable align="center" prop="deptName" show-overflow-tooltip width="130"/>
-          <el-table-column label="整改状态" align="center" prop="deptName" show-overflow-tooltip width="110"/>
-          <el-table-column label="整改时间" sortable align="center" prop="deptName" show-overflow-tooltip width="160"/>
-          <el-table-column label="审核状态" align="center" prop="deptName" show-overflow-tooltip width="80"/>
-          <el-table-column label="操作" align="center" prop="deptName" width="80">
+          <el-table-column label="计划标题" align="center" prop="title" show-overflow-tooltip/>
+          <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="220"/>
+          <el-table-column label="实验室" align="center" prop="subRoom" show-overflow-tooltip width="170"/>
+          <el-table-column label="检查时间" sortable="custom" align="center" prop="checkTime" show-overflow-tooltip width="160"/>
+          <el-table-column label="整改人" align="center" prop="rectifyName" show-overflow-tooltip width="90"/>
+          <el-table-column label="整改期限" sortable="custom" align="center" prop="rectifyDeadline" show-overflow-tooltip width="130"/>
+          <el-table-column label="整改状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="110">
+            <template slot-scope="scope">
+              <p :class="scope.row.rectifyStatus==1?'rectifyStatusColorA':(scope.row.rectifyStatus==2?'rectifyStatusColorB':(scope.row.rectifyStatus==3?'rectifyStatusColorC':''))">{{scope.row.rectifyStatus==1?'已完成':(scope.row.rectifyStatus==2?'待整改':(scope.row.rectifyStatus==3?'待复核':''))}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="整改时间" sortable="custom" align="center" prop="rectifyTime" show-overflow-tooltip width="220">
+            <template slot-scope="scope">
+              <p>{{scope.row.rectifyTime}}<span v-if="scope.row.overdueStatus==1" style="margin-left:10px;color:#EE0606;">已逾期</span></p>
+            </template>
+          </el-table-column>
+          <el-table-column label="审核状态" align="center" prop="examineResult" show-overflow-tooltip width="80">
+            <template slot-scope="scope">
+              <p>{{scope.row.examineResult}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" align="center" width="80">
             <template slot-scope="scope">
               <div class="table-button-box">
                 <p class="table-button-null"></p>
@@ -101,12 +113,13 @@
         />
       </div>
     </div>
-    <batchAudit v-if="minPageType == 2"></batchAudit>
-    <infoDialog v-if="infoDialogType"></infoDialog>
+    <batchAudit v-if="minPageType == 2" :propsBatchAuditData="propsBatchAuditData"></batchAudit>
+    <infoDialog v-if="infoDialogType" :propsInfoDialogData="propsInfoDialogData"></infoDialog>
   </div>
 </template>
 
 <script>
+  import { checkHazardList } from '@/api/safetyCheck/index'
   import batchAudit from './batchAudit.vue'
   import infoDialog from '@/views/safetyCheck/components/infoDialog/infoDialog.vue'
   export default {
@@ -117,63 +130,112 @@
     },
     data(){
       return{
+        //子组件参数
+        propsBatchAuditData:{},
+        propsInfoDialogData:{},
         minPageType:1,
         infoDialogType:false,
         options:[
-          {value:"待审核",label:"0"},
-          {value:"已通过",label:"1"},
-          {value:"已驳回",label:"2"},
+          {value:"3",label:"待审核"},
+          {value:"1",label:"已通过"},
+          {value:"2",label:"已驳回"},
         ],
         queryParams:{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          safetyType:"",
-          timeType:0,
+          hazardType:1,
+          rectifyStatus:"",
+          examineResult:"",
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:""
         },
         dateRange:[],
-        tableList:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},],
+        tableList:[],
         total:0,
       }
     },
     created(){},
-    mounted(){},
+    mounted(){
+      this.getList();
+    },
     methods:{
       //开关详情页面
       addDialogOpen(type,data){
         if(this.infoDialogType != type){
-          this.$set(this,'infoDialogType',type);
+          if(type){
+            let obj = {
+              id:data.id
+            }
+            this.$set(this,'propsInfoDialogData',obj);
+            this.$set(this,'infoDialogType',type);
+          }else{
+            this.getList();
+            this.$set(this,'infoDialogType',type);
+          }
         }
       },
       //页面切换
       goPage(type){
         if(this.minPageType != type){
-          this.$set(this,'minPageType',type);
+          if(type == 1){
+            //返回
+            this.$set(this,'minPageType',type);
+          }else if(type == 2){
+            //批量审核
+            this.$set(this,'propsBatchAuditData',{hazardType:1,});
+            this.$set(this,'minPageType',type);
+          }else if(type == 3){
+            //返回并刷新
+            this.getList();
+            this.$set(this,'minPageType',1);
+          }
         }
       },
       //范围选择
       topLeftClickType(type){
-        if(this.queryParams.buttonType != type){
-          this.$set(this.queryParams,'buttonType',type);
+        if(this.queryParams.rectifyStatus != type){
+          this.$set(this.queryParams,'rectifyStatus',type);
           this.getList();
         }
       },
       //时间排序方法
       sortChange(val){
-        //ascending 上    descending 下    null  无
-        console.log('val',val.order)
-        this.$set(this.queryParams,'timeType',val.order=='ascending'?1:(val.order=='descending'?2:''));
+        if(val.prop == 'checkTime'){
+          this.$set(this.queryParams,'checkTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyTime'){
+          this.$set(this.queryParams,'zgTimeOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTermOrder','');
+          this.getList();
+        }else if(val.prop == 'rectifyDeadline'){
+          this.$set(this.queryParams,'zgTermOrder',val.order=='ascending'?'1':(val.order=='descending'?'2':''));
+          this.$set(this.queryParams,'checkTimeOrder','');
+          this.$set(this.queryParams,'zgTimeOrder','');
+          this.getList();
+        }
       },
       //获取数据列表
       getList(){
-        // this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
-        // this.queryParamsData.type = 'RFID_RECOGNIZER';
-        // listHardware(this.queryParamsData).then(response => {
-        //   this.total = response.total;
-        //   this.tableList = response.rows;
-        // });
+        let obj = JSON.parse(JSON.stringify(this.queryParams))
+        if(this.dateRange[0]){
+          obj.beginTime = this.dateRange[0];
+        }else{
+          obj.beginTime = "";
+        }
+        if(this.dateRange[1]){
+          obj.endTime = this.dateRange[1];
+        }else{
+          obj.endTime = "";
+        }
+        checkHazardList(obj).then(response => {
+          this.total = response.data.total;
+          this.tableList = response.data.records;
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -186,10 +248,13 @@
         this.$set(this,'queryParams',{
           pageNum:1,
           pageSize:20,
-          buttonType:1,
-          timeType:0,
+          hazardType:1,
+          rectifyStatus:"",
+          examineResult:"",
           searchValue:"",
-          data1:""
+          checkTimeOrder:"",
+          zgTimeOrder:"",
+          zgTermOrder:""
         });
         this.handleQuery();
       },
@@ -253,6 +318,15 @@
         flex-direction: column;
         padding:0 20px 20px;
         overflow: hidden;
+        .rectifyStatusColorA{
+          color:#23B303;
+        }
+        .rectifyStatusColorB{
+          color:#0183FA;
+        }
+        .rectifyStatusColorC{
+          color:#EE0606;
+        }
       }
     }
   }

+ 1 - 0
src/views/safetyCheck/schoolInspection/inspectionManagement/index.vue

@@ -190,6 +190,7 @@
             this.$set(this,'pageType',type);
           }else if(type == 3){
             //详情
+            this.$set(this,'propsInfoData',{id:id});
             this.$set(this,'pageType',type);
           }else if(type == 4){
             //返回并刷新