|
@@ -0,0 +1,129 @@
|
|
|
+{{include "com/inc.html"}}
|
|
|
+<!-- Main Header -->
|
|
|
+{{include "com/header.html"}}
|
|
|
+<!-- Left side column. 权限菜单 -->
|
|
|
+{{include "com/menu.html"}}
|
|
|
+
|
|
|
+<div class="content-wrapper" id="showbtn">
|
|
|
+ <section class="content-header">
|
|
|
+ <h1>
|
|
|
+ <small><a id="addWork" class="btn btn-primary opr">新增任务</a></small>
|
|
|
+ </h1>
|
|
|
+ <ol class="breadcrumb">
|
|
|
+ <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
|
|
|
+ <li><a href="/service/historylog/list?id={{.T.id}}"> 记录</a></li>
|
|
|
+ </ol>
|
|
|
+ </section>
|
|
|
+ <!-- Main content -->
|
|
|
+ <section class="content">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-xs-12">
|
|
|
+ <div class="box">
|
|
|
+ <div class="box-body">
|
|
|
+ <table id="dataTable" class="table table-bordered table-hover">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>序号</th>
|
|
|
+ <th>ID</th>
|
|
|
+ <th>操作人</th>
|
|
|
+ <th>状态</th>
|
|
|
+ <th>数据总量</th>
|
|
|
+ <th>创建时间</th>
|
|
|
+ <th>修改时间</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <!-- /.box-body -->
|
|
|
+ </div>
|
|
|
+ <!-- /.box -->
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </section>
|
|
|
+</div>
|
|
|
+{{include "com/footer.html"}}
|
|
|
+<script>
|
|
|
+ $(function() {
|
|
|
+ ttable = $('#dataTable').DataTable({
|
|
|
+ "paging": true,
|
|
|
+ "lengthChange": false,
|
|
|
+ "searching": false,
|
|
|
+ "ordering": false,
|
|
|
+ "info": true,
|
|
|
+ "autoWidth": false,
|
|
|
+ "ajax": {
|
|
|
+ "url": "/service/historylog/list",
|
|
|
+ "type": "post",
|
|
|
+ "data": {
|
|
|
+ "id": {{.T.id}}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "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": "_id"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": "create_user"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": "state",
|
|
|
+ render: function(val) {
|
|
|
+ var str = "";
|
|
|
+ if(val === 0){
|
|
|
+ str = "未执行";
|
|
|
+ }else if(val === 1){
|
|
|
+ str = "未完成";
|
|
|
+ }else if(val === 2){
|
|
|
+ str = "已完成";
|
|
|
+ }
|
|
|
+ return str
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": "result_count"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": "createtime",
|
|
|
+ render: function(val) {
|
|
|
+ var dt = new Date()
|
|
|
+ dt.setTime(parseInt(val) * 1000)
|
|
|
+ return dt.format("yyyy-MM-dd hh:mm:ss")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "data": "updatetime",
|
|
|
+ render: function(val) {
|
|
|
+ var dt = new Date()
|
|
|
+ dt.setTime(parseInt(val) * 1000)
|
|
|
+ return dt.format("yyyy-MM-dd hh:mm:ss")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#addWork").on("click",function(){
|
|
|
+ window.location.href = "/service/customer/history?id="+ {{.T.id}};
|
|
|
+ })
|
|
|
+ });
|
|
|
+</script>
|