|
@@ -158,14 +158,13 @@ function renderTab(tabList) {
|
|
|
for (let i = 0; i < tabList.length; i++) {
|
|
|
if (tabList[i].status == '1') {
|
|
|
TabNum++
|
|
|
- tabStr += `<span class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span><span class="activeLine"></span></span>`
|
|
|
+ tabStr += `<div class="tab" data-name="${tabList[i].code}" ><span class="tabName">${tabList[i].name}</span></div>`
|
|
|
}
|
|
|
|
|
|
}
|
|
|
$(".tabList").append(tabStr)
|
|
|
$(".tabList .tab").eq(0).addClass("activeTab")
|
|
|
$(".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])
|
|
@@ -242,9 +241,7 @@ 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])
|
|
|
})
|
|
@@ -332,14 +329,15 @@ function renderPushData() {
|
|
|
$(".leftWrapper").css({"width":'0','padding':'0'});
|
|
|
$(".rightWrapper").css("width",'100%');
|
|
|
}
|
|
|
- } else {
|
|
|
+ } else if($(".leftWrapper .moduleItem:visible").length!==0) {console.log(2)
|
|
|
$(".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 && $(".moduleItem.nurse").length === 0)) {
|
|
|
+ if ($(".moduleItem.general,.moduleItem.medicine,.moduleItem.operation,.moduleItem.nurse").length === 0&&$(".leftWrapper .moduleItem:visible").length!==0) {
|
|
|
+ console.log(3)
|
|
|
$(".rightWrapper").css("display", "none")
|
|
|
$(".empty-box").hide();
|
|
|
$(".leftWrapper").css({
|
|
@@ -362,8 +360,8 @@ function renderPushData() {
|
|
|
})
|
|
|
}
|
|
|
function empty(){ //显示空状态
|
|
|
- setTimeout(function(){
|
|
|
- if(!$(".rightWrapper .rightBoxTitle").html()){
|
|
|
+ setTimeout(function(){console.log(!$(".rightWrapper .rightBoxTitle").html(),$(".leftWrapper .moduleItem:visible").length===0)
|
|
|
+ if((!$(".rightWrapper .rightBoxTitle").html())&&$(".leftWrapper .moduleItem:visible").length!==0){console.log(4)
|
|
|
$(".leftWrapper").css({
|
|
|
borderRight: "0px",
|
|
|
width: "100%"
|
|
@@ -664,7 +662,7 @@ function bindSlide() {
|
|
|
longBox.css("display", "block")
|
|
|
let location = longBox.attr("data-location")
|
|
|
let scrollTop = getLongTop(location)
|
|
|
- const n = -10 + Number(scrollTop)>-1?(-10 + Number(scrollTop)):0;
|
|
|
+ const n = Number(scrollTop)-2>-1?Number(scrollTop)-2:0;
|
|
|
longBox.css("top", n + "px")
|
|
|
})
|
|
|
$(".showLess").off("click").on("click", function () {
|
|
@@ -751,7 +749,7 @@ function addScrollEvent() {
|
|
|
|
|
|
if ($(".leftWrapper .longStrBox:visible").length) {
|
|
|
const n = Number(getLongTop("left")) -10>-1?(Number(getLongTop("left")) -10):0;
|
|
|
- $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) -10 + "px")
|
|
|
+ $(".leftWrapper .longStrBox:visible").css("top", Number(getLongTop("left")) -2 + "px")
|
|
|
}
|
|
|
}, 100));
|
|
|
$(`.rightWrapper`).off("scroll").scroll(throttle(function () {
|