Commit f92046914925b7122b92605b0705a33627a51ee4

Authored by zb
1 parent 38ef3a7c

新增间隔信息页面。

src/main/java/com/bsth/controller/sys/IntervalController.java
... ... @@ -9,12 +9,13 @@ import org.springframework.web.bind.annotation.RequestParam;
9 9 import org.springframework.web.bind.annotation.RestController;
10 10  
11 11 import com.alibaba.fastjson.JSON;
  12 +import com.bsth.controller.BaseController;
12 13 import com.bsth.entity.sys.Interval;
13 14 import com.bsth.service.sys.IntervalService;
14 15  
15 16 @RestController
16 17 @RequestMapping("interval")
17   -public class IntervalController {
  18 +public class IntervalController extends BaseController<Interval, Integer> {
18 19  
19 20 @Autowired
20 21 IntervalService intervalService;
... ...
src/main/java/com/bsth/entity/sys/Interval.java
... ... @@ -39,11 +39,11 @@ public class Interval {
39 39 }
40 40  
41 41  
42   - public Integer getCreateBy() {
  42 + public String getCreateBy() {
43 43 return createBy;
44 44 }
45 45  
46   - public void setCreateBy(Integer createBy) {
  46 + public void setCreateBy(String createBy) {
47 47 this.createBy = createBy;
48 48 }
49 49  
... ... @@ -55,11 +55,11 @@ public class Interval {
55 55 this.createDate = createDate;
56 56 }
57 57  
58   - public Integer getUpdateBy() {
  58 + public String getUpdateBy() {
59 59 return updateBy;
60 60 }
61 61  
62   - public void setUpdateBy(Integer updateBy) {
  62 + public void setUpdateBy(String updateBy) {
63 63 this.updateBy = updateBy;
64 64 }
65 65  
... ... @@ -75,13 +75,13 @@ public class Interval {
75 75 private Integer trough;
76 76  
77 77 @Column(name = "create_by")
78   - private Integer createBy;
  78 + private String createBy;
79 79  
80 80 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
81 81 private Date createDate;
82 82  
83 83 @Column(name = "update_by")
84   - private Integer updateBy;
  84 + private String updateBy;
85 85  
86 86 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
87 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 1 <!-- 片段标题 START -->
4 2 <div class="page-head">
5 3 <div class="page-title">
6   - <h1>间隔信息</h1>
  4 + <h1>间隔信息</h1>
7 5 </div>
8 6 </div>
9 7 <!-- 片段标题 END -->
... ... @@ -12,7 +10,7 @@
12 10 <ul class="page-breadcrumb breadcrumb">
13 11 <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
14 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 14 </ul>
17 15 <!-- 线路信息导航栏组件 END -->
18 16  
... ... @@ -24,29 +22,27 @@
24 22 </div>
25 23 <div class="caption">
26 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 26 </div>
29 27 <div class="actions">
30 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 30 </div>
33 31 </div>
34 32 </div>
35 33 <div class="portlet-body">
36 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 36 <thead>
39 37 <tr role="row" class="heading">
40   - <th >#</th>
41 38 <th >序号</th>
42   - <th >大间隔ID</th>
43   - <th >大间隔等级</th>
  39 + <th >间隔ID</th>
  40 + <th >间隔等级</th>
44 41 <th >高峰间隔时间</th>
45 42 <th >低谷间隔时间</th>
46 43 <th >操作</th>
47 44 </tr>
48 45 <tr role="row" class="filter">
49   - <td>#</td>
50 46 <td></td>
51 47 <td></td>
52 48 <td></td>
... ... @@ -73,72 +69,27 @@
73 69 </div>
74 70 </div>
75 71 </div>
76   -<script type="text/html" id="line_list_temp">
  72 +<script type="text/html" id="interval_list_temp">
77 73 {{each list as obj i }}
78 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 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 77 </td>
123 78 <td>
124   - {{obj.shanghaiLinecode}}
  79 + {{obj.id}}
125 80 </td>
126 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 83 </td>
133 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 86 </td>
136 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 89 </td>
139 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 93 </td>
143 94 </tr>
144 95 {{/each}}
... ... @@ -150,4 +101,20 @@
150 101 </script>
151 102 <!-- <script src="/pages/base/line/js/tipso.js"></script> -->
152 103 <!-- 线路信息片段JS模块 -->
153   -<script src="/pages/base/line/js/line-list-table.js"></script>
154 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 122 \ No newline at end of file
... ...
src/main/resources/static/pages/excep/mhspeedingList.html
... ... @@ -142,8 +142,6 @@
142 142 {{/if}}
143 143 </script>
144 144  
145   -<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
146   -
147 145 <script>
148 146 $(function(){
149 147 var page = 0, initPagination;
... ...
src/main/resources/static/pages/excep/pdspeedingList.html
... ... @@ -142,8 +142,6 @@
142 142 {{/if}}
143 143 </script>
144 144  
145   -<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"></script>
146   -
147 145 <script>
148 146 $(function(){
149 147 var page = 0, initPagination;
... ...