瀏覽代碼

科室和医生筛选

zhangxc 5 年之前
父節點
當前提交
bf7c2a099b
共有 5 個文件被更改,包括 65 次插入16 次删除
  1. 6 1
      src/css/qcList.less
  2. 8 0
      src/html/qcList.html
  3. 2 1
      src/js/api.js
  4. 48 13
      src/js/qcList.js
  5. 1 1
      webpack.config.js

+ 6 - 1
src/css/qcList.less

@@ -141,7 +141,7 @@ table{
         cursor: pointer;
         cursor: pointer;
     }
     }
 }
 }
-.selectLevel{
+.selectLevel,.selectDept{
     display: inline-block;
     display: inline-block;
     position: relative;
     position: relative;
     width:120px;
     width:120px;
@@ -215,6 +215,11 @@ table{
     cursor: pointer;
     cursor: pointer;
 }
 }
 
 
+.deptItem:hover{
+    background-color: #EEF4FF;
+    cursor: pointer;
+}
+
 
 
 
 
 .pagination{
 .pagination{

+ 8 - 0
src/html/qcList.html

@@ -18,6 +18,14 @@
                     <span>病历号:</span>
                     <span>病历号:</span>
                     <input class="patientNumInp" type="text" placeholder="请输入病历号">
                     <input class="patientNumInp" type="text" placeholder="请输入病历号">
                 </span>
                 </span>
+                <!-- <span class="filterItem typeFilter">
+                    <span>科室:</span>
+                    <span class="selectDept">全部 </span>
+                    <ul class="deptList filterDropList"></ul>
+                </span>
+                <span class="filterItem typeFilter">
+                    <span>医生:</span>
+                </span> -->
                 <span class="filterItem typeFilter">
                 <span class="filterItem typeFilter">
                     <span>病人姓名:</span>
                     <span>病人姓名:</span>
                     <input class="patientNameInp" type="text" placeholder="请输入病人姓名">
                     <input class="patientNameInp" type="text" placeholder="请输入病人姓名">

+ 2 - 1
src/js/api.js

@@ -6,7 +6,8 @@ const api = {
     updataQcCasesEntry: '/qc/casesEntryHospital/updataQcCasesEntry',
     updataQcCasesEntry: '/qc/casesEntryHospital/updataQcCasesEntry',
     qcList:'/qc/behospitalInfo/page',
     qcList:'/qc/behospitalInfo/page',
     saveQcCases:'/qc/cases/saveQcCases',
     saveQcCases:'/qc/cases/saveQcCases',
-    recordScore:'/qc/behospitalInfo/analyze'
+    recordScore:'/qc/behospitalInfo/analyze',
+    getDeptList:'/bas/dept/listForUser'
 }
 }
 module.exports = {
 module.exports = {
     api
     api

+ 48 - 13
src/js/qcList.js

@@ -16,6 +16,7 @@ const arrowLeft= require("./../images/arrow_left.png")
 const arrowRight = require("./../images/arrow_right.png")
 const arrowRight = require("./../images/arrow_right.png")
 
 
 $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
 let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,nameTemp = "", behospitalCodeTemp="",levelTemp=""
 let tabList = [], name = "", behospitalCode="", behosDateStart="", level="",behosDateEnd="", scoreSum = 0,nameTemp = "", behospitalCodeTemp="",levelTemp=""
 
 
 $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
 $('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
@@ -202,6 +203,53 @@ function bindOperaAll(){
         renderTab(tabList)
         renderTab(tabList)
     })
     })
 }
 }
+
+$('.selectDept').on("click", function(e){
+    e.stopPropagation()
+    const showList =  $(".deptList ").css("display")
+    if(showList == "none" ||!showList){
+        $(".deptList ").css("display","block")
+        $(".selectDept .arrow").attr("src",iconUp)
+    }else{
+        $(".deptList ").css("display", "none")
+        $(".selectDept .arrow").attr("src",iconDown)
+    }
+})
+//获取模块类型
+getDeptList()
+function getDeptList(){
+    post(api.getDeptList).then(res =>{
+        if(res.data.code == '0'){
+            console.log('aaaaaaaaaaa',res)
+           const  deptList = res.data.data
+           rendeDeptList(deptList)
+        }else{}
+    }).catch((e) =>{
+    
+    })
+}
+
+
+function rendeDeptList(deptList){
+    let str = `<li class="deptItem " data-id=" " data-name="全部">全部</li>`
+    for(let i = 0; i < moduleTypeList.length; i++){
+        str += `<li class="deptItem ellipsis" title=${moduleTypeList[i].name} data-id=${moduleTypeList[i].id} data-name=${moduleTypeList[i].name}> ${moduleTypeList[i].name}</li>`
+    }
+    $('.deptList').html(str)
+    bindDeptSelect()
+}
+//模块类型选择
+function bindDeptSelect(){
+    $('.deptItem').on("click",function(){
+        const deptItemName = $(this).attr("data-name")
+        const deptItemId = $(this).attr("data-id")
+        deptId =deptItemId
+        $('.selectDept').html(deptItemName)
+        $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
+
+        $(".deptList").css("display", "none")
+    })
+}
 function loading(){
 function loading(){
     const str = `
     const str = `
     <div class="loadingBox">
     <div class="loadingBox">
@@ -211,19 +259,6 @@ function loading(){
     `
     `
     $("#mainBox", parent.document).append(str)
     $("#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(){
 function hideLoading(){
     $("#mainBox .loadingBox", parent.document).remove()
     $("#mainBox .loadingBox", parent.document).remove()
 }
 }

+ 1 - 1
webpack.config.js

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