|
@@ -19,7 +19,7 @@ const {
|
|
|
} = require('./promise.js');
|
|
|
const $ = require("jquery");
|
|
|
require("./jquery-migrate");
|
|
|
-require("./PIE");
|
|
|
+
|
|
|
const jqprint = require("../js/jquery.PrintArea")
|
|
|
let printing = require('./../images/printing.png');
|
|
|
let printing2 = require('./../images/printing2.png');
|
|
@@ -27,49 +27,51 @@ let recommend = require('./../images/recommend.png');
|
|
|
let hel = require('./../images/icon-hel.png');
|
|
|
|
|
|
let showName, noticeName, clinicalPathwayName, isclick
|
|
|
-function getInfomation() {
|
|
|
- var param = {
|
|
|
- "type": getUrlArgObject('type'),
|
|
|
- "name": getUrlArgObject('name'),
|
|
|
- "position": getUrlArgObject('position'),
|
|
|
- "contentTypes": [1, 2, 3],
|
|
|
- "mrId": getUrlArgObject('mrId')
|
|
|
- };
|
|
|
- showName = param.name
|
|
|
- $(".tabBox .title").html(showName);
|
|
|
-
|
|
|
- post(config.information, param).then((res) => {
|
|
|
- const data = res.data.data
|
|
|
- // const data = dataaaa.data
|
|
|
- document.title = showName
|
|
|
- var str = '';
|
|
|
- var anchors = '';
|
|
|
-
|
|
|
- if (!data) {
|
|
|
- $(".title").html("暂时没有数据");
|
|
|
- $(".anchors").css("display", "none");
|
|
|
- return;
|
|
|
- }
|
|
|
- var detailList = data.details
|
|
|
- var scale = data.scale
|
|
|
- var staticKnowList = detailList['静态知识']
|
|
|
- var noticeInfo = detailList['注意事项']
|
|
|
- var clinicalPathwayInfo = detailList['临床路径']
|
|
|
- var scaleInfo = data.scale ? data.scale.scaleDetails : ''
|
|
|
- var name = data.name
|
|
|
- noticeName = data.noticeName || "注意事项"
|
|
|
- clinicalPathwayName = data.clinicalPathwayName || "临床路径"
|
|
|
- renderTab(detailList, scale)
|
|
|
- staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
|
|
|
- noticeInfo && renderContent(noticeInfo, 'notice')
|
|
|
- clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
|
|
|
- scaleInfo && renderContentscale(scaleInfo, 'scale', name)
|
|
|
- $('.content img').bind('contextmenu', function () {
|
|
|
- return false
|
|
|
- })
|
|
|
|
|
|
- })
|
|
|
-}
|
|
|
+
|
|
|
+
|
|
|
+ function getInfomation() {
|
|
|
+ var param = {
|
|
|
+ "type": getUrlArgObject('type'),
|
|
|
+ "name": getUrlArgObject('name'),
|
|
|
+ "position": getUrlArgObject('position'),
|
|
|
+ "contentTypes": [1, 2, 3],
|
|
|
+ "mrId": getUrlArgObject('mrId')
|
|
|
+ };
|
|
|
+ showName = param.name
|
|
|
+ $(".tabBox .title").html(showName);
|
|
|
+
|
|
|
+ post(config.information, param).then((res) => {
|
|
|
+ const data = res.data.data
|
|
|
+ // const data = dataaaa.data
|
|
|
+ document.title = showName
|
|
|
+ var str = '';
|
|
|
+ var anchors = '';
|
|
|
+ if (!data) {
|
|
|
+ $(".title").html("暂时没有数据");
|
|
|
+ $(".anchors").css("display", "none");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var detailList = data.details
|
|
|
+ var scale = data.scale
|
|
|
+ var staticKnowList = detailList['静态知识']
|
|
|
+ var noticeInfo = detailList['注意事项']
|
|
|
+ var clinicalPathwayInfo = detailList['临床路径']
|
|
|
+ var scaleInfo = data.scale ? data.scale.scaleDetails : ''
|
|
|
+ var name = data.name
|
|
|
+ noticeName = data.noticeName || "注意事项"
|
|
|
+ clinicalPathwayName = data.clinicalPathwayName || "临床路径"
|
|
|
+ renderTab(detailList, scale)
|
|
|
+ staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
|
|
|
+ noticeInfo && renderContent(noticeInfo, 'notice')
|
|
|
+ clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
|
|
|
+ scaleInfo && renderContentscale(scaleInfo, 'scale', name)
|
|
|
+ $('.content img').bind('contextmenu', function () {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
getInfomation();
|
|
|
|
|
|
|
|
@@ -151,9 +153,9 @@ 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="' + its.score + '"/>'
|
|
|
+ str += '<label><input class="radio_type" type="radio" name="scale' + its.parentId + '" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 1) {
|
|
|
- str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.score + '"/>'
|
|
|
+ str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + '"/>'
|
|
|
} 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 + '"/>'
|
|
|
} else if (it.selectType == 22 && item.resultType == 2) {
|
|
@@ -161,7 +163,7 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
str += its.content
|
|
|
if (item.resultType == 1) {
|
|
|
- str += '<span class="num">' + '(' + its.score + ')' + '</span>'
|
|
|
+ str += '<span class="num">' + '(' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + ')' + '</span>'
|
|
|
}
|
|
|
str += '</label>'
|
|
|
str += `${its.match == 1 ? `<img class="recommend" src=${recommend} />` : ``}</div>`
|
|
@@ -184,8 +186,8 @@ function renderContentscale(list, contentWrapClassName, name) {
|
|
|
}
|
|
|
}
|
|
|
str = '<div class="scalebot">'
|
|
|
- str += '<p class="score"></p>'
|
|
|
- str += '<button class="but">结果</button></div>'
|
|
|
+ str += '<button class="but">结果</button><p class="score"></p>'
|
|
|
+ str += '</div>'
|
|
|
str += `<div class="result"><div class="result_box"><img src=${hel} class="hel"/><span>结果:</span><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>`
|
|
|
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 .infos-box`).append(str);
|
|
@@ -291,7 +293,7 @@ function copy(name) {
|
|
|
return
|
|
|
}
|
|
|
var inputs = document.getElementById("inputs");
|
|
|
- inputs.value = name + '结果为:' + texts; // 修改文本框的内容(赋值内容)
|
|
|
+ inputs.value = name + '结果为;' + texts; // 修改文本框的内容(赋值内容)
|
|
|
console.log(inputs.value)
|
|
|
inputs.select(); // 选中文本
|
|
|
document.execCommand("copy"); // 执行浏览器复制命令
|
|
@@ -356,8 +358,8 @@ function getResult(pushInfo, textType) {
|
|
|
multarr.push($(this).attr("data_obj"))
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
- if (multarr.join(";")){
|
|
|
+
|
|
|
+ if (multarr.join(";")) {
|
|
|
arr.push(multname + multarr.join(";"))
|
|
|
}
|
|
|
tmp = arr.join(";");
|
|
@@ -367,7 +369,7 @@ function getResult(pushInfo, textType) {
|
|
|
result = pushInfo[i].result + '(' + num + '分' + ')'
|
|
|
proposal = pushInfo[i].pushInfo
|
|
|
break
|
|
|
- } else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp){
|
|
|
+ } else if (pushInfo[i].content.max >= num && num >= pushInfo[i].content.min && tmp) {
|
|
|
result = pushInfo[i].result + '(' + num + '分' + ')' + ';' + tmp
|
|
|
proposal = pushInfo[i].pushInfo
|
|
|
break
|
|
@@ -378,7 +380,7 @@ function getResult(pushInfo, textType) {
|
|
|
} else {
|
|
|
result = tmp
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (result == undefined) {
|
|
|
if ($.inArray(13, textType) > 0) {
|
|
|
$(".score").html('总分:' + num + '分');
|
|
@@ -442,7 +444,7 @@ function renderTab(detailList, scale) {
|
|
|
//$(".tabBox .title").html(noticeName);
|
|
|
}
|
|
|
let defaultModuleName
|
|
|
- if ((getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale)) {
|
|
|
+ if (getUrlArgObject('page') && getUrlArgObject('page') == 1 && scale && detailList['静态知识']) {
|
|
|
$(".tabList .tab").eq(1).addClass("activeTab")
|
|
|
defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
|
|
|
} else {
|