You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
136 lines
4.7 KiB
136 lines
4.7 KiB
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Demo</title>
|
|
<!-- 请勿在项目正式环境中引用该 layui.css 地址 -->
|
|
<link href="../js/layui/css/layui.css" rel="stylesheet">
|
|
<style>
|
|
.woo-tool-text-delimiter {
|
|
width: 1px;
|
|
height: 12px;
|
|
background: #EEEEEE;
|
|
display: inline-block;
|
|
margin: 0 6px 0 4px;
|
|
}
|
|
|
|
.woo-theme-color {
|
|
color: #1e9fff !important;
|
|
}
|
|
|
|
.woo-tool-span {
|
|
margin: 0 3px;
|
|
position: relative;
|
|
top: -1px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.layui-card-body .layui-form {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.layui-form-select {
|
|
width: 300px;
|
|
}
|
|
|
|
.layui-card {
|
|
margin-bottom: 15px;
|
|
border-radius: 2px;
|
|
background-color: #fff;
|
|
box-shadow: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="layui-form">
|
|
<div class="layui-card">
|
|
<div class="layui-card-body">
|
|
<table id="data-table"></table>
|
|
|
|
<script type="text/html" id="table-bar">
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="uploadData"><a
|
|
class="woo-theme-color">全量更新</a></span>
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="uploadDataInc"><a
|
|
class="woo-theme-color">增量更新</a></span>
|
|
<i class="woo-tool-text-delimiter"></i>
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="downloadData"><a
|
|
class="woo-theme-color">下载数据</a></span>
|
|
<i class="woo-tool-text-delimiter"></i>
|
|
<span class="woo-tool-span woo-tool-text-span" lay-event="mod"><a
|
|
class="woo-theme-color">数据维护</a></span>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 请勿在项目正式环境中引用该 layui.js 地址 -->
|
|
<script src="../js/layui/layui.js"></script>
|
|
<script>
|
|
layui.use('table', function () {
|
|
var table = layui.table;
|
|
var $ = layui.jquery;
|
|
|
|
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/dsBase/dataease/getDataSetByCity',
|
|
height: 'full-35',
|
|
page: {
|
|
limit: 20
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [[
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
{ title: '分类', field: 'parent_name', align: 'center' },
|
|
{ title: '数据集', field: 'dataset_name', align: 'center' },
|
|
// { title: '已填数据(条)', field: 'fill_count', align: 'center' },
|
|
// { title: '表名', field: 'table_name', align: 'center' },
|
|
{ title: '操作', toolbar: '#table-bar', align: 'center', width: 390 }
|
|
]],
|
|
skin: 'line',
|
|
defaultToolbar: []
|
|
});
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
window.location.href = "./dataMod_proxy_city.html?id=" + obj.data.id;
|
|
});
|
|
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
if (obj.event === 'uploadData') {
|
|
layer.open({
|
|
type: 2,
|
|
title: '上传数据',
|
|
area: ['600px', '230px'],
|
|
shade: 0.1,
|
|
content: './upload_proxy_city.html?id=' + obj.data.id
|
|
});
|
|
|
|
} else if (obj.event === 'uploadDataInc') {
|
|
// layer.open({
|
|
// type: 2,
|
|
// title: '上传数据',
|
|
// area: ['600px', '230px'],
|
|
// shade: 0.1,
|
|
// content: './upload_proxy_city.html?id=' + obj.data.id
|
|
// });
|
|
alert("TODO!");
|
|
} else if (obj.event === 'downloadData') {
|
|
window.location.href = "/dsBase/dataease/downloadExcelByCity?id=" + obj.data.id;
|
|
} else {
|
|
window.location.href = "./dataMod_proxy_city.html?id=" + obj.data.id
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |