Parcourir la source

Merge branch 'VERSIONS-AnQuanJianCha' into leb-web-dev

dedsudiyu il y a 5 mois
Parent
commit
133c449dd1

+ 2 - 2
src/api/safetyCheck/index.js

@@ -537,9 +537,9 @@ export function reportHazardItemsOneReportRefresh (query) {
   })
 }
 // 检查项统计-二级隐患数据刷新
-export function securityHazardReportTwoReportRefresh (query) {
+export function reportHazardItemsTwoReportRefresh (query) {
   return request({
-    url: '/security/hazardReport/twoReportRefresh',
+    url: '/report/hazardItems/twoReportRefresh',
     method: 'get',
     params: query
   })

+ 2 - 1
src/components/audioPlayer/audioPlayer.vue

@@ -123,7 +123,8 @@
         )
         if (myVid != null) {
           myVid.oncanplay = function () {
-            that.duration = that.transTime(myVid.duration) // 计算音频时长
+
+            that.duration = that.transTime(myVid.duration)=='NaN:NaN'?'0:00':that.transTime(myVid.duration) // 计算音频时长
           }
           myVid.volume = 1 // 设置音量100%
         }

+ 21 - 0
src/utils/request.js

@@ -81,6 +81,18 @@ service.interceptors.response.use(res => {
       router.replace({
         path: '/403'
       })
+    }else if(code == 429){
+      if(!messageData){
+        messageData = Message({
+          message: '服务器繁忙,请稍后重试',
+          type: 'error',
+          offset:100
+        })
+        setTimeout(function(){
+          messageData = null
+        },1000);
+      }
+      return Promise.reject(new Error(msg))
     } else if (code === 500) {
       if(!messageData){
         messageData = Message({
@@ -162,6 +174,15 @@ service.interceptors.response.use(res => {
             return
           }).catch(() => {});
         }
+      }else if(message.substr(message.length - 3) == 429){
+        messageData = Message({
+          message: '服务器繁忙,请稍后重试',
+          type: 'error',
+          offset:100
+        })
+        setTimeout(function(){
+          messageData = null
+        },1000);
       }else{
         messageData = Message({
           message: message,

+ 20 - 38
src/views/safetyCheck/collegeWorktable/annualHiddenDistribution.vue

@@ -10,8 +10,15 @@
       <div>
         <p>隐患总数</p>
       </div>
-      <div :class="!lengthType?'for-box':(item.length<5?'for-min-box':'for-big-box')" v-for="(item,index) in titleList" :key="index">
-        <p>{{item.title}}</p>
+      <div class="for-box" v-for="(item,index) in titleList" :key="index">
+        <el-tooltip v-if="item.title.length>4" class="item" effect="dark" :content="item.title" placement="top">
+          <p>
+            {{item.title}}
+          </p>
+        </el-tooltip>
+        <p v-else>
+          {{item.title}}
+        </p>
       </div>
     </div>
     <div class="title-max-box"></div>
@@ -82,30 +89,14 @@
         reportSecIndexDataGetGaugeOutfit(obj).then(response => {
           this.$nextTick(()=>{
             let list = [];
-            let widthList = [40,110,50];
             response.data.forEach((item,index)=>{
               list.push({
                 title:item.name,
                 length:item.name.length
               })
-              if(item.name.length>4){
-                this.$set(self,'lengthType',true);
-              }
             })
-            if(this.lengthType){
-              for(let i=0;i<list.length;i++){
-                if(list[i].length>4){
-                  widthList.push(80)
-                }else{
-                  widthList.push(50)
-                }
-              }
-              this.$set(this.config,'columnWidth',widthList);
-            }else{
-              this.$set(this.config,'columnWidth',[40,110,50,55,55,55,55,55,55]);
-            }
+            this.$set(this.config,'columnWidth',[40,94,50,58,58,58,58,58,58]);
             this.$set(this,'titleList',list);
-
             this.reportSecIndexDataDistributionHazard(response.data);
           })
         });
@@ -123,7 +114,7 @@
           response.data.forEach((item,index)=>{
             let minList = [];
             minList.push(index+1);
-            minList.push(item.subName+item.subName+item.subName);
+            minList.push(item.subName);
             minList.push(item.hazardNum);
             titleList.forEach((minItem,minIndex)=>{
               minList.push(item[minItem.code]);
@@ -147,13 +138,12 @@
         }else if(val.layerY>158&&val.layerY<200){
           this.suspensionTop = 170;
         }
-        this.$set(this,'suspensionLeft',43);
         this.$set(this,'suspensionType',false);
         this.$set(this,'suspensionText','');
       },
       mouseoverDv(row){
-        if(row.columnIndex == 1){
-          console.log('row.ceil',row.ceil)
+        if(row.columnIndex != 0){
+          this.$set(this,'suspensionLeft',row.columnIndex==1?43:(row.columnIndex==2?137:(row.columnIndex==3?187:(row.columnIndex==4?245:(row.columnIndex==5?303:(row.columnIndex==6?361:(row.columnIndex==7?419:(row.columnIndex==8?477:43))))))));
           this.$set(this,'suspensionText',row.ceil);
           this.$set(this,'suspensionType',true);
         }else{
@@ -202,7 +192,7 @@
       }
       div:nth-child(2){
         p{
-          width:109px;
+          width:93px;
         }
       }
       div:nth-child(3){
@@ -214,19 +204,11 @@
       .for-box{
         p{
           padding:0 10px;
-          width:54px;
-        }
-      }
-      .for-min-box{
-        p{
-          padding:0 10px;
-          width:49px;
-        }
-      }
-      .for-big-box{
-        p{
-          padding:0 10px;
-          width:79px;
+          width:57px;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          overflow: hidden;
         }
       }
     }
@@ -251,7 +233,7 @@
           color: rgba(70, 70, 70);
         }
         .position-suspension-null-left{
-          width:40px;
+          width:10px;
         }
         .position-suspension-null-right{
           flex:1;

+ 2 - 2
src/views/safetyCheck/components/inspectionItemsStatistics.vue

@@ -168,7 +168,7 @@
     securityCheckOptionList,
     securityCheckDangerTodayDangerList,
     reportHazardItemsOneReportRefresh,
-    securityHazardReportTwoReportRefresh,
+    reportHazardItemsTwoReportRefresh,
     reportHazardItemsThreeReportRefresh,
     reportHazardItemsOneReportPie,
     reportHazardItemsOneReportList,
@@ -520,7 +520,7 @@
                   this.getList();
                 });
               }else if(this.tabsIndex == 1){
-                securityHazardReportTwoReportRefresh().then(response => {
+                reportHazardItemsTwoReportRefresh().then(response => {
                   this.msgSuccess(response.message)
                   this.getList();
                 });

+ 5 - 5
src/views/safetyCheck/components/noticeDom.vue

@@ -3,7 +3,7 @@
   <div class="noticeDom" v-if="pageType">
     <div class="noticeDom-page" v-if="!lookImgType">
       <div class="noticeDom-box-1">
-        <p class="noticeDom-title-p-1">{{documentData.checkDeptName}}实验室安全隐患整改通知书</p>
+        <p class="noticeDom-title-p-1">{{documentData.deptName}}实验室安全隐患整改通知书</p>
         <p class="noticeDom-title-p-2">编号:<span>{{documentData.code}}</span></p>
         <div class="noticeDom-title-box">
           <p class="noticeDom-title-1" v-if="propsNoticeDomData.checkCategory == 1">{{documentData.deptName}}:</p>
@@ -38,7 +38,7 @@
         </div>
       </div>
       <div class="noticeDom-box-2">
-        <p class="title-p-1">{{documentData.checkDeptName}}实验室安全现场检查发现问题汇总表</p>
+        <p class="title-p-1">{{documentData.deptName}}实验室安全现场检查发现问题汇总表</p>
         <p class="title-p-2" v-if="propsNoticeDomData.checkCategory == 1">被检查单位:{{documentData.deptName}}</p>
         <p class="title-p-2" v-if="propsNoticeDomData.checkCategory == 2">被检实验室:{{documentData.subName}}{{documentData.roomNum?documentData.roomNum:''}}</p>
         <p class="title-p-2">检查时间:{{documentData.checkDate}}</p>
@@ -268,7 +268,7 @@
                 margin-bottom:20px;
                 img{
                   display: inline-block;
-                  width: 196px;
+                  width: 155px;
                   height:110px;
                   margin-bottom:10px;
                 }
@@ -449,8 +449,8 @@
                   .img-box{
                     img{
                       display: inline-block;
-                      width:184px;
-                      height:104px;
+                      width:155px;
+                      height:110px;
                       margin-bottom:10px;
                     }
                     img:nth-child(1){

+ 19 - 36
src/views/safetyCheck/schoolWorktable/annualHiddenDistribution.vue

@@ -10,8 +10,15 @@
       <div>
         <p>隐患总数</p>
       </div>
-      <div :class="!lengthType?'for-box':(item.length<5?'for-min-box':'for-big-box')" v-for="(item,index) in titleList" :key="index">
-        <p>{{item.title}}</p>
+      <div class="for-box" v-for="(item,index) in titleList" :key="index">
+        <el-tooltip v-if="item.title.length>4" class="item" effect="dark" :content="item.title" placement="top">
+          <p>
+            {{item.title}}
+          </p>
+        </el-tooltip>
+        <p v-else>
+          {{item.title}}
+        </p>
       </div>
     </div>
     <div class="title-max-box"></div>
@@ -82,30 +89,14 @@
         reportSecIndexDataGetGaugeOutfit(obj).then(response => {
           this.$nextTick(()=>{
             let list = [];
-            let widthList = [40,110,50];
             response.data.forEach((item,index)=>{
               list.push({
                 title:item.name,
                 length:item.name.length
               })
-              if(item.name.length>4){
-                this.$set(self,'lengthType',true);
-              }
             })
-            if(this.lengthType){
-              for(let i=0;i<list.length;i++){
-                if(list[i].length>4){
-                  widthList.push(80)
-                }else{
-                  widthList.push(50)
-                }
-              }
-              this.$set(this.config,'columnWidth',widthList);
-            }else{
-              this.$set(this.config,'columnWidth',[40,110,50,55,55,55,55,55,55]);
-            }
+            this.$set(this.config,'columnWidth',[40,94,50,58,58,58,58,58,58]);
             this.$set(this,'titleList',list);
-
             this.reportSecIndexDataDistributionHazard(response.data);
           })
         });
@@ -152,8 +143,8 @@
         this.$set(this,'suspensionText','');
       },
       mouseoverDv(row){
-        if(row.columnIndex == 1){
-          console.log('row.ceil',row.ceil)
+        if(row.columnIndex != 0){
+          this.$set(this,'suspensionLeft',row.columnIndex==1?43:(row.columnIndex==2?137:(row.columnIndex==3?187:(row.columnIndex==4?245:(row.columnIndex==5?303:(row.columnIndex==6?361:(row.columnIndex==7?419:(row.columnIndex==8?477:43))))))));
           this.$set(this,'suspensionText',row.ceil);
           this.$set(this,'suspensionType',true);
         }else{
@@ -202,7 +193,7 @@
       }
       div:nth-child(2){
         p{
-          width:109px;
+          width:93px;
         }
       }
       div:nth-child(3){
@@ -214,19 +205,11 @@
       .for-box{
         p{
           padding:0 10px;
-          width:54px;
-        }
-      }
-      .for-min-box{
-        p{
-          padding:0 10px;
-          width:49px;
-        }
-      }
-      .for-big-box{
-        p{
-          padding:0 10px;
-          width:79px;
+          width:57px;
+          display: -webkit-box;
+          -webkit-box-orient: vertical;
+          -webkit-line-clamp: 2;
+          overflow: hidden;
         }
       }
     }
@@ -251,7 +234,7 @@
           color: rgba(70, 70, 70);
         }
         .position-suspension-null-left{
-          width:40px;
+          width:10px;
         }
         .position-suspension-null-right{
           flex:1;