浏览代码

Merge branch 'test' into dev_zxc

zhangxc 5 年之前
父节点
当前提交
95ff0b372e
共有 14 个文件被更改,包括 302 次插入117 次删除
  1. 2 1
      src/css/console.less
  2. 12 1
      src/css/index.less
  3. 16 1
      src/css/login.less
  4. 22 10
      src/css/reset.less
  5. 2 2
      src/html/index.html
  6. 2 1
      src/html/login.html
  7. 2 2
      src/html/qcScore.html
  8. 19 10
      src/js/console.js
  9. 13 9
      src/js/index.js
  10. 174 0
      src/js/maps.js
  11. 1 1
      src/js/modal.js
  12. 33 3
      src/js/qcScore.js
  13. 3 75
      src/js/utils.js
  14. 1 1
      webpack.config.js

+ 2 - 1
src/css/console.less

@@ -87,13 +87,14 @@
   z-index: 20;
   height: 44px;
   line-height: 44px;
-  padding-left: 35px;
+  padding-left: 15px;
   border-bottom: 1px solid #E2E5EF;
   font-size: 14px;
   font-weight: bold;
   letter-spacing: 1px;
   p {
     display: inline-block;
+    font-size: 16px;
   }
   .monthYear {
     float: right;

+ 12 - 1
src/css/index.less

@@ -21,6 +21,7 @@
     &:after{
       content: " ";
       display: inline-block;
+      cursor: pointer;
       position: absolute;
       right: 0;
       top:22px;
@@ -149,20 +150,30 @@
     height: 40px;
     line-height: 40px;
     border-radius: 3px;
-    margin-bottom: 15px;
+    margin-bottom: 30px;
     padding: 0 10px;
     box-sizing: border-box;
   }
+  p {position: relative;}
   p span {
     width: 90px;
     display: inline-block;
     text-align: right;
   }
+  .oldWaring {
+    color: #FF4D4F;
+    display: inline-block;
+    position: absolute;
+    left: 105px;
+    bottom: 6px;
+  }
   .waring {
     text-align: left;
     i {
       margin-left: 15px;
       color: #FF4D4F;
+      position: relative;
+      top: -22px;
     }
   }
 }

+ 16 - 1
src/css/login.less

@@ -2,6 +2,7 @@ body {
   background-color: #f5f5f5;
 }
 .login {
+  cursor: pointer;
   .waring {
     color: #FF4D4F;
     margin-top: 18px;
@@ -52,6 +53,15 @@ body {
   margin-top: -260px;
   border-radius:20px;
   background-color: #fff;
+  
+  p.title {
+    font-size: 28px;
+    color: #fff;
+    font-weight: bold;
+    position: absolute;
+    top: 90px;
+    left: 50px;
+  }
   .loginBg {
     float: left;
     width: 400px;
@@ -85,6 +95,11 @@ body {
     width: 300px;
     height: 40px;
     line-height: 38px;
+    border-radius: 4px;
+    input {
+      display: inline-block;
+      width: 80%;
+    }
   }
 }
 
@@ -116,7 +131,7 @@ body {
     height: 40px;
     position: relative;
     padding-left: 15px;
-    font-size: 16px;
+    font-size: 14px;
     img {
       position: absolute;
       right: 10px;

+ 22 - 10
src/css/reset.less

@@ -191,17 +191,17 @@ textarea {
     left: 50%;
     top: 30%;
     margin-left: -200px;
-    // margin-top: -100px;
     padding-bottom: 20px;
+    border-radius: 4px;
+    overflow: hidden;
   }
   .title {
     border-bottom: 1px solid #eee;
-    background-color: #F8F8F8;
     line-height: 40px;
     height: 40px;
     position: relative;
     padding-left: 15px;
-    font-size: 16px;
+    font-size: 14px;
     img {
       position: absolute;
       right: 0px;
@@ -210,12 +210,12 @@ textarea {
     }
   }
   .content {
-    padding: 25px 15px;
+    padding: 25px 15px 0 15px;
     font-size: 14px;
     text-align: center;
   }
   .btns {
-    height: 45px;
+    height: 36px;
     text-align: center;
     span {
       border-radius: 5px;
@@ -223,11 +223,10 @@ textarea {
       // float: right;
       cursor: pointer;
       border: 1px solid #dedede;
-      height: 40px;
-      line-height: 40px;
-      width: 120px;
+      width: 80px;
+      height: 36px;
+      line-height: 36px;
       margin: 5px 5px 0;
-      padding: 0 15px;
       color: #333;
       border-radius: 3px;
       font-weight: 400;
@@ -275,4 +274,17 @@ textarea {
     margin-left: -20px;
     margin-top: -20px;
   }
-}
+}
+
+input::-webkit-input-placeholder{
+  color:#ccc;
+}
+input::-moz-placeholder{   /* Mozilla Firefox 19+ */
+  color:#ccc;
+}
+input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
+  color:#ccc;
+}
+input:-ms-input-placeholder{  /* Internet Explorer 10-11 */
+  color:#ccc;
+}

+ 2 - 2
src/html/index.html

@@ -4,7 +4,7 @@
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <meta http-equiv="X-UA-Compatible" content="ie=edge">
-  <title>AI病例质控-首页</title>
+  <title>AI病案质控平台-首页</title>
 </head>
 <script type="text/html" id="menuTmpl">
     {{if subMenuList.length}}
@@ -24,7 +24,7 @@
       <div class="header clearfix">
           <div class="title fl">
               <img src="../images/logo.png" alt="logo" />
-              <span>AI病质控平台</span>
+              <span>AI病质控平台</span>
           </div>
           <div class="login fr">
               <a class="setting" id="userName" href="javascript:void(0);">***</a>

+ 2 - 1
src/html/login.html

@@ -15,13 +15,14 @@
     </div>
     <div class="loginForm clearfix">
       <img src="../images/loginBg.png" class="loginBg" alt="">
+      <p class="title">AI病历质控平台</p>
       <div class="message">
         <p class="welcome">欢迎使用!</p>
         <div class="perPub">
           <p>用户名</p>
           <div class="iptWrap">
             <img src="../images/yonghu.png" alt="">
-            <input type="text" placeholder="请输入用户名" id="username" value="" autocomplete="off">
+            <input type="text" placeholder="请输入用户名" id="username" value="" autocomplete="off">
           </div>
         </div>
         <br>

+ 2 - 2
src/html/qcScore.html

@@ -150,10 +150,10 @@
     </script>
     <script type="text/html" id="editTmpl">
         <div class="edit-box">
-            <p><span>质控条目: </span><input disabled type="text" value="${msg}" /></p>
+            <p><span>质控条目: </span><input disabled type="text" value="${standardMsg}" /></p>
             <!--<p><span>模块名称: </span><input type="text" value="${modelName}" /></p>-->
             <p><span>提示信息: </span><input id="qcMsg" type="text" value="${msg}" /></p>
-            <p><span>质控分数: </span> <input id="qcScore" type="text" value="${score}" /></p>
+            <p><span>分值: </span> <input id="qcScore" type="text" value="${score}" /></p>
             <p class="warning"><span></span><span class="red">支持≥0的数字输入,最多保留小数点后1位~</span></p>
         </div>
     </script>

+ 19 - 10
src/js/console.js

@@ -50,7 +50,12 @@ function initConsole(result){
         '本月不合格病历-机器':require("../images/icon7.png"),
         '本月质控数-机器':require("../images/icon10.png"),
         '本月甲级病历-机器':require("../images/icon8.png"),
-        '本月乙级病历-机器':require("../images/icon9.png")
+        '本月乙级病历-机器':require("../images/icon9.png"),
+        '本年病历数':require("../images/icon6.png"),
+        '本年不合格病历-机器':require("../images/icon7.png"),
+        '本年质控数-机器':require("../images/icon10.png"),
+        '本年甲级病历-机器':require("../images/icon8.png"),
+        '本年乙级病历-机器':require("../images/icon9.png"),
     }
     let dom = ''
     for(let i in result){
@@ -121,6 +126,7 @@ function getBarData(type){
 //柱状图住院费用
 function barChartPay(dataX,dataY){
     var myCharts = echarts.init(document.getElementById('barChartPay'));
+    var lengthNum = dataX.length;
     $(window).resize(function(){
         myCharts.resize()
     });
@@ -148,7 +154,8 @@ function barChartPay(dataX,dataY){
                 axisLabel: {//x轴刻度
                     textStyle: {
                         color: '#333'
-                    }
+                    },
+                    rotate:lengthNum>8?30:0
                 },
                 axisLine: {//x轴
                     lineStyle:{
@@ -193,7 +200,7 @@ function barChartPay(dataX,dataY){
             {
                 name: '平均住院费用',
                 type: 'bar',
-                barWidth: '6%',
+                barWidth: lengthNum<5?'8%':'23%',
                 data: dataY
             }
         ]
@@ -203,6 +210,7 @@ function barChartPay(dataX,dataY){
 //柱状图住院日期
 function barChart(dataX,dataY){
     var myChart = echarts.init(document.getElementById('barChart'));
+    var lengthNum = dataX.length;
     $(window).resize(function(){
         myChart.resize()
     });
@@ -230,7 +238,8 @@ function barChart(dataX,dataY){
                 axisLabel: {//x轴刻度
                     textStyle: {
                         color: '#333'
-                    }
+                    },
+                    rotate:lengthNum>8?30:0
                 },
                 axisLine: {//x轴
                     lineStyle:{
@@ -275,7 +284,7 @@ function barChart(dataX,dataY){
             {
                 name: '平均住院日',
                 type: 'bar',
-                barWidth: '6%',
+                barWidth:  lengthNum<5?'8%':'23%',
                 data: dataY
             }
         ]
@@ -285,14 +294,13 @@ function barChart(dataX,dataY){
 }
 //空心饼图
 function emptyCircle(data){
-    if(!data||data.length == 0)return
     var myChart = echarts.init(document.getElementById('emptyCircle'));
     $(window).resize(function(){
         myChart.resize()
     });
     let bgColor = '#fff';
     let title = '总量';
-    let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
+    let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
     let echartData = data;
     let total = 0;
     for(let i = 0;i < echartData.length;i++){
@@ -302,7 +310,7 @@ function emptyCircle(data){
         backgroundColor: bgColor,
         color: color,
         title: [{
-            text: '{val|' + total + '}\n{name|' + title + '}',
+            text: data.length>0?'{val|' + total + '}\n{name|' + title + '}':'',
             top: 'center',
             left: 'center',
             textStyle: {
@@ -398,17 +406,18 @@ function queList(data){
 }
 //饼图列表注释渲染
 function panDetail(data){
+    let color = ['#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336','#F2637B','#975FE4', '#399FFF', '#37CBCB', '#4CCB73','#FAD336'];
     let strAll = '';
     for(let i = 0;i < data.length;i++){
         strAll += `
             <tr class="explainLi">
-                <td class="deptName"><i class="tip"></i>${data[i].name}</td>
+                <td class="deptName"><i class="tip" style="background-color:${color[i]}"></i>${data[i].name}</td>
                 <td class="deptNum">${data[i].num}</td>
                 <td class="percent">(${data[i].percentStr})</td>
             </tr>
         `
     }
-    $(".explainPan table").html(strAll)
+    $(".explainPan table").html(strAll);
     $(".explainPan").css({
         marginTop:-($(".explainPan").height()/2-20)+'px'
     })

+ 13 - 9
src/js/index.js

@@ -12,6 +12,9 @@ $(function(){
   $(".main").css({
     height:$(window).height()-70+'px'
   })
+  $("body").on('focus',".modalAction input",function(){
+    $(this).attr("type","password")
+  })
 });
 
 function initMenu(data,userInfo){
@@ -20,6 +23,7 @@ function initMenu(data,userInfo){
   //用户数据填充
   $("#userName").text(userInfo.linkman);
   //菜单收起展开
+  $(".menu .page").eq(0).addClass("active")
   $(".list-1").on("click",function(){
     $(".list-1 .slide-up").removeClass('slide-up');
     $(this).toggleClass('slide-up');
@@ -53,19 +57,19 @@ function sureChangeWord(){
     let newword = $(".newword").val().trim()
     let sureword = $(".sureword").val().trim()
     if(!oldword){
-      $(".modalAction .waring").css('display','block').find("i").html('请输入原始密码')
+      $(".modalAction .waring i").html('请输入原密码')
       return
     }else if(!newword){
-      $(".modalAction .waring").css('display','block').find("i").html('请输入新密码')
+      $(".modalAction .waring i").html('请输入新密码')
       return
     }else if(!sureword){
-      $(".modalAction .waring").css('display','block').find("i").html('请再次输入新密码')
+      $(".modalAction .waring i").html('请确认新密码')
       return
-    }
-    if(newword != sureword){
-      $(".modalAction .waring").css('display','block').find("i").html('两次密码不一致')
+    }else if(newword != sureword){
+      $(".modalAction .waring i").html('两次密码不一致')
       return
     }
+    $(".modalAction .waring i").html('')
     changeWord(oldword,newword)
   })
 }
@@ -78,13 +82,13 @@ function changeWord(oldword,newword){
     if(data.code==='0'){
       window.location.href = './login.html'
     }else{
-      $(".modalAction .waring").css('display','block').find("i").html(data.msg)
+      $(".oldWaring").html(data.msg)
       return
     }
   });
 }
 //用户信息下拉事件
-$(".setting").click(function(){
+$(".login").click(function(){
   $(".userAction").slideToggle();
 })
 //点击修改密码
@@ -98,7 +102,7 @@ $(".container").on('click','#changeWord',function(){
     sureText:'保存',
     message:`
     <div class="modalAction">
-      <p><span>原密码:</span><input type="text" placeholder="请输入原密码" class="oldword" autocomplete="off"></p>
+      <p><span>原密码:</span><input type="text" placeholder="请输入原密码" class="oldword" autocomplete="off"><i class="oldWaring"></i></p>
       <p><span>新密码:</span><input type="text" placeholder="请输入新密码" class="newword" autocomplete="off"></p>
       <p><span>确认新密码:</span><input type="text" placeholder="请输入新密码" class="sureword" autocomplete="off"></p>
       <p class="waring"><span></span><i></i></p>

+ 174 - 0
src/js/maps.js

@@ -0,0 +1,174 @@
+const keyMaps= {
+  "入院记录": {
+    "本人姓名":"姓名",
+    "职业":"职业",
+    "性别":"性别",
+    "工作场所":"工作单位",
+    "生日":"出生日期",
+    "地址":"户口地址",
+    "婚姻状况":"婚姻",
+    "本人电话":"电话",
+    "出生地址":"出生地",
+    "入病房时间":"入病房时间",
+    "民族":"民族",
+    "联系人":"病史陈述者",
+    "主诉":"主诉",
+    "现病史":"现病史",
+    "一般健康状况":"一般健康状况",
+    "内科疾病史(其它)":"内科疾病史",
+    "手术外伤史":"手术外伤史",
+    "输血史":"输血史",
+    "药物食物中毒史":"药物、食物中毒史",
+    "传染病史":"传染病史",
+    "长期用药":"长期用药情况(包括可能成瘾的药物)",
+    "抗凝药物情况":"最近一周使用抗凝药物情况",
+    "过敏史":"过敏史(包括食物和药物)",
+    "个人史":"个人史",
+    "出生、生长史":"出生、生长史",
+    "冶游史":"冶游史",
+    "化学及放射性毒物接触史":"化学或放射性毒物接触史",
+    "个人史":"个人习惯史",
+    "婚姻、月经及生育史":"婚姻史",
+    "婚姻状况":"婚姻状况",
+    "结婚年龄":"结婚年龄",
+    "婚姻家庭关系和睦":"婚姻家庭关系和睦",
+    "子女健康状况":"子女健康状况",
+    "配偶健康状况":"配偶健康状况",
+    "家族史":"家族史",
+    "家庭成员类似病史":"家庭成员类似病史",
+    "家庭成员健康情况":"家庭成员健康、疾病及死亡情况",
+    "传染病史":"两系三代内传染性疾病、遗传性疾病或遗传",
+    //"":"倾向性疾病",
+    //"":"体格检查",
+    "生命体征":"生命体征",
+    "一般情况":"一般情况",
+    "专科检查":"专科检查",
+    "辅助检查结果":"辅助检查",
+    "实验室检查":"实验室检查",
+    "影像学检查":"影像学检查",
+    "初步诊断":"初步诊断",
+    "修正诊断":"修正诊断",
+    "补充诊断":"补充诊断",
+    //"":"记录医师",
+    "记录日期":"记录日期及时间",
+    /*"":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",
+    "":"",*/
+  },
+  "出院小结":{
+    "本人姓名":"姓名",
+    "性别":"性别",
+    "科别":"科别",
+    "床号":"床号",
+    "病历号":"病案号",
+    "入病房时间":"入院时间",
+    "年龄":"年龄",
+    "出院时间":"出院时间",
+    "实际住院天数":"住院天数",
+    "主诊医生":"医疗组长",
+    "入院诊断":"入院诊断",
+    "入病房时间":"入病房时间",
+    "主诉":"入院情况",
+    "体格检查":"体格检查",
+    "诊治经过":"住院诊治经过(包括重要发现和结论,接受的药物和其他治疗)",
+    "出院时情况":"出院时情况(症状与体征)",
+    "出院状态":"出院状态",
+    "出院后去处":"出院去向",
+    "出院医嘱":"出院带药",
+    "手术外伤史":"健康教育(包括饮食指导)",
+    "随访复访安排":"随访计划(复诊安排)",
+    "医生":"医生签名",
+    "病历日期":"记录日期",
+  },
+  "病案首页":{
+    "医疗付费方式":"医疗付费方式",
+    "医疗机构名称":"医疗机构",
+    "健康卡号":"健康卡号",
+    "病案号":"病案号",
+    "本人姓名":"姓名",
+    "性别":"性别",
+    "生日":"出生日期",
+    "年龄":"年龄",
+    "国籍":"国籍",
+    "年龄单位":"(年龄不足1周岁的)年龄",
+    "新生儿出生体重":"新生儿出生体重",
+    "新生儿入院体重":"新生儿入院体重",
+    "户口地址":"出生地",
+    "籍贯":"籍贯",
+    "民族":"民族",
+    "身份证号":"身份证号",
+    "职业":"职业",
+    "婚姻":"婚姻",
+    "现住址":"现住址",
+    "本人电话":"电话",
+    "现住址邮编":"邮编",
+    "户口地址":"户口地址",
+    "户口地址邮编":"邮编",
+    "工作单位":"工作单位及地址",
+    "工作单位电话":"单位电话",
+    "工作单位邮编":"邮编",
+    "联系人姓名":"联系人姓名",
+    "联系人关系":"关系",
+    "联系人地址":"地址",
+    "联系人电话":"电话",
+    "入院途径":"入院途径",
+    "冶游史":"冶游史",
+    "入院时间":"入院时间",
+    "入院科别":"入院科别",
+    "入院床位号码":"病床",
+    "转科科别":"转科科别",
+    "出院时间":"出院时间",
+    "婚姻家庭关系和睦":"出院科别",
+    "出院床位号码":"病床",
+    "实际住院天数":"实际住院",
+    "门急诊诊断":"门(急)诊诊断",
+    "出院诊断":"出院诊断",
+    "门急诊诊断编码":"疾病编码",
+    "损伤中毒因素":"损伤、中毒的外部原因",
+    "损伤中毒因素编码":"疾病编码",
+    "病理诊断":"病理诊断",
+    "病理诊断编码":"疾病编码",
+    "病理号":"病理号",
+    "药物过敏":"药物过敏",
+    "过敏药物":"过敏药物",
+    "死亡患者尸检":"死亡患者尸检",
+    "血型":"血型",
+    "Rh":"Rh",
+    "科主任":"科主任",
+    "主诊医生":"主任(副主任)医师",
+    "主治医师":"主治医师",
+    "住院医师":"住院医师",
+    "责任护士":"责任护士",
+    "进修医师":"进修医师",
+    "质控护士":"质控护士",
+    "质控日期":"质控日期",
+    "手术及操作编码":"手术信息",
+    "离院方式":"离院方式",
+    "拟接收医疗机构名称":"拟接收医疗机构名称",
+    "31天内再住院计划":"是否有出院31天内再住院计划",
+    "再住院目的":"目的",
+    "颅脑损伤患者昏迷前分钟":"颅脑损伤患者昏迷时间",
+    "总费用":"住院费用(元)",
+  },
+};
+
+module.exports ={
+  keyMaps
+};

+ 1 - 1
src/js/modal.js

@@ -1,7 +1,7 @@
 const jQuery = require('jquery');
 
 (function ($) {
-    let close = require("../images/wordClose.png")
+    let close = require("../images/icon_close_default.png")
     let loadingImg = require("../images/loading.gif")
     $.alerModal = function (options) {
         var dft = {

+ 33 - 3
src/js/qcScore.js

@@ -3,6 +3,7 @@ const $ = require('jquery');
 require('jquery-templates');
 require('./modal.js');
 const {api,post,getUrlArgObject,setBoxHeight} = require('./utils.js');
+const {keyMaps} = require('./maps.js');
 //本页全局变量
 let global_flawData = {};    //缺陷数据
 const global_id=getUrlArgObject("id");
@@ -56,7 +57,7 @@ function getRecordDetail(){
       const {beHospital,result,msg} = data;
       const info=Object.assign(beHospital,result);
       initMenu(JSON.parse(result.menuData));
-      $(".sub-menu li:first-child.page").addClass("active");
+      $(".sub-menu>ul>li:first-child.page").addClass("active");
      global_activeTab=$(".sub-menu .page.active").attr("code");
       initPatientInfo(info);
       initContent(result.pageData);
@@ -77,13 +78,29 @@ function initPatientInfo(data){
 //显示病例模块明细
 function initContent(data){
   const obj = JSON.parse(data);
+  //formatData(obj['入院记录'])
+  let info=[];//formatData(obj['入院记录']);
   for(let k in obj){
-    $("#contentTmpl").tmpl({title:k,info:obj[k]}).appendTo("#contentInfo");
+    info=formatData(obj[k],k);
+    $("#contentTmpl").tmpl({title:k,info:info}).appendTo("#contentInfo");
   }
   $(".content-item[code="+global_activeTab+"]").show();
   console.log(obj)
 }
 
+function formatData(data,title){
+  if(!keyMaps[title]){
+    return data;
+  }
+  const keyArr=Object.keys(keyMaps[title]);
+  let obj={};
+  keyArr.map((k)=>{
+    obj[keyMaps[title][k]]=data[0][k]||"";
+  });
+  const obj1=Object.assign({},obj,data[0]);
+  return [obj1];
+}
+
 //评分项数据填充
 function initScoreItem(data){
   $("#flaws .flaw-box").html("");
@@ -146,17 +163,30 @@ function editScore(info){
 function showModal(flag,code,i){
   $("#delModal .modal-body").html("");
   $("#delModal").show();
+  //事件解绑
   $("#delModal .confirm").off("click");
-  $("#qcScore").off("input");
+  $("#qcScore,#qcMsg").off("input");
   const info = global_flawData[global_activeTab][i];
   if(flag==='0'){   //修改
     $("#delModal .title").text("修改评分");
     $("#editTmpl").tmpl(info).appendTo("#delModal .modal-body");
+    //分数输入验证
     $("#qcScore").on("input",function(){
       const val=$(this).val();
       if(/^[0-9]\d*$|^[0-9]\d*(.\d)?$/.test(val)){
         $(".edit-box .warning").hide();
       }else{
+        $(".edit-box .warning .red").text("支持≥0的数字输入,最多保留小数点后1位~");
+        $(".edit-box .warning").show();
+      }
+    });
+    //提示信息输入验证
+    $("#qcMsg").on("input",function(){
+      const val=$(this).val();
+      if(val.trim()){
+        $(".edit-box .warning").hide();
+      }else{
+        $(".edit-box .warning .red").text("提示信息不能为空~");
         $(".edit-box .warning").show();
       }
     });

+ 3 - 75
src/js/utils.js

@@ -65,6 +65,9 @@ const getUrlArgObject = function getQueryString(name) {
 
 const post = function (url, data) {
   const token = getCookie('accessToken')
+  if(!token&&window.location.href.indexOf('login')==-1){
+    window.location.href = "../login.html"
+  }
   return new Utils((resolve, reject) => {
     $.ajax({
       method: 'post',
@@ -139,80 +142,6 @@ $(window).resize(function(){
   setBoxHeight();
 });
 
-const keyMaps = {
-  "本人姓名":"姓名",
-  "职业":"职业",
-  "性别":"性别",
-  "床号":"工作单位",
-  "生日":"出生日期",
-  "地址":"户口地址",
-  "婚姻状况":"婚姻",
-  "本人电话":"电话",
-  "出生地址":"出生地",
-  "入病房时间":"入病房时间",
-  "民族":"民族",
-  //"":"病史陈述者",
-  "主诉":"主诉",
-  "现病史":"现病史",
-  "一般健康状况":"一般健康状况",
-  "内科疾病史(其它)":"内科疾病史",
-  "手术外伤史":"手术外伤史",
-  "输血史":"输血史",
-  "药物食物中毒史":"药物、食物中毒史",
-  "传染病史":"传染病史",
-  "长期用药":"长期用药情况(包括可能成瘾的药物)",
-  "抗凝药物情况":"最近一周使用抗凝药物情况",
-  "过敏史":"过敏史(包括食物和药物)",
-  "个人史":"个人史",
-  "出生、生长史":"出生、生长史",
-  "冶游史":"冶游史",
-  "化学及放射性毒物接触史":"化学或放射性毒物接触史",
-  "个人史":"个人习惯史",
-  "婚姻、月经及生育史":"婚姻史",
-  "婚姻状况":"婚姻状况",
-  "结婚年龄":"结婚年龄",
-  "婚姻家庭关系和睦":"婚姻家庭关系和睦",
-  "子女健康状况":"子女健康状况",
-  "配偶健康状况":"配偶健康状况",
-  "家族史":"家族史",
-  "家庭成员类似病史":"家庭成员类似病史",
-  "家庭成员健康情况":"家庭成员健康、疾病及死亡情况",
-  "传染病史":"两系三代内传染性疾病、遗传性疾病或遗传",
-  //"":"倾向性疾病",
-  //"":"体格检查",
-  "生命体征":"生命体征",
-  "一般情况":"一般情况",
-  "专科检查":"专科检查",
-  "辅助检查结果":"辅助检查",
-  "实验室检查":"实验室检查",
-  "影像学检查":"影像学检查",
-  "初步诊断":"初步诊断",
-  "修正诊断":"修正诊断",
-  "补充诊断":"补充诊断",
-  //"":"记录医师",
-  "记录日期":"记录日期及时间",
-  /*"":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",
-  "":"",*/
-};
-
 module.exports = {
   pageMap,
   api,
@@ -223,5 +152,4 @@ module.exports = {
   getCookie,
   delCookie,
   setBoxHeight,
-  keyMaps
 };

+ 1 - 1
webpack.config.js

@@ -6,7 +6,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const CopyWebpackPlugin = require('copy-webpack-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-const proxyHost = "http://192.168.2.236:5858";
+const proxyHost = "http://192.168.2.241:5858";
 module.exports = {
   entry: {
     index: path.resolve(__dirname, 'src/js', 'index.js'),