|
@@ -10,8 +10,8 @@ const $ = require("jquery");
|
|
|
require('./../css/reset.css');
|
|
|
require('./../css/cdssHorizontal.less');
|
|
|
require('./../css/popup.css');
|
|
|
-require('./../css/staticSearch.css')
|
|
|
-require('./../js/staticSearch.js')
|
|
|
+require('../css/staticSearch.less')
|
|
|
+require('./../js/staticSearch.js');//静态知识搜索
|
|
|
require('./../images/empty2.png').replace(/^undefined/g, '')
|
|
|
require('./../images/dn.png').replace(/^undefined/g, '')
|
|
|
require('./../images/loading.gif').replace(/^undefined/g, '')
|
|
@@ -29,7 +29,6 @@ let generalTreatInfo
|
|
|
const { renderFollowUp } = require('./followUp.js');
|
|
|
const { getTcmMr } = require('./tcmiss.js');
|
|
|
|
|
|
-setWidth()
|
|
|
let moduleConfig = {
|
|
|
auxiliary: "recommendWrap",
|
|
|
qc: "qcWrap",
|
|
@@ -106,9 +105,31 @@ function renderPage(pageSet) {
|
|
|
const hasFollowUp = hasTab("随访计划", pageSet.sysSetInfo)
|
|
|
const hasTcm = hasTab("中医辅助", pageSet.sysSetInfo)
|
|
|
|
|
|
+ //所有模块都未开启配置,显示功能未开启(无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>`
|
|
|
+ $(".recommendWrap").html(nullTxt).show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (hasTcm) {
|
|
|
getTcmMr(mrId, hasTcm);
|
|
|
}
|
|
|
+
|
|
|
+ if (hasFollowUp) {
|
|
|
+ renderFollowUp(msg, 1)
|
|
|
+ }
|
|
|
+ const planDetail = hasAuxiliary.planDetails;
|
|
|
+ const configs = planDetail.filter((it)=>it.status!==0)||[];
|
|
|
+ if(!configs[0]){ //没有开启辅助信息各项配置
|
|
|
+ $('.empty-box').hide();
|
|
|
+ $('.recommendWrap .empty-right').show();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //有数据再设置宽度
|
|
|
+ //setWidth()
|
|
|
if (hasAuxiliary) {
|
|
|
renderModuleWrapper(hasAuxiliary.planDetails)
|
|
|
let needPush = isNeedPush(hasAuxiliary.planDetails)
|
|
@@ -126,9 +147,6 @@ function renderPage(pageSet) {
|
|
|
renderCaseWrite()
|
|
|
allInterface++
|
|
|
}
|
|
|
- if (hasFollowUp) {
|
|
|
- renderFollowUp(msg, 1)
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
function renderTab(tabList) {
|
|
@@ -140,17 +158,19 @@ function renderTab(tabList) {
|
|
|
for (let i = 0; i < tabList.length; i++) {
|
|
|
if (tabList[i].status == '1') {
|
|
|
TabNum++
|
|
|
- tabStr += `<span class="tab" style="border-bottom:${tabList.length == i + 1 ? '0' : '1px solid #3B9ED0'}" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span><span class="activeLine"></span></span>`
|
|
|
+ tabStr += `<span class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span><span class="activeLine"></span></span>`
|
|
|
}
|
|
|
|
|
|
}
|
|
|
$(".tabList").append(tabStr)
|
|
|
$(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
- $(".tabList .tab").css("height", 1 / TabNum * 100 + '%')
|
|
|
+ $(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
+ $(".tabList .tab .activeLine").eq(0).css({ display: "block" })
|
|
|
+ // $(".tabList .tab").css("height", 1 / TabNum * 100 + '%')
|
|
|
let showModuleName = $(".tabList .tab").eq(0).attr("data-name")
|
|
|
getModuleShow(moduleConfig[showModuleName])
|
|
|
bindTabClick()
|
|
|
- setTabNameTop()
|
|
|
+ //setTabNameTop()
|
|
|
}
|
|
|
function hasTab(tabName, tabList) {
|
|
|
for (let i = 0; i < tabList.length; i++) {
|
|
@@ -181,9 +201,13 @@ function renderModuleWrapper(moduleList) {
|
|
|
}
|
|
|
$(".recommendWrap .leftBox").append(moduleStr)
|
|
|
$(".recommendWrap .rightBox").append(treatStr)
|
|
|
+ /*if($(".moduleItem:visible").length===0){
|
|
|
+ $(".empty-null").show();
|
|
|
+ }*/
|
|
|
+
|
|
|
}
|
|
|
function isNeedPush(list) {
|
|
|
- let pushCode = ["diag", "lis", "pacs", "symptom", "vital"]
|
|
|
+ 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") {
|
|
@@ -196,7 +220,7 @@ function isNeedPush(list) {
|
|
|
function isNeedPushWarning(list) {
|
|
|
let pushCode = ["crivalue", "rationali", "highrisk", "otherremind"]
|
|
|
for (let i = 0; i < list.length; i++) {
|
|
|
- if (pushCode.indexOf(list[i].code) > -1) {
|
|
|
+ if (pushCode.indexOf(list[i].code.trim()) > -1) {
|
|
|
if (list[i].status == "1") {
|
|
|
return true
|
|
|
}
|
|
@@ -218,7 +242,9 @@ function isNeedwriteStandardPush(list) {
|
|
|
function bindTabClick() {
|
|
|
$(".tabList .tab").on("click", function () {
|
|
|
$(".activeTab").removeClass("activeTab")
|
|
|
+ $(".tabList .tab .activeLine").css({ display: "none" })
|
|
|
$(this).addClass("activeTab")
|
|
|
+ $(this).find('.activeLine').css({ display: "block" })
|
|
|
const moduleName = $(this).attr("data-name")
|
|
|
getModuleShow(moduleConfig[moduleName])
|
|
|
})
|
|
@@ -227,13 +253,14 @@ function getModuleShow(moduleClassName) {
|
|
|
if ($(`.${moduleClassName}`).css("display") == "none") {
|
|
|
$(".moduleWrapper").css("display", "none")
|
|
|
$(`.${moduleClassName}`).css("display", "block")
|
|
|
+ //empty();
|
|
|
}
|
|
|
}
|
|
|
function setTabNameTop() {
|
|
|
- tabNameList = $(".tabList .tab .tabName")
|
|
|
+ const tabNameList = $(".tabList .tab .tabName")
|
|
|
for (let i = 0; i < tabNameList.length; i++) {
|
|
|
let tabNameHei = $(".tabList .tab .tabName").eq(i).height()
|
|
|
- $(".tabList .tab .tabName").eq(i).css("marginTop", -tabNameHei / 2 + "px")
|
|
|
+ // $(".tabList .tab .tabName").eq(i).css("marginTop", -tabNameHei / 2 + "px")
|
|
|
}
|
|
|
}
|
|
|
function renderCaseWrite() {
|
|
@@ -253,9 +280,12 @@ function renderCaseWrite() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }).catch(()=>{
|
|
|
+ $(".loading").hide()
|
|
|
})
|
|
|
}
|
|
|
function renderPushData() {
|
|
|
+ $(".loading").show()
|
|
|
return getPushInfo().then(res => {
|
|
|
hasCompleteTnterface++
|
|
|
if (res.data.code == "0") {
|
|
@@ -286,26 +316,32 @@ function renderPushData() {
|
|
|
let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
|
|
|
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)
|
|
|
if (medicinesPush.length > 0 || operationsPush.length > 0 || generaTreatPush || nursePush.length > 0) {
|
|
|
let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
|
|
|
$(".rightBoxTitle").append(str)
|
|
|
renderDisName()
|
|
|
- $(".rightWrapper").css("display", "inline-block")
|
|
|
- $(".leftWrapper").css("borderRight", "1px solid #E6E6E6")
|
|
|
+ $(".empty-box").hide();
|
|
|
+ $(".rightWrapper").css("display", "block")
|
|
|
+ if($(".leftBox .moduleItem:visible").length===0){ //左侧没有数据,右侧有数据时,右侧往左移
|
|
|
+ $(".leftWrapper").css({"width":'0','padding':'0'});
|
|
|
+ $(".rightWrapper").css("width",'100%');
|
|
|
+ }
|
|
|
} else {
|
|
|
+ $(".empty-box").hide();
|
|
|
$(".leftWrapper").css({
|
|
|
borderRight: "0px",
|
|
|
width: "100%"
|
|
|
})
|
|
|
}
|
|
|
- if ((!$(".moduleItem.medicine") && !$(".moduleItem.operation") && !(".moduleItem.general")) || ($(".moduleItem.general").length === 0 && $(".moduleItem.medicine").length === 0 && $(".moduleItem.operation").length === 0)) {
|
|
|
+ if ((!$(".moduleItem.medicine") && !$(".moduleItem.operation") && !(".moduleItem.general")) || ($(".moduleItem.general").length === 0 && $(".moduleItem.medicine").length === 0 && $(".moduleItem.operation").length === 0 && $(".moduleItem.nurse").length === 0)) {
|
|
|
$(".rightWrapper").css("display", "none")
|
|
|
+ $(".empty-box").hide();
|
|
|
$(".leftWrapper").css({
|
|
|
borderRight: "0px",
|
|
|
width: "100%"
|
|
@@ -313,37 +349,47 @@ function renderPushData() {
|
|
|
}
|
|
|
|
|
|
rendergeneraTreatPush(generaTreatPush)
|
|
|
- renderMedicinesPush(medicinesPush, medicinesNum, 2, true)
|
|
|
- renderOperationPush(operationsPush, operationsNum, 6, true)
|
|
|
- renderNurse(nursePush, nurseNum, 9, true)
|
|
|
- // if(hasCompleteTnterface === allInterface){
|
|
|
- // $('.loading').css("display","none")
|
|
|
- // if(moduleNum === 0){
|
|
|
- // empty()
|
|
|
- // }
|
|
|
- // }icon
|
|
|
+ renderMedicinesPush(medicinesPush, medicinesNum)
|
|
|
+ renderOperationPush(operationsPush, operationsNum)
|
|
|
+ renderNurse(nursePush, nurseNum)
|
|
|
bindOpenInfo()
|
|
|
bindSlide()
|
|
|
moreInfo()
|
|
|
+ empty()
|
|
|
}
|
|
|
+ }).catch(()=>{
|
|
|
+ $(".loading").hide()
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-function renderLis(list, showNum, type, hasInfo) {
|
|
|
+function empty(){ //显示空状态
|
|
|
+ setTimeout(function(){
|
|
|
+ if(!$(".rightWrapper .rightBoxTitle").html()){
|
|
|
+ $(".leftWrapper").css({
|
|
|
+ borderRight: "0px",
|
|
|
+ width: "100%"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if($(".tabList .tab:first-child").is(".activeTab")&&$(".empty-right:visible").length===0&&$(".moduleItem:visible").length===0){
|
|
|
+ $(".empty-box").hide();
|
|
|
+ $(".empty-null").show();
|
|
|
+ }
|
|
|
+ },300);
|
|
|
+}
|
|
|
+function renderLis(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.lis").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.lis .moduleItemTitBox').append(titleStr("lisPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$('.moduleItem.lis').append(shortStr)
|
|
|
$('.moduleItem.lis').append(renderLongStr(titleConfigH["lisPush"].name, longStr, titleConfigH["lisPush"].location))
|
|
|
$('.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 .moduleItemTitBox').append(titleStr("scalePush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$('.moduleItem.evaluation').append(shortStr)
|
|
|
$('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
|
|
|
$('.moduleItem.evaluation').css("display", "block")
|
|
@@ -352,55 +398,55 @@ function renderScale(list, showNum, type, hasInfo) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function renderNurse(list, showNum, type, hasInfo) {
|
|
|
+function renderNurse(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.nurse").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.nurse .moduleItemTitBox').append(titleStr("nursePush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.nurse").append(shortStr)
|
|
|
$(".moduleItem.nurse").append(renderLongStr(titleConfigH["nursePush"].name, longStr, titleConfigH["nursePush"].location))
|
|
|
$(".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 .moduleItemTitBox').append(titleStr("pacsPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.pacs").append(shortStr)
|
|
|
$(".moduleItem.pacs").append(renderLongStr(titleConfigH["pacsPush"].name, longStr, titleConfigH["pacsPush"].location))
|
|
|
$('.moduleItem.pacs').css("display", "block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderSymptomPush(list, showNum, type, hasInfo) {
|
|
|
+function renderSymptomPush(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.symptom").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.symptom .moduleItemTitBox').append(titleStr("symptomPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.symptom").append(shortStr)
|
|
|
$(".moduleItem.symptom").append(renderLongStr(titleConfigH["symptomPush"].name, longStr, titleConfigH["symptomPush"].location))
|
|
|
$('.moduleItem.symptom').css("display", "block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderMedicinesPush(list, showNum, type, hasInfo) {
|
|
|
+function renderMedicinesPush(list, showNum) {
|
|
|
|
|
|
if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.medicine .moduleItemTitBox').append(titleStr("drugPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.medicine").append(shortStr)
|
|
|
$(".moduleItem.medicine").append(renderLongStr(titleConfigH["drugPush"].name, longStr, titleConfigH["drugPush"].location))
|
|
|
$(".moduleItem.medicine").css("display", "block")
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-function renderOperationPush(list, showNum, type, hasInfo) {
|
|
|
+function renderOperationPush(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.operation").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.operation .moduleItemTitBox').append(titleStr("operationPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.operation").append(shortStr)
|
|
|
$(".moduleItem.operation").append(renderLongStr(titleConfigH["operationPush"].name, longStr, titleConfigH["operationPush"].location))
|
|
|
$(".moduleItem.operation").css("display", "block")
|
|
@@ -430,11 +476,11 @@ function rendergeneraTreatPush(list) {
|
|
|
$(".moduleItem.general").css("display", "block")
|
|
|
}
|
|
|
}
|
|
|
-function renderCheckup(list, showNum, type, hasInfo) {
|
|
|
+function renderCheckup(list, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.vital").length > 0) {
|
|
|
moduleNum++
|
|
|
$(".moduleItem.vital .moduleItemTitBox").append(titleStr("checkupPush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, type, hasInfo)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$(".moduleItem.vital").append(shortStr)
|
|
|
$(".moduleItem.vital").append(renderLongStr(titleConfigH["checkupPush"].name, longStr, titleConfigH["checkupPush"].location))
|
|
|
$('.moduleItem.vital').css("display", "block")
|
|
@@ -442,18 +488,15 @@ function renderCheckup(list, showNum, type, hasInfo) {
|
|
|
}
|
|
|
function renderDiag(diagPush) {
|
|
|
let possibleDiagPush = diagPush["可能诊断"] || []
|
|
|
- let firstDiagPush = diagPush["初步诊断"] || []
|
|
|
+ let firstDiagPush = diagPush["既往诊断"] || []
|
|
|
let identifyDiagPush = diagPush["鉴别诊断"] || []
|
|
|
let warningDiagPush = diagPush["警惕"] || []
|
|
|
let number = $('.moduleItem.diag').attr("data-num") || 5
|
|
|
let warnNumber = $('.moduleItem.warning').attr("data-num") || 5
|
|
|
|
|
|
$('.moduleItem.diag .moduleItemTitBox').append(titleStr("diagPush"))
|
|
|
- // let warningDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
- // let firstDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
- // let identifyDiagPush = diagPush["鉴别诊断"] || [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
|
|
|
renderDiagItem(possibleDiagPush, "可能诊断", number)
|
|
|
- renderDiagItem(firstDiagPush, "初步诊断", number)
|
|
|
+ renderDiagItem(firstDiagPush, "既往诊断", number)
|
|
|
renderDiagItem(identifyDiagPush, "鉴别诊断", number)
|
|
|
renderWarningDiag(warningDiagPush, "警惕", 1000)
|
|
|
moreInfo()
|
|
@@ -463,7 +506,7 @@ function renderDiagItem(list, name, number) {
|
|
|
return
|
|
|
}
|
|
|
let titleStr = `<span class="moduleBoxName">${name}</span>`
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, number, 1, true)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, number)
|
|
|
let boxStr = `<div class="moduleBox">
|
|
|
${titleStr}
|
|
|
${shortStr}
|
|
@@ -476,7 +519,7 @@ function renderWarningDiag(list, name, showNum) {
|
|
|
if (list.length > 0 && $(".moduleItem.warning").length > 0) {
|
|
|
moduleNum++
|
|
|
$('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
|
|
|
- let { shortStr, longStr } = renderItemWrapper(list, showNum, 1, true)
|
|
|
+ let { shortStr, longStr } = renderItemWrapper(list, showNum)
|
|
|
$('.moduleItem.warning').append(shortStr)
|
|
|
$('.moduleItem.warning').css("display", "block")
|
|
|
}
|
|
@@ -492,6 +535,7 @@ function renderwriteStandardPage(list) {
|
|
|
$(".moduleItem.casewriting").append(str)
|
|
|
$('.moduleItem.casewriting').css("display", "block")
|
|
|
}
|
|
|
+ empty()
|
|
|
}
|
|
|
function renderPushWarning() {
|
|
|
return getPusgWarning().then(res => {
|
|
@@ -515,8 +559,8 @@ function renderPushWarning() {
|
|
|
moreInfo()
|
|
|
const hasTipsNum = $(".moduleItem.tips").length;
|
|
|
if (hasTipsNum) {
|
|
|
- let tipsHei = $(".tips-cont")[0].scrollHeight;
|
|
|
- if (tipsHei > 81) {
|
|
|
+ let tipNum = $(".tips-cont .billingPushItem").length;
|
|
|
+ if (tipNum > 3) {
|
|
|
$(".tips-cont").append(`<span class="showMoreNewPage">更多</span>`)
|
|
|
tipsMsg = result
|
|
|
showMoreNewPage()
|
|
@@ -528,11 +572,14 @@ function renderPushWarning() {
|
|
|
}
|
|
|
if (hasCompleteTnterface === allInterface) {
|
|
|
$('.loading').css("display", "none")
|
|
|
- if (moduleNum === 0) {//console.log(999)
|
|
|
- // empty()
|
|
|
- }
|
|
|
+ /*if (moduleNum === 0) {//console.log(999)
|
|
|
+ empty()
|
|
|
+ }*/
|
|
|
}
|
|
|
+ empty()
|
|
|
|
|
|
+ }).catch(()=>{
|
|
|
+ $(".loading").hide()
|
|
|
})
|
|
|
}
|
|
|
function renderBillingPush(list, name, code) {
|
|
@@ -565,14 +612,14 @@ function renderLongStr(name, longStr, location) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function renderItemWrapper(list, showNum, type, hasInfo) {
|
|
|
+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) {
|
|
@@ -589,9 +636,9 @@ function renderItemWrapper(list, showNum, type, hasInfo) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-function renderPushItem(item, type) {
|
|
|
- str = `<span class="pushItemBox" data-name="${item.name}" data-type="${type}">`
|
|
|
- str += `${item.hasScale == "0" ? `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
|
|
|
+function renderPushItem(item) {
|
|
|
+ str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
|
|
|
+ str += `${item.hasScale == "0" ? `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : item.hasScale == "1" ? `<span class="pushItemName evaluationtitle">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>` : `<span class="pushItemName">${item.type == 8 ? ('【' + item.name + '】') : item.name}</span>`}`
|
|
|
str += `${item.hasInfo == "1" ? `<img class="infoImg" src="${infoImg}">` : ""}`
|
|
|
str += '</span >'
|
|
|
return str
|
|
@@ -611,14 +658,16 @@ function titleStr(type) {
|
|
|
return titleStr
|
|
|
}
|
|
|
function bindSlide() {
|
|
|
- $(".showMore").on("click", function () {
|
|
|
+ $(".showMore").off("click").on("click", function () {
|
|
|
+ const longBox = $(this).parent().next().length?$(this).parent().next():$(this).parent().parent().next();
|
|
|
$(".longStrBox").css("display", "none")
|
|
|
- $(this).parents(".moduleItem ").find(".longStrBox").css("display", "block")
|
|
|
- let location = $(this).parents(".moduleItem ").find(".longStrBox").attr("data-location")
|
|
|
+ longBox.css("display", "block")
|
|
|
+ let location = longBox.attr("data-location")
|
|
|
let scrollTop = getLongTop(location)
|
|
|
- $(this).parents(".moduleItem ").find(".longStrBox").css("top", 5 + Number(scrollTop) + "px")
|
|
|
+ const n = -10 + Number(scrollTop)>-1?(-10 + Number(scrollTop)):0;
|
|
|
+ longBox.css("top", n + "px")
|
|
|
})
|
|
|
- $(".showLess").on("click", function () {
|
|
|
+ $(".showLess").off("click").on("click", function () {
|
|
|
$(this).parent().parent().css("display", "none")
|
|
|
})
|
|
|
addScrollEvent()
|
|
@@ -641,10 +690,10 @@ function bindGeneralSlide() {
|
|
|
openNewWin(`generalTreat.html?disName=${treatDisName}&name=${treatUniqueName}`)
|
|
|
})
|
|
|
}
|
|
|
-function setWidth() {
|
|
|
+/*function setWidth() {
|
|
|
let winWidth = $(".bodyWrap").css("width")
|
|
|
$(".contentBox").css("width", winWidth)
|
|
|
-}
|
|
|
+}*/
|
|
|
|
|
|
//医学知识搜索
|
|
|
searchMedical()
|
|
@@ -660,15 +709,13 @@ function moreInfo() {
|
|
|
openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
|
|
|
})
|
|
|
$('.evaluationtitle').off("click").click(function () {
|
|
|
- console.log(11)
|
|
|
const name = $(this).parent().attr('data-name')
|
|
|
const type = $(this).parent().attr('data-type')
|
|
|
- console.log(name)
|
|
|
openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1&gauge=gauge`)
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-function pushItemName(){
|
|
|
+function pushItemName() {
|
|
|
$('.pushItemName').off("click").click(function () {
|
|
|
console.log(11)
|
|
|
const name = $(this).parent().attr('data-name')
|
|
@@ -703,12 +750,14 @@ function addScrollEvent() {
|
|
|
$(`.leftWrapper`).off("scroll").scroll(throttle(function () {
|
|
|
|
|
|
if ($(".leftWrapper .longStrBox:visible").length) {
|
|
|
- $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) + 5 + "px")
|
|
|
+ const n = Number(getLongTop("left")) -10>-1?(Number(getLongTop("left")) -10):0;
|
|
|
+ $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) -10 + "px")
|
|
|
}
|
|
|
}, 100));
|
|
|
$(`.rightWrapper`).off("scroll").scroll(throttle(function () {
|
|
|
if ($(".rightWrapper .longStrBox:visible").css("display") === "block") {
|
|
|
- $(".rightWrapper .longStrBox:visible").css("top", Number(getLongTop("right")) + 5 + "px")
|
|
|
+ const n = Number(getLongTop("right"))>-1?(Number(getLongTop("right"))):0;
|
|
|
+ $(".rightWrapper .longStrBox:visible").css("top", n + "px")
|
|
|
}
|
|
|
}, 100));
|
|
|
}
|
|
@@ -717,9 +766,6 @@ $(function () {//隐藏logo
|
|
|
$(".versionTop .logoTxt").hide();
|
|
|
}
|
|
|
getVersion()
|
|
|
- $(window).on("resize", function () {
|
|
|
- setWidth()
|
|
|
- })
|
|
|
$(".versionTop").on("click", function () {
|
|
|
openNewWin("disclaimer.html")
|
|
|
});
|