|
@@ -1,40 +1,40 @@
|
|
|
const $ = require('jquery');
|
|
|
require("../css/readmission.less");
|
|
|
require('./modal.js');
|
|
|
-const {api} = require('./api.js')
|
|
|
-const { post, getCookie, getUrlArgObjectNew, emptyBox, setTitleTxt, setDatePicker,getLogoParam,getPickerDate,expJson,downloadExportedData,initScroll,listenScroll} = require('./utils.js')
|
|
|
+const { api } = require('./api.js')
|
|
|
+const { post, getCookie, getUrlArgObjectNew, emptyBox, setTitleTxt, setDatePicker, getLogoParam, getPickerDate, expJson, downloadExportedData, initScroll, listenScroll } = 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 iconCheck = require("./../images/icon_check.png")
|
|
|
const iconUnCheck = require("./../images/icon_unchecked.png")
|
|
|
-const iconDown= require("./../images/arrow_down.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 arrowLeft = require("./../images/arrow_left.png")
|
|
|
const arrowRight = require("./../images/arrow_right.png")
|
|
|
-let deptName = "", behospitalCode="", deptNameTemp = "",deptId='',deptIdTemp='', behospitalCodeTemp="", data_desc="",data_asc="",deptRecord="",patientName="" ;
|
|
|
-let srcUrl = $("#contentIframe",parent.document).attr("src")
|
|
|
-statisticsType = getUrlArgObjectNew("dateType",srcUrl)||"";
|
|
|
-from = getUrlArgObjectNew("from",srcUrl)||""
|
|
|
-lineType = getUrlArgObjectNew("lineType",srcUrl)||""
|
|
|
-let startDateParam = getUrlArgObjectNew("startDateParam",srcUrl)||""
|
|
|
-let endDateParam = getUrlArgObjectNew("endDateParam",srcUrl)||""
|
|
|
+let deptName = "", behospitalCode = "", deptNameTemp = "", deptId = '', deptIdTemp = '', behospitalCodeTemp = "", data_desc = "", data_asc = "", deptRecord = "", patientName = "";
|
|
|
+let srcUrl = $("#contentIframe", parent.document).attr("src")
|
|
|
+statisticsType = getUrlArgObjectNew("dateType", srcUrl) || "";
|
|
|
+from = getUrlArgObjectNew("from", srcUrl) || ""
|
|
|
+lineType = getUrlArgObjectNew("lineType", srcUrl) || ""
|
|
|
+let startDateParam = getUrlArgObjectNew("startDateParam", srcUrl) || ""
|
|
|
+let endDateParam = getUrlArgObjectNew("endDateParam", srcUrl) || ""
|
|
|
// $(".selectDept").append(`<img class="arrow" src=${iconDown} alt="下拉">`)
|
|
|
/*if(lineType){
|
|
|
$("th[code="+data_desc+"]").addClass("desc");
|
|
|
}*/
|
|
|
//setTitleTxt('',from) //导航栏面包屑
|
|
|
listenScroll()
|
|
|
-if(statisticsType == 1){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),1)
|
|
|
-}else if(statisticsType == 2){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),2)
|
|
|
-}else if(statisticsType == 3){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),3,new Date(startDateParam),new Date(endDateParam))
|
|
|
-}else{
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),'default')
|
|
|
+if (statisticsType == 1) {
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 1)
|
|
|
+} else if (statisticsType == 2) {
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 2)
|
|
|
+} else if (statisticsType == 3) {
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 3, new Date(startDateParam), new Date(endDateParam))
|
|
|
+} else {
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 'default')
|
|
|
}
|
|
|
-let isPlacefile = getCookie('isPlacefile')||1
|
|
|
+let isPlacefile = getCookie('isPlacefile') || 1
|
|
|
|
|
|
// $( "#datepicker" ).datepicker({
|
|
|
// changeMonth: true,
|
|
@@ -48,7 +48,7 @@ let isPlacefile = getCookie('isPlacefile')||1
|
|
|
// }).datepicker( "setDate",new Date(endDateParam));
|
|
|
|
|
|
|
|
|
-if(from==2){
|
|
|
+if (from == 2) {
|
|
|
// $(".export").css('display','none')
|
|
|
// $(".partTitle .titlePic ").html(`<a class="consoleD" href="deptConsole.html">控制台(科室) / </a><a class="consoleP" href="singleVeto.html?from=1">条目缺陷占比 / </a>缺陷详情`)
|
|
|
// deptId=deptListDept[0]&&deptListDept[0].deptId;
|
|
@@ -56,25 +56,25 @@ if(from==2){
|
|
|
// deptNameTemp=deptListDept[0]&&deptListDept[0].deptName;
|
|
|
// deptIdTemp=deptListDept[0]&&deptListDept[0].deptId;
|
|
|
// $('.selectDept').html(deptName)
|
|
|
-}else if(from==3){
|
|
|
-// $(".partTitle .titlePic ").html(`<a href="keyItemFlawControl.html">关键条目缺陷占比 / </a>缺陷详情`)
|
|
|
-}else{
|
|
|
+} else if (from == 3) {
|
|
|
+ // $(".partTitle .titlePic ").html(`<a href="keyItemFlawControl.html">关键条目缺陷占比 / </a>缺陷详情`)
|
|
|
+} else {
|
|
|
$(".partTitle .titlePic ").html(`<a class="consoleD" href="console.html">控制台 / </a>31日再入院病历数`)
|
|
|
}
|
|
|
|
|
|
-if(!statisticsType){
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),'default')
|
|
|
+if (!statisticsType) {
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), 'default')
|
|
|
}
|
|
|
-$(".abnormalClear").click(function(){
|
|
|
- data_desc="";
|
|
|
- data_asc="";
|
|
|
- deptId="";
|
|
|
- deptIdTemp="";
|
|
|
- deptName="";
|
|
|
- deptNameTemp="";
|
|
|
- patientName= "";
|
|
|
- deptRecord="";
|
|
|
- setDatePicker($("#datepicker"),$("#datepicker2"),"default")
|
|
|
+$(".abnormalClear").click(function () {
|
|
|
+ data_desc = "";
|
|
|
+ data_asc = "";
|
|
|
+ deptId = "";
|
|
|
+ deptIdTemp = "";
|
|
|
+ deptName = "";
|
|
|
+ deptNameTemp = "";
|
|
|
+ patientName = "";
|
|
|
+ deptRecord = "";
|
|
|
+ setDatePicker($("#datepicker"), $("#datepicker2"), "default")
|
|
|
$('.patientRecordInp').val('')
|
|
|
$('.patientNameInp').val('')
|
|
|
// $(".deptList").css("display", "none")
|
|
@@ -83,10 +83,10 @@ $(".abnormalClear").click(function(){
|
|
|
//behospitalCode =behospitalCodeTemp= ""
|
|
|
getTabData(1)
|
|
|
})
|
|
|
-$(".partTitle a").click(function(){
|
|
|
+$(".partTitle a").click(function () {
|
|
|
//初始菜单选中
|
|
|
- $(".menu .page",parent.document).removeClass("active").eq(0).addClass("active");
|
|
|
- $(".container",parent.document).addClass("console-cont");
|
|
|
+ $(".menu .page", parent.document).removeClass("active").eq(0).addClass("active");
|
|
|
+ $(".container", parent.document).addClass("console-cont");
|
|
|
})
|
|
|
$(".menu .page", parent.document).removeClass("active")
|
|
|
const ele = $(parent.document).find(".menu .page[code=YH-ZKK-31TZRYRS]")
|
|
@@ -96,9 +96,9 @@ ele.addClass("active")
|
|
|
// parEle.click();
|
|
|
// }
|
|
|
|
|
|
-setTimeout(function(){
|
|
|
- $(".menuList",parent.document).scrollTop(768)
|
|
|
-},300)
|
|
|
+setTimeout(function () {
|
|
|
+ $(".menuList", parent.document).scrollTop(768)
|
|
|
+}, 300)
|
|
|
|
|
|
//判断有无某一权限
|
|
|
/*function hasData(data){
|
|
@@ -112,59 +112,65 @@ setTimeout(function(){
|
|
|
}
|
|
|
return false;
|
|
|
}*/
|
|
|
-function getTabData(activePage){
|
|
|
- const dateStatrt = getPickerDate($("#datepicker"),1)
|
|
|
- const dateEnd = getPickerDate($("#datepicker2"),2)
|
|
|
+function getTabData(activePage) {
|
|
|
+ const dateStatrt = getPickerDate($("#datepicker"), 1)
|
|
|
+ const dateEnd = getPickerDate($("#datepicker2"), 2)
|
|
|
const start = new Date(dateStatrt).getTime()
|
|
|
const end = new Date(dateEnd).getTime()
|
|
|
- if(start > end){
|
|
|
- $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
+ if (start > end) {
|
|
|
+ $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
return
|
|
|
}
|
|
|
const param = {
|
|
|
- current:activePage,
|
|
|
+ current: activePage,
|
|
|
size: 10,
|
|
|
- name:patientName,
|
|
|
- fileCode:deptRecord,
|
|
|
- startDate:dateStatrt.replace(/\//g,'-'),
|
|
|
- endDate:dateEnd.replace(/\//g,'-')
|
|
|
+ name: patientName,
|
|
|
+ fileCode: deptRecord,
|
|
|
+ startDate: dateStatrt.replace(/\//g, '-'),
|
|
|
+ endDate: dateEnd.replace(/\//g, '-')
|
|
|
}
|
|
|
startDateParam = dateStatrt
|
|
|
endDateParam = dateEnd
|
|
|
$('.pagination').html("")
|
|
|
- $('.tbody').html(emptyBox('努力加载中...','',1))
|
|
|
- post(api.reHos31DaysPage,param).then(res =>{
|
|
|
- if(res.data.code == '0'){
|
|
|
- const data = res.data.data||[];
|
|
|
+ $('.tbody').html(emptyBox('努力加载中...', '', 1))
|
|
|
+ post(api.reHos31DaysPage, param).then(res => {
|
|
|
+ if (res.data.code == '0') {
|
|
|
+ const data = res.data.data || [];
|
|
|
const totalPage = data.pages;
|
|
|
const totalNum = data.total;
|
|
|
- renderTab(data,data.hospitalId,activePage);
|
|
|
- renderPagination(totalPage,Number(activePage),totalNum)
|
|
|
- if(totalPage > 1){
|
|
|
- renderPagination(totalPage,Number(activePage),totalNum)
|
|
|
- } else{
|
|
|
+ renderTab(data, data.hospitalId, activePage);
|
|
|
+ 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)});
|
|
|
+ } 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) =>{
|
|
|
+ }).catch((e) => {
|
|
|
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
getTabData(1)
|
|
|
|
|
|
-$(".filter").on("click", function(e){
|
|
|
+$(".filter").on("click", function (e) {
|
|
|
// deptName = deptNameTemp;
|
|
|
behospitalCode = behospitalCodeTemp;
|
|
|
getTabData(1)
|
|
|
})
|
|
|
// // 处理th tr数据
|
|
|
-function formatTableData(data){
|
|
|
- let newColumns = data.filter(function(item,index){
|
|
|
- if(item.isShow === 1) {
|
|
|
+function formatTableData(data) {
|
|
|
+ let newColumns = data.filter(function (item, index) {
|
|
|
+ if (item.isShow === 1) {
|
|
|
return item
|
|
|
}
|
|
|
})
|
|
@@ -172,20 +178,20 @@ function formatTableData(data){
|
|
|
}
|
|
|
|
|
|
|
|
|
-function renderTab(data,hisId,activePage){
|
|
|
+function renderTab(data, hisId, activePage) {
|
|
|
data = data.records;
|
|
|
let newData = []
|
|
|
- for(var i = 0; i < data.length ; i++) {
|
|
|
- let dataCopy = {copy: true, ...data[i]}
|
|
|
- newData = [...newData,data[i],dataCopy]
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ let dataCopy = { copy: true, ...data[i] }
|
|
|
+ newData = [...newData, data[i], dataCopy]
|
|
|
}
|
|
|
let str = ``
|
|
|
- for(let i = 0; i < newData.length; i++){
|
|
|
- const item = newData[i]
|
|
|
- if(!item.copy){
|
|
|
- str += `
|
|
|
+ for (let i = 0; i < newData.length; i++) {
|
|
|
+ const item = newData[i]
|
|
|
+ if (!item.copy) {
|
|
|
+ str += `
|
|
|
<tr data-index=${i}>
|
|
|
- <td class="textCenter" rowspan="2">${Math.ceil(((activePage-1)*20 + i+1)/2)}</td>
|
|
|
+ <td class="textCenter" rowspan="2">${Math.ceil(((activePage - 1) * 20 + i + 1) / 2)}</td>
|
|
|
<td class="textCenter">${item.details[0].behospitalCode || "-"}</td>
|
|
|
<td class="textCenter" rowspan="2">${item.fileCode || "-"}</td>
|
|
|
<td class="textCenter patientNameSpan" data-id="${item.details[0].behospitalCode}" data-name="${item.details[1].name}" >${item.details[0].name || "-"}</td>
|
|
@@ -203,8 +209,8 @@ function renderTab(data,hisId,activePage){
|
|
|
<td class="textCenter" rowspan="2">${item.lastAgainBehospitalPlan || "-"}</td>
|
|
|
</tr>
|
|
|
`
|
|
|
- }else{
|
|
|
- str += `
|
|
|
+ } else {
|
|
|
+ str += `
|
|
|
<tr data-index=${i} class="copy">
|
|
|
<td class="textCenter delete"></td>
|
|
|
<td class="textCenter">${item.details[1].behospitalCode || "-"}</td>
|
|
@@ -224,52 +230,52 @@ function renderTab(data,hisId,activePage){
|
|
|
<td class="textCenter delete">${item.lastAgainBehospitalPlan || "-"}</td>
|
|
|
</tr>
|
|
|
`
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- $('.tbody').html(str?str:emptyBox())
|
|
|
+ $('.tbody').html(str ? str : emptyBox())
|
|
|
$(".tbody .copy .delete").hide()
|
|
|
/*bindScoreDetail(hisId)*/
|
|
|
// 跳转至详情页
|
|
|
- $(".goHomeDetail").click(function(){
|
|
|
+ $(".goHomeDetail").click(function () {
|
|
|
let casesName = $(this).attr("data-name") || '';
|
|
|
let casesId = $(this).attr("data-id");
|
|
|
- let name=$(this).attr("dept-name");
|
|
|
- name=name==="全院"?"全部":name;
|
|
|
- let id=$(this).attr("dept-id");
|
|
|
+ let name = $(this).attr("dept-name");
|
|
|
+ name = name === "全院" ? "全部" : name;
|
|
|
+ let id = $(this).attr("dept-id");
|
|
|
|
|
|
- $(parent.document).find("#contentIframe").attr("src","uccDetail.html?from=3&deptName="+name+"&deptId="+id+"&casesEntryId="+casesId+"&defectName="+casesName+"&startDate="+startDateParam+"&endDate="+endDateParam)
|
|
|
+ $(parent.document).find("#contentIframe").attr("src", "uccDetail.html?from=3&deptName=" + name + "&deptId=" + id + "&casesEntryId=" + casesId + "&defectName=" + casesName + "&startDate=" + startDateParam + "&endDate=" + endDateParam)
|
|
|
})
|
|
|
bindScoreDetail(hisId)
|
|
|
// initScroll("partDetailControl","YX",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 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 id = $(this).attr('data-id')
|
|
|
- // const age = ''
|
|
|
- // const noScore = ''
|
|
|
- // const checkStatus = ''
|
|
|
- // const name = $(this).attr('data-name')
|
|
|
- const id = $(this).attr('data-id')
|
|
|
- const age = ''
|
|
|
- const noScore = ''
|
|
|
- const checkStatus = ''
|
|
|
- const name = $(this).attr('data-name')
|
|
|
- // qcScore.html?id=ZY010000669760&age=null&name=李**&hid=1&code=YH-BLZK-ZKPF
|
|
|
- // console.log(id,'=',name,'=');
|
|
|
- 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)
|
|
|
- scoreDetail(id,age,hisId,'YH-BLZK-ZKPF',name)
|
|
|
- }
|
|
|
-
|
|
|
+function bindScoreDetail(hisId) {
|
|
|
+ $('.patientNameSpan').on('click', function (e) {
|
|
|
+ // const id = $(this).attr('data-id')
|
|
|
+ // const age = ''
|
|
|
+ // const noScore = ''
|
|
|
+ // const checkStatus = ''
|
|
|
+ // const name = $(this).attr('data-name')
|
|
|
+ const id = $(this).attr('data-id')
|
|
|
+ const age = ''
|
|
|
+ const noScore = ''
|
|
|
+ const checkStatus = ''
|
|
|
+ const name = $(this).attr('data-name')
|
|
|
+ // qcScore.html?id=ZY010000669760&age=null&name=李**&hid=1&code=YH-BLZK-ZKPF
|
|
|
+ // console.log(id,'=',name,'=');
|
|
|
+ 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)
|
|
|
+ scoreDetail(id, age, hisId, 'YH-BLZK-ZKPF', name)
|
|
|
+ }
|
|
|
+
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -373,7 +379,7 @@ function bindScoreDetail(hisId){
|
|
|
// $('.selectDept').removeClass('unSelect')
|
|
|
// })
|
|
|
// }
|
|
|
-function loading(){
|
|
|
+function loading() {
|
|
|
const str = `
|
|
|
<div class="loadingBox">
|
|
|
<div class="mask"></div>
|
|
@@ -382,24 +388,24 @@ function loading(){
|
|
|
`
|
|
|
$("#mainBox", parent.document).append(str)
|
|
|
}
|
|
|
-function hideLoading(){
|
|
|
+function hideLoading() {
|
|
|
$("#mainBox .loadingBox", parent.document).remove()
|
|
|
}
|
|
|
-$(document).on("click", function(){
|
|
|
+$(document).on("click", function () {
|
|
|
$(".deptList").css("display", "none");
|
|
|
// $(".selectDept .arrow").attr("src",iconDown)
|
|
|
})
|
|
|
// 上升下降筛选
|
|
|
-$("th[code]").off("click").on("click",function(e){
|
|
|
- const code=$(this).attr("code");
|
|
|
- if(data_asc==code){
|
|
|
- data_desc=code;
|
|
|
- data_asc="";
|
|
|
+$("th[code]").off("click").on("click", function (e) {
|
|
|
+ const code = $(this).attr("code");
|
|
|
+ if (data_asc == code) {
|
|
|
+ data_desc = code;
|
|
|
+ data_asc = "";
|
|
|
$("th[code]").removeClass("asc desc");
|
|
|
$(this).addClass("desc");
|
|
|
- }else{
|
|
|
- data_desc="";
|
|
|
- data_asc=code;
|
|
|
+ } else {
|
|
|
+ data_desc = "";
|
|
|
+ data_asc = code;
|
|
|
$("th[code]").removeClass("asc desc");
|
|
|
$(this).addClass("asc");
|
|
|
}
|
|
@@ -408,58 +414,58 @@ $("th[code]").off("click").on("click",function(e){
|
|
|
|
|
|
|
|
|
//分页渲染
|
|
|
-function renderPagination(totalPage,activePage,totalNum){
|
|
|
+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++){
|
|
|
+ if (totalPage <= 6) {
|
|
|
+ for (let i = 1; i <= totalPage; i++) {
|
|
|
|
|
|
- str += `<span class="pageNum ${'page'+i}" data-page=${i}>${i}</span>`
|
|
|
+ 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>`
|
|
|
+ } 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>`
|
|
|
+ str += `<span class="pageNum ${'page' + totalPage}" data-page=${totalPage}>${totalPage}</span>`
|
|
|
|
|
|
- } else if(activePage > totalPage -3){
|
|
|
+ } 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>`
|
|
|
+ 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="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="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){
|
|
|
+ $(".pageNum").on("click", function (e) {
|
|
|
const activePageNow = Number($(this).attr('data-page'))
|
|
|
getTabData(activePageNow)
|
|
|
// renderPagination(totalPage,activePageNow,totalNum)
|
|
|
})
|
|
|
- $(".prePage").on("click", function(e){
|
|
|
+ $(".prePage").on("click", function (e) {
|
|
|
let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
- if(activePageNow > 1){
|
|
|
+ if (activePageNow > 1) {
|
|
|
activePageNow--
|
|
|
getTabData(activePageNow)
|
|
|
// renderPagination(totalPage,activePageNow,totalNum)
|
|
|
}
|
|
|
})
|
|
|
- $(".nextPage").on("click", function(e){
|
|
|
+ $(".nextPage").on("click", function (e) {
|
|
|
let activePageNow = Number($(".activePage").attr('data-page'))
|
|
|
- if(activePageNow < totalPage){
|
|
|
+ if (activePageNow < totalPage) {
|
|
|
activePageNow++
|
|
|
getTabData(activePageNow)
|
|
|
// renderPagination(totalPage,activePageNow,totalNum)
|
|
@@ -469,58 +475,58 @@ function renderPagination(totalPage,activePage,totalNum){
|
|
|
}
|
|
|
|
|
|
// 获取科室名称
|
|
|
-$(".patientNumInp").on("input", function(e){
|
|
|
+$(".patientNumInp").on("input", function (e) {
|
|
|
const val = $(this).val().trim()
|
|
|
deptName = val
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
// 获取病人姓名 patientRecordInp
|
|
|
-$(".patientNameInp").on("input", function(e){
|
|
|
+$(".patientNameInp").on("input", function (e) {
|
|
|
const val = $(this).val().trim()
|
|
|
patientName = val
|
|
|
})
|
|
|
|
|
|
// 获取病案号 patientRecordInp
|
|
|
-$(".patientRecordInp").on("input", function(e){
|
|
|
+$(".patientRecordInp").on("input", function (e) {
|
|
|
const val = $(this).val().trim()
|
|
|
deptRecord = val
|
|
|
})
|
|
|
|
|
|
|
|
|
-$(function() {
|
|
|
- const iconCalenBlue= require("./../images/icon_calen_blue.png")
|
|
|
- const iconCalenGrey= require("./../images/icon_calen_grey.png")
|
|
|
+$(function () {
|
|
|
+ const iconCalenBlue = require("./../images/icon_calen_blue.png")
|
|
|
+ const iconCalenGrey = require("./../images/icon_calen_grey.png")
|
|
|
$('.datapickerBox').append(`<img class="iconCalen" src=${iconCalenGrey} />`)
|
|
|
- $('.iconCalen').on("mouseenter", function(e){
|
|
|
+ $('.iconCalen').on("mouseenter", function (e) {
|
|
|
$(this).attr("src", iconCalenBlue)
|
|
|
})
|
|
|
- $('.iconCalen').on("mouseleave", function(e){
|
|
|
+ $('.iconCalen').on("mouseleave", function (e) {
|
|
|
$(this).attr("src", iconCalenGrey)
|
|
|
})
|
|
|
- $('.iconCalen').on("click", function(e){
|
|
|
+ $('.iconCalen').on("click", function (e) {
|
|
|
$(this).parent().find("input").focus()
|
|
|
})
|
|
|
- $('.export').click(function(){
|
|
|
- const start = new Date(startDateParam).getTime()
|
|
|
- const end = new Date(endDateParam).getTime()
|
|
|
- if(start > end){
|
|
|
- $.alerModal({"message":'开始时间不能大于结束时间~',type:"tip",time:'1000',isFather: true, fatherWrapper: $("#mainBox", parent.document)});
|
|
|
- return
|
|
|
- }
|
|
|
- const param = {
|
|
|
- name:patientName,
|
|
|
- isPlacefile:isPlacefile,
|
|
|
- fileCode:deptRecord,
|
|
|
- startDate:startDateParam.replace(/\//g,'-'),
|
|
|
- endDate:endDateParam.replace(/\//g,'-'),
|
|
|
- }
|
|
|
- expJson(api.reHos31DaysPageExport,param).then(res =>{
|
|
|
- downloadExportedData(res.data, "31天再入院人数.xls")
|
|
|
- })
|
|
|
-
|
|
|
- // 初始渲染TableTitle
|
|
|
- // getPageSet().then(res =>{
|
|
|
- // $(".filter").click(); //初始查询
|
|
|
- // })
|
|
|
+ $('.export').click(function () {
|
|
|
+ const start = new Date(startDateParam).getTime()
|
|
|
+ const end = new Date(endDateParam).getTime()
|
|
|
+ if (start > end) {
|
|
|
+ $.alerModal({ "message": '开始时间不能大于结束时间~', type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const param = {
|
|
|
+ name: patientName,
|
|
|
+ isPlacefile: isPlacefile,
|
|
|
+ fileCode: deptRecord,
|
|
|
+ startDate: startDateParam.replace(/\//g, '-'),
|
|
|
+ endDate: endDateParam.replace(/\//g, '-'),
|
|
|
+ }
|
|
|
+ expJson(api.reHos31DaysPageExport, param).then(res => {
|
|
|
+ downloadExportedData(res.data, "31天再入院人数.xls")
|
|
|
+ })
|
|
|
+
|
|
|
+ // 初始渲染TableTitle
|
|
|
+ // getPageSet().then(res =>{
|
|
|
+ // $(".filter").click(); //初始查询
|
|
|
+ // })
|
|
|
})
|
|
|
});
|