Commit 483f22c7e718e0db7e9a1f44628e63b7bb019e54
1 parent
29949ba6
报表
Showing
21 changed files
with
263 additions
and
705 deletions
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -37,14 +37,14 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 37 | 37 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,d.sender,d.timestamp," |
| 38 | 38 | + " d.txt_content FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 " |
| 39 | 39 | + "d ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 40 | - + "r.schedule_date like %?2% and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | |
| 40 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | |
| 41 | 41 | List<Object[]> historyMessage(String line,String date,String code); |
| 42 | 42 | |
| 43 | 43 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " |
| 44 | 44 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " |
| 45 | 45 | + " ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 46 | - + " r.schedule_date like %?2% and r.cl_zbh like %?3% group by " | |
| 47 | - + " lp_name,xl_name,cl_zbh order by d.timestamp",nativeQuery=true) | |
| 46 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% group by " | |
| 47 | + + " lp_name,xl_name,cl_zbh",nativeQuery=true) | |
| 48 | 48 | List<Object[]> historyMessageCount(String line,String date,String code); |
| 49 | 49 | |
| 50 | 50 | @Query(value = "select max(id) from ScheduleRealInfo") | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1281,6 +1281,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1281 | 1281 | if(scheduleRealInfo.isSflj()){ |
| 1282 | 1282 | ljgl += tempJhlc; |
| 1283 | 1283 | } |
| 1284 | + }else{ | |
| 1285 | + ssgl += tempJhlc; | |
| 1286 | + ssgl_other += tempJhlc; | |
| 1284 | 1287 | } |
| 1285 | 1288 | }else{ |
| 1286 | 1289 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ... | ... |
src/main/resources/application-dev.properties
| ... | ... | @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | 9 | spring.jpa.show-sql= false |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201:3306/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 11 | +spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 12 | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= 123456 | |
| 13 | +spring.datasource.password= root | |
| 14 | 14 | #DATASOURCE |
| 15 | 15 | spring.datasource.max-active=100 |
| 16 | 16 | spring.datasource.max-idle=8 | ... | ... |
src/main/resources/static/pages/forms/statement/account.html
| ... | ... | @@ -80,44 +80,18 @@ |
| 80 | 80 | locale : 'zh-cn' |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - $('#line').select2({ | |
| 84 | - ajax: { | |
| 85 | - url: '/realSchedule/findLine', | |
| 86 | - type: 'post', | |
| 87 | - dataType: 'json', | |
| 88 | - delay: 150, | |
| 89 | - data: function(params){ | |
| 90 | - return{line: params.term}; | |
| 91 | - }, | |
| 92 | - processResults: function (data) { | |
| 93 | - return { | |
| 94 | - results: data | |
| 95 | - }; | |
| 96 | - }, | |
| 97 | - cache: true | |
| 98 | - }, | |
| 99 | - templateResult: function(repo){ | |
| 100 | - if (repo.loading) return repo.text; | |
| 101 | - var h = '<span>'+repo.text+'</span>'; | |
| 102 | - return h; | |
| 103 | - }, | |
| 104 | - escapeMarkup: function (markup) { return markup; }, | |
| 105 | - minimumInputLength: 1, | |
| 106 | - templateSelection: function(repo){ | |
| 107 | - return repo.text; | |
| 108 | - }, | |
| 109 | - language: { | |
| 110 | - noResults: function(){ | |
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 112 | - }, | |
| 113 | - inputTooShort : function(e) { | |
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 115 | - }, | |
| 116 | - searching : function() { | |
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 118 | - } | |
| 119 | - } | |
| 120 | - }); | |
| 83 | + $.get('/basic/lineCode2Name',function(result){ | |
| 84 | + var data=[]; | |
| 85 | + | |
| 86 | + for(var code in result){ | |
| 87 | + data.push({id: code, text: result[code]}); | |
| 88 | + } | |
| 89 | + console.log(data); | |
| 90 | + initPinYinSelect2('#line',data,''); | |
| 91 | + | |
| 92 | + }) | |
| 93 | + | |
| 94 | + | |
| 121 | 95 | $('#code').select2({ |
| 122 | 96 | ajax: { |
| 123 | 97 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/forms/statement/correctForm.html
| ... | ... | @@ -107,44 +107,19 @@ |
| 107 | 107 | locale : 'zh-cn' |
| 108 | 108 | }); |
| 109 | 109 | |
| 110 | - $('#line').select2({ | |
| 111 | - ajax: { | |
| 112 | - url: '/realSchedule/findLine', | |
| 113 | - type: 'post', | |
| 114 | - dataType: 'json', | |
| 115 | - delay: 150, | |
| 116 | - data: function(params){ | |
| 117 | - return{line: params.term}; | |
| 118 | - }, | |
| 119 | - processResults: function (data) { | |
| 120 | - return { | |
| 121 | - results: data | |
| 122 | - }; | |
| 123 | - }, | |
| 124 | - cache: true | |
| 125 | - }, | |
| 126 | - templateResult: function(repo){ | |
| 127 | - if (repo.loading) return repo.text; | |
| 128 | - var h = '<span>'+repo.text+'</span>'; | |
| 129 | - return h; | |
| 130 | - }, | |
| 131 | - escapeMarkup: function (markup) { return markup; }, | |
| 132 | - minimumInputLength: 1, | |
| 133 | - templateSelection: function(repo){ | |
| 134 | - return repo.text; | |
| 135 | - }, | |
| 136 | - language: { | |
| 137 | - noResults: function(){ | |
| 138 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 139 | - }, | |
| 140 | - inputTooShort : function(e) { | |
| 141 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 142 | - }, | |
| 143 | - searching : function() { | |
| 144 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 145 | - } | |
| 146 | - } | |
| 147 | - }); | |
| 110 | + | |
| 111 | + $.get('/basic/lineCode2Name',function(result){ | |
| 112 | + var data=[]; | |
| 113 | + | |
| 114 | + for(var code in result){ | |
| 115 | + data.push({id: code, text: result[code]}); | |
| 116 | + } | |
| 117 | + console.log(data); | |
| 118 | + initPinYinSelect2('#line',data,''); | |
| 119 | + | |
| 120 | + }) | |
| 121 | + | |
| 122 | + | |
| 148 | 123 | $('#lpName').select2({ |
| 149 | 124 | ajax: { |
| 150 | 125 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/daily.html
| ... | ... | @@ -92,45 +92,16 @@ |
| 92 | 92 | locale : 'zh-cn' |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | - $('#line').select2({ | |
| 96 | - ajax: { | |
| 97 | - url: '/realSchedule/findLine', | |
| 98 | - type: 'post', | |
| 99 | - dataType: 'json', | |
| 100 | - delay: 150, | |
| 101 | - data: function(params){ | |
| 102 | - return{line: params.term}; | |
| 103 | - }, | |
| 104 | - processResults: function (data) { | |
| 105 | - return { | |
| 106 | - results: data | |
| 107 | - }; | |
| 108 | - }, | |
| 109 | - cache: true | |
| 110 | - }, | |
| 111 | - templateResult: function(repo){ | |
| 112 | - if (repo.loading) return repo.text; | |
| 113 | - var h = '<span>'+repo.text+'</span>'; | |
| 114 | - return h; | |
| 115 | - }, | |
| 116 | - escapeMarkup: function (markup) { return markup; }, | |
| 117 | - minimumInputLength: 1, | |
| 118 | - templateSelection: function(repo){ | |
| 119 | - return repo.text; | |
| 120 | - }, | |
| 121 | - language: { | |
| 122 | - noResults: function(){ | |
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 124 | - }, | |
| 125 | - inputTooShort : function(e) { | |
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 127 | - }, | |
| 128 | - searching : function() { | |
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 130 | - } | |
| 131 | - } | |
| 132 | - }); | |
| 133 | - | |
| 95 | + $.get('/basic/lineCode2Name',function(result){ | |
| 96 | + var data=[]; | |
| 97 | + | |
| 98 | + for(var code in result){ | |
| 99 | + data.push({id: code, text: result[code]}); | |
| 100 | + } | |
| 101 | + console.log(data); | |
| 102 | + initPinYinSelect2('#line',data,''); | |
| 103 | + | |
| 104 | + }) | |
| 134 | 105 | var line; |
| 135 | 106 | var date; |
| 136 | 107 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/forms/statement/historyMessage.html
| ... | ... | @@ -80,44 +80,16 @@ |
| 80 | 80 | locale : 'zh-cn' |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - $('#line').select2({ | |
| 84 | - ajax: { | |
| 85 | - url: '/realSchedule/findLine', | |
| 86 | - type: 'post', | |
| 87 | - dataType: 'json', | |
| 88 | - delay: 150, | |
| 89 | - data: function(params){ | |
| 90 | - return{line: params.term}; | |
| 91 | - }, | |
| 92 | - processResults: function (data) { | |
| 93 | - return { | |
| 94 | - results: data | |
| 95 | - }; | |
| 96 | - }, | |
| 97 | - cache: true | |
| 98 | - }, | |
| 99 | - templateResult: function(repo){ | |
| 100 | - if (repo.loading) return repo.text; | |
| 101 | - var h = '<span>'+repo.text+'</span>'; | |
| 102 | - return h; | |
| 103 | - }, | |
| 104 | - escapeMarkup: function (markup) { return markup; }, | |
| 105 | - minimumInputLength: 1, | |
| 106 | - templateSelection: function(repo){ | |
| 107 | - return repo.text; | |
| 108 | - }, | |
| 109 | - language: { | |
| 110 | - noResults: function(){ | |
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 112 | - }, | |
| 113 | - inputTooShort : function(e) { | |
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 115 | - }, | |
| 116 | - searching : function() { | |
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 118 | - } | |
| 83 | + $.get('/basic/lineCode2Name',function(result){ | |
| 84 | + var data=[]; | |
| 85 | + | |
| 86 | + for(var code in result){ | |
| 87 | + data.push({id: code, text: result[code]}); | |
| 119 | 88 | } |
| 120 | - }); | |
| 89 | + console.log(data); | |
| 90 | + initPinYinSelect2('#line',data,''); | |
| 91 | + | |
| 92 | + }) | |
| 121 | 93 | $('#code').select2({ |
| 122 | 94 | ajax: { |
| 123 | 95 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/forms/statement/jobSummary.html
| ... | ... | @@ -194,43 +194,17 @@ |
| 194 | 194 | locale : 'zh-cn' |
| 195 | 195 | }); |
| 196 | 196 | |
| 197 | - $('#line').select2({ | |
| 198 | - ajax: { | |
| 199 | - url: '/realSchedule/findLine', | |
| 200 | - dataType: 'json', | |
| 201 | - delay: 150, | |
| 202 | - data: function(params){ | |
| 203 | - return{line: params.term}; | |
| 204 | - }, | |
| 205 | - processResults: function (data) { | |
| 206 | - return { | |
| 207 | - results: data | |
| 208 | - }; | |
| 209 | - }, | |
| 210 | - cache: true | |
| 211 | - }, | |
| 212 | - templateResult: function(repo){ | |
| 213 | - if (repo.loading) return repo.text; | |
| 214 | - var h = '<span>'+repo.text+'</span>'; | |
| 215 | - return h; | |
| 216 | - }, | |
| 217 | - escapeMarkup: function (markup) { return markup; }, | |
| 218 | - minimumInputLength: 1, | |
| 219 | - templateSelection: function(repo){ | |
| 220 | - return repo.text; | |
| 221 | - }, | |
| 222 | - language: { | |
| 223 | - noResults: function(){ | |
| 224 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 225 | - }, | |
| 226 | - inputTooShort : function(e) { | |
| 227 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 228 | - }, | |
| 229 | - searching : function() { | |
| 230 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 231 | - } | |
| 232 | - } | |
| 233 | - }); | |
| 197 | + $.get('/basic/lineCode2Name',function(result){ | |
| 198 | + var data=[]; | |
| 199 | + | |
| 200 | + for(var code in result){ | |
| 201 | + data.push({id: code, text: result[code]}); | |
| 202 | + } | |
| 203 | + console.log(data); | |
| 204 | + initPinYinSelect2('#line',data,''); | |
| 205 | + | |
| 206 | + }) | |
| 207 | + | |
| 234 | 208 | }); |
| 235 | 209 | </script> |
| 236 | 210 | <script type="text/html" id="list_forms"> | ... | ... |
src/main/resources/static/pages/forms/statement/linepassengerflow.html
| ... | ... | @@ -21,12 +21,12 @@ |
| 21 | 21 | <h1>线路客流量报表</h1> |
| 22 | 22 | </div> |
| 23 | 23 | </div> |
| 24 | - | |
| 25 | -<div class="row"> | |
| 26 | - <div class="col-md-12"> | |
| 27 | - <div class="portlet light porttlet-fit bordered"> | |
| 28 | - <div class="portlet-title"> | |
| 29 | - <form class="form-inline" action=""> | |
| 24 | + | |
| 25 | +<div class="row"> | |
| 26 | + <div class="col-md-12"> | |
| 27 | + <div class="portlet light porttlet-fit bordered"> | |
| 28 | + <div class="portlet-title"> | |
| 29 | + <form class="form-inline" action=""> | |
| 30 | 30 | <div style="display: inline-block;"> |
| 31 | 31 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| ... | ... | @@ -38,10 +38,10 @@ |
| 38 | 38 | <div class="form-group"> |
| 39 | 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 40 | 40 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 41 | - </div> | |
| 42 | - </form> | |
| 43 | - </div> | |
| 44 | - <div class="portlet-body"> | |
| 41 | + </div> | |
| 42 | + </form> | |
| 43 | + </div> | |
| 44 | + <div class="portlet-body"> | |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 47 | <thead> |
| ... | ... | @@ -56,63 +56,34 @@ |
| 56 | 56 | |
| 57 | 57 | </tbody> |
| 58 | 58 | </table> |
| 59 | - </div> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | -</div> | |
| 64 | - | |
| 65 | -<script> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | +</div> | |
| 64 | + | |
| 65 | +<script> | |
| 66 | 66 | $(function(){ |
| 67 | - var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 68 | - // 关闭左侧栏 | |
| 69 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 67 | + var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 68 | + // 关闭左侧栏 | |
| 69 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 70 | 70 | $('.menu-toggler.sidebar-toggler').click(); |
| 71 | - | |
| 72 | - $("#date").datetimepicker({ | |
| 73 | - format : 'YYYY-MM-DD', | |
| 74 | - locale : 'zh-cn' | |
| 71 | + | |
| 72 | + $("#date").datetimepicker({ | |
| 73 | + format : 'YYYY-MM-DD', | |
| 74 | + locale : 'zh-cn' | |
| 75 | 75 | }); |
| 76 | 76 | |
| 77 | - $('#line').select2({ | |
| 78 | - ajax: { | |
| 79 | - url: '/realSchedule/findLine', | |
| 80 | - type: 'post', | |
| 81 | - dataType: 'json', | |
| 82 | - delay: 150, | |
| 83 | - data: function(params){ | |
| 84 | - return{line: params.term}; | |
| 85 | - }, | |
| 86 | - processResults: function (data) { | |
| 87 | - return { | |
| 88 | - results: data | |
| 89 | - }; | |
| 90 | - }, | |
| 91 | - cache: true | |
| 92 | - }, | |
| 93 | - templateResult: function(repo){ | |
| 94 | - if (repo.loading) return repo.text; | |
| 95 | - var h = '<span>'+repo.text+'</span>'; | |
| 96 | - return h; | |
| 97 | - }, | |
| 98 | - escapeMarkup: function (markup) { return markup; }, | |
| 99 | - minimumInputLength: 1, | |
| 100 | - templateSelection: function(repo){ | |
| 101 | - return repo.text; | |
| 102 | - }, | |
| 103 | - language: { | |
| 104 | - noResults: function(){ | |
| 105 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 106 | - }, | |
| 107 | - inputTooShort : function(e) { | |
| 108 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 109 | - }, | |
| 110 | - searching : function() { | |
| 111 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 112 | - } | |
| 113 | - } | |
| 114 | - }); | |
| 115 | - | |
| 77 | + $.get('/basic/lineCode2Name',function(result){ | |
| 78 | + var data=[]; | |
| 79 | + | |
| 80 | + for(var code in result){ | |
| 81 | + data.push({id: code, text: result[code]}); | |
| 82 | + } | |
| 83 | + console.log(data); | |
| 84 | + initPinYinSelect2('#line',data,''); | |
| 85 | + | |
| 86 | + }) | |
| 116 | 87 | |
| 117 | 88 | $("#query").on("click",function(){ |
| 118 | 89 | var line = $("#line").val(); |
| ... | ... | @@ -126,10 +97,10 @@ |
| 126 | 97 | // 把渲染好的模版html文本追加到表格中 |
| 127 | 98 | $('#forms tbody').html(tbodyHtml); |
| 128 | 99 | }); |
| 129 | - }); | |
| 130 | - }); | |
| 131 | -</script> | |
| 132 | -<script type="text/html" id="list_linepasswengerflow"> | |
| 100 | + }); | |
| 101 | + }); | |
| 102 | +</script> | |
| 103 | +<script type="text/html" id="list_linepasswengerflow"> | |
| 133 | 104 | {{each list as obj i}} |
| 134 | 105 | <tr> |
| 135 | 106 | <td>{{i+1}}</td> |
| ... | ... | @@ -142,5 +113,5 @@ |
| 142 | 113 | <tr> |
| 143 | 114 | <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> |
| 144 | 115 | </tr> |
| 145 | - {{/if}} | |
| 116 | + {{/if}} | |
| 146 | 117 | </script> |
| 147 | 118 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/forms/statement/operationservice.html
| ... | ... | @@ -102,44 +102,18 @@ |
| 102 | 102 | locale : 'zh-cn' |
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | - $('#line').select2({ | |
| 106 | - ajax: { | |
| 107 | - url: '/realSchedule/findLine', | |
| 108 | - type: 'post', | |
| 109 | - dataType: 'json', | |
| 110 | - delay: 150, | |
| 111 | - data: function(params){ | |
| 112 | - return{line: params.term}; | |
| 113 | - }, | |
| 114 | - processResults: function (data) { | |
| 115 | - return { | |
| 116 | - results: data | |
| 117 | - }; | |
| 118 | - }, | |
| 119 | - cache: true | |
| 120 | - }, | |
| 121 | - templateResult: function(repo){ | |
| 122 | - if (repo.loading) return repo.text; | |
| 123 | - var h = '<span>'+repo.text+'</span>'; | |
| 124 | - return h; | |
| 125 | - }, | |
| 126 | - escapeMarkup: function (markup) { return markup; }, | |
| 127 | - minimumInputLength: 1, | |
| 128 | - templateSelection: function(repo){ | |
| 129 | - return repo.text; | |
| 130 | - }, | |
| 131 | - language: { | |
| 132 | - noResults: function(){ | |
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 134 | - }, | |
| 135 | - inputTooShort : function(e) { | |
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 137 | - }, | |
| 138 | - searching : function() { | |
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - }); | |
| 105 | + | |
| 106 | + $.get('/basic/lineCode2Name',function(result){ | |
| 107 | + var data=[]; | |
| 108 | + | |
| 109 | + for(var code in result){ | |
| 110 | + data.push({id: code, text: result[code]}); | |
| 111 | + } | |
| 112 | + console.log(data); | |
| 113 | + initPinYinSelect2('#line',data,''); | |
| 114 | + | |
| 115 | + }) | |
| 116 | + | |
| 143 | 117 | $('#lpName').select2({ |
| 144 | 118 | ajax: { |
| 145 | 119 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -43,6 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | <div class="portlet-body"> |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 46 | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 48 | <thead> |
| 48 | 49 | <tr> |
| ... | ... | @@ -82,23 +83,23 @@ |
| 82 | 83 | <td>援外</td> |
| 83 | 84 | <td>其他</td> |
| 84 | 85 | <td>全日</td> |
| 85 | - <td>6:31~<br>8:30</td> | |
| 86 | - <td>16:01~<br>18:00</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 87 | 88 | <td>全日</td> |
| 88 | - <td>6:31~<br>8:30</td> | |
| 89 | - <td>16:01~<br>18:00</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 90 | 91 | <td>全日</td> |
| 91 | - <td>6:31~<br>8:30</td> | |
| 92 | - <td>16:01~<br>18:00</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 93 | 94 | <td>全日</td> |
| 94 | - <td>6:31~<br>8:30</td> | |
| 95 | - <td>16:01~<br>18:00</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 96 | 97 | <td>全日</td> |
| 97 | - <td>6:31~<br>8:30</td> | |
| 98 | - <td>16:01~<br>18:00</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 99 | 100 | <td>全日</td> |
| 100 | - <td>6:31~<br>8:30</td> | |
| 101 | - <td>16:01~<br>18:00</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 102 | 103 | </tr> |
| 103 | 104 | </thead> |
| 104 | 105 | |
| ... | ... | @@ -260,44 +261,18 @@ |
| 260 | 261 | locale : 'zh-cn' |
| 261 | 262 | }); |
| 262 | 263 | |
| 263 | - $('#line').select2({ | |
| 264 | - ajax: { | |
| 265 | - url: '/realSchedule/findLine', | |
| 266 | - dataType: 'json', | |
| 267 | - delay: 150, | |
| 268 | - data: function(params){ | |
| 269 | - return{line: params.term}; | |
| 270 | - }, | |
| 271 | - processResults: function (data) { | |
| 272 | - return { | |
| 273 | - results: data | |
| 274 | - }; | |
| 275 | - }, | |
| 276 | - cache: true | |
| 277 | - }, | |
| 278 | - templateResult: function(repo){ | |
| 279 | - if (repo.loading) return repo.text; | |
| 280 | - var h = '<span>'+repo.text+'</span>'; | |
| 281 | - return h; | |
| 282 | - }, | |
| 283 | - escapeMarkup: function (markup) { return markup; }, | |
| 284 | - minimumInputLength: 1, | |
| 285 | - templateSelection: function(repo){ | |
| 286 | - return repo.text; | |
| 287 | - }, | |
| 288 | - language: { | |
| 289 | - noResults: function(){ | |
| 290 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 291 | - }, | |
| 292 | - inputTooShort : function(e) { | |
| 293 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 294 | - }, | |
| 295 | - searching : function() { | |
| 296 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 297 | - } | |
| 298 | - } | |
| 299 | - }); | |
| 300 | - | |
| 264 | + | |
| 265 | + | |
| 266 | + $.get('/basic/lineCode2Name',function(result){ | |
| 267 | + var data=[]; | |
| 268 | + | |
| 269 | + for(var code in result){ | |
| 270 | + data.push({id: code, text: result[code]}); | |
| 271 | + } | |
| 272 | + console.log(data); | |
| 273 | + initPinYinSelect2('#line',data,''); | |
| 274 | + | |
| 275 | + }) | |
| 301 | 276 | //查询 |
| 302 | 277 | $("#query").on('click',function(){ |
| 303 | 278 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/pages/forms/statement/shifday.html
| ... | ... | @@ -97,44 +97,17 @@ $(function(){ |
| 97 | 97 | locale : 'zh-cn' |
| 98 | 98 | }); |
| 99 | 99 | |
| 100 | - $('#line').select2({ | |
| 101 | - ajax: { | |
| 102 | - url: '/realSchedule/findLine', | |
| 103 | - type: 'post', | |
| 104 | - dataType: 'json', | |
| 105 | - delay: 150, | |
| 106 | - data: function(params){ | |
| 107 | - return{line: params.term}; | |
| 108 | - }, | |
| 109 | - processResults: function (data) { | |
| 110 | - return { | |
| 111 | - results: data | |
| 112 | - }; | |
| 113 | - }, | |
| 114 | - cache: true | |
| 115 | - }, | |
| 116 | - templateResult: function(repo){ | |
| 117 | - if (repo.loading) return repo.text; | |
| 118 | - var h = '<span>'+repo.text+'</span>'; | |
| 119 | - return h; | |
| 120 | - }, | |
| 121 | - escapeMarkup: function (markup) { return markup; }, | |
| 122 | - minimumInputLength: 1, | |
| 123 | - templateSelection: function(repo){ | |
| 124 | - return repo.text; | |
| 125 | - }, | |
| 126 | - language: { | |
| 127 | - noResults: function(){ | |
| 128 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 129 | - }, | |
| 130 | - inputTooShort : function(e) { | |
| 131 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 132 | - }, | |
| 133 | - searching : function() { | |
| 134 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 135 | - } | |
| 136 | - } | |
| 137 | - }); | |
| 100 | + | |
| 101 | + $.get('/basic/lineCode2Name',function(result){ | |
| 102 | + var data=[]; | |
| 103 | + | |
| 104 | + for(var code in result){ | |
| 105 | + data.push({id: code, text: result[code]}); | |
| 106 | + } | |
| 107 | + console.log(data); | |
| 108 | + initPinYinSelect2('#line',data,''); | |
| 109 | + | |
| 110 | + }) | |
| 138 | 111 | |
| 139 | 112 | $("#query").on("click",function(){ |
| 140 | 113 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| ... | ... | @@ -87,44 +87,17 @@ |
| 87 | 87 | locale : 'zh-cn' |
| 88 | 88 | }); |
| 89 | 89 | |
| 90 | - $('#line').select2({ | |
| 91 | - ajax: { | |
| 92 | - url: '/realSchedule/findLine', | |
| 93 | - type: 'post', | |
| 94 | - dataType: 'json', | |
| 95 | - delay: 150, | |
| 96 | - data: function(params){ | |
| 97 | - return{line: params.term}; | |
| 98 | - }, | |
| 99 | - processResults: function (data) { | |
| 100 | - return { | |
| 101 | - results: data | |
| 102 | - }; | |
| 103 | - }, | |
| 104 | - cache: true | |
| 105 | - }, | |
| 106 | - templateResult: function(repo){ | |
| 107 | - if (repo.loading) return repo.text; | |
| 108 | - var h = '<span>'+repo.text+'</span>'; | |
| 109 | - return h; | |
| 110 | - }, | |
| 111 | - escapeMarkup: function (markup) { return markup; }, | |
| 112 | - minimumInputLength: 1, | |
| 113 | - templateSelection: function(repo){ | |
| 114 | - return repo.text; | |
| 115 | - }, | |
| 116 | - language: { | |
| 117 | - noResults: function(){ | |
| 118 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 119 | - }, | |
| 120 | - inputTooShort : function(e) { | |
| 121 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 122 | - }, | |
| 123 | - searching : function() { | |
| 124 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 125 | - } | |
| 126 | - } | |
| 127 | - }); | |
| 90 | + | |
| 91 | + $.get('/basic/lineCode2Name',function(result){ | |
| 92 | + var data=[]; | |
| 93 | + | |
| 94 | + for(var code in result){ | |
| 95 | + data.push({id: code, text: result[code]}); | |
| 96 | + } | |
| 97 | + console.log(data); | |
| 98 | + initPinYinSelect2('#line',data,''); | |
| 99 | + | |
| 100 | + }) | |
| 128 | 101 | $('#lpName').select2({ |
| 129 | 102 | ajax: { |
| 130 | 103 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/singledata.html
| ... | ... | @@ -92,44 +92,18 @@ |
| 92 | 92 | locale : 'zh-cn' |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | - $('#line').select2({ | |
| 96 | - ajax: { | |
| 97 | - url: '/realSchedule/findLine', | |
| 98 | - type: 'post', | |
| 99 | - dataType: 'json', | |
| 100 | - delay: 150, | |
| 101 | - data: function(params){ | |
| 102 | - return{line: params.term}; | |
| 103 | - }, | |
| 104 | - processResults: function (data) { | |
| 105 | - return { | |
| 106 | - results: data | |
| 107 | - }; | |
| 108 | - }, | |
| 109 | - cache: true | |
| 110 | - }, | |
| 111 | - templateResult: function(repo){ | |
| 112 | - if (repo.loading) return repo.text; | |
| 113 | - var h = '<span>'+repo.text+'</span>'; | |
| 114 | - return h; | |
| 115 | - }, | |
| 116 | - escapeMarkup: function (markup) { return markup; }, | |
| 117 | - minimumInputLength: 1, | |
| 118 | - templateSelection: function(repo){ | |
| 119 | - return repo.text; | |
| 120 | - }, | |
| 121 | - language: { | |
| 122 | - noResults: function(){ | |
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 124 | - }, | |
| 125 | - inputTooShort : function(e) { | |
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 127 | - }, | |
| 128 | - searching : function() { | |
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 130 | - } | |
| 131 | - } | |
| 132 | - }); | |
| 95 | + | |
| 96 | + $.get('/basic/lineCode2Name',function(result){ | |
| 97 | + var data=[]; | |
| 98 | + | |
| 99 | + for(var code in result){ | |
| 100 | + data.push({id: code, text: result[code]}); | |
| 101 | + } | |
| 102 | + console.log(data); | |
| 103 | + initPinYinSelect2('#line',data,''); | |
| 104 | + | |
| 105 | + }) | |
| 106 | + | |
| 133 | 107 | $('#lpName').select2({ |
| 134 | 108 | ajax: { |
| 135 | 109 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| ... | ... | @@ -43,6 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | <div class="portlet-body"> |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 46 | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 48 | <thead> |
| 48 | 49 | <tr> |
| ... | ... | @@ -70,7 +71,7 @@ |
| 70 | 71 | <td rowspan="2">原因</td> |
| 71 | 72 | </tr> |
| 72 | 73 | <tr> |
| 73 | - <td>路阻</td> | |
| 74 | + <td width="31px">路阻</td> | |
| 74 | 75 | <td>吊慢</td> |
| 75 | 76 | <td>故障</td> |
| 76 | 77 | <td>纠纷</td> |
| ... | ... | @@ -82,23 +83,23 @@ |
| 82 | 83 | <td>援外</td> |
| 83 | 84 | <td>其他</td> |
| 84 | 85 | <td>全日</td> |
| 85 | - <td>6:31~8:30</td> | |
| 86 | - <td>16:01~18:00</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 87 | 88 | <td>全日</td> |
| 88 | - <td>6:31~8:30</td> | |
| 89 | - <td>16:01~18:00</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 90 | 91 | <td>全日</td> |
| 91 | - <td>6:31~8:30</td> | |
| 92 | - <td>16:01~18:00</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 93 | 94 | <td>全日</td> |
| 94 | - <td>6:31~8:30</td> | |
| 95 | - <td>16:01~18:00</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 96 | 97 | <td>全日</td> |
| 97 | - <td>6:31~8:30</td> | |
| 98 | - <td>16:01~18:00</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 99 | 100 | <td>全日</td> |
| 100 | - <td>6:31~8:30</td> | |
| 101 | - <td>16:01~18:00</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 102 | 103 | </tr> |
| 103 | 104 | </thead> |
| 104 | 105 | <tbody class="statisticsDaily"> |
| ... | ... | @@ -163,44 +164,18 @@ |
| 163 | 164 | format : 'YYYY-MM-DD', |
| 164 | 165 | locale : 'zh-cn' |
| 165 | 166 | }); |
| 167 | + $.get('/basic/lineCode2Name',function(result){ | |
| 168 | + var data=[]; | |
| 169 | + | |
| 170 | + for(var code in result){ | |
| 171 | + data.push({id: code, text: result[code]}); | |
| 172 | + } | |
| 173 | + console.log(data); | |
| 174 | + initPinYinSelect2('#line',data,''); | |
| 175 | + | |
| 176 | + }) | |
| 166 | 177 | |
| 167 | - $('#line').select2({ | |
| 168 | - ajax: { | |
| 169 | - url: '/realSchedule/findLine', | |
| 170 | - dataType: 'json', | |
| 171 | - delay: 150, | |
| 172 | - data: function(params){ | |
| 173 | - return{line: params.term}; | |
| 174 | - }, | |
| 175 | - processResults: function (data) { | |
| 176 | - return { | |
| 177 | - results: data | |
| 178 | - }; | |
| 179 | - }, | |
| 180 | - cache: true | |
| 181 | - }, | |
| 182 | - templateResult: function(repo){ | |
| 183 | - if (repo.loading) return repo.text; | |
| 184 | - var h = '<span>'+repo.text+'</span>'; | |
| 185 | - return h; | |
| 186 | - }, | |
| 187 | - escapeMarkup: function (markup) { return markup; }, | |
| 188 | - minimumInputLength: 1, | |
| 189 | - templateSelection: function(repo){ | |
| 190 | - return repo.text; | |
| 191 | - }, | |
| 192 | - language: { | |
| 193 | - noResults: function(){ | |
| 194 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 195 | - }, | |
| 196 | - inputTooShort : function(e) { | |
| 197 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 198 | - }, | |
| 199 | - searching : function() { | |
| 200 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 201 | - } | |
| 202 | - } | |
| 203 | - }); | |
| 178 | + | |
| 204 | 179 | $("#query").on("click",function(){ |
| 205 | 180 | var line = $("#line").val(); |
| 206 | 181 | var xlName = $("#select2-line-container").html(); | ... | ... |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| ... | ... | @@ -82,44 +82,19 @@ |
| 82 | 82 | locale : 'zh-cn' |
| 83 | 83 | }); |
| 84 | 84 | |
| 85 | - $('#line').select2({ | |
| 86 | - ajax: { | |
| 87 | - url: '/realSchedule/findLine', | |
| 88 | - type: 'post', | |
| 89 | - dataType: 'json', | |
| 90 | - delay: 150, | |
| 91 | - data: function(params){ | |
| 92 | - return{line: params.term}; | |
| 93 | - }, | |
| 94 | - processResults: function (data) { | |
| 95 | - return { | |
| 96 | - results: data | |
| 97 | - }; | |
| 98 | - }, | |
| 99 | - cache: true | |
| 100 | - }, | |
| 101 | - templateResult: function(repo){ | |
| 102 | - if (repo.loading) return repo.text; | |
| 103 | - var h = '<span>'+repo.text+'</span>'; | |
| 104 | - return h; | |
| 105 | - }, | |
| 106 | - escapeMarkup: function (markup) { return markup; }, | |
| 107 | - minimumInputLength: 1, | |
| 108 | - templateSelection: function(repo){ | |
| 109 | - return repo.text; | |
| 110 | - }, | |
| 111 | - language: { | |
| 112 | - noResults: function(){ | |
| 113 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 114 | - }, | |
| 115 | - inputTooShort : function(e) { | |
| 116 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 117 | - }, | |
| 118 | - searching : function() { | |
| 119 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 120 | - } | |
| 121 | - } | |
| 122 | - }); | |
| 85 | + | |
| 86 | + $.get('/basic/lineCode2Name',function(result){ | |
| 87 | + var data=[]; | |
| 88 | + | |
| 89 | + for(var code in result){ | |
| 90 | + data.push({id: code, text: result[code]}); | |
| 91 | + } | |
| 92 | + console.log(data); | |
| 93 | + initPinYinSelect2('#line',data,''); | |
| 94 | + | |
| 95 | + }) | |
| 96 | + | |
| 97 | + | |
| 123 | 98 | $('#lpName').select2({ |
| 124 | 99 | ajax: { |
| 125 | 100 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/waybill.html
| ... | ... | @@ -96,7 +96,18 @@ |
| 96 | 96 | locale : 'zh-cn' |
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | - $('#line').select2({ | |
| 99 | + $.get('/basic/lineCode2Name',function(result){ | |
| 100 | + var data=[]; | |
| 101 | + | |
| 102 | + for(var code in result){ | |
| 103 | + data.push({id: code, text: result[code]}); | |
| 104 | + } | |
| 105 | + console.log(data); | |
| 106 | + initPinYinSelect2('#line',data,''); | |
| 107 | + | |
| 108 | + }) | |
| 109 | + | |
| 110 | + /* $('#line').select2({ | |
| 100 | 111 | ajax: { |
| 101 | 112 | url: '/realSchedule/findLine', |
| 102 | 113 | type: 'post', |
| ... | ... | @@ -134,7 +145,7 @@ |
| 134 | 145 | } |
| 135 | 146 | } |
| 136 | 147 | }); |
| 137 | - | |
| 148 | + */ | |
| 138 | 149 | var date = ''; |
| 139 | 150 | $("#query").on("click",function(){ |
| 140 | 151 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/pages/forms/statement/waybillday.html
| ... | ... | @@ -79,45 +79,16 @@ |
| 79 | 79 | locale : 'zh-cn' |
| 80 | 80 | }); |
| 81 | 81 | |
| 82 | - $('#line').select2({ | |
| 83 | - ajax: { | |
| 84 | - url: '/realSchedule/findLine', | |
| 85 | - type: 'post', | |
| 86 | - dataType: 'json', | |
| 87 | - delay: 150, | |
| 88 | - data: function(params){ | |
| 89 | - return{line: params.term}; | |
| 90 | - }, | |
| 91 | - processResults: function (data) { | |
| 92 | - return { | |
| 93 | - results: data | |
| 94 | - }; | |
| 95 | - }, | |
| 96 | - cache: true | |
| 97 | - }, | |
| 98 | - templateResult: function(repo){ | |
| 99 | - if (repo.loading) return repo.text; | |
| 100 | - var h = '<span>'+repo.text+'</span>'; | |
| 101 | - return h; | |
| 102 | - }, | |
| 103 | - escapeMarkup: function (markup) { return markup; }, | |
| 104 | - minimumInputLength: 1, | |
| 105 | - templateSelection: function(repo){ | |
| 106 | - return repo.text; | |
| 107 | - }, | |
| 108 | - language: { | |
| 109 | - noResults: function(){ | |
| 110 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 111 | - }, | |
| 112 | - inputTooShort : function(e) { | |
| 113 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 114 | - }, | |
| 115 | - searching : function() { | |
| 116 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 117 | - } | |
| 118 | - } | |
| 119 | - }); | |
| 120 | - | |
| 82 | + $.get('/basic/lineCode2Name',function(result){ | |
| 83 | + var data=[]; | |
| 84 | + | |
| 85 | + for(var code in result){ | |
| 86 | + data.push({id: code, text: result[code]}); | |
| 87 | + } | |
| 88 | + console.log(data); | |
| 89 | + initPinYinSelect2('#line',data,''); | |
| 90 | + | |
| 91 | + }) | |
| 121 | 92 | var line; |
| 122 | 93 | var date; |
| 123 | 94 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/report/inoutstation.html
| ... | ... | @@ -169,44 +169,17 @@ |
| 169 | 169 | locale : 'zh-cn' |
| 170 | 170 | }); |
| 171 | 171 | |
| 172 | - $('#line').select2({ | |
| 173 | - ajax: { | |
| 174 | - url: '/realSchedule/findLine', | |
| 175 | - type: 'post', | |
| 176 | - dataType: 'json', | |
| 177 | - delay: 150, | |
| 178 | - data: function(params){ | |
| 179 | - return{line: params.term}; | |
| 180 | - }, | |
| 181 | - processResults: function (data) { | |
| 182 | - return { | |
| 183 | - results: data | |
| 184 | - }; | |
| 185 | - }, | |
| 186 | - cache: true | |
| 187 | - }, | |
| 188 | - templateResult: function(repo){ | |
| 189 | - if (repo.loading) return repo.text; | |
| 190 | - var h = '<span>'+repo.text+'</span>'; | |
| 191 | - return h; | |
| 192 | - }, | |
| 193 | - escapeMarkup: function (markup) { return markup; }, | |
| 194 | - minimumInputLength: 1, | |
| 195 | - templateSelection: function(repo){ | |
| 196 | - return repo.text; | |
| 197 | - }, | |
| 198 | - language: { | |
| 199 | - noResults: function(){ | |
| 200 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 201 | - }, | |
| 202 | - inputTooShort : function(e) { | |
| 203 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 204 | - }, | |
| 205 | - searching : function() { | |
| 206 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 207 | - } | |
| 172 | + | |
| 173 | + $.get('/basic/lineCode2Name',function(result){ | |
| 174 | + var data=[]; | |
| 175 | + | |
| 176 | + for(var code in result){ | |
| 177 | + data.push({id: code, text: result[code]}); | |
| 208 | 178 | } |
| 209 | - }); | |
| 179 | + console.log(data); | |
| 180 | + initPinYinSelect2('#line',data,''); | |
| 181 | + | |
| 182 | + }) | |
| 210 | 183 | |
| 211 | 184 | |
| 212 | 185 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/report/message/message.html
| ... | ... | @@ -112,44 +112,16 @@ |
| 112 | 112 | $("#date").val(year + "-0" + month + "-" + day); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $('#line').select2({ | |
| 116 | - ajax: { | |
| 117 | - url: '/realSchedule/findLine', | |
| 118 | - type: 'post', | |
| 119 | - dataType: 'json', | |
| 120 | - delay: 150, | |
| 121 | - data: function(params){ | |
| 122 | - return{line: params.term}; | |
| 123 | - }, | |
| 124 | - processResults: function (data) { | |
| 125 | - return { | |
| 126 | - results: data | |
| 127 | - }; | |
| 128 | - }, | |
| 129 | - cache: true | |
| 130 | - }, | |
| 131 | - templateResult: function(repo){ | |
| 132 | - if (repo.loading) return repo.text; | |
| 133 | - var h = '<span>'+repo.text+'</span>'; | |
| 134 | - return h; | |
| 135 | - }, | |
| 136 | - escapeMarkup: function (markup) { return markup; }, | |
| 137 | - minimumInputLength: 1, | |
| 138 | - templateSelection: function(repo){ | |
| 139 | - return repo.text; | |
| 140 | - }, | |
| 141 | - language: { | |
| 142 | - noResults: function(){ | |
| 143 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 144 | - }, | |
| 145 | - inputTooShort : function(e) { | |
| 146 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 147 | - }, | |
| 148 | - searching : function() { | |
| 149 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 150 | - } | |
| 115 | + $.get('/basic/lineCode2Name',function(result){ | |
| 116 | + var data=[]; | |
| 117 | + | |
| 118 | + for(var code in result){ | |
| 119 | + data.push({id: code, text: result[code]}); | |
| 151 | 120 | } |
| 152 | - }); | |
| 121 | + console.log(data); | |
| 122 | + initPinYinSelect2('#line',data,''); | |
| 123 | + | |
| 124 | + }) | |
| 153 | 125 | $('#code').select2({ |
| 154 | 126 | ajax: { |
| 155 | 127 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/report/oil/oilListMonth.html
| ... | ... | @@ -103,44 +103,16 @@ |
| 103 | 103 | $("#date").val(year + "-0" + month + "-" + day); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $('#line').select2({ | |
| 107 | - ajax: { | |
| 108 | - url: '/realSchedule/findLine', | |
| 109 | - dataType: 'json', | |
| 110 | - delay: 150, | |
| 111 | - data: function(params){ | |
| 112 | - return{line: params.term}; | |
| 113 | - }, | |
| 114 | - processResults: function (data) { | |
| 115 | - return { | |
| 116 | - results: data | |
| 117 | - }; | |
| 118 | - }, | |
| 119 | - cache: true | |
| 120 | - }, | |
| 121 | - templateResult: function(repo){ | |
| 122 | - if (repo.loading) return repo.text; | |
| 123 | - var h = '<span>'+repo.text+'</span>'; | |
| 124 | - return h; | |
| 125 | - }, | |
| 126 | - escapeMarkup: function (markup) { return markup; }, | |
| 127 | - minimumInputLength: 1, | |
| 128 | - templateSelection: function(repo){ | |
| 129 | - return repo.text; | |
| 130 | - }, | |
| 131 | - language: { | |
| 132 | - noResults: function(){ | |
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 134 | - }, | |
| 135 | - inputTooShort : function(e) { | |
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 137 | - }, | |
| 138 | - searching : function() { | |
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - }); | |
| 143 | - | |
| 106 | + $.get('/basic/lineCode2Name',function(result){ | |
| 107 | + var data=[]; | |
| 108 | + | |
| 109 | + for(var code in result){ | |
| 110 | + data.push({id: code, text: result[code]}); | |
| 111 | + } | |
| 112 | + console.log(data); | |
| 113 | + initPinYinSelect2('#line',data,''); | |
| 114 | + | |
| 115 | + }) | |
| 144 | 116 | //查询 |
| 145 | 117 | $("#query").on('click',function(){ |
| 146 | 118 | var line = $("#line").val(); | ... | ... |