|
@@ -10,11 +10,13 @@ require('./../css/reset.css');
|
|
|
require('./../css/cdss.less');
|
|
|
require('./../css/popup.css');
|
|
|
require('./../css/followUpV.less');
|
|
|
-require('./../css/staticSearch.css')
|
|
|
-require('./../js/staticSearch.js')
|
|
|
+require('../css/staticSearch.less')
|
|
|
+require('./../js/staticSearch.js');//静态知识搜索
|
|
|
require('./../images/empty.png').replace(/^undefined/g, '')
|
|
|
+require('./../images/icon_admin.png').replace(/^undefined/g, '')
|
|
|
require('./../images/empty2.png').replace(/^undefined/g, '')
|
|
|
require('./../images/empty3.png').replace(/^undefined/g, '')
|
|
|
+require('./../images/icon_no.png').replace(/^undefined/g, '')
|
|
|
require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
|
require('./../images/right.png').replace(/^undefined/g, '')
|
|
|
require('./../images/new.png').replace(/^undefined/g, '')
|
|
@@ -66,7 +68,7 @@ let treatDisName;
|
|
|
function getMRInfo() {
|
|
|
return post(config.getMr2,{mrId:mrId})
|
|
|
}
|
|
|
-$('.empty').css("display","none")
|
|
|
+let ifInputParam; //是否有入参,显示输入空状态用
|
|
|
if(mrId){
|
|
|
Promise.all([getConf(),getMRInfo()]).then(([res1,res2])=>{
|
|
|
const data = res1.data.data&&res1.data.data[0]
|
|
@@ -89,7 +91,25 @@ if(mrId){
|
|
|
followEmpty()
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+function hasInputParam(){
|
|
|
+ const checkKeys = ["chief","diag","diseaseName","drug","drugOrder","lis","lisOrder",'marital','menstrual',"operation","operationOrder","otherIndex","otherOrder","pacs","pacsOrder","pasts","personal","symptom","transfusion","transfusionOrder","vital"];
|
|
|
+ let res = false;
|
|
|
+ let val;
|
|
|
+ checkKeys.map((it)=>{
|
|
|
+ val = msg[it];
|
|
|
+ if(typeof val==='string'){
|
|
|
+ if(val!==''){
|
|
|
+ res=true;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ const str = JSON.stringify(val);
|
|
|
+ if(!(str==='{}'||str==='[]')){
|
|
|
+ res=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return res;
|
|
|
+}
|
|
|
|
|
|
function getConf() {
|
|
|
var msg = window.msg
|
|
@@ -176,11 +196,16 @@ $(document).on('click',".allDis .right,.allDis .secDis",function(){
|
|
|
|
|
|
|
|
|
function moreInfo() {
|
|
|
- $('.infoImg').off("click").click(function(){
|
|
|
- const name = $(this).parent().attr('data-name')
|
|
|
- const type = $(this).parent().attr('data-type')
|
|
|
- openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
|
|
|
- })
|
|
|
+ $('.infoImg').off("click").click(function(){
|
|
|
+ const name = $(this).parents(".pushItemBox").attr('data-name')
|
|
|
+ const type = $(this).parents(".pushItemBox").attr('data-type')
|
|
|
+ openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&mrId=${encodeURIComponent(mrId)}`)
|
|
|
+ })
|
|
|
+ $('.evaluationtitle .item-name').off("click").click(function () {
|
|
|
+ const name = $(this).parents(".pushItemBox").attr('data-name')
|
|
|
+ const type = $(this).parents(".pushItemBox").attr('data-type')
|
|
|
+ openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&mrId=${encodeURIComponent(mrId)}&gauge=gauge`)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function getVersion() {
|
|
@@ -206,29 +231,50 @@ function getDisclaimer() {
|
|
|
}
|
|
|
|
|
|
function renderPage(pageSet){
|
|
|
- if(!pageSet || !pageSet.sysSetInfo){
|
|
|
+ const setInfo = pageSet.sysSetInfo;
|
|
|
+ if(!pageSet || !setInfo){
|
|
|
return
|
|
|
}
|
|
|
- renderTab(pageSet.sysSetInfo)
|
|
|
+ renderTab(setInfo)
|
|
|
adjustHei()
|
|
|
- const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
|
|
|
- const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
|
|
|
- const hasFollowUp = hasTab("随访计划",pageSet.sysSetInfo)
|
|
|
- const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo);
|
|
|
-
|
|
|
+ const hasAuxiliary = hasTab("辅助信息",setInfo);
|
|
|
+ const hasMedical = hasTab("医学知识",setInfo)
|
|
|
+ const hasFollowUp = hasTab("随访计划",setInfo)
|
|
|
+ const hasTcm = hasTab("中医辅助", setInfo);
|
|
|
+ console.log(hasFollowUp)
|
|
|
+ //所有模块都未开启配置,显示功能未开启(无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="空">
|
|
|
+ <p class="emptyTxt">功能未开启</p>
|
|
|
+ </div>`
|
|
|
+ $(".contentWrapper").html(nullTxt);
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (hasTcm) {
|
|
|
getTcmMr(mrId, hasTcm);
|
|
|
}
|
|
|
if(!mrId){
|
|
|
- empty()
|
|
|
return
|
|
|
}
|
|
|
+ if(hasFollowUp){
|
|
|
+ renderFollowUp(msg)
|
|
|
+ }
|
|
|
+ const planDetail = hasAuxiliary.planDetails;
|
|
|
+ const configs = planDetail.filter((it)=>it.status!==0)||[];
|
|
|
+ if(!configs[0]){ //没有开启辅助信息各项配置
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $('.recommendBox .empty-right').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if(hasAuxiliary){
|
|
|
- renderModuleWrapper(hasAuxiliary.planDetails)
|
|
|
- let needPush = isNeedPush(hasAuxiliary.planDetails)
|
|
|
- let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
|
|
|
- let needWriteStandardPush = isNeedwriteStandardPush(hasAuxiliary.planDetails)
|
|
|
- if(needPush || needPushWarning){
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $(".loading").show();
|
|
|
+ renderModuleWrapper(planDetail)
|
|
|
+ let needPush = isNeedPush(planDetail)
|
|
|
+ let needPushWarning = isNeedPushWarning(planDetail)
|
|
|
+ let needWriteStandardPush = isNeedwriteStandardPush(planDetail);
|
|
|
+ if(needPush){
|
|
|
renderPushData()
|
|
|
allInterface++
|
|
|
}
|
|
@@ -241,16 +287,13 @@ function renderPage(pageSet){
|
|
|
allInterface++
|
|
|
}
|
|
|
}
|
|
|
- if(hasFollowUp){
|
|
|
- renderFollowUp(msg)
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
function renderPushData(){
|
|
|
return getPushInfo().then(res =>{
|
|
|
+ $(".loading").hide();
|
|
|
hasCompleteTnterface++
|
|
|
if(res.data.code == "0"){
|
|
|
- console.log(1)
|
|
|
const result = res.data.data
|
|
|
let diagPush = result.dis ||{}
|
|
|
let lisPush = result.lis || []
|
|
@@ -277,69 +320,68 @@ function renderPushData(){
|
|
|
let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
|
|
|
|
|
|
|
|
|
- renderLis(lisPush,lisNum,3,true)
|
|
|
- renderScale(scalePush,scaleNum,8,true)
|
|
|
- renderPacs(pacsPush,pacsNum,5,true)
|
|
|
- renderCheckup(checkupPush,checkupNum,null,true)
|
|
|
- renderSymptomPush(symptomPush,symptomNum,null,true)
|
|
|
+ renderLis(lisPush,lisNum)
|
|
|
+ renderScale(scalePush,scaleNum)
|
|
|
+ renderPacs(pacsPush,pacsNum)
|
|
|
+ renderCheckup(checkupPush,checkupNum)
|
|
|
+ renderSymptomPush(symptomPush,symptomNum)
|
|
|
renderDiag(diagPush)
|
|
|
- renderMedicinesPush(medicinesPush,medicinesNum,2,true)
|
|
|
- renderOperationPush(operationsPush,operationsNum,6,true)
|
|
|
+ renderMedicinesPush(medicinesPush,medicinesNum)
|
|
|
+ renderOperationPush(operationsPush,operationsNum)
|
|
|
rendergeneraTreatPush(generaTreatPush)
|
|
|
- renderNurse(nursePush, nurseNum, 9, true)
|
|
|
- if(hasCompleteTnterface === allInterface){
|
|
|
- $('.loading').css("display","none")
|
|
|
- if(moduleNum === 0){
|
|
|
- empty()
|
|
|
- }
|
|
|
- }
|
|
|
+ renderNurse(nursePush, nurseNum)
|
|
|
bindOpenInfo()
|
|
|
moreInfo()
|
|
|
bindSlide()
|
|
|
+ empty(); //判断是否显示空状态
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
function adjustHei(){
|
|
|
const iframeHei = $(".bodyWrap").height()
|
|
|
- const tabHei = $(".tabList").height()
|
|
|
- $(".contentWrapper").css("height",iframeHei-tabHei-20-30+3+19+'px')
|
|
|
+ $(".contentWrapper").css("height",iframeHei-20-30-60+3+19+'px')
|
|
|
+ $(".tabList").css("height",iframeHei+'px')
|
|
|
}
|
|
|
function isNeedPush(list){
|
|
|
- let pushCode = ["diag","lis","pacs","symptom","vital","treat","medicines"]
|
|
|
+ let pass = false;
|
|
|
+ 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"){
|
|
|
- return true
|
|
|
+ pass = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return false
|
|
|
+ return pass;
|
|
|
}
|
|
|
function isNeedwriteStandardPush(list){
|
|
|
+ let pass = false;
|
|
|
let pushCode = ["casewriting"]
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
if(pushCode.indexOf(list[i].code)>-1){
|
|
|
if(list[i].status == "1"){
|
|
|
- return true
|
|
|
+ pass = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return false
|
|
|
+ return pass
|
|
|
}
|
|
|
function isNeedPushWarning(list){
|
|
|
- let pushCode = ["crivalue", "rationali", "highrisk", "otherremind"]
|
|
|
+ let pushCode = ["crivalue", "rationali", "highrisk", "otherremind"];
|
|
|
+ let pass = false;
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
- if(pushCode.indexOf(list[i].code)>-1){
|
|
|
- if(list[i].status == "1"){
|
|
|
- return true
|
|
|
+ if(pushCode.indexOf(list[i].code.trim())>-1){
|
|
|
+ if(+list[i].status === 1){
|
|
|
+ pass=true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return false
|
|
|
+ return pass
|
|
|
}
|
|
|
-
|
|
|
+//let popNum = 0;//气泡显示数字
|
|
|
function renderPushWarning(){
|
|
|
return getPusgWarning().then(res =>{
|
|
|
+ $(".loading").hide();
|
|
|
hasCompleteTnterface++
|
|
|
if(res.data.code == '0'){
|
|
|
const result = res.data.data
|
|
@@ -357,35 +399,24 @@ function renderPushWarning(){
|
|
|
renderBillingPush(otherList,'其他提醒','otherremind')
|
|
|
//moreInfo()
|
|
|
$(".moduleItem.tips").wrapAll("<div class='tips-cont'></div>");
|
|
|
+ updatePopNum();
|
|
|
$(titleStr('warning')).insertBefore('.tips-cont .moduleItem:first-child')
|
|
|
- // 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)
|
|
|
}
|
|
|
- if(hasCompleteTnterface === allInterface){
|
|
|
- $('.loading').css("display","none")
|
|
|
- if(moduleNum === 0){
|
|
|
- empty()
|
|
|
- }
|
|
|
- }
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
function renderwriteStandardPage(list,casewritingNum){
|
|
|
let arr = Object.keys(list)
|
|
|
if(arr.length > 0 && $(".moduleItem.casewriting").length > 0){
|
|
@@ -405,14 +436,16 @@ function renderwriteStandardPage(list,casewritingNum){
|
|
|
$(".moduleItem.casewriting").append(allStr)
|
|
|
$(".casewritingWrapper").append(shortStrBox)
|
|
|
if( arr.length>casewritingNum){
|
|
|
- $(".shortStrBox .billingPushItem").eq( $(".shortStrBox .billingPushItem").length -1).append(`<span class="showMoreCaseWriting">更多<img class="iconArrowImg" src="${iconArrowDown}"></span>`)
|
|
|
+ $(".shortStrBox .billingPushItem").eq( $(".shortStrBox .billingPushItem").length -1).append(`<span class="showMoreCaseWriting"><img class="iconArrowImg" src="${iconArrowDown}"></span>`)
|
|
|
|
|
|
// $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
$(".casewritingWrapper").append(longStrBox)
|
|
|
- $(".longStrBox .billingPushItem").eq( $(".longStrBox .billingPushItem").length -1).append(`<span class="showLessCaseWriting">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
+ $(".longStrBox .billingPushItem").eq( $(".longStrBox .billingPushItem").length -1).append(`<span class="showLessCaseWriting"><img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
}
|
|
|
$('.moduleItem.casewriting').css("display","block")
|
|
|
+ updatePopNum();
|
|
|
bindSlideCaseWriting()
|
|
|
+ empty();
|
|
|
}
|
|
|
}
|
|
|
function renderBillingPush(list,name,code){
|
|
@@ -431,9 +464,19 @@ function renderBillingPush(list,name,code){
|
|
|
</div>`
|
|
|
$("."+code).append(boxStr)
|
|
|
$('.moduleItem.'+code).addClass("tips").css("display", "block")
|
|
|
-}
|
|
|
|
|
|
+}
|
|
|
|
|
|
+//更新消息个数
|
|
|
+function updatePopNum(){
|
|
|
+ const writeNum = $(".casewriting .longStrBox").length?$(".casewriting .longStrBox .billingPushItem").length:$(".casewriting .shortStrBox .billingPushItem").length;
|
|
|
+ const warnNum = $(".tips-cont .billingPushItem").length+writeNum; //病例书写规范有隐藏元素
|
|
|
+ if(warnNum===0){
|
|
|
+ $(".tabList .numPop").hide();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $(".tabList .numPop").text(warnNum).show()
|
|
|
+}
|
|
|
function renderDiag(diagPush){
|
|
|
let possibleDiagPush = diagPush["可能诊断"] || []
|
|
|
let previousDiagPush = diagPush["既往诊断"] || []
|
|
@@ -461,7 +504,7 @@ function renderDiagItem(list,name,number){
|
|
|
}
|
|
|
moduleNum++
|
|
|
let titleStr = titleStr2(name)
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,number,1,true)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,number)
|
|
|
let boxStr = `<div class="moduleBox">
|
|
|
${titleStr}
|
|
|
${shortStr}
|
|
@@ -483,60 +526,60 @@ function renderWarningDiag(list,name,number){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderLis(list,showNum,type,hasInfo){
|
|
|
+function renderLis(list,showNum){
|
|
|
if(list.length > 0 && $(".moduleItem.lis").length > 0){
|
|
|
moduleNum++
|
|
|
$('.moduleItem.lis').append(titleStr("lisPush"))
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$('.moduleItem.lis').append(shortStr).append(longStr)
|
|
|
$('.moduleItem.lis').css("display","block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderScale(list,showNum,type,hasInfo){
|
|
|
+function renderScale(list,showNum){
|
|
|
if(list.length > 0 && $(".moduleItem.evaluation").length > 0){
|
|
|
moduleNum++
|
|
|
$('.moduleItem.evaluation').append(titleStr("scalePush"))
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$('.moduleItem.evaluation').append(shortStr).append(longStr)
|
|
|
- $('.moduleItem.evaluation').css("display","block")
|
|
|
+ $('.moduleItem.evaluation').css("display", "block")
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderNurse(list, showNum, type, hasInfo) {
|
|
|
+function renderNurse(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.nurse').append(titleStr("nursePush"))
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list, showNum)
|
|
|
$('.moduleItem.nurse').append(shortStr).append(longStr);
|
|
|
$('.moduleItem.nurse').css("display", "block")
|
|
|
}
|
|
|
}
|
|
|
-function renderPacs(list,showNum,type,hasInfo){
|
|
|
+function renderPacs(list,showNum){
|
|
|
if(list.length > 0 && $(".moduleItem.pacs").length > 0){
|
|
|
moduleNum++
|
|
|
$(".moduleItem.pacs").append(titleStr("pacsPush"))
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$(".moduleItem.pacs").append(shortStr).append(longStr)
|
|
|
$('.moduleItem.pacs').css("display","block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderCheckup(list,showNum,type,hasInfo){
|
|
|
+function renderCheckup(list,showNum){
|
|
|
if(list.length > 0 && $(".moduleItem.vital").length > 0){
|
|
|
moduleNum++
|
|
|
$(".moduleItem.vital").append(titleStr("checkupPush"))
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$(".moduleItem.vital").append(shortStr).append(longStr)
|
|
|
$('.moduleItem.vital').css("display","block")
|
|
|
}
|
|
|
}
|
|
|
-function renderSymptomPush(list,showNum,type,hasInfo){
|
|
|
+function renderSymptomPush(list,showNum){
|
|
|
$(".moduleItem.symptom").append(titleStr('symptomPush'))
|
|
|
|
|
|
if(list.length > 0 && $(".moduleItem.symptom").length > 0){
|
|
|
moduleNum++
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$(".moduleItem.symptom").append(shortStr).append(longStr)
|
|
|
$(".moduleItem.symptom").css("display","block")
|
|
|
}
|
|
@@ -551,29 +594,29 @@ function rendergeneraTreatPush(list){
|
|
|
$(".moduleItem.general").css("display","block")
|
|
|
let generaTreatHei = $(".moduleItem .generalTreatInfo")[0].scrollHeight
|
|
|
if(generaTreatHei > 50){
|
|
|
- $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat">更多<img class="iconArrowImg more" src="${iconArrowDown}"></span>`)
|
|
|
- $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat">收起<img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
+ $(".moduleItem .generalTreatInfo").append(`<span class="showMoreGeneralTreat"><img class="iconArrowImg more" src="${iconArrowDown}"></span>`)
|
|
|
+ $(".moduleItem .generalTreatInfo").append(`<span class="showLessGeneralTreat"><img class="iconArrowImg" src="${iconArrowUp}"></span>`)
|
|
|
bindGeneralSlide()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function renderMedicinesPush(list,showNum,type,hasInfo){
|
|
|
+function renderMedicinesPush(list,showNum){
|
|
|
$(".moduleItem.medicine").append(titleStr('drugPush'))
|
|
|
|
|
|
if(list.length > 0 && $(".moduleItem.medicine").length > 0){
|
|
|
moduleNum++
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$(".moduleItem.medicine").append(shortStr).append(longStr)
|
|
|
$(".moduleItem.medicine").css("display","block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderOperationPush(list,showNum,type,hasInfo){
|
|
|
+function renderOperationPush(list,showNum){
|
|
|
$(".moduleItem.operation").append(titleStr('operationPush'))
|
|
|
|
|
|
if(list.length > 0 && $(".moduleItem.operation").length > 0){
|
|
|
moduleNum++
|
|
|
- let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
|
|
|
+ let {shortStr, longStr} = renderItemWrapper(list,showNum)
|
|
|
$(".moduleItem.operation").append(shortStr).append(longStr)
|
|
|
$(".moduleItem.operation").css("display","block")
|
|
|
}
|
|
@@ -581,35 +624,35 @@ function renderOperationPush(list,showNum,type,hasInfo){
|
|
|
}
|
|
|
|
|
|
|
|
|
-function renderItemWrapper(list, showNum, type, hasInfo) {
|
|
|
- //console.log(33, type)
|
|
|
+function renderItemWrapper(list, showNum) {
|
|
|
let showNum1 = showNum || 5
|
|
|
let shortStr = '', longStr = ''
|
|
|
-
|
|
|
for(let i = 0; i < list.length; i++){
|
|
|
if(i <= showNum1-1){
|
|
|
- shortStr += renderPushItem(list[i],type)
|
|
|
+ shortStr += renderPushItem(list[i])
|
|
|
}
|
|
|
- longStr += renderPushItem(list[i],type)
|
|
|
+ longStr += renderPushItem(list[i])
|
|
|
}
|
|
|
-
|
|
|
if(showNum1 >= list.length){
|
|
|
return {
|
|
|
shortStr:`<div class="shortBox">${shortStr}</div>`,
|
|
|
longStr:''
|
|
|
}
|
|
|
}else{
|
|
|
- shortStr += `<span class="showMore">更多 <img class="iconArrowImg" src="${iconArrowDown}"></span>`
|
|
|
- longStr += `<span class="showLess">收起 <img class="iconArrowImg" src="${iconArrowUp}"></span>`
|
|
|
+ shortStr += `<span class="showMore"><img class="iconArrowImg" src="${iconArrowDown}"></span>`
|
|
|
+ longStr += `<span class="showLess"><img class="iconArrowImg" src="${iconArrowUp}"></span>`
|
|
|
return {
|
|
|
- shortStr:`<div class="shortBox clearfix">${shortStr}</div>`,
|
|
|
- longStr:`<div class="longBox clearfix">${longStr}</div>`
|
|
|
+ shortStr:`<div class="shortBox">${shortStr}</div>`,
|
|
|
+ longStr:`<div class="longBox">${longStr}</div>`
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderPushItem(item,type){
|
|
|
- str= `<span class="pushItemBox" data-name="${item.name}" data-type="${type}"><span class="pushItemName">${type==8?('【'+item.name+'】'):item.name}</span>${item.hasInfo=="1"?`<img class="infoImg" src="${infoImg}">`:""}</span>`
|
|
|
+function renderPushItem(item) {
|
|
|
+ const infoIcon = `${ item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : "" }`;
|
|
|
+ str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
|
|
|
+ str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle':''}"><i class="item-name">${item.type == 8 ? ('【' + item.name + '】') : item.name}</i> ${infoIcon}<i class="hidden-i"></i></span>`
|
|
|
+ str+=`</span>`;
|
|
|
return str
|
|
|
}
|
|
|
|
|
@@ -622,11 +665,11 @@ function bindOpenInfo(){
|
|
|
}
|
|
|
|
|
|
function bindSlide(){
|
|
|
- $(".showMore").on("click", function(){
|
|
|
+ $(".showMore").off("click").on("click", function(){
|
|
|
$(this).parent().parent().find(".longBox").css("display","block")
|
|
|
$(this).parent().parent().find(".shortBox").css("display","none")
|
|
|
})
|
|
|
- $(".showLess").on("click", function(){
|
|
|
+ $(".showLess").off("click").on("click", function(){
|
|
|
$(this).parent().parent().find(".longBox").css("display","none")
|
|
|
$(this).parent().parent().find(".shortBox").css("display","block")
|
|
|
})
|
|
@@ -648,7 +691,7 @@ function renderModuleWrapper(moduleList){
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- // console.log(moduleList,moduleStr)
|
|
|
+ //console.log(moduleList,moduleStr)
|
|
|
|
|
|
$(".recommendWrap").append(moduleStr)
|
|
|
}
|
|
@@ -665,13 +708,14 @@ function hasTab(tabName,tabList){
|
|
|
return false
|
|
|
}
|
|
|
function renderTab(tabList){
|
|
|
- let tabStr = ''
|
|
|
+ let tabStr = '<ul>'
|
|
|
for(let i = 0; i < tabList.length; i++){
|
|
|
if(tabList[i].status == '1'){
|
|
|
- tabStr += `<span class="tab" data-name="${tabList[i].code}" >${tabList[i].name}<span class="activeLine"></span></span>`
|
|
|
+ tabStr += `<li class="tab" data-name="${tabList[i].code}" ><span>${tabList[i].name}</span></li>`
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
+ tabStr += `</ul><div class="numPop"></div>`;
|
|
|
$(".tabList").append(tabStr)
|
|
|
let tabNum = 0;
|
|
|
if(isTcm=='true'){
|
|
@@ -695,14 +739,14 @@ function titleStr2(name){
|
|
|
}
|
|
|
|
|
|
function bindTabClick(){
|
|
|
- $(".tabList .tab").on("click", function(){
|
|
|
+ $(".tabList .tab").off("click").on("click", function(){
|
|
|
$(".activeTab").removeClass("activeTab")
|
|
|
$(this).addClass("activeTab")
|
|
|
const moduleName = $(this).attr("data-name")
|
|
|
getModuleShow(moduleConfig[moduleName])
|
|
|
if(moduleName == "medical"){
|
|
|
$(".staticSearchT .ipt").find("input").focus()
|
|
|
- $(".contentWrapper").css("overflowY","hidden")
|
|
|
+ //$(".contentWrapper").css("overflowY","hidden")
|
|
|
}else if(moduleName == 'followup'){
|
|
|
|
|
|
// $(".contentWrapper").css("overflowY","auto")
|
|
@@ -717,41 +761,53 @@ function getModuleShow(moduleClassName){
|
|
|
}
|
|
|
}
|
|
|
function bindGeneralSlide(){
|
|
|
- $(".showMoreGeneralTreat").on("click",function(){
|
|
|
+ $(".showMoreGeneralTreat").off("click").on("click",function(){
|
|
|
$(".generalTreatInfo").toggleClass("isOverFlow")
|
|
|
$(".showMoreGeneralTreat").toggle()
|
|
|
})
|
|
|
- $(".showLessGeneralTreat").on("click",function(){
|
|
|
+ $(".showLessGeneralTreat").off("click").on("click",function(){
|
|
|
$(".generalTreatInfo").toggleClass("isOverFlow")
|
|
|
$(".showMoreGeneralTreat").toggle()
|
|
|
})
|
|
|
|
|
|
}
|
|
|
function bindSlideCaseWriting(){
|
|
|
- $(".showMoreCaseWriting").on("click",function(){
|
|
|
+ $(".showMoreCaseWriting").off("click").on("click",function(){
|
|
|
$(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","none")
|
|
|
$(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","block")
|
|
|
})
|
|
|
- $(".showLessCaseWriting").on("click",function(){
|
|
|
+ $(".showLessCaseWriting").off("click").on("click",function(){
|
|
|
$(this).parents(".casewritingWrapper ").find(".shortStrBox").css("display","block")
|
|
|
$(this).parents(".casewritingWrapper ").find(".longStrBox").css("display","none")
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
+//显示空状态
|
|
|
function empty(){
|
|
|
- // $(".responsibility").css("display","none")
|
|
|
- $('.recommendWrap .empty').css("display","block")
|
|
|
+ setTimeout(function(){
|
|
|
+ ifInputParam = hasInputParam();
|
|
|
+ if(!ifInputParam){ //没有输入数据时
|
|
|
+ $(".recommendBox .empty-box").hide();
|
|
|
+ $(".recommendBox .empty").show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ 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(){
|
|
|
+ //隐藏logo
|
|
|
+ if(getUrlArgObject("hideLg")){
|
|
|
+ $(".disclaimer .logo").hide();
|
|
|
+ }
|
|
|
getDisclaimer(); //获取免责声明
|
|
|
getVersion(); //获取版本信息
|
|
|
$(".disclaimerInfo").on("click", function(){
|
|
@@ -781,19 +837,8 @@ $(function(){
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- });
|
|
|
- // $(".iframeWrap").preventScroll();
|
|
|
- $(".iframeWrap").preventScroll();
|
|
|
- $(".recommendWrap").preventScroll();
|
|
|
- $(".tcmWarp").preventScroll();
|
|
|
- $(".infoWrap").preventScroll();
|
|
|
- $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
|
|
|
+ });
|
|
|
$(window).on("resize", function(){
|
|
|
- $(".iframeWrap").preventScroll();
|
|
|
- $(".recommendWrap").preventScroll();
|
|
|
- $(".tcmWarp").preventScroll();
|
|
|
-
|
|
|
- $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();
|
|
|
adjustHei()
|
|
|
})
|
|
|
});
|