Kaynağa Gözat

期计量右侧栏上下拖动功能

laiguoran 5 yıl önce
ebeveyn
işleme
80fcfea85c
3 değiştirilmiş dosya ile 42 ekleme ve 12 silme
  1. 11 12
      app/public/css/main.css
  2. 28 0
      app/public/js/stage.js
  3. 3 0
      app/view/stage/index.ejs

+ 11 - 12
app/public/css/main.css

@@ -80,23 +80,23 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 /*滚动条*/
 /* 滚动条 */
 /*水平滚动条的样式*/
-/*::-webkit-scrollbar-thumb:horizontal { 
+/*::-webkit-scrollbar-thumb:horizontal {
 	width: 5px;
 	background-color: #e9ecef;
 	-webkit-border-radius: 0;
 }*/
 /*滚动条的背景颜色,滚动条的圆角宽度*/
 /*::-webkit-scrollbar-track-piece {
-	background-color: #efefef; 
-	-webkit-border-radius: 0; 
+	background-color: #efefef;
+	-webkit-border-radius: 0;
 }*/
 /*滚动条的宽度,滚动条的高度*/
 /*::-webkit-scrollbar {
-	width: 14px; 
-	height: 14px; 
+	width: 14px;
+	height: 14px;
 }*/
 /*垂直滚动条的样式*/
-/*::-webkit-scrollbar-thumb:vertical { 
+/*::-webkit-scrollbar-thumb:vertical {
 	height: 50px;
 	background-color: #e9ecef;
 	-webkit-border-radius: 0;
@@ -105,7 +105,7 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 	border: 1px solid #ced4da;
 }*/
 /*滚动条的hover样式*/
-/*::-webkit-scrollbar-thumb:hover { 
+/*::-webkit-scrollbar-thumb:hover {
 	height: 50px;
 	background-color: #ced4da;
 	-webkit-border-radius: 0;
@@ -129,7 +129,6 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
 }
 .sjs-bottom{
   height:400px;
-  overflow-y: auto;
 }
 .sjs-bottom-2{
   height:360px;
@@ -673,7 +672,7 @@ input.nospin[type="number"]{-moz-appearance:textfield;}
   font-size: 14px
 }
 .bd-toc {
-  
+
     position: sticky;
     top:3rem;
     height: calc(100vh - 10rem);
@@ -828,7 +827,7 @@ body{
   line-height: 30px;
 }
 .panel-title > .title-main .btn.pull-right {
-    margin: 5px 0 0 0 
+    margin: 5px 0 0 0
 }
 .panel-content{
   padding-top:35px;
@@ -1049,6 +1048,6 @@ a.maintain-icon .fa{
     }
 }
 
-a.maintain-icon:hover .fa{ 
+a.maintain-icon:hover .fa{
     animation-iteration-count:0
-}
+}

+ 28 - 0
app/public/js/stage.js

@@ -1695,6 +1695,29 @@ $(document).ready(() => {
         }
     });
 
+    // 中间计量加载上下窗口resizer
+    $.divResizer({
+        select: '#zhongjian-spr',
+        callback: function () {
+            if (detail) {
+                detail.spread.refresh();
+            }
+        }
+    });
+
+    // 附件加载上下窗口resizer
+    $.divResizer({
+        select: '#file-spr',
+    });
+
+    // 变更令加载上下窗口resizer
+    $.divResizer({
+        select: '#change-spr',
+        callback: function () {
+            if (checkedChanges) checkedChanges.refresh();
+        }
+    });
+
     class Detail {
         constructor (obj) {
             const self = this;
@@ -2624,6 +2647,8 @@ $(document).ready(() => {
                 if (!detail) {
                     detail = new Detail($('#detail-spread'));
                     detail.spread.refresh();
+                } else {
+                    detail.spread.refresh();
                 }
             }
             if (tab.attr('content') === '#checked-change') {
@@ -2634,6 +2659,9 @@ $(document).ready(() => {
                         reloadObj: $('#refresh-cc'),
                     });
                     checkedChanges.refresh();
+                } else {
+                    $('#ccb-spread').height('400px');
+                    checkedChanges.refresh();
                 }
             }
             if (tab.attr('content') === '#error-list') {

+ 3 - 0
app/view/stage/index.ejs

@@ -110,6 +110,7 @@
                         <div class="sjs-height-5" id="detail-spread" style="overflow:hidden">
                         </div>
                         <div class="sjs-bottom">
+                            <div class="resize-y" id="zhongjian-spr" r-Type="height" div1=".sjs-height-5" div2=".sjs-bottom" title="调整大小"><!--调整上下高度条--></div>
                             <% if (!stage.readOnly) { %>
                             <legend class="sticky-top bg-white">
                                 <div class="d-flex justify-content-end mb-1">
@@ -266,6 +267,7 @@
                                 </div>
                             </div>
                             <div class="sjs-bottom">
+                                <div class="resize-y" id="file-spr" r-Type="height" div1=".sjs-height-3" div2=".sjs-bottom" title="调整大小"><!--调整上下高度条--></div>
                                 <br>
                                 <div class="tab-content" id="showAttachment" style="display: none" file-id="">
                                     <div class="sjs-bottom-2">
@@ -497,6 +499,7 @@
                         </div>
                         <div class="sjs-height-5" id="cc-spread" style="overflow:hidden">
                         </div>
+                        <div class="resize-y" id="change-spr" r-Type="height" div1="#cc-spread" div2=".sjs-bottom" title="调整大小"><!--调整上下高度条--></div>
                         <div class="sjs-bottom" id="ccb-spread">
                         </div>
                     </div>