|
@@ -14,7 +14,7 @@ let treatImg = require('./../images/zhiliao.png')
|
|
const $ = require("jquery");
|
|
const $ = require("jquery");
|
|
const { post,config,getUrlArgObject,openNewWin, isIe8 } = require('./promise.js');
|
|
const { post,config,getUrlArgObject,openNewWin, isIe8 } = require('./promise.js');
|
|
const { transConf } = require('./util.js');
|
|
const { transConf } = require('./util.js');
|
|
-const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo } = require('./indexHorizontalDom.js');
|
|
|
|
|
|
+const { renderRecommendInfo, renderMultRecommendInfo, renderTreat, renderRecommendConditTips, renderTipsInfo ,renderKnowledgeInfo,renderScaleInfo} = require('./indexHorizontalDom.js');
|
|
const is8Ie = isIe8() //判断是否为IE8
|
|
const is8Ie = isIe8() //判断是否为IE8
|
|
if(is8Ie) {
|
|
if(is8Ie) {
|
|
let reg = /undefined/g
|
|
let reg = /undefined/g
|
|
@@ -36,7 +36,6 @@ if(mrId) {
|
|
if(data.code == 0) {
|
|
if(data.code == 0) {
|
|
msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
|
|
msg = Object.assign(data.data, {hosCode:getUrlArgObject('hospitalCode') || '',plan:getUrlArgObject('plan') || '0',})
|
|
window.msg = msg
|
|
window.msg = msg
|
|
- window.pushMessage = {}
|
|
|
|
getPageInfo();
|
|
getPageInfo();
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -55,7 +54,6 @@ if(mrId) {
|
|
plan:getUrlArgObject('plan') || '0',
|
|
plan:getUrlArgObject('plan') || '0',
|
|
}
|
|
}
|
|
window.msg = msg
|
|
window.msg = msg
|
|
- window.pushMessage = {}
|
|
|
|
getPageInfo();
|
|
getPageInfo();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -77,102 +75,42 @@ if(mrId) {
|
|
// window.msg = msg
|
|
// window.msg = msg
|
|
// window.pushMessage = {}
|
|
// window.pushMessage = {}
|
|
function getConf() {
|
|
function getConf() {
|
|
- return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan}).then((res)=>{
|
|
|
|
- const data = res.data
|
|
|
|
- if(data.code == 0){
|
|
|
|
- let confArr = transConf(data.data)
|
|
|
|
- window.confArr = confArr;
|
|
|
|
- }
|
|
|
|
- }).catch(function (err) {
|
|
|
|
- console.log(err);
|
|
|
|
- })
|
|
|
|
|
|
+ return post(config.getSysSetInfoDatas,{hospitalCode: msg.hosCode,plan:msg.plan})
|
|
}
|
|
}
|
|
|
|
|
|
function getPushInfo() {
|
|
function getPushInfo() {
|
|
- return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg)).then((res)=>{
|
|
|
|
- var data = res.data
|
|
|
|
- if(data.code == 0){
|
|
|
|
- window.pushInfo = data
|
|
|
|
- } else {
|
|
|
|
- window.pushInfo = {}
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }).catch(function (err) {
|
|
|
|
- console.log(err);
|
|
|
|
- })
|
|
|
|
|
|
+ return post(config.pushInner,Object.assign({featureType: '1,4,5,6,7,22'},msg))
|
|
}
|
|
}
|
|
|
|
|
|
function getTreatment() {
|
|
function getTreatment() {
|
|
- post(config.pushTreatment,Object.assign({featureType: '8'},msg)).then((res)=>{
|
|
|
|
- var data = res.data
|
|
|
|
- if(data.code == 0){
|
|
|
|
- window.treatInfo = data
|
|
|
|
- } else {
|
|
|
|
- window.treatInfo = {}
|
|
|
|
- }
|
|
|
|
- // if(data.code == 0){
|
|
|
|
- // var result = data.data;
|
|
|
|
- // renderTreat(treatImg, 'treatRecommend','治疗方案',result)
|
|
|
|
- // // var num = 0;
|
|
|
|
- // // if(result.commonTreatment && result.commonTreatment.content){
|
|
|
|
- // // ++num
|
|
|
|
- // // ybzlFun(result.commonTreatment.content)//一般治疗
|
|
|
|
- // // }
|
|
|
|
- // // if(result.treatment && result.treatment.length>0){
|
|
|
|
- // // ++num
|
|
|
|
- // // cyywFun(result.treatment)//常用药物
|
|
|
|
- // // }
|
|
|
|
- // // if(num == 0){
|
|
|
|
- // // $(".conditionHintZhiliaoNull").css("display","block")
|
|
|
|
- // // }
|
|
|
|
- // } else {
|
|
|
|
- // renderTreat(treatImg,'treatRecommend','治疗方案',{})
|
|
|
|
- // }
|
|
|
|
- }).catch(function (err) {
|
|
|
|
- console.log(err);
|
|
|
|
- })
|
|
|
|
|
|
+ return post(config.pushTreatment,Object.assign({featureType: '8'},msg))
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
function getTipsInfo() {
|
|
function getTipsInfo() {
|
|
- post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1}).then((res)=>{
|
|
|
|
- var data = res.data
|
|
|
|
- if(data.code == 0) {
|
|
|
|
- window.tipsInfo = data
|
|
|
|
- }else {
|
|
|
|
- window.tipsInfo = {}
|
|
|
|
- }
|
|
|
|
- }).catch(function (err) {
|
|
|
|
- console.log(err);
|
|
|
|
- })
|
|
|
|
|
|
+ let tipsInfoList = getUrlArgObject('tipsInfoList')&&JSON.parse(getUrlArgObject('tipsInfoList')) || []
|
|
|
|
+ return post(config.informationMore, {conceptIntorduces:tipsInfoList})
|
|
|
|
+ // return post(config.information,{name:getUrlArgObject('tipsName'),type:getUrlArgObject('tipsType'), position: 1})
|
|
}
|
|
}
|
|
|
|
|
|
function getPageInfo() {
|
|
function getPageInfo() {
|
|
Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
|
|
Promise.all([getConf(),getPushInfo(),getTreatment(),getTipsInfo()]).then(([res1, res2, res3,res4]) =>{
|
|
- if(pushInfo&&pushInfo.code == 0) {
|
|
|
|
- pushResult = pushInfo.data;
|
|
|
|
- } else {
|
|
|
|
- pushResult = {};
|
|
|
|
- }
|
|
|
|
- if(treatInfo&&treatInfo.code == 0) {
|
|
|
|
- treatResult = treatInfo.data
|
|
|
|
- } else {
|
|
|
|
- treatResult = {}
|
|
|
|
- }
|
|
|
|
- if(tipsInfo&&tipsInfo.code == 0) {
|
|
|
|
- tipsResult = tipsInfo.data
|
|
|
|
- } else {
|
|
|
|
- tipsResult = {}
|
|
|
|
- }
|
|
|
|
|
|
+ const configArr = res1&&res1.data&&res1.data.data || []
|
|
|
|
+ const pushInfo = res2.data || {}
|
|
|
|
+ const treatInfo = res3.data || {}
|
|
|
|
+ const tipsInfo = res4.data || []
|
|
|
|
+ const confArr = transConf(configArr)
|
|
|
|
+ pushResult = pushInfo.data || {};
|
|
|
|
+ treatResult = treatInfo.data || {}
|
|
|
|
+ tipsResult = tipsInfo.data || {}
|
|
|
|
+
|
|
const diagPossible = pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
|
|
const diagPossible = pushResult.dis&&pushResult.dis['可能诊断'] || []//可能
|
|
const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
|
|
const diagDoubt = pushResult.dis&&pushResult.dis['疑似诊断'] || [] // 疑似
|
|
const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
|
|
const diagDeter = pushResult.dis&&pushResult.dis['确诊'] || []//确诊
|
|
const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
|
|
const diagWaring = pushResult.dis&&pushResult.dis['警惕'] || [] // 推荐警惕诊断
|
|
const symptomRecommend = pushResult.symptom || [] //推荐问诊症状
|
|
const symptomRecommend = pushResult.symptom || [] //推荐问诊症状
|
|
const physiExamRecommend = pushResult.vital || [] //推荐体格检查
|
|
const physiExamRecommend = pushResult.vital || [] //推荐体格检查
|
|
- const diagRecommend = diagPossible.concat(diagDoubt, diagDeter) //推荐诊断
|
|
|
|
|
|
+ const diagRecommend = diagDeter.concat(diagDoubt, diagPossible) //推荐诊断
|
|
const labRecommend = pushResult.lab || []
|
|
const labRecommend = pushResult.lab || []
|
|
const pacsRecommend = pushResult.pacs || []
|
|
const pacsRecommend = pushResult.pacs || []
|
|
const medicalIndications = pushResult.medicalIndications || []
|
|
const medicalIndications = pushResult.medicalIndications || []
|
|
@@ -191,7 +129,6 @@ function getPageInfo() {
|
|
window.pushMessage = medicalIndications;//计算的需要的相关数据
|
|
window.pushMessage = medicalIndications;//计算的需要的相关数据
|
|
let tipsNum = 0;
|
|
let tipsNum = 0;
|
|
for(let i = 0; i < confArr.length; i++) {
|
|
for(let i = 0; i < confArr.length; i++) {
|
|
-
|
|
|
|
switch(confArr[i].code) {
|
|
switch(confArr[i].code) {
|
|
case "inquiry_show": //问诊症状
|
|
case "inquiry_show": //问诊症状
|
|
renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
|
|
renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
|
|
@@ -220,19 +157,29 @@ function getPageInfo() {
|
|
renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
|
|
renderTipsInfo('', 'tipsInfo','提示信息',tipsResult)
|
|
moreInfo()
|
|
moreInfo()
|
|
break;
|
|
break;
|
|
|
|
+ case "knowledge_show": //医学知识
|
|
|
|
+ tipsNum++;
|
|
|
|
+ renderKnowledgeInfo('','knowledgeInfo','医学知识','点击搜索医学知识')
|
|
|
|
+ break;
|
|
|
|
+ case "scale_show": //全部量表
|
|
|
|
+ tipsNum++;
|
|
|
|
+ renderScaleInfo('','scaleInfo','全部量表','点击搜索全部量表')
|
|
|
|
+ break;
|
|
default:
|
|
default:
|
|
- return
|
|
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
function bindTab() {
|
|
function bindTab() {
|
|
- if(showTab == '1') {
|
|
|
|
- $('.infoTabBox .tipsTab').addClass('activeTab')
|
|
|
|
- $('.infomationBox .treatRecommend').css("display","none")
|
|
|
|
- } else {
|
|
|
|
- $('.infoTabBox .treatTab').addClass('activeTab')
|
|
|
|
- $('.infomationBox .tipsInfo').css("display","none")
|
|
|
|
- }
|
|
|
|
|
|
+ $('.infoTabBox .infoTab').eq(showTab).addClass('activeTab').siblings().removeClass('activeTab')
|
|
|
|
+ $('.informationBox').eq(showTab).siblings(".informationBox").css({"display":"none"})
|
|
|
|
+ // if(showTab == '1') {
|
|
|
|
+ // $('.infoTabBox .tipsTab').addClass('activeTab')
|
|
|
|
+ // $('.infomationBox .treatRecommend').css("display","none")
|
|
|
|
+ // } else {
|
|
|
|
+ // $('.infoTabBox .treatTab').addClass('activeTab')
|
|
|
|
+ // $('.infomationBox .tipsInfo').css("display","none")
|
|
|
|
+ // $('.infomationBox .staticWin').css("display","none")
|
|
|
|
+ // }
|
|
|
|
|
|
$('.infomationBox .infoTab').click(function() {
|
|
$('.infomationBox .infoTab').click(function() {
|
|
$(this).addClass('activeTab').siblings().removeClass('activeTab')
|
|
$(this).addClass('activeTab').siblings().removeClass('activeTab')
|
|
@@ -242,14 +189,19 @@ function getPageInfo() {
|
|
})
|
|
})
|
|
|
|
|
|
}
|
|
}
|
|
- // bindTab();
|
|
|
|
- if(tipsNum === 2) {
|
|
|
|
|
|
+ if(tipsNum > 1) {
|
|
bindTab();
|
|
bindTab();
|
|
|
|
+ }else if(tipsNum == 0){
|
|
|
|
+ $('.push').css({
|
|
|
|
+ "width":"95%",
|
|
|
|
+ "border-right":"0 none"
|
|
|
|
+ })
|
|
|
|
+ $('.itemAllBox').css({"width":"98%"})
|
|
}
|
|
}
|
|
function moreInfo() {
|
|
function moreInfo() {
|
|
$('.moreInfo').click(function(){
|
|
$('.moreInfo').click(function(){
|
|
const name = $(this).attr('data-name')
|
|
const name = $(this).attr('data-name')
|
|
- const type = getUrlArgObject('tipsType')
|
|
|
|
|
|
+ const type = $(this).attr('data-type')
|
|
openNewWin(`information.html?type=${type}&position=0&name=${name}`)
|
|
openNewWin(`information.html?type=${type}&position=0&name=${name}`)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -258,23 +210,35 @@ function getPageInfo() {
|
|
if(pushHei == 0) {
|
|
if(pushHei == 0) {
|
|
$('.infomationBox').css({"width":"90%"})
|
|
$('.infomationBox').css({"width":"90%"})
|
|
}
|
|
}
|
|
- // renderRecommendInfo(warningImg, 'warning', '警惕诊断', diagWaring, true,7,2)
|
|
|
|
- // renderRecommendInfo(diagImg, 'diagRecommend', '推荐诊断', diagRecommend, true,7,2)
|
|
|
|
- // renderRecommendInfo(symptomImg, 'symptomRecommend', '问诊症状', symptomRecommend, false)
|
|
|
|
- // renderRecommendInfo(physiExamImg, 'physiExamRecommend', '体格检查', physiExamRecommend, false)
|
|
|
|
- // renderMultRecommendInfo('labAndPacsRecommend', '检验检查', labAndPacsRecommend, false)
|
|
|
|
- // renderTreat(treatImg, 'treatRecommend','治疗方案',treatResult)
|
|
|
|
-
|
|
|
|
- // renderRecommendConditTips(conditTipsImg, 'conditTips','病情提示', medicalIndications || [])
|
|
|
|
|
|
+
|
|
|
|
|
|
}).catch(function (err) {
|
|
}).catch(function (err) {
|
|
console.log(err);
|
|
console.log(err);
|
|
})
|
|
})
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-$(".disclaimerInfo").on("click", function(){
|
|
|
|
- openNewWin("disclaimer.html")
|
|
|
|
-})
|
|
|
|
|
|
+function getVersion() {
|
|
|
|
+ post(config.getVersion, '').then((res) => {
|
|
|
|
+ const data = res.data.data;
|
|
|
|
+ const name = data.name;
|
|
|
|
+ const ver = localStorage.getItem('versionTime-v');
|
|
|
|
+ const time = data.refreshTime;
|
|
|
|
+ if(!ver||ver===time+"=new"||time!==ver.replace("=new","")){ //判断版本是否更新
|
|
|
|
+ $(".version").addClass('new-icon');
|
|
|
|
+ localStorage.setItem('versionTime-v',time+"=new"); //保存版本更新时间
|
|
|
|
+ }else{
|
|
|
|
+ $(".version").removeClass('new-icon');
|
|
|
|
+ }
|
|
|
|
+ $(".version span").html(name);
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+$(function(){
|
|
|
|
+ getVersion();
|
|
|
|
+ //打开版本信息
|
|
|
|
+ $(".disclaimer .version").on("click",function() {
|
|
|
|
+ const ver = localStorage.getItem('versionTime-v');
|
|
|
|
+ $(".version").removeClass('new-icon');
|
|
|
|
+ localStorage.setItem('versionTime-v',ver.replace("=new",""));
|
|
|
|
+ openNewWin("version.html");
|
|
|
|
+ });
|
|
|
|
+ })
|