Browse Source

质控评分

zhangxc 5 years ago
parent
commit
3f17509740
4 changed files with 147 additions and 171 deletions
  1. 0 52
      src/html/qcList.html
  2. 40 12
      src/html/qcScore.html
  3. 0 107
      src/js/qcList.js
  4. 107 0
      src/js/qcScore.js

+ 0 - 52
src/html/qcList.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>

+ 40 - 12
src/html/qcScore.html

@@ -1,24 +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>
-    <script type="text/html" id="infoTmpl">
-        <span>${number}</span>
-        <span>${name}</span>
-        <span>${sex}</span>
-        <span>${birthday}</span>
-        <span>${deptName}</span>
-        <span>${level}</span>
-        <span>${score}</span>
-    </script>
+    <title>病历质控评分</title>
+    
 </head>
+
 <body>
-    <div class="patient-info"></div>
-    <div class="main-part">
+    <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 - 107
src/js/qcList.js

@@ -1,107 +0,0 @@
-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) =>{
-    
-    })
-}
-

+ 107 - 0
src/js/qcScore.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) =>{
+    
+    })
+}
+