1.病案详情页面 住院次数选择加载bug修复

2.自定义查询bug修复
master
wangxh 6 years ago
parent 23cff7fd4f
commit 6c9cee486d

@ -89,7 +89,6 @@
</c:forEach> </c:forEach>
</select> </select>
<button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">确定</button> <button type="button" class="btn btn-sm btn-default" style="float:left;margin-left:2%;" onclick="sure()">确定</button>
<%--<button type="button" class="btn btn-warning" style="float:right;margin-right: 1%" onclick="">笔记</button>--%>
</div> </div>
</shiro:hasPermission> </shiro:hasPermission>
<iframe width="100%" height="100%" src="" id="iframe1" frameborder="0" scrolling="yes"></iframe> <iframe width="100%" height="100%" src="" id="iframe1" frameborder="0" scrolling="yes"></iframe>

@ -689,24 +689,28 @@ function insertContent(content, id) {
clearContent(id); clearContent(id);
setLocation(id); setLocation(id);
var json = JSON.parse(content); var json = JSON.parse(content);
debugger
for (key in json) { for (key in json) {
console.log(key)
console.log(json[key])
var tr = document.createElement("tr"); var tr = document.createElement("tr");
var td2 = document.createElement("td"); var td2 = document.createElement("td");
var td4 = document.createElement("td"); var td4 = document.createElement("td");
tr.setAttribute("bgcolor", "#FFFAFA"); tr.setAttribute("bgcolor", "#FFFAFA");
tr.setAttribute("border", "0"); tr.setAttribute("border", "0");
if (id == 'inpatient_no' || id == 'diag_code' || id == 'operate_code') {
td2.innerHTML = key; td2.innerHTML = key;
td4.innerHTML = json[key]; td4.innerHTML = json[key];
} else {
td2.innerHTML = json[key];
td4.innerHTML = key;
}
tr.appendChild(td2); tr.appendChild(td2);
tr.appendChild(td4); tr.appendChild(td4);
document.getElementById(id + "Content").appendChild(tr); document.getElementById(id + "Content").appendChild(tr);
tr.onmouseover = function () { tr.onmouseover = function () {
this.className = 'mouseOver'; this.className = 'mouseOver';
if (id == 'inpatient_no' || id == 'diag_code' || id == 'operate_code') {
document.getElementById(id).value = $(this).children("td").eq(0).html(); document.getElementById(id).value = $(this).children("td").eq(0).html();
} else {
document.getElementById(id).value = $(this).children("td").eq(1).html();
}
}; };
tr.onmouseout = function () { tr.onmouseout = function () {
this.className = 'mouseOut'; this.className = 'mouseOut';

@ -107,13 +107,13 @@ $("#admissTimes").change(function () {
success:function(d){ success:function(d){
if(d != null){ if(d != null){
$("#patientId").val(d.patientId); $("#patientId").val(d.patientId);
$("#iframe").prop("src",path+"/commom/showRecordIframe?patientId="+d.patientId); $("#iframe").prop("src",path+"/commom/showRecordIframeBlood?patientId="+d.patientId);
$("#disDate").val(d.disDate); $("#disDate").val(d.disDate);
$("#disDeptName").val(d.disDept); $("#disDeptName").val(d.disDept);
$("#diagName").val(d.mainDiagName); $("#diagName").val(d.mainDiagName);
$("#otherDiagName").val(d.otherDiagName); $("#otherDiagName").val(d.otherDiagName);
//重新加载其他诊断名称鼠标滑过显示全部文本 //重新加载其他诊断名称鼠标滑过显示全部文本
loadQtip('.otherDiagName'); /*loadQtip('.otherDiagName');*/
//变更收藏信息 //变更收藏信息
$("#collectId").val(""); $("#collectId").val("");
$("#collectTime").val(currentDate); $("#collectTime").val(currentDate);

@ -142,6 +142,7 @@ function getSql() {
var age_month = ''; var age_month = '';
var age_day = ''; var age_day = '';
$("#block").children().find('div').each(function () { $("#block").children().find('div').each(function () {
debugger
var val = $(this).children().val(); var val = $(this).children().val();
var className = $(this).children().attr('class'); var className = $(this).children().attr('class');
if (className == 'select2') { if (className == 'select2') {
@ -195,6 +196,11 @@ function getSql() {
age_day = val; age_day = val;
whereNames += "("; whereNames += "(";
} }
if (val == 'and') {
age = '';
age_month = '';
age_day = '';
}
whereNames += val + ' '; whereNames += val + ' ';
} }
}) })
@ -231,7 +237,9 @@ function getSql() {
var orderBys = " order by " + commomtable + ".inpatient_no," + commomtable + ".admiss_times"; var orderBys = " order by " + commomtable + ".inpatient_no," + commomtable + ".admiss_times";
var sql = selectNames + fromTableNames + whereNames; var sql = selectNames + fromTableNames + whereNames;
$("#orderBys").val(orderBys); $("#orderBys").val(orderBys);
debugger
$("#sql").val(sql); $("#sql").val(sql);
console.log("sql = " + $("#sql").val());
//console.log(sql); //console.log(sql);
$("#tableThNames").val(tableThNames); $("#tableThNames").val(tableThNames);
if (tableThNames != '') { if (tableThNames != '') {

Loading…
Cancel
Save