|
@@ -591,12 +591,12 @@ $(function () {
|
|
|
return false;
|
|
|
}
|
|
|
//获取病例明细
|
|
|
- function getRecordDetail(type) {
|
|
|
+ function getRecordDetail() {
|
|
|
post(api.getRecordDetail, { 'behospitalCode': global_id }).then(function (res) {
|
|
|
if (res.data.code === '0') {
|
|
|
- console.log("x");
|
|
|
+
|
|
|
const data = res.data.data;
|
|
|
- const { beHospital, result, msg, checkStatus, drgs, mrStatus, checkShow, checkOperationWithAppeal } = data;
|
|
|
+ const { beHospital, result, msg, checkStatus, drgs, mrStatus, checkShow, checkOperationWithAppeal } = data;
|
|
|
global_check = checkStatus
|
|
|
global_check_home = mrStatus
|
|
|
global_check_show = checkShow;//0隐藏操作按钮1显示
|
|
@@ -610,22 +610,23 @@ $(function () {
|
|
|
}
|
|
|
}
|
|
|
check_Operation_WithAppeal = checkOperationWithAppeal;
|
|
|
- const info = Object.assign(beHospital, result);
|
|
|
+ const info = Object.assign(beHospital, result);
|
|
|
initMenu(JSON.parse(result.menuData));
|
|
|
// $(".sub-menu>ul>li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
|
|
|
$(".subMenu >li:first-child.page,.menu-mini>ul>li:first-child.page").addClass("active");
|
|
|
global_activeTab = $(".sub-menu .page.active").attr("code");
|
|
|
+ console.log("6660",global_activeTab);
|
|
|
+
|
|
|
$(".operation").show()
|
|
|
initPatientInfo(info);
|
|
|
|
|
|
- initContent(result.pageData, 2);
|
|
|
+ initContent(result.pageData);
|
|
|
initList(msg);
|
|
|
- initScoreItem(msg);
|
|
|
+ initScoreItem(msg);
|
|
|
global_flawData = msg;
|
|
|
global_flawDataPay = drgs;
|
|
|
setBoxHeight();
|
|
|
changePay()
|
|
|
-
|
|
|
} else {
|
|
|
console.log("xxxx");
|
|
|
$.alerModal({ "message": '接口出错', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
|
|
@@ -634,7 +635,6 @@ $(function () {
|
|
|
console.log("xry");
|
|
|
$.alerModal({ "message": '接口出错', type: "tip", time: '1000', isFather: true, win: 'default', fatherWrapper: $("#mainBox", parent.document) });
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
function getRecordDetailUpdate() {
|
|
|
post(api.getRecordDetail, { 'behospitalCode': global_id }).then(function (res) {
|
|
@@ -737,47 +737,83 @@ $(function () {
|
|
|
})
|
|
|
}
|
|
|
//显示病例模块明细
|
|
|
- function initContent(data, type) {
|
|
|
+ // function initContent(data, type) {
|
|
|
+ // const obj = JSON.parse(data);
|
|
|
+ // let info = [];
|
|
|
+ // let hml = '', moduleId = '';
|
|
|
+ // if (type == 2) {
|
|
|
+ // formatSpecPage(obj["谈话告知书"], "谈话告知书");
|
|
|
+ // formatSpecPage(obj["知情同意书"], "知情同意书");
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // // formatSpecPage(obj["医嘱信息"],"医嘱信息");
|
|
|
+ // $(".content-box").show();
|
|
|
+ // for (let k in obj) {
|
|
|
+ // if (k === "谈话告知书" || k === "知情同意书") {
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+ // for (let i in obj[k]) {
|
|
|
+ // info = formatInfoData(k, obj[k][i]);
|
|
|
+ // moduleId = info.mode_id;
|
|
|
+ // if (global_modules[moduleId]) {
|
|
|
+ // hml = initModuleData(moduleId, obj[k]);
|
|
|
+ // $.tmpl(hml, info).appendTo("#contentInfo");
|
|
|
+ // } else {
|
|
|
+ // const icon = require("../images/empty1.png");
|
|
|
+ // const sid = moduleId ? "(" + moduleId + ")" : "";
|
|
|
+ // const code = k.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
|
|
|
+ // const emptyStr = `<div class="empty">
|
|
|
+ // <img src="${icon}" alt="空"/>
|
|
|
+ // <p>暂无信息~</p>
|
|
|
+ // </div>`;
|
|
|
+ // if (!$(".content-item[code=" + code + "] .empty").length) { //显示一条空提示即可
|
|
|
+ // hml = '<div class="content-item" code="' + code + '">' +
|
|
|
+ // '<h2 class="title">' + k + sid + '</h2>' + emptyStr + '</div>';
|
|
|
+ // $.tmpl(hml, {}).appendTo("#contentInfo");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // $(".content-item[code=" + global_activeTab + "]").show();
|
|
|
+ // //console.log(obj)
|
|
|
+ // }
|
|
|
+ function initContent(data){
|
|
|
const obj = JSON.parse(data);
|
|
|
- let info = [];
|
|
|
- let hml = '', moduleId = '';
|
|
|
- if (type == 2) {
|
|
|
- formatSpecPage(obj["谈话告知书"], "谈话告知书");
|
|
|
- formatSpecPage(obj["知情同意书"], "知情同意书");
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // formatSpecPage(obj["医嘱信息"],"医嘱信息");
|
|
|
- $(".content-box").show();
|
|
|
- for (let k in obj) {
|
|
|
- if (k === "谈话告知书" || k === "知情同意书") {
|
|
|
- continue;
|
|
|
+ let info=[];
|
|
|
+ let hml='',moduleId='';
|
|
|
+ formatSpecPage(obj["谈话告知书"],"谈话告知书");
|
|
|
+ formatSpecPage(obj["知情同意书"],"知情同意书");
|
|
|
+ // formatSpecPage(obj["医嘱信息"],"医嘱信息");
|
|
|
+ $(".content-box").show();
|
|
|
+ for(let k in obj){if(k==="谈话告知书"||k==="知情同意书"){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ for(let i in obj[k]){
|
|
|
+ info=formatInfoData(k,obj[k][i]);
|
|
|
+ moduleId=info.mode_id;
|
|
|
+ if(global_modules[moduleId]){
|
|
|
+ hml=initModuleData(moduleId,obj[k]);
|
|
|
+ $.tmpl(hml,info).appendTo("#contentInfo");
|
|
|
+ }else{
|
|
|
+ const icon=require("../images/empty1.png");
|
|
|
+ const sid=moduleId?"("+moduleId+")":"";
|
|
|
+ const code=k.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g,'');
|
|
|
+ const emptyStr=`<div class="empty">
|
|
|
+ < img src="${icon}" alt="空"/>
|
|
|
+ <p>暂无信息~</p >
|
|
|
+ </div>`;
|
|
|
+ if(!$(".content-item[code="+code+"] .empty").length){ //显示一条空提示即可
|
|
|
+ hml='<div class="content-item" code="'+code+'">' +
|
|
|
+ '<h2 class="title">'+k+sid+'</h2>'+emptyStr+'</div>';
|
|
|
+ $.tmpl(hml,{}).appendTo("#contentInfo");
|
|
|
+ }
|
|
|
}
|
|
|
- for (let i in obj[k]) {
|
|
|
- info = formatInfoData(k, obj[k][i]);
|
|
|
- moduleId = info.mode_id;
|
|
|
- if (global_modules[moduleId]) {
|
|
|
- hml = initModuleData(moduleId, obj[k]);
|
|
|
- $.tmpl(hml, info).appendTo("#contentInfo");
|
|
|
- } else {
|
|
|
- const icon = require("../images/empty1.png");
|
|
|
- const sid = moduleId ? "(" + moduleId + ")" : "";
|
|
|
- const code = k.replace(/[^\u4e00-\u9fa5|a-zA-Z0-9]+/g, '');
|
|
|
- const emptyStr = `<div class="empty">
|
|
|
- <img src="${icon}" alt="空"/>
|
|
|
- <p>暂无信息~</p>
|
|
|
- </div>`;
|
|
|
- if (!$(".content-item[code=" + code + "] .empty").length) { //显示一条空提示即可
|
|
|
- hml = '<div class="content-item" code="' + code + '">' +
|
|
|
- '<h2 class="title">' + k + sid + '</h2>' + emptyStr + '</div>';
|
|
|
- $.tmpl(hml, {}).appendTo("#contentInfo");
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
- $(".content-item[code=" + global_activeTab + "]").show();
|
|
|
- //console.log(obj)
|
|
|
- }
|
|
|
+ }
|
|
|
+ $(".content-item[code="+global_activeTab+"]").show();
|
|
|
+ //console.log(obj)
|
|
|
+ }
|
|
|
|
|
|
function formatInfoData(k, data) {
|
|
|
let obj = {}, name = "";
|
|
@@ -903,7 +939,7 @@ $(function () {
|
|
|
})
|
|
|
$(".edit-flaw").css({ "display": hasAu ? "inline" : "none" });
|
|
|
$(".del-flaw").css({ "display": hasAu2 ? "inline" : "none" });
|
|
|
- $(".add-flaw").css({ "display": hasAu4 && global_check_show ? "inline" : "none" });
|
|
|
+ $(".add-flaw").css({ "display": hasAu3 && global_check_show ? "inline" : "none" });
|
|
|
$(".recover-flaw").css({ "display": hasAu2 ? "inline" : "none" });
|
|
|
$(".flaw-item .title a[href]").unbind("click").click(function () {
|
|
|
const id = $(this).attr("href");
|
|
@@ -918,16 +954,20 @@ $(function () {
|
|
|
}
|
|
|
|
|
|
//显示缺陷列表
|
|
|
- function showFlawList() {
|
|
|
+ function showFlawList() {
|
|
|
+ console.log("Active Tab:", global_activeTab);
|
|
|
+
|
|
|
const hml = $(".flaw-item[code=" + global_activeTab + "]");
|
|
|
+ console.log("Flaw Items:", hml); // 在此处输出找到的缺陷项
|
|
|
+
|
|
|
if (hml.length) {
|
|
|
- hml.show();
|
|
|
- $("#flaws .empty").hide();
|
|
|
+ hml.show();
|
|
|
+ $("#flaws .empty").hide();
|
|
|
} else {
|
|
|
- $("#flaws .empty").length ? $("#flaws .empty").show() : $("#emptyTmpl").tmpl().appendTo("#flaws .flaw-box");
|
|
|
+ $("#flaws .empty").length ? $("#flaws .empty").show() : $("#emptyTmpl").tmpl().appendTo("#flaws .flaw-box");
|
|
|
}
|
|
|
showAppealDetailEvent();
|
|
|
- }
|
|
|
+}
|
|
|
|
|
|
//删除评分项
|
|
|
function delScore(id, info, isRecover) {
|
|
@@ -1361,9 +1401,6 @@ $(function () {
|
|
|
let cleanedString = val.replace(/<strong>.*?<\/strong>/gi, '');
|
|
|
cleanedString = cleanedString.replace(/ /g, '')
|
|
|
|
|
|
- console.log("val");
|
|
|
- console.log(name);
|
|
|
-
|
|
|
if (name === "手术记录表格-1") {
|
|
|
const value = val.replace("【", "").replace("】", "");
|
|
|
const diag = obj[0][value] ? JSON.parse(obj[0][value]) : "";
|