ソースを参照

经典病例变蓝

xiezhiming 10 ヶ月 前
コミット
c42b1afb85
4 ファイル変更23 行追加11 行削除
  1. 6 0
      src/css/cdss.less
  2. 15 9
      src/js/cdss.js
  3. 1 1
      src/js/staticInfo.js
  4. 1 1
      webpack.config.js

+ 6 - 0
src/css/cdss.less

@@ -635,6 +635,12 @@ body{
   .infoImg,.hidden-i{
     margin-left: -10px;
   }
+}
+.classiccase{
+  .evaluationtitle{
+    color: @linkColor;
+    cursor: pointer;
+  }
 }
   .bold-text {
     font-weight: bold;

+ 15 - 9
src/js/cdss.js

@@ -212,7 +212,7 @@ function moreInfo() {
     const type = $(this).parents(".pushItemBox").attr('data-type')
     openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&mrId=${encodeURIComponent(mrId)}`)
   })
-  $('.evaluationtitle .item-name').off("click").click(function () {
+  $('.evaluationtitle').off("click").click(function () {
     const name = $(this).parents(".pushItemBox").attr('data-name')
     const type = $(this).parents(".pushItemBox").attr('data-type')
     openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&mrId=${encodeURIComponent(mrId)}&gauge=gauge`)
@@ -619,14 +619,14 @@ function renderMedicinesPush(obj, showNum) {
   let mshortStr1 = "";
   let mlongStr1 = "";
   let keys = Object.keys(obj);
-  let cateNames = Array.from(keys); 
+  let cateNames = Array.from(keys);
   if (cateNames.length > 0 && $(".moduleItem.medicine").length > 0) {
     moduleNum++;
     for (let i = 0; i < cateNames.length; i++) {
       let drugs = obj[cateNames[i]];
       let { shortStr, longStr } = renderItemWrapper(drugs, showNum);
       console.log("long", shortStr);
-      
+
       if (i < showNum1) {
         mshortStr1 += `&nbsp;&nbsp;${i + 1}.${cateNames[i]}<br>`;
         mshortStr1 += shortStr;
@@ -634,15 +634,15 @@ function renderMedicinesPush(obj, showNum) {
       // // 添加药品分类和短内容
       // mshortStr1 += `&nbsp;&nbsp;${i + 1}.${cateNames[i]}<br>`;
       // mshortStr1 += shortStr;
-      
+
       // 添加药品分类和长内容
       mlongStr1 += `&nbsp;&nbsp;${i + 1}.${cateNames[i]}<br>`;
 
       mlongStr1 += longStr;
-    
+
     }
     // 判断显示逻辑
-    if (showNum1 >cateNames.length) {
+    if (showNum1 > cateNames.length) {
       $(".moduleItem.medicine").append(`<div class="shortBox">${mshortStr1}</div>`);
     } else {
       mshortStr1 += `<span class="showMore"><img class="iconArrowImg" src="${iconArrowDown}"></span>`;
@@ -650,7 +650,7 @@ function renderMedicinesPush(obj, showNum) {
       $(".moduleItem.medicine").append(`<div class="shortBox">${mshortStr1}</div>`);
       $(".moduleItem.medicine").append(`<div class="longBox">${mlongStr1}</div>`);
     }
-    
+
     $(".moduleItem.medicine").css("display", "block");
   }
 }
@@ -682,7 +682,7 @@ function renderCasesPush(list, showNum) {
   console.log($(".moduleItem.classiccase").length);
   if (list.length > 0 && $(".moduleItem.classiccase").length > 0) {
     moduleNum++
-    let { shortStr, longStr } = renderItemWrapper(list, showNum)
+    let { shortStr, longStr } = renderItemWrapper(list, showNum, "经典病例")
     $(".moduleItem.classiccase").append(shortStr).append(longStr)
     $(".moduleItem.classiccase").css("display", "block")
   }
@@ -746,7 +746,13 @@ function renderPushItem(item, name, index, totalItems) {
     }
   }
   str = `<span class="pushItemBox" 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} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
+
+  if (name === "经典病例") {
+    str += `<span class="pushItemName  ${item.hasInfo == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
+  } else {
+    str += `<span class="pushItemName  ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
+  }
+
   str += `</span>`;
   // $(".pushItemBox").css("display", "flex")
   return str;

+ 1 - 1
src/js/staticInfo.js

@@ -60,7 +60,6 @@ function getInfomation() {
       return;
     }
     var detailList = data.details
-    console.log(data.details);
 
     var scale = data.scale
 
@@ -526,6 +525,7 @@ function renderTab(detailList, scale) {
     //$(".tabBox .title").html(noticeName);
   }
   if (detailList['经典病例']) {
+    console.log('xxxxx');
     $(".tabList").append(`<span class="tab" data-module="classicCase" data-title="` + classicCaseName + `">经典病例</span>`)
   }
   if (!!scale && getUrlArgObject('type') == 8) {

+ 1 - 1
webpack.config.js

@@ -5,8 +5,8 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
 
+//const proxyHost = "http://172.16.8.60:6060";
 const proxyHost = "http://173.18.12.195:6060";
-//const proxyHost = "http://173.18.12.192:6060";
 module.exports = {
   entry: {
     //index: path.resolve(__dirname, 'src/js', 'index.js'),