Browse Source

模块数据维护

zhangxc 5 years ago
parent
commit
129a81b022

+ 1 - 0
src/css/index.less

@@ -203,6 +203,7 @@
     text-align: center;
     background:rgba(90,142,238,1);
     border-radius:4px;
+    cursor: pointer;
   }
 }
 .mask {

+ 63 - 9
src/css/itemManager.less

@@ -1,5 +1,5 @@
 ul,li{
-    list-style: none;
+    padding:0;margin:0;list-style:none
 }
 h2{
     padding: 11px 20px;
@@ -7,11 +7,13 @@ h2{
     font-weight: 600;
     border-bottom: 1px solid #E2E5EF;
 }
+.main-body{
+    margin: 20px 40px;
+}
 table{
-    width: 1080px;
+    width: 100%;
     border:1px solid #E2E5EF;
     border-collapse: collapse;
-    margin: 40px 0 0 20px;
     thead{
         background: #EFF0F9;
        
@@ -28,38 +30,90 @@ table{
     }
     
 }
+.filterBox{
+    margin: 0 0 20px 0;
+}
 .filterItem{
     position: relative;
     display: inline-block;
     margin-right: 20px;
+    height: 40px;
+    line-height: 40px;
 }
 .filterDropList{
     position: absolute;
     right: 0;
+    height: 200px;
+    overflow-y: auto;
     background: #fff;
     display: none;
+    border: 1px solid #e4e7ed;
+    box-shadow: 0 2px 12px 0 #e4e7ed;
+    li{
+        padding: 0 10px;
+    }
+}
+.rejectList, .usedList{
+    height: 120px;
+    li{
+        padding: 0 10px;
+    }
+    li:hover{
+        background-color: #EEF4FF;
+        cursor: pointer;
+    }
 }
-.selectModuleType{
+.selectModuleType,.moduleItemInp,.selectUsed, .selectReject{
     display: inline-block;
-    width: 160px;
+    width:160px;
+    padding: 0 10px;
+    height:40px;
+    border-radius:4px;
+    border: 1px solid #E2E5EF;
+    box-sizing: border-box;
+    cursor: pointer;
+}
+.moduleItemInp{
+    cursor: default;
+    outline: none;
 }
 .moduleTypeList{
      width: 160px;
-    
 }
 .selectUsed, .selectReject{
-    display: inline-block;
     width: 120px;
 }
+.modeTypeItem:hover{
+    background-color: #EEF4FF;
+    cursor: pointer;
+}
 .rejectList, .usedList {
     width: 120px;
 }
+.filter{
+    display: inline-block;
+    width:60px;
+    height:36px;
+    background:#5A8EEE;
+    border-radius:4px;
+    color: #fff;
+    text-align: center;
+    line-height: 36px;
+}
+.editItem{
+   color: #5A8EEE
+}
 
-
+.ellipsis{
+    overflow: hidden;
+    text-overflow:ellipsis;
+    white-space: nowrap;
+}
 
 
 .pagination{
-    margin: 0 0 0 30px;
+    margin: 35px 0 0 0;
+    text-align: right;
 }
 .activePage{
     color: #5A8EEE;

+ 1 - 0
src/css/moduleManager.less

@@ -54,6 +54,7 @@ table{
     color:#fff;
     padding: 9px 16px;
     border-radius: 5px;
+    cursor: pointer;
 }
 .mask {
     position: fixed;

+ 53 - 48
src/html/itemManager.html

@@ -5,61 +5,66 @@
     <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>条目数据维护</title>
+    <title></title>
     
 </head>
 
 <body>
     <div class="container">
-        条目维护维护
-        <div class="filterBox">
-            <span class="filterItem typeFilter">
-                <span>类别名称:</span>
-                <span class="selectModuleType">全部</span>
-                <ul class="moduleTypeList filterDropList"></ul>
-            </span>
-            <span class="filterItem">
-                <span>条目名称:</span>
-                <span class="">
-                    <input class="moduleItemInp" type="text" placeholder="请输入质控条目名称">
+        <h2>条目数据维护</h2>
+        <div class="main-body">
+            <div class="filterBox">
+                <span class="filterItem typeFilter">
+                    <span>类别名称:</span>
+                    <span class="selectModuleType">全部</span>
+                    <ul class="moduleTypeList filterDropList"></ul>
                 </span>
-            </span>
-            <span class="filterItem">
-                <span>单项否决:</span>
-                <span class="selectReject">全部</span>
-                <ul class="rejectList filterDropList">
-                    <Li  class="rejectItem" data-name="全部" data-id="">全部</Li>
-                    <li  class="rejectItem" data-name="是" data-id=1>是</li>
-                    <li  class="rejectItem" data-name="否" data-id=0>否</li>
-                </ul>
-            </span>
-            <span class="filterItem">
-                <span>是否启用:</span>
-                <span class="selectUsed">全部</span>
-                <ul class="usedList filterDropList">
-                    <Li class="usedItem" data-name="全部" data-id="">全部</Li>
-                    <li class="usedItem" data-name="是" data-id=1>是</li>
-                    <li class="usedItem" data-name="否" data-id=0>否</li>
-                </ul>
-            </span>
-            <span class="filter">查询</span>
+                <span class="filterItem">
+                    <span>条目名称:</span>
+                    <span class="">
+                        <input class="moduleItemInp" type="text" placeholder="请输入质控条目名称">
+                    </span>
+                </span>
+                <span class="filterItem">
+                    <span>单项否决:</span>
+                    <span class="selectReject">全部</span>
+                    <ul class="rejectList filterDropList">
+                        <Li  class="rejectItem" data-name="全部" data-id="">全部</Li>
+                        <li  class="rejectItem" data-name="是" data-id=1>是</li>
+                        <li  class="rejectItem" data-name="否" data-id=0>否</li>
+                    </ul>
+                </span>
+                <span class="filterItem">
+                    <span>是否启用:</span>
+                    <span class="selectUsed">全部</span>
+                    <ul class="usedList filterDropList">
+                        <Li class="usedItem" data-name="全部" data-id="">全部</Li>
+                        <li class="usedItem" data-name="是" data-id=1>是</li>
+                        <li class="usedItem" data-name="否" data-id=0>否</li>
+                    </ul>
+                </span>
+                <span class="filter">查询</span>
+            </div>
+            <table>
+                <thead>
+                    <th class="moduleName">序号</th>
+                    <th class="moduleType">模块类别</th>
+                    <th class="moduleItemName">质控条目名称</th>
+                    <th class="moduleTipsMsg">提示信息</th>
+                    <th class="moduleScore">分值</th>
+                    <th class="moduleReject">单项否决等级</th>
+                    <th class="moduleUsed">启用</th>
+                    <th class="moduleOpera">操作</th>
+                </thead>
+                <tbody>
+    
+                </tbody>
+            </table>
+            <div class="pagination"></div>
         </div>
-        <table>
-            <thead>
-                <th class="moduleName">序号</th>
-                <th class="moduleType">模块类别</th>
-                <th class="moduleItemName">质控条目名称</th>
-                <th class="moduleTipsMsg">提示信息</th>
-                <th class="moduleScore">分值</th>
-                <th class="moduleReject">单项否决等级</th>
-                <th class="moduleUsed">启用</th>
-                <th class="moduleOpera">操作</th>
-            </thead>
-            <tbody>
-
-            </tbody>
-        </table>
-        <div class="pagination"></div>
+        
+        
+        
     </div>
 </body>
 

+ 52 - 0
src/html/qcList.html

@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <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>病历质控评分</title>
+    
+</head>
+
+<body>
+    <div class="container">
+        病历质控评分
+        <div class="filterBox">
+            <span class="filterItem typeFilter">
+                <span>输入搜索:</span>
+                <input class="moduleItemInp" type="text" placeholder="请输入病案号">
+                <input class="patientNameInp" type="text" placeholder="请输入病人姓名">
+            </span>
+            <span class="filterItem">
+                <span>出院日期</span>
+                <input type="text" id="datepicker">
+            </span>
+            
+            <span class="filter">查询</span>
+        </div>
+        <table>
+            <thead>
+                <th class="scoreOpera" data-selectAll=false>未选择</th>
+                <th class="beHospitalId">病历号</th>
+                <th class="patientNo">病案号</th>
+                <th class="patientName">病人姓名</th>
+                <th class="patientSex">性别</th>
+                <th class="patientage">年龄</th>
+                <th class="bedNum">床号</th>
+                <th class="inHospitalDate">入院日期</th>
+                <th class="outHospitalDate">出院日期</th>
+                <th class="doctorName">主治医生</th>
+                <th class="deptName">科室</th>
+                <th class="recordLevel">病历等级</th>
+                <th class="recordScore">病历得分</th>
+                <th class="scoreTime">评分时间</th>
+            </thead>
+            <tbody>
+
+            </tbody>
+        </table>
+    </div>
+</body>
+
+</html>

+ 0 - 52
src/html/qcScore.html

@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <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>病历质控评分</title>
-    
-</head>
-
-<body>
-    <div class="container">
-        病历质控评分
-        <div class="filterBox">
-            <span class="filterItem typeFilter">
-                <span>输入搜索:</span>
-                <input class="moduleItemInp" type="text" placeholder="请输入病案号">
-                <input class="patientNameInp" type="text" placeholder="请输入病人姓名">
-            </span>
-            <span class="filterItem">
-                <span>出院日期</span>
-                <input type="text" id="datepicker">
-            </span>
-            
-            <span class="filter">查询</span>
-        </div>
-        <table>
-            <thead>
-                <th class="scoreOpera" data-selectAll=false>未选择</th>
-                <th class="beHospitalId">病历号</th>
-                <th class="patientNo">病案号</th>
-                <th class="patientName">病人姓名</th>
-                <th class="patientSex">性别</th>
-                <th class="patientage">年龄</th>
-                <th class="bedNum">床号</th>
-                <th class="inHospitalDate">入院日期</th>
-                <th class="outHospitalDate">出院日期</th>
-                <th class="doctorName">主治医生</th>
-                <th class="deptName">科室</th>
-                <th class="recordLevel">病历等级</th>
-                <th class="recordScore">病历得分</th>
-                <th class="scoreTime">评分时间</th>
-            </thead>
-            <tbody>
-
-            </tbody>
-        </table>
-    </div>
-</body>
-
-</html>

+ 20 - 11
src/js/itemManager.js

@@ -3,7 +3,8 @@ require("../css/itemManager.less");
 require('./../resource/jquery-ui/jquery-ui.min.js');
 const {api} = require('./api.js')
 const {post} = require('./utils.js')
-
+const switchIconOpen = require("./../images/icon4.png")
+const switchIconClose = require("./../images/icon5.png")
 let casesId="", name="", isReject ="", isUsed =""
 
 //获取表格数据
@@ -21,7 +22,11 @@ function getTabData(activePage){
             const totalPage = res.data.data.pages
             const totalNum = res.data.data.total
             renderTab(data,activePage)
-            renderPagination(totalPage,activePage,totalNum)
+            if(totalPage > 1){
+                renderPagination(totalPage,activePage,totalNum)
+            } else{
+                $('.pagination').html("")
+            }
 
         }else{}
     }).catch((e) =>{
@@ -84,8 +89,8 @@ function renderTab(data,activePage){
                 <td>${item.name}</td>
                 <td>${item.msg}</td>
                 <td>${item.score}</td>
-                <td>${item.isReject}</td>
-                <td>${item.isUsed}</td>
+                <td>${item.isReject == '1' ? `<img src=${switchIconOpen} />`:`<img src=${switchIconClose} />`}</td>
+                <td>${item.isUsed == '1' ? `<img src=${switchIconOpen} />`:`<img src=${switchIconClose} />`}</td>
                 <td class="editItem">修改</td>
             </tr>
         `
@@ -107,11 +112,15 @@ function editItem(item,activePage){
     $('.pop-box').remove()
     $('.container').append('<div class="pop-box"></div>')
     const str = `
-        <div><span>提示信息:</span> <input class="itemTipMsg" value=${itemCpoy.msg} /></div>
-        <div><span>分值:</span> <input class="itemScore"  type="number" value=${itemCpoy.score} /></div>
-        <div><span>单项否决</span><span class="itemReject">${itemCpoy.isReject}</span></div>
-        <div><span>启用</span><span class="itemUsed">${itemCpoy.isUsed}</span></div>
-        <div class="confirmEdit">确定</div>
+        <div class="itemMsgBox">
+            <div class="mask"></div>
+            <div><span>提示信息:</span> <input class="itemTipMsg" value=${itemCpoy.msg} /></div>
+            <div><span>分值:</span> <input class="itemScore"  type="number" value=${itemCpoy.score} /></div>
+            <div><span>单项否决</span><span class="itemReject">${itemCpoy.isReject}</span></div>
+            <div><span>启用</span><span class="itemUsed">${itemCpoy.isUsed}</span></div>
+            <div class="confirmEdit">确定</div>
+        </div>
+       
     `
     $('.pop-box').html(str)
     $(".itemTipMsg").on("input", function(e){
@@ -175,9 +184,9 @@ function getmoduleTypeList(){
 
 
 function renderModuleTypeList(moduleTypeList){
-    let str = `<li class="modeTypeItem" data-id=" " data-name="全部">全部</li>`
+    let str = `<li class="modeTypeItem " data-id=" " data-name="全部">全部</li>`
     for(let i = 0; i < moduleTypeList.length; i++){
-        str += `<li class="modeTypeItem" data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
+        str += `<li class="modeTypeItem ellipsis" title=${moduleTypeList[i].name} data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
     }
     $('.moduleTypeList').html(str)
     bindModuleTypeSelect()

+ 107 - 0
src/js/qcList.js

@@ -0,0 +1,107 @@
+const $ = require('jquery');
+require("../css/qcList.less");
+// require("./../resource/My97DatePicker/WdatePicker.js")
+// require("./../resource/My97DatePicker/skin/WdatePicker.css")
+const {api} = require('./api.js')
+const {post} = require('./utils.js')
+
+let tabList
+
+function getTabData(){
+    const param = {
+        fileCode: "",
+        name: "", //条目名
+        behosDateStart: "", //1-单项否决 0-非
+        leaveHosDateEnd: "" //0-未启用 1-启用
+    }
+    post(api.qcList,param).then(res =>{
+        console.log('ress', res)
+        if(res.data.code == '0'){
+            tabList = res.data.data.records
+            renderTab(tabList)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+getTabData()
+function renderTab(data){
+    let str = ``
+    let hasSelectAll = true
+    for(let i = 0; i < data.length; i++){
+        const item = data[i]
+        if(!item.hasSelect){
+            hasSelectAll = false
+        }
+        str += `
+            <tr  data-index=${i}>
+                <td class="scoreOperaItem">${item.hasSelect ? '选择':'未选择'}</td>
+                <td>${item.behospitalCode}</td>
+                <td>${item.fileCode}</td>
+                <td>${item.name}</td>
+                <td>${item.sex}</td>
+                <td>${item.age}</td>
+                <td>${item.bedCode}</td>
+                <td>${item.behospitalDate}</td>
+                <td>${item.leaveHospitalDate}</td>
+                <td>${item.doctorName}</td>
+                <td>${item.behDeptName}</td>
+                <td>${item.level}</td>
+                <td>${item.scoreRes}</td>
+                <td>${item.gradeTime}</td>
+            </tr>
+        `
+    }
+    if(hasSelectAll){
+        $('.scoreOpera').html("选择")
+        $('.scoreOpera').attr("data-selectall",true)
+    }else{
+        $('.scoreOpera').html("未选择")
+        $('.scoreOpera').attr("data-selectall",false)
+    }
+    $('tbody').html(str)
+    bindScoreOperaItem()
+}
+//全选绑定
+bindOperaAll()
+function bindScoreOperaItem(){
+    $(".scoreOperaItem").on("click",  function(e){
+        const index = $(this).parent().attr("data-index")
+        console.log(index)
+        tabList[index].hasSelect = tabList[index].hasSelect ? false:true
+        renderTab(tabList)
+    })
+}
+
+function bindOperaAll(){
+    $('.scoreOpera').on("click", function(e){
+        const hasSelectAll = $('.scoreOpera').attr("data-selectall")
+        console.log('hasSelectAll',hasSelectAll)
+        if(hasSelectAll == 'true'){
+
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = false
+            }
+        }else{
+            for(let i = 0; i < tabList.length; i++){
+                tabList[i].hasSelect = true
+            }
+        }
+        renderTab(tabList)
+    })
+}
+
+function recordScore(behospitalCode){
+    const param = {
+        behospitalCode: behospitalCode
+    }
+    post(api.recordScore,param).then(res =>{
+        if(res.data.code == '0'){
+      
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+