|
@@ -1,6 +1,6 @@
|
|
|
-if(!Promise){
|
|
|
+if (!Promise) {
|
|
|
var Promise = require("bluebird");
|
|
|
-// Configure
|
|
|
+ // Configure
|
|
|
Promise.config({
|
|
|
longStackTraces: true,
|
|
|
warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
|
|
@@ -21,7 +21,7 @@ const print = require("../js/jQuery.print")
|
|
|
let printing = require('./../images/printing.png');
|
|
|
let printing2 = require('./../images/printing2.png');
|
|
|
let hel = require('./../images/icon-hel.png');
|
|
|
-let showName, noticeName, clinicalPathwayName, showLis = [], selectedDrop = 0, selectedTab = 0, isclick,num
|
|
|
+let showName, noticeName, clinicalPathwayName, showLis = [], selectedDrop = 0, selectedTab = 0, isclick, num
|
|
|
|
|
|
//如果是子窗口,隐藏网页查看按钮
|
|
|
function myBrowser() {
|
|
@@ -49,7 +49,7 @@ function getInfomation() {
|
|
|
"hospitalId": getUrlArgObject('hospitalId'),
|
|
|
"hisName": getUrlArgObject('hisName'),
|
|
|
"hisDetailName": getUrlArgObject('hisDetailName'),
|
|
|
- "contentTypes":[1,2,3]
|
|
|
+ "contentTypes": [1, 2, 3]
|
|
|
};
|
|
|
//showName = param.hisName;
|
|
|
// if (param.type == 5 || param.type == 51) {
|
|
@@ -58,12 +58,12 @@ function getInfomation() {
|
|
|
// }
|
|
|
|
|
|
post(config.getStaticKnowledgeForHIS, param).then((res) => {
|
|
|
- if(res.data.code==='0'){
|
|
|
+ if (res.data.code === '0') {
|
|
|
const data = res.data.data
|
|
|
var str = '';
|
|
|
var anchors = '';
|
|
|
- let sName ='';
|
|
|
- if (!data||data.length===0) {
|
|
|
+ let sName = '';
|
|
|
+ if (!data || data.length === 0) {
|
|
|
showEmpty();
|
|
|
return;
|
|
|
}
|
|
@@ -77,7 +77,7 @@ function getInfomation() {
|
|
|
$(".showWhichSelect").html(sName).attr("title", sName)
|
|
|
showName = data[selectedDrop].name + "(" + data[selectedDrop].hisName + ")";
|
|
|
showInfoSelect()
|
|
|
- showInfo(data[selectedDrop],1)
|
|
|
+ showInfo(data[selectedDrop], 1)
|
|
|
renderTitleShow();
|
|
|
$('.content img').bind('contextmenu', function () {
|
|
|
return false
|
|
@@ -93,7 +93,7 @@ function showEmpty() {
|
|
|
$(".tabBox").html(str).css("border-bottom", "none");
|
|
|
$("body").css('background', '#fff');
|
|
|
}
|
|
|
-function showInfo(data,type) {
|
|
|
+function showInfo(data, type) {
|
|
|
var detailList = data.details
|
|
|
var scale = data.scale
|
|
|
var staticKnowList = detailList['静态知识']
|
|
@@ -109,20 +109,21 @@ function showInfo(data,type) {
|
|
|
// "padding": "0px 60px 50px 0px"
|
|
|
// });
|
|
|
renderTab(detailList, scale)
|
|
|
- staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
|
|
|
- noticeInfo&&renderContent(noticeInfo,'notice')
|
|
|
- clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
|
|
|
+ staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
|
|
|
+ noticeInfo && renderContent(noticeInfo, 'notice')
|
|
|
+ clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
|
|
|
scaleInfo && renderContentscale(scaleInfo, 'scale', name)
|
|
|
}
|
|
|
-function showInfoSelect(){
|
|
|
- $('.showWhich li').click(function(){
|
|
|
+function showInfoSelect() {
|
|
|
+ $('.showWhich li').click(function () {
|
|
|
let idx = $(this).attr('data-idx')
|
|
|
let name = $(this).html(), str = ''
|
|
|
selectedDrop = idx;
|
|
|
selectedTab = 0;
|
|
|
showName = showLis[idx].name + "(" + showLis[idx].hisName + ")";
|
|
|
num = $(".activeTab").attr('data-num')
|
|
|
- showInfo(showLis[idx],2)
|
|
|
+
|
|
|
+ showInfo(showLis[idx], 2)
|
|
|
$('.content .infos').scrollTop(0)
|
|
|
$(".showWhich ul").css("display", "none")
|
|
|
$(".showWhichSelect").html(name).attr("title", name)
|
|
@@ -141,6 +142,7 @@ function renderTitleShow() {
|
|
|
// $(".titleCont .title").html($(".tabList .tab:eq(" + selectedTab + ")").attr("data-title"));
|
|
|
$(".titleCont .title").html($(".showWhich .showWhichSelect").attr("title"));
|
|
|
|
|
|
+
|
|
|
}
|
|
|
function renderContent(list, contentWrapClassName) {
|
|
|
$(`.${contentWrapClassName} .infos`).html('');
|
|
@@ -526,6 +528,7 @@ function addLinkClickEvent(contentWrapClassName) {
|
|
|
|
|
|
function renderTab(detailList, scale) {
|
|
|
$(".tabList").html('')
|
|
|
+ $(".container").css("display", "none")
|
|
|
if (detailList['静态知识']) {
|
|
|
$(".tabList").append(`<span class="tab" data-num="1" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
|
|
|
}
|
|
@@ -542,32 +545,35 @@ function renderTab(detailList, scale) {
|
|
|
//$(".tabBox .title").html(noticeName);
|
|
|
}
|
|
|
let defaultModuleName
|
|
|
- if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || (getUrlArgObject('scale') == 'scale' && detailList['静态知识']) || num == 2) {
|
|
|
+ if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || (getUrlArgObject('scale') && getUrlArgObject('scale') != 'staticKnowledge' && detailList['静态知识']) || num == 2) {
|
|
|
+ console.log(1)
|
|
|
$(".tabList .tab").eq(1).addClass("activeTab")
|
|
|
defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
|
|
|
} else {
|
|
|
$(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
|
|
|
}
|
|
|
-
|
|
|
+ if ($('.tabList').children('.tab').length == 1) {
|
|
|
+ $(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
+ defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
|
|
|
+ }
|
|
|
$(`.${defaultModuleName}`).css("display", "block")
|
|
|
bindTabClick()
|
|
|
}
|
|
|
-function bindTabClick(){
|
|
|
- $(".tabList .tab").on("click", function(){
|
|
|
- if ($('.tabList').children('.tab').length == 1){
|
|
|
+function bindTabClick() {
|
|
|
+ $(".tabList .tab").on("click", function () {
|
|
|
+ if ($('.tabList').children('.tab').length == 1) {
|
|
|
return
|
|
|
}
|
|
|
const moduleName = $(this).attr("data-module")
|
|
|
const display = $(`.${moduleName}`).css("display")
|
|
|
- selectedTab=$('.tabList .tab').index(this);
|
|
|
- // $(".titleCont .title").html($(this).attr('data-title'));
|
|
|
-
|
|
|
- if(display == "none"){
|
|
|
+ selectedTab = $('.tabList .tab').index(this);
|
|
|
+ // $(".titleCont .title").html($(this).attr('data-title'));
|
|
|
+ if (display == "none") {
|
|
|
$(".activeTab").removeClass("activeTab")
|
|
|
$(this).addClass("activeTab")
|
|
|
- $(".container").css("display","none")
|
|
|
- $(`.${moduleName}`).css("display","block")
|
|
|
+ $(".container").css("display", "none")
|
|
|
+ $(`.${moduleName}`).css("display", "block")
|
|
|
$(`.${moduleName} .infos`).scrollTop(0)
|
|
|
}
|
|
|
})
|
|
@@ -577,11 +583,12 @@ function bindTabClick(){
|
|
|
const hisName = getUrlArgObject('hisName');
|
|
|
const hisDetailName = getUrlArgObject('hisDetailName');
|
|
|
const scale = $('.activeTab').attr('data-module')
|
|
|
+ console.log(scale)
|
|
|
openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab + "&scale=" + scale);
|
|
|
})
|
|
|
}
|
|
|
function adjustHeight() {
|
|
|
- const extHt = window.opener?60:0;
|
|
|
+ const extHt = window.opener ? 60 : 0;
|
|
|
var ht = window.innerHeight || document.documentElement.clientHeight;
|
|
|
$(".content").height(ht - 160 + "px");
|
|
|
$(".content .infos").height(ht - 170 + "px");
|
|
@@ -592,7 +599,7 @@ function adjustWidth() {
|
|
|
$(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
|
|
|
$(".content .infos").width(wt - 155 - 33 - 17 - 40 - 15 + 'px');
|
|
|
}
|
|
|
-$(window).on('resize', function(){
|
|
|
+$(window).on('resize', function () {
|
|
|
adjustHeight()
|
|
|
adjustWidth()
|
|
|
})
|