告警中心的搜索条件过多时,展开和收起功能调整 #1
Showing
5 changed files
with
44 additions
and
17 deletions
@@ -3839,6 +3839,8 @@ grayColor { | @@ -3839,6 +3839,8 @@ grayColor { | ||
3839 | background-color: #f1f1f1; | 3839 | background-color: #f1f1f1; |
3840 | /*lsq 活动告警列表卡片样式调整 2022-06-21*/ | 3840 | /*lsq 活动告警列表卡片样式调整 2022-06-21*/ |
3841 | min-height: 74px; | 3841 | min-height: 74px; |
3842 | + z-index: 99; | ||
3843 | + position: relative; | ||
3842 | } | 3844 | } |
3843 | 3845 | ||
3844 | .warn-count-item { | 3846 | .warn-count-item { |
@@ -8307,12 +8309,15 @@ form[lay-filter="activewarning-form"], form[lay-filter="historywarning-form"] { | @@ -8307,12 +8309,15 @@ form[lay-filter="activewarning-form"], form[lay-filter="historywarning-form"] { | ||
8307 | margin-right: 6px; | 8309 | margin-right: 6px; |
8308 | } | 8310 | } |
8309 | 8311 | ||
8310 | -#openStow, #openStowHis { | 8312 | +.openStow { |
8311 | color: #1E9FFF; | 8313 | color: #1E9FFF; |
8312 | cursor: pointer; | 8314 | cursor: pointer; |
8313 | line-height: 50px; | 8315 | line-height: 50px; |
8316 | + width:45px; | ||
8317 | +} | ||
8318 | +.form-item-open-stow{ | ||
8319 | + flex:1; | ||
8314 | } | 8320 | } |
8315 | - | ||
8316 | #noticeSearchQueryBtn, #seachNoticemerge { | 8321 | #noticeSearchQueryBtn, #seachNoticemerge { |
8317 | margin-top: -3px; | 8322 | margin-top: -3px; |
8318 | } | 8323 | } |
@@ -1286,24 +1286,25 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -1286,24 +1286,25 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
1286 | } | 1286 | } |
1287 | 1287 | ||
1288 | //start lsq 活动告警搜索条件太多,增加展开/收起的功能 2022-06-21 | 1288 | //start lsq 活动告警搜索条件太多,增加展开/收起的功能 2022-06-21 |
1289 | - let formWidth = $('form[lay-filter="activewarning-form"] .layui-form-item').width(); | ||
1290 | - let winWidth = $('form[lay-filter="historywarning-form"]').parent().parent('.layui-card-header').width(); | ||
1291 | - if (formWidth + 100 > winWidth) { | ||
1292 | - $('#openStow').css('display', 'inline-block') | ||
1293 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('width', (formWidth - 50) + 'px'); | ||
1294 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('height', '50px'); | 1289 | + let formWidth =sessionStorage.getItem('formWidth'); |
1290 | + if(!formWidth){ | ||
1291 | + formWidth= $('.form-item-open-stow').width(); | ||
1292 | + sessionStorage.setItem('formWidth',formWidth) | ||
1293 | + } | ||
1294 | + let winWidth = $('.form-item-open-stow').parents('.layui-card-header').width(); | ||
1295 | + if (formWidth + 120 > winWidth) { | ||
1296 | + $('.openStow').css('display', 'inline-block') | ||
1297 | + $('.form-item-open-stow').css('height', '50px'); | ||
1295 | } else { | 1298 | } else { |
1296 | - $('#openStow').css('display', 'none') | 1299 | + $('.openStow').css('display', 'none') |
1297 | } | 1300 | } |
1298 | - $("#openStow").unbind('click').on('click', function () { | 1301 | + $(".openStow").unbind('click').on('click', function () { |
1299 | if ($(this).text() == '展开') { | 1302 | if ($(this).text() == '展开') { |
1300 | $(this).text('收起') | 1303 | $(this).text('收起') |
1301 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('width', (formWidth - 50) + 'px'); | ||
1302 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('height', 'auto'); | 1304 | + $('.form-item-open-stow').css('height', 'auto'); |
1303 | } else { | 1305 | } else { |
1304 | $(this).text('展开') | 1306 | $(this).text('展开') |
1305 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('width', (formWidth - 50) + 'px'); | ||
1306 | - $('form[lay-filter="activewarning-form"] .form-item-open-stow').css('height', '50px'); | 1307 | + $('.form-item-open-stow').css('height', '50px'); |
1307 | } | 1308 | } |
1308 | }) | 1309 | }) |
1309 | //end lsq 2022-06-21 | 1310 | //end lsq 2022-06-21 |
@@ -792,7 +792,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -792,7 +792,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
792 | })(); | 792 | })(); |
793 | 793 | ||
794 | //start lsq 历史告警搜索条件太多,增加展开/收起的功能 2022-06-21 | 794 | //start lsq 历史告警搜索条件太多,增加展开/收起的功能 2022-06-21 |
795 | - let formWidth = $('form[lay-filter="historywarning-form"] .layui-form-item').width(); | 795 | + /*let formWidth = $('form[lay-filter="historywarning-form"] .layui-form-item').width(); |
796 | let winWidth = $('form[lay-filter="historywarning-form"]').parent().parent('.layui-card-header').width(); | 796 | let winWidth = $('form[lay-filter="historywarning-form"]').parent().parent('.layui-card-header').width(); |
797 | if (formWidth + 100 > winWidth) { | 797 | if (formWidth + 100 > winWidth) { |
798 | $('#openStowHis').css('display', 'inline-block') | 798 | $('#openStowHis').css('display', 'inline-block') |
@@ -812,6 +812,27 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | @@ -812,6 +812,27 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', | ||
812 | $('form[lay-filter="historywarning-form"] .form-item-open-stow').css('width', (formWidth - 50) + 'px'); | 812 | $('form[lay-filter="historywarning-form"] .form-item-open-stow').css('width', (formWidth - 50) + 'px'); |
813 | $('form[lay-filter="historywarning-form"] .form-item-open-stow').css('height', '50px'); | 813 | $('form[lay-filter="historywarning-form"] .form-item-open-stow').css('height', '50px'); |
814 | } | 814 | } |
815 | + })*/ | ||
816 | + let formWidth =sessionStorage.getItem('formWidth'); | ||
817 | + if(!formWidth){ | ||
818 | + formWidth= $('.form-item-open-stow').width(); | ||
819 | + sessionStorage.setItem('formWidth',formWidth) | ||
820 | + } | ||
821 | + let winWidth = $('.form-item-open-stow').parents('.layui-card-header').width(); | ||
822 | + if (formWidth + 120 > winWidth) { | ||
823 | + $('.openStow').css('display', 'inline-block') | ||
824 | + $('.form-item-open-stow').css('height', '50px'); | ||
825 | + } else { | ||
826 | + $('.openStow').css('display', 'none') | ||
827 | + } | ||
828 | + $(".openStow").unbind('click').on('click', function () { | ||
829 | + if ($(this).text() == '展开') { | ||
830 | + $(this).text('收起') | ||
831 | + $('.form-item-open-stow').css('height', 'auto'); | ||
832 | + } else { | ||
833 | + $(this).text('展开') | ||
834 | + $('.form-item-open-stow').css('height', '50px'); | ||
835 | + } | ||
815 | }) | 836 | }) |
816 | //end lsq 2022-06-21 | 837 | //end lsq 2022-06-21 |
817 | }); | 838 | }); |
-
Please register or login to post a comment