From 07cf94734c36d4eae6ddbc4dd338bf5af81a2193 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 28 十月 2024 16:11:39 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/基础资料/通用基础资料/Gy_CommonBaseData.html | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\200\232\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CommonBaseData.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\200\232\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CommonBaseData.html"
index 6aae8b9..0307554 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\200\232\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CommonBaseData.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\200\232\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_CommonBaseData.html"
@@ -19,12 +19,12 @@
<style>
/* 褰撻紶鏍囨偓娴湪琛ㄦ牸鐨勫鏁拌涓婃椂鏀瑰彉鑳屾櫙鑹� */
.layui-table tbody tr:nth-child(odd):hover {
- background-color: #ffff00; /* 鏇存敼涓轰綘鎯宠鐨勯鑹� */
+ background-color: #ceedfa; /* 鏇存敼涓轰綘鎯宠鐨勯鑹� */
}
/* 褰撻紶鏍囨偓娴湪琛ㄦ牸鐨勫伓鏁拌涓婃椂鏀瑰彉鑳屾櫙鑹� */
.layui-table tbody tr:nth-child(even):hover {
- background-color: #ffff00; /* 鏇存敼涓轰綘鎯宠鐨勯鑹� */
+ background-color: #ceedfa; /* 鏇存敼涓轰綘鎯宠鐨勯鑹� */
}
</style>
@@ -96,10 +96,10 @@
//, toolbar: '#toolbarDemo'
, height: 'full-50'
, cellMinWidth: 90
- , page: true
- , limit: 5
+ //, page: true
+ , limit: 10
, limits: [5, 10, 15, 20]
- , totalRow: true
+ //, totalRow: true
, cols: [[
{ field: '浠g爜', title: '浠g爜', width: 150, sort: true }
, { field: '鍚嶇О', title: '鍚嶇О', width: 150, sort: true }
@@ -107,10 +107,23 @@
, data: []
, done: function (res, curr, count) {
// 璁剧疆琛屾牱寮�
- var style = 'background-color: #ffff00;'; // 鎸囧畾鐨勮儗鏅壊
+ var style = 'background-color: #ceedfa;'; // 鎸囧畾鐨勮儗鏅壊
// 鍋囪鎴戜滑瑕佽缃涓夎鐨勮儗鏅壊
var targetIndex = rowIndex; // 琛屽彿绱㈠紩锛屼粠0寮�濮嬭鏁�
$('tr[data-index=' + targetIndex + ']').attr('style', style);
+
+
+ //璁剧疆婊氬姩鏉′綅缃�
+ if (option.data.length > 0) {
+ // 琛ㄦ牸娓叉煋瀹屾瘯鍚庣殑鍥炶皟
+ var parentObject = document.getElementById('mainTable').nextElementSibling.childNodes[0].childNodes[1].childNodes[0].childNodes[0];
+ if (parentObject.childNodes.length > 0) {
+ var rowObject = parentObject.childNodes[0];
+ var rowHeight = rowObject.offsetHeight; // 鑾峰彇琛岄珮
+ var rowPosition = rowHeight * rowIndex;
+ $('.layui-table-body').scrollTop(rowPosition);
+ }
+ }
}
};
}
--
Gitblit v1.9.1