Browse Source

调试table宽度

ellisran 7 months ago
parent
commit
dbbd11cb8a

+ 11 - 0
app/public/js/tender_list_base.js

@@ -362,6 +362,17 @@ $(document).ready(() => {
     bindTenderUrl();
     localHideList();
     tenderTreeShowLevel.initShowLevel();
+    if ($("#progress-table").length > 0) {
+        $("#progress-table").colResizable({
+            liveDrag: true,
+            gripInnerHtml:"<div class='grip'></div>",
+            draggingClass:"dragging",
+            resizeMode:'fit',
+            postbackSafe:true,
+            partialRefresh:true,
+            // headerOnly: true,
+        });
+    }
     // 分类
     $('#cate-set').on('show.bs.modal', function () {
         createTree('treeLevel');

+ 3 - 2
app/public/js/tender_list_progress.js

@@ -113,8 +113,9 @@ const tenderListSpec = (function(){
     }
     function getTenderTreeHeaderHtml() {
         const html = [];
-        html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
+        html.push('<table class="table table-hover table-bordered" id="progress-table">');
+        html.push('<thead style="position: sticky;left:56px;top: 0px;">', '<tr>');
+        // html.push('<thead style="left:56px;top: 34px;">', '<tr>');
         html.push('<th style="width: 30%;min-width: 300px" class="text-center">', '标段名称', '</th>');
         html.push('<th class="text-center" style="width: 120px">', '计量进度', '</th>');
         html.push('<th class="text-center" style="width: 230px">', '当前流程', '</th>');

+ 3 - 1
app/public/js/tender_showhide.js

@@ -142,7 +142,9 @@ function setTopTr() {
             }
         }
     }
-    $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
+    if ($("#progress-table").length === 0) {
+        $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
+    }
 }
 
 function doTrStatus(node, status, all = '') {

+ 1 - 0
config/web.js

@@ -85,6 +85,7 @@ const JsFiles = {
                 mergeFiles: [
                     '/public/js/zh_calc.js',
                     '/public/js/PinYinOrder.bundle.js',
+                    '/public/js/colResizable/colResizable-1.6.min.js',
                     '/public/js/shares/tender_list_order.js',
                     '/public/js/shares/show_level.js',
                     '/public/js/tender_showhide.js',