luolei 4 år sedan
förälder
incheckning
9d77708670

+ 86 - 0
src/css/homeStatic.less

@@ -0,0 +1,86 @@
+@import './common.less';
+
+.staticWrap {
+  .staticTopCenter {
+    width: 800px;
+    margin: 0 auto;
+    text-align: center;
+    padding-top: 130px;
+  }
+  .staticTop {
+    height: 450px;
+    background-color: #2A9BD5;
+  }
+  .staticTopLogo {
+    margin-bottom: 40px;
+    img {
+      width: 500px;
+    }
+  }
+  .staticTopTab {
+    margin-bottom: 20px;
+    ul {
+      
+    }
+    li {
+      display: inline-block;
+      font-size: 16px;
+      color: #fff;
+      margin: 0 20px;
+      cursor: pointer;
+      padding-bottom: 2px;
+      border-bottom: 2px solid #fff;
+    }
+  }
+  .staticTopSearch {
+    width: 800px;
+    height: 60px;
+    line-height: 60px;
+    background-color: #fff;
+    border-radius: 8px;
+    padding-right: 100px;
+    box-sizing: border-box;
+    position: relative;
+    input {
+      height: 60px;
+      box-sizing: border-box;
+      float: left;
+      border-radius: 8px;
+      width: 100%;
+      padding: 0 30px;
+    }
+    .searchBtn {
+      width: 100px;
+      border-left: 1px solid #C4C6CF;
+      position: absolute;
+      right: 0;
+      top: 0;
+      cursor: pointer;
+      color: #666;
+      padding-left: 40px;
+      box-sizing: border-box;
+      img {
+        position: absolute;
+        left: 20px;
+        top: 20px;
+        width: 20px;
+        height: 20px;
+      }
+    }
+  }
+  .foryou {
+    width: 100%;
+    text-align: center;
+    margin:80px 0 50px 0;
+    color: #333;
+    font-size: 30px;
+    font-weight: bold;
+  }
+  .staticBg {
+    width: 800px;
+    margin: 0 auto;
+    img {
+      width: 100%;
+    }
+  }
+}

+ 0 - 505
src/css/index.less

@@ -1,507 +1,2 @@
 @import './common.less';
 
-.iframeWrap {
-  margin: 10px auto 50px;
-  padding: 20px;
-  min-width: 340px;
-  .conditionHintPub {
-    border: 1px solid #F2F2F2;
-    margin-bottom: 15px;
-    li {
-      padding-right: 18px;
-      float: left;
-      line-height: 24px;
-    }
-    .conditionMain {
-      padding: 17px;
-    }
-    .alertModal{
-      position: relative;
-      .mayResult {
-        color: #838383;
-        position: relative;
-      }
-      .mayResultSelect {
-        line-height: 28px;
-        .makesureResult {
-          cursor: pointer;
-          color: @colorBlue;
-        }
-        .sanjiao {
-          width: 18px;
-          height: 18px;
-          display: inline-block;
-          position: relative;
-          top: 3px;
-          background: url('../images/select.png') center center no-repeat;
-        }
-      }
-    }
-    .treatPlan {
-      font-weight: bold;
-      padding-bottom: 5px;
-    }
-    .treatPlanWrap {
-      padding-bottom: 10px;
-      border-bottom: 1px solid @grayColor;
-    }
-    .treatMedicine {
-      padding-top: 10px;
-      .medicinePart {
-        margin: 8px 0;
-        position: relative;
-      }
-      .medicine {
-        border-bottom: 1px solid @grayColor;
-        position: relative;
-      }
-      .medicine:hover {
-        color: @colorBlue;
-        .infoMsg {
-          display: inline-block;
-          right: -20px;
-          background-color: #fff;
-        }
-      }
-      .medicineDis {
-        color: @grayColor;
-        border-bottom: 1px solid @grayColor;
-      }
-      .medicineWaring {
-        background-color: #f4c051;
-        color: #000;
-        font-size: 12px;
-        border-radius: 4px;
-        border: 1px solid #fff;
-        line-height: 18px;
-      }
-      .medicineWaringDis {
-        background-color: #fff;
-        color: @grayColor;
-        font-size: 12px;
-        border-radius: 4px;
-        line-height: 18px;
-        border: 1px solid @grayColor;
-      }
-      .medicineWaringDisMsg {
-        color: @grayColor;
-      }
-    }
-    p {
-      line-height: 24px;
-      span {
-        display: inline-block;
-      }
-    }
-  }
-  .conditionHintWz{
-    h4 {
-      background-color: @bgcBlue;
-      i {
-        background: url("../images/inquire.png") center center no-repeat;
-      }
-    }
-  }
-  .conditionHintTg{
-    h4 {
-      background-color: @bgcBlue;
-      i {
-        background: url("../images/tgjc.png") center center no-repeat;
-      }
-    }
-  }
-  .conditionHintInspect{
-    h4 {
-      background-color: @bgcBlue;
-      i {
-        background: url("../images/inspect.png") center center no-repeat;
-      }
-    }
-  }
-  .conditionHintMay{
-    h4 {
-      background-color: @bgcMay;
-      i {
-        background: url("../images/yszd.png") center center no-repeat;
-      }
-    }
-  }
-  .conditionHintWarings{
-    display: none;
-    h4 {
-      color: @colorWaring;
-      i {
-        background: url("../images/warings.png") center center no-repeat;
-      }
-    }
-    li{
-      float: left;
-      line-height: 24px;
-    }
-    li:hover {
-      color: @colorBlue;
-    }
-  }
-  .conditionHintKnzd{
-    display: none;
-    h4 {
-      i {
-        background: url("../images/knzd.png") center center no-repeat;
-      }
-    }
-    ul {
-      li {
-        float: left;
-        line-height: 24px;
-      }
-      li:hover {
-        color: @colorBlue;
-      }
-    }
-  }
-  .conditionHintZhiliao{
-    h4 {
-      background-color: @bgcPlan;
-      i {
-        background: url("../images/zhiliao.png") center center no-repeat;
-      }
-    }
-  }
-  .conditionHintTips{
-    .mayIllness {
-      padding-bottom: 5px;
-      span {
-        position: relative;
-        border-bottom: 1px solid @grayColor;
-        .infoMsg {
-          position: relative;
-          border-bottom: 0;
-          float: right;
-        }
-      }
-      span:hover {
-        .infoMsg {
-          display: inline-block;
-        }
-      }
-      a {
-        border-bottom: 1px solid @grayColor;
-      }
-    }
-    h4 {
-      background-color: @bgcWaring;
-      i {
-        background: url("../images/tips.png") center center no-repeat;
-      }
-    }
-  }
-  .illnessTable {
-    color: @colorBlue;
-    line-height: 28px;
-    cursor: pointer;
-  }
-  .conditionHint{
-  }
-  h4 {
-    color: #000;
-    height: 40px;
-    line-height: 40px;
-    background-color: @bgcMay;
-    font-size: 16px;
-    font-weight: bold;
-  }
-  
-  h4 {
-    i {
-      content: '';
-      width: 40px;
-      height: 40px;
-      float: left;
-    }
-  }
-}
-.commonTreat,.conditionHintKnzdLis,.conditionHintWaringsLis,.conditionHintWzLis,.conditionHintTgLis,.conditionHintInspectLis,.conditionHintAssistLis{
-  position: relative;
-}
-.conditionHintInspectNull {
-  border-bottom: 1px solid @grayColor;
-  padding-bottom: 5px;
-  margin-bottom: 5px;
-}
-.conditionHintZhiliaoNull {
-  display: none;
-}
-.conditionHintAssistLis,.conditionHintInspectLis {
-  padding: 5px 0;
-  .slideDown {
-    padding: 5px 0 5px 0px;
-  }
-  li:first-child{
-    padding-right: 5px;
-  }
-}
-.pushEmpty {
-  color: #ADADAD;
-}
-.medicinePartLimitHeight {
-  height: 25px;
-  overflow: hidden;
-  position: relative;
-}
-.medicinePartLimitHeightSpec {
-  height: 75px;
-  overflow: hidden;
-  position: relative;
-}
-.slideDown {
-  background-color: #fff;
-  position: absolute;
-  bottom: 0px;
-  right: 0px;
-  color: @colorBlue;
-  height: 25px;
-  line-height: 25px;
-  box-shadow: -2px 0px 15px 0px #fff;
-  cursor: pointer;
-  i{
-    width: 10px;
-    height: 7px;
-    display: inline-block;
-    position: relative;
-    top: -2px;
-    background: url('../images/down.png') center center no-repeat;
-  }
-}
-.slideup {
-  background-color: #fff;
-  position: relative;
-  float: right;
-  bottom: 0px;
-  right: 0px;
-  color: @colorBlue;
-  cursor: pointer;
-  i{
-    width: 10px;
-    height: 7px;
-    display: inline-block;
-    position: relative;
-    top: -2px;
-    background: url('../images/up.png') center center no-repeat;
-  }
-}
-.disclaimer {
-  cursor: pointer;
-  height: 40px;
-  width: 100%;
-  line-height: 40px;
-  text-align: center;
-  position: fixed;
-  bottom: 0;
-  background-color: #ececec;
-  left: 0;
-  z-index: 98;
-  a {
-    display: block;
-  }
-}
-.infoMsg {
-  width: 20px;
-  height: 20px;
-  position: absolute;
-  top: 2px;
-  right: 0px;
-  cursor: pointer;
-  display: none;
-  background: url('../images/msg1.png') center center no-repeat;
-}
-.infoMsg:hover {
-  background: url('../images/msg2.png') center center no-repeat;
-}
-.infoMsgParent {
-  position: relative;
-}
-.infoMsgParent:hover {
-  .infoMsg {
-    display: block;
-  }
-}
-.responsibility {
-  text-align: center;
-  font-size: 12px;
-  color: #979797;
-  padding-top: 15px;
-}
-
-/*******病情提示*******/
-.illnessWrap{
-  padding: 30px 60px;
-  .conditionHintPub h4{
-    background-color:#fff;
-    font-size: 28px;
-  }
-  .popupModal{
-    width: 350px;
-  }
-  .conditionHintPub .conditionMain{
-    padding: 20px 0;
-  }
-  .makesureResult {
-    cursor: pointer;
-    color: #267FD7;
-  }
-  .mayResultSelect  .sanjiao{
-    width: 18px;
-    height: 18px;
-    display: inline-block;
-    position: relative;
-    top: 3px;
-    background: url(/images/select.png) center center no-repeat;
-  }
-  .conditionHintTips .mayIllness{
-    line-height: 30px;
-    span,a,.modalMainOne,.modalMainTwo{
-      border-bottom:none;
-    }
-    .diagName {
-      border-bottom: 1px solid #1E1E1E;
-    }
-    .sriticalinfo {
-      height:30px;
-      background:#F5F5F5;
-      line-height: 30px;
-      margin: 10px 0;
-  }
-    span .infoMsg{
-      float: none;
-      top: 5px;
-    }
-    .mayResult{
-      margin: 20px 0 0 0;
-      display: inline-block;
-    }
-  }
-  
-  .mayResult {
-    margin: 20px 0 0 0;
-    color: #838383;
-    position: relative;
-  }
-  .mayIllness span {
-    position: relative;
-  }
-  
-}
-
-/************治疗方案****************/
-.treatBox {
-  position: absolute;
-  width: 100%;
-  height: 100%;
-  overflow-y: auto;
-}
-.treatWrap{
-  padding: 30px 60px;
-  .treatMedicineWarp{
-    padding: 30px 0;
-  }
-  .conditionHintPub .conditionMain{
-    padding: 30px 0;
-    margin-top: 30px;
-    border-top:1px #E8EAEC solid;
-    .treatPlanWrap{
-      padding-bottom:30px;
-      border-bottom:1px #E8EAEC solid;
-    }
-    .treatPlan{
-      font-size: 22px;
-      font-weight: normal;
-    }
-    .commonTreat{
-      float: left;
-      margin-left: 65px;
-    }
-    .treatDrug{
-      font-size: 22px;
-      margin-bottom: 30px;
-    }
-    .drugWarp{
-      .medicinePart{
-        margin-bottom: 20px;
-      }
-      .drugType{
-        width: 158px;
-        float: left;
-        p{
-          margin-left: 10px;
-        }
-      }
-      .drugCont{
-        margin-left: 158px;
-      }
-      .drug{
-        display: inline-block;
-        margin:0 20px 10px 0;
-        .medicineWaring{
-          display: inline-block;
-          padding: 0 3px;
-          height: 18px;
-          font-size: 12px;
-          background: #F4C051;
-          border-radius: 4px;
-          vertical-align: middle;
-        }
-        .medicineWaringDis {
-          background-color: #fff;
-          color: @grayColor;
-          font-size: 12px;
-          border-radius: 4px;
-          line-height: 18px;
-          border: 1px solid @grayColor;
-        }
-        .medicineWaringDisMsg {
-          color: @grayColor;
-          i {
-            color: @grayColor;
-          }
-        }
-        .medicineDis {
-          color: @grayColor;
-        }
-        .medicine {
-          position: relative;
-          .infoMsg {
-            right: -20px;
-            top: 0;
-          }
-        }
-        .medicine:hover {
-          .infoMsg {
-            display: inline-block;
-          }
-        }
-        p{
-          color: #7C828E;
-          i{
-            color: #004BD9 ;
-          }
-        }
-
-      }
-    }
-  }
-  .conditionHintPub h4{
-    background-color:#fff;
-    font-size: 24px;
-    font-weight: normal;
-    .diseaseName{
-      font-size: 24px;
-    }
-  }
-  .treatMedicineNullText, .treatPlanNullText {
-    font-size: 20px;
-  }
- 
-}
-.treatPlanNullWrap .treatPlanNullText {
-  margin-top: 30px;
-}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 53 - 0
src/html/homeStatic.html


BIN
src/images/staticBg.png


BIN
src/images/staticBgS.png


BIN
src/images/staticLogo.png


+ 113 - 0
src/js/homeStatic.js

@@ -0,0 +1,113 @@
+require('./../css/reset.css');
+require('./../css/homeStatic.less');
+require('./../css/popup.css');
+
+
+//tipsMode: 提示信息模式  1 为单个, 2 为多个(只有传2时为多个)
+
+const $ = require("jquery");
+const { post,config,getUrlArgObject,openNewWin } = require('./promise.js');
+const { transConf } = require('./util.js');
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo ,renderKnowledgeInfo,renderScaleInfo} = require('./indexVertDom.js');
+
+let emptyImg = require('./../images/staticBgS.png').replace(/^undefined/g, '')
+
+let mrId = getUrlArgObject('mrId') 
+const tipsMode = getUrlArgObject('tipsMode') || 1
+
+let msg;
+if(mrId) {
+ post(config.getMr,{mrId:mrId}).then((res) => {
+    const data = res.data
+    if(data.code == 0) {
+      msg = Object.assign(data.data, {plan:getUrlArgObject('plan') || '0',})
+      window.msg = msg
+      window.pushMessage = {} 
+    }
+  })
+} else {
+  msg = {
+    age: getUrlArgObject('age'),
+    sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
+    symptom: getUrlArgObject('symptomJson'),
+    vital: getUrlArgObject('vitalJson'),
+    lis: getUrlArgObject('lisJson')? JSON.parse(getUrlArgObject('lisJson')) : [],
+    pacs: getUrlArgObject('pacsJson'),
+    diag: getUrlArgObject('diagJson'),
+    diseaseName: getUrlArgObject('diseaseName'),
+    other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+    pasts: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+    hosCode:getUrlArgObject('hospitalCode') || '',
+    plan:getUrlArgObject('plan') || '0',
+  }
+  window.msg = msg
+  window.pushMessage = {} 
+}
+
+
+// var msg = {
+//     age: getUrlArgObject('age'),
+//     sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
+//     symptom: getUrlArgObject('symptomJson'),
+//     vital: getUrlArgObject('vitalJson'),
+//     lis: getUrlArgObject('lisJson')? JSON.parse(getUrlArgObject('lisJson')) : [],
+//     pacs: getUrlArgObject('pacsJson'),
+//     diag: getUrlArgObject('diagJson'),
+//     diseaseName: getUrlArgObject('diseaseName'),
+//     other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
+//     hosCode:getUrlArgObject('hospitalCode') || '',
+//     plan:getUrlArgObject('plan') || '0',
+// }//推送相关信息
+// //   http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
+// window.msg = msg
+// window.pushMessage = {}
+function getConf() {
+  return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
+}
+
+
+function getVersion() {
+  post(config.getVersion, '').then((res) => {
+    const data = res.data.data;
+    const ver = localStorage.getItem('versionTime');
+    const time = data.refreshTime;
+    $(".version-tip a").text(data.name);
+    if(!ver||ver===time+"=new"||time!==ver.replace("=new","")){       //判断版本是否更新
+      $(".version-tip").addClass('new-icon');
+      localStorage.setItem('versionTime',time+"=new");     //保存版本更新时间
+    }else{
+      $(".version-tip").removeClass('new-icon');
+    }
+  })
+}
+  function getDisclaimer() {
+    post(config.disclaimer, '').then((res) => {
+      const data = res.data.data.find(item => item.disclaimerCode == '2');
+      $(".responsibility").html(data.description);
+    })
+  }
+
+
+$(function(){
+  // getDisclaimer(); //获取免责声明
+  getVersion();   //获取版本信息
+  $(".disclaimerInfo").on("click", function(){
+    openNewWin("disclaimer.html")
+  });
+  $(".version-tip a").on("click", function(){
+    const ver = localStorage.getItem('versionTime');
+    $(".version-tip").removeClass('new-icon');
+    localStorage.setItem('versionTime',ver.replace("=new",""));
+    openNewWin("version.html");
+  });
+  let aa = [1,4,5,8,6,0]
+  function flat(arr){
+    let tmp = arr.some((item)=>item instanceof Array)
+    if(!tmp){
+      return arr
+    }
+    const res = Array.prototype.concat.apply([],arr)
+    return flat(res)
+  }
+  console.log(flat([1,[5,9,4],8,[0,[7,6]]]))
+});

+ 1 - 1
src/js/index.js

@@ -1,5 +1,5 @@
 require('./../css/reset.css');
-require('./../css/indexVert.less');
+require('./../css/homeStatic.less');
 require('./../css/popup.css');
 // require('./popupEdit.js');
 var Promise = require("bluebird");

+ 15 - 1
webpack.config.js

@@ -28,6 +28,7 @@ module.exports = {
     generalTreat:path.resolve(__dirname, 'src/js', 'generalTreat.js'),
     cdssPlan:path.resolve(__dirname, 'src/js', 'cdssPlan.js'),
     check:path.resolve(__dirname, 'src/js', 'check.js'),
+    homeStatic:path.resolve(__dirname, 'src/js', 'homeStatic.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -53,6 +54,19 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
+    new HtmlWebpackPlugin({
+      title: 'homeStatic',
+      template: path.resolve(__dirname, 'src/html', 'homeStatic.html'),
+      filename: 'homeStatic.html',
+      chunks: ['homeStatic', 'vendor', 'common'],
+      inject: true,
+      hash: true, //防止缓存
+      minify: {
+        removeAttributeQuotes: true, //压缩 去掉引号
+        removeComments: true, //移除HTML中的注释
+        collapseWhitespace: true //删除空白符与换行符
+      }
+    }),
     new HtmlWebpackPlugin({
       title: 'index',
       template: path.resolve(__dirname, 'src/html', 'check.html'),
@@ -422,7 +436,7 @@ module.exports = {
     },
     hot: true,
     // openPage:'index.html?age=28&tipsName=血常规&tipsType=12&diseaseId=280&lisJson=&diagJson=急性胰腺炎&diseaseName=糖尿病&pastJson=无心脏病&otherJson=无高血压&pacsJson=腹部B超:无异常,%20报告日期:2019-05-07&sex=男&symptomJson=恶心呕吐腰痛&vitalJson=血压左上肢13/12mmHg&hospitalCode=A001',
-    openPage:'cdss.html?mrId=200821362618001909&hospitalId=1&planCode=plan_default'
+    openPage:'homeStatic.html?mrId=200821362618001909&hospitalId=1&planCode=plan_default'
   },
   stats: { children: false }
 }