|
@@ -18,13 +18,14 @@ const arrowRight = require("./../images/arrow_right.png")
|
|
|
$(".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,statisticsType=2,deptList=[],
|
|
|
- nameTemp = "", behospitalCodeTemp="",levelTemp="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
|
|
|
+ nameTemp = "", behospitalCodeTemp="",levelTemp="",curDeptId="", deptId="",deptIdTemp="", doctorName="", doctorNum="",doctorNameTemp="",doctorNumTemp="",
|
|
|
data_desc=[],data_asc=[];
|
|
|
$(function(){
|
|
|
deptList = JSON.parse(getCookie("deptList"))||[]
|
|
|
let srcUrl = $("#contentIframe",parent.document).attr("src")
|
|
|
deptId = deptIdTemp = getUrlArgObjectNew("deptName",srcUrl)||""
|
|
|
statisticsType = getUrlArgObjectNew("dateType",srcUrl)||""
|
|
|
+ curDeptId = getUrlArgObjectNew("curDeptId",srcUrl)||""
|
|
|
if(statisticsType == 1){
|
|
|
$(".monthYear .mon").css({
|
|
|
backgroundColor:'#00A1FF',
|
|
@@ -45,6 +46,7 @@ $(function(){
|
|
|
if(deptId){
|
|
|
$(".selectDept").html(deptId).attr({
|
|
|
"data-id":deptId,
|
|
|
+ "dept-id":curDeptId,
|
|
|
"title":deptId
|
|
|
}).append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
getDeptList()
|
|
@@ -58,10 +60,12 @@ $(function(){
|
|
|
|
|
|
$(".abnormalClear").click(function(){
|
|
|
deptId = deptIdTemp = deptList[0].deptName
|
|
|
+ curDeptId = deptList[0].deptId
|
|
|
behospitalCode = ""
|
|
|
$(".patientNumInp").val("")
|
|
|
$(".selectDept").html(deptId).attr({
|
|
|
"data-id":deptId,
|
|
|
+ "dept-id":curDeptId,
|
|
|
"title":deptId
|
|
|
}).append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
getTabData(1)
|
|
@@ -88,12 +92,13 @@ function getDeptList(flg){
|
|
|
let str = ``
|
|
|
if(deptList.length<=0)return
|
|
|
if(flg){
|
|
|
- $(".deptScoreDetail .selectDept ").attr("data-id",deptList[0].deptName).find("i").html(deptList[0].deptName)
|
|
|
+ $(".deptScoreDetail .selectDept ").attr({"data-id":deptList[0].deptName,'dept-id':deptList[0].deptId}).find("i").html(deptList[0].deptName)
|
|
|
deptId = deptIdTemp = deptList[0].deptName
|
|
|
+ curDeptId = deptList[0].deptId
|
|
|
}
|
|
|
for(let i = 0;i < deptList.length;i++){
|
|
|
let tmp = deptList[i]
|
|
|
- str += `<li class="deptItem ellipsis" title="${tmp.deptName}" data-id="${tmp.deptName}" data-name="${tmp.deptName}">${tmp.deptName}</li>`
|
|
|
+ str += `<li class="deptItem ellipsis" title="${tmp.deptName}" data-id="${tmp.deptName}" dept-id="${tmp.deptId}" data-name="${tmp.deptName}">${tmp.deptName}</li>`
|
|
|
}
|
|
|
$(".deptScoreDetail .filterDropList").html(str)
|
|
|
}
|
|
@@ -185,7 +190,6 @@ function renderTab(data,hisId,activePage){
|
|
|
str += `
|
|
|
<tr data-index=${i}>
|
|
|
<td class="textCenter">${(activePage-1)*15 + i+1}</td>
|
|
|
- <td>${item.deptId || "-"}</td>
|
|
|
<td >${item.doctorName || "-"}</td>
|
|
|
<td class="goHomeDetail" data-doc="${item.doctorName || ""}">${item.entryNum || "-"}</td>
|
|
|
<td >${item.averageValue || "-"}</td>
|
|
@@ -212,7 +216,7 @@ function renderTab(data,hisId,activePage){
|
|
|
let docName = $(this).attr("data-dept")
|
|
|
let deptC = $(this).attr("data-c")
|
|
|
focusMenuItem("YH-BLZK-ZKPFKS");
|
|
|
- $(parent.document).find("#contentIframe").attr("src","qcListDept.html?from=2&deptName="+deptIdTemp+"&docName="+docName+"&shijian="+statisticsType+"&chengdu="+deptC)
|
|
|
+ $(parent.document).find("#contentIframe").attr("src","qcListDept.html?from=2&deptName="+deptIdTemp+"&docName="+docName+"&shijian="+statisticsType+"&chengdu="+deptC+"&deptId="+curDeptId)
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -388,23 +392,25 @@ $('.selectDept').on("click", function(e){
|
|
|
function rendeDeptList(deptList){
|
|
|
let str = `<li class="deptItem " data-id=" " data-name="全部">全部</li>`
|
|
|
for(let i = 0; i < deptList.length; i++){
|
|
|
- str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} data-id=${deptList[i].deptName} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
+ str += `<li class="deptItem ellipsis" title=${deptList[i].deptName} dept-id=${deptList[i].deptId} data-id=${deptList[i].deptName} data-name=${deptList[i].deptName}> ${deptList[i].deptName}</li>`
|
|
|
}
|
|
|
$('.deptList').html(str)
|
|
|
}
|
|
|
bindDeptSelect()
|
|
|
//科室选择
|
|
|
function bindDeptSelect(){
|
|
|
- $('.deptItem').on("click",function(){
|
|
|
+ $("body").on("click",'.deptItem',function(){
|
|
|
const deptItemName = $(this).attr("data-name")
|
|
|
const deptItemId = $(this).attr("data-id")
|
|
|
+ const did = $(this).attr("dept-id")
|
|
|
deptIdTemp =deptItemId
|
|
|
+ curDeptId = did
|
|
|
if(deptItemName.length > 10){
|
|
|
- $('.selectDept').html(deptItemName.substring(0,8)+'...')
|
|
|
+ $('.selectDept').html(deptItemName.substring(0,8)+'...').attr({"dept-id":curDeptId,"title":deptItemName})
|
|
|
}else{
|
|
|
- $('.selectDept').html(deptItemName)
|
|
|
+ $('.selectDept').html(deptItemName).attr({"dept-id":curDeptId,"title":deptItemName})
|
|
|
}
|
|
|
- $('.selectDept ').attr({'title':deptItemName,'data-id':deptItemName})
|
|
|
+ $('.selectDept ').attr({'title':deptItemName,'data-id':deptItemName,'dept-id':curDeptId})
|
|
|
$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
|
|
$(".deptList").css("display", "none")
|