Browse Source

菜单展开收起bug

ellisran 4 months ago
parent
commit
8f8bdf4fcc

+ 1 - 1
app/public/js/construction_index.js

@@ -44,7 +44,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered">')
         html.push('<table class="table table-hover table-bordered">')
-        html.push('<thead style="position: fixed;left:'+ left +'px;top: 34px;" class="text-center">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;" class="text-center">', '<tr>');
         html.push('<th class="text-center" style="min-width: 300px;">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="min-width: 300px;">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 300px;">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');
         html.push('<th class="text-center" style="width: 300px;">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');
         if (is_admin) {
         if (is_admin) {

+ 1 - 1
app/public/js/contract_tender.js

@@ -68,7 +68,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered" id="progress-table">')
         html.push('<table class="table table-hover table-bordered" id="progress-table">')
-        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0px;" class="text-center">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;" class="text-center">', '<tr>');
         // html.push('<table class="table table-hover table-bordered">');
         // html.push('<table class="table table-hover table-bordered">');
         // html.push('<thead style="position: fixed;left:56px;top: 34px;" class="text-center">', '<tr>');
         // html.push('<thead style="position: fixed;left:56px;top: 34px;" class="text-center">', '<tr>');
         html.push('<th style="min-width: 200px" rowspan="2">', '标段名称', '</th>');
         html.push('<th style="min-width: 200px" rowspan="2">', '标段名称', '</th>');

+ 2 - 2
app/public/js/payment_index.js

@@ -111,7 +111,7 @@ $(function () {
         if (tenderTree.length > 0) {
         if (tenderTree.length > 0) {
             const html = [];
             const html = [];
             html.push('<table class="table table-hover table-bordered">');
             html.push('<table class="table table-hover table-bordered">');
-            html.push('<thead style="position: fixed;left:56px;top: 34px;">', '<tr>');
+            html.push('<thead style="position: sticky;left:56px;top: 0;">', '<tr>');
             html.push('<th class="text-center" style="width: 40%">', '名称', '</th>');
             html.push('<th class="text-center" style="width: 40%">', '名称', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建人', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建人', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建时间', '</th>');
             html.push('<th class="text-center" style="width: 15%">', '创建时间', '</th>');
@@ -302,7 +302,7 @@ $(function () {
         for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
         for(let item = 0; item < $(".c-body table>thead>tr>th").length; item ++) {
             $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:first").children('td').eq(item).outerWidth());
             $(".c-body table>thead>tr>th").eq(item).outerWidth($(".c-body table>tbody>tr:first").children('td').eq(item).outerWidth());
         }
         }
-        $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
+        // $('.c-body table').css('margin-top', $(".c-body table>thead").height() - 4);
         // $('.c-body table').css('margin-top', -2);
         // $('.c-body table').css('margin-top', -2);
     }
     }
 });
 });

+ 1 - 1
app/public/js/setting_manage.js

@@ -780,7 +780,7 @@ const tenderListSpec = (function(){
     function getTenderTreeHeaderHtml() {
     function getTenderTreeHeaderHtml() {
         const html = [];
         const html = [];
         html.push('<table class="table table-hover table-bordered">');
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead style="position: fixed;left:176px;top: 34px;">', '<tr>');
+        html.push('<thead style="position: sticky;left:176px;top: 0;">', '<tr>');
         html.push('<th class="text-center" style="width: 80%">', '标段名称', '</th>');
         html.push('<th class="text-center" style="width: 80%">', '标段名称', '</th>');
         html.push('<th class="text-center" style="width: 20%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 20%">', '创建人', '</th>');
         html.push('</tr>', '</thead>');
         html.push('</tr>', '</thead>');

+ 1 - 1
app/public/js/sub_menu.js

@@ -24,7 +24,7 @@
             setting.callback({mini: true});
             setting.callback({mini: true});
         };
         };
         const menuType = setting.key ? getLocalCache(setting.key) : null;
         const menuType = setting.key ? getLocalCache(setting.key) : null;
-        if (menuType && menuType === 'miniMenu' && setting.forceMini) {
+        if ((menuType && menuType === 'miniMenu') || setting.forceMini) {
             showMiniMenu();
             showMiniMenu();
         } else {
         } else {
             showMenu();
             showMenu();

+ 1 - 1
app/public/js/tender_list.js

@@ -3,7 +3,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered">');
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead style="position: fixed;left:'+ left +'px;top: 34px;">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;">', '<tr>');
         html.push('<th class="text-center" style="width: 40%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 40%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 9%">', '计量模式', '</th>');
         html.push('<th class="text-center" style="width: 9%">', '计量模式', '</th>');
         html.push('<th class="text-center" style="width: 9%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 9%">', '创建人', '</th>');

+ 1 - 1
app/public/js/tender_list_info.js

@@ -177,7 +177,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered">');
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead style="position: fixed;left:'+ left +'px;top: 34px;">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;">', '<tr>');
         if (colSetCache.name.show) html.push('<th class="text-center" style="min-width: 300px;">', colSetCache.name.alias, '</th>');
         if (colSetCache.name.show) html.push('<th class="text-center" style="min-width: 300px;">', colSetCache.name.alias, '</th>');
         if (colSetCache.measure_type.show) html.push('<th class="text-center" style="width: 85px">', colSetCache.measure_type.alias, '</th>');
         if (colSetCache.measure_type.show) html.push('<th class="text-center" style="width: 85px">', colSetCache.measure_type.alias, '</th>');
         if (colSetCache.calc_flow.show) html.push('<th class="text-center" style="width: 125px">', colSetCache.calc_flow.alias, '</th>');
         if (colSetCache.calc_flow.show) html.push('<th class="text-center" style="width: 125px">', colSetCache.calc_flow.alias, '</th>');

+ 1 - 1
app/public/js/tender_list_manage.js

@@ -63,7 +63,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered">');
         html.push('<table class="table table-hover table-bordered">');
-        html.push('<thead style="position: fixed;left:'+ left +'px;top: 34px;">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;">', '<tr>');
         html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 45%">', '标段名称', tenderListOrder.getOrderButton('name'), '</th>');
         html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 10%">', '创建人', '</th>');
         html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');
         html.push('<th class="text-center" style="width: 15%">', '创建时间', tenderListOrder.getOrderButton('create_time'), '</th>');

+ 1 - 1
app/public/js/tender_list_progress.js

@@ -115,7 +115,7 @@ const tenderListSpec = (function(){
         const html = [];
         const html = [];
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         const left = $('#sub-menu').css('display') === 'none' ? 56 : 176;
         html.push('<table class="table table-hover table-bordered" id="progress-table">')
         html.push('<table class="table table-hover table-bordered" id="progress-table">')
-        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0px;">', '<tr>');
+        html.push('<thead style="position: sticky;left:'+ left +'px;top: 0;">', '<tr>');
         // html.push('<thead style="left:56px;top: 34px;">', '<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 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: 120px">', '计量进度', '</th>');

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

@@ -142,9 +142,9 @@ function setTopTr() {
             }
             }
         }
         }
     }
     }
-    if ($("#progress-table").length === 0) {
-        $('.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 = '') {
 function doTrStatus(node, status, all = '') {