Browse Source

Merge branch 'version1.3.7.1' into test

luolei 4 years ago
parent
commit
355a340997
4 changed files with 107 additions and 11 deletions
  1. 33 2
      src/css/qcScore.less
  2. 9 1
      src/html/qcScore.html
  3. 64 7
      src/js/qcScore.js
  4. 1 1
      src/js/utils.js

+ 33 - 2
src/css/qcScore.less

@@ -768,9 +768,9 @@
       line-height: 44px;
       border-bottom: 1px @tableBorderColor solid;
       font-size: 16px;
-      font-weight: bold;
       margin-bottom: 20px;
-      text-align: center;
+      text-indent: 20px;
+      font-weight: bold;
     }
   }
   .interval-color{
@@ -895,4 +895,35 @@
   left: -3px;
   width: 3px;
   height: 100%;
+}
+
+
+// 缺陷总览
+.titleSpecial {
+  overflow: hidden;
+  cursor: pointer;
+  text-align: center;
+  span {
+    float: left;
+    width: 77px;
+    height: 28px;
+    line-height: 28px;
+    border: 1px solid #777;
+    color: #777;
+    text-indent: 0;
+    margin-top: 7px;
+    font-weight: normal;
+  }
+  .titlePay {
+    border-radius:4px 0px 0px 4px;
+    margin-left: 20px;
+    background-color: #00A1FF;
+    color: #fff;
+    border-color: #00A1FF;
+    border-right: 0;
+  }
+  .titleNo {
+    border-radius:0px 4px 4px 0px;
+    border-left: 0;
+  }
 }

+ 9 - 1
src/html/qcScore.html

@@ -230,7 +230,15 @@
     </script>-->
     <script type="text/html" id="appointBookTmpl">
         <div class="page-item" code="${title}">
-            <h2 class="title" code="${title}">${title}</h2>
+            <h2 class="title titleSpecial" code="${title}">
+                {{if title==='缺陷总览'}}
+                    <span class="titlePay" data-type="1">控费缺陷</span>
+                    <span class="titleNo" data-type="2">缺陷总览</span>
+                {{/if}}
+                {{if title!=='缺陷总览'}}
+                    ${title}
+                {{/if}}
+            </h2>
             {{if !data || data&&data.length === 0}}
             <div class="empty">
                 <img src="../images/empty1.png" alt="空"/>

+ 64 - 7
src/js/qcScore.js

@@ -10,6 +10,7 @@ window.document.title="质控评分-"+getUrlArgObject("name");
 $(function(){
 //本页全局变量
   let global_flawData = {};    //缺陷数据
+  let global_flawDataPay = {};    //缺陷数据
   const global_id=getUrlArgObject("id");
   const global_age = getUrlArgObject("age");
   let global_check;
@@ -103,8 +104,7 @@ function getRecordDetail(){
   post(api.getRecordDetail,{'behospitalCode':global_id}).then(function(res){
     if(res.data.code==='0'){
       const data = res.data.data;
-   
-      const {beHospital,result,msg,checkStatus} = data;
+      const {beHospital,result,msg,checkStatus,drgs} = data;
       global_check = checkStatus
       const info=Object.assign(beHospital,result);
       initMenu(JSON.parse(result.menuData));
@@ -113,14 +113,45 @@ function getRecordDetail(){
      global_activeTab=$(".sub-menu .page.active").attr("code");
       initPatientInfo(info);
       initContent(result.pageData);
-      initList(msg);
+      initList(drgs);
       initScoreItem(msg);
       global_flawData=msg;
+      global_flawDataPay=drgs;
       setBoxHeight();
+      changePay()
     }
   });
 }
-
+function changePay(){
+  $(document).on('click',".titleSpecial span",function(){
+    let type = $(this).attr("data-type")
+    if(type == 1){
+      $(".titlePay").css({
+        'background-color': '#00A1FF',
+        'color': '#fff',
+        'border-color': '#00A1FF'
+      })
+      $(".titleNo").css({
+        'background-color': '#fff',
+        'border': '1px solid #777',
+        'color': '#777'
+      })
+      initList(global_flawDataPay,type);
+    }else{
+      $(".titlePay").css({
+        'background-color': '#fff !important',
+        'border': '1px solid #777',
+        'color': '#777'
+      })
+      $(".titleNo").css({
+        'background-color': '#00A1FF',
+        'color': '#fff',
+        'border-color': '#00A1FF'
+      })
+      initList(global_flawData,type);
+    }
+  })
+}
 //填充患者信息
 function initPatientInfo(data){
   let hasCheck = false
@@ -185,7 +216,8 @@ function formatInfoData(k,data){
 }
 
 //知情同意书、谈话告知书
-  function formatSpecPage(data,title){
+  function formatSpecPage(data,title,type){
+    $(".page-item[code='缺陷总览']").children().remove()
     $("#appointBookTmpl").tmpl({title,data}).appendTo(".flaw-table");
     $(".page-anchor").on("click",function(){
       const code=$(this).attr("code");
@@ -206,11 +238,36 @@ function formatInfoData(k,data){
         $('#contentInfo').scrollTop($(anch).offset().top-60);
       }
     });
+    if(type&&type == 1){
+      $(".titlePay").css({
+        'background-color': '#00A1FF',
+        'color': '#fff',
+        'border-color': '#00A1FF'
+      })
+      $(".titleNo").css({
+        'background-color': '#fff',
+        'border': '1px solid #777',
+        'border-left':0,
+        'color': '#777'
+      })
+    }else if(type&&type==2){
+      $(".titlePay").css({
+        'background-color': '#fff',
+        'border': '1px solid #777',
+        'border-right':0,
+        'color': '#777'
+      })
+      $(".titleNo").css({
+        'background-color': '#00A1FF',
+        'color': '#fff',
+        'border-color': '#00A1FF'
+      })
+    }
   }
 
-function initList(data){
+function initList(data,type){
   //$("#flawTotalList").tmpl({title:"缺陷总览",data:data}).appendTo(".flaw-table");
-  formatSpecPage(data,"缺陷总览");
+  formatSpecPage(data,"缺陷总览",type);
   $(".flaw-table").show();
   $(".flaw-table .page-item[code="+global_activeTab+"]").show();
   $(".slide-up").off("click").on("click",function(){

+ 1 - 1
src/js/utils.js

@@ -3,7 +3,7 @@ const $ = require("jquery");
 const axios = require("axios")
 var Utils = require('./rePromise');
 require('./scrollBar.js');
-const baseUrl = "http://192.168.2.241:5858"
+const baseUrl = "http://192.168.2.236:5858"
 //页面映射
 const pageMap={
   'YH-KZT':'console.html',