|
@@ -12,6 +12,7 @@ require('./../css/popup.css');
|
|
|
require('./../css/staticSearch.css')
|
|
|
require('./../js/staticSearch.js')
|
|
|
require('./../images/empty.png').replace(/^undefined/g, '')
|
|
|
+require('./../images/empty2.png').replace(/^undefined/g, '')
|
|
|
require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
|
require('./../images/right.png').replace(/^undefined/g, '')
|
|
|
// require('./popupEdit.js');
|
|
@@ -28,8 +29,6 @@ const $ = require("jquery");
|
|
|
const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
|
|
|
const { transConf } = require('./util.js');
|
|
|
// const {renderWrapper, renderCaseStandard,renderWarning,renderRecommendInfo,renderMultRecommendInfo,renderRecommendConditTips} = require('./cdssDom.js');
|
|
|
-const { data } = require('jquery');
|
|
|
-const { render } = require('less');
|
|
|
|
|
|
//静态知识类型: 1:诊断 2.药品 3.化验套餐 4.化验明细 5.辅检 6.手术和操作
|
|
|
|
|
@@ -45,6 +44,7 @@ let moduleNum = 0
|
|
|
let mrId = getUrlArgObject('mrId')
|
|
|
const tipsMode = getUrlArgObject('tipsMode') || 1
|
|
|
let planCode = getUrlArgObject('planCode') || 'all'
|
|
|
+let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
|
|
|
let msg;
|
|
|
|
|
|
function getMRInfo() {
|
|
@@ -52,58 +52,38 @@ function getMRInfo() {
|
|
|
}
|
|
|
// $('.loading').css("display","block")
|
|
|
$('.empty').css("display","none")
|
|
|
-getMRInfo().then(res =>{
|
|
|
+if(mrId){
|
|
|
+ getMRInfo().then(res =>{
|
|
|
if(res.data.code == '0'){
|
|
|
msg = res.data.data ||{}
|
|
|
window.msg = msg
|
|
|
- return getConf().then(res =>{
|
|
|
- if(res.data.code == '0'){
|
|
|
- // const configArr = res.data.data.pushSetList || []
|
|
|
- // getPageInfo(configArr)
|
|
|
- const data = res.data.data&&res.data.data[0]
|
|
|
- renderPage(data)
|
|
|
- }
|
|
|
- })
|
|
|
- // getAnalyse().then(res =>{
|
|
|
- // renderCaseStandard('CaseStandard', '病例书写规范', res.data.data.warning)
|
|
|
- // })
|
|
|
- // getHosptDeptUsal().then(res =>{
|
|
|
- // const diagCommon = res.data.data
|
|
|
- // renderRecommendInfo(5,'diagCommon', '常见症状', diagCommon, true,7,2);
|
|
|
- // })
|
|
|
|
|
|
}
|
|
|
-}).catch(function (err) {
|
|
|
- console.log(err);
|
|
|
+ }).catch(function (err) {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+getConf().then(res =>{
|
|
|
+ if(res.data.code == '0'){
|
|
|
+ // const configArr = res.data.data.pushSetList || []
|
|
|
+ // getPageInfo(configArr)
|
|
|
+ const data = res.data.data&&res.data.data[0]
|
|
|
+ renderPage(data)
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
-// var msg = {
|
|
|
-// age: getUrlArgObject('age'),
|
|
|
-// sex: getUrlArgObject('sex') == '男'?1:(getUrlArgObject('sex') == '女'?2:(getUrlArgObject('sex') == '通用'?3:getUrlArgObject('sex'))),
|
|
|
-// symptom: getUrlArgObject('symptomJson'),
|
|
|
-// vital: getUrlArgObject('vitalJson'),
|
|
|
-// lis: getUrlArgObject('lisJson')? JSON.parse(getUrlArgObject('lisJson')) : [],
|
|
|
-// pacs: getUrlArgObject('pacsJson'),
|
|
|
-// diag: getUrlArgObject('diagJson'),
|
|
|
-// diseaseName: getUrlArgObject('diseaseName'),
|
|
|
-// other: getUrlArgObject('otherJson') + getUrlArgObject('pastJson'),
|
|
|
-// hosCode:getUrlArgObject('hospitalCode') || '',
|
|
|
-// plan:getUrlArgObject('plan') || '0',
|
|
|
-// }//推送相关信息
|
|
|
-// // http://localhost:8082/indexVert.html?age=28&diseaseId=280&lisJson=&diagJson=%E6%80%A5%E6%80%A7%E8%83%B0%E8%85%BA%E7%82%8E&pastJson=%E6%97%A0%E5%BF%83%E8%84%8F%E7%97%85&otherJson=%E6%97%A0%E9%AB%98%E8%A1%80%E5%8E%8B&pacsJson=%E8%85%B9%E9%83%A8B%E8%B6%85:%E6%97%A0%E5%BC%82%E5%B8%B8,%20%E6%8A%A5%E5%91%8A%E6%97%A5%E6%9C%9F:2019-05-07&sex=%E7%94%B7&symptomJson=%E6%81%B6%E5%BF%83%E5%91%95%E5%90%90%E8%85%B0%E7%97%9B&vitalJson=%E8%A1%80%E5%8E%8B%E5%B7%A6%E4%B8%8A%E8%82%A213/12mmHg
|
|
|
-// window.msg = msg
|
|
|
-// window.pushMessage = {}
|
|
|
function getConf() {
|
|
|
var msg = window.msg
|
|
|
- return post(config.getPushSet,{hospitalId: msg.hospitalId||1,planCode: planCode})
|
|
|
+ return post(config.getPushSet,{hospitalId:hospitalIdUrl||msg.hospitalId||1,planCode: planCode})
|
|
|
}
|
|
|
|
|
|
function getPushInfo() {
|
|
|
- return post(config.pushInner,Object.assign(msg,{featureType: '1,4,5,6,7,8,9',hospitalId:msg.hospitalId||2,ruleType:config.ruleTypeMap['22']}))
|
|
|
+ return post(config.pushInner,Object.assign(msg,{featureType: '1,4,5,6,7,8,9',hospitalId:hospitalIdUrl||msg.hospitalId,ruleType:config.ruleTypeMap['22']}))
|
|
|
|
|
|
}
|
|
|
function getPusgWarning(){
|
|
|
- return post(config.indicationPush,Object.assign(msg,{ruleType: '1,2,3',hospitalId:msg.hospitalId||2}))
|
|
|
+ return post(config.indicationPush,Object.assign(msg,{ruleType: '1,2,3',hospitalId:hospitalIdUrl||msg.hospitalId}))
|
|
|
}
|
|
|
|
|
|
|
|
@@ -211,7 +191,10 @@ function renderPage(pageSet){
|
|
|
$(".contentWrapper").css("height",iframeHei-tabHei-10-20-30+'px')
|
|
|
const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
|
|
|
const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
|
|
|
-
|
|
|
+ if(!mrId){
|
|
|
+ empty()
|
|
|
+ return
|
|
|
+ }
|
|
|
if(hasAuxiliary){
|
|
|
renderModuleWrapper(hasAuxiliary.planDetails)
|
|
|
let needPush = isNeedPush(hasAuxiliary.planDetails)
|
|
@@ -256,12 +239,12 @@ function renderPushData(){
|
|
|
renderDiag(diagPush)
|
|
|
renderMedicinesPush(medicinesPush,medicinesNum,2,true)
|
|
|
renderOperationPush(operationsPush,operationsNum,6,false)
|
|
|
- // if(hasCompleteTnterface === allInterface){
|
|
|
- // $('.loading').css("display","none")
|
|
|
- // if(moduleNum === 0){
|
|
|
- // empty()
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if(hasCompleteTnterface === allInterface){
|
|
|
+ $('.loading').css("display","none")
|
|
|
+ if(moduleNum === 0){
|
|
|
+ empty()
|
|
|
+ }
|
|
|
+ }
|
|
|
bindOpenInfo()
|
|
|
bindSlide()
|
|
|
}
|
|
@@ -306,12 +289,12 @@ function renderPushWarning(){
|
|
|
// renderBillingPush(dubugStr,'注意调试信息')
|
|
|
|
|
|
}
|
|
|
- // if(hasCompleteTnterface === allInterface){
|
|
|
- // $('.loading').css("display","none")
|
|
|
- // if(moduleNum === 0){
|
|
|
- // empty()
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if(hasCompleteTnterface === allInterface){
|
|
|
+ $('.loading').css("display","none")
|
|
|
+ if(moduleNum === 0){
|
|
|
+ empty()
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
})
|
|
|
}
|
|
@@ -373,7 +356,7 @@ function renderWarningDiag(list,name,number){
|
|
|
$('.moduleItem.warning').append()
|
|
|
let str = `<span class="warningTitle"><img class="warningTitImg" src=${warnImg}>警惕</span>`
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
- str+= renderPushItem(list[i].name,1,true)
|
|
|
+ str+= renderPushItem(list[i],1)
|
|
|
}
|
|
|
$('.moduleItem.warning').append(str)
|
|
|
$('.moduleItem.warning').css("display","block")
|
|
@@ -453,9 +436,9 @@ function renderItemWrapper(list,showNum,type,hasInfo){
|
|
|
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
if(i <= showNum1-1){
|
|
|
- shortStr += renderPushItem(list[i].name,type,hasInfo)
|
|
|
+ shortStr += renderPushItem(list[i],type)
|
|
|
}
|
|
|
- longStr += renderPushItem(list[i].name,type,hasInfo)
|
|
|
+ longStr += renderPushItem(list[i],type)
|
|
|
}
|
|
|
|
|
|
if(showNum1 >= list.length){
|
|
@@ -473,12 +456,8 @@ function renderItemWrapper(list,showNum,type,hasInfo){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderPushItem(name,type,hasInfo){
|
|
|
- if(hasInfo){
|
|
|
- str= `<span class="pushItemBox" data-name="${name}" data-type="${type}"><span class="pushItemName">${name}</span><img class="infoImg" src="${infoImg}"></span>`
|
|
|
- }else{
|
|
|
- str= `<span class="pushItemBox">${name}</span>`
|
|
|
- }
|
|
|
+function renderPushItem(item,type){
|
|
|
+ str= `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${item.name}</span>${item.hasInfo=="1"?`<img class="infoImg" src="${infoImg}">`:""}</span>`
|
|
|
return str
|
|
|
}
|
|
|
|
|
@@ -576,6 +555,7 @@ function getModuleShow(moduleClassName){
|
|
|
}
|
|
|
|
|
|
function empty(){
|
|
|
+ $(".responsibility").css("display","none")
|
|
|
$('.empty').css("display","block")
|
|
|
}
|
|
|
|