Browse Source

Merge remote-tracking branch 'origin/test' into qc_zn

zhouna 5 years ago
parent
commit
3d460466e6

+ 4 - 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;
@@ -218,6 +219,8 @@
   left: 50%;
   padding-right: 30px;
   box-sizing: border-box;
+  max-height: 300px;
+  overflow: auto;
   table {
     width: 100%;
   }

+ 60 - 5
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;
     }
   }
 }
@@ -220,8 +231,8 @@
     left: 50%;
     top: 50%;
     width: 400px;
-    height:208px;
-    margin: -104px 0 0 -200px;
+    height:256px;
+    margin: -128px 0 0 -200px;
     background: #fff;
     border-radius:4px;
   }
@@ -237,6 +248,8 @@
   .itemMsgInfoBox{
     line-height: 40px;
     margin: 0 0 10px 0;
+    position: relative;
+    top: 10px;
   }
   .itemInfoRight{
     display: inline-block;
@@ -263,11 +276,18 @@
     right: 0;
     cursor: pointer;
   }
- 
+  .itemMsgInfoTips{
+    color: red;
+    font-size: 14px;
+    text-align: center;
+    display: none;
+    position: absolute;
+    width: 100%;
+  }
   .midifyMsgBtn{
     position: relative;
     text-align: center;
-    top: 15px;
+    top: 36px;
   }
   .midifyEdit{
     display: inline-block;
@@ -333,6 +353,12 @@
     text-align: right;
     color: #777;
   }
+  .itemMsgInfoTips{
+    color: red;
+    font-size: 14px;
+    text-align: center;
+    display: none;
+  }
   .switchImg{
     position: relative;
     top: 2px;
@@ -355,6 +381,35 @@
     cursor: pointer;
   }
 }
+.dialogBox{
+  .dialogBoxMask{
+    width: 100%;
+    height: 100%;
+    position: absolute;
+    background: #000;
+    opacity: 0.5;
+    z-index: 1;
+    border-radius: 10px;
+  }
+  .dialogBoxMsg{
+    position: absolute;
+    z-index: 2;
+    width: 100%;
+    height: 100%;
+    color: #fff;
+    text-align: center;
+    line-height: 50px;
+  }
+  position: fixed;
+  left: 50%;
+  top: 50%;
+  width: 200px;
+  height: 50px;
+  margin: -25px 0 0 -100px;
+  text-align: center;
+  line-height: 50px;
+  border-radius: 10px;
+}
 .mask {
   position: fixed;
   width: 100%;

+ 2 - 0
src/css/itemManager.less

@@ -71,6 +71,7 @@ table{
     display: none;
     border: 1px solid #e4e7ed;
     box-shadow: 0 2px 12px 0 #e4e7ed;
+    z-index: 2;
     li{
         padding: 0 10px;
     }
@@ -133,6 +134,7 @@ table{
     line-height: 36px;
     position: relative;
     top: -1px;
+    cursor: pointer;
 }
 .editItem{
    color: #5A8EEE;

+ 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;

+ 2 - 1
src/css/qcList.less

@@ -123,6 +123,7 @@ table{
     line-height: 36px;
     position: relative;
     top: 2px;
+    cursor: pointer;
 }
 .iconCheck{
     width: 14px;
@@ -156,7 +157,7 @@ table{
 .iconCalen{
     position: absolute;
     width: 15px;
-    top: 15px;
+    top: 12px;
     right: 10px;
 }
 .textCenter{

+ 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;
+}

+ 1 - 1
src/html/itemManager.html

@@ -22,7 +22,7 @@
                 <span class="filterItem">
                     <span>条目名称:</span>
                     <span class="">
-                        <input class="moduleItemInp" type="text" placeholder="请输入质控条目名称">
+                        <input class="moduleItemInp" type="text" placeholder="请输入条目名称">
                     </span>
                 </span>
                 <span class="filterItem">

+ 3 - 2
src/html/login.html

@@ -11,17 +11,18 @@
     <div class="logoTop">
       <img src="../images/lantone.png" alt="">
       <span></span>
-      <i>AI病质控平台</i>
+      <i>AI病质控平台</i>
     </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>

+ 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>

+ 32 - 13
src/js/itemManager.js

@@ -9,7 +9,7 @@ const iconDown= require("./../images/arrow_down.png")
 const iconUp = require("./../images/arrow_up.png")
 const arrowLeft= require("./../images/arrow_left.png")
 const arrowRight = require("./../images/arrow_right.png")
-let casesId="", name="", isReject ="", isUsed =""
+let casesId="", name="", isReject ="", isUsed ="",casesIdTemp="", nameTemp="", isRejectTemp ="", isUsedTemp =""
 $(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 $(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 $(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
@@ -42,9 +42,10 @@ function getTabData(activePage){
 }
 $(".moduleItemInp").on("input", function(e){
     const val = $(this).val().trim()
-    name = val
+    nameTemp = val
 })
 $(".filter").on("click", function(e){
+    casesId=casesIdTemp, name=nameTemp, isReject =isRejectTemp, isUsed =isUsedTemp
     getTabData(1)
 })
 $('.selectModuleType').on("click", function(e){
@@ -136,14 +137,14 @@ function editItem(item,activePage){
             <div class="itemMsgContent">
                 <p class="itemMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
                 <div class="itemMsgContentBox">
-                    <div class="itemMsgInfoBox"><span class="itemMsgLab">模块类别:</span> <span class="itemInfoRight">${itemCpoy.casesName}</span></div>
-                    <div class="itemMsgInfoBox"><span class="itemMsgLab">质控条目名称:</span> <span class="itemInfoRight"> ${itemCpoy.name}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">模块名称:</span> <span class="itemInfoRight">${itemCpoy.casesName}</span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">条目名称:</span> <span class="itemInfoRight"> ${itemCpoy.name}</span></div>
                     <div class="itemMsgInfoBox"><span class="itemMsgLab">提示信息:</span> <span class="itemInfoRight"> <input class="itemTipMsg" value=${itemCpoy.msg} /></span></div>
-                    <div class="itemMsgInfoBox"><span class="itemMsgLab">分值:</span> <span class="itemInfoRight"> <input class="itemScore"  type="number" value=${itemCpoy.score} /></span></div>
+                    <div class="itemMsgInfoBox"><span class="itemMsgLab">分值:</span> <span class="itemInfoRight"> <input class="itemScore" type="number" min="0" value=${itemCpoy.score} /></span></div>
                     <div class="itemMsgInfoBox"><span class="itemMsgLab">单项否决:</span><span class="itemInfoRight itemReject">${item.isReject == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</span></div>
                     <div class="itemMsgInfoBox"><span class="itemMsgLab">启用:</span><span class=" temInfoRight itemUsed">${item.isUsed == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</span></div>
                 </div>
-                
+                <div  class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</div>
                 <div class="confirmEditBox"><span class="confirmEdit">保存</span></div>
             </div>
         </div>
@@ -154,9 +155,12 @@ function editItem(item,activePage){
         $("#mainBox .itemMsgBox", parent.document).remove()
     })
     $("#mainBox .itemMsgBox .itemTipMsg", parent.document).on("input", function(e){
-        const val = $(this).val()
+        const val = $(this).val().trim()
         itemCpoy.msg = val
     })
+    $("#mainBox .itemMsgBox .itemScore", parent.document).on("keypress", function(e){
+        return (/[0-9\.]/.test(String.fromCharCode(e.keyCode)))
+    })
     $("#mainBox .itemMsgBox .itemScore", parent.document).on("input", function(e){
         const val = $(this).val()
         itemCpoy.score = val
@@ -173,8 +177,18 @@ function editItem(item,activePage){
     })
     
     $("#mainBox .itemMsgBox .confirmEdit", parent.document).on("click", function(){
-        saveEdit(itemCpoy,activePage)
-        $('#mainBox .itemMsgBox', parent.document).remove()
+        var reg = new RegExp(/^\d+(\.\d)?$/);
+        if(reg.test(itemCpoy.score)){
+            saveEdit(itemCpoy,activePage)
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","none")
+            $('#mainBox .itemMsgBox', parent.document).remove()
+            return 
+        }else{
+            $("#mainBox .itemMsgBox .itemMsgInfoTips", parent.document).css("display","block")
+            
+            return
+        }
+      
     })
    
     
@@ -193,7 +207,7 @@ function saveEdit(item,activePage){
     post(api.updataQcCasesEntry,param).then(res =>{
         if(res.data.code == '0'){
             const data = res.data.data
-            getTabData(activePage)
+            getTabData(1)
         }else{}
     }).catch((e) =>{
     
@@ -227,8 +241,10 @@ function bindModuleTypeSelect(){
     $('.modeTypeItem').on("click",function(){
         const modeTypeItemName = $(this).attr("data-name")
         const modeTypeItemId = $(this).attr("data-id")
-        casesId=modeTypeItemId
+        casesIdTemp =modeTypeItemId
         $('.selectModuleType').html(modeTypeItemName)
+        $(".selectModuleType").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
         $(".moduleTypeList ").css("display", "none")
     })
 }
@@ -237,9 +253,11 @@ function bindRejectSelect(){
     $('.rejectItem').on("click",function(){
         const rejectItemName = $(this).attr("data-name")
         const rejectItemId = $(this).attr("data-id")
-        isReject=rejectItemId
+        isRejectTemp=rejectItemId
         $('.selectReject').html(rejectItemName)
         $(".rejectList ").css("display", "none")
+        $(".selectReject").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
     })
 }
 //是否启用选择
@@ -247,9 +265,10 @@ function bindUsedSelect(){
     $('.usedItem').on("click",function(){
         const usedItemName = $(this).attr("data-name")
         const usedItemItemId = $(this).attr("data-id")
-        isUsed=usedItemItemId
+        isUsedTemp =usedItemItemId
         $('.selectUsed').html(usedItemName)
         $(".usedList").css("display", "none")
+        $(".selectUsed").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
     })
 }
 

+ 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 = {

+ 17 - 3
src/js/moduleManager.js

@@ -105,7 +105,8 @@ function midifyMsgBox(item){
         <div class="midifyMsgContent">
             <p class="midifyMsgTitle">修改 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
             <div class="itemMsgInfoBox"><span class="itemMsgLab">模块名称:</span> <span class="itemInfoRight">${itemCopy.name}</span></div>
-            <div class="itemMsgInfoBox"><span class="itemMsgLab">分值:</span> <span class="itemInfoRight"> <input class="itemScore" type="number" value=${itemCopy.score} /></span></div>
+            <div class="itemMsgInfoBox"><span class="itemMsgLab">分值:</span> <span class="itemInfoRight"> <input class="itemScore" type="number" min="0" value=${itemCopy.score} /></span></div>
+            <div  class="itemMsgInfoTips">支持≥0的数字输入,最多保留小数点后1位~</div>
             <div class="midifyMsgBtn">
                 <span class="midifyEdit">保存</span>
             </div>
@@ -115,13 +116,26 @@ function midifyMsgBox(item){
     $("#mainBox .midifyMsgBox .iconClose", parent.document).on("click", function(e){
         $("#mainBox .midifyMsgBox", parent.document).remove()
     })
+    $("#mainBox .midifyMsgBox .itemScore", parent.document).on("keypress", function(event){
+        return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))
+     })
     $("#mainBox .midifyMsgBox .itemScore", parent.document).on("input", function(e){
        const val = $(this).val()
        itemCopy.score = val
-    
     })
     $("#mainBox .midifyMsgBox .midifyEdit", parent.document).on("click", function(e){
-        saveModifyOne(itemCopy)
+        var reg = new RegExp(/^\d+(\.\d)?$/);
+        if(reg.test(itemCopy.score)){
+            saveModifyOne(itemCopy)
+            $("#mainBox .midifyMsgBox .itemMsgInfoTips", parent.document).css("display","none")
+            $("#mainBox .midifyMsgBox", parent.document).remove()
+            return 
+        }else{
+            $("#mainBox .midifyMsgBox .itemMsgInfoTips", parent.document).css("display","block")
+            
+            return
+        }
+        
         $("#mainBox .midifyMsgBox", parent.document).remove()
     })
 }

+ 32 - 6
src/js/qcList.js

@@ -15,7 +15,7 @@ const loadingImg = require("./../images/loading.gif")
 const arrowLeft= require("./../images/arrow_left.png")
 const arrowRight = require("./../images/arrow_right.png")
 
-let tabList = [], name = "", fileCode="", leaveHosDateStart="", leaveHosDateEnd="", scoreSum = 0
+let tabList = [], name = "", fileCode="", leaveHosDateStart="", leaveHosDateEnd="", scoreSum = 0,nameTemp = "", fileCodeTemp=""
 
 $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
 $('.iconCalen').on("mouseenter", function(e){
@@ -58,6 +58,14 @@ getTabData(1)
 $(".filter").on("click", function(e){
     leaveHosDateStart = $("#datepicker").val().trim()
     leaveHosDateEnd = $("#datepicker2").val().trim()
+    if(leaveHosDateStart){
+        leaveHosDateStart = leaveHosDateStart.replace(/\//g,'-') + ' 00:00:00'
+    }
+    if(leaveHosDateEnd){
+        leaveHosDateEnd = leaveHosDateEnd.replace(/\//g,'-') + ' 23:59:59'
+    }
+    name = nameTemp
+    fileCode = fileCodeTemp
     getTabData(1)
 })
 function renderTab(data){
@@ -104,14 +112,15 @@ function renderTab(data){
     bindScoreDetail()
 }
 
-function scoreDetail(id){
-    window.open(`./qcScore.html?id=${id}`)
+function scoreDetail(id,age){
+    window.open(`./qcScore.html?id=${id}&age=${age}`)
 }
 function bindScoreDetail(){
     $('.patientNameSpan').on('click',function(e){
         const index = $(this).attr("data-index")
         const id = tabList[index].behospitalCode
-        scoreDetail(id)
+        const age = tabList[index].age
+        scoreDetail(id,age)
     })
 }
 
@@ -157,6 +166,19 @@ function loading(){
     `
     $("#mainBox", parent.document).append(str)
 }
+function dialog(msg){
+    const str = `
+    <div class="dialogBox">
+            <div class="dialogBoxMask"></div>
+            <p class="dialogBoxMsg"> ${msg}</p>
+           
+    </div>
+    `
+    $("#mainBox", parent.document).append(str)
+}
+function removeDialog(){
+    $("#mainBox .dialogBox", parent.document).remove()
+}
 function hideLoading(){
     $("#mainBox .loadingBox", parent.document).remove()
 }
@@ -168,6 +190,10 @@ $('.recordScoreBtn').on("click",function(e){
         }
     }
     if(scoreList.length === 0){
+        dialog('请选择要评分的项!')
+        setTimeout(function(){
+            removeDialog()
+        },2000)
         return
     } else{
         loading()
@@ -198,11 +224,11 @@ function recordScore(behospitalCode,totalNum){
 }
 $(".patientNumInp").on("input", function(e){
     const val = $(this).val().trim()
-    fileCode = val
+    fileCodeTemp = val
 })
 $(".patientNameInp").on("input", function(e){
     const val = $(this).val().trim()
-    name = val
+    nameTemp = val
 })
 
 $(function() {

+ 3 - 1
src/js/qcScore.js

@@ -4,9 +4,11 @@ require('jquery-templates');
 require('./modal.js');
 const {api,post,getUrlArgObject,setBoxHeight} = require('./utils.js');
 const {keyMaps} = require('./maps.js');
+const {wordRound} = require("./qcScore_byll.js")
 //本页全局变量
 let global_flawData = {};    //缺陷数据
 const global_id=getUrlArgObject("id");
+const global_age = getUrlArgObject("age");
 let global_activeTab=$(".sub-menu .page.active").attr("code");  //当前激活菜单项
 
 $(function(){
@@ -60,7 +62,7 @@ function getRecordDetail(){
 function initPatientInfo(data){
   const date = data.birthday.substr(0,10);
   const age=new Date(date).getTime()/(365*24*60*60*1000);
-  const obj=Object.assign({},data,{age:Math.floor(-age)});
+  const obj=Object.assign({},data,{age:global_age});
   $("#infoTmpl").tmpl(obj).appendTo("#patientInfo");
 }
 //显示病例模块明细

+ 7 - 0
src/js/qcScore_byll.js

@@ -0,0 +1,7 @@
+function wordRound(){
+    
+}
+
+module.exports = {
+    wordRound
+}

+ 3 - 0
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',

+ 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'),