1178232204@qq.com 3 سال پیش
والد
کامیت
a256958cd6
2فایلهای تغییر یافته به همراه28 افزوده شده و 11 حذف شده
  1. 5 1
      src/css/cdss.less
  2. 23 10
      src/js/cdss.js

+ 5 - 1
src/css/cdss.less

@@ -225,6 +225,7 @@ body {
   cursor: pointer;
   &.noInfo {
     margin-right: 12px;
+    cursor: default;
     &.evaluationtitle {
       margin-right: 3px;
     }
@@ -269,7 +270,7 @@ body {
   cursor: pointer;
   color: #3b9ed0;
   position: absolute;
-  right: 14px;
+  right: 5px;
   bottom: 5px;
 }
 .moduleTitle {
@@ -816,4 +817,7 @@ body {
 }
 .nurseIitleItem{
   padding-left: 5px;
+}
+.noCur{
+  cursor: default;
 }

+ 23 - 10
src/js/cdss.js

@@ -42,6 +42,7 @@ let up = require('./../images/icon-up.png').replace(/^undefined/g, '')
 let go = require('./../images/g1.png').replace(/^undefined/g, '')
 let maydiagnoseList = [], hasdiagnoseList = [];
 let maydiagnoseType = false, hasdiagnoseType = false;
+
 const $ = require("jquery");
 const { post, config, getUrlArgObject, openNewWin, titleConfig } = require('./promise.js');
 const { renderFollowUp, followEmpty } = require('./followUp.js');
@@ -996,7 +997,7 @@ function renderHasDisPush(list) {
   }
 }
 function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush) {
-  let generalstate, medicinestate, operationstate, nursestate
+  let generalstate, medicinestate, operationstate, nursestate,isShow = false
   for (let i = 0; i < maydiagnoseList.length; i++) {
     const item = maydiagnoseList[i];
     if (item.code == 'maygeneral') {
@@ -1009,15 +1010,21 @@ function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush) {
       nursestate = item.status
     }
   }
+  for (let i = 0; i < treatPush.length; i++) {
+    const it = treatPush[i];
+    if(it.generaTreat){
+      isShow = true
+    }
+  }
   $(".box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='centerBox'></div>")
   let str = `<ul>
-    ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
+    ${treatPush.length > 0 && isShow && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
     ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
     ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
     ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
   </ul>
   <div class="centerBoxItem">
-    ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
+    ${treatPush.length > 0 && isShow && generalstate != 0 ? `<div class="checkBox generalItem maygeneral" data-index="0"></div>` : ''}
     ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem maymedicine" data-index="1"></div>` : ''}
     ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem mayoperation" data-index="2"></div>` : ''}
     ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem maynurse" data-index="3"></div>` : ''}
@@ -1039,7 +1046,7 @@ function renderMayPush(treatPush, medicinesPush, operationsPush, nursePush) {
   });
 }
 function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush) {
-  let generalstate, medicinestate, operationstate, nursestate
+  let generalstate, medicinestate, operationstate, nursestate,isShow = false
   for (let i = 0; i < maydiagnoseList.length; i++) {
     const item = maydiagnoseList[i];
     if (item.code == 'maygeneral') {
@@ -1051,15 +1058,21 @@ function renderHasPush(treatPush, medicinesPush, operationsPush, nursePush) {
     } else if (item.code == 'maynurse') {
     }
   }
+  for (let i = 0; i < treatPush.length; i++) {
+    const it = treatPush[i];
+    if(it.generaTreat){
+      isShow = true
+    }
+  }
   $(".hasdiagnose .box[data-index=" + indexNow + "]").find(".moduleCenter").append("<div class='centerBox'></div>")
   let str = `<ul>
-    ${treatPush.length > 0 && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
+    ${treatPush.length > 0 && isShow && generalstate != 0 ? `<li class="general" data-index="0">一般治疗</li>` : ''}
     ${medicinesPush.length > 0 && medicinestate != 0 ? `<li class="medicine" data-index="1">推荐用药</li>` : ''}
     ${operationsPush.length > 0 && operationstate != 0 ? `<li class="operation" data-index="2">推荐手术/操作</li>` : ''}
     ${nursePush.length > 0 && nursestate != 0 ? `<li class="nurse" data-index="3">推荐护理</li>` : ''}
   </ul>
   <div class="centerBoxItem">
-    ${treatPush.length > 0 && generalstate != 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
+    ${treatPush.length > 0 && isShow && generalstate != 0 ? `<div class="checkBox generalItem hasgeneral" data-index="0"></div>` : ''}
     ${medicinesPush.length > 0 && medicinestate != 0 ? `<div class="checkBox medicineItem hasmedicine" data-index="1"></div>` : ''}
     ${operationsPush.length > 0 && operationstate != 0 ? `<div class="checkBox operationItem hasoperation" data-index="2"></div>` : ''}
     ${nursePush.length > 0 && nursestate != 0 ? `<div class="checkBox nurseItem hasnurse" data-index="3"></div>` : ''}
@@ -1194,22 +1207,22 @@ function renderItemWrapper(list, showNum, name) {
   }
   if (showNum1 >= list.length) {
     return {
-      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
+      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
       longStr: ''
     }
   } else {
     shortStr += `<span class="showMore"><img class="iconArrowImg" src="${iconArrowDown}"></span>`
     longStr += `<span class="showLess"><img class="iconArrowImg"  src="${iconArrowUp}"></span>`
     return {
-      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
-      longStr: `<div class="longBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${longStr}</div></div></div>`
+      shortStr: `<div class="shortBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${shortStr}</div></div>`,
+      longStr: `<div class="longBox"><span class="shortBox-tit">${name ? name + ':' : ''}</span><div class="${name ? `${name == '推荐检验' || name == '推荐检查' || name == '鉴别诊断'?'shortBox-tit1' : 'shortBox-tit2'}` : ''}">${longStr}</div></div></div>`
     }
   }
 }
 
 function renderPushItem(item) {
   const infoIcon = `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`;
-  str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
+  str = `<span class="pushItemBox ${item.hasInfo == "1" ? '' : 'noCur'}" data-name="${item.name}" data-type="${item.type}">`
   str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${infoIcon}<i class="hidden-i"></i></span>`
   str += `</span>`;
   return str