Selaa lähdekoodia

Merge branch 'test' into dev_zxc

zhangxc 5 vuotta sitten
vanhempi
commit
6df384168f
7 muutettua tiedostoa jossa 1013 lisäystä ja 286 poistoa
  1. 1 0
      src/css/index.less
  2. 161 52
      src/css/qcScore.less
  3. 807 202
      src/html/qcScore.html
  4. 10 3
      src/js/console.js
  5. 3 3
      src/js/modal.js
  6. 25 23
      src/js/qcScore.js
  7. 6 3
      src/js/qcScore_byll.js

+ 1 - 0
src/css/index.less

@@ -159,6 +159,7 @@
     width: 90px;
     display: inline-block;
     text-align: right;
+    color: #777;
   }
   .oldWaring {
     color: #FF4D4F;

+ 161 - 52
src/css/qcScore.less

@@ -77,10 +77,19 @@
     width:70%;
     height: 100%;
     position: relative;
+    /*overflow-y: auto;*/
   }
   .content-item{
     display: none;
     height: 100%;
+
+    /**********危急值记录*************/
+    &.danger-record{
+      height:auto;
+      .title{
+        /*position: unset;*/
+      }
+    }
     .title{
       position: absolute;
       top: 0;
@@ -100,69 +109,100 @@
       height: 100%;
       overflow-y: auto;
     }
-    .info-item{
-      border-bottom: 1px @borderColor solid;
-      margin-bottom: 10px;
-      .info-title{
-        font-weight: bold;
-        margin-bottom: 10px;
+    .info-table{
+      margin: 0 0 15px;
+    }
+    table{
+      width: 100%;
+      border:1px @tableBorderColor solid;
+    }
+    .inline-table{
+      display: inline;
+      border: none;
+      td{
+        border: none;
       }
     }
-    .cont{
-      display: inline-block;
-      min-width: 33%;
-      margin-bottom: 15px;/*
+    .inner-table table{
+      border: none;
+      td{
+        border: none;
+        text-align: left;
+        vertical-align: text-bottom;
+        &[rowspan]{
+          font-weight: bold;
+          width: 100px;
+          padding-left: 0;
+        }
+      }
+    }
+    .embed-table{
+      border:1px @tableBorderColor solid;
+      &>tbody>tr:first-child>td{
+        padding: 0;
+        border:none;
+        &>table td{
+          border:1px @tableBorderColor solid;
+          line-height: 20px;
+          padding: 7px 8px;
+        }
+      }
       .table-tip{
-        line-height: 20px;
-        padding: 7px 8px;
-        border:1px @tableBorderColor solid;
-      }*/
+        text-align: left;
+      }
+    }
+    th{
       table{
-        width: 100%;
-        border:1px @tableBorderColor solid;
+        border:none;
       }
-      .embed-table{
-        border:1px @tableBorderColor solid;
-        &>tbody>tr:first-child>td{
-          padding: 0;
-          border:none;
-          &>table td{
-            border:1px @tableBorderColor solid;
-            line-height: 20px;
-            padding: 7px 8px;
-          }
+      border:1px @tableBorderColor solid;
+      background: @thBgColor;
+      line-height: 20px;
+      padding: 7px 8px;
+    }
+    td{
+      text-align: center;
+      border:1px @tableBorderColor solid;
+      padding:7px  8px;
+      height: 20px;
+      table,td{
+        border:none;
+      }
+    }
+    .info-item{
+      border-bottom: 1px @borderColor solid;
+      .cont{
+        display: inline-block;
+        min-width: 33%;
+        margin-bottom: 15px;
+        span{
+          line-height: 20px;
+          vertical-align: middle;
         }
-        .table-tip{
-          text-align: left;
+        .label{
+          display: inline-block;
+          /*min-width: 70px;*/
+          font-weight: bold;
+          overflow-x: hidden;
         }
       }
-      th{
-        table{
-          border:none;
-        }
-        border:1px @tableBorderColor solid;
-        background: @thBgColor;
-        line-height: 20px;
-        padding: 7px 8px;
+      &.cont-2 .cont{
+        min-width: 48%;
       }
-      td{
-        text-align: center;
-        border:1px @tableBorderColor solid;
-        padding:7px  8px;
-        height: 20px;
-        table,td{
-          border:none;
-        }
+      &.cont-4 .cont{
+        min-width: 23%;
       }
-      span{
-        line-height: 20px;
-        vertical-align: middle;
+      &.cont-5 .cont{
+        min-width: 19%;
       }
-      .label{
-        display: inline-block;
-        min-width: 70px;
+      &.no-border{
+        border-bottom: none;
+        margin-bottom: 0;
+      }
+      margin-bottom: 10px;
+      .info-title{
         font-weight: bold;
-        overflow-x: hidden;
+        margin-bottom: 10px;
       }
     }
   }
@@ -255,4 +295,73 @@
     margin-right: 20px;
     text-align: right;
   }
-}
+}
+
+.wardRoundWrap {
+  .container {
+    .wardRound {
+      margin-right: 50px;
+      padding: 7px  0;
+      display: inline-block;
+      i {
+        font-weight: bold;
+        color: #333333;
+      }
+    }
+    .cont {
+      .wardRound-table {
+        border: 0 none;
+        td {
+          border: 0 none;
+          text-align: left;
+          padding-left: 0;
+          color: #333333;
+        }
+        .tdFstTitle {
+          vertical-align: top;
+          font-weight: bold;
+        }
+      }
+    }
+  }
+}
+/*******手术知情同意书*********/
+.surgery-book{
+  .book-item{
+    margin-bottom:15px;
+    :not(:first-child){
+      text-indent: 15px;
+    }
+    .intent{
+      text-indent: 30px;
+    }
+    .intent-1{
+      margin-left: 48px;
+      text-indent: 0;
+    }
+    .clearfix{
+      p{
+        width: 100%;
+      }
+    }
+    .fr{
+      margin-top: 25px;
+      text-align: right;
+    }
+  }
+}
+
+/********术后首次病程记录及谈话记录*******/
+.surgery-af{
+  .af-title{
+    margin-bottom: 15px;
+    span {
+      display: inline-block;
+      width: 50%;
+      font-weight: bold;
+    }
+  }
+  .cont{
+    width: 100%;
+  }
+}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 807 - 202
src/html/qcScore.html


+ 10 - 3
src/js/console.js

@@ -57,16 +57,23 @@ function initConsole(result){
         '本年甲级病历-机器':require("../images/icon8.png"),
         '本年乙级病历-机器':require("../images/icon9.png"),
     }
-    let dom = ''
+    let dom = '';
     for(let i in result){
         if(i.indexOf("人工")==-1){
+            let name = i.split("-")[0];
+            let num = 0;
+            if(name=='本月病历数'||name=='本年病历数'){
+                num = result[i]
+            }else{
+                num = result[name+'-人工']+result[i]
+            }
             dom += `
                 <li class="partLi">
                     <div class="partIn">
-                        <p class="top">${i.split("-")[0]}</p>
+                        <p class="top">${name}</p>
                         <p class="btm clearfix">
                         <img src="${url[i]}" alt="">
-                        <span>${result[i]}</span>
+                        <span>${num}</span>
                         </p>
                     </div>
                 </li>

+ 3 - 3
src/js/modal.js

@@ -52,8 +52,8 @@ const jQuery = require('jquery');
                 box.remove();
             }, ops.time);
         }
-        $(document).on('click',".alertModal .title img, .modalBg",function(){
-            box.remove();
-        })
+        // $(document).on('click',".alertModal .title img, .modalBg",function(){
+        //     box.remove();
+        // })
     }
 })(jQuery);

+ 25 - 23
src/js/qcScore.js

@@ -4,7 +4,7 @@ require('jquery-templates');
 require('./modal.js');
 const {api,post,getUrlArgObject,setBoxHeight} = require('./utils.js');
 const {keyMaps} = require('./maps.js');
-const {wordRound} = require("./qcScore_byll.js")
+const {wardRound} = require("./qcScore_byll.js")
 //本页全局变量
 let global_flawData = {};    //缺陷数据
 const global_id=getUrlArgObject("id");
@@ -41,16 +41,6 @@ function initMenu(data){
   });
 }
 
-/*function getSubMenu(){
-  post(api.getSubMenu).then(function(res){
-    if(res.data.code==='0'){
-      const data = res.data.data;
-      initMenu(data);
-      $(".sub-menu li:first-child.page").addClass("active");
-    }
-  });
-};*/
-
 //获取病例明细
 function getRecordDetail(){
   post(api.getRecordDetail,{'behospitalCode':global_id}).then(function(res){
@@ -66,10 +56,12 @@ function getRecordDetail(){
       setBoxHeight();
       initScoreItem(msg);
       global_flawData=msg;
+
+      let obj = JSON.parse(result.pageData)
+      wardRound(obj['查房记录'],'查房记录')
     }
   });
 }
-
 //填充患者信息
 function initPatientInfo(data){
   const date = data.birthday.substr(0,10);
@@ -80,18 +72,31 @@ function initPatientInfo(data){
 //显示病例模块明细
 function initContent(data){
   const obj = JSON.parse(data);
-  //formatData(obj['入院记录'])
-  let info=[];//formatData(obj['入院记录']);
+  let info=[];
   let nameMap={
     "入院记录":"#inHisTmpl",
     "出院小结":"#outHisTmpl",
+    "病案首页":"#indexTmpl",
+    "手术知情同意书":"#surgeryBookTmpl",
     "首次病程录":"#firstCourseTmpl",
     "病危通知书":"#illnessNoticeTmpl",
-    "抢救记录":"#rescueRecordTmpl"
+    "抢救记录":"#rescueRecordTmpl",
+    "术后首次病程及谈话记录":"#surgeryAfRecord",
+    "危急值记录":"#dangerRecore",
   };
-  for(let k in obj){console.log(k,nameMap[k],obj[k])
-    info=formatInfoData(k,obj[k][0]);
-    nameMap[k]&&$(nameMap[k]).tmpl(info).appendTo("#contentInfo");
+  for(let k in obj){
+    for(let i in obj[k]){console.log(i,k)
+      info=formatInfoData(k,obj[k][i]);
+      nameMap[k]&&$(nameMap[k]).tmpl(info).appendTo("#contentInfo");
+    }
+  }
+  if(obj["病案首页"][0]["出院诊断"]){
+    const diag = JSON.parse(obj["病案首页"][0]["出院诊断"]);
+    $("#tableTmpl").tmpl({k:"出院诊断",data:diag}).appendTo("#diagTable");
+  }
+  if(obj["病案首页"][0]["手术信息"]){
+    const diag = JSON.parse(obj["病案首页"][0]["手术信息"]);
+    $("#tableTmpl").tmpl({k:"手术信息",data:diag}).appendTo("#surgeryTable");
   }
   $(".content-item[code="+global_activeTab+"]").show();
   console.log(obj)
@@ -103,11 +108,10 @@ function formatInfoData(k,data){
     name=i.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g,"");    //过滤key中存在的特殊符号,模板会渲染不出来且不报错
     obj[name]=data[i]||"";
   }
-  console.log( Object.assign({title:k},obj))
   return Object.assign({title:k},obj);
 }
 
-function formatData(data,title){
+/*function formatData(data,title){
   if(!keyMaps[title]){
     return data;
   }
@@ -118,7 +122,7 @@ function formatData(data,title){
   });
   const obj1=Object.assign({},obj,data[0]);
   return [obj1];
-}
+}*/
 
 //评分项数据填充
 function initScoreItem(data){
@@ -126,10 +130,8 @@ function initScoreItem(data){
   for(let k in data){
     $("#flawTmpl").tmpl(data[k]).appendTo("#flaws .flaw-box");
   }
-  //$(".flaw-item[code="+global_activeTab+"]").show();
   showFlawList();
   $(".flaw-item .oper a").click(function () {
-    //const activeTab=$(".sub-menu .page.active").attr("code");
     const i = $(".flaw-item[code="+global_activeTab+"]").index($(this).parents(".flaw-item"));
     const code=$(this).attr("code");
     const isEdit = $(this).is(".edit-flaw");

+ 6 - 3
src/js/qcScore_byll.js

@@ -1,7 +1,10 @@
-function wordRound(){
-    
+const $ = require('jquery');
+
+function wardRound(data,title){//查房记录
+    console.log(data,title)
+    $("#wardRound").tmpl({info:data,title:title,}).appendTo("#contentInfo");
 }
 
 module.exports = {
-    wordRound
+    wardRound
 }