dedsudiyu 2 anos atrás
pai
commit
ff61a89ed4

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

@@ -509,6 +509,62 @@ export function addOrApprove(data) {
 }
 
 
+/***************************数据统计***************************/
+
+//数据统计-实验室列表头部数据汇总
+export function dataStatisticsSubListTop(query) {
+  return request({
+    url: '/zd-security/DataStatistics/subListTop',
+    method: 'get',
+    params: query
+  })
+}
+
+//数据统计-按实验室查询列表
+export function dataStatisticsSubList(query) {
+  return request({
+    url: '/zd-security/DataStatistics/subList',
+    method: 'get',
+    params: query
+  })
+}
+
+//数据统计-安全隐患列表头部数据汇总
+export function dataStatisticsHazardListTop(query) {
+  return request({
+    url: '/zd-security/DataStatistics/hazardListTop',
+    method: 'get',
+    params: query
+  })
+}
+
+//数据统计-按安全隐患查询列表
+export function dataStatisticsHazardList(query) {
+  return request({
+    url: '/zd-security/DataStatistics/hazardList',
+    method: 'get',
+    params: query
+  })
+}
+
+//数据统计-指标列表头部数据汇总
+export function dataStatisticsItemsListTop(query) {
+  return request({
+    url: '/zd-security/DataStatistics/itemsListTop',
+    method: 'get',
+    params: query
+  })
+}
+
+//数据统计-按指标查询列表
+export function dataStatisticsItemsList(query) {
+  return request({
+    url: '/zd-security/DataStatistics/itemsList',
+    method: 'get',
+    params: query
+  })
+}
+
 
 
 
@@ -536,6 +592,23 @@ export function findUserList(data) {
   })
 }
 
+//通用接口-查询检查项再特定实验室发生历史次数
+export function countHazardNum(query) {
+  return request({
+    url: '/zd-security/checkHazard/countHazardNum',
+    method: 'get',
+    params: query
+  })
+}
+
+//通用接口-根据实验室id查询该实验室有关计划
+export function getCheckPlanBySubId(data) {
+  return request({
+    url: '/zd-security/user/checkManage/getCheckPlanBySubId',
+    method: 'post',
+    data: data
+  })
+}
 
 
 

+ 19 - 4
src/views/safetyCheck/components/addPage/addPage.vue

@@ -80,9 +80,9 @@
             <div class="for-big-box" v-if="item.lookType">
               <el-form-item label="隐患等级" :prop="'checkHazardDtoList.'+index+'.hazardLevel'" :rules="rules.hazardLevel" label-width="123px">
                 <el-select v-model="item.hazardLevel" clearable placeholder="请选择隐患等级" style="width: 408px">
-                  <el-option :key="1" label="一般隐患" :value="0"></el-option>
-                  <el-option :key="2" label="重大隐患" :value="1"></el-option>
-                  <el-option :key="3" label="管理问题" :value="2"></el-option>
+                  <el-option :key="2" label="一般隐患" :value="2"></el-option>
+                  <el-option :key="1" label="重大隐患" :value="1"></el-option>
+                  <el-option :key="3" label="管理问题" :value="3"></el-option>
                 </el-select>
               </el-form-item>
               <el-form-item label="检查项目" :prop="'checkHazardDtoList.'+index+'.hazardCheckPro'" :rules="rules.hazardCheckPro" label-width="123px">
@@ -94,6 +94,7 @@
                   :options="options"
                   :props="{ checkStrictly: false, value: 'id', label: 'labelName',emitPath:false }"
                   filterable></el-cascader>
+                <p class="hazard-check-count-p" v-if="hazardCheckCount>0">此检查项在当前实验室累计出现 <span>{{hazardCheckCount}}</span> 次隐患</p>
               </el-form-item>
               <el-form-item label="检查要点" label-width="123px">
                 <el-input
@@ -157,7 +158,7 @@
 <script>
   import { getToken } from "@/utils/auth";
   import lookImgDialog from '@/components/lookImgDialog/lookImgDialog.vue'
-  import { findCheckManage,checkOptionList,checkManageUpdate } from '@/api/safetyCheck/index'
+  import { findCheckManage,checkOptionList,checkManageUpdate,countHazardNum } from '@/api/safetyCheck/index'
   export default {
     name: 'addPage',
     props:{
@@ -215,6 +216,8 @@
             { required: true, message: "请输入隐患描述", validator: this.spaceJudgment, trigger: "blur" },
           ],
         },
+        //隐患发生次数
+        hazardCheckCount:0,
       }
     },
     created(){
@@ -306,6 +309,9 @@
         let obj = this.getCascaderDataQuery(val,this.options);
         this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckCode',obj.code);
         this.$set(this.addForm.checkHazardDtoList[index],'hazardCheckName',obj.name);
+        countHazardNum({subId:this.addForm.subId, hazardCheckPro:val}).then( response => {
+          this.$set(this,'hazardCheckCount',response.data);
+        })
       },
       //查看图片
       lookImg(list,index){
@@ -563,6 +569,15 @@
             right:0;
           }
         }
+        .hazard-check-count-p{
+          display: inline-block;
+          margin-left: 20px;
+          font-size: 14px;
+          line-height: 40px;
+          span{
+            color:#FF0000;
+          }
+        }
       }
     }
     .bottom-button-max-box{

+ 1 - 1
src/views/safetyCheck/components/infoDialog/infoDialog.vue

@@ -148,7 +148,7 @@
             </div>
             <div class="right-box text-box">
               <p></p>
-              <p>{{infoDialogData.checkHazardApplyDto.hazardLevel==0?'一般隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==2?'管理问题':''))}}</p>
+              <p>{{infoDialogData.checkHazardApplyDto.hazardLevel==2?'一般隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==1?'重大隐患':(infoDialogData.checkHazardApplyDto.hazardLevel==3?'管理问题':''))}}</p>
               <p></p>
             </div>
           </div>

+ 1 - 1
src/views/safetyCheck/components/infoPage/infoPage.vue

@@ -119,7 +119,7 @@
                     <p></p>
                   </div>
                   <div class="right-min-content-box">
-                    <p class="title-p">{{item.hazardLevel==0?'一般隐患':(item.hazardLevel==1?'重大隐患':(item.hazardLevel==2?'管理问题':''))}}</p>
+                    <p class="title-p">{{item.hazardLevel==2?'一般隐患':(item.hazardLevel==1?'重大隐患':(item.hazardLevel==3?'管理问题':''))}}</p>
                   </div>
                 </div>
                 <div class="min-content-box">

+ 46 - 34
src/views/safetyCheck/dataStatistics/checkIndexStatistics.vue

@@ -1,13 +1,13 @@
 <template>
   <div class="checkIndexStatistics">
     <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
-      <el-form-item label="" prop="data1" label-width="50px">
-        <el-select v-model="queryParams.data1" clearable placeholder="全部">
+      <el-form-item label="" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" clearable placeholder="全部">
           <el-option
             v-for="item in deptSelectList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
           </el-option>
         </el-select>
       </el-form-item>
@@ -51,22 +51,22 @@
       </el-form-item>
     </el-form>
     <div class="num-data-box">
-      共搜索到隐患总数 {{numData.subNum1}},一级指标隐患总数 {{numData.subNum1}},占比{{numData.subNum2}}%,{{numData.subNum3}} 200,{{numData.subNum4}}10.1%,三级指标隐患总数 300,占比10.1%
+      共搜索到隐患总数 {{numData.sumTotal}},一级指标隐患总数 {{numData.level1}},占比 {{numData.percent1}},二级指标隐患总数 {{numData.level2}},占比 {{numData.percent2}},三级指标隐患总数 {{numData.level3}},占比 {{numData.percent3}}
     </div>
     <el-table  border :data="tableList" ref="multipleTable"
                :row-key="getRowKeys"
                @select="select" @select-all="selectAll">
       <el-table-column type="selection" width="50" 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="230"/>
-      <el-table-column label="隐患总数" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-      <el-table-column label="一级指标隐患数" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-      <el-table-column label="一级指标占比" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-      <el-table-column label="二级指标隐患数" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-      <el-table-column label="二级指标占比" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-      <el-table-column label="三级指标隐患数" align="center" prop="deptName" show-overflow-tooltip width="130"/>
-      <el-table-column label="三级指标占比" align="center" prop="deptName" show-overflow-tooltip width="130"/>
+      <el-table-column label="计划任务" align="center" prop="title" show-overflow-tooltip/>
+      <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="230"/>
+      <el-table-column label="隐患总数" align="center" prop="sumTotal" show-overflow-tooltip width="120"/>
+      <el-table-column label="一级指标隐患数" align="center" prop="schoolItemsTotal1" show-overflow-tooltip width="130"/>
+      <el-table-column label="一级指标占比" align="center" prop="percent" show-overflow-tooltip width="130"/>
+      <el-table-column label="二级指标隐患数" align="center" prop="schoolItemsTotal2" show-overflow-tooltip width="130"/>
+      <el-table-column label="二级指标占比" align="center" prop="percent2" show-overflow-tooltip width="130"/>
+      <el-table-column label="三级指标隐患数" align="center" prop="schoolItemsTotal3" show-overflow-tooltip width="130"/>
+      <el-table-column label="三级指标占比" align="center" prop="percent3" show-overflow-tooltip width="130"/>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"
@@ -79,6 +79,8 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { dataStatisticsItemsList,dataStatisticsItemsListTop } from "@/api/safetyCheck/index";
   export default {
     name: 'checkIndexStatistics',
     data(){
@@ -91,19 +93,10 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         },
         setChildren:"",
-        numData:{
-          subNum1:"2000",
-          subNum2:"2000",
-          subNum3:"2000",
-          subNum4:"2000",
-          subNum5:"2000",
-          subNum6:"2000",
-          subNum7:"2000",
-          subNum8:"2000",
-        },
+        numData:{},
         tableList:[{}],
         total:0,
         currentDate:'',
@@ -113,17 +106,36 @@
 
     },
     mounted(){
-
+      this.initializationInterface();
+      this.getList();
     },
     methods:{
+      initializationInterface(){
+        //获取学院列表
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
       //获取数据列表
       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 = "";
+        }
+        dataStatisticsItemsList(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
+        dataStatisticsItemsListTop(obj).then(response => {
+          this.$set(this,'numData',response.data);
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -137,7 +149,7 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:""
         });
         this.handleQuery();
       },

+ 74 - 48
src/views/safetyCheck/dataStatistics/laboratoryStatistics.vue

@@ -1,33 +1,33 @@
 <template>
   <div class="laboratoryStatistics">
     <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
-      <el-form-item label="" prop="data1" label-width="50px">
-        <el-select v-model="queryParams.data1" clearable placeholder="全部">
+      <el-form-item label="" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" clearable placeholder="全部">
           <el-option
             v-for="item in deptSelectList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="" prop="classType">
-        <el-select v-model="queryParams.classType" clearable placeholder="安全分类" style="width: 120px">
+      <el-form-item label="" prop="typeId">
+        <el-select v-model="queryParams.typeId" clearable placeholder="安全分类" style="width: 120px">
           <el-option
             v-for="item in classTypeList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.id"
+            :label="item.typeName"
+            :value="item.id">
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="" prop="classified">
-        <el-select v-model="queryParams.classified" clearable placeholder="安全分级" style="width: 120px">
+      <el-form-item label="" prop="level">
+        <el-select v-model="queryParams.level" clearable placeholder="安全分级" style="width: 120px">
           <el-option
             v-for="item in classifiedList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.id"
+            :label="item.classifiedName"
+            :value="item.id">
           </el-option>
         </el-select>
       </el-form-item>
@@ -71,25 +71,25 @@
       </el-form-item>
     </el-form>
     <div class="num-data-box">
-      搜索到实验室总数 {{numData.subNum1}},存在危险源的实验室数 {{numData.subNum2}},危险源总数 {{numData.subNum3}},特种设备安全类 {{numData.subNum4}} ,一级 {{numData.subNum5}},二级 {{numData.subNum6}},三级 {{numData.subNum7}},四级 {{numData.subNum8}}
+      搜索到实验室总数 {{numData.sumTotal}},存在危险源的实验室数 {{numData.hazardSubjectTotal}},危险源总数 {{numData.hazardTotal}},特种设备安全类 {{numData.specialTotal}}<span v-for="item in numData.classListVo">,{{item.levelName}} {{item.amount}}</span>
     </div>
     <el-table  border :data="tableList" ref="multipleTable"
                :row-key="getRowKeys"
                @select="select" @select-all="selectAll">
       <el-table-column type="selection" width="50" align="center"/>
       <el-table-column label="序号" align="center"  type="index" width="60" />
-      <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-      <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="100"/>
-      <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="100"/>
-      <el-table-column label="安全分级" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-      <el-table-column label="危险源" align="center" prop="deptName" show-overflow-tooltip width="260"/>
-      <el-table-column label="实验室安全责任人" align="center" prop="deptName" show-overflow-tooltip width="185"/>
-      <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="100"/>
-      <el-table-column label="整改率" align="center" prop="deptName" show-overflow-tooltip width="100"/>
-      <el-table-column label="复核通过率" align="center" prop="deptName" show-overflow-tooltip width="100"/>
+      <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="200"/>
+      <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="180"/>
+      <el-table-column label="房间号" align="center" prop="roomNumber" show-overflow-tooltip width="100"/>
+      <el-table-column label="楼栋" align="center" prop="buildName" show-overflow-tooltip width="180"/>
+      <el-table-column label="安全分类" align="center" prop="typeName" show-overflow-tooltip width="100"/>
+      <el-table-column label="安全分级" align="center" prop="levelName" show-overflow-tooltip width="100"/>
+      <el-table-column label="危险源" align="center" prop="hazardName" show-overflow-tooltip width="260"/>
+      <el-table-column label="实验室安全责任人" align="center" prop="safeUserNameAdminPhone" show-overflow-tooltip width="185"/>
+      <el-table-column label="实验室负责人" align="center" prop="adminNameAndPhone" show-overflow-tooltip width="180"/>
+      <el-table-column label="隐患总数" align="center" prop="dangerNum" show-overflow-tooltip width="100"/>
+      <el-table-column label="整改率" align="center" prop="percent" show-overflow-tooltip width="100"/>
+      <el-table-column label="复核通过率" align="center" prop="percent2" show-overflow-tooltip width="100"/>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"
@@ -102,6 +102,10 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { listClassifiedAll } from "@/api/laboratory/classified";
+  import { listClasstypeAll } from "@/api/laboratory/classtype";
+  import { dataStatisticsSubList,dataStatisticsSubListTop } from "@/api/safetyCheck/index";
   export default {
     name: 'laboratoryStatistics',
     data(){
@@ -114,20 +118,13 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:"",
+          typeId:"",
+          level:""
         },
         setChildren:"",
-        numData:{
-          subNum1:"2000",
-          subNum2:"2000",
-          subNum3:"2000",
-          subNum4:"2000",
-          subNum5:"2000",
-          subNum6:"2000",
-          subNum7:"2000",
-          subNum8:"2000",
-        },
-        tableList:[{}],
+        numData:{},
+        tableList:[],
         total:0,
         currentDate:'',
       }
@@ -136,17 +133,44 @@
 
     },
     mounted(){
-
+      this.initializationInterface();
+      this.getList();
     },
     methods:{
+      initializationInterface(){
+        //获取学院列表
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+        /**获取分级*/
+        listClassifiedAll().then(response=>{
+          this.classifiedList = response.data
+        })
+        /**获取分类*/
+        listClasstypeAll().then(response=>{
+          this.classTypeList = response.data;
+        });
+      },
       //获取数据列表
       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 = "";
+        }
+        dataStatisticsSubList(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
+        dataStatisticsSubListTop(obj).then(response => {
+          this.$set(this,'numData',response.data);
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -160,7 +184,9 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:"",
+          typeId:"",
+          level:""
         });
         this.handleQuery();
       },

+ 70 - 46
src/views/safetyCheck/dataStatistics/safetyHazardStatistics.vue

@@ -1,30 +1,30 @@
 <template>
   <div class="safetyHazardStatistics">
     <el-form :model="queryParams" class="form-box" ref="queryForm" :inline="true">
-      <el-form-item label="" prop="data1" label-width="50px">
-        <el-select v-model="queryParams.data1" clearable placeholder="全部">
+      <el-form-item label="" prop="deptId" label-width="50px">
+        <el-select v-model="queryParams.deptId" clearable placeholder="全部">
           <el-option
             v-for="item in deptSelectList"
-            :key="item.key"
-            :label="item.label"
-            :value="item.key">
+            :key="item.deptId"
+            :label="item.deptName"
+            :value="item.deptId">
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="" prop="classType">
-        <el-select v-model="queryParams.classType" clearable placeholder="全部状态" style="width: 120px">
+      <el-form-item label="" prop="rectifyStatus">
+        <el-select v-model="queryParams.rectifyStatus" clearable placeholder="全部状态" style="width: 120px">
           <el-option
-            v-for="item in classTypeList"
+            v-for="item in typeList"
             :key="item.key"
             :label="item.label"
             :value="item.key">
           </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="" prop="classified">
-        <el-select v-model="queryParams.classified" clearable placeholder="全部隐患等级" style="width: 140px">
+      <el-form-item label="" prop="hdLevel">
+        <el-select v-model="queryParams.hdLevel" clearable placeholder="全部隐患等级" style="width: 140px">
           <el-option
-            v-for="item in classifiedList"
+            v-for="item in levelList"
             :key="item.key"
             :label="item.label"
             :value="item.key">
@@ -71,25 +71,33 @@
       </el-form-item>
     </el-form>
     <div class="num-data-box">
-      共搜索到隐患总数 {{numData.subNum1}},重大隐患数 {{numData.subNum2}},一般隐患数 {{numData.subNum3}},管理问题数 {{numData.subNum4}} ,待整改总数 {{numData.subNum5}},复核总数 {{numData.subNum6}},复核通过率 {{numData.subNum6}}
+      共搜索到隐患总数 {{numData.sumTotal}},重大隐患数 {{numData.zdHazardTotal}},一般隐患数 {{numData.ybHazardTotal}},管理问题数 {{numData.glHazardTotal}} ,待整改总数 {{numData.rectifiedTotal}},复核总数 {{numData.resultTotal}},复核通过率 {{numData.rate}}
     </div>
     <el-table  border :data="tableList" ref="multipleTable"
                :row-key="getRowKeys"
                @select="select" @select-all="selectAll">
       <el-table-column type="selection" width="50" align="center"/>
       <el-table-column label="序号" align="center"  type="index" width="60" />
-      <el-table-column label="计划任务" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-      <el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip width="200"/>
-      <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="100"/>
-      <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="100"/>
-      <el-table-column label="不符合项" align="center" prop="deptName" show-overflow-tooltip width="260"/>
-      <el-table-column label="历史出现次数" align="center" prop="deptName" show-overflow-tooltip width="120"/>
-      <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="100"/>
-      <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="100"/>
+      <el-table-column label="计划任务" align="center" prop="title" show-overflow-tooltip width="200"/>
+      <el-table-column label="学院" align="center" prop="collegeName" show-overflow-tooltip width="200"/>
+      <el-table-column label="实验室" align="center" prop="subjectName" show-overflow-tooltip width="180"/>
+      <el-table-column label="房间号" align="center" prop="roomNumber" show-overflow-tooltip width="100"/>
+      <el-table-column label="楼栋" align="center" prop="buildName" show-overflow-tooltip width="180"/>
+      <el-table-column label="隐患等级" align="center" prop="hazardLevel" show-overflow-tooltip width="100">
+        <template slot-scope="scope">
+          {{scope.row.hazardLevel==1?'重大隐患':(scope.row.hazardLevel==2?'一般隐患':(scope.row.hazardLevel==3?'管理问题':''))}}
+        </template>
+      </el-table-column>
+      <el-table-column label="不符合项" align="center" prop="hazardCheckPoint" show-overflow-tooltip width="260"/>
+      <el-table-column label="历史出现次数" align="center" prop="sumTotal" show-overflow-tooltip width="120"/>
+      <el-table-column label="隐患描述" align="center" prop="hazardDescribe" show-overflow-tooltip width="180"/>
+      <el-table-column label="检查者" align="center" prop="checkUser" show-overflow-tooltip width="100"/>
+      <el-table-column label="检查时间" align="center" prop="checkTime2" show-overflow-tooltip width="180"/>
+      <el-table-column label="状态" align="center" prop="rectifyStatus" show-overflow-tooltip width="100">
+        <template slot-scope="scope">
+          {{scope.row.rectifyStatus==1?'复核完毕':(scope.row.rectifyStatus==2?'未整改':(scope.row.rectifyStatus==3?'已整改':(scope.row.rectifyStatus==4?'暂无法整改':'')))}}
+        </template>
+      </el-table-column>
     </el-table>
     <pagination :page-sizes="[20, 30, 40, 50]"
                 v-show="total>0"
@@ -102,32 +110,27 @@
 </template>
 
 <script>
+  import { listDepartments } from "@/api/system/dept";
+  import { dataStatisticsHazardList,dataStatisticsHazardListTop } from "@/api/safetyCheck/index";
   export default {
     name: 'safetyHazardStatistics',
     data(){
       return{
         deptSelectList:[],
-        classTypeList:[],
-        classifiedList:[],
+        typeList:[{label:"未整改",key:"2"},{label:"已整改",key:"3"},{label:"暂无法整改",key:"4"},{label:"复核完毕",key:"1"}],
+        levelList:[{label:"一般隐患",key:"2"},{label:"重大隐患",key:"1"},{label:"管理问题",key:"3"}],
         dateRange:[],
         queryParams:{
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:"",
+          rectifyStatus:"",
+          hdLevel:"",
         },
         setChildren:"",
-        numData:{
-          subNum1:"2000",
-          subNum2:"2000",
-          subNum3:"2000",
-          subNum4:"2000",
-          subNum5:"2000",
-          subNum6:"2000",
-          subNum7:"2000",
-          subNum8:"2000",
-        },
-        tableList:[{}],
+        numData:{},
+        tableList:[],
         total:0,
         currentDate:'',
       }
@@ -136,17 +139,36 @@
 
     },
     mounted(){
-
+      this.initializationInterface();
+      this.getList();
     },
     methods:{
+      initializationInterface(){
+        //获取学院列表
+        listDepartments().then(response => {
+          this.deptSelectList = response.data;
+        });
+      },
       //获取数据列表
       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 = "";
+        }
+        dataStatisticsHazardList(obj).then(response => {
+          this.total = response.total;
+          this.tableList = response.rows;
+        });
+        dataStatisticsHazardListTop(obj).then(response => {
+          this.$set(this,'numData',response.data);
+        });
       },
       /** 搜索按钮操作 */
       handleQuery() {
@@ -160,7 +182,9 @@
           pageNum:1,
           pageSize:20,
           searchValue:"",
-          data1:""
+          deptId:"",
+          rectifyStatus:"",
+          hdLevel:"",
         });
         this.handleQuery();
       },

Diferenças do arquivo suprimidas por serem muito extensas
+ 56 - 23
src/views/safetyCheck/startInspection/index.vue