diff --git a/src/main/java/com/emr/controller/NoCacheFilter.java b/src/main/java/com/emr/controller/NoCacheFilter.java new file mode 100644 index 0000000..352322c --- /dev/null +++ b/src/main/java/com/emr/controller/NoCacheFilter.java @@ -0,0 +1,17 @@ +package com.emr.controller; + +import javax.servlet.*; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class NoCacheFilter implements Filter { + public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { + HttpServletResponse response = (HttpServletResponse) res; + + response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); + response.setHeader("Pragma", "no-cache"); + response.setDateHeader("Expires", 0); + + chain.doFilter(req, res); + } +} \ No newline at end of file diff --git a/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java b/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java new file mode 100644 index 0000000..61b3e05 --- /dev/null +++ b/src/main/java/com/emr/controller/bloodPurification/bloodPurificationController.java @@ -0,0 +1,291 @@ +package com.emr.controller.bloodPurification; + +import com.alibaba.fastjson.JSON; +import com.emr.annotation.OptionalLog; +import com.emr.dao.CommomMapper; +import com.emr.dao.bloodPurification.BloodPurificationMapper; +import com.emr.entity.EmrBloodDialysisDoc; +import com.emr.entity.Power_User; +import com.emr.service.ImportExcel.ImportExcelEntity; +import com.emr.service.ImportExcel.ImportExcelUtil; +import com.emr.util.DateUtils; +import com.emr.util.ExceptionPrintUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.nio.charset.Charset; +import java.text.DecimalFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * 广总需求 血液净化数字病案 + */ +@Controller +@RequestMapping("bloodPurification/") +public class bloodPurificationController { + @Autowired + private CommomMapper commomMapper; + @Autowired + private BloodPurificationMapper bloodPurificationMapper; + + /** + * 病案查询 + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/list") + @OptionalLog(module = "查看", methods = "血透净化病案查询") + @RequestMapping("list") + public String list(Model model, HttpServletRequest request) { + String dataSource = request.getParameter("dataSource"); + //查询表格配置表的数据,根据配置动态显示表格字段 + Map tableConfigMap = commomMapper.queryTableConfig(dataSource); + if (!ObjectUtils.isEmpty(tableConfigMap)) { + //获取数据来源 + model.addAttribute("dataSource", dataSource); + //获取需要查询字段 + model.addAttribute("tableQueryField", tableConfigMap.get("tableField")); + //显示查询字段,并转为驼峰格式 + model.addAttribute("tableField", ObjectUtils.isEmpty(tableConfigMap.get("tableField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("tableField").toString())); + //获取查询字段中文名称 + model.addAttribute("tableFieldName", tableConfigMap.get("tableFieldName")); + //获取排序字段,可点击表头列实现排序 + model.addAttribute("sortField", ObjectUtils.isEmpty(tableConfigMap.get("sortField")) ? "" : DateUtils.toCamelCase(tableConfigMap.get("sortField").toString())); + //获取默认排序字段 + request.getSession().setAttribute("defaultSortField", tableConfigMap.get("defaultSortField")); + //获取默认排序字段方式 + request.getSession().setAttribute("defaultSortFieldType", tableConfigMap.get("defaultSortFieldType")); + } + + return "recordManage/bloodPurification/list"; + } + + /** + * 文书报表 + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/documentList") + @OptionalLog(module = "查看", methods = "血透净化文书报表") + @RequestMapping("documentList") + public String documentList(Model model, HttpServletRequest request) { + + return "recordManage/bloodPurification/documentList"; + } + + /** + * 检查记录汇总 + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/inspectionRecordsSum") + @OptionalLog(module = "查看", methods = "血透净化检查记录汇总") + @RequestMapping("inspectionRecordsSum") + public String inspectionRecordsSum(Model model, HttpServletRequest request) { + + return "recordManage/bloodPurification/inspectionRecordsSum"; + } + + /** + * 检查记录明细 + * @param model + * @param request + * @return + */ + @RequiresPermissions("/bloodPurification/inspectionRecords") + @OptionalLog(module = "查看", methods = "血透净化检查记录明细") + @RequestMapping("inspectionRecords") + public String inspectionRecords(Model model, HttpServletRequest request) { + String flag = request.getParameter("flag"); + //获取当前的HttpSession对象,如果不存在则会创建一个新的会话 + HttpSession session = request.getSession(); + + //向HttpSession中放入数据 + String inspectionDate = request.getParameter("inspectionDate"); + String name = request.getParameter("name"); + String dialysisDate = request.getParameter("dialysisDate"); + + session.setAttribute("inspectionDate", request.getParameter("inspectionDate")); + session.setAttribute("name", request.getParameter("name")); + session.setAttribute("dialysisDate", request.getParameter("dialysisDate")); + + model.addAttribute("flag", flag); + return "recordManage/bloodPurification/inspectionRecords"; + } + + /** + * 查询检查记录汇总 + * @param page + * @param limit + * @param emrBloodDialysisDoc + * @return + */ + @RequestMapping("queryInspectionRecordsSum") + @ResponseBody + public String queryInspectionRecordsSum(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc){ + if(null != page && null != limit){ + PageHelper.startPage(page, limit); + } + try{ + List> dataMap = bloodPurificationMapper.queryInspectionRecordsSum(emrBloodDialysisDoc); + //保留两位有效数字 + DecimalFormat df = new DecimalFormat("0.00"); + //遍历 获取有问题数量和总数 + if(!CollectionUtils.isEmpty(dataMap)){ + dataMap.forEach(e -> { + //总数 + double totalNum = ObjectUtils.isEmpty(e.get("total_num")) ? 0 : Double.parseDouble(e.get("total_num").toString()); + + //血液净化记录存在问题 + double bloodFillIncompleteNum = ObjectUtils.isEmpty(e.get("blood_fill_incomplete_num")) ? 0 : Double.parseDouble(e.get("blood_fill_incomplete_num").toString());//记录填写不完整 + double bloodSignNonstandardNum = ObjectUtils.isEmpty(e.get("blood_sign_nonstandard_num")) ? 0 : Double.parseDouble(e.get("blood_sign_nonstandard_num").toString());//医嘱执行签名不规范 + double bloodMedicalstaffNosignNum = ObjectUtils.isEmpty(e.get("blood_medicalstaff_nosign_num")) ? 0 : Double.parseDouble(e.get("blood_medicalstaff_nosign_num").toString());//医护未签名 + + //血液净化记录存在问题总数 + double bloodFillIncompleteTotalNum = bloodFillIncompleteNum + bloodSignNonstandardNum + bloodMedicalstaffNosignNum; + + //健康教育存在问题 + double healtheduFillIncompleteNum = ObjectUtils.isEmpty(e.get("healthedu_fill_incomplete_num")) ? 0 : Double.parseDouble(e.get("healthedu_fill_incomplete_num").toString());//未做宣教 + double healtheduSignNonstandardNum = ObjectUtils.isEmpty(e.get("healthedu_sign_nonstandard_num")) ? 0 : Double.parseDouble(e.get("healthedu_sign_nonstandard_num").toString());//宣教填写不完整体 + double healtheduMedicalstaffNosignNum = ObjectUtils.isEmpty(e.get("healthedu_medicalstaff_nosign_num")) ? 0 : Double.parseDouble(e.get("healthedu_medicalstaff_nosign_num").toString());//护患未签名 + + //健康教育存在问题总数 + double healtheduFillIncompleteTotalNum = healtheduFillIncompleteNum + healtheduSignNonstandardNum + healtheduMedicalstaffNosignNum; + + //血透知情同意书存在问题 + double informedconDocNosignNum = ObjectUtils.isEmpty(e.get("informedcon_doc_nosign_num")) ? 0 : Double.parseDouble(e.get("informedcon_doc_nosign_num").toString());//医生未签名 + double informedconFamilymembersMissNum = ObjectUtils.isEmpty(e.get("informedcon_familymembers_miss_num")) ? 0 : Double.parseDouble(e.get("informedcon_familymembers_miss_num").toString());//患者家属关系缺项 + double informedconNameNonstandardNum = ObjectUtils.isEmpty(e.get("informedcon_name_nonstandard_num")) ? 0 : Double.parseDouble(e.get("informedcon_name_nonstandard_num").toString());//通路名称不规范 + + //血透知情同意书存在问题总数 + double informedconDocNosignTotalNum = informedconDocNosignNum + informedconFamilymembersMissNum + informedconNameNonstandardNum; + + //血净记录完整率 + double bloodFillIncompleteRate = Double.parseDouble(df.format(bloodFillIncompleteTotalNum / totalNum * 100)); + + //健康教育完整率 + double healtheduFillIncompleteRate = Double.parseDouble(df.format(healtheduFillIncompleteTotalNum / totalNum * 100)); + + //知情同意完整率 + double informedconDocNosignRate = Double.parseDouble(df.format(informedconDocNosignTotalNum / totalNum * 100)); + + e.put("bloodFillIncompleteRate", bloodFillIncompleteRate); + e.put("healtheduFillIncompleteRate", healtheduFillIncompleteRate); + e.put("informedconDocNosignRate", informedconDocNosignRate); + }); + } + PageInfo pageInfo = new PageInfo<>(dataMap); + return JSON.toJSONString(pageInfo); + }catch (Exception e){ + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } + + /** + * 查询文书报表 + * @param page + * @param limit + * @param emrBloodDialysisDoc + * @param request + * @return + */ + @RequestMapping("queryDocumentList") + @ResponseBody + public String queryDocumentList(Integer page, Integer limit, EmrBloodDialysisDoc emrBloodDialysisDoc, HttpServletRequest request){ + if(null != page && null != limit){ + PageHelper.startPage(page, limit); + } + try{ + //明细页面跳转获取参数 + HttpSession session = request.getSession(); + emrBloodDialysisDoc.setDialysisDate((String)session.getAttribute("dialysisDate")); + emrBloodDialysisDoc.setName((String)session.getAttribute("name")); + emrBloodDialysisDoc.setInspectionDate((String)session.getAttribute("inspectionDate")); + + List emrBloodDialysisDocs = bloodPurificationMapper.queryDocumentList(emrBloodDialysisDoc); + PageInfo pageInfo = new PageInfo<>(emrBloodDialysisDocs); + return JSON.toJSONString(pageInfo); + }catch (Exception e){ + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + return null; + } + } + + /** + * 导入 血透文书检查登记表 + * @param request + * @return + */ + @RequestMapping(value = "impExcelTask", method = {RequestMethod.POST}) + @ResponseBody + public ResponseEntity impExcelTask(HttpServletRequest request) { + HttpHeaders responseHeaders = new HttpHeaders(); + responseHeaders.setContentType(new MediaType("text", "html", Charset.forName("UTF-8"))); + try { + //读取文件 + MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) (request); + MultipartFile multipartFile = multiRequest.getFile("upfile"); + //属性名 + String[] fieldNames = { + "xh","inspectionDate", "name","dialysisDate","bloodFillIncomplete", "bloodSignNonstandard", "bloodMedicalstaffNosign", "healtheduFillIncomplete", "healtheduSignNonstandard", + "healtheduMedicalstaffNosign", "informedconDocNosign", "informedconFamilymembersMiss", "informedconNameNonstandard", "other", "responsibleNurse", "rectificationDate", + "rectificationSgin", "remark" + }; + //判断集中类中的方法名 + String[] judgeMethods = {}; + Power_User user = (Power_User)request.getSession().getAttribute("CURRENT_USER"); + EmrBloodDialysisDoc emrBloodDialysisDoc = new EmrBloodDialysisDoc(); + emrBloodDialysisDoc.setExportDate(new Date()); + emrBloodDialysisDoc.setExportNo(user.getUserName()); + + //实例化 + ImportExcelUtil.newInstance("bloodPurificationMapper", emrBloodDialysisDoc, EmrBloodDialysisDoc.class); + //导入excel的操作 + ImportExcelEntity excelEntity = ImportExcelUtil.fileImportByBloodPurification(multipartFile, fieldNames, judgeMethods, ""); + if (excelEntity.getSuccessCount() == 0 && excelEntity.getWrongCount() == 0) { + //无数据 + return new ResponseEntity("无数据!", responseHeaders, HttpStatus.OK); + } + if (excelEntity.getWrongCount() == 0) { + //成功 + return new ResponseEntity(null, responseHeaders, HttpStatus.OK); + } else { + //有出错数据 + String msgStr = excelEntity.getWorkBookKey() + "@已成功导入" + excelEntity.getSuccessCount() + "条,失败" + excelEntity.getWrongCount() + "条,随后将导出错误记录!"; + return new ResponseEntity(msgStr, responseHeaders, HttpStatus.OK); + } + + } catch (Exception e) { + ExceptionPrintUtil.printException(e); + e.printStackTrace(); + //抛异常 + return new ResponseEntity(e.getMessage(), responseHeaders, HttpStatus.OK); + } + } +} diff --git a/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java b/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java new file mode 100644 index 0000000..1a989bd --- /dev/null +++ b/src/main/java/com/emr/dao/bloodPurification/BloodPurificationMapper.java @@ -0,0 +1,14 @@ +package com.emr.dao.bloodPurification; + +import com.emr.entity.EmrBloodDialysisDoc; +import java.util.List; +import java.util.Map; + +public interface BloodPurificationMapper{ + + int SimpleInsert(List list); + + List queryDocumentList(EmrBloodDialysisDoc emrBloodDialysisDoc); + + List> queryInspectionRecordsSum(EmrBloodDialysisDoc emrBloodDialysisDoc); +} \ No newline at end of file diff --git a/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java b/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java new file mode 100644 index 0000000..bbac451 --- /dev/null +++ b/src/main/java/com/emr/entity/EmrBloodDialysisDoc.java @@ -0,0 +1,30 @@ +package com.emr.entity; + +import lombok.Data; + +import java.util.Date; +@Data +public class EmrBloodDialysisDoc { + + private Integer xh; + private String inspectionDate; + private String name; + private String dialysisDate; + private String bloodFillIncomplete; + private String bloodSignNonstandard; + private String bloodMedicalstaffNosign; + private String healtheduFillIncomplete; + private String healtheduSignNonstandard; + private String healtheduMedicalstaffNosign; + private String informedconDocNosign; + private String informedconFamilymembersMiss; + private String informedconNameNonstandard; + private String other; + private String responsibleNurse; + private String rectificationDate; + private String rectificationSgin; + private String remark; + private Date exportDate; + private String exportNo; + +} \ No newline at end of file diff --git a/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java b/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java new file mode 100644 index 0000000..1efe56b --- /dev/null +++ b/src/main/java/com/emr/service/bloodPurification/BloodPurificationService.java @@ -0,0 +1,5 @@ +package com.emr.service.bloodPurification; + +public interface BloodPurificationService{ + +} diff --git a/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java b/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java new file mode 100644 index 0000000..f6adc33 --- /dev/null +++ b/src/main/java/com/emr/service/bloodPurification/impl/BloodPurificationServiceImpl.java @@ -0,0 +1,14 @@ +package com.emr.service.bloodPurification.impl; + +import com.emr.dao.bloodPurification.BloodPurificationMapper; +import com.emr.service.bloodPurification.BloodPurificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + + +@Service +public class BloodPurificationServiceImpl implements BloodPurificationService { + @Autowired + BloodPurificationMapper bloodPurificationMapper; + +} diff --git a/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml b/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml new file mode 100644 index 0000000..28b5da9 --- /dev/null +++ b/src/main/resources/mapper/bloodPurification/BloodPurificationMapper.xml @@ -0,0 +1,182 @@ + + + + + + + + insert into emr_blood_dialysis_doc + ( + xh, + inspection_date, + name, + dialysis_date, + blood_fill_incomplete, + blood_sign_nonstandard, + blood_medicalstaff_nosign, + healthedu_fill_incomplete, + healthedu_sign_nonstandard, + healthedu_medicalstaff_nosign, + informedcon_doc_nosign, + informedcon_familymembers_miss, + informedcon_name_nonstandard, + other, + responsible_nurse, + rectification_date, + rectification_sgin, + remark, + export_date, + export_no + ) + + select + #{item.xh}, + CAST(#{item.inspectionDate} AS DATE), + #{item.name}, + CAST(#{item.dialysisDate} AS DATE), + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + + + '1', + + + '0', + + + #{item.other}, + #{item.responsibleNurse}, + CAST(#{item.rectificationDate} AS DATE), + #{item.rectificationSgin}, + #{item.remark}, + #{item.exportDate}, + #{item.exportNo} + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp new file mode 100644 index 0000000..1445ae7 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/documentList.jsp @@ -0,0 +1,515 @@ +<%@ page import="com.emr.entity.Power_User" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> +<%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %> +<%@ include file="/WEB-INF/jspf/importPackageJsp.jspf" %> + + + + + 文书报表 + + + + + + + + + + + + +
+
+
+ + 文书报表 + +
+
+
+
+ 年月: + +
+
+
+ +
+
+
+
+
+
+ 护士: +
+
+
+
+ 当前月份: +
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前季度: +
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前半年: +
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前一年: +
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+
+
+ 扫描: +
+
+
+
+ 当前月份: +
+
+
血净人次 + 0次 + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前季度: +
+
+
血净人次 + 0次 + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前半年: +
+
+
血净人次 + 0次 + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+ 当前一年: +
+
+
血净人次 + 0次 + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
知情同意合格率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
血净记录缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
健康教育缺失率 + 0% + (环比 + 上升 + 0% + ,同比 + 上升 + 0% + ) +
+
+
+
+
+
+
+ + + + + diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp new file mode 100644 index 0000000..15c3590 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecords.jsp @@ -0,0 +1,176 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> + + + + + 详细记录 + + + + + + + + +
+ +
+
+ + 详细记录 + +
+
+
+
+
+
+ 检查日期: + +
+
+ 患者姓名: + +
+
+ 透析日期: + +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + + + + + + diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecordsSum.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecordsSum.jsp new file mode 100644 index 0000000..2544558 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/inspectionRecordsSum.jsp @@ -0,0 +1,202 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> + + + + + 其他管理 + + + + + + + + +
+
+
+ + 检查记录 + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+ + +
+
+
+
+ + + + + + diff --git a/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/list.jsp b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/list.jsp new file mode 100644 index 0000000..dac8b34 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/bloodPurification/list.jsp @@ -0,0 +1,366 @@ +<%@ page import="com.emr.entity.Power_User" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> +<%@ include file="/WEB-INF/jspf/boostrapSelect.jspf" %> +<%@ include file="/WEB-INF/jspf/importPackageJsp.jspf" %> + + + + + 血透查询 + + + + + + + + + + + + +
+ + +
+
+ + 病案查询 + +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + <%-- value="盘号,病案号,ID号,住院次数,姓名,性别,年龄_岁,年龄_月,入院日期,出院日期,出院科室,联系地址,主诊ICD码,主诊名称,主诊转归,住院天数,主治医生,其他诊断,病理诊断,损伤中毒,是否有手术,病案备注">--%> + + + <%-- value="commomtable.ph,commomtable.inpatient_no,commomtable.admiss_id,commomtable.admiss_times,commomtable.name,commomtable.sex,commomtable.age,commomtable.age_month,commomtable.admiss_date,commomtable.dis_date,commomtable.dis_dept,commomtable.home_addr,commomtable.main_diag_code,commomtable.main_diag_name,commomtable.main_dis_thing,commomtable.admiss_days,commomtable.attending,commomtable.other_diag_name,commomtable.pathology_name,commomtable.poisoning_name,commomtable.is_oper,memo,commomtable.file_source">--%> + + + <%-- value="ph,inpatientNo,admissId,admissTimes,name,sex,age,ageMonth,admissDate,disDate,disDept,homeAddr,mainDiagCode,mainDiagName,mainDisThing,admissDays,attending,otherDiagName,pathologyName,poisoningName,isOper,memo">--%> + + + + + + + + + + +
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ + + + + + + diff --git a/src/main/webapp/WEB-INF/views/recordManage/commomSearch/imgStatisticsList.jsp b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/imgStatisticsList.jsp new file mode 100644 index 0000000..b45f245 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/recordManage/commomSearch/imgStatisticsList.jsp @@ -0,0 +1,176 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + +<%@ include file="/WEB-INF/jspf/common.jspf" %> + + + + + 其他管理 + + + + + + + + +
+
+
+ + 病案图像统计 + +
+
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+ + +
+
+
+
+ + + + + diff --git a/src/main/webapp/static/js/recordManage/bloodPurification/commomBloodListqf.js b/src/main/webapp/static/js/recordManage/bloodPurification/commomBloodListqf.js new file mode 100644 index 0000000..2df4ef4 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/bloodPurification/commomBloodListqf.js @@ -0,0 +1,196 @@ +$(function () { + //百叶窗风格 + $('.collapse').collapse({ + toggle: false + }) + //加载表格 + initialization(); + //权限控制按钮 + permissionControlButton(); +}); +function initialization(){ + search() +} +function permissionControlButton() { + var show = $("#showRecord").val(); + var load = $("#downloadRecord").val(); + //批量借阅申请权限判断 + if (show == 1) { + $("#borrowingsBox").hide(); + } else { + $("#borrowingsBox").show(); + } + //批量下载申请权限判断 + if (load == 1) { + $("#downBorrowingBox").show();//下载按钮显示 + } else { + $("#downBorrowingBox").hide();//下载按钮不显示 + } +} +//时间格式属性名集合 +var commomtable = 'commomtable'; + +//拼接sql +function getSql() { + $("#whereSql").val(''); + $("#fromTableSql").val(''); + var dataSource = $("#dataSource").val(); + var inputValue = getInputValue(); + //from语句字符串 + var fromTableNames = ''; + //where语句字符串 + var whereNames = ' where '; + //拼接where语句 + var name = ''; + if(!isEmpty(dataSource)){ + name = 'data_source'; + whereNames += commomtable + "." + name + " = '" + dataSource + "' AND "; + } + if (inputValue != '') { + //判断是否多表 + var tables = false; + $('.otherTable').each(function () { + if ($(this).val() != '') { + tables = true; + return false; + } + }) + //姓名 + var searchName = $("#name").val(); + if (!isEmpty(searchName)) { + name = 'name'; + //去除前后空格 + searchName = searchName.replace(/(^\s*)|(\s*$)/g, ""); + var pinyin = /^[a-zA-Z]+$/; + //1.逗号隔开 + if (searchName.indexOf(",") != -1 || searchName.indexOf(",") != -1) { + if (searchName.indexOf(",") != -1) { + searchName = searchName.split(","); + } else if (searchName.indexOf(",") != -1) { + searchName = searchName.split(","); + } + for (var i = 0; i < searchName.length; i++) { + if (searchName[i] != '') { + //拼接前括号 + if (i == 0) { + whereNames += "("; + } + if (i != searchName.length - 1) { + if (searchName[i].indexOf("*") != -1) { + //2.带*号 + searchName = searchName.replace(/\*/g, "_"); + whereNames += commomtable + "." + name + " LIKE '" + searchName[i] + "' OR "; + } else if (pinyin.test(searchName[i])) { + //3.拼音缩写 + whereNames += commomtable + ".name_cym LIKE '%" + searchName[i] + "%' OR "; + } else { + whereNames += commomtable + "." + name + " LIKE '%" + searchName[i] + "%' OR "; + } + } else { + if (searchName[i].indexOf("*") != -1) { + //2.带*号 + searchName = searchName.replace(/\*/g, "_"); + whereNames += commomtable + "." + name + " LIKE '" + searchName[i] + "')"; + } else if (pinyin.test(searchName[i])) { + //3.拼音缩写 + whereNames += commomtable + ".name_cym LIKE '%" + searchName[i] + "%')"; + } else { + whereNames += commomtable + "." + name + " LIKE '%" + searchName[i] + "%')"; + } + } + } + } + whereNames += " AND "; + } else if (searchName.indexOf("*") != -1) { + //2.带*号 + searchName = searchName.replace(/\*/g, "_"); + whereNames += commomtable + "." + name + " LIKE '" + searchName + "' AND "; + } else if (pinyin.test(searchName)) { + //3.拼音缩写 + whereNames += commomtable + ".name_cym LIKE '%" + searchName + "%' AND "; + } else { + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + } + //住院号 + if (!isEmpty($("#admiss_id").val())) { + name = 'admiss_id'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + //身份证号码 + if(!isEmpty($("#id_card").val())){ + name = 'id_card'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + //血透id + if(!isEmpty($("#hemodialysis_id").val())){ + name = 'hemodialysis_id'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + //血透时间 + if (!isEmpty($("#startTime5").val()) && !isEmpty($("#endTime5").val())) { + name = 'hemodialysis_date'; + whereNames += commomtable + "." + name + " BETWEEN '" + $("#startTime5").val() + " 00:00:00' AND '" + $("#endTime5").val() + " 23:59:59' AND "; + } + //门诊号 + if(!isEmpty($("#outpatient_no").val())){ + name = 'outpatient_no'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + //文书号 + if(!isEmpty($("#document_no").val())){ + name = 'document_no'; + whereNames += commomtable + "." + name + " LIKE '%" + $("#" + name).val() + "%' AND "; + } + //文书类型 + if(!isEmpty($("#document_type").val())){ + name = 'document_type'; + whereNames += commomtable + "." + name + " = " + $("#" + name).val() + " AND "; + } + } + if (whereNames != ' where ') { + whereNames = whereNames.substring(0, whereNames.length - 4); + $("#whereSql").val(whereNames); + $("#fromTableSql").val(fromTableNames); + } +} + +//搜索功能 +function search() { + getSql(); + freshTable(); +} +//清楚内容方法 +function clearContent(id) { + var popNode = document.getElementById(id + "Div"); + popNode.style.border = "none"; + var contentNode = document.getElementById(id + "Content"); + var len = contentNode.childNodes.length; + for (var i = len - 1; i >= 0; i--) { + contentNode.removeChild(contentNode.childNodes[i]); + } +} + +$(function () { $("[data-toggle='popover']").popover(); }); + +$("[rel=drevil]").popover({ + trigger:'manual', + html: 'true', + animation: false +}).on("mouseenter", function () { + var _this = this; + $(this).popover("show"); + $(this).siblings(".popover").on("mouseleave", function () { + $(_this).popover('hide'); + }); +}).on("mouseleave", function () { + var _this = this; + setTimeout(function () { + if (!$(".popover:hover").length) { + $(_this).popover("hide") + } + }, ); +});  + + + diff --git a/src/main/webapp/static/js/recordManage/bloodPurification/inspectionRecords.js b/src/main/webapp/static/js/recordManage/bloodPurification/inspectionRecords.js new file mode 100644 index 0000000..74da140 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/bloodPurification/inspectionRecords.js @@ -0,0 +1,351 @@ +var pageNumber; +$('#mytab').bootstrapTable({ + toolbar: '#toolbar', //工具按钮用哪个容器 + striped: true, //是否显示行间隔色 + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) + pagination: true, //是否显示分页(*) + sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) + paginationPreText : '上一页', + paginationNextText : '下一页', + pageNumber: 1, //初始化加载第一页,默认第一页 + pageSize: 10, //每页的记录行数(*) + pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*) + columns:[ + [ + { + field: 'xh', + title: '序号', + sortable: true, + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'检查日期', + field:'inspectionDate', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'患者姓名', + field:'name', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'透析日期', + field:'dialysisDate', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title: '血液净化记录存在问题', + field: '', + align: 'center', + valign: 'middle', + colspan: 3, + },{ + title: '健康教育存在问题', + field: '', + align: 'center', + valign: 'middle', + colspan: 3, + },{ + title: '血透知情同意书存在问题', + field: '', + align: 'center', + valign: 'middle', + colspan: 3, + }, + { + title:'其他', + field:'other', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'责任护士', + field:'responsibleNurse', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'整改日期', + field:'rectificationDate', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'整改签名', + field:'rectificationSgin', + align:'center', + valign: "middle", + rowspan: 2 + }, + { + title:'备注', + field:'remark', + align:'center', + valign: "middle", + rowspan: 2 + }, + ], + [ + { + title:'记录填写不完整', + field:'bloodFillIncomplete', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'医嘱执行签名不规范', + field:'bloodSignNonstandard', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'医护未签名', + field:'bloodMedicalstaffNosign', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'未做宣教', + field:'healtheduFillIncomplete', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'宣教填写不完整体', + field:'healtheduSignNonstandard', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'护患未签名', + field:'healtheduMedicalstaffNosign', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'医生未签名', + field:'informedconDocNosign', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'患者家属关系缺项', + field:'informedconFamilymembersMiss', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + { + title:'通路名称不规范', + field:'informedconNameNonstandard', + align:'center', + formatter: function (value, row, index) { + if(value == '1'){ + return '✓'; + }else{ + return ''; + } + } + }, + ], + ], + locale:'zh-CN',//中文支持, + url:path+'/bloodPurification/queryDocumentList', + queryParams: function (params) { + return{ + limit : params.limit, // 每页显示数量 + offset : params.offset, // SQL语句起始索引 + page : (params.offset / params.limit) + 1, //当前页码, + inspectionDate:$("#inspectionDate").val(), + name:$("#name").val(), + dialysisDate:$("#dialysisDate").val(), + } + }, + //选中单个复选框 + onCheck:function(row){ + var checks = $("#checks").val(); + $("#checks").val(checks+=row.logId + ","); + }, + //取消单个复选框 + onUncheck:function(row){ + var checks = $("#checks").val(); + checks = checks.replace(row.logId + ","); + $("#checks").val(checks); + }, + //全选 + onCheckAll:function(rows){ + $("#checks").val(""); + var checks = ''; + for(var i=0;i查看明细'; + } + } + ], + ], + locale:'zh-CN',//中文支持, + url:path+'/bloodPurification/queryInspectionRecordsSum', + queryParams: function (params) { + return{ + limit : params.limit, // 每页显示数量 + offset : params.offset, // SQL语句起始索引 + page : (params.offset / params.limit) + 1, //当前页码, + inspectionDate:$("#inspectionDate").val(), + name:$("#name").val(), + dialysisDate:$("#dialysisDate").val(), + } + }, + //选中单个复选框 + onCheck:function(row){ + var checks = $("#checks").val(); + $("#checks").val(checks+=row.logId + ","); + }, + //取消单个复选框 + onUncheck:function(row){ + var checks = $("#checks").val(); + checks = checks.replace(row.logId + ","); + $("#checks").val(checks); + }, + //全选 + onCheckAll:function(rows){ + $("#checks").val(""); + var checks = ''; + for(var i=0;i GETDATE()-1 and emr_apply_approve1.applyer = " +userName+ " and emr_apply_approve1.apply_type = 3 left join emr_lock on commomtable.patient_id = emr_lock.patient_id and emr_lock.lock_state = 1 "; +*/ +//定义查看详情的请求地址url +function returnShowDetailUrl(patientId,fileSource,name,disDate,dataSource){ + if (fileSource==3 && fileSource!="") { + // var print = $("#print").val(); + return 'http://172.18.0.227:91/LZ_API.aspx?patientId=' + patientId+"&name="+name+"&disDate="+disDate+"&isPrint="+1; + }else { + return path + '/commom/showRecord174?patientId=' + patientId + '&dataSource=' + dataSource; + } +} +//TODO 添加需要格式化日期格式的字段 +var dateFields = 'disDate,admissDate,birthday,affirmDate,operationTime,visitTime,hemodialysisDate'; +var pageNumber = 1; +$(function(){ + //根据窗口调整表格高度 + /*$(window).resize(function() { + $('#mytab').bootstrapTable('resetView', { + height: tableHeight() + }) + })*/ + //可预览信息 + showRecord = $("#showRecord").val(); + //可下载信息 + downloadRecord = $("#downloadRecord").val(); +}) +$(document).keydown(function (event) { + if (event.keyCode == 13) { + search(); + } +}); +function freshTable(){ + var powerMenus = $("#powerMenus").val().substring(1,$("#powerMenus").val().length-1); + var powerMenusArr = powerMenus.split(", "); + for (var i = 0; i < powerMenusArr.length; i++){ + var strs = powerMenusArr[i]; + if (strs == '/commom/updateCommomInfo') { + $("#powerMenu").val("true"); + } + } + var str = $("#powerMenu").val(); + $("#mytab").bootstrapTable('destroy'); + $("#checks").val(''); + var columns = []; + var map1 = {}; + map1['title'] = '操作'; + map1['field'] = 'Button'; + map1['align'] = 'center'; + map1['formatter'] = 'AddFunctionAlty'; + columns.push(map1) + var flag = $("#showPrint").val(); + //固定列标识 + var mixFlag = false; + if(flag == 1){ + flag = true; + }else{ + flag = false; + mixFlag = true; + } + columns.push({ + title:'全选', + field:'select', + checkbox:true, + width:25, + valign:'middle', + }, + { + title:'ID', + field:'patientId', + visible:false + }, + { + title:'序号', + field:'no', + formatter: function (value, row, index) { + //获取每页显示的数量 + var pageSize = $('#mytab').bootstrapTable('getOptions').pageSize; + //获取当前是第几页 + if(pageNumber == 1){ + pageNumber = $('#mytab').bootstrapTable('getOptions').pageNumber; + } + //返回序号,注意index是从0开始的,所以要加上1 + return pageSize * (pageNumber - 1) + index + 1; + } + }) + var tableThNames = $("#tableThNames").val(); + if(tableThNames != ''){ + var fieldCns = ''; + var fields = $("#fields").val().split(","); + tableThNames = tableThNames.split(","); + var sortFields = $("#sortField").val().split(","); + for(var i = 0;i', + detailView: flag, + pageNumber: 1, //初始化加载第一页,默认第一页 + pageSize: 5, + // sortName: 'disDate', + // sortable: true, + // sortOrder: 'desc', + search: false, + //每页的记录行数(*) + pageList: [5,10,20,50,100,500,1000],//可供选择的每页的行数(*) + height: 400,//高度调整 //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 + buttonsAlign: "left",//按钮对齐方式 + columns:columns, + fixedColumns: mixFlag,//固定列 + fixedNumber:5,//固定前七列 + locale:'zh-CN',//中文支持, + url:path+'/template/cutomSearchTable',//排序方式 + queryParams: function (params) { + const param = { + selectSql:$("#englishFields").val(), + fromTableSql:$("#fromTableSql").val(), + whereSql:$("#whereSql").val(), + orderBys:$("#orderBys").val(), + limit : params.limit, // 每页显示数量 + offset : params.offset, // SQL语句起始索引 + page : (params.offset / params.limit) + 1, //当前页码 + sortNames: isEmpty(this.sortName) ? '' : camelToSnake(this.sortName), + sortOrder: this.sortOrder + } + return param + }, + responseHandler:function(res){ + //在ajax获取到数据,渲染表格之前,修改数据源 + var nres = []; + nres.push({total:res.total,rows:res.list}); + return nres[0]; + }, + onLoadSuccess:function(res){ + $(".clearfix").height(0); + $(".page-list").show(); + $(".fixed-table-body").css("overflow","auto"); + //赋值总数 + $("#rows").val(res.total); + //全选 + $('.fixed-table-container').on('click','input[name="btSelectAll"]',function(){ + if($(this).is(':checked')){ + $('input[name="btSelectItem"]').prop('checked',true); + }else{ + $('input[name="btSelectItem"]').prop('checked',false); + } + }) + //逐个选择 + $('.fixed-table-container').on('click','input[name="btSelectItem"]',function(){ + var inputs = $(this).parents('.fixed-table-body-columns').find('input[name="btSelectItem"]') + var num = 0; + inputs.each(function(){ + if($(this).is(':checked')){ + num++; + } + }); + if(num==inputs.length){ + $('input[name="btSelectAll"]').prop('checked',true); + }else{ + $('input[name="btSelectAll"]').prop('checked',false); + } + var index = $(this).parents('tr').index(); + $('#Table1').find('input[name="btSelectItem"]').eq(index).click(); + }); + }, + + //监听分页点击事件 + onPageChange: function(num, type) { + pageNumber = num; + }, + //选中单个复选框 + onCheck:function(row){ + var checks = $("#checks").val(); + $("#checks").val(checks+="'"+row.patientId + "',"); + }, + onUncheck: function (row, $element) { + chosenGroupId = ""; + $mytab.bootstrapTable("removeAll"); + $mytab.bootstrapTable("refresh"); + //EditViewById(id, 'view'); + }, + onUncheck:function(row){ + var checks = $("#checks").val(); + checks = checks.replace("'"+row.patientId + "',",""); + $("#checks").val(checks); + }, + //全选 + onCheckAll:function(rows){ + $("#checks").val(""); + var checks = ''; + for(var i=0;i;打印时间:"+result[i].createTime+";" + + "打印用途:"+result[i].typeName+";打印者:"+result[i].creater+""; + } + $detail.html(str+''); + }else{ + $detail.html('未曾打印'); + } + }else{ + toastr.error(data.msg); + } + } + }) + } + }) +} +function isEmpty(str) { + return !str || str === '' || str === null || str === undefined; +} +function camelToSnake(str) { + // 将大写字母替换为下划线加小写字母 + return str.replace(/[A-Z]/g, function(match) { + return '_' + match.toLowerCase(); + }); +} + +//导出excel功能 +function exportExcel() { + getChecked(); + var checks = $("#checks").val(); + if ($("#rows").val() > 5000 && checks == '') { + toastr.warning("数据量大,暂提供5000条以内数据导出!"); + } else { + getSql(); + var tableThNames = $("#tableThNames").val(); + var fieldCns = $("#fieldCns").val(); + if (checks != '') { + //按选择框选择导出 + checks = checks.substring(0, checks.length - 1); + var whereSql = ' WHERE ' + commomtable + '.patient_id IN (' + checks + ')'; + var url = path + "/template/exportExcel"; + post(url, { + "selectSql": $("#englishFields").val(), + "fromTableSql": $("#fromTableSql").val(), + "whereSql": whereSql, + "tableThNames": tableThNames, + "fieldCns": fieldCns, + }); + } else { + Common.confirm({ + title: "提示", + message: "没有选中,您确定要按搜索栏条件导出?", + operate: function (reselt) { + if (reselt) { + var url = path + "/template/exportExcel"; + post(url, { + "selectSql": $("#englishFields").val(), + "fromTableSql": $("#fromTableSql").val(), + "whereSql": $("#whereSql").val(), + "orderBys": $("#orderBys").val(), + "tableThNames": tableThNames, + "fieldCns": fieldCns + }); + } + } + }) + } + } +} +function btn(){ + var url = path + "/printInfoList/pageUI174"; + window.location.href = url; +} + +/** + * 判断是否有使用固定列获取选中多行数据 + * @param tableId + * @returns {*} + */ +function getSelectedRow_st(tableId) { + //解決固定列导致选择复选框选不中的问题 + //首先判断表格是否为固定列表格,使用bootstrapTable('getOptions')获取表格的所有配置项,fixedColumns字段判断是否为固定列 + if($("#"+tableId).bootstrapTable('getOptions').fixedColumns){ + var selectCheckbox = []; + //循环表格的所有行,判断被选中的行,并且push进入selectCheckbox数组 + for(var i=0;i<$("tbody tr").length;i++){ + if($(".fixed-table-body-columns tbody tr:nth-child("+(i+1)+") td:first input[name='btSelectItem']").prop("checked")){ + // console.log($("#table").bootstrapTable("getData")[i]);//输出选中行的所有数据bootstrapTable("getDate"),获取表格的所有数据 + selectCheckbox.push($("#"+tableId).bootstrapTable("getData")[i]); + } + } + return selectCheckbox; + }else{ + return $("#"+tableId).bootstrapTable('getSelections'); + } +} + +/** + * 获取选中行 + */ +function getChecked(){ + var idlist = getSelectedRow_st("mytab"); + if(idlist.length > 0){ + var checks = ''; + for (var i = 0; i < idlist.length; i++) { + checks+="'"+idlist[i].patientId + "',"; + } + $("#checks").val(checks); + }else{ + $("#checks").val(""); + } +} + +function reLoadTable(){ + $("#mytab").bootstrapTable('refresh',path+'/template/cutomSearchTable?sql'+$("#sql").val()); + $('#mytab').bootstrapTable('selectPage', pageNumber); + $("#checks").val(""); + $("#check").val(""); +} + +/** + * 列表行‘操作’按钮 + * @param value + * @param row + * @param index + * @returns {string} + * @constructor + */ +function AddFunctionAlty(value, row, index) { + var dataSource = $("#dataSource").val(); + var patientId = "'" + row.patientId + "'"; + //是否可查看 + var isShowDetail = row.isShowDetail; + var downloadOper = row.downloadOper; + var isDownload = row.isDownload; + var str = ''; + if((null != isShowDetail && isShowDetail == 1) || showRecord == "1"){ + str += '查看详情'; + } + //判断可否下载 + if(downloadOper == 1){ + if((null != isDownload && isDownload == 1) || downloadRecord == '1'){ + str += ''; + } + } + return str; +} + + +/***********************************************按钮功能*****************************************************************/ +//清空功能 +function clearForm(){ + document.forms[0].reset(); + $("#dis_dept").selectpicker("refresh"); +} + +/** + * 获取修改的病案信息 + * @param patientId + */ +function getUpdateCommomInfo(patientId) { + $.ajax({ + type:'get', + url:path+'/commom/getCommomInfoById', + data:{patientId:patientId}, + dataType:'json', + success:function(data){ + if(null != data){ + $("#patientId").val(data.patientId); + $("#inpatientNo").val(data.inpatientNo); + $("#updateName").val(data.name); + $("#admissTimes").val(data.admissTimes); + $("#disDate").val(data.disDate); + loadDeptDefault(data.disDept); + $("#main_diag_name").val(data.mainDiagName); + $("#cycleNo").val(data.cycleNo); + $("#medicalNo").val(data.medicalNo); + $("#femaleName").val(data.femaleName); + $("#maleName").val(data.maleName); + $("#operationTime").val(data.operationTime); + $("#cycleType").val(data.cycleType); + $("#visitTime").val(data.visitTime); + $("#proNo").val(data.proNo); + $("#proName").val(data.proName); + $("#updateApplicant").val(data.applicant); + $("#hemodialysisId").val(data.hemodialysisId); + $("#hemodialysisDate").val(data.hemodialysisDate); + $("#radiotherapyNo").val(data.radiotherapyNo); + } + } + }) +} +/** + * 批量下载功能 + * @param typeId + */ +function downloadZip(typeId){ + var dataSource = $("#dataSource").val(); + var patientIds = ""; + getChecked(); + var checks = $("#checks").val(); + if(checks != ''){ + patientIds = powerPotient(checks, true,typeId); + if(patientIds != ''){ + patientIds = patientIds.substring(0,patientIds.length-1); + post(path+'/template/downloadBloodZip',{"patientIds":patientIds,"dataSource": dataSource, + "flag":$("#flag").val()}); + }else{ + toastr.warning("必须申请通过!") + } + }else{ + var sql = $("#sql").val(); + if(sql != '') { + var rows = $("#rows").val(); + if(rows != '' && rows <= 1000){ + Common.confirm({ + title: "提示", + message: "没有选中,您确定要按搜索栏条件下载?", + operate: function (reselt) { + if (reselt) { + getSql(); + var sql = $("#sql").val(); + if (sql != '') { + $.ajax({ + type: 'post', + url: path + '/template/getPatientIdsBySql', + data: {sql: sql}, + dataType: 'json', + success: function (data) { + if (data != null) { + patientIds = powerPotient(data, false,typeId); + if (patientIds != '') { + patientIds = patientIds.substring(0, patientIds.length - 1); + //按整份下载 + post(path+'/template/downloadBloodZip',{"patientIds":patientIds,"flag":$("#flag").val()}); + }else { + toastr.warning("必须申请通过!") + } + } else { + toastr.warning("没有可下载的内容!") + } + } + }) + } + } else { + toastr.warning("没有可下载的内容!") + } + } + }) + }else{ + toastr.warning("为了用户体验,限制批量操作不超过1000条数据!"); + } + }else{ + toastr.warning("搜索条件不可为空!"); + } + } +} + +/** + * 下载pdf功能 + * @param patientId + */ +function downloadPdf(patientId){ + //查询是否有图片 + $.ajax({ + type:'get', + url:path+'/template/getScanCountByPatientId', + data:{patientId:patientId,flag:$("#flag").val()}, + success:function(data){ + if(data == 1){ + post(path + '/template/downloadPdfBlood', {"patientIds": patientId, + "flag":$("#flag").val()}); + }else{ + toastr.warning("找不到影像资料!"); + } + } + }) +} + + +function post(url, params) { + // 创建form元素 + var temp_form = document.createElement("form"); + // 设置form属性 + temp_form .action = url; + temp_form .target = "_self"; + temp_form .method = "post"; + temp_form .style.display = "none"; + // 处理需要传递的参数 + for (var x in params) { + var opt = document.createElement("textarea"); + opt.name = x; + opt.value = params[x]; + temp_form .appendChild(opt); + } + document.body.appendChild(temp_form); + // 提交表单 + temp_form .submit(); +} + +/** + * 定义空的inputValue方法 + * @returns {boolean} + */ +function getInputValue(){ + //判断是否有搜索条件 + //所有input + var isInputValue = false; + $('.inputValue').each(function(){ + var val = $(this).val(); + if(val != ''){ + isInputValue = true; + return; + } + }) + //性别 + if(!isInputValue){ + $('input[class=sexInput]:checked').each(function(){ + var val = $(this).val(); + if(val != ''){ + isInputValue = true; + return; + } + }) + //限手术 + var isOperInput = $('.isOperInput').val(); + if(isOperInput == 1){ + isInputValue = true; + } + } + return isInputValue; +} + +/** + * 加载申请借阅类型 + * @param type + */ +function loadApplyType(type){ + $.ajax({ + type:'get', + url:path+'/template/getLoadApplyType', + dataType:'json', + success:function (data) { + if(null != data){ + $("#applyType").empty(); + var html = ''; + for (var i = 0; i < data.length; i++) { + if(data[i].code != ''){ + if(type == 1 && data[i].code != 3){ + html += ''; + } + if(type == 2 && data[i].code == 3){ + html += ''; + } + if(type == 4 && data[i].code == 4){ + html += ''; + } + } + } + $("#applyType").append(html); + } + } + }) +} + +/** + * 单个申请借阅 + * @param patientId + */ +function borrowing(patientId){ + pickTime("effeTime", null); + $("#typeId").val('approves'); + //加载申请借阅类型 + loadApplyType(1); + setFormToken(); + document.forms[1].reset(); + $("#approveId").val(""); + $("#check").val("'"+patientId+"',"); + //查询该记录是否有保存未提交的记录 + $.ajax({ + type:'post', + url:path+'/approve/approveListByAppleStatus?patientId='+patientId+'&type=1', + dataType:'json', + success:function(data){ + if(data != null || data != ''){ + $("#approveId").val(data.id); + $("#effeTime").val(data.effeTime); + $("#applyType").val(data.applyType); + $("#effeDays").val(data.effeDays); + $("#applyReason").val(data.applyReason); + } + } + }) +} + +/** + * 批量申请借阅 + */ +function borrowings(){ + pickTime("effeTime", null); + $("#typeId").val('approves'); + //加载申请借阅类型 + loadApplyType(1); + $("#name1").val(""); + setFormToken(); + document.forms[1].reset(); + $("#approveId").val(""); + getChecked(); + if($("#checks").val() == ''){ + //搜索框值不能为空 + var flag = true; + $("#block").children().find('[class=inputDiv]').find('input').each(function(){ + var val = $(this).val(); + if(val == ''){ + flag = false; + return false; + } + }) + var isInputValue = getInputValue(); + if(!flag && isInputValue==''){ + toastr.warning("搜索条件不能为空!"); + }else { + getSql(); + var sql = $("#sql").val(); + if (sql != '') { + var rows = $("#rows").val(); + if(rows != '' && rows <= 5000){ + if (confirm('没有选中,您确定要按搜索栏条件申请?')) { + $.ajax({ + type: 'post', + url: path + '/template/getPatientIdsBySql', + data: {sql: sql}, + dataType: 'json', + async:false, + success: function (data) { + if (data != null) { + $("#patientIds").val(data); + } + } + }) + $('#borrowings').attr("data-toggle", "modal"); + $('#borrowings').attr("data-target", "#myModal1"); + }else{ + $('#borrowings').removeAttr("data-toggle", "modal"); + $('#borrowings').removeAttr("data-target", "#myModal1"); + } + }else{ + toastr.warning("为了用户体验,限制批量操作不超过5000条数据!"); + } + } else { + toastr.warning("至少选中一条!"); + } + } + }else{ + $('#borrowings').attr("data-toggle", "modal"); + $('#borrowings').attr("data-target", "#myModal1"); + } +} + +/** + * 单个下载申请 + * @param patientId + */ +function downBorrowing(patientId){ + pickTime("effeTime", null); + $("#typeId").val('loads'); + //加载申请借阅类型 + loadApplyType(2); + setFormToken(); + document.forms[1].reset(); + $("#approveId").val(""); + $("#check").val("'"+patientId+"',"); + //查询该记录是否有保存未提交的记录 + $.ajax({ + type:'post', + url:path+'/approve/approveListByAppleStatus?patientId='+patientId+'&type=1', + dataType:'json', + success:function(data){ + if(data != null || data != ''){ + $("#approveId").val(data.id); + $("#effeTime").val(data.effeTime); + $("#applyType").val(data.applyType); + $("#effeDays").val(data.effeDays); + $("#applyReason").val(data.applyReason); + } + } + }) +} + +/** + * 批量下载借阅 + */ +function downBorrowings(){ + pickTime("effeTime", null); + $("#typeId").val('loads'); + //加载申请借阅类型 + loadApplyType(2); + $("#name1").val(""); + setFormToken(); + document.forms[1].reset(); + $("#approveId").val(""); + getChecked(); + if($("#checks").val() == ''){ + //搜索框值不能为空 + var flag = true; + $("#block").children().find('[class=inputDiv]').find('input').each(function(){ + var val = $(this).val(); + if(val == ''){ + flag = false; + return false; + } + }) + var isInputValue = getInputValue(); + if(!flag && isInputValue==''){ + toastr.warning("搜索条件不能为空!"); + }else { + getSql(); + var sql = $("#sql").val(); + if (sql != '') { + var rows = $("#rows").val(); + if(rows != '' && rows <= 5000){ + if (confirm('没有选中,您确定要按搜索栏条件申请?')) { + $.ajax({ + type: 'post', + url: path + '/template/getPatientIdsBySql', + data: {sql: sql}, + dataType: 'json', + async:false, + success: function (data) { + if (data != null) { + $("#patientIds").val(data); + } + } + }) + $('#downBorrowings').attr("data-toggle", "modal"); + $('#downBorrowings').attr("data-target", "#myModal1"); + }else{ + $('#downBorrowings').removeAttr("data-toggle", "modal"); + $('#downBorrowings').removeAttr("data-target", "#myModal1"); + } + }else{ + toastr.warning("为了用户体验,限制批量操作不超过5000条数据!"); + } + } else { + toastr.warning("至少选中一条!"); + } + } + }else{ + $('#downBorrowings').attr("data-toggle", "modal"); + $('#downBorrowings').attr("data-target", "#myModal1"); + } +} + +/** + * 模态框保存操作 + */ +function save(){ + var typeId = $("#typeId").val(); + saveMethod(1,"保存",typeId); +} + +/** + * 模态框提交操作 + */ +function add(){ + var typeId = $("#typeId").val(); + saveMethod(2,"提交",typeId); +} + +//封装模态框保存公共方法,applyState:提交状态1保存未提交2已提交.msg:操作后提示信息 +function saveMethod(applyState,msg,typeId){ + if($("#effeTime").val() != ''){ + var patientIds = $("#check").val(); + if(patientIds == '' || patientIds == undefined) { + patientIds = $("#checks").val(); + } + if(patientIds == '' || patientIds == undefined){ + patientIds = $("#patientIds").val(); + } + if (patientIds != '' || patientIds == undefined) { + //过滤已可查阅的patientId集合; + patientIds = powerPotient(patientIds,false,typeId); + if(patientIds != ''){ + patientIds = patientIds.substring(0, patientIds.length - 1); + var id = $("#approveId").val(); + var effeTime = $("#effeTime").val(); + var effeDays = $("#effeDays").val(); + var applyType = $("#applyType").val(); + var applyReason = $("#applyReason").val(); + if (applyReason==""){ + return toastr.warning("申请理由不能为空!"); + } + $.ajax({ + type:'post', + url:path+'/approve/addApplyApprove', + data:{id:id,applyState:applyState,effeTime:effeTime,effeDays:effeDays,applyType:applyType,applyReason:applyReason,patientIds:patientIds,formToken:$("#formToken").val()}, + dataType:'json', + success:function(data){ + if(data!=null && data.code == 0){ + if(applyState == 1){ + toastr.success("保存成功!"); + }else if(applyState == 2){ + toastr.success("申请成功,目前审核中,请耐心等待!"); + document.forms[1].reset(); + } + $('#myModal1').modal('hide'); + reLoadTable(); + }else{ + toastr.error(data.msg); + } + } + }) + }else{ + toastr.warning("没有可申请的记录") + } + } else { + toastr.warning("请至少选中一条记录") + } + }else{ + toastr.warning("有效时间不能为空!"); + $("#effeTime").focus(); + } +} + +//单个锁定 +function lock(patientId){ + patientId = "'"+patientId+"'"; + lockMethod(patientId); +} + +//批量锁定 +function blocks(){ + var locks = $("#locks").val(); + getChecked(); + var checks = $("#checks").val(); + if(checks != ''){ + //过滤已锁定的 + if(locks != ''){ + locks = locks.split(","); + for (var i = 0; i < locks.length; i++) { + if(locks[i] != '' && checks.indexOf(locks[i]) != -1){ + checks = checks.replace(locks[i]+",",""); + } + } + } + if(checks != ''){ + checks = checks.substring(0,checks.length-1); + lockMethod(checks); + }else{ + toastr.warning("没有可锁定的对象!") + } + }else{ + if($("#rows").val() > 1000){ + toastr.warning("数据量大,暂支持1000条内数据批量锁定"); + }else { + getSql(); + var sql = $("#sql").val(); + if (sql != '') { + Common.confirm({ + title: "提示", + message: "没有选中,您确定要按搜索栏条件锁定?", + operate: function (reselt) { + if (reselt) { + $.ajax({ + type: 'post', + url: path + '/template/getPatientIdsBySql', + data: {sql: sql}, + dataType: 'json', + success: function (data) { + if (data != null) { + var patientIds = data; + if (locks != '') { + locks = locks.split(","); + for (var i = 0; i < locks.length; i++) { + if (locks[i] != '' && patientIds.indexOf(locks[i]) != -1) { + patientIds = patientIds.replace(locks[i] + ",", ""); + } + } + } + if (patientIds != '') { + patientIds = patientIds.substring(0, patientIds.length - 1); + lockMethod(patientIds); + } + } else { + toastr.warning("没有可锁定的对象!") + } + } + }) + } + } + }) + } else { + toastr.warning("搜索内容不能为空!") + } + } + } +} + +//解锁 +function unlock(patientId){ + $.ajax({ + type:'post', + url:path+'/template/updateLockByPatientId?patientId='+patientId, + dataType:'json', + success:function(data){ + if(data.code == 0){ + toastr.success("解锁成功!"); + getLockPatientIds(); + reLoadTable(); + }else{ + toastr.error("解锁失败!") + } + } + }) +} + +//批量解锁 +function unlocks(){ + var locks = $("#locks").val(); + getChecked(); + var checks = $("#checks").val(); + if(checks != ''){ + //过滤已锁定的 + if(locks != ''){ + locks = locks.split(","); + var newChecks = ""; + for (var i = 0; i < locks.length; i++) { + if(locks[i] != '' && checks.indexOf(locks[i]) != -1){ + newChecks += locks[i]+","; + } + } + if(newChecks != ''){ + newChecks = newChecks.substring(0,newChecks.length-1); + //解锁的方法 + unlocksMethods(newChecks); + }else{ + toastr.warning("没有可解锁的对象!"); + } + }else{ + toastr.warning("没有可解锁的对象!"); + } + }else{ + if($("#rows").val() > 1000){ + toastr.warning("数据量大,暂支持1000条内数据批量解锁"); + }else { + getSql(); + var sql = $("#sql").val(); + if (sql != '') { + Common.confirm({ + title: "提示", + message: "没有选中,您确定要按搜索栏条件批量解锁?", + operate: function (reselt) { + if (reselt) { + $.ajax({ + type: 'post', + url: path + '/template/getPatientIdsBySql', + data: {sql: sql}, + dataType: 'json', + success: function (data) { + if (data != null) { + var patientIds = data; + if (locks != '') { + locks = locks.split(","); + for (var i = 0; i < locks.length; i++) { + if (locks[i] != '' && patientIds.indexOf(locks[i]) == -1) { + patientIds = patientIds.replace(locks[i] + ",", ""); + } + } + } + if (patientIds != '') { + patientIds = patientIds.substring(0, patientIds.length - 1); + //批量解锁的方法 + unlocksMethods(patientIds); + } + } else { + toastr.warning("没有可解锁的对象!") + } + } + }) + } + } + }) + } else { + toastr.warning("搜索内容不能为空!") + } + } + } +} + +//封装锁定方法 +function lockMethod(patientId){ + Common.confirm({ + title: "提示", + message: "请确认是否锁定该数据?", + operate: function (reselt) { + if (reselt) { + $.ajax({ + type: 'post', + url: path + '/template/addLockByPatientId', + data: {patientIds: patientId}, + dataType: 'json', + success: function (data) { + if (data.code == 0) { + toastr.success("锁定成功!"); + getLockPatientIds(); + reLoadTable(); + } else { + toastr.error("锁定失败!") + } + } + }) + } + } + }) +} + +//封装批量解锁方法 +function unlocksMethods(patientIds){ + $.ajax({ + type:'post', + url:path+'/template/updateLockByPatientIds', + data:{patientIds:patientIds}, + async:false, + dataType:'json', + success:function(data){ + if(data.code == 0){ + toastr.success("解锁成功!"); + getLockPatientIds(); + reLoadTable(); + }else{ + toastr.error("解锁失败!") + } + } + }) +} + +//查询被锁定的patienId集合 +function getLockPatientIds(){ + $("#locks").val(""); + $.ajax({ + type:'post', + url:path+'/emrLock/getLoctPatientIds', + dataType:'json', + async:false, + success:function(data){ + if(data != null && data != ''){ + $("#locks").val(data); + } + } + }) +} + +//过滤下载,导出pdf,查看详情的patientId集合:typeId:已借阅审批病案id集合或已下载审批病案id集合 +function powerPotient(patientIds,flag,typeId){ + //有权限的过滤 + //通过且未过期的可查看的 + var approves = $("#"+typeId).val(); + if(approves != '') { + var patientIdList = patientIds.split(","); + var approveList = approves.split(","); + patientIds = ''; + for (var i = 0; i < patientIdList.length; i++) { + if(patientIdList[i] != ''){ + //定义是否包含 + var flagPatinetId = false; + for (var j = 0; j < approveList.length; j++) { + //包含 + if (approveList[j] != '' && patientIdList[i].indexOf(approveList[j]) != -1) { + flagPatinetId = true; + break; + } + } + if(flag){ + //系统管理员放过 + var roleId = $("#roleId").val(); + if(roleId == 0){ + patientIds += patientIdList[i]+","; + }else{ + if(flagPatinetId){ + patientIds += patientIdList[i]+","; + } + } + }else{ + if(!flagPatinetId){ + patientIds += patientIdList[i]+","; + } + } + } + } + }else{ + var downloadRecord = $("#downloadRecord").val(); + if(downloadRecord != 1 && flag){ + patientIds = ''; + } + } + if(patientIds != ''){ + var patientIdList = patientIds.split(","); + //锁定的 + var locks = $("#locks").val(); + if(locks != '') { + var lockList = locks.split(","); + for (var i = 0; i < patientIdList.length; i++) { + for (var j = 0; j < lockList.length; j++) { + if (lockList[j] != '' && patientIdList[i] == lockList[j]) { + //包含 + patientIds = patientIds.replace(patientIdList[i]+',',""); + } + } + } + } + } + return patientIds; +} +/*********************************************************工具*************************************************************/ +//格式化时间 +function formatTime(datetime, fmt) { + if (datetime == null || datetime == 0) { + return ""; + } + if (parseInt(datetime) == datetime) { + if (datetime.length == 10) { + datetime = parseInt(datetime) * 1000; + } else if (datetime.length == 13) { + datetime = parseInt(datetime); + } + } + datetime = new Date(datetime.substring(0,datetime.replace(/-/g,'/').replace(/T|Z/g,' ').trim().length-11)); + var o = { + "M+" : datetime.getMonth() + 1, //月份 + "d+" : datetime.getDate(), //日 + "h+" : datetime.getHours(), //小时 + "m+" : datetime.getMinutes(), //分 + "s+" : datetime.getSeconds(), //秒 + "q+" : Math.floor((datetime.getMonth() + 3) / 3), //季度 + "S" : datetime.getMilliseconds() + //毫秒 + }; + if (/(y+)/.test(fmt)) + fmt = fmt.replace(RegExp.$1, (datetime.getFullYear() + "") + .substr(4 - RegExp.$1.length)); + for ( var k in o) + if (new RegExp("(" + k + ")").test(fmt)) + fmt = fmt.replace(RegExp.$1, + (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]) + .substr(("" + o[k]).length))); + return fmt; +} diff --git a/src/main/webapp/static/js/recordManage/commomSearch/imgStatisticsList.js b/src/main/webapp/static/js/recordManage/commomSearch/imgStatisticsList.js new file mode 100644 index 0000000..ecc94d2 --- /dev/null +++ b/src/main/webapp/static/js/recordManage/commomSearch/imgStatisticsList.js @@ -0,0 +1,99 @@ +var pageNumber; +$('#mytab').bootstrapTable({ + toolbar: '#toolbar', //工具按钮用哪个容器 + striped: true, //是否显示行间隔色 + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) + pagination: true, //是否显示分页(*) + sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) + paginationPreText : '上一页', + paginationNextText : '下一页', + pageNumber: 1, //初始化加载第一页,默认第一页 + pageSize: 10, //每页的记录行数(*) + pageList: [5,10,15,20,50,1000],//可供选择的每页的行数(*) + height: $(window).height()-109, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 + columns:[ + { + title:'期数', + field:'periods', + align:'center', + formatter: function (value, row, index) { + if(value == 0){ + return '合计'; + }else{ + return value; + } + } + }, + { + title:'病案份数', + field:'periodsNum', + align:'center', + }, + { + title:'图像数量', + field:'imgNum', + align:'center', + }, + ], + locale:'zh-CN',//中文支持, + url:path+'/commom/queryImgStatistics', + queryParams: function (params) { + return{ + limit : params.limit, // 每页显示数量 + offset : params.offset, // SQL语句起始索引 + page : (params.offset / params.limit) + 1, //当前页码, + inpatientNo: $("#inpatientNo").val(), + periods: $("#periods").val(), + } + }, + //选中单个复选框 + onCheck:function(row){ + var checks = $("#checks").val(); + $("#checks").val(checks+=row.logId + ","); + }, + //取消单个复选框 + onUncheck:function(row){ + var checks = $("#checks").val(); + checks = checks.replace(row.logId + ","); + $("#checks").val(checks); + }, + //全选 + onCheckAll:function(rows){ + $("#checks").val(""); + var checks = ''; + for(var i=0;i