|
@@ -78,13 +78,12 @@ if(deptIdPram&&deptNamePram){
|
|
|
deptIdTemp = deptIdPram = deptIdPram
|
|
|
deptName = deptNameTemp = deptNamePram
|
|
|
if(deptNamePram.length > 10){
|
|
|
- $('.selectDept').html(deptNamePram.substring(0,8)+'...')
|
|
|
+ $('.selectDept').val(deptNamePram.substring(0,8)+'...')
|
|
|
}else{
|
|
|
- $('.selectDept').html(deptNamePram)
|
|
|
+ $('.selectDept').val(deptNamePram)
|
|
|
}
|
|
|
$('.selectDept ').attr('title',deptNamePram)
|
|
|
$(".deptList").css("display", "none")
|
|
|
- $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
}
|
|
|
if(from==2){
|
|
|
$(".export").css('display','none')
|
|
@@ -93,7 +92,7 @@ if(from==2){
|
|
|
deptName=deptListDept[0]&&deptListDept[0].deptName;
|
|
|
deptNameTemp=deptListDept[0]&&deptListDept[0].deptName;
|
|
|
deptIdTemp=deptListDept[0]&&deptListDept[0].deptId;
|
|
|
- $('.selectDept').html(deptName)
|
|
|
+ $('.selectDept').val(deptName)
|
|
|
}else if(from==3){
|
|
|
$(".partTitle .titlePic ").html(`<a href="keyItemFlawControl.html">关键条目缺陷占比 / </a>病历列表`)
|
|
|
}else if(from==4){
|
|
@@ -197,7 +196,8 @@ function getTabData(activePage){
|
|
|
behospitalCode: behospitalCode,
|
|
|
patName: name, //病人姓名
|
|
|
level:level,//病历等级
|
|
|
- behDeptName: deptName == "全部" ? "":deptName,
|
|
|
+ behDeptName: deptName == "全部" ? "":deptName||"",
|
|
|
+ deptName: deptName == "全部" ? "":deptName||"",
|
|
|
ascs:data_asc, //升序
|
|
|
descs:data_desc, //降序
|
|
|
startDate: behosDateStart.replace(/\//g,'-'), //出院日期--开始时间
|
|
@@ -405,21 +405,19 @@ $(".abnormalClear").on("click", function(e){
|
|
|
dateFormat:"yy/mm/dd"
|
|
|
}).datepicker( "setDate","");
|
|
|
if(from == 2){
|
|
|
- $('.selectDept ').html(deptListDept[0].deptName)
|
|
|
+ $('.selectDept ').val(deptListDept[0].deptName)
|
|
|
} else if (from == 4 || from == 9){
|
|
|
if(deptNamePram.length > 10){
|
|
|
- $('.selectDept').html(deptNamePram.substring(0,8)+'...')
|
|
|
+ $('.selectDept').val(deptNamePram.substring(0,8)+'...')
|
|
|
}else{
|
|
|
- $('.selectDept').html(deptNamePram)
|
|
|
+ $('.selectDept').val(deptNamePram)
|
|
|
}
|
|
|
$('.selectDept ').attr('title',deptNamePram)
|
|
|
$(".deptList").css("display", "none")
|
|
|
- $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
}else{
|
|
|
$('.selectDept ').html('全部')
|
|
|
}
|
|
|
$(".deptList").css("display", "none")
|
|
|
- $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
// $('.selectDept ').addClass('unSelect')
|
|
|
$('.selectLevel').html('全部')
|
|
|
$(".levelList").css("display", "none")
|
|
@@ -678,7 +676,7 @@ function bindOperaAll(){
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-$('.selectDept').on("click", function(e){
|
|
|
+$('.selectDept').on("focus", function(e){
|
|
|
e.stopPropagation()
|
|
|
$(".levelList ").css("display","none")
|
|
|
$(".selectLevel .arrow").attr("src",iconDown)
|
|
@@ -686,32 +684,69 @@ $('.selectDept').on("click", function(e){
|
|
|
$(".fpSelectCheck .arrow").attr("src",iconDown)
|
|
|
$(".qcCheckList ").css("display", "none")
|
|
|
$(".qcSelectCheck .arrow").attr("src",iconDown)
|
|
|
- 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)
|
|
|
- }
|
|
|
+ $(".deptList ").css("display","block")
|
|
|
+})
|
|
|
+$('.selectDept').on("blur", function(e){
|
|
|
+ $(".deptList ").css("display", "none")
|
|
|
+ $(".selectDept .arrow").attr("src",iconDown)
|
|
|
+})
|
|
|
+$('.selectDept').on("input", function(e){
|
|
|
+ let val = $(this).val().trim()
|
|
|
+ deptName = deptNameTemp = val
|
|
|
+ getDeptList(deptName)
|
|
|
})
|
|
|
|
|
|
//获取科室列表
|
|
|
getDeptList()
|
|
|
-function getDeptList(){
|
|
|
+function getDeptList(val){
|
|
|
if(from == 2){
|
|
|
rendeDeptList(deptListDept)
|
|
|
return
|
|
|
}
|
|
|
- post(api.getDeptList,{inputStr:""}).then(res =>{
|
|
|
+ post(api.getDeptList,{inputStr:val=="全部"?"":val||""}).then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
|
- const deptList = res.data.data
|
|
|
+ const deptList = res.data.data||[]
|
|
|
rendeDeptList(deptList)
|
|
|
- }else{}
|
|
|
+ }else{
|
|
|
+ rendeDeptList([])
|
|
|
+ }
|
|
|
}).catch((e) =>{
|
|
|
|
|
|
})
|
|
|
}
|
|
|
+function rendeDeptList(deptList){
|
|
|
+ if(deptList.length == 0){
|
|
|
+ $('.deptList').html("")
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let str = `<li class="deptItem ellipsis" data-id=" " data-name="全部">全部</li>`;
|
|
|
+ if(from == 2){
|
|
|
+ str = ''
|
|
|
+ }
|
|
|
+ for(let i = 0; i < deptList.length; i++){
|
|
|
+ str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
+ }
|
|
|
+ $('.deptList').html(str)
|
|
|
+ bindDeptSelect()
|
|
|
+}
|
|
|
+//科室选择
|
|
|
+function bindDeptSelect(){
|
|
|
+ $('.deptItem').on("mousedown",function(){
|
|
|
+ const deptItemName = $(this).attr("data-name")
|
|
|
+ const deptItemId = $(this).attr("data-id")
|
|
|
+ deptIdTemp =deptItemId
|
|
|
+ deptNameTemp=deptItemName==="全部"?"":deptItemName;
|
|
|
+ if(deptItemName.length > 10){
|
|
|
+ $('.selectDept').val(deptItemName.substring(0,8)+'...')
|
|
|
+ }else{
|
|
|
+ $('.selectDept').val(deptItemName)
|
|
|
+ }
|
|
|
+ $('.selectDept ').attr('title',deptItemName)
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
+ $('.selectDept').removeClass('unSelect')
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//获取页面配置
|
|
|
|
|
@@ -779,35 +814,7 @@ function bindSetCol(){
|
|
|
}
|
|
|
|
|
|
|
|
|
-function rendeDeptList(deptList){
|
|
|
- let str = `<li class="deptItem ellipsis" data-id=" " data-name="全部">全部</li>`;
|
|
|
- if(from == 2){
|
|
|
- str = ''
|
|
|
- }
|
|
|
- for(let i = 0; i < deptList.length; i++){
|
|
|
- str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptId} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
- }
|
|
|
- $('.deptList').html(str)
|
|
|
- bindDeptSelect()
|
|
|
-}
|
|
|
-//科室选择
|
|
|
-function bindDeptSelect(){
|
|
|
- $('.deptItem').on("click",function(){
|
|
|
- const deptItemName = $(this).attr("data-name")
|
|
|
- const deptItemId = $(this).attr("data-id")
|
|
|
- deptIdTemp =deptItemId
|
|
|
- deptNameTemp = deptItemName
|
|
|
- if(deptItemName.length > 10){
|
|
|
- $('.selectDept').html(deptItemName.substring(0,8)+'...')
|
|
|
- }else{
|
|
|
- $('.selectDept').html(deptItemName)
|
|
|
- }
|
|
|
- $('.selectDept ').attr('title',deptItemName)
|
|
|
- $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
- $(".deptList").css("display", "none")
|
|
|
- $('.selectDept').removeClass('unSelect')
|
|
|
- })
|
|
|
-}
|
|
|
+
|
|
|
function loading(){
|
|
|
const str = `
|
|
|
<div class="loadingBox">
|
|
@@ -1266,7 +1273,6 @@ function renderPagination(totalPage,activePage,totalNum){
|
|
|
|
|
|
$(document).on("click", function(){
|
|
|
$(".levelList ").css("display", "none")
|
|
|
- $(".deptList").css("display", "none")
|
|
|
$(".fpCheckList").css("display", "none")
|
|
|
$(".qcCheckList").css("display", "none")
|
|
|
$(".selectDept .arrow").attr("src",iconDown)
|
|
@@ -1296,7 +1302,8 @@ $(function($){
|
|
|
behospitalCode: behospitalCode,
|
|
|
patName: name, //病人姓名
|
|
|
level:level,//病历等级
|
|
|
- behDeptName: deptName,
|
|
|
+ deptName: deptName == "全部" ? "":deptName||"",
|
|
|
+ behDeptName: deptName == "全部" ? "":deptName||"",
|
|
|
ascs:data_asc, //升序
|
|
|
descs:data_desc, //降序
|
|
|
ruleType:ruleType,
|