|
@@ -68,7 +68,7 @@ let treatDisName;
|
|
|
function getMRInfo() {
|
|
|
return post(config.getMr2,{mrId:mrId})
|
|
|
}
|
|
|
-//$('.empty').css("display","none")
|
|
|
+
|
|
|
if(mrId){
|
|
|
Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
|
|
|
const data = res1.data.data&&res1.data.data[0]
|
|
@@ -223,6 +223,7 @@ function renderPage(pageSet){
|
|
|
const hasMedical = hasTab("医学知识",setInfo)
|
|
|
const hasFollowUp = hasTab("随访计划",setInfo)
|
|
|
const hasTcm = hasTab("中医辅助", setInfo);
|
|
|
+ //所有模块都未开启配置,显示功能未开启(无tab)
|
|
|
if(hasAuxiliary.status===0&&hasMedical.status===0&&hasFollowUp.status===0&&hasTcm.status===0){
|
|
|
const nullTxt = `<div class="empty-box" style="left: -20px;display: block;">
|
|
|
<img class="emptyImg" src="../images/icon_admin.png" alt="空">
|
|
@@ -238,12 +239,20 @@ function renderPage(pageSet){
|
|
|
return
|
|
|
}
|
|
|
const planDetail = hasAuxiliary.planDetails;
|
|
|
+ const configs = planDetail.find((it)=>it.status!==0);
|
|
|
+ if(!configs){ //没有开启辅助信息各项配置
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $('.recommendBox .empty-right').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if(hasAuxiliary){
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $(".loading").show();
|
|
|
renderModuleWrapper(planDetail)
|
|
|
let needPush = isNeedPush(planDetail)
|
|
|
let needPushWarning = isNeedPushWarning(planDetail)
|
|
|
let needWriteStandardPush = isNeedwriteStandardPush(planDetail);
|
|
|
- if(needPush || needPushWarning){
|
|
|
+ if(needPush){
|
|
|
renderPushData()
|
|
|
allInterface++
|
|
|
}
|
|
@@ -263,6 +272,7 @@ function renderPage(pageSet){
|
|
|
|
|
|
function renderPushData(){
|
|
|
return getPushInfo().then(res =>{
|
|
|
+ $(".loading").hide();
|
|
|
hasCompleteTnterface++
|
|
|
if(res.data.code == "0"){
|
|
|
const result = res.data.data
|
|
@@ -301,15 +311,10 @@ function renderPushData(){
|
|
|
renderOperationPush(operationsPush,operationsNum)
|
|
|
rendergeneraTreatPush(generaTreatPush)
|
|
|
renderNurse(nursePush, nurseNum)
|
|
|
- //if(hasCompleteTnterface === allInterface){
|
|
|
- //$('.loading').css("display","none")
|
|
|
- //if(moduleNum === 0){
|
|
|
- empty()
|
|
|
- //}
|
|
|
- //}
|
|
|
bindOpenInfo()
|
|
|
moreInfo()
|
|
|
bindSlide()
|
|
|
+ empty(); //判断是否显示空状态
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -320,7 +325,7 @@ function adjustHei(){
|
|
|
}
|
|
|
function isNeedPush(list){
|
|
|
let pass = false;
|
|
|
- let pushCode = ["diag","lis","pacs","symptom","vital","treat","medicines"]
|
|
|
+ let pushCode = ['critical',"diag","lis","pacs","symptom","vital","treat","medicines",'evaluation','general','medicine','operation','nurse']
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
if(pushCode.indexOf(list[i].code)>-1){
|
|
|
if(list[i].status == "1"){
|
|
@@ -357,6 +362,7 @@ function isNeedPushWarning(list){
|
|
|
//let popNum = 0;//气泡显示数字
|
|
|
function renderPushWarning(){
|
|
|
return getPusgWarning().then(res =>{
|
|
|
+ $(".loading").hide();
|
|
|
hasCompleteTnterface++
|
|
|
if(res.data.code == '0'){
|
|
|
const result = res.data.data
|
|
@@ -376,33 +382,20 @@ function renderPushWarning(){
|
|
|
$(".moduleItem.tips").wrapAll("<div class='tips-cont'></div>");
|
|
|
updatePopNum();
|
|
|
$(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
|
|
|
- //popNum = billMsgList.length+highRiskList.length+criticalValList.length+otherList.length;
|
|
|
- // renderBillingPush(dubugStr,'注意调试信息')
|
|
|
-
|
|
|
+ empty();
|
|
|
}
|
|
|
- //if(hasCompleteTnterface === allInterface){
|
|
|
- //$('.loading').css("display","none")
|
|
|
- //if(moduleNum === 0){
|
|
|
- empty()
|
|
|
- //}
|
|
|
- //}
|
|
|
-
|
|
|
})
|
|
|
}
|
|
|
function renderWriteStandard(){
|
|
|
return getWriteStandardPush().then(res =>{
|
|
|
+ $(".loading").hide();
|
|
|
hasCompleteTnterface++
|
|
|
if(res.data.code == '0'){
|
|
|
const list = res.data.data || {}
|
|
|
let casewritingNum = $(".moduleItem.casewriting").attr("data-num") || 5
|
|
|
renderwriteStandardPage(list,casewritingNum)
|
|
|
+ empty();
|
|
|
}
|
|
|
- //if(hasCompleteTnterface === allInterface){
|
|
|
- //$('.loading').css("display","none")
|
|
|
- //if(moduleNum === 0){
|
|
|
- empty()
|
|
|
- //}
|
|
|
- //}
|
|
|
})
|
|
|
}
|
|
|
function renderwriteStandardPage(list,casewritingNum){
|
|
@@ -613,14 +606,12 @@ function renderOperationPush(list,showNum){
|
|
|
function renderItemWrapper(list, showNum) {
|
|
|
let showNum1 = showNum || 5
|
|
|
let shortStr = '', longStr = ''
|
|
|
- $('.empty').css("display","none")
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
if(i <= showNum1-1){
|
|
|
shortStr += renderPushItem(list[i])
|
|
|
}
|
|
|
longStr += renderPushItem(list[i])
|
|
|
}
|
|
|
-
|
|
|
if(showNum1 >= list.length){
|
|
|
return {
|
|
|
shortStr:`<div class="shortBox">${shortStr}</div>`,
|
|
@@ -679,10 +670,9 @@ function renderModuleWrapper(moduleList){
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- // console.log(moduleList,moduleStr)
|
|
|
+ //console.log(moduleList,moduleStr)
|
|
|
|
|
|
$(".recommendWrap").append(moduleStr)
|
|
|
- empty(); //如没有配置数据,显示无配置
|
|
|
}
|
|
|
|
|
|
function hasTab(tabName,tabList){
|
|
@@ -774,20 +764,16 @@ function bindGeneralSlide(){
|
|
|
|
|
|
//显示空状态
|
|
|
function empty(){
|
|
|
- const emptyShownBox = $('.recommendWrap .empty-box:visible').length;
|
|
|
- const configShownBox = $('.recommendWrap .moduleItem:visible').length;
|
|
|
- const configBox = $('.recommendWrap .moduleItem').length;
|
|
|
- if(configBox===0){
|
|
|
- $('.empty-box').hide();
|
|
|
- $('.recommendBox .empty-right').show();
|
|
|
- return;
|
|
|
- }
|
|
|
- if(configBox>0&&configShownBox===0&&emptyShownBox===0){
|
|
|
- $('.empty-box').hide();
|
|
|
- $('.recommendBox .empty-null').show();
|
|
|
- return;
|
|
|
- }
|
|
|
- $(".empty-box").hide();
|
|
|
+ setTimeout(function(){
|
|
|
+ const emptyShownBox = $('.recommendWrap .empty-box:visible').length;
|
|
|
+ const configShownBox = $('.recommendWrap .moduleItem:visible').length;
|
|
|
+ if(configShownBox===0&&emptyShownBox===0){ //有配置但没数据
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $('.recommendBox .empty-null').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $(".empty-box").hide();
|
|
|
+ },200);
|
|
|
}
|
|
|
|
|
|
$(function(){
|