|
|
|
@ -14,6 +14,7 @@
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<%@include file="../../jspf/comm.jspf" %>
|
|
|
|
|
<%@ include file="../../jspf/ztreeCommom.jsp" %>
|
|
|
|
|
<script src="${path}/static/js/loadAssortDetailCommom.js"></script>
|
|
|
|
|
<style>
|
|
|
|
|
.modal-header2 {
|
|
|
|
|
height: 30px;
|
|
|
|
@ -1002,8 +1003,6 @@
|
|
|
|
|
var idArr = [];
|
|
|
|
|
var flag = 0;
|
|
|
|
|
var value = [];
|
|
|
|
|
var zNodes = [];
|
|
|
|
|
var nodeList = [];
|
|
|
|
|
var opts = {
|
|
|
|
|
lines: 13, // 花瓣数目
|
|
|
|
|
length: 20, // 花瓣长度
|
|
|
|
@ -1023,40 +1022,6 @@
|
|
|
|
|
left: '450%'// spinner 相对父容器Left定位 单位 px
|
|
|
|
|
};
|
|
|
|
|
var spinner = new Spinner(opts);
|
|
|
|
|
var setting = {
|
|
|
|
|
view: {
|
|
|
|
|
addHoverDom: false,
|
|
|
|
|
removeHoverDom: false,
|
|
|
|
|
selectedMulti: false,
|
|
|
|
|
autoCancelSelected: false
|
|
|
|
|
},
|
|
|
|
|
check: {
|
|
|
|
|
enable: true
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
simpleData: {
|
|
|
|
|
enable: true,
|
|
|
|
|
idKey: "id",
|
|
|
|
|
pIdKey: "pId",
|
|
|
|
|
rootPId: "0"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
edit: {
|
|
|
|
|
enable: false
|
|
|
|
|
},
|
|
|
|
|
callback: {
|
|
|
|
|
beforeClick: function (treeId, treeNode) {
|
|
|
|
|
$("#assortId").html(treeNode.id);
|
|
|
|
|
//查询之后重新从第一页算起
|
|
|
|
|
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
|
|
|
|
|
//刷新
|
|
|
|
|
$('#table2').bootstrapTable('refresh');
|
|
|
|
|
//idArr = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$(function () {
|
|
|
|
|
var objUrl;
|
|
|
|
|
var img_html;
|
|
|
|
@ -2547,374 +2512,17 @@
|
|
|
|
|
|
|
|
|
|
var scollPostion2 = null;
|
|
|
|
|
//var eidtSelRow2=[];
|
|
|
|
|
function initTable2() {
|
|
|
|
|
//idArr = [];
|
|
|
|
|
$("#table2").bootstrapTable({ // 对应table标签的id
|
|
|
|
|
//method: 'POST',
|
|
|
|
|
url: "${path}/inHosp/getAssortdetail", // 获取表格数据的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: 10, // 页面数据条数
|
|
|
|
|
geNumber: 1, // 初始化加载第一页,默认第一页
|
|
|
|
|
sidePagination: 'server', // 设置为服务器端分页 客户端:client
|
|
|
|
|
search: false,
|
|
|
|
|
toolbar: '#toolbar2',//指定工具栏
|
|
|
|
|
showColumns: true,
|
|
|
|
|
searchOnEnterKey: true, //设置为 true时,按回车触发搜索方法,否则自动触发搜索方法
|
|
|
|
|
undefinedText: '---', //当数据为 undefined 时显示的字符
|
|
|
|
|
singleSelect: false,//设置True 将禁止多选
|
|
|
|
|
clickToSelect: true,//设置true 将在点击行时,自动选择rediobox 和 checkbox
|
|
|
|
|
height: 650, //定义表格的高度。
|
|
|
|
|
searchTimeOut: 500,// 默认500 设置搜索超时时间。
|
|
|
|
|
toolbarAlign: 'left',// 指定 toolbar 水平方向的位置。'left' 或 'right'
|
|
|
|
|
paginationDetailHAlign: 'left',//指定 分页详细信息 在水平方向的位置。'left' 或 'right'。
|
|
|
|
|
showHeader: true,//是否显示列头。
|
|
|
|
|
trimOnSearch: true,//设置为 true 将自动去掉搜索字符的前后空格。
|
|
|
|
|
queryParams: function (params) {
|
|
|
|
|
var currPageSize = this.pageSize;
|
|
|
|
|
/*if (currPageSize == 2) {
|
|
|
|
|
currPageSize = 10;
|
|
|
|
|
}*/
|
|
|
|
|
var limit = null;
|
|
|
|
|
var offset = params.offset;
|
|
|
|
|
var patientId = $("#idLab").html();
|
|
|
|
|
var assortId = $("#assortId").html();
|
|
|
|
|
var deptAdmissionTo = "";
|
|
|
|
|
if (assortId == 0) assortId = null;
|
|
|
|
|
//判断是否导出全部all
|
|
|
|
|
if ($("#sel_exportoption").val() == "all") {
|
|
|
|
|
offset = 0;
|
|
|
|
|
limit = this.totalRows;
|
|
|
|
|
this.pageSize = limit;
|
|
|
|
|
} else {
|
|
|
|
|
limit = currPageSize;
|
|
|
|
|
this.pageSize = currPageSize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var source =null;
|
|
|
|
|
if($("#sourceSearch").val()!=null){
|
|
|
|
|
source=$("#sourceSearch").val();
|
|
|
|
|
}
|
|
|
|
|
var temp = {
|
|
|
|
|
limit: limit, //页面大小
|
|
|
|
|
offset: offset, //页码
|
|
|
|
|
order: params.order, //排位命令(desc,asc)
|
|
|
|
|
patientId: patientId,
|
|
|
|
|
assortId: assortId,
|
|
|
|
|
source: source,
|
|
|
|
|
flag: flag
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var title=$("#titleSearch").val();
|
|
|
|
|
if(title!=null && title!=""){
|
|
|
|
|
temp.title=title;
|
|
|
|
|
}
|
|
|
|
|
return temp;
|
|
|
|
|
},
|
|
|
|
|
sortName: 'assortSort', // 要排序的字段
|
|
|
|
|
sortOrder: 'desc', // 排序规则
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '全选',
|
|
|
|
|
field: 'select', //复选框
|
|
|
|
|
checkbox: true,
|
|
|
|
|
width: 25,
|
|
|
|
|
align: 'center',
|
|
|
|
|
hidden: true,
|
|
|
|
|
}, {
|
|
|
|
|
title: '序',
|
|
|
|
|
field: 'id',
|
|
|
|
|
align: 'left',
|
|
|
|
|
visible: false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '分段类id',
|
|
|
|
|
field: 'assortId',
|
|
|
|
|
align: 'left',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
visible: false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
title: '标题',
|
|
|
|
|
field: 'title',
|
|
|
|
|
align: 'left',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '上传时间',
|
|
|
|
|
field: 'uploaddatetime',
|
|
|
|
|
align: 'left',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
// width: 150, // 定义列的宽度,单位为像素px
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '来源',
|
|
|
|
|
field: 'source',
|
|
|
|
|
align: 'center',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
// width: 50, // 定义列的宽度,单位为像素px
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '状态',
|
|
|
|
|
field: 'flag',
|
|
|
|
|
align: 'center',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
// width: 80, // 定义列的宽度,单位为像素px
|
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
|
//在院 未归档 归档中 初审 已归档 已认证
|
|
|
|
|
var a = '';
|
|
|
|
|
if (value == "1") {
|
|
|
|
|
a = '<span style="color:red;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>作废</span>';
|
|
|
|
|
} else if (value == "0") {
|
|
|
|
|
a = '<span style="color:green"><i class="fa fa-check-circle-o" aria-hidden="true"></i>使用</span>';
|
|
|
|
|
}
|
|
|
|
|
return a;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "操作",
|
|
|
|
|
align: 'left',
|
|
|
|
|
valign: 'middle',
|
|
|
|
|
//width: 120, // 定义列的宽度,单位为像素px
|
|
|
|
|
formatter: function (value, row, index) {
|
|
|
|
|
var url = window.location.href;
|
|
|
|
|
var index = url.substring(url.lastIndexOf('?') + 1).replace("num=", "");
|
|
|
|
|
|
|
|
|
|
var html = "";
|
|
|
|
|
|
|
|
|
|
if (index != null && index != "" && index.indexOf("edit") != -1) {
|
|
|
|
|
//return '<button class="btn btn-danger btn-sm" onclick="selectFun(\'' + row + '\')">查看 </button>';
|
|
|
|
|
html = html + '<button type="button" class="btn btn-info btn-sm editInfo" >编辑 </button>';// '<a href="javascript:;" class="delete">删除</a>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (index != null && index != "" && index.indexOf("cancel") != -1) {
|
|
|
|
|
if (row.flag == "0") {
|
|
|
|
|
html = html + '<button type="button" class="btn btn-danger btn-sm stateInfo" >作废 </button>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (index != null && index != "" && index.indexOf("delPdf") != -1) {
|
|
|
|
|
//console.log("===:" + row.pdfPath + "====" + row.source);
|
|
|
|
|
//删除
|
|
|
|
|
if (row.pdfPath != null && row.pdfPath != "") {
|
|
|
|
|
var pdfName = row.pdfPath.substring(row.pdfPath.lastIndexOf('\\') + 1, row.pdfPath.lastIndexOf('.'));
|
|
|
|
|
if (pdfName != row.assortId) {
|
|
|
|
|
if (row.source != null && row.source != "") {
|
|
|
|
|
if (row.source.indexOf("后台") != -1) {
|
|
|
|
|
html = html + '<button type="button" class="btn btn-warning btn-sm delPdfInfo" >删除 </button>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if (row.source != null && row.source != "") {
|
|
|
|
|
if (row.source.indexOf("后台") != -1) {
|
|
|
|
|
html = html + '<button type="button" class="btn btn-warning btn-sm delPdfInfo" >删除 </button>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (row.source != null && row.source != "") {
|
|
|
|
|
if (row.source.indexOf("后台") != -1) {
|
|
|
|
|
if (index != null && index != "" && index.indexOf("delPage") != -1) {
|
|
|
|
|
//return '<button class="btn btn-danger btn-sm" onclick="selectFun(\'' + row + '\')">查看 </button>';
|
|
|
|
|
html = html + '<button type="button" class="btn btn-primary btn-sm delPdfPage" >删除页 </button>';// '<a href="javascript:;" class="delete">删除</a>';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return html;
|
|
|
|
|
}, events: {
|
|
|
|
|
'click .editInfo': function (e, value, row, index) {
|
|
|
|
|
|
|
|
|
|
if (row.pdfPath != null && row.pdfPath != "") {
|
|
|
|
|
//console.log("===:" + row.pdfPath.indexOf(row.assortId + ".pdf") != -1);
|
|
|
|
|
if (row.pdfPath.indexOf(row.assortId + ".pdf") != -1) {
|
|
|
|
|
$("#upPdfDiv").hide();
|
|
|
|
|
$("#inpType").attr("disabled", "true");
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$("#upPdfDiv").show();
|
|
|
|
|
$("#inpType").removeAttr("disabled");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$("#upPdfDiv").show();
|
|
|
|
|
$("#inpType").removeAttr("disabled");
|
|
|
|
|
}
|
|
|
|
|
if (row.source.indexOf("后台") != -1) {
|
|
|
|
|
$("#addFile").show();
|
|
|
|
|
} else {
|
|
|
|
|
$("#addFile").hide();
|
|
|
|
|
$("#inpType").attr("disabled", "true");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//同步
|
|
|
|
|
$("#inpId").val(row.id);
|
|
|
|
|
$("#inpTitle").val(row.title);
|
|
|
|
|
$("#inpType").val(row.assortId);
|
|
|
|
|
$("#inpSource").val(row.source);
|
|
|
|
|
$("#inpFlag").val(row.flag);
|
|
|
|
|
// console.log(row);
|
|
|
|
|
$("#pageNumber").val(row.pageNumber);
|
|
|
|
|
//console.log("===="+ row.pdfPath);
|
|
|
|
|
$("#pdfPathVal").val(row.pdfPath);
|
|
|
|
|
if (row.pdfPath != "" && row.pdfPath != null) {
|
|
|
|
|
$("#pdfPathVal").show();
|
|
|
|
|
|
|
|
|
|
//..\..\..\static\img\pdfFiles\980bda8d-18e3-4deb-bb25-9d2b3784e9f3\HC3SL2HENH348M8X619PMCA7GC5R3125\HC3SL2HENH348M8X619PMCA7GC5R3125.pdf
|
|
|
|
|
var pdfUrl = "../../" + (row.pdfPath).replace(/\\/g, "/");
|
|
|
|
|
|
|
|
|
|
$("#fileUrlInp").val(pdfUrl);
|
|
|
|
|
// var pdfUrl = "${path}/static/pdfjs/web/viewer.html?file=../../../static/img/pdfFiles/typesPdf/" + result;//+ result;
|
|
|
|
|
|
|
|
|
|
$('#previewFile').css("display", "block");//显示预览按钮
|
|
|
|
|
$('#addFile').attr("src", row.pdfPath);
|
|
|
|
|
//$("#addFile").val("ssss");
|
|
|
|
|
$('.inp_file').val(null);
|
|
|
|
|
} else {
|
|
|
|
|
$("#pdfPathVal").hide();
|
|
|
|
|
$('#addFile').attr("src", "");
|
|
|
|
|
$('.inp_file').val(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('#assortModal').modal({
|
|
|
|
|
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
|
|
|
|
|
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
|
|
|
|
|
show: true//弹出对话框
|
|
|
|
|
});
|
|
|
|
|
}, 'click .stateInfo': function (e, value, row, index) {
|
|
|
|
|
$('#exampleModal').modal({
|
|
|
|
|
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
|
|
|
|
|
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
|
|
|
|
|
show: true//弹出对话框
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//同步
|
|
|
|
|
$("#idT").val(row.id);
|
|
|
|
|
|
|
|
|
|
}, 'click .delPdfInfo': function (e, value, row, index) {
|
|
|
|
|
$('#delPdfModal').modal({
|
|
|
|
|
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
|
|
|
|
|
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
|
|
|
|
|
show: true//弹出对话框
|
|
|
|
|
});
|
|
|
|
|
//同步
|
|
|
|
|
$("#idPdfT").val(row.id);
|
|
|
|
|
var pdfFileName = row.pdfPath;
|
|
|
|
|
if (pdfFileName != null && pdfFileName != "") {
|
|
|
|
|
pdfFileName = pdfFileName.substring(pdfFileName.lastIndexOf('\\') + 1, pdfFileName.lastIndexOf('.'));
|
|
|
|
|
$("#pdfFileName").val(pdfFileName);
|
|
|
|
|
}
|
|
|
|
|
}, 'click .delPdfPage': function (e, value, row, index) {
|
|
|
|
|
$("#mb").css("display", "block");
|
|
|
|
|
var target = document.getElementById('delPdfBody');
|
|
|
|
|
spinner.spin(target);//给id为foo的div 中绑上spinner
|
|
|
|
|
var pdfPath = row.pdfPath;//.replaceAll("\\","/");
|
|
|
|
|
//C:/Users/Administrator/Desktop/test/autoPdf/1617156631367.pdf
|
|
|
|
|
if (pdfPath != "") {
|
|
|
|
|
pdfPath = pdfPath.replace(/(\\)+/g, '/');
|
|
|
|
|
pdfPath = "${path}/static/pdfjs/web/viewer.html?file=" + encodeURIComponent("${path}/inHosp/pdfStreamHandeler?url=" + pdfPath);
|
|
|
|
|
$('#pdf_page').attr('src', pdfPath);
|
|
|
|
|
//病案号 45e9b098f9da49ffba1843bfc6930cb8
|
|
|
|
|
} else {
|
|
|
|
|
toastr.warning("勾选的PDF文件不存在或破损!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//删除pdf某一页
|
|
|
|
|
$('#delPdfPageModal').modal({
|
|
|
|
|
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
|
|
|
|
|
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
|
|
|
|
|
show: true//弹出对话框
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// //同步
|
|
|
|
|
$("#pdfId").val(row.id);
|
|
|
|
|
$("#pathPdf").val(row.pdfPath);
|
|
|
|
|
getDelPicPageFun();
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
$("#mb").css("display", "none");
|
|
|
|
|
spinner.spin();
|
|
|
|
|
}, 1500);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
cellStyle: function (value, row, index) {
|
|
|
|
|
return {classes: 'success'}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
onLoadSuccess: function (result) { //加载成功时执行
|
|
|
|
|
// console.info("加载成功");
|
|
|
|
|
// idArr = [];
|
|
|
|
|
$('#table2').bootstrapTable('scrollTo', scollPostion2);
|
|
|
|
|
if (idArr != []) {
|
|
|
|
|
//对刷新表格的数据选中之前选的id行
|
|
|
|
|
$('#table2').bootstrapTable("checkBy", {field: 'id', values: idArr});
|
|
|
|
|
//console.info(idArr);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onLoadError: function () { //加载失败时执行
|
|
|
|
|
// console.info("加载数据失败");
|
|
|
|
|
//toastr.warning("用户长时间未操作,请重新登录!");
|
|
|
|
|
}, onCheckAll: function (rows) { //点击全选框时触发的操作
|
|
|
|
|
if (rows != null && rows.length) {
|
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
|
|
|
|
if(idArr.indexOf(row.id)==-1) {
|
|
|
|
|
idArr.push(rows[i].id);
|
|
|
|
|
}
|
|
|
|
|
//eidtSelRow2.push(rows[i].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, onCheck: function (row) {//点击每一个单选框时触发的操作
|
|
|
|
|
scollPostion2 = $('#table2').bootstrapTable('getScrollPosition');
|
|
|
|
|
if(idArr.indexOf(row.id)==-1){
|
|
|
|
|
idArr.push(row.id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* if(eidtSelRow2.indexOf(row.id)==-1){
|
|
|
|
|
eidtSelRow2.push(row.id);
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
}, onUncheck: function (row) {//取消每一个单选框时对应的操作;
|
|
|
|
|
var index = idArr.indexOf(row.id);
|
|
|
|
|
if (index > -1) {
|
|
|
|
|
idArr.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
/* var index2 = eidtSelRow2.indexOf(row.id);
|
|
|
|
|
if (index2 > -1) {
|
|
|
|
|
eidtSelRow2.splice(index2, 1);
|
|
|
|
|
}*/
|
|
|
|
|
//console.log(eidtSelRow2);
|
|
|
|
|
}, onUncheckAll: function (row) {//取消每一个单选框时对应的操作;
|
|
|
|
|
idArr = [];
|
|
|
|
|
// eidtSelRow2= [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initTable2();
|
|
|
|
|
|
|
|
|
|
$("#flag").click(function () {
|
|
|
|
|
if ($("#flag").is(":checked") == true) {
|
|
|
|
|
//选中触发事件
|
|
|
|
|
flag = 1;
|
|
|
|
|
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
|
|
|
|
|
//$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
|
|
|
|
|
} else {
|
|
|
|
|
flag = 0;
|
|
|
|
|
//取消选中触发事件
|
|
|
|
|
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
|
|
|
|
|
//$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
|
|
|
|
|
}
|
|
|
|
|
initTree($("#idLab").html());
|
|
|
|
|
//idArr = [];
|
|
|
|
@ -3052,74 +2660,6 @@
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function initTree(patientId) {
|
|
|
|
|
var target = document.getElementById('foo');
|
|
|
|
|
spinner.spin(target);//给id为foo的div 中绑上spinner
|
|
|
|
|
zNodes = [];
|
|
|
|
|
//获取所有分段列表
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "${path}/inHosp/getAssort",
|
|
|
|
|
type: "POST",
|
|
|
|
|
data: {patientId: patientId, flag: flag},
|
|
|
|
|
async: true,
|
|
|
|
|
success: function (result) {
|
|
|
|
|
zNodes.push({id: 0, pId: 0, name: "分段列表", open: true});
|
|
|
|
|
if (result.length > 0) {
|
|
|
|
|
for (var i = 0; i < result.length; i++) {
|
|
|
|
|
//下拉类别
|
|
|
|
|
//$("#inpType").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
|
|
|
|
|
//树列表
|
|
|
|
|
var obj = {};
|
|
|
|
|
obj.id = result[i].assortId;
|
|
|
|
|
obj.pId = 0;
|
|
|
|
|
obj.name = "" + result[i].assortName + "(" + (result[i].pageNum) + ")";
|
|
|
|
|
obj.assortSort = result[i].assortSort;
|
|
|
|
|
obj.patientId = result[i].patientId;
|
|
|
|
|
obj.printFlag = result[i].printFlag;
|
|
|
|
|
zNodes.push(obj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//$.fn.zTree.init($("#ztree"), setting, zNodes);
|
|
|
|
|
var treeObj = $.fn.zTree.init($("#ztree"), setting, zNodes);
|
|
|
|
|
var node;
|
|
|
|
|
var currId = $("#assortId").html();
|
|
|
|
|
if (currId != "" && currId != null) {
|
|
|
|
|
//修改选中已选节点
|
|
|
|
|
node = treeObj.getNodeByParam("id", currId);
|
|
|
|
|
} else {
|
|
|
|
|
//添加选中父节点
|
|
|
|
|
var node = treeObj.getNodeByParam("id", 0);
|
|
|
|
|
}
|
|
|
|
|
treeObj.selectNode(node, true);//将指定ID的节点选中
|
|
|
|
|
$('#table2').bootstrapTable('refresh');
|
|
|
|
|
spinner.spin();
|
|
|
|
|
}, error: function () {
|
|
|
|
|
// toastr.error("加载失败!");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function searchNode() {
|
|
|
|
|
var zTree = $.fn.zTree.getZTreeObj("ztree");
|
|
|
|
|
var value = $("#key").val();
|
|
|
|
|
if (value == "") {
|
|
|
|
|
var nodes = zTree.getNodesByParam("isHidden", true);
|
|
|
|
|
zTree.showNodes(nodes);
|
|
|
|
|
} else {
|
|
|
|
|
nodeList = zTree.getNodesByParamFuzzy("name", value);
|
|
|
|
|
var nodes = zTree.getNodes();
|
|
|
|
|
zTree.hideNodes(nodes[0].children);
|
|
|
|
|
updateNodes(true);
|
|
|
|
|
}
|
|
|
|
|
zTree.expandAll(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function updateNodes(highlight) {
|
|
|
|
|
var zTree = $.fn.zTree.getZTreeObj("ztree");
|
|
|
|
|
for (var i = 0, l = nodeList.length; i < l; i++) {
|
|
|
|
|
zTree.showNode(nodeList[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).keydown(function (event) {
|
|
|
|
|
if (event.keyCode == 13) {
|
|
|
|
|