From ab5f513d865f3458b3721f352138d245fc1a4fe1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期四, 09 七月 2020 13:50:38 +0800 Subject: [PATCH] # --- src/main/webapp/views/pdaCe/index.html | 49 ++++++++++++++++++++++++++++--------------------- 1 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/main/webapp/views/pdaCe/index.html b/src/main/webapp/views/pdaCe/index.html index c9535d5..f00e11f 100644 --- a/src/main/webapp/views/pdaCe/index.html +++ b/src/main/webapp/views/pdaCe/index.html @@ -6,13 +6,18 @@ <title>涓壃鐗╂祦</title> <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> <style> + + * { + font-size: 12px; + } + .mat-msg { overflow: auto; margin-top: 10px; - height: 100px; + height: 115px; background-color: #fff; border-radius: 5px; - box-shadow: 0 0 3px rgba(0,0,0,.3); + border: 1px solid #c2c2c2; } /* 鍫嗗灈鏈虹姸鎬佷俊鎭〃 */ #mat-msg-table { @@ -39,13 +44,13 @@ background: #fff; } - .btn-con { + #btn-con { padding-left: 10px; position: absolute; bottom: 10px; width: 100%; } - .btn-con button { + #btn-con button { display: inline-block; vertical-align: middle; } @@ -74,7 +79,7 @@ <!-- 鍫嗗灈鏈虹姸鎬� --> <div class="mat-msg" id="mat-msg-id"> <table id="mat-msg-table"> - <thead> + <thead id="tthead"> <tr> <th>缂栫爜</th> <th>鍚嶇О</th> @@ -82,12 +87,12 @@ <th>鏁伴噺</th> </tr> </thead> - <tbody> + <tbody id="ttbody"> </tbody> </table> </div> -<div class="btn-con"> +<div id="btn-con"> <button style="margin-right: 20px" onclick="reset()">閲嶇疆</button> <button >缁勬墭</button> <span id="tips"></span> @@ -95,9 +100,14 @@ </body> <script> // initCrnMsgTable() + var matMsgTableBlankRows = 0; // 绌虹櫧琛屾暟 var code = document.getElementById("code") var matnr = document.getElementById("matnr") var matMsg = document.getElementById("mat-msg-id"); + var matMsgTable = document.getElementById("mat-msg-table"); + var tthead = document.getElementById("tthead"); + var ttbody = document.getElementById("ttbody"); + var btnCon = document.getElementById("btn-con"); var tipDom = document.getElementById("tips"); // 鏌ヨ鐗╂祦 @@ -112,8 +122,10 @@ if (res.code === 200) { if (res.data != null) { matMsg.style.display = 'none'; + btnCon.style.display = 'none'; } else { matMsg.style.display = 'block'; + btnCon.style.display = 'block'; } } else { alert(res.msg); @@ -122,15 +134,16 @@ }) } + initCrnMsgTable(); // 鍫嗗灈鏈烘暟鎹〃鑾峰彇 ----- 琛ㄤ簩 function initCrnMsgTable(row) { var line; if (row === undefined){ - var one = $('#crn-msg-table thead').height(); - var total = $('.crn-msg').height(); + var one = tthead.offsetHeight; + var total = matMsg.offsetHeight; var count = total / one; count = parseInt(count) - 1; - crnMsgTableBlankRows = count; + matMsgTableBlankRows = count; line = count; } else { line = row; @@ -138,19 +151,13 @@ var html = ""; for (var i = 0; i < line; i ++){ html += " <tr>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + - " <td></td>\n" + + " <td>1</td>\n" + + " <td>2</td>\n" + + " <td>3</td>\n" + + " <td>4</td>\n" + " </tr>\n"; } - $('#crn-msg-table tbody').after(html); + ttbody.innerHTML = html; } // 閲嶇疆 -- Gitblit v1.9.1