const $ = require('jquery');
require("../css/doctorQcListCopy.less");
require('./modal.js');
const { api } = require('./api.js')
const { post, getCookie, getLocal, getUrlArgObjectNew, emptyBox, downloadExportedData, expJson, getLogoParam, focusMenuItem, listenScroll, exportTimeLimit, setDatePicker } = require('./utils.js')
require('./../resource/jquery-ui/jquery-ui.min.js');
require('./../resource/jquery-ui/jquery-ui.min.css');
const iconCheck = require("./../images/icon_check.png")
const iconUnCheck = require("./../images/icon_unchecked.png")
const iconCalenBlue = require("./../images/icon_calen_blue.png")
const iconCalenGrey = require("./../images/icon_calen_grey.png")
const iconDown = require("./../images/arrow_down.png")
const iconUp = require("./../images/arrow_up.png")
const loadingImg = require("./../images/loading.gif")
const arrowLeft = require("./../images/arrow_left.png")
const arrowRight = require("./../images/arrow_right.png")
const goUpG = require("./../images/arrow_up_grey.png")
const goUpB = require("./../images/arrow_up_blue.png")
const goDownG = require("./../images/arrow_down_grey.png")
const goDownB = require("./../images/arrow_down_blue.png")
let isPlacefile = getCookie('isPlacefile') || 1
let pageSet = [], pageSetCopy = [], showNum = 0, scrollTop = 0;
let srcUrl = $("#contentIframe", parent.document).attr("src")
let statisticsType = getUrlArgObjectNew("dateType", srcUrl) || getUrlArgObjectNew("shijian", srcUrl) || "3"
let chengdu = getUrlArgObjectNew("chengdu", srcUrl) || ""
let deptIdPram = getUrlArgObjectNew("deptId", srcUrl) || ""
let deptNamePram = getUrlArgObjectNew("deptName", srcUrl) || "";
let docName = getUrlArgObjectNew("doctorName", srcUrl) || "";
let doctorId = getUrlArgObjectNew("doctorId", srcUrl) || "";
let startDateParam = getUrlArgObjectNew("startDateParam", srcUrl) || "";
let endDateParam = getUrlArgObjectNew("endDateParam", srcUrl) || "";
let from = getUrlArgObjectNew("from", srcUrl) || "";
let defectName = getUrlArgObjectNew("defectName", srcUrl) || "";
let casesEntryId = getUrlArgObjectNew("casesEntryId", srcUrl) || "";
let casesId = getUrlArgObjectNew("casesId", srcUrl) || "";
let ruleType = getUrlArgObjectNew("ruleType", srcUrl) || "";
let isSingleReject = getUrlArgObjectNew("isSingleReject", srcUrl) || "";
let fromDays = getUrlArgObjectNew("fromDays", srcUrl) || "";
let deptListDept = JSON.parse(localStorage.getItem('deptList')) || []
let improveType = getUrlArgObjectNew("improveType", srcUrl) || '';
let professor = getUrlArgObjectNew("professor", srcUrl) || ""
let currentPage;
$(".selectLevel").append(`
`)
$(".selectDept").append(`
`)
$(".fpSelectCheck").append(`
`)
$(".qcSelectCheck").append(`
`)
let tabList = [], name = "", behospitalCode = "", behosDateStart = "", level = "", behosDateEnd = "", scoreSum = 0,
nameTemp = "", behospitalCodeTemp = "", levelTemp = "", deptId = "", deptIdTemp = "", doctorName = "", deptName = "", deptNameTemp = "", doctorNum = "", doctorNameTemp = "", doctorNumTemp = "",
fpCheckStatus = "", fpCheckStatusTemp = "", fpCheckName = "", fpCheckNameTemp = "", qcCheckName = "", qcCheckNameTemp = "", qcCheckStatus = "", qcCheckStatusTemp = "", fpCheckDateStart = "", fpCheckDateEnd = "",
qcCheckDateStart = "", qcCheckDateEnd = "", casesEntryName = "", qcCheckMain = "", qcCheckMainTemp = "",
data_desc, data_asc = [];
listenScroll('.qcListCopy')
setDatePicker($("#datepicker"), $("#datepicker2"), 3, new Date(startDateParam), new Date(endDateParam))
if (isPlacefile != 1) {
if (from == 9) {
data_desc = ["behospitalDate"]
} else {
data_desc = ["behospital_date"]
}
} else {
if (from == 9) {
data_desc = ["leaveHospitalDate"]
} else {
data_desc = ["leave_hospital_date"]
}
}
if (chengdu) {
levelTemp = chengdu
level = chengdu
$('.selectLevel').html(chengdu)
$(".levelList").css("display", "none")
$(".selectLevel").append(`
`)
}
if (defectName && defectName !== 'undefined') {
casesEntryName = defectName
$('.selectDefect').html(casesEntryName)
} else {
$('.defectItem').css("display", "none")
}
if (docName) {
doctorNameTemp = docName
doctorName = docName
$('.doctorInp').val(docName)
$('.doctorInp').prop('disabled', true)
}
if (doctorId) {
doctorNumTemp = doctorId
doctorNum = doctorId
$('.doctorNumInp').val(doctorId)
$('.doctorNumInp').prop('disabled', true)
}
if (deptIdPram && deptNamePram) {
if (deptNamePram == "全院") {
deptNamePram = "全部"
}
deptId = deptIdTemp = deptIdPram
deptName = deptNameTemp = deptNamePram
$('.selectDept').val(deptNamePram)
$('.selectDept ').attr('title', deptNamePram)
$(".deptList").css("display", "none")
$('.selectDept').prop('disabled', true)
}
if (from == 9) {
// 来自 各科室缺陷占比的跳转
$(".partTitle .titlePic ").html(`控制台 / 各科室缺陷占比 / 医生质控平均分 / 缺陷列表 / 病历列表`)
$(".defectDetail").on("click", function () {
$(parent.document).find("#contentIframe").attr("src", "doctorQuexianDetailControl.html?deptName=" + `${deptNamePram == "全部" ? "全院" : deptNamePram}` + "&deptId=" + deptIdPram + "&doctorName=" + doctorName + "&doctorId=" + doctorId + "&from=1&" + "&shijian=3" + "&startDateParam=" + startDateParam + "&endDateParam=" + endDateParam)
})
} else {
$(".partTitle .titlePic ").html(`控制台 / 各科室缺陷占比 / 医生质控平均分 / 病历列表`)
}
$(".partTitle .consoleD").click(function () {
//初始菜单选中
focusMenuItem(from == 2 ? 'YH-KZTKS' : 'YH-KZT')
$(".container", parent.document).addClass("console-cont");
})
$('.datapickerBox').append(`
`)
$('.iconCalen').on("mouseenter", function (e) {
$(this).attr("src", iconCalenBlue)
})
$('.iconCalen').on("mouseleave", function (e) {
$(this).attr("src", iconCalenGrey)
})
$('.iconCalen').on("click", function (e) {
$(this).parent().find("input").focus()
})
$('.recordScoreBtn').css("opacity", hasData('FUNC000017') ? '1' : '0.5')
setCookie('excelName', $(".partTitle").text());
$("#filterToggler").click(function () {
const text = $(this).text();
$(".toggle-item").slideToggle();
$(this).text(text === "收起筛选" ? "展开筛选" : "收起筛选").toggleClass("up");
});
//判断有无某一权限
function hasData(data) {
let trdObj = JSON.parse(getLocal("trdObj"))
let lis = trdObj['YH-BLZK-ZKPF']
if (!lis) {
return false
}
if (lis.indexOf(data) > -1) {//有权限
return true
}
return false;
}
// 初始化导出接口
function formatExportUrl(type) {
if (type === '7' || type === '8') {
return api.qcCheckMRPageExport
} else if (type === '6') {
return api.hmImproveMRPageExport
} else if (type === '12') {
return api.qcResultShortXYPageExport
} else {
// 默认导出接口
return api.qcResultShortPageExport
}
}
function getTabData(activePage) {
// 判断是否是 住院超过31日病人数
let beHosGT31Days = null
if (fromDays && fromDays === "1") {
beHosGT31Days = 1
}
if (casesEntryId === 'undefined') {
casesEntryId = ""
}
let param
let url = '', date
if (from == 9) {
url = api.getDetailRecordListPage
param = {
current: activePage,
behospitalCode: behospitalCode,
patName: name, //病人姓名
level: level,//病历等级
behDeptName: deptName == "全部" ? "" : deptName || "",
deptName: deptName == "全部" ? "" : deptName || "",
ascs: data_asc, //升序
descs: data_desc, //降序
startDate: behosDateStart.replace(/\//g, '-'), //出院日期--开始时间
endDate: behosDateEnd.replace(/\//g, '-'), //出院日期--结束时间
casesEntryName: casesEntryName,
casesEntryId: casesEntryId,
casesId: casesId,
professor: professor,
beHosGT31Days,
size: 15,
deptId: deptId,
ruleType: ruleType,
isReject: isSingleReject,
doctorName: doctorName,
doctorId: doctorNum,
checkStatus: qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
mrStatus: fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
chName: qcCheckName, //病历核查人员
diagnose: qcCheckMain,
mrName: fpCheckName, //首页核查人员
chTimeStart: qcCheckDateStart.replace(/\//g, '-'), //病历核查起始时间
chTimeEnd: qcCheckDateEnd.replace(/\//g, '-'), //病历核查截止时间
mrTimeStart: fpCheckDateStart.replace(/\//g, '-'), //首页核查起始时间
mrTimeEnd: fpCheckDateEnd.replace(/\//g, '-'), //首页核查截止时间
}
} else {
url = api.doctorAverageLevelPage
if (isPlacefile != 1) {
date = {
behosDateStart: behosDateStart.replace(/\//g, '-'), //入院日期--开始时间
behosDateEnd: behosDateEnd.replace(/\//g, '-'), //入院日期--结束时间
}
} else {
date = {
leaveHosDateStart: behosDateStart.replace(/\//g, '-'), //出院日期--开始时间
leaveHosDateEnd: behosDateEnd.replace(/\//g, '-'), //出院日期--结束时间
}
}
param = {
current: activePage,
behospitalCode: behospitalCode,
patName: name, //病人姓名
level: level,//病历等级
behDeptName: deptName == "全部" ? "" : deptName || "",
deptName: deptName == "全部" ? "" : deptName || "",
ascs: data_asc, //升序
descs: data_desc, //降序
...date,
checkStatus: qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
mrStatus: fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
casesEntryName: casesEntryName,
casesEntryId: casesEntryId,
casesId: casesId,
professor: professor,
beHosGT31Days,
size: 15,
deptId: deptId,
ruleType: ruleType,
isReject: isSingleReject,
doctorName: doctorName,
doctorCode: doctorNum,
chName: qcCheckName, //病历核查人员
diagnose: qcCheckMain,
mrName: fpCheckName, //首页核查人员
chTimeStart: qcCheckDateStart.replace(/\//g, '-'), //病历核查起始时间
chTimeEnd: qcCheckDateEnd.replace(/\//g, '-'), //病历核查截止时间
mrTimeStart: fpCheckDateStart.replace(/\//g, '-'), //首页核查起始时间
mrTimeEnd: fpCheckDateEnd.replace(/\//g, '-'), //首页核查截止时间
}
}
$('.pagination').html("")
$('.tbody').html(emptyBox('努力加载中...', '', 1))
return post(url, param).then(res => {
if (res.data.code == '0') {
const data = res.data.data;
tabList = data.records;
const totalPage = data.pages;
const totalNum = data.total;
currentPage = activePage
renderTab(tabList, data.hospitalId);
renderPagination(totalPage, Number(activePage), totalNum)
if (totalPage > 1) {
renderPagination(totalPage, Number(activePage), totalNum)
} else {
$('.pagination').html("")
}
} else {
$.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
}
}).catch((e) => {
console.log(999)
})
}
//getTabData(1)
$(".filter").on("click", function (e) {
behosDateStart = $("#datepicker").val()
behosDateEnd = $("#datepicker2").val()
fpCheckDateStart = $("#datepickerFp1").val()
fpCheckDateEnd = $("#datepickerFp2").val()
qcCheckDateStart = $("#datepickerQc1").val()
qcCheckDateEnd = $("#datepickerQc2").val()
const behosDateStartTime = new Date(behosDateStart).getTime()
const behosDateEndTime = new Date(behosDateEnd).getTime()
const qcCheckDateStartTime = new Date(qcCheckDateStart).getTime()
const qcCheckDateEndTime = new Date(qcCheckDateEnd).getTime()
const fpCheckDateStartTime = new Date(fpCheckDateStart).getTime()
const fpCheckDateEndTime = new Date(fpCheckDateEnd).getTime()
if (behosDateStartTime > behosDateEndTime) {
$.alerModal({ "message": '出院日期开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
if (qcCheckDateStartTime > qcCheckDateEndTime) {
$.alerModal({ "message": '病历核查开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
if (fpCheckDateStartTime > fpCheckDateEndTime) {
$.alerModal({ "message": '病案首页核查开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
if (behosDateStart) {
behosDateStart = behosDateStart + ' 00:00:00'
}
if (behosDateEnd) {
behosDateEnd = behosDateEnd + ' 23:59:59'
}
if (fpCheckDateStart) {
fpCheckDateStart = fpCheckDateStart + ' 00:00:00'
}
if (fpCheckDateEnd) {
fpCheckDateEnd = fpCheckDateEnd + ' 23:59:59'
}
if (qcCheckDateStart) {
qcCheckDateStart = qcCheckDateStart + ' 00:00:00'
}
if (qcCheckDateEnd) {
qcCheckDateEnd = qcCheckDateEnd + ' 23:59:59'
}
name = nameTemp
behospitalCode = behospitalCodeTemp
level = levelTemp === "全部" ? "" : levelTemp
deptId = deptIdTemp
deptName = deptNameTemp
doctorName = doctorNameTemp
fpCheckName = fpCheckNameTemp
qcCheckName = qcCheckNameTemp
qcCheckMain = qcCheckMainTemp
doctorNum = doctorNumTemp
fpCheckStatus = fpCheckStatusTemp
qcCheckStatus = qcCheckStatusTemp
if (deptName == "") {
$(".selectDept").attr({ 'title': "全部", 'data-id': '' }).val("全部")
}
getTabData(1)
})
$(".abnormalClear").on("click", function (e) {
tabList = [];
name = "";
behospitalCode = "";
level = "";
scoreSum = 0;
nameTemp = "";
behospitalCodeTemp = "";
levelTemp = "";
// doctorName="";
fpCheckName = "";
qcCheckName = "";
qcCheckMain = "";
// doctorNum = "";
// doctorNameTemp="";
fpCheckNameTemp = "";
qcCheckNameTemp = "";
qcCheckMainTemp = "";
fpCheckStatus = "";
fpCheckStatusTemp = "";
qcCheckStatus = "";
qcCheckStatusTemp = ""
if (from == 9) {
data_desc = ["leaveHospitalDate"]
} else {
data_desc = ["leave_hospital_date"]
}
if (isPlacefile != 1) {
data_desc = ["behospitalDate"]
}
data_asc = [];
if (from == 2) {
deptId = deptListDept[0] && deptListDept[0].deptId;
deptName = deptListDept[0] && deptListDept[0].deptName;
deptNameTemp = deptListDept[0] && deptListDept[0].deptName;
deptIdTemp = deptListDept[0] && deptListDept[0].deptId;
}
if (from == 4 || from == 9 || from == 8 || from == 12) {
deptId = deptIdTemp = deptIdPram
deptName = deptNameTemp = deptNamePram
}
$('.patientNumInp').val('')
$('.patientNameInp').val('')
$('.fpCheckPeople').val('')
$('.qcCheckPeople').val('')
$('.qcCheckMain').val('')
// $('#datepicker').val('')
// $('#datepicker2').val('')
//默认日期为近一个月
let year = new Date().getFullYear()
let month = new Date().getMonth() + 1
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", new Date(`${year}-01-01`));
$("#datepicker2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", new Date());
$("#datepickerFp1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", "");
$("#datepickerFp2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$("#datepickerQc1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", "");
$("#datepickerQc2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$(".deptList").css("display", "none")
// $('.selectDept ').addClass('unSelect')
$('.selectLevel').html('全部')
$(".levelList").css("display", "none")
$(".selectLevel").append(`
`)
// $('.selectLevel ').addClass('unSelect')
$('.fpSelectCheck').html('全部')
$(".fpCheckList").css("display", "none")
$(".fpSelectCheck").append(`
`)
$('.qcSelectCheck').html('全部')
$(".qcCheckList").css("display", "none")
$(".qcSelectCheck").append(`
`)
$("th[code]").removeClass("asc desc")
if (isPlacefile == 1) {
$(".leaveHospitalDate").addClass(" desc")
} else {
$(".behospitalDate").addClass(" desc")
}
behosDateStart = $("#datepicker").val()
behosDateEnd = $("#datepicker2").val()
if (behosDateStart) {
behosDateStart = behosDateStart + ' 00:00:00'
}
if (behosDateEnd) {
behosDateEnd = behosDateEnd + ' 23:59:59'
}
fpCheckDateStart = ""
fpCheckDateEnd = ""
qcCheckDateStart = ""
qcCheckDateEnd = ""
getTabData(1)
})
function renderTab(data, hisId) {
let str = ``
let hasSelectAll = true;
if (data.length === 0) {
$('.tbody').html(emptyBox(null, showNum + 2))
// initScroll("qcListCopy","YX",1)
return;
}
for (let i = 0; i < data.length; i++) {
const item = data[i]
if (!item.hasSelect) {
hasSelectAll = false
}
// str += `
//
// ${(currentPage-1)*15 + i+1} | `
str += `
${item.hasSelect ? ` ` : ` `} |
`
for (let j = 0; j < pageSet.length; j++) {
if (pageSet[j].status == 1) {
if (pageSet[j].val === "checkStatus" || pageSet[j].val === "mrStatus") {
str += `${item[pageSet[j].val] == "1" ? "已核查" : item[pageSet[j].val] === 0 ? "未核查" : "-"} | `
} else if (pageSet[j].val == 'scoreRes' || pageSet[j].val == 'scoreBn') {
str += `${item[pageSet[j].val] === null ? '-' : item[pageSet[j].val]} | `
} else {
str += `${item[pageSet[j].val] || "-"} | `
}
}
}
// ${item.behospitalCode || "-"} |
// ${item.fileCode || "-"} |
// ${item.name || "-"} |
// ${item.sex || "-"} |
// ${item.age || "-"} |
// ${item.bedCode || "-"} |
// ${item.behospitalDate&&item.behospitalDate.slice(0,10) || "-"} |
// ${item.leaveHospitalDate&&item.leaveHospitalDate.slice(0,10)|| "-"} |
// ${item.diagnose|| "-"} |
// ${item.behDoctorName || "-"} |
// ${item.doctorName || "-"} |
// ${item.directorDoctorName || "-"} |
// ${item.behDeptName || "-"} |
// ${item.level || "-"} |
// ${item.scoreRes || "-"} |
// ${item.gradeTime&&item.gradeTime.slice(0,10) || "-"} |
str += "
"
}
if (data.length === 0) {
hasSelectAll = false
}
if (hasSelectAll) {
$('.scoreOpera img').attr("src", iconCheck)
$('.scoreOpera').attr("data-selectall", true)
} else {
$('.scoreOpera img').attr("src", iconUnCheck)
$('.scoreOpera').attr("data-selectall", false)
}
$('.tbody').html(str)
bindScoreOperaItem()
bindRecordScoreOper()
bindScoreDetail(hisId)
// initScroll("qcListCopy","YX",1)
}
function isTextCenter(name) {
const textCenterList = ['level', 'scoreRes', 'sex', 'age', 'behospitalDate', 'leaveHospitalDate', 'placefileDate', 'gradeTime', 'checkStatus', 'mrStatus', 'mrTime', 'chTime', 'chName', 'mrName', 'diagnose', 'behDoctorName', 'directorDoctorName', 'doctorName', 'name']
return textCenterList.findIndex(item => item == name) > -1
}
function scoreDetail(id, age, hid, code, name) {
const logoParam = getLogoParam();
window.open(`./qcScore.html?id=${id}&age=${age}&name=${name}&hid=${getCookie('hospitalid')}&code=${code}` + logoParam)
}
function bindScoreDetail(hisId) {
$('.patientNameSpan').on('click', function (e) {
const index = $(this).attr("data-index")
const id = tabList[index].behospitalCode
const age = tabList[index].age;
const noScore = tabList[index].level == '未评分'
if (noScore) {
$.alerModal({ "message": '请先进行评分!', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
} else {
scoreDetail(id, age, hisId, 'YH-BLZK-ZKPF', tabList[index].name)
}
})
}
//选择病历等级
$('.selectLevel').on("click", function (e) {
e.stopPropagation()
$(".deptList ").css("display", "none")
$(".selectDept .arrow").attr("src", iconDown)
$(".fpCheckList ").css("display", "none")
$(".fpSelectCheck .arrow").attr("src", iconDown)
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList ").css("display", "none")
const showList = $(".levelList ").css("display")
if (showList == "none" || !showList) {
$(".levelList ").css("display", "block")
$(".selectLevel .arrow").attr("src", iconUp)
} else {
$(".levelList ").css("display", "none")
$(".selectLevel .arrow").attr("src", iconDown)
}
})
//选择病案首页核查状态
$('.fpSelectCheck').on("click", function (e) {
e.stopPropagation()
$(".deptList ").css("display", "none")
$(".selectDept .arrow").attr("src", iconDown)
$(".levelList ").css("display", "none")
$(".selectLevel .arrow").attr("src", iconDown)
$(".qcSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList ").css("display", "none")
const showList = $(".fpCheckList ").css("display")
if (showList == "none" || !showList) {
$(".fpCheckList ").css("display", "block")
$(".fpSelectCheck .arrow").attr("src", iconUp)
} else {
$(".fpCheckList ").css("display", "none")
$(".fpSelectCheck .arrow").attr("src", iconDown)
}
})
//选择病历核查状态
$('.qcSelectCheck').on("click", function (e) {
e.stopPropagation()
$(".deptList ").css("display", "none")
$(".selectDept .arrow").attr("src", iconDown)
$(".levelList ").css("display", "none")
$(".selectLevel .arrow").attr("src", iconDown)
$(".fpSelectCheck .arrow").attr("src", iconDown)
$(".fpCheckList ").css("display", "none")
const showList = $(".qcCheckList ").css("display")
if (showList == "none" || !showList) {
$(".qcCheckList ").css("display", "block")
$(".qcSelectCheck .arrow").attr("src", iconUp)
} else {
$(".qcCheckList ").css("display", "none")
$(".qcSelectCheck .arrow").attr("src", iconDown)
}
})
bindLeveldSelect()
//病历等级选择
function bindLeveldSelect() {
$('.levelItem').on("click", function () {
const levelItemName = $(this).attr("data-name")
const levelItemItemId = $(this).attr("data-id")
levelTemp = levelItemItemId
$('.selectLevel').html(levelItemName)
$(".levelList").css("display", "none")
$(".selectLevel").append(`
`)
$('.selectLevel').removeClass('unSelect')
})
}
bindCheckedSelectFp()
//病案首页核查状态选择
function bindCheckedSelectFp() {
$('.fpCheckItem').on("click", function () {
const fpCheckItemName = $(this).attr("data-name")
const fpCheckItemItemId = $(this).attr("data-id") || ""
fpCheckStatusTemp = fpCheckItemItemId
$('.fpSelectCheck').html(fpCheckItemName)
$(".fpCheckList").css("display", "none")
$(".fpSelectCheck").append(`
`)
$('.fpSelectCheck').removeClass('unSelect')
})
}
bindCheckedSelectQc()
//病历核查状态选择
function bindCheckedSelectQc() {
$('.qcCheckItem').on("click", function () {
const qcCheckItemName = $(this).attr("data-name")
const qcCheckItemItemId = $(this).attr("data-id") || ""
qcCheckStatusTemp = qcCheckItemItemId
$('.qcSelectCheck').html(qcCheckItemName)
$(".qcCheckList").css("display", "none")
$(".qcSelectCheck").append(`
`)
$('.qcSelectCheck').removeClass('unSelect')
})
}
function bindScoreOperaItem() {
$(".scoreOperaItem").off("click").on("click", function (e) {
const index = $(this).parent().attr("data-index")
tabList[index].hasSelect = tabList[index].hasSelect ? false : true
renderTab(tabList)
})
}
function bindRecordScoreOper() {
$(".recordScoreOperaBtn").on("click", function (e) {
if (!hasData('FUNC000017')) {
return
}
const index = $(this).parent().attr("data-index")
const behospitalCode = tabList[index].behospitalCode
loading()
recordScore(behospitalCode, 1, true)
})
}
function bindOperaAll() {
$('.scoreOpera').on("click", function (e) {
const hasSelectAll = $('.scoreOpera').attr("data-selectall")
if (hasSelectAll == 'true') {
for (let i = 0; i < tabList.length; i++) {
tabList[i].hasSelect = false
}
} else {
for (let i = 0; i < tabList.length; i++) {
tabList[i].hasSelect = true
}
}
renderTab(tabList)
})
}
$('.selectDept').on("focus", function (e) {
e.stopPropagation()
// let val = $(this).val().trim()
// deptName = deptNameTemp = val
// val&&getDeptList(val)
$(".levelList ").css("display", "none")
$(".selectLevel .arrow").attr("src", iconDown)
$(".fpCheckList ").css("display", "none")
$(".fpSelectCheck .arrow").attr("src", iconDown)
$(".qcCheckList ").css("display", "none")
$(".qcSelectCheck .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(val) {
if (from == 2) {
rendeDeptList(deptListDept)
return
}
post(api.getDeptList, { inputStr: val == "全部" ? "" : val || "" }).then(res => {
if (res.data.code == '0') {
const deptList = res.data.data || []
rendeDeptList(deptList)
} else {
rendeDeptList([])
}
}).catch((e) => {
})
}
function rendeDeptList(deptList) {
if (deptList.length == 0) {
$('.deptList').html("")
return
}
let str = `全部`;
if (from == 2) {
str = ''
}
for (let i = 0; i < deptList.length; i++) {
str += ` ${deptList[i].deptName}`
}
$('.deptList').html(str)
bindDeptSelect()
}
//科室选择
function bindDeptSelect() {
$('.deptItem').on("mousedown", function () {
const deptItemName = $(this).attr("data-name")
const deptItemId = $(this).attr("data-id")
deptId = deptIdTemp = deptItemId
deptNameTemp = deptItemName === "全部" ? "" : deptItemName;
$('.selectDept').val(deptItemName)
$('.selectDept ').attr('title', deptItemName)
$(".deptList").css("display", "none")
$('.selectDept').removeClass('unSelect')
})
}
//获取页面配置
function getPageSet() {
return post(api.getQcListPageSet, { pageType: 1 }).then(res => {
if (res.data.code == '0') {
pageSet = res.data.data
pageSetCopy = JSON.parse(JSON.stringify(pageSet))
showNum = 0
renderTabTitle(pageSet)
} else { }
}).catch((e) => {
})
}
function renderTabTitle(data) {
// let str = `
// 序号 | `
let str = ` | `
let defaultOrder = isPlacefile == 1 ? 'leaveHospitalDate' : 'behospitalDate'
for (let i = 0; i < data.length; i++) {
const item = data[i]
if (item.status == 1) {
showNum++
str += `${item.name} | `
}
}
//
列设置
let operStr = `
| `
$(".tabOpera").html(operStr)
$(".tabTitle").html(str)
//全选绑定
bindOperaAll()
bindRecordScoreBtn()
bindSetCol()
bindOrder()
bindToolTip()
}
function bindToolTip() {
$('.tipIcon').off("hover").hover(function () {
$('.tooltip').css('visibility', "visible")
}, function () {
$('.tooltip').css('visibility', "hidden")
})
}
function bindSetCol() {
$(".setCol").off("click").on("click", function () {
renderColSet(pageSetCopy)
})
$('.setCol').off("hover").hover(function () {
$('.setCol').css('color', '#00A1FF')
}, function () {
$('.setCol').css('color', '#777777')
})
}
function loading() {
const str = `
`
$("#mainBox", parent.document).append(str)
}
function hideLoading() {
$("#mainBox .loadingBox", parent.document).remove()
}
function bindRecordScoreBtn() {
$('.recordScoreBtn').off("click").on("click", function (e) {
scoreSum = 0; // 解决全选评分之后 再单选 toast不隐藏的bug
// if(!hasData('FUNC000017')){
// return
// }
let scoreList = []
for (let i = 0; i < tabList.length; i++) {
if (tabList[i].hasSelect) {
scoreList.push(tabList[i].behospitalCode)
}
}
if (scoreList.length === 0) {
$.alerModal({ "message": '请选择要评分的项!', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
} else {
loading()
for (let j = 0; j < scoreList.length; j++) {
recordScore(scoreList[j], scoreList.length, true)
}
}
})
}
function bindOrder() {
$("th[code]").off("click").on("click", function (e) {
let code
if (from == 9) {
code = $(this).attr("code");
} else {
code = $(this).attr("code2");
}
if (data_asc[0] === code) {
data_desc = [code];
data_asc = [];
$("th[code]").removeClass("asc desc");
$(this).addClass("desc");
} else {
data_desc = [];
data_asc = [code];
$("th[code]").removeClass("asc desc");
$(this).addClass("asc");
}
getTabData(1);
// console.log(code)
});
}
function recordScore(behospitalCode, totalNum, hasToast) {
const param = {
behospitalCode: behospitalCode
}
post(api.recordScore, param).then(res => {
if (res.data.code == '0') {
scoreSum++
if (scoreSum === totalNum) {
hideLoading()
scoreSum = 0
const activePage = $(".activePage").attr('data-page') || 1
getTabData(activePage)
if (hasToast) {
$.alerModal({ "message": '评分成功', type: "tip", time: '1000', isFather: true, win: true, fatherWrapper: $("#mainBox", parent.document) });
}
}
} else {
scoreSum++
if (scoreSum === totalNum) {
hideLoading()
scoreSum = 0
const activePage = $(".activePage").attr('data-page') || 1
getTabData(activePage)
if (hasToast) {
$.alerModal({ "message": '评分失败,请重试~', type: "tip", time: '1000', win: 'default', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
}
}
}
}).catch((e) => {
scoreSum++
if (scoreSum === totalNum) {
hideLoading()
scoreSum = 0
const activePage = $(".activePage").attr('data-page') || 1
getTabData(activePage)
if (hasToast) {
$.alerModal({ "message": '评分失败,请重试~', type: "tip", time: '1000', win: 'default', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
}
}
})
}
function renderColSet(list) {
let pageSetList = list || pageSetCopy
let allSelect = true
for (let i = 0; i < pageSetList.length; i++) {
if (pageSetList[i].status != 1) {
allSelect = false
}
}
let str = `
列显示设置 })
恢复默认 取消 保存设置
`
let infoStr = `${allSelect ? `
` : `
`}全选列名 "
// $(".main-body").append(str)
if (!$("#mainBox .colSetBox", parent.document).length) {
$("#mainBox", parent.document).append(str)
}
$("#mainBox .colSetBox .cloInfo", parent.document).html(infoStr)
$(".colTabInfoBox", parent.document).scrollTop(scrollTop)
scrollTop = 0
bindSelectCol()
bindColOrder()
bindSaveColSet()
bindDefaultColset()
bindCloseColSet()
bindImgEnter()
}
function bindDefaultColset() {
$('.defaultColSet', parent.document).off("hover").hover(function () {
$(this).css('color', '#00A1FF')
}, function () {
$(this).css('color', '#777777')
})
$('.defaultColSet', parent.document).off("click").on('click', function () {
return post(api.getDefaultPageSet, { pageType: 1 }).then(res => {
if (res.data.code == '0') {
pageSet = res.data.data
pageSetCopy = JSON.parse(JSON.stringify(pageSet))
renderColSet(pageSetCopy)
} else { }
}).catch((e) => {
})
// closeColSet()
})
}
function bindImgEnter() {
$(".pageSetUpBox img", parent.document).off("mouseenter").on("mouseenter", function () {
$(this).attr('src', goUpB)
})
$(".pageSetDownBox img", parent.document).off("mouseenter").on("mouseenter", function () {
$(this).attr('src', goDownB)
})
$(".pageSetUpBox img", parent.document).off("mouseout").on("mouseout", function () {
$(this).attr('src', goUpG)
})
$(".pageSetDownBox img", parent.document).off("mouseout").on("mouseout", function () {
$(this).attr('src', goDownG)
})
}
function bindSelectCol() {
$(".toggleSelectCol", parent.document).off("click").on("click", function () {
const index = $(this).parent().attr("data-index")
pageSetCopy[index].status = pageSetCopy[index].status == 1 ? 0 : 1
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
})
$(".toggleSelectColAll", parent.document).off("click").on("click", function () {
const hasSelectAll = $(this).attr("data-select")
for (let i = 0; i < pageSetCopy.length; i++) {
if (hasSelectAll == "true") {
pageSetCopy[i].status = 0
} else {
pageSetCopy[i].status = 1
}
}
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
})
}
function closeColSet() {
pageSetCopy = JSON.parse(JSON.stringify(pageSet))
$("#mainBox .colSetBox", parent.document).remove()
}
function bindCloseColSet() {
$(".colSetBox .iconClose", parent.document).off("click").on("click", function () {
closeColSet()
})
$(".colSetBox .cancalColSet", parent.document).off("click").on("click", function () {
closeColSet()
})
}
function bindSaveColSet() {
$(".saveColSet", parent.document).off("click").on("click", function () {
let showNumSet = 0
let sysUserPagesetVOList = []
for (let i = 0; i < pageSetCopy.length; i++) {
const item = pageSetCopy[i]
sysUserPagesetVOList.push({
name: item.name,
orderNo: i,
status: item.status,
val: item.val
})
if (item.status == 1) {
showNumSet++
}
}
if (showNumSet === 0) {
$.alerModal({ "message": '最少显示一列', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
return post(api.saveQcListPageSet, { pageType: 1, sysUserPagesetVOList: sysUserPagesetVOList }).then(res => {
if (res.data.code == '0') {
closeColSet()
getPageSet().then(res => {
$(".filter").click(); //初始查询
})
} else {
$("#mainBox .colSetBox", parent.document).remove()
$.alerModal({ "message": '保存失败,请重试~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
}
}).catch((e) => {
$("#mainBox .colSetBox", parent.document).remove()
$.alerModal({ "message": '保存失败,请重试~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
})
})
}
function bindColOrder() {
$(".pageSetUp", parent.document).off("click").on("click", function () {
const index = parseInt($(this).parent().parent().parent().parent().attr("data-index"))
if (index != 0) {
const upItem = pageSetCopy[index]
const upItemPre = pageSetCopy[index - 1]
pageSetCopy.splice(index - 1, 2, upItem, upItemPre)
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
} else {
return
}
})
$(".pageSetDown", parent.document).off("click").on("click", function () {
const index = parseInt($(this).parent().parent().parent().parent().attr("data-index"))
if (index == pageSetCopy.length - 1) {
return
} else {
const downItem = pageSetCopy[index]
const downItemBack = pageSetCopy[index + 1]
pageSetCopy.splice(index, 2, downItemBack, downItem)
scrollTop = $(".colTabInfoBox", parent.document).scrollTop()
renderColSet(pageSetCopy)
}
})
}
$(".patientNumInp").on("input", function (e) {
const val = $(this).val().trim();
let beCode = behospitalCode;
const patrn = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、]/g;
beCode = val.replace(patrn, function (x) {
return "\\" + x;
});
behospitalCodeTemp = beCode
});
$(".patientNameInp").on("input", function (e) {
const val = $(this).val().trim()
nameTemp = val
})
$(".doctorInp").on("input", function (e) {
const val = $(this).val().trim()
doctorNameTemp = val
})
$(".fpCheckPeople").on("input", function (e) {
const val = $(this).val().trim()
fpCheckNameTemp = val
})
$(".qcCheckPeople").on("input", function (e) {
const val = $(this).val().trim()
qcCheckNameTemp = val
})
$(".qcCheckMain").on("input", function (e) {
const val = $(this).val().trim()
qcCheckMainTemp = val
})
$(".doctorNumInp").on("input", function (e) {
const val = $(this).val().trim();
doctorNumTemp = val
})
$(function () {
$.datepicker.regional['zh-CN'] = {
clearText: '清除',
clearStatus: '清除已选e799bee5baa6e59b9ee7ad9431333361303131日期',
closeText: '关闭',
closeStatus: '不改变当前选择',
prevText: '<上月',
prevStatus: '显示上月',
prevBigText: '<<',
prevBigStatus: '显示上一年',
nextText: '下月>',
nextStatus: '显示下月',
nextBigText: '>>',
nextBigStatus: '显示下一年',
currentText: '今天',
currentStatus: '显示本月',
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
yearNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
monthStatus: '选择月份',
yearStatus: '选择年份',
weekHeader: '周',
weekStatus: '年内周次',
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
dayStatus: '设置 DD 为一周起始',
dateStatus: '选择 m月 d日, DD',
dateFormat: 'yy-mm-dd',
firstDay: 1,
initStatus: '请选择日期',
isRTL: false
};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
let startDate = "", endDate = new Date()
let year = new Date().getFullYear()
let month = new Date().getMonth() + 1
if (statisticsType == '1') {
startDate = new Date(`${year}-${month}-01`)
} else if (statisticsType == '2') {
startDate = new Date(`${year}-01-01`)
} else if (statisticsType == '3') {
startDate = new Date(startDateParam)
endDate = new Date(endDateParam)
} else {
startDate = "-6d"
}
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd",
}).datepicker("setDate", startDate);
$("#datepicker2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", endDate);
$("#datepickerFp1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$("#datepickerFp2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$("#datepickerQc1").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
$("#datepickerQc2").datepicker({
changeMonth: true,
changeYear: true,
dateFormat: "yy/mm/dd"
}).datepicker("setDate", "");
getPageSet().then(res => {
$(".filter").click(); //初始查询
})
});
//分页渲染
function renderPagination(totalPage, activePage, totalNum) {
let str = `共${totalPage}页/${totalNum}条数据
`
if (totalPage <= 6) {
for (let i = 1; i <= totalPage; i++) {
str += `${i}`
}
} else {
if (activePage <= 3) { //选中页数小于4
for (let i = 1; i <= 4; i++) {
str += `${i}`
}
str += `...`
str += `${totalPage}`
} else if (activePage > totalPage - 3) {
str += `1`
str += `...`
str += `${totalPage - 3}`
str += `${totalPage - 2}`
str += `${totalPage - 1}`
str += `${totalPage}`
} else {
str += `1`
str += `...`
str += `${activePage - 1}`
str += `${activePage}`
str += `${activePage + 1}`
str += `...`
str += `${totalPage}`
}
}
str += `
`
$('.pagination').html(str)
$('.page' + activePage).addClass('activePage')
$(".pageNum").on("click", function (e) {
const activePageNow = Number($(this).attr('data-page'))
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
})
$(".prePage").on("click", function (e) {
let activePageNow = Number($(".activePage").attr('data-page'))
if (activePageNow > 1) {
activePageNow--
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
}
})
$(".nextPage").on("click", function (e) {
let activePageNow = Number($(".activePage").attr('data-page'))
if (activePageNow < totalPage) {
activePageNow++
getTabData(activePageNow)
// renderPagination(totalPage,activePageNow,totalNum)
}
})
}
$(document).on("click", function () {
$(".levelList ").css("display", "none")
$(".fpCheckList").css("display", "none")
$(".qcCheckList").css("display", "none")
$(".selectDept .arrow").attr("src", iconDown)
$(".selectLevel .arrow").attr("src", iconDown)
$(".fpSelectCheck .arrow").attr("src", iconDown)
$(".qcSelectCheck .arrow").attr("src", iconDown)
})
$(function ($) {
$('.export').click(function () {
const behosDateStartTime = new Date(behosDateStart).getTime()
const behosDateEndTime = new Date(behosDateEnd).getTime()
const exportTime = defectName && defectName !== 'undefined' ? exportTimeLimit.defectTime : exportTimeLimit.normalTime
if (behosDateStartTime > behosDateEndTime) {
$.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
// 判断是否是 住院超过31日病人数
let beHosGT31Days = null
if (fromDays && fromDays === "1") {
beHosGT31Days = 1
}
let param
let exportURL = ''
if (from == 9) {
exportURL = api.getDetailRecordListPageExport
param = {
behospitalCode: behospitalCode,
patName: name, //病人姓名
level: level,//病历等级
deptName: deptName == "全部" ? "" : deptName || "",
behDeptName: deptName == "全部" ? "" : deptName || "",
ascs: data_asc, //升序
descs: data_desc, //降序
ruleType: ruleType,
startDate: behosDateStart.replace(/\//g, '-'), //出院日期--开始时间
endDate: behosDateEnd.replace(/\//g, '-'), //出院日期--结束时间
casesEntryName: casesEntryName,
isPlacefile: isPlacefile,
casesEntryId: "",
casesId: casesId,
beHosGT31Days,
isReject: isSingleReject,
doctorName: doctorName,
doctorId: doctorNum,
checkStatus: qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
mrStatus: fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
chName: qcCheckName, //病历核查人员
diagnose: qcCheckMain,
mrName: fpCheckName, //首页核查人员
chTimeStart: qcCheckDateStart.replace(/\//g, '-'), //病历核查起始时间
chTimeEnd: qcCheckDateEnd.replace(/\//g, '-'), //病历核查截止时间
mrTimeStart: fpCheckDateStart.replace(/\//g, '-'), //首页核查起始时间
mrTimeEnd: fpCheckDateEnd.replace(/\//g, '-'), //首页核查截止时间
}
} else {
exportURL = api.doctorAverageLevelExport
param = {
behospitalCode: behospitalCode,
patName: name, //病人姓名
level: level,//病历等级
behDeptName: deptName == "全部" ? "" : deptName || "",
deptName: deptName == "全部" ? "" : deptName || "",
ascs: data_asc, //升序
descs: data_desc, //降序
behosDateStart: behosDateStart.replace(/\//g, '-'), //入院日期--开始时间
behosDateEnd: behosDateEnd.replace(/\//g, '-'), //入院日期--结束时间
leaveHosDateStart: behosDateStart.replace(/\//g, '-'), //出院日期--开始时间
leaveHosDateEnd: behosDateEnd.replace(/\//g, '-'), //出院日期--结束时间
casesEntryName: casesEntryName,
casesEntryId: casesEntryId,
casesId: casesId,
professor: professor,
beHosGT31Days,
deptId: deptId,
ruleType: ruleType,
isReject: isSingleReject,
doctorName: doctorName,
doctorCode: doctorNum,
checkStatus: qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
mrStatus: fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
chName: qcCheckName, //病历核查人员
diagnose: qcCheckMain,
mrName: fpCheckName, //首页核查人员
chTimeStart: qcCheckDateStart.replace(/\//g, '-'), //病历核查起始时间
chTimeEnd: qcCheckDateEnd.replace(/\//g, '-'), //病历核查截止时间
mrTimeStart: fpCheckDateStart.replace(/\//g, '-'), //首页核查起始时间
mrTimeEnd: fpCheckDateEnd.replace(/\//g, '-'), //首页核查截止时间
}
}
if (exportTime == 90) {
if ((new Date(behosDateEnd) - new Date(behosDateStart)) / 24 / 60 / 60 / 1000 > exportTime) {
$.alerModal({ "message": `最多只能导出${exportTime}天`, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
} else {
expJson(exportURL, param).then(res => {
downloadExportedData(res.data, $(".partTitle").text() + ".xls")
})
}
} else {
$.alerModal({ type: "radio", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
closeRadio()
radioSelect()
bindSaveColPort(param, exportURL)
}
})
});
function closeRadio() {
$(".colSetBox .iconClose,.colSetBox .cancalColSet", parent.document).off("click").on("click", function () {
$(".divModal", parent.document).remove()
})
}
function radioSelect() {
$(".selectDate", parent.document).click(function () {
$(this).find("input").prop("checked", true)
$(this).siblings().find("input").prop("checked", false)
})
}
function bindSaveColPort(param, exportURL) {
$(".savePort", parent.document).off("click").on("click", function () {
let radioCheck = $(".selectDate input[type='radio']:checked", parent.document).attr("data-select")
let time = radioCheck == 2 ? exportTimeLimit.defectTime : exportTimeLimit.normalTime
if ((new Date(behosDateEnd) - new Date(behosDateStart)) / 24 / 60 / 60 / 1000 > time) {
$.alerModal({ "message": `最多只能导出${time}天`, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
return
}
param.radioCheck = radioCheck || 1
expJson(exportURL, param).then(res => {
$(".divModal", parent.document).remove()
downloadExportedData(res.data, $(".partTitle").text() + ".xls")
})
})
}