diff --git a/css/public.css b/css/public.css index 0f6a3ac..ec4d9bc 100644 --- a/css/public.css +++ b/css/public.css @@ -101,7 +101,6 @@ body { font-size: 15px; color: #262626; letter-spacing: 1px; - height: 55px; } .layui-table thead tr { @@ -297,3 +296,29 @@ blockquote { cursor: pointer; } +.layui-table-fixed .layui-table-body tr, +.layui-table-main tr, +.layui-table-view .layui-table tr { + height: 48px !important; +} + +.layui-table td, +.layui-table-fixed td { + line-height: 48px !important; + padding: 0 10px !important; + box-sizing: border-box; +} + +.layui-table td div, +.layui-table td span { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.splitLine { + display: inline-block; + margin: 0 4px; +} + + diff --git a/js/car_demand_plan/dispatch_input_list.js b/js/car_demand_plan/dispatch_input_list.js index 203023b..4085bf7 100644 --- a/js/car_demand_plan/dispatch_input_list.js +++ b/js/car_demand_plan/dispatch_input_list.js @@ -240,6 +240,15 @@ function initTable() { done: function (res, curr, count) { pageNum = tableIns.config.page.curr; table.resize("currentTableId"); + + let trs = document.querySelectorAll(".layui-table-main tr"); + let fixedTrs = document.querySelectorAll(".layui-table-fixed tr"); + + trs.forEach((tr, i) => { + if (fixedTrs[i]) { + fixedTrs[i].style.height = tr.offsetHeight + "px"; + } + }); }, }); }