加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
pilelist-bak.html 12.67 KB
一键复制 编辑 原始数据 按行查看 历史
【那么】ㄜ在一起 提交于 2018-10-25 21:53 . 删除多余文件
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<meta HTTP-EQUIV="expires" CONTENT="0">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>基础桩管理</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.css" rel="stylesheet">
<link href="css/animate.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/ui.css" rel="stylesheet">
<link rel="stylesheet" href="css/control.css">
<style>
#body {
width: 100%;
max-height: 100%;
overflow-y: scroll;
overflow-x: hidden;
}
.articleImg {
/* width: 100%; */
/* height: auto !important; */
max-width: 100px;
}
th,
td {
text-align: center;
}
</style>
</head>
<body class="gray-bg animated fadeInRight">
<div id="body">
<div class="wrapper wrapper-content">
<div class="row">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-content">
<table class="table table-bordered">
<thead>
<tr>
<th width="10%">桩号</th>
<th width="5%">桩径</th>
<th width="10%">强度</th>
<th width="10%">判定</th>
<th width="10%">设计等级</th>
<th width="5%">桩长</th>
<th width="15%">桩身完整性</th>
<th width="5%">沉渣</th>
<th width="14%">创建时间</th>
<th width="12%">操作</th>
</tr>
</thead>
<tbody id="list">
</tbody>
</table>
</div>
<div id="pageRow" class="fixBottom">
<div class="fr" id="page">
<ul class="pagination" style="margin:0;float:right;">
<li class="paginate_button" id="firstPage">
<a href="javascript:">
<<</a>
</li>
<li class="paginate_button" id="previousPage">
<a href="javascript:">
<</a>
</li>
<li class="paginate_button">
<a href="javascript:" style="padding:0">
<select class="" name="" style="padding:4px 10px" id="pageInfo">
</select>
</a>
</li>
<li class="paginate_button" id="nextPage">
<a href="javascript:">></a>
</li>
<li class="paginate_button" id="lastPage">
<a href="javascript:">>></a>
</li>
</ul>
</div>
<div class="fr" style="margin-right:20px;">
<div class="dataTables_info" style="line-height:28px;">当前显示第
<span id="startRow"></span>
<span id="endRow"></span> 项,共
<span id="totalPage"></span> 项 ,每页显示
<select class="" name="" id="pageSizeInfo" style="margin:0 10px;">
<option value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="50">50</option>
</select></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 全局js -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/work/common.js"></script>
<script src="js/plugins/laydate/laydate.js"></script>
<script src="js/plugins/layer/layer.min.js"></script>
<script src="js/plugins/layer/layer.js"></script>
<!-- 自定义js -->
<script src="js/content.js"></script>
<script>
var pageNum = getStorage("pageNum") || 1;
var pageSize = getStorage("pageSize") || 20;
var flag = 0;
$(document).ready(function () {
$("#pageSizeInfo").val(pageSize)
var today = Date.parse(new Date())
getData();
function getData() {
var dataList = [ {
"pileNumber" : "60",
"pileDiamter" : "3000",
"pileStrength" : "33.5",
"determine" : "满足设计要求",
"designGrade" : "C30",
"pileLength" : "5.50",
"pileIntegrity" : "I",
"sediment" : "",
"createTime" : "2018-10-11 10:00:00"
}, {
"pileNumber" : "61",
"pileDiamter" : "3000",
"pileStrength" : "33.5",
"determine" : "满足设计要求",
"designGrade" : "C30",
"pileLength" : "5.50",
"pileIntegrity" : "I",
"sediment" : "",
"createTime" : "2018-10-11 10:00:00"
}, {
"pileNumber" : "62",
"pileDiamter" : "4000",
"pileStrength" : "33.5",
"determine" : "满足设计要求",
"designGrade" : "C30",
"pileLength" : "5.50",
"pileIntegrity" : "I",
"sediment" : "",
"createTime" : "2018-10-11 10:00:00"
} ];
creatList(dataList)
var pageData = {
"pageNum":1,
"startRow" : 1,
"endRow" : 1,
"total" : 3,
"pages" : 1,
}
createPageInfo(pageData);
}
function creatList(data) {
var tpl = '';
for (var i = 0; i < data.length; i++) {
tpl += '<tr class="viewDb" data-val="' + data[i].pileNumber + '">' +
'<td>' + data[i].pileNumber + '</td>' +
'<td>' + data[i].pileDiamter + '</td>' +
'<td>' + data[i].pileStrength + '</td>' +
'<td>' + data[i].determine + '</td>' +
'<td>' + data[i].designGrade + '</td>' +
'<td>' + data[i].pileLength + '</td>' +
'<td>' + data[i].pileIntegrity + '</td>' +
'<td>' + data[i].sediment + '</td>' +
'<td>' + data[i].createTime + '</td>' +
'<td>' + '<a class="checkInfo btn btn-info btn-xs">查看详情</a></td>' +
'</tr>'
}
$("#list").empty().append(tpl);
$('.checkInfo').click(function () {
var id = $(this).parent().parent().attr("data-val");
setStorage("pileNumber", id);
window.location.href = "piledetail.html";
});
}
laydate.render({
elem: '#registerTime1',
max: timeStamp2String(today, "ymd"),
showBottom: false,
done: function (value) {
laydate.render({
elem: '#registerTime2',
min: value,
max: timeStamp2String(today, "ymd"),
showBottom: false,
show: true
});
}
});
laydate.render({
elem: '#loginTime1',
max: timeStamp2String(today, "ymd"),
showBottom: false,
done: function (value) {
laydate.render({
elem: '#loginTime2',
min: value,
max: timeStamp2String(today, "ymd"),
showBottom: false,
show: true
});
}
});
$("#submit").on("click", function () {
getData()
});
$("#trans").click(function () {
$("#conditions").slideToggle();
});
$("#list").on("dblclick", ".viewDb", function () {
var id = $(this).attr("data-val");
setStorage("memberId", id);
window.location.href = "memberMsg.html";
});
//创建页码信息
function createPageInfo(data) {
$("#startRow").text(data.startRow)
$("#endRow").text(data.endRow)
$("#totalPage").text(data.total)
var temp = '';
for (var i = 1; i < data.pages + 1; i++) {
temp += '<option value="' + i + '">' + i + '</option>'
}
$("#pageInfo").html(temp);
$("#pageInfo").val(data.pageNum);
$("#pageInfo").change(function () {
$("#pageInfor").blur();
if (flag == 1) {
return
};
flag = 1
pageNum = this.options[this.options.selectedIndex].value
setStorage("pageNum", pageNum)
getData()
});
$("#firstPage").click(function () {
if (pageNum != 1) {
if (flag == 1) {
return
};
flag = 1
pageNum = 1
setStorage("pageNum", pageNum)
getData()
}
});
$("#lastPage").click(function () {
if (pageNum < data.pages) {
if (flag == 1) {
return
};
flag = 1
pageNum = data.pages
setStorage("pageNum", pageNum)
getData()
}
});
$("#nextPage").click(function () {
if (pageNum < data.pages) {
if (flag == 1) {
return
};
flag = 1
pageNum++
setStorage("pageNum", pageNum)
getData()
}
});
$("#previousPage").click(function () {
if (pageNum > 1) {
if (flag == 1) {
return
};
flag = 1
pageNum--
setStorage("pageNum", pageNum)
getData()
}
})
}
$("#pageSizeInfo").change(function () {
$("#pageSizeInfo").blur()
if (flag == 1) {
return
};
flag = 1
pageSize = this.options[this.options.selectedIndex].value;
setStorage("pageSize", pageSize)
// getData()
});
});
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化