|
@@ -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
|
|
@@ -186,8 +186,6 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
var textType = []
|
|
|
for (var i = 0; i < list[0].detailList.length; i++) {
|
|
|
var item = list[0].detailList[i];
|
|
|
- console.log(item.resultType)
|
|
|
- textType.push(item.textType)
|
|
|
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 +
|
|
@@ -225,7 +223,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
str += its.content
|
|
|
if (item.resultType == 1) {
|
|
|
- str += '<span class="num">' + its.score + '</span>'
|
|
|
+ str += '<span class="num">(' + its.score + ')</span>'
|
|
|
}
|
|
|
str += '</label>'
|
|
|
str += `${its.match == 1 ? `<img class="recommend" src="./../images/recommend.png" />` : ``}</div>`
|
|
@@ -234,6 +232,27 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (item.textType == 12) {
|
|
|
+ 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 +
|
|
|
+ '">'
|
|
|
+ str += item.content
|
|
|
+ str += '</h2></div>'
|
|
|
+ str = `<div class="infoWrapper">${str}</div>`
|
|
|
+ $(`.${contentWrapClassName} .infos .infos-box`).append(str);
|
|
|
+ for (var j = 0; j < item.subList.length; j++) {
|
|
|
+ var items = item.subList[j];
|
|
|
+ for (var k = 0; k < items.detailList.length; k++) {
|
|
|
+ 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 += '<div class="item-content" data-id="' + it.id + '">'
|
|
|
+ str += '</div></div></div>'
|
|
|
+ $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").append(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
if (item.textType == 13) {
|
|
|
for (var m = 0; m < item.subList[0].detailList[0].subList[0].detailList.length; m++) {
|
|
|
var itl = item.subList[0].detailList[0].subList[0].detailList[m]
|
|
@@ -513,7 +532,7 @@ function renderTab(detailList, scale) {
|
|
|
//$(".tabBox .title").html(noticeName);
|
|
|
}
|
|
|
let defaultModuleName
|
|
|
- if (getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) {
|
|
|
+ if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) || getUrlArgObject('scale') == 'scale') {
|
|
|
$(".tabList .tab").eq(1).addClass("activeTab")
|
|
|
defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
|
|
|
} else {
|
|
@@ -542,12 +561,15 @@ function bindTabClick() {
|
|
|
const hospitalId = getUrlArgObject('hospitalId');
|
|
|
const hisName = getUrlArgObject('hisName');
|
|
|
const hisDetailName = getUrlArgObject('hisDetailName');
|
|
|
- openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab & + "&gauge=gauge");
|
|
|
+ const scale = $('.activeTab').attr('data-module')
|
|
|
+ openNewWin("informationOut.html?hospitalId=" + encodeURIComponent(hospitalId) + "&hisName=" + encodeURIComponent(hisName) + "&hisDetailName=" + encodeURIComponent(hisDetailName || '') + "&type=" + encodeURIComponent(type) + "&d=" + selectedDrop + "&t=" + selectedTab + "&scale=" + scale);
|
|
|
})
|
|
|
}
|
|
|
function adjustHeight() {
|
|
|
var ht = window.innerHeight || document.documentElement.clientHeight;
|
|
|
- $(".content,.content .infos").height(ht - 162 + "px");
|
|
|
+ $(".content").height(ht - 160 + "px");
|
|
|
+ $(".content .infos").height(ht - 170 + "px");
|
|
|
+ $(".content .anchors").height(ht - 217 + "px");
|
|
|
}
|
|
|
function adjustWidth() {
|
|
|
var wt = window.innerWidth || document.documentElement.clientWidth;
|