Procházet zdrojové kódy

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

zhouna před 5 roky
rodič
revize
1bba500801

+ 69 - 0
src/css/index.less

@@ -201,6 +201,7 @@
     width: 40px;
     position: absolute;
     right: 0;
+    cursor: pointer;
   }
   .moduleMsgInfo{
     text-align: center;
@@ -224,6 +225,73 @@
     cursor: pointer;
   }
 }
+.midifyMsgBox{
+  .midifyMsgContent{
+    position: fixed;
+    left: 50%;
+    top: 50%;
+    width: 400px;
+    height:208px;
+    margin: -104px 0 0 -200px;
+    background: #fff;
+    border-radius:4px;
+  }
+  .midifyMsgTitle{
+    position: relative;
+    height: 40px;
+    padding: 0 0 0 20px;
+    line-height: 40px;
+    border-bottom: 1px solid #E2E5EF;
+    font-size: 14px;
+    color: #1E1E1E;
+  }
+  .itemMsgInfoBox{
+    line-height: 40px;
+    margin: 0 0 10px 0;
+  }
+  .itemInfoRight{
+    display: inline-block;
+    width: 190px;
+    input{
+      width: 100px;
+      box-sizing: border-box;
+      border:  1px solid #E2E5EF;
+      height: 40px;
+      line-height: 40px;
+      border-radius: 2px;
+      padding: 0 10px;
+    }
+  }
+  .itemMsgLab{
+    display: inline-block;
+    width: 180px;
+    text-align: right;
+    color: #777;
+  }
+  .iconClose{
+    width: 40px;
+    position: absolute;
+    right: 0;
+    cursor: pointer;
+  }
+ 
+  .midifyMsgBtn{
+    position: relative;
+    text-align: center;
+    top: 15px;
+  }
+  .midifyEdit{
+    display: inline-block;
+    color: #fff;
+    width:80px;
+    height:36px;
+    line-height: 36px;
+    text-align: center;
+    background:rgba(90,142,238,1);
+    border-radius:4px;
+    cursor: pointer;
+  }
+}
 .itemMsgBox{
   .itemMsgContent{
     position: fixed;
@@ -248,6 +316,7 @@
     width: 40px;
     position: absolute;
     right: 0;
+    cursor: pointer;
   }
   .itemMsgContentBox{
     margin: 20px 0 0 0;

+ 1 - 1
src/css/itemManager.less

@@ -132,7 +132,7 @@ table{
     text-align: center;
     line-height: 36px;
     position: relative;
-    top: -2px;
+    top: -1px;
 }
 .editItem{
    color: #5A8EEE;

+ 7 - 1
src/css/moduleManager.less

@@ -84,7 +84,13 @@ table{
     left: 0;
     top: 0;
 }
-
+.textCenter{
+    text-align: center;
+}
+.moduleOperaItem{
+    color: #5A8EEE;
+    cursor: pointer;
+}
 
 input::-webkit-outer-spin-button,
 input::-webkit-inner-spin-button {

+ 27 - 4
src/css/qcList.less

@@ -93,8 +93,14 @@ table{
     position: relative;
     display: inline-block;
     margin-right: 20px;
+    float: left;
     height: 40px;
     line-height: 40px;
+    span{
+        display: inline-block;
+        line-height: 40px;
+        position: relative;
+    }
     input{
         width:120px;
         height:40px;
@@ -103,6 +109,7 @@ table{
         outline: none;
         margin-right: 10px;
         padding: 0 10px;
+        box-sizing: border-box;
     }
 }
 .filter{
@@ -115,17 +122,33 @@ table{
     text-align: center;
     line-height: 36px;
     position: relative;
-    top: -2px;
+    top: 2px;
 }
 .iconCheck{
     width: 14px;
 }
+.fl{
+    float: left;
+}
+.clearfix:after {
+    content: '';
+    height: 0;
+    line-height: 0;
+    display: block;
+    visibility: hidden;
+    clear: both;
+}
+.clearfix{
+    zoom:1
+}
+.divide{
+    margin: 0 10px;
+}
 .datapickerBox{
     position: relative;
     display: inline-block;
-    width: 150px;
+    width: 120px;
     height: 40px;
-    top: 10px;
     input{
         position: absolute;
     }
@@ -134,7 +157,7 @@ table{
     position: absolute;
     width: 15px;
     top: 15px;
-    right: 20px;
+    right: 10px;
 }
 .textCenter{
     text-align: center;

+ 4 - 4
src/html/itemManager.html

@@ -15,7 +15,7 @@
         <div class="main-body">
             <div class="filterBox">
                 <span class="filterItem typeFilter">
-                    <span>类别名称:</span>
+                    <span>模块名称:</span>
                     <span class="selectModuleType">全部 </span>
                     <ul class="moduleTypeList filterDropList"></ul>
                 </span>
@@ -35,7 +35,7 @@
                     </ul>
                 </span>
                 <span class="filterItem">
-                    <span>是否启用:</span>
+                    <span>启用状态:</span>
                     <span class="selectUsed">全部</span>
                     <ul class="usedList filterDropList">
                         <Li class="usedItem" data-name="全部" data-id="">全部</Li>
@@ -48,8 +48,8 @@
             <table>
                 <thead>
                     <th class="moduleName">序号</th>
-                    <th class="moduleType">模块类别</th>
-                    <th class="moduleItemName">质控条目名称</th>
+                    <th class="moduleType">模块名称</th>
+                    <th class="moduleItemName">条目名称</th>
                     <th class="moduleTipsMsg">提示信息</th>
                     <th class="moduleScore">分值</th>
                     <th class="moduleReject">单项否决</th>

+ 4 - 3
src/html/moduleManager.html

@@ -19,7 +19,8 @@
                     <thead>
                         <th class="moduleNumber">序号</th>
                         <th class="moduleName">模块名称</th>
-                        <th class="moduleScore">分数</th>
+                        <th class="moduleScore">分值</th>
+                        <th class="moduleOpera">操作</th>
                     </thead>
                     <tbody>
 
@@ -27,9 +28,9 @@
                 </table>
            </div>
             
-            <div class="saveModuleBox">
+            <!-- <div class="saveModuleBox">
                 <span class="saveModule">保存</span>
-            </div>
+            </div> -->
             
        </div>
     </div>

+ 9 - 5
src/html/qcList.html

@@ -15,14 +15,18 @@
         <div class="main-body">
             <div class="filterBox">
                 <span class="filterItem typeFilter">
-                    <span>输入搜索:</span>
+                    <span>病案号:</span>
                     <input class="patientNumInp" type="text" placeholder="请输入病案号">
+                </span>
+                <span class="filterItem typeFilter">
+                    <span>病人姓名:</span>
                     <input class="patientNameInp" type="text" placeholder="请输入病人姓名">
                 </span>
-                <span class="filterItem">
-                    <span>出院日期</span>
-                    <span class="datapickerBox"><input type="text" id="datepicker" autocomplete="off" /></span> -
-                    <span class="datapickerBox"><input type="text" id="datepicker2"  autocomplete="off" /></span>
+                <span class="filterItem typeFilter clearfix">
+                    <span class="fl">出院日期:</span>
+                    <span class="datapickerBox fl"><input type="text" id="datepicker" autocomplete="off" /></span>
+                    <span  class="divide fl">-</span>
+                    <span class="datapickerBox fl"><input type="text" id="datepicker2"  autocomplete="off" /></span>
                 </span>
                 
                 <span class="filter">查询</span>

+ 3 - 3
src/js/itemManager.js

@@ -108,9 +108,9 @@ function renderTab(data,activePage){
                 <td>${item.name}</td>
                 <td>${item.msg}</td>
                 <td  class="textCenter">${item.score}</td>
-                <td  class="textCenter">${item.isReject == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</td>
-                <td class="textCenter">${item.isUsed == '1' ? `<img class="switchImg" src=${switchIconOpen} />`:`<img class="switchImg" src=${switchIconClose} />`}</td>
-                <td class="editItem">修改</td>
+                <td  class="textCenter">${item.isReject == '1' ? `是`:`否`}</td>
+                <td class="textCenter">${item.isUsed == '1' ? `是`:`否`}</td>
+                <td class="editItem textCenter">修改</td>
             </tr>
         `
     }

+ 104 - 48
src/js/moduleManager.js

@@ -58,10 +58,11 @@ function renderTab(){
     for(let i = 0; i < data.length; i++){
     
         str += `
-        <tr>
+        <tr data-index=${i}>
             <td class="moduleNumber">${i+1}</td>
             <td class="moduleName">${data[i].name}</td>
-            <td class="moduleScore"> <input type="number"  data-index=${i} value=${data[i].score} /></td>
+            <td class="moduleScore">${data[i].score}</td>
+            <td class="moduleOpera moduleOperaItem textCenter">修改</td>
         </tr>
         `
     }
@@ -73,8 +74,18 @@ function renderTab(){
     // </tr>
     // `
     $('table tbody').html(str)
-    bindInput()
+    // bindInput()
+    bindModuleOpera()
     getTotalSum()
+
+}
+
+function bindModuleOpera(){
+    $(".moduleOperaItem").on("click", function(e){
+        const index = $(this).parent().attr('data-index') 
+        const item = data[index]
+        midifyMsgBox(item)
+    })
 }
 function getTotalSum(){
     let sum = 0
@@ -86,57 +97,40 @@ function getTotalSum(){
     $('.totalSum').html(sum)
 }
 
-
-
-function bindInput(){
-    $('input').on('input', function(e){
-        const val = $(this).val()
-        const index = $(this).attr('data-index')
-        $(this).attr('value', val)
-        data[index].score = val 
-        getTotalSum(data)
-    })
-}
-let msgBox =`<div class="moduleMsgBox">
+  
+function midifyMsgBox(item){
+    const itemCopy = JSON.parse(JSON.stringify(item))
+    let msgBox =`<div class="midifyMsgBox">
         <div class="mask"></div>
-        <div class="moduleMsgContent">
-            <p class="moduleMsgTitle">提示 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
-            <p class="moduleMsgInfo">总分不是100分,是否继续</p>
-            <div class="moduleMsgBtn">
-                <span class="saveModuleEdit">保存</span>
+        <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="midifyMsgBtn">
+                <span class="midifyEdit">保存</span>
             </div>
         </div>
     </div>`
-
-$('.saveModule').on("click", function(){
-    const sum =  $('.totalSum').html()
-    if(sum != 100){
-        $("#mainBox", parent.document).append(msgBox)
-        $("#mainBox .moduleMsgBox .iconClose", parent.document).on("click", function(e){
-            $("#mainBox .moduleMsgBox", parent.document).remove()
-        })
-        $("#mainBox .moduleMsgBox .saveModuleEdit", parent.document).on("click", function(e){
-            saveModify()
-            $("#mainBox .moduleMsgBox", parent.document).remove()
-        })
-    }else{
-        saveModify()
-    }
-    
+    $("#mainBox", parent.document).append(msgBox)
+    $("#mainBox .midifyMsgBox .iconClose", parent.document).on("click", function(e){
+        $("#mainBox .midifyMsgBox", parent.document).remove()
+    })
+    $("#mainBox .midifyMsgBox .itemScore", parent.document).on("input", function(e){
+       const val = $(this).val()
+       itemCopy.score = val
     
-    // const sum =  $('.totalSum').html()
-    // if(sum != 100){
-    //     alert('满分不是100')
-    // }
-})
-function saveModify(){
+    })
+    $("#mainBox .midifyMsgBox .midifyEdit", parent.document).on("click", function(e){
+        saveModifyOne(itemCopy)
+        $("#mainBox .midifyMsgBox", parent.document).remove()
+    })
+}
+function saveModifyOne(item){
     const qcCasesSaveVOList = []
-    for(let i = 0; i < data.length; i++){
-        qcCasesSaveVOList.push({
-            id: data[i].id,
-            score: data[i].score,
-        })
-    }
+    qcCasesSaveVOList.push({
+        id: item.id,
+        score: item.score,
+    })
     post(api.saveQcCases, {qcCasesSaveVOList}).then(res =>{
         if(res.data.code == '0'){
             getTabData()
@@ -148,3 +142,65 @@ function saveModify(){
     
 }
 
+// function bindInput(){
+//     $('input').on('input', function(e){
+//         const val = $(this).val()
+//         const index = $(this).attr('data-index')
+//         $(this).attr('value', val)
+//         data[index].score = val 
+//         getTotalSum(data)
+//     })
+// }
+
+//下方保存保存全部
+// let msgBox =`<div class="moduleMsgBox">
+//         <div class="mask"></div>
+//         <div class="moduleMsgContent">
+//             <p class="moduleMsgTitle">提示 <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></p>
+//             <p class="moduleMsgInfo">总分不是100分,是否继续</p>
+//             <div class="moduleMsgBtn">
+//                 <span class="saveModuleEdit">保存</span>
+//             </div>
+//         </div>
+//     </div>`
+
+// $('.saveModule').on("click", function(){
+//     const sum =  $('.totalSum').html()
+//     if(sum != 100){
+//         $("#mainBox", parent.document).append(msgBox)
+//         $("#mainBox .moduleMsgBox .iconClose", parent.document).on("click", function(e){
+//             $("#mainBox .moduleMsgBox", parent.document).remove()
+//         })
+//         $("#mainBox .moduleMsgBox .saveModuleEdit", parent.document).on("click", function(e){
+//             saveModify()
+//             $("#mainBox .moduleMsgBox", parent.document).remove()
+//         })
+//     }else{
+//         saveModify()
+//     }
+    
+    
+    // const sum =  $('.totalSum').html()
+    // if(sum != 100){
+    //     alert('满分不是100')
+    // }
+// })
+// function saveModify(){
+//     const qcCasesSaveVOList = []
+//     for(let i = 0; i < data.length; i++){
+//         qcCasesSaveVOList.push({
+//             id: data[i].id,
+//             score: data[i].score,
+//         })
+//     }
+//     post(api.saveQcCases, {qcCasesSaveVOList}).then(res =>{
+//         if(res.data.code == '0'){
+//             getTabData()
+//         }else{}
+//     }).catch((e) =>{
+    
+//     })
+
+    
+// }
+