|
@@ -25,7 +25,6 @@
|
|
|
margin-bottom: -2px;
|
|
|
outline: none;
|
|
|
}
|
|
|
-
|
|
|
input:focus {
|
|
|
border-color: #009E94;
|
|
|
}
|
|
@@ -221,6 +220,29 @@
|
|
|
var fyje2 = parent.$('#fyje1').val();
|
|
|
$("#mylable2").text(xmmc2);
|
|
|
$("#readid2").text(fyje2);
|
|
|
+
|
|
|
+ $('#btn-search').click(function () {
|
|
|
+ var keyword = $('#edt-search').val();
|
|
|
+ var searchCount = 0;
|
|
|
+ $('#longtable').next('.treeTable').find('.layui-table-body tbody tr td').each(function () {
|
|
|
+ $(this).css('background-color', 'transparent');
|
|
|
+ var text = $(this).text();
|
|
|
+ if (keyword != '' && text.indexOf(keyword) >= 0) {
|
|
|
+ $(this).css('background-color', 'rgba(250,230,160,0.5)');
|
|
|
+ if (searchCount == 0) {
|
|
|
+ treetable.expandAll('#longtable');
|
|
|
+ $('html,body').stop(true);
|
|
|
+ $('html,body').animate({scrollTop: $(this).offset().top - 150}, 500);
|
|
|
+ }
|
|
|
+ searchCount++;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (keyword == '') {
|
|
|
+ layer.msg("请输入搜索内容", {icon: 5});
|
|
|
+ } else if (searchCount == 0) {
|
|
|
+ layer.msg("没有匹配结果", {icon: 5});
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
</script>
|
|
|
</html>
|