|
@@ -18,7 +18,8 @@ const arrowLeft= require("./../images/arrow_left.png")
|
|
|
const arrowRight = require("./../images/arrow_right.png")
|
|
|
listenScroll()
|
|
|
let tabList = [], data_desc=["jobCreateTime"],data_asc=[],task_desc=["leaveHospitalDate"],task_asc=[];
|
|
|
-let global_DeptCheckers = {},global_Checkers={4:[],5:[],6:[]},global_CheckerId='',global_CheckerName='',
|
|
|
+let global_DeptCheckers = [],global_Checkers={4:[],5:[],6:[]},global_CheckerId='',global_CheckerName='',
|
|
|
+ global_checkerFilterName="",//左边核查员名字筛选
|
|
|
global_DeptId='',//左边质控员科室筛选id
|
|
|
global_DeptMId="", //左边质检员选中/数字点击科室id
|
|
|
global_DeptAllId='', //右边任务科室筛选id(非科室任务才有)
|
|
@@ -137,6 +138,7 @@ $(function() {
|
|
|
//切换tab
|
|
|
$(".tabBox .tabs button").on("click",(e)=>{
|
|
|
const me = e.target;
|
|
|
+ global_checkerFilterName=''; //切换tab清空核查员筛选
|
|
|
global_activeTabCode = $(me).attr("data-code");
|
|
|
$(".tabBox .tabs button").removeClass("active");
|
|
|
$(me).addClass("active");
|
|
@@ -435,9 +437,12 @@ function bindScoreSelect(){
|
|
|
})
|
|
|
}
|
|
|
//质控员列表渲染
|
|
|
-function renderCheckerTable(d){
|
|
|
+function renderCheckerTable(){
|
|
|
const totalArr = global_DeptId.trim()?global_DeptCheckers[global_DeptId]:global_Checkers[+global_activeTabCode+4];
|
|
|
- const data = d?d:totalArr;
|
|
|
+ let data = totalArr;
|
|
|
+ if(global_checkerFilterName){
|
|
|
+ data = (totalArr||[]).filter((it)=>global_checkerFilterName===it.doctorName);
|
|
|
+ }
|
|
|
let str = ``,code="";
|
|
|
global_CheckerId="";
|
|
|
if(!data||data.length===0){
|
|
@@ -714,7 +719,7 @@ function delRepeatNames(arr){
|
|
|
}
|
|
|
obj[name]=true;
|
|
|
});
|
|
|
- console.log(newArr)
|
|
|
+ //console.log(newArr)
|
|
|
return newArr;
|
|
|
}
|
|
|
//质控员列表科室选择
|
|
@@ -726,6 +731,7 @@ function bindDeptSelect(){
|
|
|
global_DeptAllId="";
|
|
|
}
|
|
|
global_DeptMId="";
|
|
|
+ global_checkerFilterName='';
|
|
|
$('.selectDept i').text(deptItemName)
|
|
|
$('.selectDept').attr('title',deptItemName)
|
|
|
$(".deptList").css("display", "none")
|
|
@@ -735,7 +741,7 @@ function bindDeptSelect(){
|
|
|
const data = +global_DeptId?global_DeptCheckers[global_DeptId]:global_Checkers[+global_activeTabCode+4];
|
|
|
console.log(data,global_DeptId)
|
|
|
rendeCheckerList(data||[]);
|
|
|
- renderCheckerTable(data);
|
|
|
+ renderCheckerTable();
|
|
|
global_activeTabCode=='0'&&getTabData(1);
|
|
|
})
|
|
|
}
|
|
@@ -765,11 +771,13 @@ function bindCheckerSelect(){
|
|
|
}
|
|
|
const totalArr = global_DeptId.trim()?global_DeptCheckers[global_DeptId]:global_Checkers[+global_activeTabCode+4];
|
|
|
if(!itemId.trim()){
|
|
|
- renderCheckerTable(totalArr);
|
|
|
+ global_checkerFilterName='';
|
|
|
+ renderCheckerTable();
|
|
|
return
|
|
|
}
|
|
|
- const arr = (totalArr||[]).filter((it)=>itemName===it.doctorName);
|
|
|
- renderCheckerTable(arr||[]);
|
|
|
+ //const arr = (totalArr||[]).filter((it)=>itemName===it.doctorName);
|
|
|
+ global_checkerFilterName=itemName.trim();
|
|
|
+ renderCheckerTable();
|
|
|
})
|
|
|
}
|
|
|
function loading(){
|