zhouna 4 years ago
parent
commit
79d23c0e31
2 changed files with 14 additions and 2 deletions
  1. 3 0
      src/css/index.less
  2. 11 2
      src/index.js

+ 3 - 0
src/css/index.less

@@ -69,6 +69,9 @@
     color: #333;
   }
 }
+.sum-box{
+  display: none;
+}
 .flawList{
   padding: 0 15px 60px;
   table{

+ 11 - 2
src/index.js

@@ -16,6 +16,15 @@ let modeId = getUrlArgObject("modeId") || ''
 }
 setListHei()*/
 
+function errorShow(){
+  const str = `
+            <div class="empty">
+                <img class="emptyImg" src="${emptyImg}" />
+                <div class="emptyTxt">抱歉,缺陷找不到了</div>
+            </div>
+        `;
+  $('.flawList').html(str);
+}
 
 function getFLawList(){
     post(api.analyzeRun,{behospitalCode:behospitalCode,hospitalId:hospitalId}).then(function(res){
@@ -23,7 +32,7 @@ function getFLawList(){
         const data = res.data.data;
         renderFlawList(data)
       }else{
-
+        errorShow();
       }
 
     }).catch(e =>{
@@ -71,7 +80,7 @@ function renderFlawList(data){
     $("#score").text(scoreRes);
     $("#num").text(num);
     $("#flawMark").text(numScore);
-      //$(".sum-box").show();
+    $(".sum-box").show();
 
     $('.flawList').html(str);
     replaceSrc();