|
@@ -0,0 +1,918 @@
|
|
|
|
+const $ = require('jquery');
|
|
|
|
+require("../css/appealHistory.less");
|
|
|
|
+require('./modal.js');
|
|
|
|
+const { api } = require('./api.js')
|
|
|
|
+const { post, getCookie, getLocal, getUrlArgObjectNew, emptyBox, downloadExportedData, expJson, getLogoParam, listenScroll, getPickerDate, exportTimeLimit } = 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")
|
|
|
|
+listenScroll()
|
|
|
|
+let pageSet = [], pageSetCopy = [], showNum = 0, scrollTop = 0;
|
|
|
|
+$(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+$(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+$(".fpSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+$(".qcSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+let srcUrl = $("#contentIframe", parent.document).attr("src")
|
|
|
|
+let statisticsType = getUrlArgObjectNew("dateType", srcUrl) || getUrlArgObjectNew("shijian", srcUrl) || ""
|
|
|
|
+let chengdu = getUrlArgObjectNew("chengdu", srcUrl) || ""
|
|
|
|
+let deptIdPram = getUrlArgObjectNew("deptId", srcUrl) || ""
|
|
|
|
+let deptNamePram = getUrlArgObjectNew("deptName", srcUrl) || ""
|
|
|
|
+let docName = getUrlArgObjectNew("docName", srcUrl) || ""
|
|
|
|
+let startDateParam = getUrlArgObjectNew("startDateParam", srcUrl) || ""
|
|
|
|
+let endDateParam = getUrlArgObjectNew("endDateParam", srcUrl) || ""
|
|
|
|
+let tabList = [], name = "", behospitalCode = "", deptName = "", deptNameTemp = "", behosDateStart = "", level = "", behosDateEnd = "", scoreSum = 0, nameTemp = "",
|
|
|
|
+ behospitalCodeTemp = "", levelTemp = "", deptId = "", deptIdTemp = "", doctorName = "", doctorNameTemp = "", doctorNum = "", doctorNumTemp = "",
|
|
|
|
+ fpCheckStatus = "", fpCheckStatusTemp = "", fpCheckName = "", fpCheckNameTemp = "", qcCheckName = "", qcCheckNameTemp = "", qcCheckMain = "", qcCheckMainTemp = "", qcCheckStatus = "", qcCheckStatusTemp = "",
|
|
|
|
+ data_desc = ["leave_hospital_date"], data_asc = [];
|
|
|
|
+let isPlacefile = getCookie('isPlacefile') || 1
|
|
|
|
+
|
|
|
|
+if (chengdu) {
|
|
|
|
+ levelTemp = chengdu
|
|
|
|
+ level = chengdu
|
|
|
|
+ $('.selectLevel').html(chengdu)
|
|
|
|
+ $(".levelList").css("display", "none")
|
|
|
|
+ $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+if (deptNamePram) {
|
|
|
|
+ deptIdTemp = deptId = deptIdPram
|
|
|
|
+ deptName = deptNameTemp = deptNamePram
|
|
|
|
+ if (deptNamePram.length > 10) {
|
|
|
|
+ $('.selectDept').html(deptNamePram.substring(0, 8) + '...')
|
|
|
|
+ } else {
|
|
|
|
+ $('.selectDept').html(deptNamePram)
|
|
|
|
+ }
|
|
|
|
+ $('.selectDept ').attr('title', deptNamePram)
|
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
|
+ $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+}
|
|
|
|
+$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
|
|
+$('.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()
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+$(".menu .page", parent.document).removeClass("active")
|
|
|
|
+$(parent.document).find(".menu .page[code=YH-SSXX-SSJL]").addClass("active")
|
|
|
|
+
|
|
|
|
+function getTabData(activePage, qcCheckMain) {
|
|
|
|
+ const behosDateStart = getPickerDate($("#datepicker"), 1)
|
|
|
|
+ const behosDateEnd = getPickerDate($("#datepicker2"), 2)
|
|
|
|
+ const param = {
|
|
|
|
+ current: activePage,
|
|
|
|
+ deptId: deptId.trim(),
|
|
|
|
+ asc: data_asc, //升序
|
|
|
|
+ desc: data_desc, //降序
|
|
|
|
+ doctorName: doctorName,
|
|
|
|
+ deptName: deptName == "全部" ? "" : deptName || '',
|
|
|
|
+ size: 15,
|
|
|
|
+ complaintDateEnd: behosDateEnd.replaceAll("/", "-"),
|
|
|
|
+ complaintDateStart: behosDateStart.replaceAll("/", "-"),
|
|
|
|
+ statisticsType: statisticsType,
|
|
|
|
+ checkStatus: qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
|
|
|
|
+ mrStatus: fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
|
|
|
|
+ chName: qcCheckName, //病历核查人员
|
|
|
|
+ diagnose: qcCheckMain, //病历主症状..........
|
|
|
|
+ mrName: fpCheckName, //首页核查人员
|
|
|
|
+ }
|
|
|
|
+ $('.pagination').html("")
|
|
|
|
+ $('.tbody').html(emptyBox('努力加载中...', '', 1))
|
|
|
|
+ return post(api.getComplaintRecord, param).then(res => {
|
|
|
|
+ if (res.data.code == '0') {
|
|
|
|
+ tabList = res.data.data.data.records
|
|
|
|
+ const totalPage = res.data.data.data.pages
|
|
|
|
+ const totalNum = res.data.data.data.total
|
|
|
|
+ renderTab(tabList)
|
|
|
|
+ renderPagination(totalPage, Number(activePage), totalNum)
|
|
|
|
+ if (totalPage > 1) {
|
|
|
|
+ renderPagination(totalPage, Number(activePage), totalNum)
|
|
|
|
+ } else {
|
|
|
|
+ $('.pagination').html("")
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ const token = localStorage.getItem('accessToken');
|
|
|
|
+ if (!token && window.location.href.indexOf('login') == -1) {
|
|
|
|
+ //alert('无token判断,跳回登录')
|
|
|
|
+ } else {
|
|
|
|
+ $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }).catch((e) => {
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+$(".filter").on("click", function (e) {
|
|
|
|
+ behosDateStart = $("#datepicker").val()
|
|
|
|
+ behosDateEnd = $("#datepicker2").val()
|
|
|
|
+ console.log(behosDateStart);
|
|
|
|
+ const behosDateStartTime = new Date(behosDateStart).getTime()
|
|
|
|
+ const behosDateEndTime = new Date(behosDateEnd).getTime()
|
|
|
|
+ if (behosDateStartTime > behosDateEndTime) {
|
|
|
|
+ $.alerModal({ "message": '出院日期开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (behosDateStart) {
|
|
|
|
+ behosDateStart = behosDateStart.replace(/\//g, '-') + ' 00:00:00'
|
|
|
|
+ }
|
|
|
|
+ if (behosDateEnd) {
|
|
|
|
+ behosDateEnd = behosDateEnd.replace(/\//g, '-') + ' 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
|
|
|
|
+ getTabData(1, qcCheckMain)
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+$(".abnormalClear").on("click", function (e) {
|
|
|
|
+ tabList = [];
|
|
|
|
+ name = "";
|
|
|
|
+ behospitalCode = "";
|
|
|
|
+ level = "";
|
|
|
|
+ scoreSum = 0;
|
|
|
|
+ nameTemp = "";
|
|
|
|
+ behospitalCodeTemp = "";
|
|
|
|
+ levelTemp = "";
|
|
|
|
+ deptId = "";
|
|
|
|
+ deptIdTemp = "";
|
|
|
|
+ deptName = deptNameTemp = "";
|
|
|
|
+ doctorName = "";
|
|
|
|
+ fpCheckName = "";
|
|
|
|
+ qcCheckName = "";
|
|
|
|
+ qcCheckMain = "";
|
|
|
|
+ doctorNum = "";
|
|
|
|
+ doctorNameTemp = "";
|
|
|
|
+ doctorNumTemp = "";
|
|
|
|
+ fpCheckNameTemp = "";
|
|
|
|
+ qcCheckNameTemp = "";
|
|
|
|
+ qcCheckMainTemp = "";
|
|
|
|
+ fpCheckStatus = "";
|
|
|
|
+ fpCheckStatusTemp = "";
|
|
|
|
+ qcCheckStatus = "";
|
|
|
|
+ qcCheckStatusTemp = ""
|
|
|
|
+ data_desc = ["leave_hospital_date"]
|
|
|
|
+ if (isPlacefile != 1) {
|
|
|
|
+ data_desc = ["behospital_date"]
|
|
|
|
+ }
|
|
|
|
+ data_asc = [];
|
|
|
|
+ $('.patientNumInp').val('')
|
|
|
|
+ $('.patientNameInp').val('')
|
|
|
|
+ $('.doctorInp').val('')
|
|
|
|
+ $('.doctorNumInp').val('')
|
|
|
|
+ $('.doctorInp').val('')
|
|
|
|
+ $('.fpCheckPeople').val('')
|
|
|
|
+ $('.qcCheckPeople').val('')
|
|
|
|
+ $('.qcCheckMain').val('')
|
|
|
|
+ // $('#datepicker').val('')
|
|
|
|
+ // $('#datepicker2').val('')
|
|
|
|
+ //默认日期为近一周
|
|
|
|
+ $("#datepicker").datepicker({
|
|
|
|
+ changeMonth: true,
|
|
|
|
+ changeYear: true,
|
|
|
|
+ dateFormat: "yy/mm/dd",
|
|
|
|
+ }).datepicker("setDate", "-6d");
|
|
|
|
+ $("#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", "");
|
|
|
|
+ $('.selectDept ').html('全部')
|
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
|
+ $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ // $('.selectDept ').addClass('unSelect')
|
|
|
|
+ $('.selectLevel').html('全部')
|
|
|
|
+ $(".levelList").css("display", "none")
|
|
|
|
+ $(".selectLevel").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ // $('.selectLevel ').addClass('unSelect')
|
|
|
|
+ $('.fpSelectCheck').html('全部')
|
|
|
|
+ $(".fpCheckList").css("display", "none")
|
|
|
|
+ $(".fpSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ $('.qcSelectCheck').html('全部')
|
|
|
|
+ $(".qcCheckList").css("display", "none")
|
|
|
|
+ $(".qcSelectCheck").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ $("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.replace(/\//g, '-') + ' 00:00:00'
|
|
|
|
+ }
|
|
|
|
+ if (behosDateEnd) {
|
|
|
|
+ behosDateEnd = behosDateEnd.replace(/\//g, '-') + ' 23:59:59'
|
|
|
|
+ }
|
|
|
|
+ getTabData(1)
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+function renderTab(data) {
|
|
|
|
+ let str = ``
|
|
|
|
+ if (data.length === 0) {
|
|
|
|
+ $('.tbody').html(emptyBox(null, showNum + 2))
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
|
+ const item = data[i]
|
|
|
|
+ str += `
|
|
|
|
+ <tr data-index=${i} data-doc="${item.doctorName || ""}" data-docId="${item.doctorId || ""}">
|
|
|
|
+ <td >${item.claimantName || "-"}</td>
|
|
|
|
+ <td >${item.behDeptName || "-"}</td>
|
|
|
|
+ <td >${item.claimantGmtCreate}</td>
|
|
|
|
+ <td >${item.behospitalCode}</td>
|
|
|
|
+ <td >${item.name || "-"}</td>
|
|
|
|
+ <td >${item.modeName || "-"}</td>
|
|
|
|
+ <td >${item.defectContent || "-"}</td>
|
|
|
|
+ <td >${item.checkName || "-"}</td>
|
|
|
|
+ <td >${item.checkGmtCreate || "-"}</td>
|
|
|
|
+ <td >${item.appealOperationType == 0 ? '删改条目' : item.appealOperationType == 1 ? '新增已有条目' : item.appealOperationType == 2 ? '新增缺失条目' : '恢复条目'}</td>
|
|
|
|
+ <td >${item.exampleStatus == 0 ? '待审核' : item.exampleStatus == 1 ? '驳回' : '通过'}</td>
|
|
|
|
+ <td >
|
|
|
|
+ ${item.exampleStatus == 0 ? `<span class="appealBtn">查看</span><span class="appealBtn">撤回</span>` : ''}
|
|
|
|
+ ${item.exampleStatus == 1 || item.exampleStatus == 2 ? `<span class="appealBtn">再次申述</span>` : ''}
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ `
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $('.tbody').html(str)
|
|
|
|
+ bindScoreDetail();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+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, code, name) {
|
|
|
|
+ const logoParam = getLogoParam();
|
|
|
|
+ window.open(`./appealUserPage.html?id=${id}&age=${age}&code=${code}&hid=${getCookie('hospitalid')}&name=${name}` + logoParam)
|
|
|
|
+}
|
|
|
|
+function bindScoreDetail() {
|
|
|
|
+ $('.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 == '未评分'
|
|
|
|
+ const checkStatus = tabList[index].checkStatus
|
|
|
|
+ if (noScore) {
|
|
|
|
+ $.alerModal({ "message": '请先进行评分!', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
|
+ return
|
|
|
|
+ } else {
|
|
|
|
+ scoreDetail(id, age, 'YH-BLZK-ZKSSKS', tabList[index].name)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//选择病历等级
|
|
|
|
+$('.selectLevel').on("click", function (e) {
|
|
|
|
+ e.stopPropagation()
|
|
|
|
+ $(".deptList ").css("display", "none")
|
|
|
|
+ $(".selectDept .arrow").attr("src", iconDown)
|
|
|
|
+ $(".checkList ").css("display", "none")
|
|
|
|
+ $(".selectCheck .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(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ $('.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(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ $('.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(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
|
+ $('.qcSelectCheck').removeClass('unSelect')
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+$('.selectDept').on("click", function (e) {
|
|
|
|
+ e.stopPropagation()
|
|
|
|
+ $(".levelList ").css("display", "none")
|
|
|
|
+ $(".selectLevel .arrow").attr("src", iconDown)
|
|
|
|
+ $(".checkList ").css("display", "none")
|
|
|
|
+ $(".selectCheck .arrow").attr("src", iconDown)
|
|
|
|
+ $(".fpCheckList ").css("display", "none")
|
|
|
|
+ $(".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)
|
|
|
|
+ }
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+//获取科室列表
|
|
|
|
+getDeptList()
|
|
|
|
+function getDeptList() {
|
|
|
|
+ post(api.getDeptListDept, { inputStr: "" }).then(res => {
|
|
|
|
+ if (res.data.code == '0') {
|
|
|
|
+ const deptList = res.data.data
|
|
|
|
+ rendeDeptList(deptList)
|
|
|
|
+ } else { }
|
|
|
|
+ }).catch((e) => {
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+function rendeDeptList(deptList) {
|
|
|
|
+ let str = `<li class="deptItem ellipsis" 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].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
|
|
|
|
+ deptName = 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="下拉">`)
|
|
|
|
+ $('.selectDept').removeClass('unSelect')
|
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+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 = `<div class='colSetBox'>
|
|
|
|
+ <div class='mask'></div>
|
|
|
|
+ <div class='cloInfobox'>
|
|
|
|
+ <div class='cloInfoTitle'><span class='cloInfoTitleTxt'>列显示设置</span> <img class="iconClose" src=${require('./../images/icon_close_default.png')} alt="关闭" /></div>
|
|
|
|
+ <div class='cloInfo'></div>
|
|
|
|
+ <div class='btnBox'><span class='defaultColSet'>恢复默认</span> <span class='cancalColSet'>取消</span> <span class='saveColSet'>保存设置</span></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>`
|
|
|
|
+ let infoStr = `<div class='colTabTitle' ><span class='colOpera toggleSelectColAll' data-select=${allSelect}>${allSelect ? `<img src=${iconCheck} />` : `<img src=${iconUnCheck} />`}全选</span><span class='colName'>列名</span></div><div class='colTabInfoBox' >`
|
|
|
|
+ for (let i = 0; i < pageSetList.length; i++) {
|
|
|
|
+ infoStr += `<div class='colTabInfo' data-index=${i}>
|
|
|
|
+ <span class='colOpera' data-index=${i}>${pageSetList[i].status == 1 ? `<img class="toggleSelectCol" src=${iconCheck} />` : `<img class="toggleSelectCol" src=${iconUnCheck} />`}</span>
|
|
|
|
+ <span class='colName'>
|
|
|
|
+ <span>${pageSetList[i].name}</span>
|
|
|
|
+ <span class="pageOrder">
|
|
|
|
+ <span class="pageSetUpBox">${i === 0 ? '' : `<img class="pageSetUp" src=${goUpG} />`}</span>
|
|
|
|
+ <span class="pageSetDownBox">${i === pageSetList.length - 1 ? '' : `<img class="pageSetDown" src=${goDownG} />`}</span>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ </div>`
|
|
|
|
+ }
|
|
|
|
+ infoStr += "</div>"
|
|
|
|
+ // $(".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()
|
|
|
|
+ } 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()
|
|
|
|
+ qcCheckMain = 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", "");
|
|
|
|
+ getTabData(1)
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+//分页渲染
|
|
|
|
+function renderPagination(totalPage, activePage, totalNum) {
|
|
|
|
+ let str = `<span class="totalSum">共${totalPage}页/${totalNum}条数据</span><span class="prePage"><img class="arrowPage" src=${arrowLeft} /></span>`
|
|
|
|
+ if (totalPage <= 6) {
|
|
|
|
+ for (let i = 1; i <= totalPage; i++) {
|
|
|
|
+
|
|
|
|
+ str += `<span class="pageNum ${'page' + i}" data-page=${i}>${i}</span>`
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (activePage <= 3) { //选中页数小于4
|
|
|
|
+ for (let i = 1; i <= 4; i++) {
|
|
|
|
+ str += `<span class="pageNum ${'page' + i}" data-page=${i}>${i}</span>`
|
|
|
|
+ }
|
|
|
|
+ str += `<span class="more" >...</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
|
|
|
|
+
|
|
|
|
+ } else if (activePage > totalPage - 3) {
|
|
|
|
+ str += `<span class="pageNum page1" data-page=1>1</span>`
|
|
|
|
+ str += `<span class="more" >...</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + (totalPage - 3)}" data-page=${totalPage - 3}>${totalPage - 3}</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + (totalPage - 2)}" data-page=${totalPage - 2}>${totalPage - 2}</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + (totalPage - 1)}" data-page=${totalPage - 1}>${totalPage - 1}</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
|
|
|
|
+ } else {
|
|
|
|
+ str += `<span class="pageNum page1" data-page=1>1</span>`
|
|
|
|
+ str += `<span class="more" >...</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + (activePage - 1)}" data-page=${activePage - 1}>${activePage - 1}</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + activePage}" data-page=${activePage}>${activePage}</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + (activePage + 1)}" data-page=${activePage + 1}>${activePage + 1}</span>`
|
|
|
|
+ str += `<span class="more" >...</span>`
|
|
|
|
+ str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ str += `<span class="nextPage"><img class="arrowPage" src=${arrowRight} /></span>`
|
|
|
|
+ $('.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")
|
|
|
|
+ $(".deptList").css("display", "none")
|
|
|
|
+ $(".checkList").css("display", "none")
|
|
|
|
+ $(".fpCheckList").css("display", "none")
|
|
|
|
+ $(".qcCheckList").css("display", "none")
|
|
|
|
+ $(".selectDept .arrow").attr("src", iconDown)
|
|
|
|
+ $(".selectLevel .arrow").attr("src", iconDown)
|
|
|
|
+ $(".selectCheck .arrow").attr("src", iconDown)
|
|
|
|
+ $(".fpSelectCheck .arrow").attr("src", iconDown)
|
|
|
|
+ $(".qcSelectCheck .arrow").attr("src", iconDown)
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+let radioCheck = 1;
|
|
|
|
+$((function ($) {
|
|
|
|
+ $('.export').click(function () {
|
|
|
|
+ const behosDateStartTime = new Date(behosDateStart).getTime()
|
|
|
|
+ const behosDateEndTime = new Date(behosDateEnd).getTime()
|
|
|
|
+ if (behosDateStartTime > behosDateEndTime) {
|
|
|
|
+ $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ const param = {
|
|
|
|
+ "behospitalCode": behospitalCode,
|
|
|
|
+ "deptId": deptId.trim(),
|
|
|
|
+ "doctorCode": doctorNum,
|
|
|
|
+ "doctorName": doctorName,
|
|
|
|
+ "asc": data_asc, //升序
|
|
|
|
+ "desc": data_desc, //降序
|
|
|
|
+ "leaveHosDateStart": isPlacefile == 1 ? behosDateStart : '', //出院日期--开始时间
|
|
|
|
+ "leaveHosDateEnd": isPlacefile == 1 ? behosDateEnd : '', //出院日期--结束时间
|
|
|
|
+ "behosDateStart": isPlacefile == 1 ? '' : behosDateStart, //出院日期--开始时间
|
|
|
|
+ "behosDateEnd": isPlacefile == 1 ? '' : behosDateEnd, //出院日期--结束时间
|
|
|
|
+ "isPlacefile": isPlacefile,
|
|
|
|
+ "level": level,
|
|
|
|
+ "name": name,
|
|
|
|
+ "checkStatus": qcCheckStatus ? Number(qcCheckStatus) : qcCheckStatus, //病历核查状态
|
|
|
|
+ "mrStatus": fpCheckStatus ? Number(fpCheckStatus) : fpCheckStatus, //首页核查状态(1:已核查,0:未核查)
|
|
|
|
+ "chName": qcCheckName, //病历核查人员
|
|
|
|
+ "diagnose": qcCheckMain, //病历主症状..........
|
|
|
|
+ "mrName": fpCheckName, //首页核查人员
|
|
|
|
+ "deptName": deptName == "全部" ? "" : deptName || '',
|
|
|
|
+ "statisticsType": statisticsType,
|
|
|
|
+ }
|
|
|
|
+ $.alerModal({ type: "radio", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
|
+ closeRadio()
|
|
|
|
+ radioSelect()
|
|
|
|
+ bindSaveColPort(param)
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+})($));
|
|
|
|
+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) {
|
|
|
|
+ $(".savePort", parent.document).off("click").on("click", function () {
|
|
|
|
+ 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(api.exportQcListDept, param).then(res => {
|
|
|
|
+ $(".divModal", parent.document).remove()
|
|
|
|
+ downloadExportedData(res.data, behosDateStart.slice(0, 10).replace(/-/g, "") + "-" + behosDateEnd.slice(0, 10).replace(/-/g, "") + "抽查住院病历质量情况.xls")
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+}
|