dedsudiyu 7 months ago
parent
commit
7645520d74
22 changed files with 1297 additions and 522 deletions
  1. 147 0
      src/api/safetyCheck/indexDemoOne.js
  2. 0 3
      src/views/safetyCheck/collegeInspect/hiddenDangersReview/index.vue
  3. 35 11
      src/views/safetyCheck/collegeWorktable/coverageRateEcharts.vue
  4. 43 18
      src/views/safetyCheck/collegeWorktable/dataScreening.vue
  5. 32 15
      src/views/safetyCheck/collegeWorktable/dataScreeningChart.vue
  6. 45 39
      src/views/safetyCheck/collegeWorktable/hiddenDangerStatisticsEcharts.vue
  7. 169 38
      src/views/safetyCheck/collegeWorktable/index.vue
  8. 34 28
      src/views/safetyCheck/collegeWorktable/inspectionStatisticsEcharts.vue
  9. 29 7
      src/views/safetyCheck/collegeWorktable/rectificationFinish.vue
  10. 7 7
      src/views/safetyCheck/components/initiateInspect/historyRecordsComponent.vue
  11. 13 2
      src/views/safetyCheck/components/initiateInspect/initiateInspect.vue
  12. 54 39
      src/views/safetyCheck/components/initiateInspect/recheckComponent.vue
  13. 25 25
      src/views/safetyCheck/components/initiateInspect/rectificationComponent.vue
  14. 1 0
      src/views/safetyCheck/dataStatistics/hiddenDangerStatistics.vue
  15. 275 132
      src/views/safetyCheck/schoolInspect/reviewManage/index.vue
  16. 35 11
      src/views/safetyCheck/schoolWorktable/coverageRateEcharts.vue
  17. 43 18
      src/views/safetyCheck/schoolWorktable/dataScreening.vue
  18. 32 15
      src/views/safetyCheck/schoolWorktable/dataScreeningChart.vue
  19. 45 39
      src/views/safetyCheck/schoolWorktable/hiddenDangerStatisticsEcharts.vue
  20. 170 40
      src/views/safetyCheck/schoolWorktable/index.vue
  21. 34 28
      src/views/safetyCheck/schoolWorktable/inspectionStatisticsEcharts.vue
  22. 29 7
      src/views/safetyCheck/schoolWorktable/rectificationFinish.vue

+ 147 - 0
src/api/safetyCheck/indexDemoOne.js

@@ -617,6 +617,153 @@ export function reportHazardReportOneItemsScatterCollegeTop (data) {
     data: data
   })
 }
+/**************************** 校级工作台统计 ****************************/
+//工作台-用户身份查询-校级
+export function securityIndexStatisticsUserIdentity (query) {
+  return request({
+    url: '/security/indexStatistics/userIdentity',
+    method: 'get',
+    params: query
+  })
+}
+//工作台-用户身份查询-院级
+export function securityCollegeStatisticsCollegeCheck (data) {
+  return request({
+    url: '/security/collegeStatistics/collegeCheck',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-检查数据(检查次数/项目数/通知书数)
+export function securityIndexStatisticsCheck (data) {
+  return request({
+    url: '/security/indexStatistics/check',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-数据总览
+export function securityIndexStatisticsProportionChart (data) {
+  return request({
+    url: '/security/indexStatistics/proportionChart',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-整改完成率-柱形图
+export function securityIndexStatisticsCompleteRatio (data) {
+  return request({
+    url: '/security/indexStatistics/completeRatio',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-未整改隐患
+export function securityIndexStatisticsUnresolvedHazard (data) {
+  return request({
+    url: '/security/indexStatistics/unresolvedHazard',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-已整改隐患
+export function securityIndexStatisticsRectifiedHazard (data) {
+  return request({
+    url: '/security/indexStatistics/rectifiedHazard',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-全年指标隐患分布
+export function securityIndexStatisticsHazardScatter (data) {
+  return request({
+    url: '/security/indexStatistics/hazardScatter',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-检查覆盖率
+export function securityIndexStatisticsCheckOverlap (data) {
+  return request({
+    url: '/security/indexStatistics/checkOverlap',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-检查结果统计
+export function securityIndexStatisticsCheckResults (data) {
+  return request({
+    url: '/security/indexStatistics/checkResults',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-年度全校实验室安全检查统计
+export function securityIndexStatisticsPlanList (data) {
+  return request({
+    url: '/security/indexStatistics/planList',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-各单位全年指标隐患分布表头数据
+export function reportSecIndexDataGetGaugeOutfit  (data) {
+  return request({
+    url: '/report/secIndexData/getGaugeOutfit ',
+    method: 'post',
+    data: data
+  })
+}
+//工作台-各单位全年指标隐患分布列表
+export function reportSecIndexDataDistributionHazard  (data) {
+  return request({
+    url: '/report/secIndexData/distributionHazard',
+    method: 'post',
+    data: data
+  })
+}
+
+/**************************** 复查管理/隐患复查 ****************************/
+//复查管理-列表
+export function securityCheckDangerReviewList (data) {
+  return request({
+    url: '/security/checkDanger/reviewList',
+    method: 'post',
+    data: data
+  })
+}
+//复查管理-督导组信息查询
+export function securityCheckDangerGetMemberInfo (data) {
+  return request({
+    url: '/security/checkDanger/getMemberInfo',
+    method: 'post',
+    data: data
+  })
+}
+//复查管理-督导组转移查询人员列表
+export function securityCheckDangerGetMemberList (data) {
+  return request({
+    url: '/security/checkDanger/getMemberList',
+    method: 'post',
+    data: data
+  })
+}
+//复查管理-转移隐患表复查人
+export function securityCheckDangerUpdateByReview (data) {
+  return request({
+    url: '/security/checkDanger/updateByReview',
+    method: 'post',
+    data: data
+  })
+}
+//复查管理-复查提交
+export function securityCheckDangerApprove (data) {
+  return request({
+    url: '/security/checkDanger/approve',
+    method: 'post',
+    data: data
+  })
+}
 /**************************** 安全检查-公共部分 ****************************/
 // 查询用户身份-校级管理员/院级管理员/督导组成员
 export function securityDataStatisticsGetUserIdentity(query) {

+ 0 - 3
src/views/safetyCheck/collegeInspect/hiddenDangersReview/index.vue

@@ -179,9 +179,6 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
   import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',

+ 35 - 11
src/views/safetyCheck/collegeWorktable/coverageRateEcharts.vue

@@ -4,27 +4,51 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCheckOverlap,
+} from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'coverageRateEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckOverlap();
     },
     methods:{
+      securityIndexStatisticsCheckOverlap(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCheckOverlap(obj).then(response => {
+          this.$set(this,'newData',{
+            notCheckRatio:parseInt(response.data.notCheckRatio),
+            checkRatio:parseInt(response.data.checkRatio),
+            subNum:parseInt(response.data.subNum),
+          });
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
       //eCharts方法
-      eCharts(){
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('coverageRateEcharts-box'));
         const datalist= [
-          { value: 504, name: '未检查' },
-          { value: 735, name: '已检查' },
+          { value: newData.notCheckRatio, name: '未检查' },
+          { value: newData.checkRatio, name: '已检查' },
         ]
         let option = {
 
@@ -34,7 +58,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "38%",
               formatter: (name) => {
@@ -43,10 +67,10 @@
                 var rate;
                 for (var i = 0; i < datalist.length; i++) {
                   total += datalist[i].value;
-                  if (datalist[i].name == name) {
+                  if (datalist[i].name == '未检查') {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -70,7 +94,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "54%",
               formatter: (name) => {
@@ -82,7 +106,7 @@
                   if (datalist[i].name == name) {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -105,7 +129,7 @@
           title: [
             {
               text: '实验室',
-              subtext: '2023间',
+              subtext: newData.subNum+'间',
               textStyle: {
                 fontSize: 12,
                 color: "#333333"

+ 43 - 18
src/views/safetyCheck/collegeWorktable/dataScreening.vue

@@ -1,12 +1,12 @@
 <template>
   <!-- 数据总览 -->
   <div class="dataScreening">
-    <div class="top-l-l">
+    <div class="top-l-l" style="width:130px;">
       <div class="top-l-l-t">
-        <i>9</i>
-        <i>9</i>
-        <i>9</i>
-        <b>次</b>
+        <p class="null-p"></p>
+        <p class="for-p" v-for="(item,index) in newData.checkNum">{{item}}</p>
+        <p class="text-p">次</p>
+        <p class="null-p"></p>
       </div>
       <div class="top-l-l-m">2024年</div>
       <div class="top-l-l-b">校院巡查</div>
@@ -15,12 +15,12 @@
     <div class="top-l-r">
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_jcxms@1x.png"/>
-        <div class="top-l-r-li-m"><i>6524</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.checkItemsNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">检查项目数</div>
       </div>
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_xfzgtzs@1x.png"/>
-        <div class="top-l-r-li-m"><i>2546</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.noticeNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">下发整改通知书</div>
       </div>
     </div>
@@ -28,14 +28,21 @@
 </template>
 
 <script>
-
+  import {
+    securityIndexStatisticsCheck,
+  } from '@/api/safetyCheck/indexDemoOne'
   export default {
     name: 'dataScreening',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
+        newData:{
+          checkNum:'',
+          checkItemsNum:'',
+          noticeNum:'',
+        },
 
       }
     },
@@ -43,10 +50,24 @@
 
     },
     mounted(){
-
+      this.securityIndexStatisticsCheck();
     },
     methods: {
-
+      securityIndexStatisticsCheck(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCheck(obj).then(response => {
+          this.$set(this,'newData',{
+            checkNum:response.data.checkNum+'',
+            checkItemsNum:response.data.checkItemsNum,
+            noticeNum:response.data.noticeNum,
+          });
+        });
+      },
     }
   }
 </script>
@@ -66,8 +87,11 @@
       .top-l-l-t{
         display: flex;
         justify-content: flex-start;
-        margin: 24px 0 0 20px;
-        >i{
+        margin: 24px 0 0 0;
+        .null-p{
+          flex:1;
+        }
+        .for-p{
           font-style: normal;
           width: 20px;
           height: 26px;
@@ -80,7 +104,7 @@
           line-height: 26px;
           text-align: center;
         }
-        >b{
+        .text-p{
           font-weight: 400;
           font-size: 16px;
           color: #333333;
@@ -93,14 +117,16 @@
         font-size: 16px;
         color: #333333;
         line-height: 24px;
-        margin: 22px 0 0 28px;
+        margin: 22px 0 0 0;
+        text-align: center;
       }
       .top-l-l-b{
         font-weight: 400;
         font-size: 14px;
         color: #333333;
         line-height: 24px;
-        margin: 2px 0 0 28px;
+        margin: 2px 0 0 0;
+        text-align: center;
       }
     }
     .line{
@@ -108,7 +134,6 @@
       height:110px;
       border: 1px dashed #D8D8D8;
       margin-top: 14px;
-      margin-left: 10px;
     }
     .top-l-r{
       display: flex;

+ 32 - 15
src/views/safetyCheck/collegeWorktable/dataScreeningChart.vue

@@ -6,46 +6,63 @@
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsProportionChart,
+  } from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'dataScreeningChart',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsProportionChart();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsProportionChart(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsProportionChart(obj).then(response => {
+          this.$set(this,'newData',response.data);
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('dataScreeningChart-box'));
         let data = [
           {
-            name: "隐患数8724 个",
-            value: 54,
+            name: "隐患数"+newData.hazardNum+" 个",
+            value: newData.hazardRatio,
           },
           {
-            name: "已整改8724 个",
-            value: 44,
+            name: "已整改"+newData.rectifiedNum+" 个",
+            value: newData.rectifiedRatio,
           },
           {
-            name: "暂无法整改4 个",
-            value: 35,
+            name: "暂无法整改"+newData.unableRectifyNum+" 个",
+            value: newData.unableRectifyRatio,
           },
           {
-            name: "多次整改未完成4 个",
-            value: 30,
+            name: "多次整改未完成"+newData.notFinishedNum+" 个",
+            value: newData.notFinishedRatio,
           },
           {
-            name: "复查通过8400 个",
-            value: 20,
+            name: "复查通过"+newData.inspectionPassedNum+" 个",
+            value: newData.inspectionPassedRatio,
           },
         ];
 

+ 45 - 39
src/views/safetyCheck/collegeWorktable/hiddenDangerStatisticsEcharts.vue

@@ -1,53 +1,59 @@
 <template>
-  <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box"></div>
+  <div>
+    <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box" v-if="eChartsList[0]"></div>
+    <p v-if="!eChartsList[0]" style="color:#999;text-align: center;line-height:330px;">暂无数据</p>
+  </div>
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsHazardScatter,
+  } from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   import { hiddenCountByType, collegCheckHiddenCountByType,isSCollege } from '@/api/safetyCheck/index'
   export default {
     name: 'hiddenDangerStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
         hdLevel:1,
         userFlg:true,
         nullType:false,
+        eChartsList:[],
       }
     },
     created(){
 
     },
     mounted(){
-        this.schoolEcharts()
+      this.securityIndexStatisticsHazardScatter();
     },
     methods:{
-      schoolEcharts(){
-        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
-        let data = [{
-          name: "1.基础安全",
-          value: 1,
-        },
-          {
-            name: "10.生物安全",
-            value: 2,
-          },
-          {
-            name: "11.机电安全",
-            value: 3,
-          },
-          {
-            name: "9.特种设备与常规\n冷热设备",
-            value: 4,
-          },];
-       /*  for(let i=0;i<response.rows.length;i++){
-          // substring
-          let obj = {
-            name:response.rows[i].collegeName.length>8?response.rows[i].collegeName.substring(0,8)+'..':response.rows[i].collegeName,
-            nameText:response.rows[i].collegeName,
-            value:response.rows[i].sumTotal,
+      securityIndexStatisticsHazardScatter(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsHazardScatter(obj).then(response => {
+          let list = [];
+          for(let i=0;i<response.data.length;i++){
+            list.push({
+              name:response.data[i].oneLevelName,
+              value:response.data[i].ratio,
+            })
           }
-          data.push(obj);
-        } */
+          this.$set(this,'eChartsList',list[0]?list:[]);
+          this.$nextTick(()=>{
+            this.schoolEcharts(this.eChartsList);
+          })
+        });
+      },
+      schoolEcharts(list){
+        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
         let option = {
           legend: {
             show:false,
@@ -68,21 +74,21 @@
               radius: ['0%', '40%'],
               label: {
                 normal: {
-                  formatter: '{b} {d}%',
+                  formatter: function(params) {
+                    let name = params.name;
+                    let percent = params.percent+'%';
+                    if (name.length > 10) {
+                      name = name.substring(0, 10) + '...';
+                    }
+                    return name+percent;
+                  },
                   textStyle: {
                     fontSize: 12,
-                    color:'#333'
+                    color: '#333'
                   },
-                  padding: [0, -110, 26, -110],
-                }
-              },
-              labelLine: {
-                normal: {
-                  length: 30,
-                  length2: 110,
                 }
               },
-              data: data,
+              data: list,
               itemStyle: {
                 normal: {
                   color: function (colors) {
@@ -103,6 +109,6 @@
 
 <style scoped lang="scss">
   .hiddenDangerStatisticsEcharts{
-    height:420px;
+    height:330px;
   }
 </style>

+ 169 - 38
src/views/safetyCheck/collegeWorktable/index.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="app-container worktable scrollbar-box">
-      <div class="main">
+      <div class="main" v-if="pageType">
         <div class="top">
           <!-- 数据总览 -->
-          <data-screening></data-screening>
+          <data-screening :propsData="propsData"></data-screening>
           <!-- 数据总览图表 -->
           <div class="top-c">
-            <data-screening-chart></data-screening-chart>
+            <data-screening-chart :propsData="propsData"></data-screening-chart>
           </div>
           <!-- 整改完成率 -->
           <div class="top-r">
-            <rectification-finish></rectification-finish>
+            <rectification-finish :propsData="propsData"></rectification-finish>
           </div>
         </div>
         <div class="center">
@@ -24,11 +24,11 @@
               <div class="center-l-t-b">
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_gj@1x.png"/>
-                  <p>共计2333项</p>
+                  <p>共计{{dataOne.hazardsNum}}项</p>
                 </div>
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_wzgyh_sjsys@1x.png"/>
-                  <p>涉及333个实验室</p>
+                  <p>涉及{{dataOne.subNum}}个实验室</p>
                 </div>
               </div>
             </div>
@@ -38,7 +38,7 @@
                 <p></p>
                 <p>检查覆盖率</p>
               </div>
-              <coverage-rate-echarts></coverage-rate-echarts>
+              <coverage-rate-echarts :propsData="propsData"></coverage-rate-echarts>
             </div>
           </div>
           <div class="center-c">
@@ -50,19 +50,19 @@
               <div class="center-c-t-b">
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dz@1x.png"/>
-                  <p>当周1项</p>
+                  <p>当周{{dataTwo.weekNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dy@1x.png"/>
-                  <p>当月1项</p>
+                  <p>当月{{dataTwo.monthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_sy@1x.png"/>
-                  <p>上月1项</p>
+                  <p>上月{{dataTwo.lastMonthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dn@1x.png"/>
-                  <p>当年111项</p>
+                  <p>当年{{dataTwo.yearNum}}项</p>
                 </div>
               </div>
             </div>
@@ -71,7 +71,7 @@
                 <p></p>
                 <p>检查结果统计</p>
               </div>
-              <inspection-statistics-echarts></inspection-statistics-echarts>
+              <inspection-statistics-echarts :propsData="propsData"></inspection-statistics-echarts>
             </div>
           </div>
           <div class="center-c2">
@@ -79,7 +79,7 @@
               <p></p>
               <p>全年指标隐患分布</p>
             </div>
-            <hidden-danger-statistics-echarts></hidden-danger-statistics-echarts>
+            <hidden-danger-statistics-echarts :propsData="propsData"></hidden-danger-statistics-echarts>
           </div>
           <div class="center-r">
             <div class="center-r-li">
@@ -102,19 +102,27 @@
           <div class="bottom-l">
             <div class="min-title-box">
               <p></p>
-              <p>2024年学院名称实验室自查统计</p>
+              <p>{{yearData}}年学院名称实验室自查统计</p>
               <p>查看全部</p>
             </div>
             <div class="bottom-l-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="检查名称" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="检查时间" align="center" prop="title" show-overflow-tooltip width="226" fixed/>
-                <el-table-column label="检查数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="隐患数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="整改数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="多次整改未完成" align="center" prop="title" show-overflow-tooltip width="130" fixed/>
-                <el-table-column label="整改完成率" align="center" prop="title" show-overflow-tooltip width="90" fixed/>
+              <el-table class="table-box" border :data="tableListOne" ref="multipleTable">
+                <el-table-column label="序号" align="center"  type="index" width="50"/>
+                <el-table-column label="检查名称" align="center" prop="planTitle" show-overflow-tooltip />
+                <el-table-column label="检查时间" align="center" prop="cycleStartTime" show-overflow-tooltip width="226">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.cycleStartTime}} - {{scope.row.cycleEndTime}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="检查数" align="center" prop="checkNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="隐患数" align="center" prop="hazardNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="整改数" align="center" prop="rectificationNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="多次整改未完成" align="center" prop="multipleRectificationsNum" show-overflow-tooltip width="130"/>
+                <el-table-column label="整改完成率" align="center" prop="ratio" show-overflow-tooltip width="90">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.ratio}}%</span>
+                  </template>
+                </el-table-column>
               </el-table>
             </div>
           </div>
@@ -125,15 +133,12 @@
               <p>查看全部</p>
             </div>
             <div class="bottom-r-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="实验室" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="隐患总数" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="化学安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="安全 设施" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="基础 安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="生物安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="特种与冷热设备" align="center" prop="title" show-overflow-tooltip width="74" fixed/>
+              <el-table class="table-box" border :data="tableListTwo" ref="multipleTable">
+                <el-table-column label="序号" align="center"  type="index" width="50"/>
+                <el-table-column label="实验室" align="center" prop="deptName" width="100" show-overflow-tooltip />
+                <el-table-column label="隐患总数" align="center" prop="hazardNum" show-overflow-tooltip />
+                <el-table-column v-for="(item,index) in tableListTwoTitle" width="50" :key="index"
+                                 :label="item.name" align="center" :prop="item.code" show-overflow-tooltip/>
               </el-table>
             </div>
           </div>
@@ -143,7 +148,14 @@
 </template>
 
 <script>
-  import {  } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsUserIdentity,
+    securityCollegeStatisticsCollegeCheck,
+    securityIndexStatisticsRectifiedHazard,
+    securityIndexStatisticsPlanList,
+    reportSecIndexDataGetGaugeOutfit,
+    reportSecIndexDataDistributionHazard,
+  } from '@/api/safetyCheck/indexDemoOne'
   import dataScreening from './dataScreening.vue'
   import dataScreeningChart from './dataScreeningChart.vue'
   import rectificationFinish from './rectificationFinish.vue'
@@ -164,16 +176,119 @@
       return{
         //用户身份 校级/院级
         userType:"",
-        tableList:[],
+        tableListOne:[],
+        tableListTwoTitle:[],
+        tableType:false,
+        tableListTwo:[],
+        propsData:{},
+        pageType:false,
+        yearData:'',
+        dataOne:{
+          hazardsNum:0,
+          subNum:0,
+        },
+        dataTwo:{
+          weekNum:0,
+          monthNum:0,
+          lastMonthNum:0,
+          yearNum:0,
+        },
       }
     },
     created(){
-
+      this.securityIndexStatisticsUserIdentity();
     },
     mounted(){
 
     },
     methods:{
+      //查询用户身份
+      securityIndexStatisticsUserIdentity(){
+        securityIndexStatisticsUserIdentity().then(response => {
+          this.$set(this,'propsData',{
+            source:true,
+            schoolAdmin:response.schoolAdmin,
+            deptId:response.deptId,
+            subIds:response.subIds,
+          });
+          this.$set(this,'pageType',true);
+          this.$set(this,'yearData',new Date().getFullYear());
+          if(!response.schoolAdmin){
+            //未整改隐患
+            this.securityCollegeStatisticsCollegeCheck();
+            //已整改隐患
+            this.securityIndexStatisticsRectifiedHazard();
+            //年度全校实验室安全检查统计
+            this.securityIndexStatisticsPlanList();
+            //各单位全年指标隐患分布表头数据
+            this.reportSecIndexDataGetGaugeOutfit();
+          }
+        });
+      },
+      //未整改隐患
+      securityCollegeStatisticsCollegeCheck(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityCollegeStatisticsCollegeCheck(obj).then(response => {
+          this.$set(this,'dataOne',response.data);
+        });
+      },
+      //已整改隐患
+      securityIndexStatisticsRectifiedHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsRectifiedHazard(obj).then(response => {
+          this.$set(this,'dataTwo',response.data);
+        });
+      },
+      //年度全校实验室安全检查统计
+      securityIndexStatisticsPlanList(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsPlanList(obj).then(response => {
+          this.$set(this,'tableListOne',response.data);
+        });
+      },
+      //各单位全年指标隐患分布表头数据
+      reportSecIndexDataGetGaugeOutfit(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataGetGaugeOutfit(obj).then(response => {
+          this.$set(this,'tableListTwoTitle',response.data);
+          this.$set(this,'tableType',true);
+          this.$nextTick(()=>{
+            this.reportSecIndexDataDistributionHazard();
+          })
+        });
+      },
+      //各单位全年指标隐患分布列表
+      reportSecIndexDataDistributionHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataDistributionHazard(obj).then(response => {
+          this.$set(this,'tableListTwo',response.data);
+        });
+      },
       renderheader(h, { column, $index }) {
         return h('span', {}, [
           h('span', {}, column.label.split('/')[0]),
@@ -372,23 +487,39 @@
       justify-content: flex-start;
       .bottom-l{
         width: 967px;
-        height: 301px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
-        box-shadow: 0px 4px 14px 0px rgba(0,0,0,0.2);
+        box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 20px 20px 20px 20px;
         .bottom-l-b{
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
           margin: 14px 20px 0;
+          padding-bottom:20px;
         }
       }
       .bottom-r{
         width: 548px;
-        height: 301px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
         box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 10px 10px 10px 10px;
         margin-left: 20px;
         .bottom-r-b{
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
           margin: 14px 20px 0;
+          padding-bottom:20px;
         }
       }
     }

+ 34 - 28
src/views/safetyCheck/collegeWorktable/inspectionStatisticsEcharts.vue

@@ -3,43 +3,49 @@
 </template>
 
 <script>
-  import { checkStatistics } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsCheckResults
+  } from '@/api/safetyCheck/indexDemoOne'
   export default {
     name: 'inspectionStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
-
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckResults();
     },
     methods:{
-      //eCharts方法
-      eCharts(){
-        let data = {
-          name : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',],
-          standards : [0,0,10,20,30,40,50,40,30,20,10,0,0],
-          notStandards : [0,0,5,10,10,20,25,30,20,20,20,20,20],
+      securityIndexStatisticsCheckResults(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
         }
-        /* for(let i=0;i<response.rows.length;i++){
-          data.name.push(response.rows[i].yearMonth)
-          if(response.rows[i].notStandards.indexOf('%') != -1){
-            response.rows[i].notStandards = response.rows[i].notStandards.split('%')[0]
-            data.notStandards.push(response.rows[i].notStandards)
-          }else{
-            data.notStandards.push(response.rows[i].notStandards)
-          }
-          if(response.rows[i].standards.indexOf('%') != -1){
-            response.rows[i].standards = response.rows[i].standards.split('%')[0]
-            data.standards.push(response.rows[i].standards)
-          }else{
-            data.standards.push(response.rows[i].standards)
+        securityIndexStatisticsCheckResults(obj).then(response => {
+          let nameList = [];
+          let standardsList = [];
+          let notStandardsList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            standardsList.push(response.data[i].qualifiedNum)
+            notStandardsList.push(response.data[i].unqualifiedNum)
+
           }
-        } */
+          this.$nextTick(()=>{
+            this.eCharts(nameList,standardsList,notStandardsList);
+          })
+        });
+      },
+      //eCharts方法
+      eCharts(nameList,standardsList,notStandardsList){
         let myChart = this.$echarts.init(document.getElementById('inspectionStatisticsEcharts-box'));
         let option = {
           //你的代码
@@ -50,7 +56,7 @@
               let html = '<div>';
               html += '<p>'+params[0].name+'</p>'
               for(let i=0;i<params.length;i++){
-                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'%<p>'
+                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'<p>'
               }
               return html;
             },
@@ -100,7 +106,7 @@
               axisTick: {
                 show: false,
               },
-              data: data.name,
+              data: nameList,
             },
           ],
           yAxis: [
@@ -192,7 +198,7 @@
                   global: false,
                 },
               },
-              data: data.standards,
+              data: standardsList,
             },
             {
               name: '不符合',
@@ -247,7 +253,7 @@
                   global: false,
                 },
               },
-              data: data.notStandards,
+              data: notStandardsList,
             }
           ]
         };

+ 29 - 7
src/views/safetyCheck/collegeWorktable/rectificationFinish.vue

@@ -6,25 +6,47 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCompleteRatio,
+} from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'rectificationFinish',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCompleteRatio();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsCompleteRatio(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCompleteRatio(obj).then(response => {
+          let nameList = [];
+          let valueList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            valueList.push(response.data[i].ratio)
+          }
+          this.$nextTick(()=>{
+            this.eCharts(nameList,valueList);
+          })
+        });
+      },
+      eCharts(nameList,valueList){
         let myChart = this.$echarts.init(document.getElementById('rectificationFinish-box'));
 
         let option = {
@@ -53,7 +75,7 @@
           xAxis : [
             {
               type : 'category',
-              data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
+              data : nameList,
               axisLabel: {
                 textStyle: {//改变X轴字体颜色
                   color: '#999999',
@@ -122,7 +144,7 @@
               },
               type:'bar',
               barWidth: '10',
-              data:[10, 52, 200, 334, 390, 330, 220,234,316,123,442,234]
+              data:valueList
             }
           ]
         };

+ 7 - 7
src/views/safetyCheck/components/initiateInspect/historyRecordsComponent.vue

@@ -49,13 +49,13 @@
             <img class="for-img" :src="imgItem.fileUrl" @click="lookImg(item.rectifyUploadList,imgIndex)"
                  v-for="(imgItem,imgIndex) in item.rectifyUploadList" :key="imgIndex">
           </div>
-          <div class="right-text-box">
-            <p class="right-text-name-p">整改方案</p>
-            <div class="up-file-box">
-              <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
-              <p @click="lookFile(item)">{{item.rectifyMaterialName}}</p>
-            </div>
-          </div>
+          <!--<div class="right-text-box">-->
+            <!--<p class="right-text-name-p">整改方案</p>-->
+            <!--<div class="up-file-box">-->
+              <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+              <!--<p @click="lookFile(item)">{{item.rectifyMaterialName}}</p>-->
+            <!--</div>-->
+          <!--</div>-->
           <div class="right-text-box" style="display: flex;">
             <div class="right-text-box">
               <p class="right-text-name-p">整改人</p>

+ 13 - 2
src/views/safetyCheck/components/initiateInspect/initiateInspect.vue

@@ -213,7 +213,7 @@
           </div>
         </el-form>
         <!--历史记录-->
-        <history-records-component v-if="projectData.checkStatus == 1 && historyRecordsComponentPropsType"
+        <history-records-component ref="historyRecordsComponent" v-if="projectData.checkStatus == 1 && historyRecordsComponentPropsType"
                                    :historyRecordsComponentPropsData="historyRecordsComponentPropsData"></history-records-component>
         <!--整改-->
         <rectification-component ref="rectificationComponent" v-if="initiateInspectData.orderType == 3"></rectification-component>
@@ -244,6 +244,7 @@
     securityCheckSetOptionUnCheckList,
     securityCheckDangerGetDangerId,
     securityCheckDangerCheckRectify,
+    securityCheckDangerApprove,
   } from '@/api/safetyCheck/indexDemoOne'
 
   export default {
@@ -448,7 +449,17 @@
           }else if(this.initiateInspectData.orderType == 5){
             //复查提交
             this.$refs['recheckComponent'].submitData().then(data => {
-              console.log('data',data)
+              let list = JSON.parse(JSON.stringify(this.$refs['historyRecordsComponent'].dataList))
+              let obj = {
+                rectifyId:list[list.length-1].rectifyId,
+                examineResult:data.examineResult,
+                examineOpinion:data.examineOpinion,
+                examineUploadList:data.examineUploadList,
+              };
+              securityCheckDangerApprove(obj).then(response => {
+                this.msgSuccess(response.message)
+                this.$parent.tableButton(6)
+              })
             });
           }
         }

+ 54 - 39
src/views/safetyCheck/components/initiateInspect/recheckComponent.vue

@@ -8,32 +8,33 @@
         <span :class="itemShowType?'el-icon-arrow-down':'el-icon-arrow-up'" @click="itemShowButton()"></span>
       </p>
       <div v-if="itemShowType" style="margin-top:20px;">
-        <div class="right-text-box">
-          <p class="right-text-name-p">复查结果</p>
-          <div :class="addForm.formData7 == 1?'right-check-box':'right-no-check-box'">
-            <div>
-              <p></p>
+        <el-form-item label="复查结果" prop="examineResult">
+          <div class="right-text-box">
+            <div :class="addForm.examineResult == 1?'right-check-box':'right-no-check-box'" @click="checkButton(1)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">复查完毕</p>
             </div>
-            <p class="right-no-check-title-p">复查完毕</p>
-          </div>
-          <div :class="addForm.formData7 == 2?'right-check-box':'right-no-check-box'">
-            <div>
-              <p></p>
+            <div :class="addForm.examineResult == 0?'right-check-box':'right-no-check-box'" @click="checkButton(0)">
+              <div>
+                <p></p>
+              </div>
+              <p class="right-check-title-p">退回整改</p>
             </div>
-            <p class="right-no-check-title-p">退回整改</p>
           </div>
-        </div>
-        <el-form-item label="验证情况" prop="formData5">
+        </el-form-item>
+        <el-form-item label="验证情况" prop="examineOpinion">
           <el-input placeholder="请输入验证情况" maxLength='200' type="textarea" style="width:704px;"
-                    resize="none" v-model="addForm.formData5" show-word-limit :rows="3"></el-input>
+                    resize="none" v-model="addForm.examineOpinion" show-word-limit :rows="3"></el-input>
         </el-form-item>
-        <el-form-item label="现场照片" prop="imgDtoList">
-          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.imgDtoList" :key="imgIndex">
-            <img class="for-img" :src="img.fileUrl" @click="fullScreenViewClick(addForm.imgDtoList,imgIndex)">
+        <el-form-item label="现场照片" prop="examineUploadList">
+          <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.examineUploadList" :key="imgIndex">
+            <img class="for-img" :src="img.fileUrl" @click="lookImg(addForm.examineUploadList,imgIndex)">
             <p class="for-del-button el-icon-circle-close" @click="delImg(imgIndex)"></p>
           </div>
           <el-upload
-            v-if="addForm.imgDtoList.length<6"
+            v-if="addForm.examineUploadList.length<6"
             style="display: inline-block;overflow: hidden"
             class="avatar-uploader"
             :action="uploadImgUrl"
@@ -64,6 +65,7 @@
     },
     data(){
       return{
+        loading:false,
         //上传相关
         uploadImgUrl: this.uploadUrl(), // 上传的图片服务器地址
         headers: {
@@ -73,25 +75,24 @@
         fullScreenViewProps:[],
         itemShowType:true,
         addForm:{
-          imgDtoList:[],
+          examineResult:null,
+          examineOpinion:'',
+          examineUploadList:[],
         },
         rules:{
-          formData1: [
-            { required: true, message: "请选择检查项目", trigger: "blur" },
-            { required: true, message: "请选择检查项目", validator: this.spaceJudgment, trigger: "blur" }
-          ],
-          formData4: [
-            { required: true, message: "请选择检查结果", trigger: "blur" },
-            { required: true, message: "请选择检查结果", validator: this.spaceJudgment, trigger: "blur" }
+          examineResult: [
+            { required: true, message: "请选择复查结果", trigger: "blur" },
+            { required: true, message: "请选择复查结果", validator: this.spaceJudgment, trigger: "blur" }
           ],
-          formData5: [
-            { required: true, message: "请输入隐患描述", trigger: "blur" },
-            { required: true, message: "请输入隐患描述", validator: this.spaceJudgment, trigger: "blur" }
+          examineOpinion: [
+            { required: true, message: "请输入验证情况", trigger: "blur" },
+            { required: true, message: "请输入验证情况", validator: this.spaceJudgment, trigger: "blur" }
           ],
-          imgDtoList: [
+          examineUploadList: [
             { required: true, message: "请上传现场照片", trigger: "blur" },
           ],
         },
+        upDataName:'',
       }
     },
     created(){
@@ -101,14 +102,29 @@
 
     },
     methods:{
+      submitData(){
+        return new Promise(resolve=>{
+          this.$refs["addForm"].validate(valid => {
+            if (valid) {
+              resolve(this.addForm)
+            }
+          })
+        })
+      },
       //子项展开隐藏按钮
       itemShowButton(){
         this.$set(this,'itemShowType',!this.itemShowType);
       },
+      checkButton(type){
+        if(this.addForm.examineResult != type){
+          this.$set(this.addForm,'examineResult',type);
+          this.$forceUpdate();
+        }
+      },
       /*==========上传相关==========*/
       handleAvatarSuccess(res) {
         this.$set(this,'loading',false);
-        if(this.addForm.imgDtoList.length>5){
+        if(this.addForm.examineUploadList.length>5){
           this.msgError('最多只可上传6张')
           return
         }
@@ -122,12 +138,13 @@
         let obj ={
           fileName:this.upDataName,
           fileUrl:res.data.url,
+          fileType:2,
         };
-        this.addForm.imgDtoList.push(obj);
+        this.addForm.examineUploadList.push(obj);
         this.$forceUpdate()
       },
       beforeAvatarUpload(file) {
-        if(this.addForm.imgDtoList.length>5){
+        if(this.addForm.examineUploadList.length>5){
           this.msgError('最多只可上传6张')
           return false
         }
@@ -148,12 +165,11 @@
       },
       //删除照片
       delImg(imgIndex){
-        this.addForm.imgDtoList.splice(imgIndex,1);
+        this.addForm.examineUploadList.splice(imgIndex,1);
       },
       //照片预览
-      fullScreenViewClick(list,index){
-        this.$set(this,'fullScreenViewProps',list);
-        this.$refs['fullScreenView'].initialize(index);
+      lookImg(list,index){
+        this.$parent.fullScreenViewClick(list,index);
       },
 
     },
@@ -181,7 +197,6 @@
       }
       .right-text-box{
         display: flex;
-        margin-bottom:20px;
         .right-text-name-p{
           width:90px;
           line-height:40px;
@@ -235,7 +250,7 @@
               border-radius:50%;
             }
           }
-          .right-no-check-title-p{
+          .right-check-title-p{
             margin-left:8px;
             height:40px;
             line-height:40px;

+ 25 - 25
src/views/safetyCheck/components/initiateInspect/rectificationComponent.vue

@@ -25,8 +25,8 @@
           </div>
         </el-form-item>
         <el-form-item label="整改措施" prop="rectifyMeasure">
-          <el-input placeholder="请输入整改措施" maxLength='200' type="textarea" style="width:704px;"
-                    resize="none" v-model="addForm.rectifyMeasure" show-word-limit :rows="3"></el-input>
+          <el-input placeholder="立整立改的请填写相关文字及整改前后照片对比等,不能立整立改的请说明因并附整改计划、措施等" maxlength='500' type="textarea" style="width:704px;"
+                    resize="none" v-model="addForm.rectifyMeasure" :show-word-limit="true" :rows="3"></el-input>
         </el-form-item>
         <el-form-item label="现场照片" prop="rectifyUploadList">
           <div class="snapshotManagement-for-img-box" v-for="(img,imgIndex) in addForm.rectifyUploadList" :key="imgIndex">
@@ -46,29 +46,29 @@
           </el-upload>
           <p class="up-img-text">支持jpg/png/bmp/gif格式,且不超过2M,最多上传6张</p>
         </el-form-item>
-        <div v-if="addForm.rectifyResult == 0">
-          <el-form-item label="整改方案" prop="rectifyMaterialUrl">
-            <div class="up-file-button" v-if="!addForm.rectifyMaterialUrl">
-              <el-upload
-                v-if="addForm.rectifyUploadList.length<6"
-                style="display: inline-block;overflow: hidden"
-                class="avatar-uploader"
-                :action="uploadImgUrl"
-                :show-file-list="false"
-                :on-success="(res)=>handleAvatarSuccess('file',res)"
-                :headers="headers"
-                :before-upload="(res)=>beforeAvatarUpload('file',res)">
-                <p class="up-file-min-button">+ 上传文件</p>
-              </el-upload>
-              <p class="up-file-text">支持docx/xlsx/pdf格式文件</p>
-            </div>
-            <div class="up-file-box" v-if="addForm.rectifyMaterialUrl">
-              <img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">
-              <p @click="lookFile">{{addForm.rectifyMaterialName}}</p>
-              <p class="el-icon-close" @click="delFileButton"></p>
-            </div>
-          </el-form-item>
-        </div>
+        <!--<div v-if="addForm.rectifyResult == 0">-->
+          <!--<el-form-item label="整改方案" prop="rectifyMaterialUrl">-->
+            <!--<div class="up-file-button" v-if="!addForm.rectifyMaterialUrl">-->
+              <!--<el-upload-->
+                <!--v-if="addForm.rectifyUploadList.length<6"-->
+                <!--style="display: inline-block;overflow: hidden"-->
+                <!--class="avatar-uploader"-->
+                <!--:action="uploadImgUrl"-->
+                <!--:show-file-list="false"-->
+                <!--:on-success="(res)=>handleAvatarSuccess('file',res)"-->
+                <!--:headers="headers"-->
+                <!--:before-upload="(res)=>beforeAvatarUpload('file',res)">-->
+                <!--<p class="up-file-min-button">+ 上传文件</p>-->
+              <!--</el-upload>-->
+              <!--<p class="up-file-text">支持docx/xlsx/pdf格式文件</p>-->
+            <!--</div>-->
+            <!--<div class="up-file-box" v-if="addForm.rectifyMaterialUrl">-->
+              <!--<img src="@/assets/ZDimages/safetyCheck/icon_dr_wj.png">-->
+              <!--<p @click="lookFile">{{addForm.rectifyMaterialName}}</p>-->
+              <!--<p class="el-icon-close" @click="delFileButton"></p>-->
+            <!--</div>-->
+          <!--</el-form-item>-->
+        <!--</div>-->
       </div>
     </el-form>
   </div>

+ 1 - 0
src/views/safetyCheck/dataStatistics/hiddenDangerStatistics.vue

@@ -125,6 +125,7 @@
 //import { getDicts } from "@/api/commonality/noPermission";
 //import { systemUserSelect } from "@/api/commonality/permission";
 import {
+  securityIndexStatisticsUserIdentity,
   reportHazardReportOneHazardGaugeOutfit,
   securityDataStatisticsGetUserIdentity,
   securityHazardReportColumnPicture,

+ 275 - 132
src/views/safetyCheck/schoolInspect/reviewManage/index.vue

@@ -6,82 +6,71 @@
         <el-form :model="queryParams" class="form-box" ref="queryForm"
                  :inline="true" style="width:100%;">
           <div class="table-school-college-toggle-box">
-            <p :class="tableButtonCheckType==1?'p-check':''" @click="tableCheck(1)">全部</p>
-            <p :class="tableButtonCheckType==2?'p-check':''" @click="tableCheck(2)">待复查</p>
-            <p :class="tableButtonCheckType==3?'p-check':''" @click="tableCheck(3)">已复查</p>
+            <p :class="reviewStatus==null?'p-check':''" @click="tableCheck(null)">全部</p>
+            <p :class="reviewStatus==0?'p-check':''" @click="tableCheck(0)">待复查</p>
+            <p :class="reviewStatus==1?'p-check':''" @click="tableCheck(1)">已复查</p>
           </div>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="检查类型" style="width:170px;">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+          <el-form-item label="" prop="planTitle">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.planTitle"
+              placeholder="计划标题"
+              style="width: 150px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="学院单位" style="width:190px;">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+          <el-form-item label="" prop="hazardCheckPro">
+            <el-cascader
+              style="width: 150px"
+              placeholder="检查指标"
+              v-model="queryParams.hazardCheckPro"
+              filterable
+              :show-all-levels="false"
+              :options="cascaderData"
+              :props="{ value: 'id', label: 'labelName',emitPath:false }"
+            ></el-cascader>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="楼栋" style="width:190px;">
-              <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
+          <el-form-item label="" prop="hazardCheckName">
+            <el-input
+              maxLength="30"
+              v-model="queryParams.hazardCheckName"
+              placeholder="模糊搜索检查指标项"
+              style="width: 170px"
+            />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分类" style="width:170px;">
+          <el-form-item label="" prop="deptId">
+            <el-select v-model="queryParams.deptId" placeholder="学院单位" style="width: 180px">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in deptOption"
+                :key="dict.deptId"
+                :label="dict.deptName"
+                :value="dict.deptId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData2" v-if="advancedType">
-            <el-select v-model="queryParams.queryParamsData2" placeholder="安全分级" style="width:170px;">
+          <el-form-item label="" prop="levelId">
+            <el-select v-model="queryParams.levelId" placeholder="安全分级" style="width: 180px">
               <el-option
-                v-for="dict in optionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
+                v-for="dict in levelOption"
+                :key="dict.levelId"
+                :label="dict.levelName"
+                :value="dict.levelId"
               />
             </el-select>
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="searchValue" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
+              v-model="queryParams.searchValue"
               placeholder="实验室/房间号"
-              style="width:170px;"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="计划标题"
-              style="width:170px;"
+              style="width: 200px"
             />
           </el-form-item>
-          <el-form-item label="" prop="queryParamsData1" v-if="advancedType">
+          <el-form-item label="" prop="rectifyName" v-if="advancedType">
             <el-input
               maxLength="30"
-              v-model="queryParams.queryParamsData1"
-              placeholder="检查人"
-              style="width:170px;"
+              v-model="queryParams.rectifyName"
+              placeholder="整改人"
+              style="width: 200px"
             />
           </el-form-item>
           <el-form-item label="" prop="state" v-if="advancedType">
@@ -89,7 +78,7 @@
               :clearable="false"
               v-model="dateRange"
               size="small"
-              style="width: 240px"
+              style="width: 280px"
               value-format="yyyy-MM-dd"
               type="daterange"
               range-separator="-"
@@ -105,24 +94,34 @@
       <div class="page-content-box">
         <el-table class="table-box" v-loading="loading" border :data="dataList">
           <el-table-column label="序号" type="index" width="60"/>
-          <el-table-column label="计划标题" prop="name"  show-overflow-tooltip/>
-          <el-table-column label="检查类型" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="检查名称" prop="content" width="100" show-overflow-tooltip/>
-          <el-table-column label="检查项目" prop="content" width="260" show-overflow-tooltip/>
-          <el-table-column label="实验室" prop="content" width="165" show-overflow-tooltip/>
-          <el-table-column label="检查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查人" prop="content" width="80" show-overflow-tooltip/>
-          <el-table-column label="复查状态" prop="state" width="80" show-overflow-tooltip>
+          <el-table-column label="计划标题" prop="planTitle"  show-overflow-tooltip/>
+          <el-table-column label="检查类型" prop="checkTypeName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查名称" prop="checkName" width="100" show-overflow-tooltip/>
+          <el-table-column label="检查项目" prop="hazardCheckCode" width="260" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.hazardCheckCode}} {{scope.row.hazardCheckName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="实验室" prop="subName" width="165" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span>{{scope.row.subName}} {{scope.row.roomNum}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="检查人" prop="createName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查人" prop="reviewName" width="80" show-overflow-tooltip/>
+          <el-table-column label="复查状态" prop="reviewStatus" width="80" show-overflow-tooltip>
             <template slot-scope="scope">
+              <span>{{scope.row.reviewStatus == 1?'已复查':(scope.row.reviewStatus == 0?'未复查':'')}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查结果" prop="state" width="80" show-overflow-tooltip>
+          <el-table-column label="复查结果" prop="examineResult" width="80" show-overflow-tooltip>
             <template slot-scope="scope">
+              <span>{{scope.row.examineResult == 1?'复查完毕':(scope.row.examineResult == 0?'退回整改':'')}}</span>
             </template>
           </el-table-column>
-          <el-table-column label="复查时间" prop="createTime" width="160" show-overflow-tooltip>
+          <el-table-column label="复查时间" prop="reviewTime" width="160" show-overflow-tooltip>
             <template slot-scope="scope">
-              <span>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</span>
+              <span>{{ parseTime(scope.row.reviewTime,"{y}-{m}-{d} {h}:{i}") }}</span>
             </template>
           </el-table-column>
           <el-table-column label="操作" width="130" show-overflow-tooltip >
@@ -130,16 +129,16 @@
               <div class="table-button-box">
                 <p class="table-button-null"></p>
                 <p class="table-button-p"
+                   v-if="scope.row.reviewButtion"
                    @click="tableButton(1,scope.row)"
-
                 >复查</p>
                 <p class="table-button-p"
+                   v-if="!scope.row.reviewButtion"
                    @click="tableButton(2,scope.row)"
-
                 >详情</p>
                 <p class="table-button-p"
-                   @click="tableButton(4,scope.row)"
-
+                   v-if="scope.row.isAdmin"
+                   @click="tableButton(3,scope.row)"
                 >转移</p>
                 <p class="table-button-null"></p>
               </div>
@@ -159,24 +158,33 @@
                :visible.sync="dialogType" v-if="dialogType" @close="dialogOff()"
                :close-on-click-modal="false" :close-on-press-escape="false">
       <div class="reviewManage-dialog-max-box">
-        <p class="reviewManage-dialog-name">督导组名称</p>
+        <p class="reviewManage-dialog-name">{{dialogGroupName}}</p>
         <div class="reviewManage-dialog-box">
           <img src="@/assets/ZDimages/safetyCheck/icon_xyxc_cy.png">
           <p>成员列表</p>
         </div>
-        <el-table class="table-box table-null-img-20" border :data="dialogData.dialogList1">
+        <el-table class="table-box table-null-img-20" border :data="dialogDataList">
           <el-table-column label="" align="center" width="150">
             <template scope="scope">
-              <div class="check-img-box" @click="tableColumnCheck(scope.row.dialogDataId)">
-                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_wxz@1x.png" v-if="scope.row.dialogDataId != tableColumnType">
-                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_xz@1x.png" v-if="scope.row.dialogDataId == tableColumnType">
+              <div class="check-img-box" v-if="dialogUserId != scope.row.userId"
+                   @click="tableColumnCheck(scope.row)">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_wxz@1x.png" v-if="scope.row.userId != reviewUserid">
+                <img src="@/assets/ZDimages/basicsModules/icon_fcrzy_xz@1x.png" v-if="scope.row.userId == reviewUserid">
               </div>
+              <p v-if="dialogUserId == scope.row.userId" style="text-align: center!important;">负责人</p>
             </template>
           </el-table-column>
-          <el-table-column label="姓名" prop="name" show-overflow-tooltip/>
-          <el-table-column label="工号" prop="name" width="130" show-overflow-tooltip/>
-          <el-table-column label="所在部门" prop="content" width="188" show-overflow-tooltip/>
+          <el-table-column label="姓名" prop="userName" show-overflow-tooltip/>
+          <el-table-column label="工号" prop="account" width="130" show-overflow-tooltip/>
+          <el-table-column label="所在部门" prop="deptName" width="188" show-overflow-tooltip/>
         </el-table>
+        <pagination :page-sizes="[20, 30, 40, 50]"
+                    v-show="dialogTotal>0"
+                    :total="dialogTotal"
+                    :page.sync="dialogQueryParams.page"
+                    :limit.sync="dialogQueryParams.pageSize"
+                    @pagination="securityCheckDangerGetMemberList"
+        />
       </div>
       <div slot="footer" class="dialog-footer dialog-footer-box">
         <p class="dialog-footer-button-null"></p>
@@ -189,9 +197,17 @@
   </div>
 </template>
 <script>
-  //import { getDicts } from "@/api/commonality/noPermission";
-  //import { systemUserSelect } from "@/api/commonality/permission";
-  //import { getInfo } from "@/api/basicsModules/index";
+  import {
+    getDeptDropList,
+    laboratoryClassLevelGetList,
+  } from '@/api/commonality/permission'
+  import {
+    securityCheckOptionList,
+    securityCheckDangerReviewList,
+    securityCheckDangerGetMemberInfo,
+    securityCheckDangerGetMemberList,
+    securityCheckDangerUpdateByReview,
+  } from "@/api/safetyCheck/indexDemoOne";
   import initiateInspect from "@/views/safetyCheck/components/initiateInspect/initiateInspect.vue";
   export default {
     name: 'index',
@@ -204,17 +220,26 @@
         //页面状态
         pageType:1,
         //复查状态选项卡
-        tableButtonCheckType:1,
+        reviewStatus:null,
         //页面遮罩
         loading:false,
-        //下拉列表数据
-        optionList:[{value:true,label:'启用'},{value:false,label:'停用'}],
+        //学院列表
+        deptOption:[],
+        //分级下拉列表
+        levelOption:[],
+        //检查项下拉列表
+        cascaderData:[],
         //查询条件
         queryParams:{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         },
         //时间数据
         dateRange:[],
@@ -227,40 +252,33 @@
         //组件传参
         initiateInspectData:{},
         //复查转移
-        dialogData:{
-          dialogData1:'督导组名称',
-          dialogList1:[
-            {
-              dialogDataId:1,
-              dialogDataType:false,
-              dialogDataName:'名称',
-              dialogDataNum:'工号',
-              dialogDataDept:'部门',
-            },
-            {
-              dialogDataId:2,
-              dialogDataType:false,
-              dialogDataName:'名称',
-              dialogDataNum:'工号',
-              dialogDataDept:'部门',
-            },
-          ],
+        dialogGroupName:'',
+        dialogUserId:'',
+        dialogQueryParams:{
+          page:1,
+          pageSize:20,
         },
+        dialogDataList:[],
+        dialogTotal:0,
         dialogType:false,
-        tableColumnType:null
+        dialogDangerId:'',
+        reviewUserid:null,
+        reviewName:null
       }
     },
     created () {
-
+      this.getDeptDropList();
+      this.laboratoryClassLevelGetList();
+      this.securityCheckOptionList();
     },
     mounted () {
-      //this.getList();
+      this.getList();
     },
     methods: {
       //复查状态选项卡切换
       tableCheck(type){
-        if (this.tableButtonCheckType !== type){
-          this.$set(this,'tableButtonCheckType',type);
+        if (this.reviewStatus !== type){
+          this.$set(this,'reviewStatus',type);
           this.resetQuery();
         }
       },
@@ -279,8 +297,13 @@
         this.$set(this,'queryParams',{
           page:1,
           pageSize:20,
-          queryParamsData1:"",
-          queryParamsData2 :null,
+          planTitle:"",
+          hazardCheckPro :null,
+          hazardCheckName:"",
+          deptId :null,
+          levelId :null,
+          searchValue:"",
+          rectifyName:"",
         });
         this.getList();
       },
@@ -288,14 +311,25 @@
       getList(){
         this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams))
-        if(this.dateRange[0]){
-          obj.startTime = this.dateRange[0]+'T00:00:00'
-          obj.endTime = this.dateRange[1]+'T23:59:59'
-        }else{
-          obj.startTime = "";
-          obj.endTime = "";
+        let data = {
+          planTitle:obj.planTitle,
+          hazardCheckPro:obj.hazardCheckPro,
+          hazardCheckName:obj.hazardCheckName,
+          deptId:obj.deptId,
+          levelId:obj.levelId,
+        };
+        if(this.advancedType){
+          data.searchValue = obj.searchValue;
+          data.rectifyName = obj.searchValue;
+          if(this.dateRange[0]){
+            data.startTime = this.dateRange[0]+'T00:00:00'
+            data.endTime = this.dateRange[1]+'T23:59:59'
+          }else{
+            data.startTime = "";
+            data.endTime = "";
+          }
         }
-        getListFunction(obj).then(response => {
+        securityCheckDangerReviewList(data).then(response => {
           this.$set(this,'loading',false);
           this.$set(this,'dataList',response.data.records);
           this.$set(this,'total',response.data.total);
@@ -309,26 +343,52 @@
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = false;
-          obj.orderTitle = '隐患整改';
-          obj.orderType = '3';
+          obj.orderTitle = '复查验证';
+          obj.orderType = '5';
           this.$set(this,'initiateInspectData',obj);
         }else if(type == 2){
           //详情
           this.$set(this,'pageType',2);
           let obj = JSON.parse(JSON.stringify(row))
           obj.showType = true;
-          obj.orderTitle = '整改详情';
-          obj.orderType = '4';
+          obj.orderTitle = '复查详情';
+          obj.orderType = '6';
           this.$set(this,'initiateInspectData',obj);
-        }else if(type == 4){
+        }else if(type == 3){
           //转移
-          this.dialogOpen();
+          this.$set(this.dialogQueryParams,'page',1);
+          this.$set(this,'dialogDangerId',row.dangerId);
+          this.securityCheckDangerGetMemberInfo(row.dangerId);
         }else if(type == 6){
           //返回并刷新
           this.$set(this,'pageType',1);
           this.getList();
         }
       },
+      //督导组信息查询
+      securityCheckDangerGetMemberInfo(dangerId){
+        securityCheckDangerGetMemberInfo({dangerId:dangerId}).then(response => {
+          this.$set(this,'dialogGroupName',response.data.groupName);
+          this.$set(this,'dialogUserId',response.data.userId);
+          this.$nextTick(()=>{
+            this.securityCheckDangerGetMemberList(dangerId);
+          })
+        });
+      },
+      //督导组人员查询
+      securityCheckDangerGetMemberList(dangerId){
+        let obj = JSON.parse(JSON.stringify(this.dialogQueryParams))
+        obj.dangerId = dangerId;
+        securityCheckDangerGetMemberList(obj).then(response => {
+          this.$set(this,'dialogDataList',response.data.records);
+          this.$set(this,'dialogTotal',response.data.total);
+          this.$nextTick(()=>{
+            if(!this.dialogType){
+              this.dialogOpen();
+            }
+          })
+        });
+      },
       /******** 转移弹窗 ********/
       //弹层关闭
       dialogOff(){
@@ -336,21 +396,104 @@
       },
       //弹层开启
       dialogOpen(){
-        this.$set(this,'tableColumnType',null);
+        this.$set(this,'reviewUserid',null);
         this.$set(this,'dialogType',true);
       },
       //弹层确定
       dialogSubmit(){
-        if(!this.tableColumnType){
+        if(!this.reviewUserid){
           this.msgError('请选择复查转移人')
           return
         }
-        this.$set(this,'dialogType',false);
+        let obj = {
+          dangerId:this.dialogDangerId,
+          reviewUserid:this.reviewUserid,
+          reviewName:this.reviewName,
+        };
+        securityCheckDangerUpdateByReview(obj).then(response => {
+          this.msgSuccess(response.message)
+          this.$set(this,'dialogType',false);
+        });
       },
       tableColumnCheck(row) {
-        if(this.tableColumnType != row){
-          this.$set(this,'tableColumnType',row);
+        if(this.reviewUserid != row.userId){
+          this.$set(this,'reviewUserid',row.userId);
+          this.$set(this,'reviewName',row.userName);
+        }
+      },
+      //学院列表
+      getDeptDropList() {
+        getDeptDropList({ deptName: '', level: 2, deptType: 1 }).then(response => {
+          this.$set(this, 'deptOption', response.data)
+        })
+      },
+      //分级下拉列表
+      laboratoryClassLevelGetList(){
+        laboratoryClassLevelGetList({}).then(response => {
+          this.$set(this,'levelOption',response.data);
+        });
+      },
+      //检查项列表
+      securityCheckOptionList() {
+        securityCheckOptionList({}).then(response => {
+          let list = this.getCascaderData(JSON.parse(JSON.stringify(response.data)),3)
+          this.$nextTick(()=>{
+            this.$set(this, 'cascaderData', list)
+          })
+        })
+      },
+      //检查项格式处理
+      getCascaderData(list,type) {
+        let self = this
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
+        }
+        for (let i = 0; i < list.length; i++) {
+          list[i].labelName = list[i].code ? list[i].code + ' ' + list[i].name : list[i].name
+          if(list[i].level == type){
+            delete list[i].children
+          }else if (list[i].children) {
+            if (list[i].children[0]) {
+              list[i].children = self.getCascaderData(list[i].children,type)
+            } else {
+              list.splice(i, 1)
+              i--
+            }
+          } else {
+            list.splice(i, 1)
+            i--
+          }
         }
+        return list
       },
     },
   }

+ 35 - 11
src/views/safetyCheck/schoolWorktable/coverageRateEcharts.vue

@@ -4,27 +4,51 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCheckOverlap,
+} from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'coverageRateEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckOverlap();
     },
     methods:{
+      securityIndexStatisticsCheckOverlap(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCheckOverlap(obj).then(response => {
+          this.$set(this,'newData',{
+            notCheckRatio:parseInt(response.data.notCheckRatio),
+            checkRatio:parseInt(response.data.checkRatio),
+            subNum:parseInt(response.data.subNum),
+          });
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
       //eCharts方法
-      eCharts(){
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('coverageRateEcharts-box'));
         const datalist= [
-          { value: 504, name: '未检查' },
-          { value: 735, name: '已检查' },
+          { value: newData.notCheckRatio, name: '未检查' },
+          { value: newData.checkRatio, name: '已检查' },
         ]
         let option = {
 
@@ -34,7 +58,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "38%",
               formatter: (name) => {
@@ -43,10 +67,10 @@
                 var rate;
                 for (var i = 0; i < datalist.length; i++) {
                   total += datalist[i].value;
-                  if (datalist[i].name == name) {
+                  if (datalist[i].name == '未检查') {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -70,7 +94,7 @@
               orient: 'vertical',
               itemWidth: 12,
               itemHeight: 12,
-              right: '10%',
+              left: '60%',
               icon: 'circle',
               top: "54%",
               formatter: (name) => {
@@ -82,7 +106,7 @@
                   if (datalist[i].name == name) {
                     target = datalist[i].value;
                   }
-                  rate = (total / target).toFixed(2)
+                  rate =  (target / total * 100).toFixed(2)
                 }
                 return `{one|${name}} {two|${rate}%}`;
               },
@@ -105,7 +129,7 @@
           title: [
             {
               text: '实验室',
-              subtext: '2023间',
+              subtext: newData.subNum+'间',
               textStyle: {
                 fontSize: 12,
                 color: "#333333"

+ 43 - 18
src/views/safetyCheck/schoolWorktable/dataScreening.vue

@@ -1,12 +1,12 @@
 <template>
   <!-- 数据总览 -->
   <div class="dataScreening">
-    <div class="top-l-l">
+    <div class="top-l-l" style="width:130px;">
       <div class="top-l-l-t">
-        <i>9</i>
-        <i>9</i>
-        <i>9</i>
-        <b>次</b>
+        <p class="null-p"></p>
+        <p class="for-p" v-for="(item,index) in newData.checkNum">{{item}}</p>
+        <p class="text-p">次</p>
+        <p class="null-p"></p>
       </div>
       <div class="top-l-l-m">2024年</div>
       <div class="top-l-l-b">校院巡查</div>
@@ -15,12 +15,12 @@
     <div class="top-l-r">
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_jcxms@1x.png"/>
-        <div class="top-l-r-li-m"><i>6524</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.checkItemsNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">检查项目数</div>
       </div>
       <div class="top-l-r-li">
         <img class="top-l-r-li-t" src="@/assets/ZDimages/securityCheck/icon_gzzl_xfzgtzs@1x.png"/>
-        <div class="top-l-r-li-m"><i>2546</i><i>项</i></div>
+        <div class="top-l-r-li-m"><i>{{newData.noticeNum}}</i><i>项</i></div>
         <div class="top-l-r-li-b">下发整改通知书</div>
       </div>
     </div>
@@ -28,14 +28,21 @@
 </template>
 
 <script>
-
+  import {
+    securityIndexStatisticsCheck,
+  } from '@/api/safetyCheck/indexDemoOne'
   export default {
     name: 'dataScreening',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
+        newData:{
+          checkNum:'',
+          checkItemsNum:'',
+          noticeNum:'',
+        },
 
       }
     },
@@ -43,10 +50,24 @@
 
     },
     mounted(){
-
+      this.securityIndexStatisticsCheck();
     },
     methods: {
-
+      securityIndexStatisticsCheck(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCheck(obj).then(response => {
+          this.$set(this,'newData',{
+            checkNum:response.data.checkNum+'',
+            checkItemsNum:response.data.checkItemsNum,
+            noticeNum:response.data.noticeNum,
+          });
+        });
+      },
     }
   }
 </script>
@@ -66,8 +87,11 @@
       .top-l-l-t{
         display: flex;
         justify-content: flex-start;
-        margin: 24px 0 0 20px;
-        >i{
+        margin: 24px 0 0 0;
+        .null-p{
+          flex:1;
+        }
+        .for-p{
           font-style: normal;
           width: 20px;
           height: 26px;
@@ -80,7 +104,7 @@
           line-height: 26px;
           text-align: center;
         }
-        >b{
+        .text-p{
           font-weight: 400;
           font-size: 16px;
           color: #333333;
@@ -93,14 +117,16 @@
         font-size: 16px;
         color: #333333;
         line-height: 24px;
-        margin: 22px 0 0 28px;
+        margin: 22px 0 0 0;
+        text-align: center;
       }
       .top-l-l-b{
         font-weight: 400;
         font-size: 14px;
         color: #333333;
         line-height: 24px;
-        margin: 2px 0 0 28px;
+        margin: 2px 0 0 0;
+        text-align: center;
       }
     }
     .line{
@@ -108,7 +134,6 @@
       height:110px;
       border: 1px dashed #D8D8D8;
       margin-top: 14px;
-      margin-left: 10px;
     }
     .top-l-r{
       display: flex;

+ 32 - 15
src/views/safetyCheck/schoolWorktable/dataScreeningChart.vue

@@ -6,46 +6,63 @@
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsProportionChart,
+  } from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'dataScreeningChart',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsProportionChart();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsProportionChart(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsProportionChart(obj).then(response => {
+          this.$set(this,'newData',response.data);
+          this.$nextTick(()=>{
+            this.eCharts(this.newData);
+          })
+        });
+      },
+      eCharts(newData){
         let myChart = this.$echarts.init(document.getElementById('dataScreeningChart-box'));
         let data = [
           {
-            name: "隐患数8724 个",
-            value: 54,
+            name: "隐患数"+newData.hazardNum+" 个",
+            value: newData.hazardRatio,
           },
           {
-            name: "已整改8724 个",
-            value: 44,
+            name: "已整改"+newData.rectifiedNum+" 个",
+            value: newData.rectifiedRatio,
           },
           {
-            name: "暂无法整改4 个",
-            value: 35,
+            name: "暂无法整改"+newData.unableRectifyNum+" 个",
+            value: newData.unableRectifyRatio,
           },
           {
-            name: "多次整改未完成4 个",
-            value: 30,
+            name: "多次整改未完成"+newData.notFinishedNum+" 个",
+            value: newData.notFinishedRatio,
           },
           {
-            name: "复查通过8400 个",
-            value: 20,
+            name: "复查通过"+newData.inspectionPassedNum+" 个",
+            value: newData.inspectionPassedRatio,
           },
         ];
 

+ 45 - 39
src/views/safetyCheck/schoolWorktable/hiddenDangerStatisticsEcharts.vue

@@ -1,53 +1,59 @@
 <template>
-  <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box"></div>
+  <div>
+    <div class="hiddenDangerStatisticsEcharts" id="hiddenDangerStatisticsEcharts-box" v-if="eChartsList[0]"></div>
+    <p v-if="!eChartsList[0]" style="color:#999;text-align: center;line-height:330px;">暂无数据</p>
+  </div>
 </template>
 
 <script>
+  import {
+    securityIndexStatisticsHazardScatter,
+  } from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   import { hiddenCountByType, collegCheckHiddenCountByType,isSCollege } from '@/api/safetyCheck/index'
   export default {
     name: 'hiddenDangerStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
         hdLevel:1,
         userFlg:true,
         nullType:false,
+        eChartsList:[],
       }
     },
     created(){
 
     },
     mounted(){
-        this.schoolEcharts()
+      this.securityIndexStatisticsHazardScatter();
     },
     methods:{
-      schoolEcharts(){
-        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
-        let data = [{
-          name: "1.基础安全",
-          value: 1,
-        },
-          {
-            name: "10.生物安全",
-            value: 2,
-          },
-          {
-            name: "11.机电安全",
-            value: 3,
-          },
-          {
-            name: "9.特种设备与常规\n冷热设备",
-            value: 4,
-          },];
-       /*  for(let i=0;i<response.rows.length;i++){
-          // substring
-          let obj = {
-            name:response.rows[i].collegeName.length>8?response.rows[i].collegeName.substring(0,8)+'..':response.rows[i].collegeName,
-            nameText:response.rows[i].collegeName,
-            value:response.rows[i].sumTotal,
+      securityIndexStatisticsHazardScatter(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsHazardScatter(obj).then(response => {
+          let list = [];
+          for(let i=0;i<response.data.length;i++){
+            list.push({
+              name:response.data[i].oneLevelName,
+              value:response.data[i].ratio,
+            })
           }
-          data.push(obj);
-        } */
+          this.$set(this,'eChartsList',list[0]?list:[]);
+          this.$nextTick(()=>{
+            this.schoolEcharts(this.eChartsList);
+          })
+        });
+      },
+      schoolEcharts(list){
+        let myChart = this.$echarts.init(document.getElementById('hiddenDangerStatisticsEcharts-box'));
         let option = {
           legend: {
             show:false,
@@ -68,21 +74,21 @@
               radius: ['0%', '40%'],
               label: {
                 normal: {
-                  formatter: '{b} {d}%',
+                  formatter: function(params) {
+                    let name = params.name;
+                    let percent = params.percent+'%';
+                    if (name.length > 10) {
+                      name = name.substring(0, 10) + '...';
+                    }
+                    return name+percent;
+                  },
                   textStyle: {
                     fontSize: 12,
-                    color:'#333'
+                    color: '#333'
                   },
-                  padding: [0, -110, 26, -110],
-                }
-              },
-              labelLine: {
-                normal: {
-                  length: 30,
-                  length2: 110,
                 }
               },
-              data: data,
+              data: list,
               itemStyle: {
                 normal: {
                   color: function (colors) {
@@ -103,6 +109,6 @@
 
 <style scoped lang="scss">
   .hiddenDangerStatisticsEcharts{
-    height:420px;
+    height:330px;
   }
 </style>

+ 170 - 40
src/views/safetyCheck/schoolWorktable/index.vue

@@ -1,16 +1,16 @@
 <template>
   <div class="app-container worktable scrollbar-box">
-      <div class="main">
+      <div class="main" v-if="pageType">
         <div class="top">
           <!-- 数据总览 -->
-          <data-screening></data-screening>
+          <data-screening :propsData="propsData"></data-screening>
           <!-- 数据总览图表 -->
           <div class="top-c">
-            <data-screening-chart></data-screening-chart>
+            <data-screening-chart :propsData="propsData"></data-screening-chart>
           </div>
           <!-- 整改完成率 -->
           <div class="top-r">
-            <rectification-finish></rectification-finish>
+            <rectification-finish :propsData="propsData"></rectification-finish>
           </div>
         </div>
         <div class="center">
@@ -24,11 +24,11 @@
               <div class="center-l-t-b">
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_gj@1x.png"/>
-                  <p>共计2333项</p>
+                  <p>共计{{dataOne.hazardsNum}}项</p>
                 </div>
                 <div class="center-l-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_wzgyh_sjsys@1x.png"/>
-                  <p>涉及333个实验室</p>
+                  <p>涉及{{dataOne.subNum}}个实验室</p>
                 </div>
               </div>
             </div>
@@ -38,7 +38,7 @@
                 <p></p>
                 <p>检查覆盖率</p>
               </div>
-              <coverage-rate-echarts></coverage-rate-echarts>
+              <coverage-rate-echarts :propsData="propsData"></coverage-rate-echarts>
             </div>
           </div>
           <div class="center-c">
@@ -50,19 +50,19 @@
               <div class="center-c-t-b">
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dz@1x.png"/>
-                  <p>当周1项</p>
+                  <p>当周{{dataTwo.weekNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dy@1x.png"/>
-                  <p>当月1项</p>
+                  <p>当月{{dataTwo.monthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_sy@1x.png"/>
-                  <p>上月1项</p>
+                  <p>上月{{dataTwo.lastMonthNum}}项</p>
                 </div>
                 <div class="center-c-t-b-li">
                   <img  src="@/assets/ZDimages/securityCheck/icon_yzgyh_dn@1x.png"/>
-                  <p>当年111项</p>
+                  <p>当年{{dataTwo.yearNum}}项</p>
                 </div>
               </div>
             </div>
@@ -71,7 +71,7 @@
                 <p></p>
                 <p>检查结果统计</p>
               </div>
-              <inspection-statistics-echarts></inspection-statistics-echarts>
+              <inspection-statistics-echarts :propsData="propsData"></inspection-statistics-echarts>
             </div>
           </div>
           <div class="center-c2">
@@ -79,7 +79,7 @@
               <p></p>
               <p>全年指标隐患分布</p>
             </div>
-            <hidden-danger-statistics-echarts></hidden-danger-statistics-echarts>
+            <hidden-danger-statistics-echarts :propsData="propsData"></hidden-danger-statistics-echarts>
           </div>
           <div class="center-r">
             <div class="center-r-li">
@@ -102,19 +102,27 @@
           <div class="bottom-l">
             <div class="min-title-box">
               <p></p>
-              <p>2024年全校实验室安全检查统计</p>
+              <p>{{yearData}}年全校实验室安全检查统计</p>
               <p>查看全部</p>
             </div>
             <div class="bottom-l-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="检查名称" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="检查时间" align="center" prop="title" show-overflow-tooltip width="226" fixed/>
-                <el-table-column label="检查数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="隐患数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="整改数" align="center" prop="title" show-overflow-tooltip width="80" fixed/>
-                <el-table-column label="多次整改未完成" align="center" prop="title" show-overflow-tooltip width="130" fixed/>
-                <el-table-column label="整改完成率" align="center" prop="title" show-overflow-tooltip width="90" fixed/>
+              <el-table class="table-box" border :data="tableListOne" ref="multipleTable">
+                <el-table-column label="序号" align="center"  type="index" width="50"/>
+                <el-table-column label="检查名称" align="center" prop="planTitle" show-overflow-tooltip />
+                <el-table-column label="检查时间" align="center" prop="cycleStartTime" show-overflow-tooltip width="226">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.cycleStartTime}} - {{scope.row.cycleEndTime}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column label="检查数" align="center" prop="checkNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="隐患数" align="center" prop="hazardNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="整改数" align="center" prop="rectificationNum" show-overflow-tooltip width="80"/>
+                <el-table-column label="多次整改未完成" align="center" prop="multipleRectificationsNum" show-overflow-tooltip width="130"/>
+                <el-table-column label="整改完成率" align="center" prop="ratio" show-overflow-tooltip width="90">
+                  <template slot-scope="scope">
+                    <span>{{scope.row.ratio}}%</span>
+                  </template>
+                </el-table-column>
               </el-table>
             </div>
           </div>
@@ -124,16 +132,13 @@
               <p>各单位全年指标隐患分布</p>
               <p>查看全部</p>
             </div>
-            <div class="bottom-r-b">
-              <el-table class="table-box" border :data="tableList" ref="multipleTable">
-                <el-table-column label="序号" align="center"  type="index" width="60" fixed/>
-                <el-table-column label="实验室" align="center" prop="title" show-overflow-tooltip  fixed/>
-                <el-table-column label="隐患总数" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="化学安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="安全 设施" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="基础 安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="生物安全" align="center" prop="title" show-overflow-tooltip width="50" fixed/>
-                <el-table-column label="特种与冷热设备" align="center" prop="title" show-overflow-tooltip width="74" fixed/>
+            <div class="bottom-r-b" v-if="tableType">
+              <el-table class="table-box" border :data="tableListTwo" ref="multipleTable">
+                <el-table-column label="序号" align="center"  type="index" width="50"/>
+                <el-table-column label="实验室" align="center" prop="deptName" width="100" show-overflow-tooltip />
+                <el-table-column label="隐患总数" align="center" prop="hazardNum" show-overflow-tooltip />
+                <el-table-column v-for="(item,index) in tableListTwoTitle" width="50" :key="index"
+                                 :label="item.name" align="center" :prop="item.code" show-overflow-tooltip/>
               </el-table>
             </div>
           </div>
@@ -143,7 +148,14 @@
 </template>
 
 <script>
-  import {  } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsUserIdentity,
+    securityIndexStatisticsUnresolvedHazard,
+    securityIndexStatisticsRectifiedHazard,
+    securityIndexStatisticsPlanList,
+    reportSecIndexDataGetGaugeOutfit,
+    reportSecIndexDataDistributionHazard,
+  } from '@/api/safetyCheck/indexDemoOne'
   import dataScreening from './dataScreening.vue'
   import dataScreeningChart from './dataScreeningChart.vue'
   import rectificationFinish from './rectificationFinish.vue'
@@ -164,16 +176,118 @@
       return{
         //用户身份 校级/院级
         userType:"",
-        tableList:[],
+        tableListOne:[],
+        tableListTwoTitle:[],
+        tableType:false,
+        tableListTwo:[],
+        propsData:{},
+        pageType:false,
+        yearData:'',
+        dataOne:{
+          hazardsNum:0,
+          subNum:0,
+        },
+        dataTwo:{
+          weekNum:0,
+          monthNum:0,
+          lastMonthNum:0,
+          yearNum:0,
+        },
       }
     },
     created(){
-
+      this.securityIndexStatisticsUserIdentity();
     },
     mounted(){
-
     },
     methods:{
+      //查询用户身份
+      securityIndexStatisticsUserIdentity(){
+        securityIndexStatisticsUserIdentity().then(response => {
+          this.$set(this,'propsData',{
+            source:true,
+            schoolAdmin:response.schoolAdmin,
+            deptId:response.deptId,
+            subIds:response.subIds,
+          });
+          this.$set(this,'pageType',true);
+          this.$set(this,'yearData',new Date().getFullYear());
+          if(response.schoolAdmin){
+            //未整改隐患
+            this.securityIndexStatisticsUnresolvedHazard();
+            //已整改隐患
+            this.securityIndexStatisticsRectifiedHazard();
+            //年度全校实验室安全检查统计
+            this.securityIndexStatisticsPlanList();
+            //各单位全年指标隐患分布表头数据
+            this.reportSecIndexDataGetGaugeOutfit();
+          }
+        });
+      },
+      //未整改隐患
+      securityIndexStatisticsUnresolvedHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsUnresolvedHazard(obj).then(response => {
+          this.$set(this,'dataOne',response.data);
+        });
+      },
+      //已整改隐患
+      securityIndexStatisticsRectifiedHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsRectifiedHazard(obj).then(response => {
+          this.$set(this,'dataTwo',response.data);
+        });
+      },
+      //年度全校实验室安全检查统计
+      securityIndexStatisticsPlanList(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsPlanList(obj).then(response => {
+          this.$set(this,'tableListOne',response.data);
+        });
+      },
+      //各单位全年指标隐患分布表头数据
+      reportSecIndexDataGetGaugeOutfit(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataGetGaugeOutfit(obj).then(response => {
+          this.$set(this,'tableListTwoTitle',response.data);
+          this.$set(this,'tableType',true);
+          this.$nextTick(()=>{
+            this.reportSecIndexDataDistributionHazard();
+          })
+        });
+      },
+      //各单位全年指标隐患分布列表
+      reportSecIndexDataDistributionHazard(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        reportSecIndexDataDistributionHazard(obj).then(response => {
+          this.$set(this,'tableListTwo',response.data);
+        });
+      },
       renderheader(h, { column, $index }) {
         return h('span', {}, [
           h('span', {}, column.label.split('/')[0]),
@@ -372,23 +486,39 @@
       justify-content: flex-start;
       .bottom-l{
         width: 967px;
-        height: 301px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
-        box-shadow: 0px 4px 14px 0px rgba(0,0,0,0.2);
+        box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 20px 20px 20px 20px;
         .bottom-l-b{
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
           margin: 14px 20px 0;
+          padding-bottom:20px;
         }
       }
       .bottom-r{
         width: 548px;
-        height: 301px;
+        height: 320px;
+        display: flex;
+        flex-direction: column;
+        overflow: hidden;
         background: #FFFFFF;
         box-shadow: 0px 4px 10px 0px rgba(0,0,0,0.1);
         border-radius: 10px 10px 10px 10px;
         margin-left: 20px;
         .bottom-r-b{
+          display: flex;
+          flex:1;
+          flex-direction: column;
+          overflow: hidden;
           margin: 14px 20px 0;
+          padding-bottom:20px;
         }
       }
     }

+ 34 - 28
src/views/safetyCheck/schoolWorktable/inspectionStatisticsEcharts.vue

@@ -3,43 +3,49 @@
 </template>
 
 <script>
-  import { checkStatistics } from '@/api/safetyCheck/index'
+  import {
+    securityIndexStatisticsCheckResults
+  } from '@/api/safetyCheck/indexDemoOne'
   export default {
     name: 'inspectionStatisticsEcharts',
+    props:{
+      propsData:{},
+    },
     data(){
       return{
-
+        newData:{},
       }
     },
     created(){
-
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCheckResults();
     },
     methods:{
-      //eCharts方法
-      eCharts(){
-        let data = {
-          name : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月',],
-          standards : [0,0,10,20,30,40,50,40,30,20,10,0,0],
-          notStandards : [0,0,5,10,10,20,25,30,20,20,20,20,20],
+      securityIndexStatisticsCheckResults(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
         }
-        /* for(let i=0;i<response.rows.length;i++){
-          data.name.push(response.rows[i].yearMonth)
-          if(response.rows[i].notStandards.indexOf('%') != -1){
-            response.rows[i].notStandards = response.rows[i].notStandards.split('%')[0]
-            data.notStandards.push(response.rows[i].notStandards)
-          }else{
-            data.notStandards.push(response.rows[i].notStandards)
-          }
-          if(response.rows[i].standards.indexOf('%') != -1){
-            response.rows[i].standards = response.rows[i].standards.split('%')[0]
-            data.standards.push(response.rows[i].standards)
-          }else{
-            data.standards.push(response.rows[i].standards)
+        securityIndexStatisticsCheckResults(obj).then(response => {
+          let nameList = [];
+          let standardsList = [];
+          let notStandardsList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            standardsList.push(response.data[i].qualifiedNum)
+            notStandardsList.push(response.data[i].unqualifiedNum)
+
           }
-        } */
+          this.$nextTick(()=>{
+            this.eCharts(nameList,standardsList,notStandardsList);
+          })
+        });
+      },
+      //eCharts方法
+      eCharts(nameList,standardsList,notStandardsList){
         let myChart = this.$echarts.init(document.getElementById('inspectionStatisticsEcharts-box'));
         let option = {
           //你的代码
@@ -50,7 +56,7 @@
               let html = '<div>';
               html += '<p>'+params[0].name+'</p>'
               for(let i=0;i<params.length;i++){
-                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'%<p>'
+                html += '<p>'+params[i].marker+'&nbsp'+params[i].seriesName+'&nbsp:&nbsp'+params[i].data+'<p>'
               }
               return html;
             },
@@ -100,7 +106,7 @@
               axisTick: {
                 show: false,
               },
-              data: data.name,
+              data: nameList,
             },
           ],
           yAxis: [
@@ -192,7 +198,7 @@
                   global: false,
                 },
               },
-              data: data.standards,
+              data: standardsList,
             },
             {
               name: '不符合',
@@ -247,7 +253,7 @@
                   global: false,
                 },
               },
-              data: data.notStandards,
+              data: notStandardsList,
             }
           ]
         };

+ 29 - 7
src/views/safetyCheck/schoolWorktable/rectificationFinish.vue

@@ -6,25 +6,47 @@
 </template>
 
 <script>
+import {
+  securityIndexStatisticsCompleteRatio,
+} from '@/api/safetyCheck/indexDemoOne'
   import echarts from 'echarts'
   export default {
     name: 'rectificationFinish',
-    components: {
+    props:{
+      propsData:{},
     },
     data(){
       return{
-
-
+        newData:{},
       }
     },
     created(){
 
     },
     mounted(){
-      this.eCharts();
+      this.securityIndexStatisticsCompleteRatio();
     },
     methods: {
-      eCharts(){
+      securityIndexStatisticsCompleteRatio(){
+        let obj = {
+          source:this.propsData.source,
+          schoolAdmin:this.propsData.schoolAdmin,
+          deptId:this.propsData.deptId,
+          subIds:this.propsData.subIds,
+        }
+        securityIndexStatisticsCompleteRatio(obj).then(response => {
+          let nameList = [];
+          let valueList = [];
+          for(let i=0;i<response.data.length;i++){
+            nameList.push(response.data[i].month)
+            valueList.push(response.data[i].ratio)
+          }
+          this.$nextTick(()=>{
+            this.eCharts(nameList,valueList);
+          })
+        });
+      },
+      eCharts(nameList,valueList){
         let myChart = this.$echarts.init(document.getElementById('rectificationFinish-box'));
 
         let option = {
@@ -53,7 +75,7 @@
           xAxis : [
             {
               type : 'category',
-              data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
+              data : nameList,
               axisLabel: {
                 textStyle: {//改变X轴字体颜色
                   color: '#999999',
@@ -122,7 +144,7 @@
               },
               type:'bar',
               barWidth: '10',
-              data:[10, 52, 200, 334, 390, 330, 220,234,316,123,442,234]
+              data:valueList
             }
           ]
         };