|
@@ -0,0 +1,110 @@
|
|
|
|
+{{include "com/inc.html"}}
|
|
|
|
+<!-- Main Header -->
|
|
|
|
+{{include "com/header.html"}}
|
|
|
|
+<!-- Left side column. 权限菜单 -->
|
|
|
|
+{{include "com/menu.html"}}
|
|
|
|
+
|
|
|
|
+<div class="content-wrapper">
|
|
|
|
+ <section class="content-header">
|
|
|
|
+ <h1>查看数据</h1>
|
|
|
|
+ <ol class="breadcrumb">
|
|
|
|
+ <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
|
|
|
|
+ <li><a href="#"> 查看数据</a></li>
|
|
|
|
+ </ol>
|
|
|
|
+ </section>
|
|
|
|
+ <!-- Main content -->
|
|
|
|
+ <section class="content">
|
|
|
|
+ <div class="nav-tabs-custom">
|
|
|
|
+ <form class="form-horizontal">
|
|
|
|
+ <br>
|
|
|
|
+ <div class="box-body">
|
|
|
|
+ <div class="form-group">
|
|
|
|
+ <label class="col-sm-2 control-label">网站名称</label>
|
|
|
|
+ <div class="col-sm-3">
|
|
|
|
+ <input type="text" class="form-control" id="identity" placeholder="站点名称" value="">
|
|
|
|
+ </div>
|
|
|
|
+ <button type="button" class="btn btn-primary" onclick="find()">查询</button>
|
|
|
|
+ </div>
|
|
|
|
+ <hr>
|
|
|
|
+ <table id="dataTable" class="table table-bordered table-hover">
|
|
|
|
+ <thead>
|
|
|
|
+ <tr>
|
|
|
|
+ <th>编号</th>
|
|
|
|
+ <th>站点名称</th>
|
|
|
|
+ <th>站点类型</th>
|
|
|
|
+ <th>省份</th>
|
|
|
|
+ <th>城市</th>
|
|
|
|
+ <th>区/县</th>
|
|
|
|
+ <th>链接</th>
|
|
|
|
+ </tr>
|
|
|
|
+ </thead>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </form>
|
|
|
|
+ </div>
|
|
|
|
+ </section>
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+{{include "com/footer.html"}}
|
|
|
|
+<script>
|
|
|
|
+ menuActive("/service/jy/site");
|
|
|
|
+
|
|
|
|
+ $(document).ready(function () {
|
|
|
|
+ ttable = $('#dataTable').DataTable({
|
|
|
|
+ "paging": true,
|
|
|
|
+ "lengthChange": false,
|
|
|
|
+ "searching": false,
|
|
|
|
+ "ordering": false,
|
|
|
|
+ "info": false,
|
|
|
|
+ "autoWidth": false,
|
|
|
|
+ "serverSide": false,
|
|
|
|
+ "language": {
|
|
|
|
+ "url": "/dist/js/dataTables.chinese.lang"
|
|
|
|
+ },
|
|
|
|
+ "fnDrawCallback": function () {
|
|
|
|
+ $("ul.pagination").prepend(" 转到第 <input type='text' id='changePage' style='width:20px;'> 页 <a type='text' href='javascript:void(0);' id='dataTable-btn' style='text-align:center'>GO</a>");
|
|
|
|
+ $('#dataTable-btn').click(function (e) {
|
|
|
|
+ var redirectpage = 0
|
|
|
|
+ if ($("#changePage").val() && $("#changePage").val() > 0) {
|
|
|
|
+ var redirectpage = $("#changePage").val() - 1;
|
|
|
|
+ }
|
|
|
|
+ ttable.page(redirectpage).draw(false);
|
|
|
|
+ });
|
|
|
|
+ this.api().column(0).nodes().each(function(cell, i) {
|
|
|
|
+ cell.innerHTML = i + 1;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ "columns": [
|
|
|
|
+ {"data": null,width:"5%"},
|
|
|
|
+ {"data": "site",width:"13%"},
|
|
|
|
+ {"data": "site_type", width: "7%"},
|
|
|
|
+ {"data": "area", width: "7%"},
|
|
|
|
+ {"data": "city", width: "7%"},
|
|
|
|
+ {"data": "district", width: "7%"},
|
|
|
|
+ {"data": "domain", width: "20%"}
|
|
|
|
+ ]
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ function find() {
|
|
|
|
+ let identity = $('#identity').val()
|
|
|
|
+ if (identity === "") {
|
|
|
|
+ showMsg("请填写网站名称")
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ $.ajax({
|
|
|
|
+ url: "/service/jy/site",
|
|
|
|
+ type: 'POST',
|
|
|
|
+ data: {"identity": identity},
|
|
|
|
+ success: function (r) {
|
|
|
|
+ hideLoading()
|
|
|
|
+ if (r.rep) {
|
|
|
|
+ $('#dataTable').dataTable().fnClearTable();
|
|
|
|
+ $('#dataTable').dataTable().fnAddData(r.data);
|
|
|
|
+ } else {
|
|
|
|
+ showMsg(r.msg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+</script>
|