Commit f92046914925b7122b92605b0705a33627a51ee4
1 parent
38ef3a7c
新增间隔信息页面。
Showing
5 changed files
with
40 additions
and
76 deletions
src/main/java/com/bsth/controller/sys/IntervalController.java
| @@ -9,12 +9,13 @@ import org.springframework.web.bind.annotation.RequestParam; | @@ -9,12 +9,13 @@ import org.springframework.web.bind.annotation.RequestParam; | ||
| 9 | import org.springframework.web.bind.annotation.RestController; | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | ||
| 11 | import com.alibaba.fastjson.JSON; | 11 | import com.alibaba.fastjson.JSON; |
| 12 | +import com.bsth.controller.BaseController; | ||
| 12 | import com.bsth.entity.sys.Interval; | 13 | import com.bsth.entity.sys.Interval; |
| 13 | import com.bsth.service.sys.IntervalService; | 14 | import com.bsth.service.sys.IntervalService; |
| 14 | 15 | ||
| 15 | @RestController | 16 | @RestController |
| 16 | @RequestMapping("interval") | 17 | @RequestMapping("interval") |
| 17 | -public class IntervalController { | 18 | +public class IntervalController extends BaseController<Interval, Integer> { |
| 18 | 19 | ||
| 19 | @Autowired | 20 | @Autowired |
| 20 | IntervalService intervalService; | 21 | IntervalService intervalService; |
src/main/java/com/bsth/entity/sys/Interval.java
| @@ -39,11 +39,11 @@ public class Interval { | @@ -39,11 +39,11 @@ public class Interval { | ||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | - public Integer getCreateBy() { | 42 | + public String getCreateBy() { |
| 43 | return createBy; | 43 | return createBy; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | - public void setCreateBy(Integer createBy) { | 46 | + public void setCreateBy(String createBy) { |
| 47 | this.createBy = createBy; | 47 | this.createBy = createBy; |
| 48 | } | 48 | } |
| 49 | 49 | ||
| @@ -55,11 +55,11 @@ public class Interval { | @@ -55,11 +55,11 @@ public class Interval { | ||
| 55 | this.createDate = createDate; | 55 | this.createDate = createDate; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | - public Integer getUpdateBy() { | 58 | + public String getUpdateBy() { |
| 59 | return updateBy; | 59 | return updateBy; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | - public void setUpdateBy(Integer updateBy) { | 62 | + public void setUpdateBy(String updateBy) { |
| 63 | this.updateBy = updateBy; | 63 | this.updateBy = updateBy; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -75,13 +75,13 @@ public class Interval { | @@ -75,13 +75,13 @@ public class Interval { | ||
| 75 | private Integer trough; | 75 | private Integer trough; |
| 76 | 76 | ||
| 77 | @Column(name = "create_by") | 77 | @Column(name = "create_by") |
| 78 | - private Integer createBy; | 78 | + private String createBy; |
| 79 | 79 | ||
| 80 | @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | 80 | @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") |
| 81 | private Date createDate; | 81 | private Date createDate; |
| 82 | 82 | ||
| 83 | @Column(name = "update_by") | 83 | @Column(name = "update_by") |
| 84 | - private Integer updateBy; | 84 | + private String updateBy; |
| 85 | 85 | ||
| 86 | @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | 86 | @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") |
| 87 | private Date updateDate; | 87 | private Date updateDate; |
src/main/resources/static/pages/base/interval/list.html
| 1 | -<!-- <link href="/pages/base/line/css/animate.css" rel="stylesheet" type="text/css" /> | ||
| 2 | -<link href="/pages/base/line/css/tipso.css" rel="stylesheet" type="text/css" /> --> | ||
| 3 | <!-- 片段标题 START --> | 1 | <!-- 片段标题 START --> |
| 4 | <div class="page-head"> | 2 | <div class="page-head"> |
| 5 | <div class="page-title"> | 3 | <div class="page-title"> |
| 6 | - <h1>大间隔信息</h1> | 4 | + <h1>间隔信息</h1> |
| 7 | </div> | 5 | </div> |
| 8 | </div> | 6 | </div> |
| 9 | <!-- 片段标题 END --> | 7 | <!-- 片段标题 END --> |
| @@ -12,7 +10,7 @@ | @@ -12,7 +10,7 @@ | ||
| 12 | <ul class="page-breadcrumb breadcrumb"> | 10 | <ul class="page-breadcrumb breadcrumb"> |
| 13 | <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> | 11 | <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li> |
| 14 | <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> | 12 | <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li> |
| 15 | - <li><span class="active">大间隔信息</span></li> | 13 | + <li><span class="active">间隔信息</span></li> |
| 16 | </ul> | 14 | </ul> |
| 17 | <!-- 线路信息导航栏组件 END --> | 15 | <!-- 线路信息导航栏组件 END --> |
| 18 | 16 | ||
| @@ -24,29 +22,27 @@ | @@ -24,29 +22,27 @@ | ||
| 24 | </div> | 22 | </div> |
| 25 | <div class="caption"> | 23 | <div class="caption"> |
| 26 | <i class="fa fa-info-circle font-dark"></i> | 24 | <i class="fa fa-info-circle font-dark"></i> |
| 27 | - <span class="caption-subject font-dark sbold uppercase">线路信息</span> | 25 | + <span class="caption-subject font-dark sbold uppercase">间隔信息</span> |
| 28 | </div> | 26 | </div> |
| 29 | <div class="actions"> | 27 | <div class="actions"> |
| 30 | <div class="btn-group btn-group-devided" data-toggle="buttons"> | 28 | <div class="btn-group btn-group-devided" data-toggle="buttons"> |
| 31 | - <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加线路</a> | 29 | + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加间隔信息</a> |
| 32 | </div> | 30 | </div> |
| 33 | </div> | 31 | </div> |
| 34 | </div> | 32 | </div> |
| 35 | <div class="portlet-body"> | 33 | <div class="portlet-body"> |
| 36 | <div class="table-container" style="margin-top: 10px"> | 34 | <div class="table-container" style="margin-top: 10px"> |
| 37 | - <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_line"> | 35 | + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_interval"> |
| 38 | <thead> | 36 | <thead> |
| 39 | <tr role="row" class="heading"> | 37 | <tr role="row" class="heading"> |
| 40 | - <th >#</th> | ||
| 41 | <th >序号</th> | 38 | <th >序号</th> |
| 42 | - <th >大间隔ID</th> | ||
| 43 | - <th >大间隔等级</th> | 39 | + <th >间隔ID</th> |
| 40 | + <th >间隔等级</th> | ||
| 44 | <th >高峰间隔时间</th> | 41 | <th >高峰间隔时间</th> |
| 45 | <th >低谷间隔时间</th> | 42 | <th >低谷间隔时间</th> |
| 46 | <th >操作</th> | 43 | <th >操作</th> |
| 47 | </tr> | 44 | </tr> |
| 48 | <tr role="row" class="filter"> | 45 | <tr role="row" class="filter"> |
| 49 | - <td>#</td> | ||
| 50 | <td></td> | 46 | <td></td> |
| 51 | <td></td> | 47 | <td></td> |
| 52 | <td></td> | 48 | <td></td> |
| @@ -73,72 +69,27 @@ | @@ -73,72 +69,27 @@ | ||
| 73 | </div> | 69 | </div> |
| 74 | </div> | 70 | </div> |
| 75 | </div> | 71 | </div> |
| 76 | -<script type="text/html" id="line_list_temp"> | 72 | +<script type="text/html" id="interval_list_temp"> |
| 77 | {{each list as obj i }} | 73 | {{each list as obj i }} |
| 78 | <tr> | 74 | <tr> |
| 79 | - <td style="vertical-align: middle;"> | ||
| 80 | - <input type="checkbox" class="group-checkable icheck" value="{{obj.name}}" id="{{obj.id}}" data-id="{{obj.id}}" data-lineName="{{obj.name}}"> | ||
| 81 | - </td> | ||
| 82 | - <td style="vertical-align: middle;"> | ||
| 83 | - {{(list.page*10)+(i+1)}} | ||
| 84 | - </td> | ||
| 85 | - <td> | ||
| 86 | - {{obj.lineCode}} | ||
| 87 | - </td> | ||
| 88 | <td> | 75 | <td> |
| 89 | - {{obj.name}} | ||
| 90 | - </td> | ||
| 91 | - <td> | ||
| 92 | - {{if obj.nature == 'lj'}} | ||
| 93 | - 路救 | ||
| 94 | - {{else if obj.nature == 'bc'}} | ||
| 95 | - 备车 | ||
| 96 | - {{else if obj.nature == 'dbc'}} | ||
| 97 | - 定班车 | ||
| 98 | - {{else if obj.nature == 'yxl'}} | ||
| 99 | - 夜宵路 | ||
| 100 | - {{else if obj.nature == 'cgxl'}} | ||
| 101 | - 常规线路 | ||
| 102 | - {{else if obj.nature == 'gjxl'}} | ||
| 103 | - 过江线路 | ||
| 104 | - {{else if obj.nature == 'csbs'}} | ||
| 105 | - 穿梭巴士 | ||
| 106 | - {{else if obj.nature == 'tyxl'}} | ||
| 107 | - 特约线路 | ||
| 108 | - {{else if obj.nature == 'qt'}} | ||
| 109 | - 其他 | ||
| 110 | - {{else if obj.nature == 'cctxl'}} | ||
| 111 | - 村村通线路 | ||
| 112 | - {{/if}} | ||
| 113 | - </td> | ||
| 114 | - <td> | ||
| 115 | - {{if obj.level == '1'}} | ||
| 116 | - 一级线路 | ||
| 117 | - {{else if obj.level == '2'}} | ||
| 118 | - 二级线路 | ||
| 119 | - {{else if obj.level == '0'}} | ||
| 120 | - 未知等级 | ||
| 121 | - {{/if}} | 76 | + {{(list.page*10)+(i+1)}} |
| 122 | </td> | 77 | </td> |
| 123 | <td> | 78 | <td> |
| 124 | - {{obj.shanghaiLinecode}} | 79 | + {{obj.id}} |
| 125 | </td> | 80 | </td> |
| 126 | <td> | 81 | <td> |
| 127 | - {{if obj.destroy == 1}} | ||
| 128 | - <span style="font-weight: bold; color: red; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">撤销</span> | ||
| 129 | - {{else if obj.destroy == 0}} | ||
| 130 | - <span style="font-weight: bold; color: #07824e; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">运营</span> | ||
| 131 | - {{/if}} | 82 | + {{obj.level}} |
| 132 | </td> | 83 | </td> |
| 133 | <td> | 84 | <td> |
| 134 | - <a href="/pages/base/lineinformation/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a> | 85 | + {{obj.peak}} |
| 135 | </td> | 86 | </td> |
| 136 | <td> | 87 | <td> |
| 137 | - <a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a> | 88 | + {{obj.trough}} |
| 138 | </td> | 89 | </td> |
| 139 | <td> | 90 | <td> |
| 140 | - <a href="details.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 详细 </a> | ||
| 141 | - <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | 91 | + <a href="edit.html?no={{obj.id}}" class="btn btn-info btn-sm" data-pjax> 修改 </a> |
| 92 | + <a class="btn btn-danger btn-sm" onclick="del({{obj.id}})"> 删除</a> | ||
| 142 | </td> | 93 | </td> |
| 143 | </tr> | 94 | </tr> |
| 144 | {{/each}} | 95 | {{/each}} |
| @@ -150,4 +101,20 @@ | @@ -150,4 +101,20 @@ | ||
| 150 | </script> | 101 | </script> |
| 151 | <!-- <script src="/pages/base/line/js/tipso.js"></script> --> | 102 | <!-- <script src="/pages/base/line/js/tipso.js"></script> --> |
| 152 | <!-- 线路信息片段JS模块 --> | 103 | <!-- 线路信息片段JS模块 --> |
| 153 | -<script src="/pages/base/line/js/line-list-table.js"></script> | ||
| 154 | \ No newline at end of file | 104 | \ No newline at end of file |
| 105 | +<script src="/pages/base/interval/js/interval-list-table.js"></script> | ||
| 106 | +<script> | ||
| 107 | + function del(intervalId){ | ||
| 108 | + layer.confirm('确定要删除间隔信息吗?', { | ||
| 109 | + btn: ['确定','取消'] //按钮 | ||
| 110 | + }, function(){ | ||
| 111 | + $.ajax({ | ||
| 112 | + url: '/interval/' + intervalId, | ||
| 113 | + type: 'DELETE', | ||
| 114 | + success: function(result) { | ||
| 115 | + window.location.href = 'list.html'; | ||
| 116 | + } | ||
| 117 | + }); | ||
| 118 | + }, function(){ | ||
| 119 | + }); | ||
| 120 | + } | ||
| 121 | +</script> | ||
| 155 | \ No newline at end of file | 122 | \ No newline at end of file |
src/main/resources/static/pages/excep/mhspeedingList.html
| @@ -142,8 +142,6 @@ | @@ -142,8 +142,6 @@ | ||
| 142 | {{/if}} | 142 | {{/if}} |
| 143 | </script> | 143 | </script> |
| 144 | 144 | ||
| 145 | -<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> | ||
| 146 | - | ||
| 147 | <script> | 145 | <script> |
| 148 | $(function(){ | 146 | $(function(){ |
| 149 | var page = 0, initPagination; | 147 | var page = 0, initPagination; |
src/main/resources/static/pages/excep/pdspeedingList.html
| @@ -142,8 +142,6 @@ | @@ -142,8 +142,6 @@ | ||
| 142 | {{/if}} | 142 | {{/if}} |
| 143 | </script> | 143 | </script> |
| 144 | 144 | ||
| 145 | -<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script> | ||
| 146 | - | ||
| 147 | <script> | 145 | <script> |
| 148 | $(function(){ | 146 | $(function(){ |
| 149 | var page = 0, initPagination; | 147 | var page = 0, initPagination; |