更改pdf打印路径

master
jian.wang 2 years ago
parent 3e0bc12f4f
commit 706fde3725

@ -1,11 +1,13 @@
package com.emr.dao; package com.emr.dao;
import com.alibaba.fastjson.JSONObject;
import com.emr.vo.commomSearch.CommomTree; import com.emr.vo.commomSearch.CommomTree;
import com.emr.vo.commomSearch.CommomVo; import com.emr.vo.commomSearch.CommomVo;
import com.emr.vo.FontVo.FontCommom; import com.emr.vo.FontVo.FontCommom;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
public interface CommomMapper { public interface CommomMapper {
/** /**
@ -149,5 +151,4 @@ public interface CommomMapper {
* @return * @return
*/ */
CommomVo getCommomTableList(@Param("inpatientNo") String inpatientNo, @Param("disDate") String disDate); CommomVo getCommomTableList(@Param("inpatientNo") String inpatientNo, @Param("disDate") String disDate);
} }

@ -705,19 +705,23 @@ public class CommomService {
root = selectRootByNotWater(WATERTIFTOJPGPATH); root = selectRootByNotWater(WATERTIFTOJPGPATH);
outSrc = EMRRECORDJSP + File.separator + root + "/jiashi/tifToJpgLoad/" + format1 + ".jpg"; outSrc = EMRRECORDJSP + File.separator + root + "/jiashi/tifToJpgLoad/" + format1 + ".jpg";
} else { } else {
srcPath = srcPath.replaceAll("\\\\","/"); String driveLetterPath = srcPath.replaceAll("\\\\", "/");
if(srcPath.startsWith("/")){ if(driveLetterPath.startsWith("/")){
//截取字符串为磁盘路径 //截取字符串为磁盘路径
int thirdBackslashIndex = srcPath.indexOf('/', srcPath.indexOf('/', srcPath.indexOf('/') + 1) + 1); int thirdBackslashIndex = driveLetterPath.indexOf('/', driveLetterPath.indexOf('/', driveLetterPath.indexOf('/') + 1) + 1);
if (thirdBackslashIndex != -1) { if (thirdBackslashIndex != -1) {
srcPath = srcPath.substring(thirdBackslashIndex+1); driveLetterPath = driveLetterPath.substring(thirdBackslashIndex+1);
} }
//将原图片地址转换成映射地址 //将原图片地址转换成映射地址
//获取盘符并转换映射地址的头部地址 //获取盘符并转换映射地址的头部地址
root = selectRootByNotWater(srcPath); root = selectRootByNotWater(driveLetterPath);
if(root == null){
outSrc = srcPath;
}else{
//获取盘符后面的地址 //获取盘符后面的地址
picPath = srcPath.substring(srcPath.indexOf('/')); picPath = driveLetterPath.substring(driveLetterPath.indexOf('/'));
outSrc = EMRRECORDJSP + File.separator + root + File.separator + picPath; outSrc = EMRRECORDJSP + File.separator + root + picPath;
}
}else{ }else{
root = selectRootByNotWater(srcPath); root = selectRootByNotWater(srcPath);
//获取盘符后面的地址 //获取盘符后面的地址

@ -104,6 +104,7 @@
</head> </head>
<body> <body>
<input type="hidden" id="checks"> <input type="hidden" id="checks">
<input type="hidden" id="rows">
<div class="main"> <div class="main">
<div class="headDiv"> <div class="headDiv">
<div class="headSpanDiv"> <div class="headSpanDiv">

@ -54,7 +54,7 @@ $('#mytab').bootstrapTable({
fixedNumber: 4, fixedNumber: 4,
pageNumber: 1, //初始化加载第一页,默认第一页 pageNumber: 1, //初始化加载第一页,默认第一页
pageSize: 5, //每页的记录行数(* pageSize: 5, //每页的记录行数(*
pageList: [5,10,15,20,30,50],//可供选择的每页的行数(* pageList: [5,10,20,50,100,500,1000],//可供选择的每页的行数(*
height: $(window).height()-134, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度 height: $(window).height()-134, //行高如果没有设置height属性表格自动根据记录条数觉得表格高度
columns:[ columns:[
{ {
@ -207,9 +207,11 @@ $('#mytab').bootstrapTable({
nres.push({total:res.total,rows:res.list}); nres.push({total:res.total,rows:res.list});
return nres[0]; return nres[0];
}, },
onLoadSuccess:function(){ onLoadSuccess:function(res){
$(".page-list").show(); $(".page-list").show();
$(".fixed-table-body").css("overflow","auto"); $(".fixed-table-body").css("overflow","auto");
//赋值总数
$("#rows").val(res.total);
}, },
//监听分页点击事件 //监听分页点击事件
onPageChange: function(num, type) { onPageChange: function(num, type) {
@ -475,6 +477,10 @@ function moreAdd(flag){
//导出excel功能 //导出excel功能
function exportExcel(){ function exportExcel(){
var checks = $("#checks").val(); var checks = $("#checks").val();
var total = $("#rows").val();
if (total > 5000 && checks == '') {
toastr.warning("数据量大,暂提供5000条以内数据导出!");
} else {
if(checks != '') { if(checks != '') {
checks = checks.substring(0, checks.length - 1); checks = checks.substring(0, checks.length - 1);
var url = path+"/approve/exportExcelApproveList?checks="+checks; var url = path+"/approve/exportExcelApproveList?checks="+checks;
@ -491,7 +497,7 @@ function exportExcel(){
} }
}) })
} }
}
} }
$(function () { $(function () {

@ -327,9 +327,9 @@ function freshTable(){
function exportExcel() { function exportExcel() {
getChecked(); getChecked();
var checks = $("#checks").val(); var checks = $("#checks").val();
// if ($("#rows").val() > 5000 && checks == '') { if ($("#rows").val() > 5000 && checks == '') {
// toastr.warning("数据量大,暂提供5000条以内数据导出!"); toastr.warning("数据量大,暂提供5000条以内数据导出!");
// } else { } else {
getSql(); getSql();
var tableThNames = $("#tableThNames").val(); var tableThNames = $("#tableThNames").val();
var fieldCns = $("#fieldCns").val(); var fieldCns = $("#fieldCns").val();
@ -365,6 +365,7 @@ function exportExcel() {
} }
}) })
} }
}
} }
function btn(){ function btn(){
var url = path + "/printInfoList/pageUI174"; var url = path + "/printInfoList/pageUI174";

@ -4,6 +4,7 @@
*/ */
(function (window, document) { (function (window, document) {
var Print = function (dom, options) { var Print = function (dom, options) {
dom.innerHTML = '';
if (!(this instanceof Print)) return new Print(dom, options); if (!(this instanceof Print)) return new Print(dom, options);
this.options = this.extend({ this.options = this.extend({
@ -25,7 +26,6 @@
Print.prototype = { Print.prototype = {
init: function () { init: function () {
var content = this.getStyle() + this.getHtml(); var content = this.getStyle() + this.getHtml();
console.log("------------------------------32131232132132131------------------------------", this.getHtml())
this.writeIframe(content); this.writeIframe(content);
}, },
extend: function (obj, obj2) { extend: function (obj, obj2) {

Loading…
Cancel
Save