Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/resources/mapper/Archive_MasterMapper.xml
master
ALW 3 years ago
commit d618af9ce9

@ -0,0 +1,228 @@
package com.emr.controller;
import com.emr.entity.Archive_Master_Vo;
import com.emr.entity.OffsetLimitPage;
import com.emr.service.Archive_MasterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
@Controller
@RequestMapping("pathological/")
public class PathologicalReportController {
@Autowired
private Archive_MasterService archiveMasterService;
/**
*
* @return
*/
@RequestMapping("pathologicalReport")
public String pathologicalReport(Model model, String startDateTo, String endDateTo){
model.addAttribute("startDate",startDateTo);
model.addAttribute("endDate",endDateTo);
return "pathological/pathologicalReport";
}
/**
*
* @return
*/
@RequestMapping("getPathologicalReportList")
@ResponseBody
public OffsetLimitPage getPathologicalReportList(Integer offset,
Integer limit,
Archive_Master_Vo Archive_Master_Vo,
HttpServletRequest request){
List<Archive_Master_Vo> ArchiveMasterList = archiveMasterService.selectArchiveMasterVoAndExt(Archive_Master_Vo);
OffsetLimitPage offsetLimitPage = new OffsetLimitPage();
offsetLimitPage.setTotal((long) ArchiveMasterList.size());
List<Archive_Master_Vo> list = new ArrayList<>();
for (int i = 0; i < ArchiveMasterList.size(); i++) {
list.add(ArchiveMasterList.get(i));
if(list.size() == limit){
break;
}
}
offsetLimitPage.setRows(list);
//request.getSession().removeAttribute("unSubmitRecords");
return offsetLimitPage;
}
/**
*
*/
// @RequestMapping("selectCount")
// @ResponseBody
// public Msg selectCount(RecordSearch recordSearch) throws Exception{
// SubmitRecordStatistics recordStatistics = recordService.selectCount(recordSearch);
// return Msg.success().add("record",recordStatistics);
// }
//
// /**
// * 病案提交导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelSubmit")
// public void exportExcelSubmit(HttpServletResponse response,
// RecordSearch recordSearch,
// HttpServletRequest request){
// String tableThNames = "科室名称,出院人数,医生已提交,医生未提交,医生提交率," +
// "医生质控员已提交,医生质控员未提交,医生质控员提交率," +
// "科主任已提交,科主任未提交,科主任提交率," +
// "护士已提交,护士未提交,护士提交率," +
// "护士质控员已提交,护士质控员未提交,护士质控员提交率," +
// "护士长已提交,护士长未提交,护士长提交率";
// String fieldCns = "deptNameCn,count,doctorSubmitCount,unDoctorSubmitCount,doctorSubmitPercent," +
// "doctorCheckCount,unDoctorCheckCount,doctorCheckPercent," +
// "directorCheckCount,unDirectorCheckCount,directorCheckPercent," +
// "nurseSubmitCount,unNurseSubmitCount,nurseSubmitPercent," +
// "nurseCheckCount,unNurseCheckCount,nurseCheckPercent," +
// "headNurseCount,unHeadNurseCount,headNursePercent";
// //构造excel的数据
// try {
// List<SubmitRecord> list = recordService.selectUnCountGroupDept(recordSearch,request);
// //文件名
// String fileName = "病案提交统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
//
// /**
// * 科室病案超期頁面
// * @return
// */
// @RequestMapping("deptOverTimeInfo")
// public String deptOverTimeInfo(Model model, String startDateTo, String endDateTo){
// model.addAttribute("startDate",startDateTo);
// model.addAttribute("endDate",endDateTo);
// return "record/deptOverTimeInfo";
// }
//
// /**
// * 科室病案超期頁面中,其中各个角色的提交率
// */
// @RequestMapping("selectOvertimeCount")
// @ResponseBody
// public Msg selectOvertimeCount(RecordSearch recordSearch, HttpServletRequest request) throws Exception{
// SubmitRecordStatistics recordStatistics = recordService.selectOvertimeCount(recordSearch,request);
// return Msg.success().add("record",recordStatistics);
// }
//
// /**
// * 按科室待审核角色病案超时分页查询
// * @return
// */
// @RequestMapping("getRecordGroupDeptAndRole")
// @ResponseBody
// public OffsetLimitPage getRecordGroupDeptAndRole(Integer offset,
// Integer limit,
// RecordSearch recordSearch){
// if(offset != null && limit != null) {
// PageHelper.offsetPage(offset, limit);
// }
// List<Archive_Master_Vo> submitRecords = new Page<>();
// try {
// submitRecords = recordService.selectRecordGroupDeptAndRole(recordSearch);
// }catch (Exception e){
// e.printStackTrace();
// ExceptionPrintUtil.printException(e);
// }
//
// return new OffsetLimitPage((Page) submitRecords);
// }
//
// /**
// * 科室病案超期导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelDeptOverTime")
// public void exportExcelDeptOverTime(HttpServletResponse response,
// RecordSearch recordSearch,
// HttpServletRequest request){
// String tableThNames = "科室名称,超期份數,医生未提交,医生质控员未提交,科主任未提交,护士未提交,"+
// "护士质控员未提交,护士长未提交,病案室未提交";
// String fieldCns = "deptNameCn,count,unDoctorSubmitCount,unDoctorCheckCount,unDirectorCheckCount," +
// "unNurseSubmitCount,unNurseCheckCount,unHeadNurseCount,headNurseCount";
// //构造excel的数据
// try {
// List<SubmitRecord> list = recordService.selectUnCountGroupDept(recordSearch,request);
// //文件名
// String fileName = "科室病案超期" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
//
// /**
// * 病案提交明细页面
// * @return
// */
// @RequestMapping("signedRecord")
// public String signedRecord(){
// return "record/signedRecord";
// }
//
// /**
// * 病案提交明细分页查询
// * @return
// */
// @RequestMapping("getSignedRecordList")
// @ResponseBody
// public OffsetLimitPage getSignedRecordList(Integer offset, Integer limit, RecordSearch recordSearch){
// if(offset != null && limit != null) {
// PageHelper.offsetPage(offset, limit);
// }
// List<SubmitRecordStatistics> submitRecords = new Page<>();
// try {
// submitRecords = recordService.getSignedRecordList(recordSearch);
// }catch (Exception e){
// e.printStackTrace();
// ExceptionPrintUtil.printException(e);
// }
// return new OffsetLimitPage((Page)submitRecords);
// }
//
// /**
// * 病案签收导出
// * @param response
// */
// @ResponseBody
// @RequestMapping(value = "/exportExcelSigned")
// public void exportExcelSigned(HttpServletResponse response,RecordSearch recordSearch){
// String tableThNames = "出院日期,出院科室,出院人数,采集完整,已提交,已归档,完整率,提交率,归档率";
// String fieldCns = "disDate,deptNameCn,allCount,count3,count1,count2,count3Percent,count1Percent,count2Percent";
// //构造excel的数据
// try {
// List<SubmitRecordStatistics> list = recordService.getSignedRecordList(recordSearch);
// //文件名
// String fileName = "病案室签收统计" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
// //ExportExcelUtil
// ExportExcelUtil exportExcelUtil = new ExportExcelUtil();
// //导出excel的操作
// exportExcelUtil.expordExcel(tableThNames,fieldCns,list,fileName,response);
// }catch (Exception e){
// ExceptionPrintUtil.printException(e);
// e.printStackTrace();
// }
// }
}

@ -239,4 +239,10 @@ public interface Archive_MasterMapper {
* @return
*/
Integer selectTime1(Archive_Master_Vo archiveMasterVo);
/**
*
* @return
*/
List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo);
}

@ -214,6 +214,17 @@ public class Archive_Master_Vo {
//退回急诊室总数
private Integer backNum;
//报告名称
private String C9;
//报告登记时间
private String T3;
//病理号
private String C1;
public Integer getOverTime() {
return overTime;
}
@ -889,6 +900,30 @@ public class Archive_Master_Vo {
public void setBackNum(Integer backNum) {
this.backNum = backNum;
}
public String getC9() {
return C9;
}
public void setC9(String c9) {
C9 = c9;
}
public String getT3() {
return T3;
}
public void setT3(String t3) {
T3 = t3;
}
public String getC1() {
return C1;
}
public void setC1(String c1) {
C1 = c1;
}
}

@ -353,6 +353,8 @@ public interface Archive_MasterService {
* @return
*/
Integer selectCountNum(Archive_Master_Vo archiveMasterVo);
List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo);
}

@ -1135,6 +1135,15 @@ public class Archive_MasterServiceImpl implements Archive_MasterService {
public Integer selectCountNum(Archive_Master_Vo archiveMasterVo) {
return archiveMasterMapper.selectCountNum(archiveMasterVo);
}
@Override
public List<Archive_Master_Vo> selectArchiveMasterVoAndExt(Archive_Master_Vo archive_master_vo) {
List<Archive_Master_Vo> archive_master_vos = archiveMasterMapper.selectArchiveMasterVoAndExt(archive_master_vo);
for (int i = 0; i < archive_master_vos.size(); i++) {
System.out.println(archive_master_vos.get(i));
}
return archive_master_vos ;
}
}

@ -46,7 +46,10 @@ public class PowerUserServiceImpl implements PowerUserService {
return null;
}
@Override
public List<Archive_Master_Following> getHandleName(String patientIds) {
return null;
}
}

@ -112,8 +112,6 @@
<result column="overTime2" jdbcType="INTEGER" property="overTime2" />
<result column="flag" jdbcType="INTEGER" property="flag" />
<result column="countNum" jdbcType="INTEGER" property="countNum" />
<result column="handleTimeMax1" jdbcType="NVARCHAR" property="handleTimeMax1"/>
</resultMap>
<sql id="Base_Column_List">
id, patient_id, inp_no, visit_id, name, sex, dept_name, discharge_date_time, ArchiveState,
@ -1630,13 +1628,13 @@
on m.dept_admission_to=e.code
<where> 1=1 and m.master_id!='' and m.master_id is not null and f2.handle_time is not null
<!--<if test="(overdueDaysTwo != null and overdueDaysTwo != '') ">-->
<!--and-->
<!--DATEDIFF(dd,(SELECT max(b.date)-->
<!--FROM (select top 4 date from emr_holiday_set where date >= CONVERT (-->
<!--VARCHAR (10),-->
<!--f1.handle_time,-->
<!--120-->
<!--) and flag= 1 order by date asc) as b), CONVERT(VARCHAR(20),f2.handle_time,23)) >=#{overdueDaysTwo,jdbcType=NCHAR}-->
<!--and-->
<!--DATEDIFF(dd,(SELECT max(b.date)-->
<!--FROM (select top 4 date from emr_holiday_set where date >= CONVERT (-->
<!--VARCHAR (10),-->
<!--f1.handle_time,-->
<!--120-->
<!--) and flag= 1 order by date asc) as b), CONVERT(VARCHAR(20),f2.handle_time,23)) >=#{overdueDaysTwo,jdbcType=NCHAR}-->
<!--</if>-->
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
@ -1687,158 +1685,6 @@
</where>
ORDER BY m.master_id,m.discharge_date_time,f1.handle_time asc
</select>
<!-- 初次未提交病历 -->
<select id="selectOverdue3" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
SELECT m.inp_no,m.visit_id,m.name,ISNULL(c.name,m.dept_name) dept_name,ISNULL(e.name,m.dept_admission_to) dept_admission_to,m.discharge_date_time,
m.DOCTOR_IN_CHARGE,d.num,m.id,m.death_flag,
DATEDIFF(day, (SELECT max(b.date)
FROM (select top ${overdueDaysTwo} date from emr_holiday_set where date >= CONVERT (
VARCHAR (10),
m.discharge_date_time,
120
) and flag= 1 order by date asc) as b),CONVERT (
VARCHAR (10),
getDate(),
120
)) AS overTime1,
DATEDIFF(day, CONVERT (
VARCHAR (10),
m.discharge_date_time,
120
), CONVERT (
VARCHAR (10),
getDate(),
120
)) as diffDay
FROM Archive_Master_Following f
LEFT JOIN Archive_Master m
on f.master_id=m.id and ArchiveState in('归档中','提交','复审退回','主任退回') and Is_Valid!=1
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) c
on m.dept_name=c.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) e
on m.dept_admission_to=e.code
LEFT JOIN (SELECT COUNT(master_id)as num ,master_id from Archive_Master_Following WHERE following_type='5' GROUP BY master_id) d
on m.id=d.master_id
<where> 1=1 and d.num is NULL and m.discharge_date_time is not NULL
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to in
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) between #{startDate,jdbcType=NCHAR} and #{endDate,jdbcType=NCHAR}
</when>
<when test="startDate != null and startDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) >=#{startDate,jdbcType=NCHAR}
</when>
<when test="endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;= #{endDate,jdbcType=NCHAR}
</when>
</choose>
</where>
GROUP BY m.id,m.inp_no,m.visit_id,m.name,m.dept_name,c.name,e.name,m.dept_admission_to
,m.discharge_date_time,m.DOCTOR_IN_CHARGE,d.num,m.id,m.death_flag
ORDER BY m.discharge_date_time DESC
</select>
<!-- 返修未提交病历 -->
<select id="selectOverdue4" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
SELECT distinct m.ID,m.inp_no,m.visit_id,m.name,m.discharge_date_time,m.DOCTOR_IN_CHARGE
,ISNULL(c.name,m.dept_name) dept_name,ISNULL(e.name,m.dept_admission_to) dept_admission_to,d.handleTimeMax1,m.death_flag,
DATEDIFF(day, (SELECT max(b.date)
FROM (select top ${overdueDaysTwo} date from emr_holiday_set where date >= CONVERT (
VARCHAR (10),
d.handleTimeMax1,
120
) and flag= 1 order by date asc) as b),CONVERT (
VARCHAR (10),
getDate(),
120
)) AS overTime1,
DATEDIFF(day, CONVERT (
VARCHAR (10),
d.handleTimeMax1,
120
), CONVERT (
VARCHAR (10),
getDate(),
120
)) as diffDay
from Archive_Master_Following f
LEFT JOIN Archive_Master m
on f.master_id=m.id and ArchiveState in('归档中','提交','复审退回','主任退回') and Is_Valid!=1
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) c
on m.dept_name=c.code
LEFT JOIN (select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' )) e
on m.dept_admission_to=e.code
LEFT JOIN (SELECT max(handle_time)as handleTimeMax1 ,master_id from Archive_Master_Following WHERE following_type='9' GROUP BY master_id) d
on m.id=d.master_id
LEFT JOIN (SELECT COUNT(Archive_Master_Following.master_id)as num,Archive_Master_Following.master_id,Archive_Master_Following.handle_time from Archive_Master_Following
LEFT JOIN (SELECT max(handle_time)as handleTimeMax ,master_id from Archive_Master_Following WHERE following_type='9' GROUP BY master_id) d1 on d1.master_id=Archive_Master_Following.master_id
WHERE handle_time between d1.handleTimeMax and getDate() and Archive_Master_Following.following_type !='9'
GROUP BY Archive_Master_Following.master_id,Archive_Master_Following.handle_time
) timd
on timd.master_id=d.master_id
<where> 1=1 and d.handleTimeMax1 is not NULL and timd.num is NULL
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>
<if test="inpNo != null and inpNo != ''">
and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'
</if>
<if test="visitId != null and visitId != ''">
and m.visit_id=#{visitId,jdbcType=NCHAR}
</if>
<if test="name != null and name != ''">
and m.name like '%'+#{name,jdbcType=NCHAR}+'%'
</if>
<if test="deptName!= null and deptName!= ''">
and m.dept_name in
<foreach item="item" collection="deptName.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="deptAdmissionTo != null and deptAdmissionTo!=''">
and m.dept_admission_to in
<foreach item="item" collection="deptAdmissionTo.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose>
<when test="startDate != null and startDate != '' and endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) between #{startDate,jdbcType=NCHAR} and #{endDate,jdbcType=NCHAR}
</when>
<when test="startDate != null and startDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) >=#{startDate,jdbcType=NCHAR}
</when>
<when test="endDate != null and endDate != ''">
and CONVERT(VARCHAR(20),m.discharge_date_time,23) &lt;= #{endDate,jdbcType=NCHAR}
</when>
</choose>
</where>
ORDER BY m.discharge_date_time DESC
</select>
<!--封存日志-->
<select id="selectByFollowinglog" parameterType="com.emr.entity.Archive_Master_Vo" resultMap="BaseResultMap2">
select m.INP_NO,m.VISIT_ID,m.name,m.sex,f.handle_name,CONVERT(VARCHAR(20),f.handle_time,120) handle_time, m.archiveState ,f.following_content

@ -0,0 +1,292 @@
<%@ page import="java.util.ResourceBundle" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<%
ResourceBundle res = ResourceBundle.getBundle("config.jdbc");
%>
<html>
<head>
<title>病案提交报表</title>
<meta charset="utf-8">
<!-- 解决部分兼容性问题如果安装了GCF则使用GCF来渲染页面如果未安装GCF则使用最高版本的IE内核进行渲染。 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- 页面按原比例显示 -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@include file="../../jspf/comm.jspf" %>
<link rel="shortcut icon" href="${path}/favicon.ico">
<style>
/* .divCss {
margin-top: 5px;
}*/
.divCss8 {
margin-top: 5px;
margin-right: 20px;
}
/* dataTables表头居中 */
/*.table > thead:first-child > tr:first-child > th {
text-align: center !important;
}*/
/**
*多选下拉框
*/
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 168px !important;
}
</style>
<script>
var path = "${path}";
</script>
</head>
<body>
<!--当前操作角色-->
<input type="hidden" id="checker">
<input type="hidden" id="flag" value="">
<div class="mainBody">
<div class="main">
<%-- <div class="headDiv">--%>
<%-- <div class="headSpanDiv">--%>
<%-- <span class="headspan">--%>
<%-- 病理数据报表--%>
<%-- </span>--%>
<%-- </div>--%>
<%-- </div>--%>
<div class="mainDiv">
<!--搜索-->
<form style="margin-top:5px;margin-bottom: 0!important;">
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">&emsp;住院号:</label>
<input type="text" class="input-sm form-control" id="inpNo" placeholder="请输入住院号" maxlength="25">
</div>
<div class="form-group divCss8">
<label for="visitId">住院次数:</label>
<input type="number" class="input-sm form-control" min="1" id="visitId" placeholder="请输入次数"
maxlength="2">
</div>
<div class="form-group divCss8">
<label for="name">姓名:</label>
<input type="text" class="input-sm form-control" id="name" placeholder="请输入姓名" maxlength="8">
</div>
<div class="form-group divCss8">
<label>出院时间:</label>
<div class="input-group input-daterange">
<input type="text" class="input-sm form-control" name="start" id="startDateTo"
maxlength="10" autocomplete="off"/>
<span class="input-group-addon">-</span>
<input type="text" class="input-sm form-control" name="end" id="endDateTo" maxlength="10"
autocomplete="off"/>
</div>
</div>
<div class="form-group divCss8">
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtn">查询</button>
</div>
</div>
</form>
<!--数据表格-->
<div id="tableDiv">
<table id="table" class="table text-nowrap table-bordered"></table>
</div>
</div>
</div>
</div>
</body>
<script>
var tipLoad = 1;
function initTable() {
// if (tipLoad == 1) {
$("#table").bootstrapTable({ // 对应table标签的id
//method: 'POST',
// getPathologicalReportList
url: "${path}/pathological/getPathologicalReportList", // 获取表格数据的url
contentType: "application/x-www-form-urlencoded",//一种编码。好像在post请求的时候需要用到。这里用的get请求注释掉这句话也能拿到数据
//dataField: "data",//这是返回的json数组的key.默认是"rows".这里只有前后端约定好就行
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
paginationShowPageGo: true,
pageList: [10, 20, 50, 100], // 如果设置了分页设置可供选择的页面数据条数。设置为All 则显示所有记录。
smartDisplay: false,
pageSize: 2, // 页面数据条数
pageNumber: 1, // 初始化加载第一页,默认第一页
sidePagination: 'server', // 设置为服务器端分页 客户端client
search: false,
showColumns: true,
// sortable: true,
// sortOrder: "asc",
toolbar: '#toolbar',//指定工具栏
searchOnEnterKey: true, //设置为 true时按回车触发搜索方法否则自动触发搜索方法
undefinedText: '---', //当数据为 undefined 时显示的字符
singleSelect: false,//设置True 将禁止多选
clickToSelect: true,//设置true 将在点击行时自动选择rediobox 和 checkbox
//height: 560, //定义表格的高度。
searchTimeOut: 500,// 默认500 设置搜索超时时间。
toolbarAlign: 'right',// 指定 toolbar 水平方向的位置。'left' 或 'right'
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
showHeader: true,//是否显示列头。
trimOnSearch: true,//设置为 true 将自动去掉搜索字符的前后空格。
//是否显示导出按钮
showExport: true,
//导出表格方式默认basic只导出当前页的表格数据all导出所有数据selected导出选中的数据
exportDataType: "basic",
//导出文件类型
exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'],
exportOptions: {
fileName: document.title
},
queryParams: function (params) {
var currPageSize = this.pageSize;
if (currPageSize == 2) {
currPageSize = 10;
}
var limit= null;
var offset= params.offset;
//判断是否导出全部all
if ($("#sel_exportoption").val() == "all") {
offset=0;
limit=this.totalRows;
this.pageSize= limit;
}else{
limit = currPageSize;
this.pageSize = currPageSize;
}
var temp = {
limit: limit, //页面大小
offset: offset, //页码
order: params.order, //排位命令descasc
inpNo: "" + $("#inpNo").val(),
visitId : "" + $("#visitId").val(),
startDate: $("#startDate").val(),
endDate: $("#endDate").val(),
name: "" + $("#name").val(),
startDateTo: $("#startDateTo").val(),
endDateTo: $("#endDateTo").val(),
};
return temp;
},
sortName: 'id', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [{
title: '全选',
field: 'select', //复选框
checkbox: true,
width: 25,
align: 'center',
valign: 'middle'
},
{
title: '序号',
field: 'id',
align: 'center',
valign: 'middle',
//sortable: true,
// visible: false,
formatter: function (value, row, index) {
return index + 1;
}
},
{
title: '住院号',
field: 'inpNo',
align: 'left',
valign: 'middle'
},
{
title: '住院次数',
field: 'visitId',
align: 'left',
valign: 'middle'
},
{
title: '姓名',
field: 'name',
align: 'center',
valign: 'middle'
}, {
title: '出院时间',
field: 'dischargeDateTime',
align: 'center',
valign: 'middle'
},{
title: '病理号',
field: 'c1',
align: 'center',
valign: 'middle'
}, {
title: '报告名称',
field: 'c9',
align: 'center',
valign: 'middle'
}, {
title: '报告登记时间',
field: 't3',
align: 'center',
valign: 'middle'
},
],
onLoadSuccess: function (result) { //加载成功时执行
//console.info("加载成功");
tipLoad = 0;
},
onLoadError: function () { //加载失败时执行
//console.info("加载数据失败");
tipLoad = 0;
}
});
// }
}
//获取table的高度
function getHeight() {
return $(window).height() - 100;
}
initTable();
//查询
$('#searchBtn').click(function () {
// tipLoad = 0;
// initTable();
//查询之后重新从第一页算起
if (tipLoad == 0) {
$("#table").bootstrapTable("refreshOptions", {pageNumber: 1});
} else {
toastr.warning("正在查询,请稍等...");
}
//$(".selectpicker").selectpicker('deselectAll');
// $('#table').bootstrapTable('destroy');
//$('#table').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
//刷新
//$('#table').bootstrapTable('refresh');
});
//2.初始化select的change事件
$("#sel_exportoption").change(function () {
$('#table').bootstrapTable('refreshOptions', {
exportDataType: $(this).val()
});
});
$("#refreshBtn").click(function () {
//刷新
$('#table').bootstrapTable('refresh');
});
//日期控件
$(".input-daterange").datepicker({
format: "yyyy-mm-dd",
language: "zh-CN"
});
</script>
</html>
Loading…
Cancel
Save