btxtgxq-system-bigdata/src/main/resources/static/route/kpi/detail/user-population-update.html

117 lines
4.3 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<base href="/bigdata/">
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11,chrome=1"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript">
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laytpl', 'form','laydate'], function() {
var $ = layui.$;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var admin = layui.admin;
var form = layui.form;
var laydate = layui.laydate;
var queryParams = top.restAjax.params(window.location.href);
var userId = queryParams.userId;
var startTime = queryParams.startTime;
var endTime = queryParams.endTime;
var tableUrl = 'api/kpi/listpage-population-update/user-id/{userId}';
var dataLoading = false;
// 初始化表格
function initTable() {
dataLoading = true;
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, [userId]),
where :{
startTime : startTime ? startTime : '',
endTime : endTime ? endTime : '',
},
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 20,
toolbar: false,
defaultToolbar: ['print', 'exports'],
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'fullName', width:120, title: '姓名', fixed: 'left', align:'center'},
{field:'idCardNumber', width:180, title: '身份证', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gender', width:80, title: '性别', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'birthDate', width:120, title: '生日', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData;
}
},
{field:'gmtModified', width:180, title: '维护时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
return rowData.substring(0, rowData.length - 2);
}
},
]],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
},
done: function(){
dataLoading = false;
}
});
}
initTable();
})
</script>
</body>
</html>