Browse Source

定额库工作内容表格滚动条

zhongzewei 7 years ago
parent
commit
5ab31947f2

+ 6 - 6
web/maintain/billsGuidance_lib/html/zhiyin.html

@@ -35,12 +35,12 @@
                   <div class="main-content col-lg-4 p-" style="margin: 0; padding: 0;">
                     <div class="toolsbar px-1 d-flex justify-content-between">
                       <div class="tools-btn btn-group align-top">
-                        <a id="insert" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="插入"><i class="fa fa-reply-all" aria-hidden="true"></i> 插入</a>
-                        <a id="del" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="删除"><i class="fa fa-remove" aria-hidden="true"></i> 删除</a>
-                        <a id="upLevel" href="javascript:void(0);" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="升级"><i class="fa fa-arrow-left" aria-hidden="true"></i> 升级</a>
-                        <a id="downLevel" href="javascript:void(0);" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="降级"><i class="fa fa-arrow-right" aria-hidden="true"></i> 降级</a>
-                        <a id="downMove" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="下移"><i class="fa fa-arrow-down" aria-hidden="true"></i> 下移</a>
-                        <a id="upMove" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="上移"><i class="fa fa-arrow-up" aria-hidden="true"></i> 上移</a>
+                        <a id="insert" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-reply-all" aria-hidden="true"></i> 插入</a>
+                        <a id="del" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-remove" aria-hidden="true"></i> 删除</a>
+                        <a id="upLevel" href="javascript:void(0);" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-arrow-left" aria-hidden="true"></i> 升级</a>
+                        <a id="downLevel" href="javascript:void(0);" class="btn btn-sm disabled" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-arrow-right" aria-hidden="true"></i> 降级</a>
+                        <a id="downMove" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-arrow-down" aria-hidden="true"></i> 下移</a>
+                        <a id="upMove" href="javascript:void(0);" class="btn btn-sm" data-toggle="tooltip" data-placement="bottom" title=""><i class="fa fa-arrow-up" aria-hidden="true"></i> 上移</a>
                       </div>
                     </div>
                     <div id="guideItemSpread" class="main-data">

+ 4 - 0
web/maintain/bills_lib/html/tezheng.html

@@ -251,6 +251,8 @@
             myKey.enterKey(spread);
             TREE_SHEET_HELPER.loadSheetHeader(setting, spread.getActiveSheet());
             itemsAjax.getItemCharacter(billsLibId, function(datas){
+                spread.getActiveSheet().suspendPaint();
+                spread.getActiveSheet().setRowCount(datas.length + 10);
                 let len = datas.length;
                 for(var i=0; i<len; i++){
                     if(datas[0].id){
@@ -266,6 +268,8 @@
                         }
                     });
                 }
+                spread.getActiveSheet().resumePaint();
+                spread.getActiveSheet().resumeEvent();
                 //
                 var totalItems = createObj.newItems();
                 totalItems.loadItems(null, datas);

+ 8 - 0
web/maintain/ration_repository/js/global.js

@@ -13,6 +13,14 @@ function autoFlashHeight(){
     $(".main-data-top-fluid").height($(window).height()-headerHeight-bottomContentHeight-2);
     $(".main-data").height($(window).height()-headerHeight);
     $(".main-side .tab-content").height($(window).height()-headerHeight-38);
+    $('#partialBody').height($(window).height()-headerHeight-toolsBar - 60);
+    let partialWidth = $('#tablePartial').width();
+    $('#tablePartial').find('th:eq(0)').width(partialWidth * 0.06);
+    $('#tablePartial').find('th:eq(1)').width(partialWidth * 0.3);
+    $('#tablePartial').find('th:eq(2)').width(partialWidth * 0.64);
+    $('#partialBody').find('tr').find('td:eq(0)').width(partialWidth * 0.06);
+    $('#partialBody').find('tr').find('td:eq(1)').width(partialWidth * 0.3);
+    $('#partialBody').find('tr').find('td:eq(2)').width(partialWidth * 0.64);
 };
 $(window).resize(autoFlashHeight);
 /*全局自适应高度结束*/

+ 3 - 2
web/maintain/ration_repository/js/jobContent.js

@@ -73,8 +73,8 @@ let jobContentOprObj = {
     buildTablePartial: function (table, group) {
         let me = jobContentOprObj;
         table.empty();
-        let $thead = $("<thead><tr><th></th><th>编码</th><th>工作内容</th>/tr></thead>");
-        let $tbody = $("<tbody></tbody>");
+        let $thead = $("<thead><tr style='display: block'><th></th><th>编码</th><th>工作内容</th>/tr></thead>");
+        let $tbody = $("<tbody id='partialBody' style='display:block; overflow: auto;'></tbody>");
         let count = 1;
         for(let i = 0, len = group.length; i < len; i++){
             let $newTr = me.getNewTr($tbody, group[i].items, group[i].jobContent);
@@ -90,6 +90,7 @@ let jobContentOprObj = {
         $tbody.append($trEnd);
         table.append($thead);
         table.append($tbody);
+        autoFlashHeight();
     },
     //新增一行tr
     getNewTr: function (tbody, codes, jobContent) {