|
@@ -611,8 +611,9 @@ function rendeDeptList(){
|
|
|
|
|
|
|
|
|
|
//质控员列表渲染
|
|
//质控员列表渲染
|
|
-function rendeCheckerList(arr){
|
|
|
|
- const list = arr?arr:global_Checkers[+global_activeTabCode+4];
|
|
|
|
|
|
+function rendeCheckerList(lis){
|
|
|
|
+ const data = lis?lis:global_Checkers[+global_activeTabCode+4];
|
|
|
|
+ const list = delRepeatNames(data);
|
|
if(list.length == 0){
|
|
if(list.length == 0){
|
|
$(".checkerList").html("")
|
|
$(".checkerList").html("")
|
|
return
|
|
return
|
|
@@ -624,6 +625,18 @@ function rendeCheckerList(arr){
|
|
$(".checkerList").html(str)
|
|
$(".checkerList").html(str)
|
|
bindCheckerSelect()
|
|
bindCheckerSelect()
|
|
}
|
|
}
|
|
|
|
+function delRepeatNames(arr){
|
|
|
|
+ let obj = {},name="",newArr=[];
|
|
|
|
+ arr.map((it)=>{
|
|
|
|
+ name = it.doctorName;
|
|
|
|
+ if(!obj[name]){
|
|
|
|
+ newArr.push(it);
|
|
|
|
+ }
|
|
|
|
+ obj[name]=true;
|
|
|
|
+ });
|
|
|
|
+ console.log(newArr)
|
|
|
|
+ return newArr;
|
|
|
|
+}
|
|
//质控员列表科室选择
|
|
//质控员列表科室选择
|
|
function bindDeptSelect(){
|
|
function bindDeptSelect(){
|
|
$('.deptItem').on("mousedown",function(){
|
|
$('.deptItem').on("mousedown",function(){
|
|
@@ -671,9 +684,8 @@ function bindCheckerSelect(){
|
|
renderCheckerTable(totalArr);
|
|
renderCheckerTable(totalArr);
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- const dept=$(this).attr("data-dept");
|
|
|
|
- const arr = (totalArr||[]).find((it)=>itemId===it.doctorId&&dept===it.deptId);
|
|
|
|
- renderCheckerTable(arr?[arr]:[]);
|
|
|
|
|
|
+ const arr = (totalArr||[]).filter((it)=>itemName===it.doctorName);
|
|
|
|
+ renderCheckerTable(arr||[]);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
function loading(){
|
|
function loading(){
|