zhangxc 4 роки тому
батько
коміт
d8b085b4c7

+ 6 - 6
src/css/cdss.less

@@ -223,7 +223,7 @@ body{
     margin: 0 0 0px 0;
 }
 .longBox,.shortBox{
-    padding: 4px 15px;
+    padding: 4px 10px;
 }
 .longBox{
     display: none;
@@ -276,7 +276,7 @@ body{
     padding: 5px 0;
 }
 .moduleBoxTitle{
-    padding: 0 15px;
+    padding: 0 10px;
     line-height: 27px;
     font-weight: 500;
 }
@@ -287,7 +287,7 @@ body{
     top: 3px;
 }
 .billingPushItem{
-    padding: 0 15px 0 30px;
+    padding: 0 10px 0 30px;
     position: relative;
 }
 .moduleItem{
@@ -332,7 +332,7 @@ body{
     position: absolute;
     box-sizing: border-box;
     width: 100%;
-    padding: 0 20px 50px 20px;
+    padding: 0 15px 50px 15px;
 }
 .staticSearchB ul{
     position: absolute;
@@ -374,10 +374,10 @@ body{
 }
 
 .casewritingWrapper p{
-    padding: 4px 15px;
+    padding: 4px 10px;
 }
 .generalTreatInfo{
-    padding: 4px 15px;
+    padding: 4px 10px;
     box-sizing: border-box;
     position: relative;
 }

+ 25 - 3
src/css/cdssHorizontal.less

@@ -88,7 +88,7 @@
 .moduleWrapper{
     position: absolute;
     width: 100%;
-    // height: 100%;
+    height: 100%;
 }
 .leftWrapper,.rightWrapper{
     position: relative;
@@ -150,7 +150,7 @@
 .diag .moduleTitle{
     color: #FF656B;
 }
-.medicine .moduleTitle,.operation .moduleTitle{
+.rightBox .moduleTitle{
     color: #1E1E1E;
 }
 .warning .moduleTitle{
@@ -287,7 +287,7 @@
     position: relative;
     top: -5px;
 }
-.medicine .titleIcon, .operation .titleIcon{
+.medicine .titleIcon, .operation .titleIcon, .general .titleIcon{
     width: 13px;
     position: relative;
     top: 2px;
@@ -312,4 +312,26 @@
     box-sizing: border-box;
     max-height: 65px;
     overflow: hidden;
+}
+.isOverFlow{
+    overflow: hidden;
+    max-height: 81px;
+}
+.showMoreGeneralTreat{
+    position: absolute;
+    cursor: pointer;
+    color: #3B9ED0;
+    right: 0px;
+    bottom: 0px;
+    background: #fff;
+}
+.generalTreatInfo{
+    position: relative;
+    padding: 0 40px 0 0;
+}
+.disName{
+    font-size: 14px;
+    color: #1E1E1E;
+    margin: 10px 0;
+    font-weight: 500;
 }

+ 11 - 1
src/html/caseWriteStandard.html

@@ -30,6 +30,16 @@
       text-align: center;
       padding: 80px 0 60px;
     }
+    .titleH1{
+      padding: 20px 0;
+      color: #1E1E1E;
+      font-size: 18px;
+    }
+    .contentTitle{
+      font-size: 14px;
+      color: #1E1E1E;
+      font-weight: 600;
+    }
 
     .container {
       width: 80%;
@@ -48,7 +58,7 @@
 
 <body>
   <div class="container">
-    <h1>病历书写规范提示</h1>
+    <h1 class="titleH1">病历书写规范提示</h1>
     <div class="content">
 
     </div>

+ 1 - 1
src/html/cdssHorizontal.html

@@ -37,8 +37,8 @@
           <div class="rightWrapper">
             <div class="rightBox">
               <p class="rightBoxTitle">
-                 
               </p>
+              <p class="disName"></p>
             </div>
           </div>
         </div>

Різницю між файлами не показано, бо вона завелика
+ 67 - 0
src/html/generalTreat.html


Різницю між файлами не показано, бо вона завелика
+ 19 - 2
src/html/smartAlert.html


+ 4 - 1
src/js/cdss.js

@@ -68,6 +68,9 @@ if(mrId){
   Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
     const data = res1.data.data&&res1.data.data[0]
     msg = res2.data.data ||{}
+    if(!(msg&&msg.diseaseName&&msg.diseaseName.name)){
+      msg.diseaseName={}
+    }
     window.msg = msg
     renderPage(data)
   })
@@ -478,7 +481,7 @@ function rendergeneraTreatPush(list){
   if(list&&  $(".moduleItem.general").length > 0){
     $(".moduleItem.general").append(titleStr('generaTreatPush'))
     moduleNum++
-    let str = `<div class="generalTreatInfo clearfix isOverFlow">"一般治一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治疗测试一般治"${list}</div>`
+    let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
     $(".moduleItem.general").append(str)
     $(".moduleItem.general").css("display","block")
     let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight

+ 47 - 7
src/js/cdssHorizontal.js

@@ -22,7 +22,8 @@ let iconArrowUp = require('./../images/icon_arrow_up.png').replace(/^undefined/g
 let iconArrowDown = require('./../images/icon_arrow_down.png').replace(/^undefined/g, '')
 let showImg = require('./../images/show2.png').replace(/^undefined/g, '')
 let collapseImg = require('./../images/collapse2.png').replace(/^undefined/g, '')
-
+let treatDisName
+let generalTreatInfo
 
 
 setWidth()
@@ -64,6 +65,9 @@ if(mrId){
   Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
     const data = res1.data.data&&res1.data.data[0]
     msg = res2.data.data ||{}
+    if(!(msg&&msg.diseaseName&&msg.diseaseName.name)){
+      msg.diseaseName={}
+    }
     window.msg = msg
     renderPage(data)
   })
@@ -242,7 +246,10 @@ function renderPushData(){
       let checkupPush = result.vital ||[]
       let medicinesPush = result.medicines || []
       let operationsPush = result.operations ||[]
-   
+      let treatPush = result.treat&&result.treat[0] ||{}
+      treatDisName = treatPush&&treatPush["name"]
+      let generaTreatPush = treatPush&&treatPush["generaTreat"]
+      generalTreatInfo = generaTreatPush
       // let lisPush =[{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
       // let pacsPush = [{name:"胸部x射线",hisNameList:null},{name:"心电图",hisNameList:null}]
       // let checkupPush = [{name:"神志表情",hisNameList:null},{name:"面部表情",hisNameList:null}]
@@ -258,9 +265,11 @@ function renderPushData(){
       renderCheckup(checkupPush,checkupNum,null,true)
       renderSymptomPush(symptomPush,symptomNum,null,true)
       renderDiag(diagPush)
-      if(medicinesPush.length > 0 || operationsPush.length > 0){
+
+      if(medicinesPush.length > 0 || operationsPush.length > 0||generaTreatPush){
         let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
         $(".rightBoxTitle").append(str)
+        renderDisName()
         $(".rightWrapper").css("display","inline-block")
       }else{
         $(".leftWrapper").css({
@@ -268,15 +277,17 @@ function renderPushData(){
           width: "100%"
         })
       }
-      if((!$(".moduleItem.medicine")&&!$(".moduleItem.operation")) ||($(".moduleItem.medicine").length === 0&&$(".moduleItem.operation").length === 0)){
+      if((!$(".moduleItem.medicine")&&!$(".moduleItem.operation")&&!(".moduleItem.general")) ||($(".moduleItem.general").length === 0&&$(".moduleItem.medicine").length === 0&&$(".moduleItem.operation").length === 0)){
         $(".rightWrapper").css("display","none")
         $(".leftWrapper").css({
           borderRight: "0px",
           width: "100%"
         })
       }
-      renderMedicinesPush(medicinesPush,medicinesNum,2,true)
-      renderOperationPush(operationsPush,operationsNum,6,true)
+    
+      rendergeneraTreatPush(generaTreatPush)
+      renderMedicinesPush(medicinesPush,1,2,true)
+      renderOperationPush(operationsPush,1,6,true)
       // if(hasCompleteTnterface === allInterface){
       //   $('.loading').css("display","none")
       //   if(moduleNum === 0){ 
@@ -345,6 +356,30 @@ function renderOperationPush(list,showNum,type,hasInfo){
   }
  
 }
+function renderDisName(){
+  $(".disName").append(`${treatDisName}`)
+}
+function rendergeneraTreatPush(list){
+  if(list.length > 0 &&  $(".moduleItem.general").length > 0){
+    moduleNum++
+ 
+    $('.moduleItem.general .moduleItemTitBox').append(titleStr("generaTreatPush"))
+    let str = `<div class="generalTreatInfo clearfix isOverFlow">${list}</div>`
+    $(".moduleItem.general").append(str)
+    
+    setTimeout(function(){
+      let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
+      console.log("generaTreatHei",generaTreatHei)
+      if(generaTreatHei >81){
+        $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多</span>`)
+        bindGeneralSlide()
+      }
+    })
+  
+   
+    $(".moduleItem.general").css("display","block")
+  }
+}
 function renderCheckup(list,showNum,type,hasInfo){
   if(list.length > 0 &&  $(".moduleItem.vital").length > 0){
     moduleNum++
@@ -545,7 +580,12 @@ function showMoreCaseWrite(){
     openNewWin(`caseWriteStandard.html?caseWriteStandradList=${encodeURIComponent(JSON.stringify(caseWriteStandradList))}`)
   })
 }
-
+function bindGeneralSlide(){
+  $(".showMoreGeneralTreat").on("click",function(){
+    openNewWin(`generalTreat.html?disName=${treatDisName}&generalTreatInfo=${generalTreatInfo}`)
+  })
+  
+}
 function setWidth(){
   let winWidth = $(".bodyWrap").css("width")
   $(".contentBox").css("width",winWidth)

+ 19 - 0
src/js/generalTreat.js

@@ -0,0 +1,19 @@
+const $ = require("jquery");
+const {getUrlArgObject} = require('./promise.js');
+
+$(function(){
+  let disName = getUrlArgObject("disName") ||''
+  let generalTreatInfo = getUrlArgObject("generalTreatInfo") ||''
+ 
+
+  renderGeneralTreat(generalTreatInfo,'一般治疗')
+  function renderGeneralTreat(list,name){
+    if(list.length === 0){
+      return
+    }
+    // let str = `<p>${name}</p>`
+    let str = `<p class="contentTitle">${disName}</p>`
+    str+= `<div>${generalTreatInfo}</div>`
+    $(".content").append(str)
+  }
+})

+ 5 - 0
src/js/promise.js

@@ -253,6 +253,11 @@ const titleConfigH = {
     icon: iconPacsPush,
     name:"推荐检查"
   },
+  generaTreatPush:{
+    background: "#E3FEFE",
+    icon: iconTreatMedicine,
+    name:"一般治疗"
+  },
   drugPush:{
     background: "#E3FEFE",
     icon: iconTreatMedicine,

+ 4 - 2
src/js/smartAlert.js

@@ -18,10 +18,12 @@ $(function(){
     if(list.length === 0){
       return
     }
-    let str = `<p>${name}</p>`
+    let str = `<p class="contentTitle">${name}</p>`
+    let infoStr = ""
     for(let i = 0; i < list.length; i++){
-      str+= `<div>${list[i].msg}</div>`
+      infoStr+= `<li class="contentItem">${list[i].msg}</li>`
     }
+    str += `<ul class="contentBox">${infoStr}</ul>`
     $(".content").append(str)
   }
 })

+ 14 - 0
webpack.config.js

@@ -24,6 +24,7 @@ module.exports = {
     cdssHorizontal: path.resolve(__dirname, 'src/js', 'cdssHorizontal.js'),
     smartAlert: path.resolve(__dirname, 'src/js', 'smartAlert.js'),
     caseWriteStandard: path.resolve(__dirname, 'src/js', 'caseWriteStandard.js'),
+    generalTreat:path.resolve(__dirname, 'src/js', 'generalTreat.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -75,6 +76,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: '一般治疗',
+      template: path.resolve(__dirname, 'src/html', 'generalTreat.html'),
+      filename: 'generalTreat.html',
+      chunks: ['generalTreat', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: '病情提示',
       template: path.resolve(__dirname, 'src/html', 'illness.html'),