|
@@ -1,12 +1,13 @@
|
|
|
-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
|
|
|
})
|
|
|
}
|
|
|
require('../css/informationOut.less')
|
|
|
+require('../css/informationOut.css')
|
|
|
const {
|
|
|
post,
|
|
|
throttle,
|
|
@@ -17,12 +18,11 @@ const {
|
|
|
Toast
|
|
|
} = require('./promise.js');
|
|
|
const $ = require("jquery");
|
|
|
-require("./jquery-migrate");
|
|
|
-const jqprint = require("../js/jquery.PrintArea")
|
|
|
+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
|
|
|
+let showName, noticeName, clinicalPathwayName, showLis = [], selectedDrop = 0, selectedTab = 0, isclick, num, top = 0
|
|
|
|
|
|
//如果是子窗口,隐藏网页查看按钮
|
|
|
function myBrowser() {
|
|
@@ -50,7 +50,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) {
|
|
@@ -59,12 +59,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;
|
|
|
}
|
|
@@ -78,7 +78,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
|
|
@@ -94,7 +94,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,22 +109,22 @@ function showInfo(data,type) {
|
|
|
// "borderBottom": "4px solid #E9E9E9",
|
|
|
// "padding": "0px 60px 50px 0px"
|
|
|
// });
|
|
|
- if(type == 1){
|
|
|
- renderTab(detailList, scale)
|
|
|
- }
|
|
|
- staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
|
|
|
- noticeInfo&&renderContent(noticeInfo,'notice')
|
|
|
- clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
|
|
|
+ renderTab(detailList, scale)
|
|
|
+ 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 + ")";
|
|
|
- showInfo(showLis[idx],2)
|
|
|
+ num = $(".activeTab").attr('data-num')
|
|
|
+
|
|
|
+ showInfo(showLis[idx], 2)
|
|
|
$('.content .infos').scrollTop(0)
|
|
|
$(".showWhich ul").css("display", "none")
|
|
|
$(".showWhichSelect").html(name).attr("title", name)
|
|
@@ -142,6 +142,8 @@ function renderTitleShow() {
|
|
|
document.title = showName;
|
|
|
// $(".titleCont .title").html($(".tabList .tab:eq(" + selectedTab + ")").attr("data-title"));
|
|
|
$(".titleCont .title").html($(".showWhich .showWhichSelect").attr("title"));
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
function renderContent(list, contentWrapClassName) {
|
|
|
$(`.${contentWrapClassName} .infos`).html('');
|
|
@@ -186,10 +188,17 @@ function renderContent(list, contentWrapClassName) {
|
|
|
|
|
|
function renderContentscale(list, contentWrapClassName, name) {
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).html('');
|
|
|
+ $(`.${contentWrapClassName} .anchors ul`).html('');
|
|
|
var pushInfo = []
|
|
|
var textType = []
|
|
|
+ var constant = 0
|
|
|
+ $('.scaletitle').html(name);
|
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
|
var item = list[0].detailList[i];
|
|
|
+ textType.push(item.textType)
|
|
|
+ if (item.resultType == 1) {
|
|
|
+ constant += parseFloat(item.constant)
|
|
|
+ }
|
|
|
if (item.textType == 11) {
|
|
|
item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
|
|
@@ -217,15 +226,15 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
|
|
|
if (it.selectType == 21 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
|
|
|
+ str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '" resultType="' + item.resultType + '"/>'
|
|
|
} else if (it.selectType == 21 && item.resultType == 2) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 2) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '"/>'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + it.content + '' + its.result + '" proposal="' + its.pushInfo + '" resultType="' + item.resultType + '"/>'
|
|
|
}
|
|
|
- str += its.content
|
|
|
+ str += '<span class="inp">' + its.content + '</span>'
|
|
|
if (item.resultType == 1) {
|
|
|
str += '<span class="num">(' + its.score + ')</span>'
|
|
|
}
|
|
@@ -250,7 +259,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
var it = items.detailList[k];
|
|
|
it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
|
|
|
str = '<div class="contentList" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
|
|
|
- str += '<p class="item-title">' + it.content + '</p>'
|
|
|
+ str += it.content
|
|
|
str += '<div class="item-content" data-id="' + it.id + '">'
|
|
|
str += '</div></div></div>'
|
|
|
$(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
|
|
@@ -272,11 +281,9 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
str = '<div class="scalebot">'
|
|
|
str += '<button class="but">结果</button><p class="score"></p>'
|
|
|
str += '</div>'
|
|
|
- str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><span>结果:</span></div><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>`
|
|
|
+ str += `<div class="result"><div class="result_box"><div class="result_left"><img src="./../images/icon-hel.png" class="hel"/><p id="result_title" class="result_title"></p></div><textarea id="inputs"></textarea></div></div>`
|
|
|
str += `<div class="foot"><div class="foot_box"><div class="printing"><img src="./../images/printing.png" class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
- // str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
|
|
|
- // $(`.${contentWrapClassName} .infos`).after(str);
|
|
|
function addScrollEvent() {
|
|
|
var scrollTop = $(`.${contentWrapClassName} .infos .infos-box`).scrollTop()
|
|
|
var divHeight = 0;
|
|
@@ -290,34 +297,24 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
}
|
|
|
$(`.${contentWrapClassName} .infos .infos-box`).scroll(throttle(addScrollEvent, 200));
|
|
|
- var mb = myBrowser();
|
|
|
- if ("IE" == mb) {
|
|
|
- $('.result_left').css({
|
|
|
- 'position': 'relative', //高度自动
|
|
|
- })
|
|
|
- $('.result_title').css({
|
|
|
- 'margin-left': '0', //高度自动
|
|
|
- })
|
|
|
- }
|
|
|
addLinkClickEvent(contentWrapClassName);
|
|
|
adjustHeight();
|
|
|
adjustWidth()
|
|
|
getcheck()
|
|
|
- getResult(pushInfo, textType)
|
|
|
+ getResult(pushInfo, textType, constant)
|
|
|
copy(name)
|
|
|
getprinting()
|
|
|
|
|
|
}
|
|
|
-
|
|
|
function getprinting() {
|
|
|
$('.printing').click(function () {
|
|
|
$('.foot').hide()
|
|
|
- // $('.hel').hide()
|
|
|
+ $('.scalebot').hide()
|
|
|
$('#Print').css({
|
|
|
'height': 'auto', //高度自动
|
|
|
- }).jqprint();
|
|
|
+ }).print();
|
|
|
$('.foot').show()
|
|
|
- // $('.hel').show()
|
|
|
+ $('.scalebot').show()
|
|
|
$('#Print').css({
|
|
|
'height': '100%', //高度自动
|
|
|
});
|
|
@@ -332,7 +329,8 @@ function getcheck() {
|
|
|
if ($radio.data('waschecked') == true) {
|
|
|
$radio.prop('checked', false);
|
|
|
$("input:radio[name='" + domName + "']").data('waschecked', false);
|
|
|
- $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
$(".score").html('');
|
|
@@ -345,6 +343,8 @@ function getcheck() {
|
|
|
$("input:radio[name='" + domName + "']").data('waschecked', false);
|
|
|
$radio.data('waschecked', true);
|
|
|
$radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
$(".score").html('');
|
|
@@ -361,6 +361,8 @@ function getcheck() {
|
|
|
$radio.parents('.contentList').each(function (i) {
|
|
|
if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
|
|
|
$radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", false);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#666666");
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#333333");
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
$(".score").html('');
|
|
@@ -370,6 +372,8 @@ function getcheck() {
|
|
|
}
|
|
|
} else {
|
|
|
$radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.radio_type').attr("disabled", true);
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('label').css("color", "#C7C7C7");
|
|
|
+ $radio.parents('.contentList').siblings(".contentList[data-id='" + id + "']").find('.item-titles').css("color", "#C7C7C7");
|
|
|
if (isclick) {
|
|
|
getchecks()
|
|
|
$(".score").html('');
|
|
@@ -386,12 +390,11 @@ function copy(name) {
|
|
|
$(".copy").click(function () {
|
|
|
var texts = document.getElementById("result_title").innerText;
|
|
|
if (texts == '') {
|
|
|
- Toast('结果为空,无法复制', 500, 'warn')
|
|
|
+ Toast('温馨提示:结果为空,无法复制', 500, 'warn')
|
|
|
return
|
|
|
}
|
|
|
var inputs = document.getElementById("inputs");
|
|
|
- inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
|
|
|
- console.log(inputs.value)
|
|
|
+ inputs.value = name + '结果为:' + texts.substring(3); // 修改文本框的内容(赋值内容)
|
|
|
inputs.select(); // 选中文本
|
|
|
document.execCommand("copy"); // 执行浏览器复制命令
|
|
|
Toast('复制成功', 500, 'success')
|
|
@@ -412,7 +415,10 @@ function getchecks() {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-function getResult(pushInfo, textType) {
|
|
|
+$('#Print').on('scroll', function () {
|
|
|
+ top = $('#Print').scrollTop()
|
|
|
+})
|
|
|
+function getResult(pushInfo, textType, constant) {
|
|
|
$(".but").click(function () {
|
|
|
let arr = [];
|
|
|
let multarr = []
|
|
@@ -422,7 +428,15 @@ function getResult(pushInfo, textType) {
|
|
|
let key = false
|
|
|
let proposal = ''
|
|
|
let proposals = []
|
|
|
+ let scrollTop = []
|
|
|
+ let v
|
|
|
+ let numType = false
|
|
|
isclick = true
|
|
|
+ for (var i = 0; i < textType.length; i++) {
|
|
|
+ if (textType[i] == 13) {
|
|
|
+ numType = true
|
|
|
+ }
|
|
|
+ }
|
|
|
$(".contentList").each(function (i) {
|
|
|
if ($(this).find('input[type="radio"]:checked').val() == undefined && $(this).find('.radio_type').attr('disabled') == undefined) {
|
|
|
$(this).find(".item-title").addClass('chColor');
|
|
@@ -434,10 +448,21 @@ function getResult(pushInfo, textType) {
|
|
|
} else {
|
|
|
$(this).find(".item-titles").removeClass('chColor');
|
|
|
}
|
|
|
+ scrollTop.push($(this).eq(0).find(".chColor").offset())
|
|
|
});
|
|
|
+
|
|
|
+ for (var i = 0; i < scrollTop.length; i++) {
|
|
|
+ if (scrollTop[i] != undefined) {
|
|
|
+ v = scrollTop[i]
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (v) {
|
|
|
+ $(`.scale .infos`).scrollTop(v.top + top - 160)
|
|
|
+ }
|
|
|
if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
|
|
|
$('input[type="radio"]:checked').each(function () {
|
|
|
- if (!isNaN($(this).val())) {
|
|
|
+ if ($(this).attr("resultType") == 1) {
|
|
|
num += parseFloat($(this).val())
|
|
|
} else {
|
|
|
arr.push($(this).attr("data_obj"))
|
|
@@ -445,53 +470,62 @@ function getResult(pushInfo, textType) {
|
|
|
}
|
|
|
});
|
|
|
$('input[type="checkbox"]:checkbox:checked').each(function () {
|
|
|
- if (!isNaN($(this).val())) {
|
|
|
+ if ($(this).attr("resultType") == 1) {
|
|
|
num += parseFloat($(this).val())
|
|
|
} else {
|
|
|
arr.push($(this).attr("data_obj"))
|
|
|
proposals.push($(this).attr("proposal"))
|
|
|
}
|
|
|
});
|
|
|
+ num = num + constant
|
|
|
+ num = parseFloat(num).toFixed(2)
|
|
|
tmp = arr.join(";");
|
|
|
if (pushInfo.length > 0) {
|
|
|
for (var i = 0; i < pushInfo.length; i++) {
|
|
|
if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && !tmp) {
|
|
|
result = pushInfo[i].result + '(' + num + '分' + ')'
|
|
|
- proposal = pushInfo[i].pushInfo
|
|
|
+ if (proposals.join(";")) {
|
|
|
+ proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
|
|
|
+ } else {
|
|
|
+ proposal = pushInfo[i].pushInfo
|
|
|
+ }
|
|
|
break
|
|
|
} else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp) {
|
|
|
- result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
|
|
|
- proposal = pushInfo[i].pushInfo
|
|
|
+ result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
|
|
|
+ if (proposals.join(";")) {
|
|
|
+ proposal = pushInfo[i].pushInfo + ';' + proposals.join(";");
|
|
|
+ } else {
|
|
|
+ proposal = pushInfo[i].pushInfo
|
|
|
+ }
|
|
|
break
|
|
|
} else {
|
|
|
result = tmp
|
|
|
+ proposal = proposals.join(";");
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
result = tmp
|
|
|
proposal = proposals.join(";");
|
|
|
}
|
|
|
-
|
|
|
- if (result == undefined) {
|
|
|
- if ($.inArray(13, textType) > 0) {
|
|
|
- $(".score").html('总分:' + num + '分');
|
|
|
- }
|
|
|
- $(".score").css('display', 'block')
|
|
|
- $(".copy").css('display', 'none')
|
|
|
- $(".foot").css('display', 'block')
|
|
|
- } else {
|
|
|
+ if (result) {
|
|
|
$(".hel").attr({
|
|
|
"title": proposal
|
|
|
});
|
|
|
-
|
|
|
- $(".result_title").html(result);
|
|
|
- if ($.inArray(13, textType) > 0) {
|
|
|
+ $(".result_title").html('结果:' + result);
|
|
|
+ if (num >= 0 && numType) {
|
|
|
$(".score").html('总分:' + num + '分');
|
|
|
}
|
|
|
$(".result").css('display', 'block')
|
|
|
$(".score").css('display', 'block')
|
|
|
$(".copy").css('display', 'block')
|
|
|
$(".foot").css('display', 'block')
|
|
|
+ } else {
|
|
|
+ if (num >= 0 && numType) {
|
|
|
+ $(".score").html('总分:' + num + '分');
|
|
|
+ }
|
|
|
+ $(".score").css('display', 'block')
|
|
|
+ $(".copy").css('display', 'none')
|
|
|
+ $(".foot").css('display', 'block')
|
|
|
}
|
|
|
} else {
|
|
|
Toast('温馨提示:必填选项不能为空~', 500, 'warn')
|
|
@@ -520,48 +554,55 @@ function addLinkClickEvent(contentWrapClassName) {
|
|
|
}
|
|
|
|
|
|
function renderTab(detailList, scale) {
|
|
|
+ $(".tabList").html('')
|
|
|
+ $(".container").css("display", "none")
|
|
|
if (detailList['静态知识']) {
|
|
|
- $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
|
|
|
+ $(".tabList").append(`<span class="tab" data-num="1" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
|
|
|
}
|
|
|
if (detailList['临床路径']) {
|
|
|
- $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="` + clinicalPathwayName + `">临床路径</span>`)
|
|
|
+ $(".tabList").append(`<span class="tab" data-num="2" data-module="clinicalPathway" data-title="` + clinicalPathwayName + `">临床路径</span>`)
|
|
|
//$(".tabBox .title").html(clinicalPathwayName);
|
|
|
}
|
|
|
if (detailList['注意事项']) {
|
|
|
- $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
|
|
|
+ $(".tabList").append(`<span class="tab" data-num="2" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
|
|
|
//$(".tabBox .title").html(noticeName);
|
|
|
}
|
|
|
- if (scale || getUrlArgObject('gauge') == 'gauge' || getUrlArgObject('type') == 8) {
|
|
|
- $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
|
|
|
+ if (!!scale && getUrlArgObject('type') == 8) {
|
|
|
+ $(".tabList").append(`<span class="tab" data-num="2" data-module="scale" data-title="` + showName + `">评估内容</span>`)
|
|
|
//$(".tabBox .title").html(noticeName);
|
|
|
}
|
|
|
let defaultModuleName
|
|
|
- if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || getUrlArgObject('scale') == 'scale') {
|
|
|
+ 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 (detailList['静态知识'] == undefined) {
|
|
|
- $(".tabList .tab").eq(0).removeClass("activeTab")
|
|
|
+ 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(){
|
|
|
+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"){
|
|
|
+ const display = $(`.${moduleName}`).css("display")
|
|
|
+ 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)
|
|
|
- //}
|
|
|
+ }
|
|
|
})
|
|
|
$("#openWin").on("click", function () {
|
|
|
const type = getUrlArgObject('type');
|
|
@@ -569,6 +610,7 @@ 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);
|
|
|
})
|
|
|
}
|
|
@@ -581,10 +623,10 @@ function adjustHeight() {
|
|
|
}
|
|
|
function adjustWidth() {
|
|
|
var wt = window.innerWidth || document.documentElement.clientWidth;
|
|
|
- $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
|
|
|
- $(".content .infos").width(wt - 243 + 'px');
|
|
|
+ // $(".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()
|
|
|
})
|