Commit 6bb8e6a7343fe4d17ad0819a0e4490cd2815a24f

Authored by ljq
2 parents 5e51ae8b 724dc6e3

Merge remote-tracking branch 'origin/minhang_2024_04' into minhang_2024_04

src/main/java/com/bsth/XDApplication.java
1   -package com.bsth;
2   -
3   -import com.bsth.data.BasicData;
4   -import com.bsth.data.LineVersionsData;
5   -import com.bsth.data.ThreadMonotor;
6   -import com.bsth.data.car_out_info.UpdateDBThread;
7   -import com.bsth.data.directive.DirectivesPstThread;
8   -import com.bsth.data.forecast.SampleTimeDataLoader;
9   -import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread;
10   -import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread;
11   -import com.bsth.data.msg_queue.DirectivePushQueue;
12   -import com.bsth.data.msg_queue.WebSocketPushQueue;
13   -import com.bsth.data.safe_driv.SafeDrivDataLoadThread;
14   -import com.bsth.data.schedule.DayOfSchedule;
15   -import com.bsth.data.schedule.auto_exec.AutoExecScanThread;
16   -import com.bsth.data.schedule.e_state_check.thread.FixedCheckStationCodeThread;
17   -import com.bsth.data.schedule.edit_logs.SeiPstThread;
18   -import com.bsth.data.schedule.late_adjust.ScheduleLateThread;
19   -import com.bsth.data.schedule.signal.SchSiginUpdateDBThread;
20   -import com.bsth.data.schedule.thread.CalcOilThread;
21   -import com.bsth.data.schedule.thread.SchedulePstThread;
22   -import com.bsth.data.schedule.thread.ScheduleRefreshThread;
23   -import com.bsth.data.schedule.thread.SubmitToTrafficManage;
24   -import com.bsth.util.DateUtils;
25   -import com.bsth.util.Tools;
26   -import org.slf4j.Logger;
27   -import org.slf4j.LoggerFactory;
28   -import org.springframework.beans.factory.annotation.Autowired;
29   -import org.springframework.boot.CommandLineRunner;
30   -import org.springframework.stereotype.Component;
31   -
32   -import java.util.concurrent.ScheduledExecutorService;
33   -import java.util.concurrent.TimeUnit;
34   -
35   -/**
36   - * 线调大部分服务都在这里启动
37   - * Created by panzhao on 2017/5/14.
38   - */
39   -@Component
40   -public class XDApplication implements CommandLineRunner {
41   -
42   - Logger log = LoggerFactory.getLogger(this.getClass());
43   -
44   - @Autowired
45   - BasicData.BasicDataLoader basicDataLoader;
46   - @Autowired
47   - UpdateDBThread fcxxUpdateThread;
48   - @Autowired
49   - ScheduleRefreshThread scheduleRefreshThread;
50   - @Autowired
51   - SchedulePstThread schedulePstThread;
52   - @Autowired
53   - ScheduleLateThread scheduleLateThread;
54   - @Autowired
55   - SubmitToTrafficManage submitToTrafficManage;
56   - @Autowired
57   - CalcOilThread calcOilThread;
58   - @Autowired
59   - DirectivesPstThread directivesPstThread;
60   - @Autowired
61   - ThreadMonotor threadMonotor;
62   - @Autowired
63   - SeiPstThread seiPstThread;
64   - @Autowired
65   - SampleTimeDataLoader sampleTimeDataLoader;
66   - @Autowired
67   - SchSiginUpdateDBThread schSiginUpdateDBThread;
68   - @Autowired
69   - AutoExecScanThread autoExecScanThread;
70   -
71   - @Autowired
72   - GpsDataLoaderThread gpsDataLoader;
73   -
74   - @Autowired
75   - OfflineMonitorThread offlineMonitorThread;
76   -
77   - @Autowired
78   - LineVersionsData lineVersionsData;
79   -
80   - /*@Autowired
81   - FixedEnableVerionsThread fixedEnableVerionsThread;*/
82   -
83   - @Autowired
84   - SafeDrivDataLoadThread safeDrivDataLoadThread;
85   -
86   - @Autowired
87   - FixedCheckStationCodeThread fixedCheckStationCodeThread;
88   -
89   - private static long timeDiff;
90   - private static long timeDiffTraffic;
91   -
92   - static {
93   - // 早上2:20
94   - timeDiff = (DateUtils.getTimestamp() + 1000 * 60 * 140) - System.currentTimeMillis();
95   - if (timeDiff < 0)
96   - timeDiff += (1000 * 60 * 60 * 24);
97   - // 早上07:00
98   - timeDiffTraffic = (DateUtils.getTimestamp() + 1000 * 60 * 60 * 7) - System.currentTimeMillis();
99   - if (timeDiffTraffic < 0)
100   - timeDiffTraffic += (1000 * 60 * 60 * 24);
101   - }
102   -
103   - @Override
104   - public void run(String... strings) throws Exception {
105   - try {
106   - Tools tools = new Tools("application.properties");
107   - String environment = tools.getValue("spring.profiles.active");
108   - //预先加载基础的对照数据
109   - basicDataLoader.loadAllData();
110   - switch (environment){
111   - case "dev":
112   - devInit();
113   - break;
114   - case "prod":
115   - prodInit();
116   - break;
117   - }
118   - }catch (Exception e){
119   - log.error("线调后台启动出现异常!!", e);
120   - System.exit(1);
121   - }
122   - }
123   -
124   - @Autowired
125   - DayOfSchedule dayOfSchedule;
126   - public void devInit(){
127   - log.info("devInit...");
128   - ScheduledExecutorService sexec = Application.mainServices;
129   - //抓取GPS数据
130   - GpsDataLoaderThread.setFlag(-1);
131   - //dayOfSchedule.dataRecovery();
132   - //sexec.scheduleWithFixedDelay(gpsDataLoader, 60, 4, TimeUnit.SECONDS);
133   - //实际排班更新线程
134   - //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
135   - //sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 30, TimeUnit.SECONDS);//检查班次误点
136   - //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行
137   - //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
138   -
139   - //sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 50, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
140   - //实际排班延迟入库线程
141   - //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
142   - //班次修正日志延迟入库
143   - //sexec.scheduleWithFixedDelay(seiPstThread, 60, 30, TimeUnit.SECONDS);
144   - //调度指令延迟入库
145   - //sexec.scheduleWithFixedDelay(directivesPstThread, 180, 180, TimeUnit.SECONDS);
146   - //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
147   - //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
148   -
149   - //安全驾驶
150   - //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS);
151   -
152   - //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 20, 60 * 2 , TimeUnit.SECONDS);
153   - }
154   -
155   - public void prodInit(){
156   - log.info("prodInit...");
157   - ScheduledExecutorService sexec = Application.mainServices;
158   - //安全驾驶
159   - //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS);
160   -
161   - /** 线调业务 */
162   - sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
163   - sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
164   - GpsDataLoaderThread.setFlag(-1);
165   - sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
166   - sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
167   -
168   - sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线
169   - sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程
170   - sexec.scheduleWithFixedDelay(seiPstThread, 180, 60, TimeUnit.SECONDS);//班次修正日志入库
171   - sexec.scheduleWithFixedDelay(directivesPstThread, 120, 60, TimeUnit.SECONDS);//调度指令延迟入库
172   - //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
173   - sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据
174   - sexec.scheduleWithFixedDelay(basicDataLoader, 1, 1, TimeUnit.HOURS);//基础数据更新
175   - sexec.scheduleWithFixedDelay(autoExecScanThread, 180, 50, TimeUnit.SECONDS);//班次自动执行
176   - DirectivePushQueue.start();//消息队列 -指令,系统下发的
177   - WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
178   -
179   - /** 线调为其他程序提供的数据 --写入数据库 */
180   - sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布)
181   - //线路首末班数据(网关用,班次更新时写入)
182   - //com.bsth.data.schedule.f_a_l.FirstAndLastHandler
183   - sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号)
184   -
185   - //运管处静态数据提交
186   - log.info(timeDiff / 1000 / 60 + "分钟之后提交到运管处");
187   - sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
188   - //计算油、公里加注
189   - sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
190   -
191   - //线路版本更新
192   - sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS);
193   -
194   - //线路版本更新
195   - //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS);
196   - }
197   -}
  1 +package com.bsth;
  2 +
  3 +import com.bsth.data.BasicData;
  4 +import com.bsth.data.LineVersionsData;
  5 +import com.bsth.data.ThreadMonotor;
  6 +import com.bsth.data.car_out_info.UpdateDBThread;
  7 +import com.bsth.data.directive.DirectivesPstThread;
  8 +import com.bsth.data.forecast.SampleTimeDataLoader;
  9 +import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread;
  10 +import com.bsth.data.gpsdata_v2.thread.OfflineMonitorThread;
  11 +import com.bsth.data.msg_queue.DirectivePushQueue;
  12 +import com.bsth.data.msg_queue.WebSocketPushQueue;
  13 +import com.bsth.data.safe_driv.SafeDrivDataLoadThread;
  14 +import com.bsth.data.schedule.DayOfSchedule;
  15 +import com.bsth.data.schedule.auto_exec.AutoExecScanThread;
  16 +import com.bsth.data.schedule.e_state_check.thread.FixedCheckStationCodeThread;
  17 +import com.bsth.data.schedule.edit_logs.SeiPstThread;
  18 +import com.bsth.data.schedule.late_adjust.ScheduleLateThread;
  19 +import com.bsth.data.schedule.signal.SchSiginUpdateDBThread;
  20 +import com.bsth.data.schedule.thread.CalcOilThread;
  21 +import com.bsth.data.schedule.thread.SchedulePstThread;
  22 +import com.bsth.data.schedule.thread.ScheduleRefreshThread;
  23 +import com.bsth.data.schedule.thread.SubmitToTrafficManage;
  24 +import com.bsth.util.DateUtils;
  25 +import com.bsth.util.Tools;
  26 +import org.slf4j.Logger;
  27 +import org.slf4j.LoggerFactory;
  28 +import org.springframework.beans.factory.annotation.Autowired;
  29 +import org.springframework.boot.CommandLineRunner;
  30 +import org.springframework.stereotype.Component;
  31 +
  32 +import java.util.concurrent.ScheduledExecutorService;
  33 +import java.util.concurrent.TimeUnit;
  34 +
  35 +/**
  36 + * 线调大部分服务都在这里启动
  37 + * Created by panzhao on 2017/5/14.
  38 + */
  39 +@Component
  40 +public class XDApplication implements CommandLineRunner {
  41 +
  42 + Logger log = LoggerFactory.getLogger(this.getClass());
  43 +
  44 + @Autowired
  45 + BasicData.BasicDataLoader basicDataLoader;
  46 + @Autowired
  47 + UpdateDBThread fcxxUpdateThread;
  48 + @Autowired
  49 + ScheduleRefreshThread scheduleRefreshThread;
  50 + @Autowired
  51 + SchedulePstThread schedulePstThread;
  52 + @Autowired
  53 + ScheduleLateThread scheduleLateThread;
  54 + @Autowired
  55 + SubmitToTrafficManage submitToTrafficManage;
  56 + @Autowired
  57 + CalcOilThread calcOilThread;
  58 + @Autowired
  59 + DirectivesPstThread directivesPstThread;
  60 + @Autowired
  61 + ThreadMonotor threadMonotor;
  62 + @Autowired
  63 + SeiPstThread seiPstThread;
  64 + @Autowired
  65 + SampleTimeDataLoader sampleTimeDataLoader;
  66 + @Autowired
  67 + SchSiginUpdateDBThread schSiginUpdateDBThread;
  68 + @Autowired
  69 + AutoExecScanThread autoExecScanThread;
  70 +
  71 + @Autowired
  72 + GpsDataLoaderThread gpsDataLoader;
  73 +
  74 + @Autowired
  75 + OfflineMonitorThread offlineMonitorThread;
  76 +
  77 + @Autowired
  78 + LineVersionsData lineVersionsData;
  79 +
  80 + /*@Autowired
  81 + FixedEnableVerionsThread fixedEnableVerionsThread;*/
  82 +
  83 + @Autowired
  84 + SafeDrivDataLoadThread safeDrivDataLoadThread;
  85 +
  86 + @Autowired
  87 + FixedCheckStationCodeThread fixedCheckStationCodeThread;
  88 +
  89 + private static long timeDiff;
  90 + private static long timeDiffTraffic;
  91 +
  92 + static {
  93 + // 早上2:20
  94 + timeDiff = (DateUtils.getTimestamp() + 1000 * 60 * 140) - System.currentTimeMillis();
  95 + if (timeDiff < 0)
  96 + timeDiff += (1000 * 60 * 60 * 24);
  97 + // 早上07:00
  98 + timeDiffTraffic = (DateUtils.getTimestamp() + 1000 * 60 * 60 * 7) - System.currentTimeMillis();
  99 + if (timeDiffTraffic < 0)
  100 + timeDiffTraffic += (1000 * 60 * 60 * 24);
  101 + }
  102 +
  103 + @Override
  104 + public void run(String... strings) throws Exception {
  105 + try {
  106 + Tools tools = new Tools("application.properties");
  107 + String environment = tools.getValue("spring.profiles.active");
  108 + //预先加载基础的对照数据
  109 + basicDataLoader.loadAllData();
  110 + switch (environment){
  111 + case "dev":
  112 + devInit();
  113 + break;
  114 + case "prod":
  115 + prodInit();
  116 + break;
  117 + case "test":
  118 + testInit();
  119 + break;
  120 + }
  121 + }catch (Exception e){
  122 + log.error("线调后台启动出现异常!!", e);
  123 + System.exit(1);
  124 + }
  125 + }
  126 +
  127 + @Autowired
  128 + DayOfSchedule dayOfSchedule;
  129 + public void devInit(){
  130 + log.info("devInit...");
  131 + ScheduledExecutorService sexec = Application.mainServices;
  132 + //抓取GPS数据
  133 + GpsDataLoaderThread.setFlag(-1);
  134 + //dayOfSchedule.dataRecovery();
  135 + //sexec.scheduleWithFixedDelay(gpsDataLoader, 60, 4, TimeUnit.SECONDS);
  136 + //实际排班更新线程
  137 + //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
  138 + //sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 30, TimeUnit.SECONDS);//检查班次误点
  139 + //sexec.scheduleWithFixedDelay(autoExecScanThread, 100, 50, TimeUnit.SECONDS);//班次自动执行
  140 + //WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
  141 +
  142 + //sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 50, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
  143 + //实际排班延迟入库线程
  144 + //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
  145 + //班次修正日志延迟入库
  146 + //sexec.scheduleWithFixedDelay(seiPstThread, 60, 30, TimeUnit.SECONDS);
  147 + //调度指令延迟入库
  148 + //sexec.scheduleWithFixedDelay(directivesPstThread, 180, 180, TimeUnit.SECONDS);
  149 + //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
  150 + //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
  151 +
  152 + //安全驾驶
  153 + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 40, 30, TimeUnit.SECONDS);
  154 +
  155 + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 20, 60 * 2 , TimeUnit.SECONDS);
  156 + }
  157 +
  158 + public void prodInit(){
  159 + log.info("prodInit...");
  160 + ScheduledExecutorService sexec = Application.mainServices;
  161 + //安全驾驶
  162 + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS);
  163 +
  164 + /** 线调业务 */
  165 + sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
  166 + sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
  167 + GpsDataLoaderThread.setFlag(-1);
  168 + sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
  169 + sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
  170 +
  171 + sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线
  172 + sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程
  173 + sexec.scheduleWithFixedDelay(seiPstThread, 180, 60, TimeUnit.SECONDS);//班次修正日志入库
  174 + sexec.scheduleWithFixedDelay(directivesPstThread, 120, 60, TimeUnit.SECONDS);//调度指令延迟入库
  175 + //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
  176 + sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据
  177 + sexec.scheduleWithFixedDelay(basicDataLoader, 1, 1, TimeUnit.HOURS);//基础数据更新
  178 + sexec.scheduleWithFixedDelay(autoExecScanThread, 180, 50, TimeUnit.SECONDS);//班次自动执行
  179 + DirectivePushQueue.start();//消息队列 -指令,系统下发的
  180 + WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
  181 +
  182 + /** 线调为其他程序提供的数据 --写入数据库 */
  183 + sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布)
  184 + //线路首末班数据(网关用,班次更新时写入)
  185 + //com.bsth.data.schedule.f_a_l.FirstAndLastHandler
  186 + sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号)
  187 +
  188 + //运管处静态数据提交
  189 + log.info(timeDiff / 1000 / 60 + "分钟之后提交到运管处");
  190 + sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
  191 + //计算油、公里加注
  192 + sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
  193 +
  194 + //线路版本更新
  195 + sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS);
  196 +
  197 + //线路版本更新
  198 + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS);
  199 + }
  200 +
  201 + public void testInit(){
  202 + log.info("testInit...");
  203 + ScheduledExecutorService sexec = Application.mainServices;
  204 + //安全驾驶
  205 + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS);
  206 +
  207 + /** 线调业务 */
  208 + sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程
  209 + sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 20, TimeUnit.SECONDS);//检查班次误点
  210 + GpsDataLoaderThread.setFlag(-1);
  211 + sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据
  212 + sexec.scheduleWithFixedDelay(fixedCheckStationCodeThread, 60, 60 * 5, TimeUnit.SECONDS);//检查班次站点编码
  213 +
  214 + sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线
  215 + sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程
  216 + sexec.scheduleWithFixedDelay(seiPstThread, 180, 60, TimeUnit.SECONDS);//班次修正日志入库
  217 + sexec.scheduleWithFixedDelay(directivesPstThread, 120, 60, TimeUnit.SECONDS);//调度指令延迟入库
  218 + //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);//线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
  219 + sexec.scheduleWithFixedDelay(sampleTimeDataLoader, 140, 120 * 60, TimeUnit.SECONDS);//到离站预测需要的站点间耗时数据
  220 + sexec.scheduleWithFixedDelay(basicDataLoader, 1, 1, TimeUnit.HOURS);//基础数据更新
  221 + sexec.scheduleWithFixedDelay(autoExecScanThread, 180, 50, TimeUnit.SECONDS);//班次自动执行
  222 + DirectivePushQueue.start();//消息队列 -指令,系统下发的
  223 + WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的
  224 +
  225 + /** 线调为其他程序提供的数据 --写入数据库 */
  226 + sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布)
  227 + //线路首末班数据(网关用,班次更新时写入)
  228 + //com.bsth.data.schedule.f_a_l.FirstAndLastHandler
  229 + sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号)
  230 +
  231 + //运管处静态数据提交
  232 + //log.info(timeDiff / 1000 / 60 + "分钟之后提交到运管处");
  233 + //sexec.scheduleAtFixedRate(submitToTrafficManage, timeDiffTraffic / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
  234 + //计算油、公里加注
  235 + sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);
  236 +
  237 + //线路版本更新
  238 + sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS);
  239 +
  240 + //线路版本更新
  241 + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS);
  242 + }
  243 +}
... ...
src/main/resources/application-test.properties 0 → 100644
  1 +server.port=9088
  2 +management.port= 9001
  3 +management.address= 127.0.0.1
  4 +
  5 +spring.jpa.hibernate.ddl-auto= none
  6 +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
  7 +#DATABASE
  8 +spring.jpa.database= MYSQL
  9 +spring.jpa.show-sql= false
  10 +spring.datasource.driver-class-name= com.mysql.jdbc.Driver
  11 +spring.datasource.url= jdbc:mysql://192.168.168.203/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  12 +spring.datasource.username= root
  13 +spring.datasource.password= root2jsp
  14 +#DATASOURCE
  15 +spring.datasource.max-active=100
  16 +spring.datasource.max-idle=8
  17 +spring.datasource.min-idle=8
  18 +spring.datasource.initial-size=5
  19 +
  20 +spring.datasource.test-on-borrow=true
  21 +spring.datasource.test-on-connect=true
  22 +spring.datasource.test-on-return=true
  23 +spring.datasource.test-while-idle=true
  24 +spring.datasource.validation-query=select 1
  25 +
  26 +##
  27 +#222.66.0.204:5555
  28 +##\u5B9E\u65F6gps
  29 +http.gps.real.url= http://192.168.168.171:8080/transport_server/rtgps/
  30 +##\u6D88\u606F\u4E0B\u53D1
  31 +#http.send.directive = http://192.168.168.171:8080/transport_server/message/
  32 +## increment offset
  33 +auto_increment_offset= -1
  34 +## send waybill results
  35 +waybill.emails= 113252620@qq.com,mhkyzd@163.com
... ...
src/main/resources/application.properties
1   -spring.profiles.active= prod
  1 +spring.profiles.active= test
2 2  
3 3 spring.mvc.view.suffix=.html
4 4 server.session.timeout=-1
... ...
src/main/resources/datatools/config-test.properties 0 → 100644
  1 +# 配置数据导入导出用到的配置信息
  2 +
  3 +# 1、kettle配置文件路径(类路径)
  4 +datatools.kettle_properties=/datatools/kettle.properties
  5 +# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
  6 +
  7 +#数据库ip地址
  8 +datatools.kvars_dbip=192.168.168.203
  9 +#数据库用户名
  10 +datatools.kvars_dbuname=root
  11 +#数据库密码
  12 +datatools.kvars_dbpwd=root2jsp
  13 +#数据库库名
  14 +datatools.kvars_dbdname=control
  15 +
  16 +# 3、上传数据配置信息
  17 +# 上传文件目录配置(根据不同的环境需要修正)
  18 +datatools.fileupload_dir=/home/bsth_control_u_d_files
  19 +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
  20 +datatools.trans_errordir=/home/bsth_control_u_d_files/erroroutput
  21 +# 临时输出文件目录
  22 +datatools.trans_tempdir=/home/bsth_control_u_d_files/temp
  23 +# 模版文件目录
  24 +datatools.trans_templatedir=/home/bsth_control_u_d_files/template
  25 +
  26 +##---------------------------- 导入数据ktr ----------------------------##
  27 +# 车辆信息导入ktr转换
  28 +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
  29 +# 人员信息导入
  30 +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
  31 +# 路牌信息导入
  32 +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
  33 +# 时刻表基础信息导入
  34 +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
  35 +# 时刻表明细信息导入(元数据)
  36 +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
  37 +# 时刻表明细编辑用数据
  38 +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
  39 +# 时刻表明细信息导入
  40 +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
  41 +# 时刻表明细信息导入2
  42 +datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
  43 +# 时刻表明细信息导入2(版本化)
  44 +datatools.ttinfodetail_datainputktr2version=/datatools/ktrs/ttinfodetailDataInput2_version.ktr
  45 +# 时刻表明细信息导入2(版本化),使用生成时刻表格式
  46 +datatools.ttinfodetail_datainputktr2version2=/datatools/ktrs/ttinfodetailDataInput2_version_2.ktr
  47 +
  48 +# 车辆配置信息导入
  49 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
  50 +# 人员配置信息导入
  51 +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
  52 +
  53 +# 排版规则信息导入
  54 +datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
  55 +
  56 +# 4、数据导出配置信息
  57 +# 导出数据文件目录配置(根据不同的环境需要修正)
  58 +datatools.fileoutput_dir=/home/bsth_control_u_d_files
  59 +
  60 +##---------------------------- 导出数据ktr -----------------------------##
  61 +# 车辆信息导出ktr转换
  62 +datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
  63 +# 人员信息导出ktr转换
  64 +datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
  65 +# 时刻表导出元数据ktr转换
  66 +datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
  67 +# 时刻表导出数据ktr转换
  68 +datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
  69 +# 排版规则导出数据ktr转换
  70 +datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
  71 +
  72 +# 车辆配置信息导出ktr转换
  73 +datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
  74 +# 人员配置信息导出ktr转换
  75 +datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
  76 +
  77 +# 路牌信息导出
  78 +datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
  79 +
  80 +
  81 +# TODO:
... ...
src/main/resources/static/pages/base/section/add_sut.html 0 → 100644
  1 +<link href="/pages/base/section/css/addmap.css" rel="stylesheet" type="text/css" />
  2 +<div class="page-head">
  3 + <div class="page-title">
  4 + <h1>添加路段</h1>
  5 + </div>
  6 +</div>
  7 +
  8 +<ul class="page-breadcrumb breadcrumb">
  9 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  10 + <li><span class="active">基础数据管理</span> <i class="fa fa-circle"></i></li>
  11 + <li><a href="/pages/base/section/list_sut.html" data-pjax>路段信息</a> <i class="fa fa-circle"></i></li>
  12 + <li><span class="active">添加路段</span></li>
  13 +</ul>
  14 +
  15 +<div class="portlet light bordered" id="form-wizard-info">
  16 + <div class="portlet-title">
  17 + <div class="caption">
  18 + <i class="icon-equalizer font-red-sunglo"></i>
  19 + <span class="caption-subject font-red-sunglo bold uppercase">添加路段
  20 + <span class="step-title"> 1 - 4 </span>
  21 + <i class="fa fa-question-circle tipso-animation" style="color: rgba(158, 158, 158, 0.49);"></i>
  22 + </span>
  23 + </div>
  24 + <div class="actions">
  25 + <div class="btn-group btn-group-devided" data-toggle="buttons">
  26 + <a class="btn btn-circle default" href="/pages/base/section/list_sut.html" style="float: right;padding: 4px 23px;" data-pjax=""><i class="fa fa-reply"></i> 退出</a>
  27 + </div>
  28 + </div>
  29 + </div>
  30 + <div class="portlet-body form">
  31 + <!-- START FORM -->
  32 + <form class="form-horizontal" id="submit_section_form" action="/" method="POST" novalidate="novalidate">
  33 + <div class="form-wizard">
  34 + <div class="form-body">
  35 + <ul class="nav nav-pills nav-justified steps">
  36 + <li class="active">
  37 + <a href="#tab1" data-toggle="tab" class="step" aria-expanded="true">
  38 + <span class="number"> 1 </span>
  39 + <span class="desc">
  40 + <i class="fa fa-check"></i> 选择添加路段方式 </span>
  41 + </a>
  42 + </li>
  43 + <li>
  44 + <a href="#tab2" data-toggle="tab" class="step">
  45 + <span class="number"> 2 </span>
  46 + <span class="desc">
  47 + <i class="fa fa-check"></i> 路段位置 </span>
  48 + </a>
  49 + </li>
  50 + <li>
  51 + <a href="#tab3" data-toggle="tab" class="step active">
  52 + <span class="number"> 3 </span>
  53 + <span class="desc">
  54 + <i class="fa fa-check"></i> 路段信息 </span>
  55 + </a>
  56 + </li>
  57 + <li>
  58 + <a href="#tab4" data-toggle="tab" class="step">
  59 + <span class="number"> 4 </span>
  60 + <span class="desc">
  61 + <i class="fa fa-check"></i> 确认 </span>
  62 + </a>
  63 + </li>
  64 + </ul>
  65 + <!-- 进度条 -->
  66 + <div id="bar" class="progress progress-striped" role="progressbar">
  67 + <div class="progress-bar progress-bar-success" style="width: 25%;"></div>
  68 + </div>
  69 +
  70 + <div class="tab-content">
  71 + <div class="alert alert-danger display-hide">
  72 + <button class="close" data-close="alert"></button>
  73 + 您的输入有误,请检查下面的输入项
  74 + </div>
  75 + <div class="alert alert-success display-none">
  76 + <button class="close" data-dismiss="alert"></button>
  77 + Your form validation is successful!
  78 + </div>
  79 +
  80 + <!-- 选择添加路段方式 -->
  81 + <div class="tab-pane active" id="tab1">
  82 + <h3 class="block"> 选择添加路段方式 </h3>
  83 + <!-- 起点名称 -->
  84 + <div class="form-group" id="formRequ">
  85 + <label class="col-md-3 control-label"><span class="required"> * </span>路段起点名称:</label>
  86 + <div class="col-md-9">
  87 + <input type="text" class="form-control input-medium" id="stationStartInput" name="stationStart">
  88 + </div>
  89 + </div>
  90 + <!-- 终点名称-->
  91 + <div class="form-group" id="formRequ">
  92 + <label class="col-md-3 control-label"><span class="required"> * </span>路段终点名称:</label>
  93 + <div class="col-md-9">
  94 + <input type="text" class="form-control input-medium" id="stationEndInput" name="stationEnd">
  95 + </div>
  96 + </div>
  97 + <!-- 新增方式 -->
  98 + <div class="form-group">
  99 + <label class="col-md-3 control-label"><span class="required"> * </span>
  100 + 新增方式&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  101 + </label>
  102 + <div class="col-md-9">
  103 + <div class="icheck-list">
  104 + <label>
  105 + <input type="radio" class="icheck" name="baseRes" value=0 checked> 系统生成
  106 + </label>
  107 + <label >
  108 + <input type="radio" class="icheck" name="baseRes" value=1 > 手动添加
  109 + </label>
  110 + </div>
  111 + </div>
  112 + </div>
  113 + </div>
  114 +
  115 + <!-- 路段位置 -->
  116 + <div class="tab-pane" id="tab2">
  117 + <h3 class="block"> 路段位置 </h3>
  118 + <div id="sectionBmap_basic"></div>
  119 + <div class="leftUtils">
  120 + <div class="btn-group" style="left: 100px;">
  121 + <a class="btn btn-sm green-seagreen dropdown-toggle" style="width: 98px;" href="javascript:;" data-toggle="dropdown" aria-expanded="false"> 绘制工具
  122 + <i class="fa fa-angle-down"></i>
  123 + </a>
  124 + <ul class="dropdown-menu pull-right" style="min-width:100px">
  125 + <li>
  126 + <a href="javascript:;" id="openDrawingManager"><i class="fa fa-pencil"></i> 打开 </a>
  127 + </li>
  128 + <li>
  129 + <a href="javascript:;" id = "closeDrawingManager"> <i class="fa fa-reply"></i> 关闭 </a>
  130 + </li>
  131 +
  132 + </ul>
  133 + </div>
  134 + </div>
  135 + </div>
  136 +
  137 + <!-- 路段信息 -->
  138 + <div class="tab-pane" id="tab3">
  139 + <h3 class="block"> 路段信息 </h3>
  140 + <input type="hidden" name="bsectionVector" id="bsectionVectorInput" />
  141 + <input type="hidden" name="gsectionVector" id="gsectionVectorInput" />
  142 + <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
  143 + <input type="hidden" name="lineId" id="lineIdInput" />
  144 + <input type="hidden" name="lineCode" id="lineCodeInput" />
  145 + <!-- 线路名称 -->
  146 + <div class="form-body">
  147 + <div class="form-group">
  148 + <label class="control-label col-md-3">
  149 + <span class="required"> * </span> 线路名称 :
  150 + </label>
  151 + <div class="col-md-6">
  152 + <select name="line" class="form-control" style="width:100%" id="lineSelect"></select>
  153 + </div>
  154 + </div>
  155 + </div>
  156 +
  157 + <!-- 路段名称 -->
  158 + <div class="form-body">
  159 + <div class="form-group">
  160 + <label class="control-label col-md-3">
  161 + <span class="required"> * </span> 路段名称:
  162 + </label>
  163 + <div class="col-md-6">
  164 + <input type="text" class="form-control" name="sectionName" id="sectionNameInput" placeholder="路段名称">
  165 + </div>
  166 + </div>
  167 + </div>
  168 +
  169 + <!-- 路段编码 -->
  170 + <div class="form-body">
  171 + <div class="form-group">
  172 + <label class="control-label col-md-3">
  173 + <span class="required"> * </span> 路段编码:
  174 + </label>
  175 + <div class="col-md-6">
  176 + <input type="text" class="form-control" name="sectionCode" id="sectionCodeInput" readonly="readonly">
  177 + </div>
  178 + </div>
  179 + </div>
  180 + <!-- 路段序号 -->
  181 + <div class="form-body">
  182 + <div class="form-group">
  183 + <label class="control-label col-md-3">
  184 + 上一路段:
  185 + </label>
  186 + <div class="col-md-6">
  187 + <select name="sectionrouteCode" style="width:100%" class="form-control" id="sectionrouteCodeSelect"></select>
  188 + <span class="help-block">说明:选择的路段将作为本路段序号的参考,成为选择路段的下一个路段。 </span>
  189 + </div>
  190 + </div>
  191 + </div>
  192 + <!-- 路段方向 -->
  193 + <div class="form-body">
  194 + <div class="form-group">
  195 + <label class="control-label col-md-3">
  196 + <span class="required"> * </span>路段方向:
  197 + </label>
  198 + <div class="col-md-6">
  199 + <select name="directions" class="form-control" id="sectionDirSelect">
  200 + <option value="">-- 请选择路段类型 --</option>
  201 + <option value="0">上行</option>
  202 + <option value="1">下行</option>
  203 + </select>
  204 + </div>
  205 + </div>
  206 + </div>
  207 + <!-- 是否撤销 -->
  208 + <div class="form-body">
  209 + <div class="form-group">
  210 + <label class="col-md-3 control-label"> <span class="required"> * </span> 是否撤销:</label>
  211 + <div class="col-md-6">
  212 + <select name="destroy" class="form-control" id="destroySelect">
  213 + <option value="">-- 请选择撤销类型 --</option>
  214 + <option value="0">否</option>
  215 + <option value="1">是</option>
  216 + </select>
  217 + </div>
  218 + </div>
  219 + </div>
  220 + <!-- 限速 -->
  221 + <div class="form-body">
  222 + <div class="form-group">
  223 + <label class="control-label col-md-3"> <span class="required"> * </span> 路段限速:</label>
  224 + <div class="col-md-6">
  225 + <input type="text" class="form-control" name="speedLimit" id="speedLimitInput">
  226 + <span class="help-block">单位:千米/时(km/h)</span>
  227 + </div>
  228 + </div>
  229 + </div>
  230 + <!-- 道路编码-->
  231 + <div class="form-body">
  232 + <div class="form-group">
  233 + <label class="control-label col-md-3">道路编码:</label>
  234 + <div class="col-md-6">
  235 + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput">
  236 + </div>
  237 + </div>
  238 + </div>
  239 + <!-- 路段距离 -->
  240 + <div class="form-body">
  241 + <div class="form-group">
  242 + <label class="col-md-3 control-label">路段距离:</label>
  243 + <div class="col-md-6">
  244 + <input type="text" class="form-control" name="sectionDistance" id="sectionDistanceInput" >
  245 + <span class="help-block">单位:公里(km)</span>
  246 + </div>
  247 + </div>
  248 + </div>
  249 + <!-- 路段时长 -->
  250 + <div class="form-body">
  251 + <div class="form-group">
  252 + <label class="col-md-3 control-label">路段时长:</label>
  253 + <div class="col-md-6">
  254 + <input type="text" class="form-control" name="sectionTime" id="sectionTimeInput" >
  255 + <span class="help-block">单位:分钟(min)</span>
  256 + </div>
  257 + </div>
  258 + </div>
  259 + <!-- 版本号 -->
  260 + <div class="form-body">
  261 + <div class="form-group">
  262 + <label class="col-md-3 control-label">版本号&nbsp;&nbsp;&nbsp;:</label>
  263 + <div class="col-md-6">
  264 + <input type="text" class="form-control" name="versions" id="versionsInput" Readonly>
  265 + </div>
  266 + </div>
  267 + </div>
  268 + <!-- 描述/说明 -->
  269 + <div class="form-group">
  270 + <label class="control-label col-md-3"> 描述/说明: </label>
  271 + <div class="col-md-6">
  272 + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea>
  273 + </div>
  274 + </div>
  275 +
  276 + </div>
  277 +
  278 + <!-- 确定提交资料信息 -->
  279 + <div class="tab-pane" id="tab4">
  280 + <h3 class="block"> 确认您提交的路段信息 </h3>
  281 +
  282 + <h4 class="form-section"> 路段信息 </h4>
  283 +
  284 + <div class="form-group">
  285 + <label class="control-label col-md-3">线路名称:</label>
  286 + <div class="col-md-4">
  287 + <p class="form-control-static" data-display="line"> </p>
  288 + </div>
  289 + </div>
  290 +
  291 + <div class="form-group">
  292 + <label class="control-label col-md-3">路段名称:</label>
  293 + <div class="col-md-4">
  294 + <p class="form-control-static" data-display="sectionName"> </p>
  295 + </div>
  296 + </div>
  297 +
  298 + <div class="form-group">
  299 + <label class="control-label col-md-3">路段编码:</label>
  300 + <div class="col-md-4">
  301 + <p class="form-control-static" data-display="sectionCode"> </p>
  302 + </div>
  303 + </div>
  304 +
  305 + <div class="form-group">
  306 + <label class="control-label col-md-3">上一路段:</label>
  307 + <div class="col-md-4">
  308 + <p class="form-control-static" data-display="sectionrouteCode"> </p>
  309 + </div>
  310 + </div>
  311 +
  312 + <div class="form-group">
  313 + <label class="control-label col-md-3">路段方向:</label>
  314 + <div class="col-md-4">
  315 + <p class="form-control-static" data-display="directions"> </p>
  316 + </div>
  317 + </div>
  318 +
  319 + <div class="form-group">
  320 + <label class="control-label col-md-3">是否撤销:</label>
  321 + <div class="col-md-4">
  322 + <p class="form-control-static" data-display="destroy"> </p>
  323 + </div>
  324 + </div>
  325 +
  326 + <div class="form-group">
  327 + <label class="control-label col-md-3">路段限速:</label>
  328 + <div class="col-md-4">
  329 + <p class="form-control-static" data-display="speedLimit"> </p>
  330 + </div>
  331 + </div>
  332 +
  333 + <div class="form-group">
  334 + <label class="control-label col-md-3">道路编码:</label>
  335 + <div class="col-md-4">
  336 + <p class="form-control-static" data-display="roadCoding"> </p>
  337 + </div>
  338 + </div>
  339 +
  340 + <div class="form-group">
  341 + <label class="control-label col-md-3">路段时长:</label>
  342 + <div class="col-md-4">
  343 + <p class="form-control-static" data-display="sectionTime"> </p>
  344 + </div>
  345 + </div>
  346 +
  347 + <div class="form-group">
  348 + <label class="control-label col-md-3">路段长度:</label>
  349 + <div class="col-md-4">
  350 + <p class="form-control-static" data-display="sectionDistance"> </p>
  351 + </div>
  352 + </div>
  353 +
  354 + <div class="form-group">
  355 + <label class="control-label col-md-3">版本号&nbsp;&nbsp;&nbsp;:</label>
  356 + <div class="col-md-4">
  357 + <p class="form-control-static" data-display="versions"> </p>
  358 + </div>
  359 + </div>
  360 +
  361 + <div class="form-group">
  362 + <label class="control-label col-md-3">描述/说明:</label>
  363 + <div class="col-md-4">
  364 + <p class="form-control-static" data-display="descriptions"> </p>
  365 + </div>
  366 + </div>
  367 +
  368 + </div>
  369 + </div>
  370 + </div>
  371 + <div class="form-actions">
  372 + <div class="row">
  373 + <div class="col-md-offset-3 col-md-9">
  374 + <a href="javascript:;" class="btn default button-previous disabled" style="display: none;">
  375 + <i class="fa fa-angle-left"></i> 返回 </a>
  376 + <a href="javascript:;" class="btn btn-outline green button-next"> 下一步
  377 + <i class="fa fa-angle-right"></i>
  378 + </a>
  379 + <a href="javascript:;" class="btn green button-submit" style="display: none;" id="submintBtn"> 提交
  380 + <i class="fa fa-check"></i>
  381 + </a>
  382 + </div>
  383 + </div>
  384 + </div>
  385 + </div>
  386 + </form>
  387 + <!-- END FORM-->
  388 + </div>
  389 +</div>
  390 +<!-- 函数方法JS类库 -->
  391 +<script src="/pages/base/section/js/add-input-function.js"></script>
  392 +<!-- 表单向导JS类库 -->
  393 +<script src="/pages/base/section/js/add-form-wizard_sut.js"></script>
  394 +<!-- 地图JS类库 -->
  395 +<script src="/pages/base/section/js/add-vmap-world.js"></script>
  396 +<!-- 表单元素事件JS类库 -->
  397 +<script src="/pages/base/section/js/add-form-events.js"></script>
  398 +<!-- reload事件 -->
  399 +<script src="/pages/base/section/js/add-form-reload.js"></script>
0 400 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/editsection_sut.html 0 → 100644
  1 +<!-- 编辑路段 -->
  2 +<div class="modal fade" id="edit_section_mobal" role="basic" aria-hidden="true">
  3 + <div class="modal-dialog">
  4 + <div class="modal-content">
  5 + <div class="modal-header">
  6 + <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
  7 + <h4 class="modal-title">路段修改</h4>
  8 + </div>
  9 + <div class="modal-body">
  10 + <form class="form-horizontal" role="form" id="edit_section__form" action="/module" method="post">
  11 + <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button>
  12 + 您的输入有误,请检查下面的输入项
  13 + </div>
  14 + <!-- 线路ID -->
  15 + <input type="hidden" name="sectionId" id="sectionIdInput">
  16 + <input type="hidden" name="sectionRouteId" id="sectionRouteIdInput">
  17 + <input type="hidden" name="sectionRouteLine" id="sectionRouteLineInput">
  18 + <input type="hidden" name="lineCode" id="lineCodeInput">
  19 + <input type="hidden" name="bsectionVector" id="bsectionVectorInput" />
  20 + <input type="hidden" name="csectionVector" id="csectionVectorInput" value=""/>
  21 + <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
  22 + <input type="hidden" name="isRoadeSpeed" id="isRoadeSpeedInput"/>
  23 + <!-- 路段名称 -->
  24 + <div class="form-body">
  25 + <div class="form-group">
  26 + <label class="control-label col-md-3">
  27 + <span class="required"> * </span> 路段名称:
  28 + </label>
  29 + <div class="col-md-6">
  30 + <input type="text" class="form-control" name="sectionName" id="sectionNameInput" placeholder="路段名称">
  31 + </div>
  32 + </div>
  33 + </div>
  34 + <!-- 路段编码 -->
  35 + <div class="form-body">
  36 + <div class="form-group">
  37 + <label class="control-label col-md-3">
  38 + <span class="required"> * </span> 路段编码:
  39 + </label>
  40 + <div class="col-md-6">
  41 + <input type="text" class="form-control" name="sectionCode" id="sectionCodeInput" placeholder="路段编码" readonly="readonly">
  42 + </div>
  43 + </div>
  44 + </div>
  45 + <!-- 路段序号 -->
  46 + <div class="form-body">
  47 + <div class="form-group">
  48 + <label class="control-label col-md-3">
  49 + 上一路段:
  50 + </label>
  51 + <div class="col-md-6">
  52 + <select name="sectionrouteCode" class="form-control" id="sectionrouteCodeSelect" style="width:100%"></select>
  53 + <span class="help-block">说明:选择的路段将作为本路段序号的参考,成为选择路段的下一个路段。 </span>
  54 + </div>
  55 + </div>
  56 + </div>
  57 + <!-- 路段方向 -->
  58 + <div class="form-body">
  59 + <div class="form-group">
  60 + <label class="control-label col-md-3">
  61 + <span class="required"> * </span>路段方向:
  62 + </label>
  63 + <div class="col-md-6">
  64 + <select name="directions" class="form-control" id="directionsSection">
  65 + <option value="">-- 请选择路段类型 --</option>
  66 + <option value="0">上行</option>
  67 + <option value="1">下行</option>
  68 + </select>
  69 + </div>
  70 + </div>
  71 + </div>
  72 + <!-- 路段限速 -->
  73 + <div class="form-body">
  74 + <div class="form-group">
  75 + <label class="control-label col-md-3">
  76 + <span class="required"> * </span> 路段限速:
  77 + </label>
  78 + <div class="col-md-6">
  79 + <input type="text" class="form-control" name="speedLimit" id="speedLimitInput" placeholder="路段限速">
  80 + <span class="help-block">单位:千米/时(km/h)</span>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + <!-- 是否撤销 -->
  85 + <div class="form-body">
  86 + <div class="form-group">
  87 + <label class="col-md-3 control-label"><span class="required"> * </span>是否撤销:</label>
  88 + <div class="col-md-6">
  89 + <select name="destroy" class="form-control" id="destroySelect">
  90 + <option value="">-- 请选择撤销类型 --</option>
  91 + <option value="0">否</option>
  92 + <option value="1">是</option>
  93 + </select>
  94 + </div>
  95 + </div>
  96 + </div>
  97 + <!-- 道路编码-->
  98 + <div class="form-body">
  99 + <div class="form-group">
  100 + <label class="control-label col-md-3">道路编码:</label>
  101 + <div class="col-md-6">
  102 + <input type="text" class="form-control" name="roadCoding" id="roadCodingCodInput" placeholder="道路编码">
  103 + </div>
  104 + </div>
  105 + </div>
  106 + <!-- 路段长度 -->
  107 + <div class="form-body">
  108 + <div class="form-group">
  109 + <label class="col-md-3 control-label">路段长度:</label>
  110 + <div class="col-md-6">
  111 + <input type="text" class="form-control" name="sectionDistance" id="sectionDistanceInput" placeholder="路段长度">
  112 + <span class="help-block">单位:公里(km)</span>
  113 + </div>
  114 + </div>
  115 + </div>
  116 + <!-- 路段时长 -->
  117 + <div class="form-body">
  118 + <div class="form-group">
  119 + <label class="col-md-3 control-label">路段历时:</label>
  120 + <div class="col-md-6">
  121 + <input type="text" class="form-control" name="sectionTime" id="sectionTimeInput" placeholder="路段时长">
  122 + <span class="help-block">单位:分钟(min)</span>
  123 + </div>
  124 + </div>
  125 + </div>
  126 + <!-- 版本号 -->
  127 + <div class="form-body">
  128 + <div class="form-group">
  129 + <label class="col-md-3 control-label">版本号&nbsp;&nbsp;&nbsp;:</label>
  130 + <div class="col-md-6">
  131 + <input type="text" class="form-control" name="versions" id="versionsInput" Readonly>
  132 + </div>
  133 + </div>
  134 + </div>
  135 + <!-- 描述/说明 -->
  136 + <div class="form-group">
  137 + <label class="control-label col-md-3"> 描述/说明: </label>
  138 + <div class="col-md-6">
  139 + <textarea class="form-control" rows="3" name="descriptions" id="descriptionsTextarea" placeholder="描述/说明"></textarea>
  140 + </div>
  141 + </div>
  142 + </form>
  143 + </div>
  144 + <div class="modal-footer">
  145 + <button type="button" class="btn default" data-dismiss="modal">取消</button>
  146 + <button type="button" class="btn btn-primary" id="editSectionButton">提交数据</button>
  147 + </div>
  148 + </div>
  149 + </div>
  150 +</div>
  151 +<script type="text/javascript">
  152 +$('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,section,fun){
  153 + // 获取路段信息.
  154 + var Section = section.getEitdSection();
  155 + // 设值表单字段值.
  156 + fun.setSectionFormValue(Section);
  157 + // 方向.
  158 + var dir = Section.sectionRouteDirections;
  159 + // 线路ID.
  160 + var lineId = Section.sectionRouteLine;
  161 + // 路段路由ID.
  162 + var sectionRouteId = Section.sectionRouteId;
  163 + // 获取路段号元素,并添加下拉属性值
  164 + ajaxd.getStation(lineId,dir,function(treeData) {
  165 + /* var options = '<option value="">请选择...</option>';
  166 + var dArray = treeData[0].children[1].children;
  167 + var eq_stationRouteCode = Section.sectionRouteCode;
  168 + for(var i = 0 ; i<dArray.length; i++){
  169 + var ptions_v = dArray[i].sectionrouteCode;
  170 + if(eq_stationRouteCode == ptions_v){
  171 + continue;
  172 + }
  173 + options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName + ' (' + ptions_v +')'
  174 + + ' --' + dirdmToName(dArray[i].sectionrouteDirections) + '</option>' ;
  175 + }
  176 + $('#sectionrouteCodeSelect').html(options);
  177 + ajaxd.findUpSectionRouteCode(lineId,dir,eq_stationRouteCode,function(str) {
  178 + if(str.length>0){
  179 + var upStationRouteCode = str[0].sectionrouteCode
  180 + $('#sectionrouteCodeSelect').val(upStationRouteCode);
  181 + }else {
  182 + $('#sectionrouteCodeSelect').val('');
  183 + }
  184 + }); */
  185 + var array = treeData[0].children[1].children,paramsD =new Array();
  186 + var eq_scetionRouteCode = Section.sectionRouteCode;
  187 + paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'});
  188 + // 遍历.
  189 + $.each(array, function(i, g){
  190 + // 判断.
  191 + if(g.sectionName!='' || g.sectionName != null) {
  192 + var ptions_v = g.sectionrouteCode;
  193 + if(eq_scetionRouteCode != ptions_v){
  194 + // 添加拼音检索下拉框格式数据数组.
  195 + paramsD.push({'id':ptions_v,
  196 + 'text':g.sectionName + '(' + ptions_v + ')' + ' --' + dirdmToName(g.sectionrouteDirections)});
  197 + }
  198 + }
  199 + });
  200 + // 初始化上一个路段拼音检索下拉框.
  201 + initPinYinSelect2($('#sectionrouteCodeSelect'),paramsD,function(selector) {
  202 + $('#sectionDirSelect').val('');// 设值方向.
  203 + ajaxd.findUpSectionRouteCode(lineId,dir,eq_scetionRouteCode,function(str) {
  204 + if(str.length>0){
  205 + var upStationRouteCode = str[0].sectionrouteCode;
  206 + $('#sectionrouteCodeSelect').select2('val',upStationRouteCode);
  207 + }else {
  208 + $('#sectionrouteCodeSelect').select2('val','请选择...');
  209 + }
  210 + });
  211 + });
  212 + });
  213 + function dirdmToName(value) {
  214 + var srStr = '';
  215 + if(value=='0')
  216 + srStr = '上行';
  217 + else if(value=='1')
  218 + srStr = '下行';
  219 + return srStr;
  220 + }
  221 + // 显示mobal
  222 + $('#edit_section_mobal').modal({show : true,backdrop: 'static',keyboard: false});
  223 + // 当调用 hide 实例方法时触发
  224 + $('#edit_section_mobal').on('hide.bs.modal', function () {
  225 + closeMobleSetClean();
  226 + });
  227 + function closeMobleSetClean() {
  228 + // 清除地图覆盖物
  229 + map_.clearMarkAndOverlays();
  230 + /** 设置修改路段集合对象为空 */
  231 + section.setEitdSection({});
  232 + $('.dropdown-toggle').removeClass('disabled');
  233 + $('#eidt').removeClass('btn disabled');
  234 + $('#eidt').attr("disabled",false);
  235 + /** 初始化路段信息 @return <id:路段路由ID> */
  236 + fun.initSectionInfo(sectionRouteId);
  237 + }
  238 + // 编辑表单元素
  239 + var form = $('#edit_section__form');
  240 + // 获取错误提示元素
  241 + var error = $('.alert-danger', form);
  242 + // 提交数据按钮事件
  243 + $('#editSectionButton').on('click', function() {
  244 + // 表单提交
  245 + form.submit();
  246 + });
  247 + // 表单验证
  248 + form.validate({
  249 + errorElement : 'span',
  250 + errorClass : 'help-block help-block-error',
  251 + focusInvalid : false,
  252 + rules : {
  253 + 'sectionName' : {required : true,maxlength:50},// 路段名称 必填项
  254 + 'sectionCode': {required : true,},// 路段编码 必填项
  255 + 'directions' : {required : true,},// 路段方向 必填项
  256 + 'speedLimit' : {required : true,number : true},// 路段限速 必须输入合法的数字(负数,小数)。
  257 + 'destroy' : {required : true,},// 是否撤销 必填项.
  258 + 'roadCoding' : {number : true},// 道路编码 必须输入合法的数字(负数,小数)。
  259 + 'sectionTime' : {number : true},// 路段时长 必须输入合法的数字(负数,小数)。
  260 + 'sectionDistance' : {number : true},// 路段长度 必须输入合法的数字(负数,小数)。
  261 + 'descriptions' : {maxlength: 150}// 描述与说明 最大长度.
  262 + },
  263 + invalidHandler : function(event, validator) {
  264 + error.show();
  265 + App.scrollTo(error, -200);
  266 + },
  267 + highlight : function(element) {
  268 + $(element).closest('.form-group').addClass('has-error');
  269 + },
  270 +
  271 + unhighlight : function(element) {
  272 + $(element).closest('.form-group').removeClass('has-error');
  273 +
  274 + },
  275 + success : function(label) {
  276 + label.closest('.form-group').removeClass('has-error');
  277 +
  278 + },
  279 + submitHandler : function(f) {
  280 + var params = form.serializeJSON();
  281 + params.createBy = Section.carParkCreateBy;
  282 + // 定义日期格式
  283 + var fs = 'YYYY-MM-DD HH:mm:ss'
  284 + // 设置日期
  285 + params.createDate = moment(Section.carParkCreateDate).format(fs);
  286 + error.hide();
  287 + if(params.sectionrouteCode=='请选择...')
  288 + params.sectionrouteCode='';
  289 + ajaxd.sectionUpdate(params,function(resuntDate) {
  290 + if(resuntDate.status=='SUCCESS') {
  291 + // 弹出添加成功提示消息
  292 + layer.msg('修改成功...');
  293 + }else {
  294 + // 弹出添加失败提示消息
  295 + layer.msg('修改失败...');
  296 +
  297 + }
  298 + $('#edit_section_mobal').modal('hide');
  299 + closeMobleSetClean();
  300 + });
  301 + }
  302 + });
  303 +});
  304 +</script>
0 305 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/js/add-form-wizard_sut.js 0 → 100644
  1 +/**
  2 + * @description : (TODO) 表单的导航向导、验证、提交.
  3 + *
  4 + * @author bsth@lq.
  5 + *
  6 + * @version 1.0.
  7 + */
  8 +
  9 +var FormWizard = function() {
  10 + return {
  11 + // 启动初始化向导导航.
  12 + init : function() {
  13 + if(!jQuery().bootstrapWizard) {return;}
  14 + var form = $('#submit_section_form');// 定义表单.
  15 + var error = $('.alert-danger',form);// 定义表单异常.
  16 + var success = $('.alert-success',form);// 定义表单成功.
  17 + // 表单验证.
  18 + form.validate({
  19 + errorElement : 'span',// 错误提示元素span对象.
  20 + errorClass : 'help-block help-block-error', // 错误提示元素class名称.
  21 + focusInvalid : true, // 验证错误获取焦点.
  22 + // 需要验证的表单元素.
  23 + rules : {
  24 + 'stationStart' : {required : true,maxlength:50,},// 起点 必填项.
  25 + 'stationEnd' : {required : true,maxlength:50,},// 终点 必填项.
  26 + 'line' : {required : true},// 线路名称 必填项.
  27 + 'sectionName' : {required : true,maxlength: 50},// 路段名称 必填项.
  28 + 'sectionCode' : {required : true},// 路段编码 必填项.
  29 + 'directions' : {required : true},// 路段方向 必填项.
  30 + 'destroy' : {required : true},// 是否撤销 必填项.
  31 + 'roadCoding' : {number : true},// 道路编码 必须输入合法的数字(负数,小数)。
  32 + 'sectionTime' : {number : true},// 路段时长 必须输入合法的数字(负数,小数)。
  33 + 'sectionDistance' : {number : true},// 路段距离 必须输入合法的数字(负数,小数)。
  34 + 'speedLimit' : {required : true,number : true},// 必填项 路段限速 必须输入合法的数字(负数,小数)。
  35 + 'descriptions' : {maxlength: 200}// 描述/说明 输入长度最多是 200 的字符串(汉字算一个字符)。
  36 + },
  37 + /**
  38 + * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。
  39 + *
  40 + * 参数:该回调函数有两个参数:第一个为一个事件对象,第二个为验证器(validator).
  41 + */
  42 + invalidHandler : function(event, validator) {
  43 + error.show();// 显示表单未通过提示信息.
  44 + App.scrollTo(error, -200);// 把提示信息放到指定的位置。
  45 + },
  46 +
  47 + /**
  48 + * 类型:Callback。
  49 + *
  50 + * 默认:添加errorClass("has-error")到表单元素。将未通过验证的表单元素设置高亮。
  51 + */
  52 + highlight : function(element) {
  53 + $(element).closest('.form-group').addClass('has-error'); // 添加errorClass("has-error")到表单元素.
  54 + },
  55 +
  56 + /**
  57 + * 类型:Callback。
  58 + *
  59 + * 默认:移除errorClass("has-error")。与highlight操作相反.
  60 + */
  61 + unhighlight : function(element) {
  62 + $(element).closest('.form-group').removeClass('has-error');// 移除errorClass("has-error") .
  63 + },
  64 +
  65 + /**
  66 + * 类型:String,Callback。
  67 + *
  68 + * 如果指定它,当验证通过时显示一个消息。
  69 + *
  70 + * 如果是String类型的,则添加该样式到标签中;
  71 + *
  72 + * 如果是一个回调函数,则将标签作为其唯一的参数。
  73 + */
  74 + success : function(label) {
  75 + label.closest('.form-group').removeClass('has-error'); // 当验证通过时,移除errorClass("has-error").
  76 + },
  77 +
  78 + /**
  79 + * 类型:Callback。
  80 + *
  81 + * 默认:default (native) form submit;当表单通过验证,提交表单。回调函数有个默认参数form.
  82 + */
  83 + submitHandler : function(f) {
  84 + // 防止用户多次提交
  85 + $("#submintBtn").addClass("disabled");
  86 + var params = form.serializeJSON();// 表单序列化.
  87 + if(params.bsectionVector=='') {
  88 + layer.msg('路段几何图形为空~请先在路段位置步骤中绘制出线路走向!');
  89 + return;
  90 + }
  91 + // 保存路段.
  92 + PublicFunctions.sectionSave(params,function(data) {
  93 + if(data.status=='SUCCESS') {
  94 + layer.msg('添加成功...');// 弹出添加成功提示消息.
  95 + }else {
  96 + layer.msg('添加失败...');// 弹出添加失败提示消息.
  97 + }
  98 + loadPage('list_sut.html');// 返回list.html页面.
  99 + });
  100 + $("#submintBtn").removeClass("disabled");
  101 + }
  102 + });
  103 +
  104 + // 确认提交信息.
  105 + var displayConfirm = function() {
  106 + // 遍历表单元素下的tab4的class名称为form-control-static.
  107 + $('#tab4 .form-control-static', form).each(function(){
  108 + // 定义input
  109 + var input = $('[name="'+$(this).attr("data-display")+'"]', form);
  110 + if (input.is(":radio")) {
  111 + input = $('[name="'+$(this).attr("data-display")+'"]:checked', form);
  112 + }
  113 + if (input.is(":text") || input.is("textarea")) {
  114 + $(this).html(input.val());
  115 + } else if (input.is("select")) {
  116 + $(this).html(input.find('option:selected').text());
  117 + } else if (input.is(":radio") && input.is(":checked")) {
  118 + $(this).html(input.attr("data-title"));
  119 + } else if ($(this).attr("data-display") == 'payment[]') {
  120 + var payment = [];
  121 + $('[name="payment[]"]:checked', form).each(function(){
  122 + payment.push($(this).attr('data-title'));
  123 + });
  124 + $(this).html(payment.join("<br>"));
  125 + }
  126 + });
  127 + }
  128 +
  129 + /** 按钮点击时触发 */
  130 + var handleTitle = function(tab, navigation, index) {
  131 + $('.tipso-animation').tipso('hide');
  132 + var total = navigation.find('li').length;// 定义导航条标签个数.
  133 + var current = index + 1; // 当前标签页
  134 + $('.step-title', $('#form-wizard-info')).text((index + 1) + ' - ' + total);// 设置向导标题.
  135 + jQuery('li', $('#form-wizard-info')).removeClass("done");// 删除"done"样式.
  136 + var li_list = navigation.find('li');// 获取导航标签元素集合.
  137 + // 遍历
  138 + for (var i = 0; i < index; i++) {
  139 + jQuery(li_list[i]).addClass("done");// 追加done样式.
  140 + }
  141 + /** 如果为第一步隐藏返回按钮,否则显示返回按钮. */
  142 + if (current == 1) {
  143 + $('#submit_section_form').find('.button-previous').hide();// 隐藏返回按钮.
  144 + } else {
  145 + $('#submit_section_form').find('.button-previous').show();// 显示返回按钮.
  146 + }
  147 + if (current == 2) {
  148 + var container = $("#sectionBmap_basic");
  149 + container.children().remove();
  150 + container.show();
  151 + setTimeout(function(){
  152 + SectionVmapWorlds.init();
  153 + var baseResValue = $('#submit_section_form input[name="baseRes"]:checked').val();
  154 + var stationStartValue = $('#stationStartInput').val();
  155 + var stationEndValue = $('#stationEndInput').val();
  156 + var paramsStationsArray = [];
  157 + paramsStationsArray[0] = stationStartValue;
  158 + paramsStationsArray[1]= stationEndValue;
  159 + $('#sectionNameInput').val(stationStartValue + '至' + stationEndValue );
  160 + if(baseResValue == 0) {
  161 + $('.leftUtils').hide();
  162 + // 根据站点名称获取百度坐标.
  163 + SectionVmapWorlds.stationsNameToPoints(paramsStationsArray,function(resultJson) {
  164 + // 根据坐标点获取两点之间的时间与距离.
  165 + SectionVmapWorlds.getDistanceAndDuration(resultJson,function(stationdataList) {
  166 + SectionVmapWorlds.getSectionListPlonly(stationdataList,function(sectiondata) {
  167 + $('#bsectionVectorInput').val(JSON.stringify(sectiondata));
  168 + });
  169 + });
  170 + });
  171 + }else if(baseResValue ==1) {
  172 + SectionVmapWorlds.localSearchFromAdreesToPoint(stationStartValue);
  173 + SectionVmapWorlds.localSearchFromAdreesToPoint(stationEndValue);
  174 +// SectionVmapWorlds.drawingManagerOpen();
  175 + }
  176 + $('html,body').animate({scrollTop: ($('#form-wizard-info').offset().top-5) + "px"},500);
  177 + },300)
  178 + } else if(current==3) {
  179 + setTimeout(function(){
  180 + $('html,body').animate({scrollTop: ($('#tab3').offset().top-70) + "px"});
  181 + },500);
  182 + }else if(current==4) {
  183 + setTimeout(function(){
  184 + $('html,body').animate({scrollTop: ($('#tab4').offset().top+40) + "px"});
  185 + },500);
  186 + }
  187 + /** 如果为最后一步显示提交按钮,隐藏下一步按钮,否则隐藏提交按钮,显示下一步按钮 */
  188 + if (current >= total) {
  189 + $('#submit_section_form').find('.button-next').hide();// 隐藏下一步按钮.
  190 + $('#submit_section_form').find('.button-submit').show(); // 显示提交按钮.
  191 + displayConfirm();// 确认提交信息.
  192 + } else {
  193 + $('#submit_section_form').find('.button-next').show();// 隐藏提交按钮.
  194 + $('#submit_section_form').find('.button-submit').hide();// 隐藏提交按钮.
  195 + }
  196 + App.scrollTo($('.page-title'));// 移动到指定位置.
  197 + }
  198 + // 表单导航向导插件.
  199 + $('#submit_section_form').bootstrapWizard({
  200 + 'nextSelector': '.button-next',// 下一步元素选择器.
  201 + 'previousSelector': '.button-previous',// 返回元素选择器.
  202 + /** 当一个导航标签被点击,返回错误的移动到该选项卡,并显示它的内容. */
  203 + onTabClick: function (tab, navigation, index, clickedIndex) {
  204 + return false;
  205 + success.hide();
  206 + error.hide();
  207 + if (form.valid() == false) {
  208 + return false;
  209 + }
  210 + handleTitle(tab, navigation, clickedIndex);
  211 + },
  212 + /** 下一步按钮被单击时触发, 返回移动到下一个步骤. */
  213 + onNext: function (tab, navigation, index) {
  214 + success.hide();
  215 + error.hide();
  216 + if (form.valid() == false) {
  217 + return false;
  218 + }
  219 + if(index==2) {
  220 + SectionVmapWorlds.drawingManagerClose();
  221 + SectionVmapWorlds.clearMarkAndOverlays();
  222 + }
  223 + handleTitle(tab, navigation, index);
  224 + },
  225 + /** 上一步按钮被单击时触发,返回移动到前一个步骤 */
  226 + onPrevious: function (tab, navigation, index) {
  227 + success.hide();
  228 + error.hide();
  229 + SectionVmapWorlds.clearMarkAndOverlays();
  230 + if(index==0) {
  231 + SectionVmapWorlds.drawingManagerClose();
  232 + }
  233 + handleTitle(tab, navigation, index);
  234 + },
  235 + /** 显示选项卡内容 */
  236 + onTabShow: function (tab, navigation, index) {
  237 + var total = navigation.find('li').length;
  238 + var current = index + 1;
  239 + var $percent = (current / total) * 100;
  240 + $('#submit_section_form').find('.progress-bar').css({
  241 + width: $percent + '%',
  242 + });
  243 + }
  244 + });
  245 + $('#submit_section_form').find('.button-previous').hide();// 初始化第一步隐藏返回按钮
  246 + }
  247 + };
  248 +}();
... ...
src/main/resources/static/pages/base/section/js/section-list-table_sut.js 0 → 100644
  1 +/**
  2 + *
  3 + * @JSName : list.js(路段信息list.html页面js)
  4 + *
  5 + * @Author : bsth@lq
  6 + *
  7 + * @Description : TODO(路段信息list.html页面js)
  8 + *
  9 + * @Data : 2016年4月28日 上午9:21:17
  10 + *
  11 + * @Version 公交调度系统BS版 0.1
  12 + *
  13 + */
  14 +
  15 +(function(){
  16 + function getComp(cb) {
  17 + $.get('/user/companyData',null,function(rs) {
  18 + return cb && cb(rs);
  19 + });
  20 + }
  21 + function getCompInfo(cb) {
  22 + // get请求获取公司
  23 + $get('/business/all', {upCode_eq: '88'}, function(gs_d){
  24 + return cb && cb(gs_d);
  25 + });
  26 + }
  27 + function gsdmTogsName(gsD,code) {
  28 + var rsStr = '';
  29 + for(var s = 0 ; s < gsD.length; s++) {
  30 + if(gsD[s].businessCode == code) {
  31 + rsStr = rsStr + '(' + gsD[s].businessName.replace('公司','') + ')';
  32 + break;
  33 + }
  34 + }
  35 + return rsStr;
  36 + }
  37 + function splitxlName(str) {
  38 + var rsStr = '';
  39 + if(str) {
  40 + var strArray = str.split('_');
  41 + rsStr = strArray[0];
  42 + }
  43 + return rsStr;
  44 + }
  45 + // 关闭左侧栏
  46 + if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();}
  47 + // page : 当前页、initPag :
  48 + var page = 0,initPag,storage = window.localStorage;
  49 + if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {
  50 + $('.tipso-animation').children().remove();
  51 + // 延迟加载
  52 + setTimeout(function(){
  53 + $('.tipso-animation').tipso({
  54 + speed : 400,
  55 + background : '#0ed0e8',
  56 + color : '#ffffff',
  57 + position :'bottom',
  58 + width : 400,
  59 + delay : 100,
  60 + animationIn : 'fadeInDownBig',
  61 + animationOut : 'fadeOut',
  62 + offsetX : -50,
  63 + offsetY : -195,
  64 + content :'您可以通过点击重置按钮来清除对线路名称的记忆哦!',
  65 +
  66 + });
  67 + $('.tipso-animation').tipso('show');
  68 + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
  69 + },200);
  70 + }
  71 + function getlineSectionRoute(params,cb) {
  72 + $get('/sectionroute/all',params, function(array){
  73 + return cb && cb(array);
  74 + });
  75 + }
  76 + function initldNameSelect(){
  77 + var lineInfo = $('#lineSelect').val(),
  78 + dirInfo = $('#dirSelect').val(),
  79 + params = {};
  80 + if(lineInfo!=null)
  81 + params['line.id_eq'] = lineInfo.split('_')[1];
  82 + else {
  83 + var htm = '<option value="">请选择...</option>';
  84 + // 路段上一个路段下拉框初始化.
  85 + $('#sectionNameSelect').html(htm).select2();
  86 + return ;
  87 + }
  88 + params.directions_eq = dirInfo;
  89 + getlineSectionRoute(params,function(sectionD) {
  90 + var sLen = sectionD.length,initSD = new Array();
  91 + if(sLen>0) {
  92 + $.each(sectionD, function(m, n){
  93 + if(n.name!='' || n.name != null) {
  94 + initSD.push({'id':n.section.sectionName + '_' + n.destroy,
  95 + 'text':n.section.sectionName + '(' + cxDmToName(n.destroy) + ')' + ' --' + dirDmToName(n.directions)});
  96 + }
  97 + });
  98 + $('#sectionNameSelect').empty();
  99 + initPinYinSelect2($('#sectionNameSelect'),initSD,function(ldmcSelector) {
  100 + ldmcSelector.select2("val", '');
  101 + });
  102 + }else {
  103 + var htm = '<option value="">请选择...</option>';
  104 + // 路段上一个路段下拉框初始化.
  105 + $('#sectionNameSelect').html(htm).select2();
  106 + }
  107 + });
  108 + }
  109 + function cxDmToName(value){
  110 + var rsStr = '';
  111 + if(value==0)
  112 + rsStr = '运营';
  113 + else if(value==1)
  114 + rsStr = '撤销';
  115 + return rsStr;
  116 + }
  117 + function dirDmToName(value){
  118 + var srStr = '';
  119 + if(value==0)
  120 + srStr = '上行';
  121 + else if(value==1)
  122 + srStr = '下行';
  123 + return srStr;
  124 + }
  125 + // 初始化是否撤销值.
  126 + $('#destroy').val(0);
  127 + getCompInfo(function(compD) {
  128 + getComp(function(rs) {
  129 + var params = {};
  130 + if(rs.length>0) {
  131 + var compA = new Array();
  132 + for(var c = 0 ; c<rs.length;c++) {
  133 + var comC = rs[c].companyCode;
  134 + var child = rs[c].children;
  135 + if(child.length>0) {
  136 + for(var d = 0 ;d< child.length;d++) {
  137 + compA.push(comC + '_' + child[d].code);
  138 + }
  139 + }else {
  140 + compA.push(comC);
  141 + }
  142 + }
  143 + params.cgsbm_in = compA.toString();
  144 + }
  145 + // 填充线路拉框选择值
  146 + $get('/line/all', params, function(array){
  147 + var len_ = array.length,paramsD = new Array();
  148 + if(len_>0) {
  149 + $.each(array, function(i, g){
  150 + if(g.remove != 1 && (g.name!='' || g.name != null)) {
  151 + paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)});
  152 + }
  153 + });
  154 + if($('span').hasClass('select2-selection'))
  155 + $('span .select2-selection').remove();
  156 + initPinYinSelect2($('#lineSelect'),paramsD,function(selector) {
  157 + selector.select2("val", storage.xlName_AgursData);
  158 + initSearch();
  159 + });
  160 + }
  161 + });
  162 + });
  163 + });
  164 + // 选择线路,填充线路编码搜索框
  165 + $('#lineSelect').on('change',function() {
  166 + initldNameSelect();
  167 + var text = $('#lineSelect').val();
  168 + if(text){
  169 + var linecode = text.split("_");
  170 + $("#lineCodeInput").val(linecode[2]);
  171 + }
  172 + });
  173 + $('#dirSelect').on('change',function() {
  174 + initldNameSelect();
  175 + });
  176 + $('#sectionNameSelect').on('change',function() {
  177 + var ldName = $(this).val();
  178 + if(ldName!=null) {
  179 + $('#destroy').val(ldName.split('_')[1]);
  180 + }
  181 + });
  182 + /**
  183 + * @description : (TODO) 监听重置按钮事件.
  184 + *
  185 + */
  186 + $('tr.filter .filter-cancel').on('click',function(){
  187 + // 清空搜索框值
  188 + $('tr.filter input,select').val('').change();
  189 + $('.tipso-animation').tipso('hide');
  190 + storage.setItem('xlName_AgursData','');
  191 + // 重新加载表格数据
  192 + loadTableDate(null,true);
  193 + });
  194 + /**
  195 + * @description : (TODO) 搜索按钮事件
  196 + *
  197 + */
  198 + $('tr.filter .filter-submit').on('click',function(){
  199 + initSearch();
  200 + });
  201 + function initSearch() {
  202 + var params = getParams();
  203 + page = 0;
  204 + if(params['line.name_like']!='' && params['line.name_like'] != null && params['line.name_like'] != storage.xlName_AgursData) {
  205 + storage.setItem('xlName_AgursData',params['line.name_like']);
  206 + }
  207 + if(params['section.sectionName_like']!='' && params['section.sectionName_like'] != null) {
  208 + params['section.sectionName_like'] = params['section.sectionName_like'].split('_')[0];
  209 + }
  210 + params['line.name_like'] = splitxlName(params['line.name_like']);
  211 + loadTableDate(params,true);
  212 + }
  213 + function getParams() {
  214 + // cells 集合返回表格中所有(列)单元格的一个数组
  215 + var cells = $('tr.filter')[0].cells;
  216 + // 搜索参数集合
  217 + var params = {};
  218 + // 搜索字段名称
  219 + var name;
  220 + // 遍历cells数组
  221 + $.each(cells, function(i, cell){
  222 + // 获取第i列的input或者select集合
  223 + var items = $('input,select', cell);
  224 + // 遍历items集合
  225 + for(var j = 0, item; item = items[j++];){
  226 + // 获取字段名称
  227 + name = $(item).attr('name');
  228 + if(name){
  229 + // 赋取相对应的值
  230 + params[name] = $(item).val();
  231 + }
  232 + }
  233 + });
  234 + return params;
  235 + }
  236 + /**
  237 + * @description : (TODO) 表格数据分页加载事件
  238 + *
  239 + * ------@param : 查询参数
  240 + *
  241 + * ------@isPon : 是否重新分页
  242 + *
  243 + */
  244 + function loadTableDate(param,isPon){
  245 + // 搜索参数
  246 + var params = {};
  247 + if(param)
  248 + params = param;
  249 + // 排序(按方向与序号)
  250 + params['order'] = 'directions,sectionrouteCode';
  251 + // 排序方向.
  252 + params['direction'] = 'ASC,ASC';
  253 + // 记录当前页数
  254 + params['page'] = page;
  255 + // 弹出正在加载层
  256 + var i = layer.load(2);
  257 + // 异步请求获取表格数据
  258 + $.get('/sectionroute',params,function(result){
  259 + // 添加序号
  260 + result.content.page = page;
  261 + // 把数据填充到模版中
  262 + var tbodyHtml = template('sectionInfo_list_table_temp_sut',{list:result.content});
  263 + // 把渲染好的模版html文本追加到表格中
  264 + $('#datatable_setion tbody').html(tbodyHtml);
  265 + // 是重新分页且返回数据长度大于0
  266 + if(isPon && result.content.length > 0){
  267 + // 重新分页
  268 + initPag = true;
  269 + // 分页栏
  270 + showPagination(result);
  271 + }
  272 + // 关闭弹出加载层
  273 + layer.close(i);
  274 + });
  275 + }
  276 + /**
  277 + * @description : (TODO) 分页栏组件
  278 + *
  279 + */
  280 + function showPagination(data){
  281 + // 分页组件
  282 + $('#pagination').jqPaginator({
  283 + // 总页数
  284 + totalPages: data.totalPages,
  285 + // 中间显示页数
  286 + visiblePages: 6,
  287 + // 当前页
  288 + currentPage: page + 1,
  289 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
  290 + prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
  291 + next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
  292 + last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
  293 + page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
  294 + onPageChange: function (num, type) {
  295 + if(initPag){
  296 + initPag = false;
  297 + return;
  298 + }
  299 + var pData = getParams();
  300 + if(pData['section.sectionName_like']!='' && pData['section.sectionName_like'] != null) {
  301 + pData['section.sectionName_like'] = pData['section.sectionName_like'].split('_')[0];
  302 + }
  303 + pData['line.name_like'] = splitxlName(pData['line.name_like']);
  304 + page = num - 1;
  305 + loadTableDate(pData, false);
  306 + }
  307 + });
  308 + }
  309 +})();
0 310 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/js/section-positions-events_sut.js 0 → 100644
  1 +$(function(){
  2 + // 监听返回按钮事件.
  3 + $('#backUp').on('click',function() {
  4 + // 返回list.html页面
  5 + //loadPage('/pages/base/section/list_sut.html');
  6 + });
  7 +
  8 + // 监听编辑线路走向.
  9 + $('.dropdown-menu #eidt').on('click', function(){
  10 + $('#eidt').attr("disabled",true);
  11 + $('#eidt').addClass('btn disabled');
  12 + // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒)
  13 + var yindex = layer.msg('编辑完线路走向后,请双击线路走向区域保存',{ offset: '126px',shift: 0,time: 10000});
  14 + SectionPWorldsBMap.editPolyUpline();
  15 + });
  16 +});
0 17 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/js/section-positions-map_sut.js 0 → 100644
  1 +/**
  2 + * @description : (TODO) 百度地图
  3 + *
  4 + * @author bsth@lq
  5 + *
  6 + * @version 1.0
  7 + *
  8 + */
  9 +
  10 +var SectionPWorldsBMap = function () {
  11 + // 定义地图对象、地图覆盖物、线性几何图形.
  12 + var mapValue = '',marker='', polyUpline='';
  13 + var Bmap = {
  14 + // 初始化地图.
  15 + init : function() {
  16 + // 设置中心点
  17 + var CENTER_POINT = {lng : 121.528733,lat : 31.237425};
  18 + // 百度API Key
  19 + var bdKey = 'IGGrr4UjwIYzatoCRFKEL8sT';
  20 + // 初始化百度地图
  21 + mapValue = new BMap.Map('sectionPbmap_basic');
  22 + //中心点和缩放级别
  23 + mapValue.centerAndZoom(new BMap.Point(CENTER_POINT.lng,CENTER_POINT.lat), 15);
  24 + //启用地图拖拽事件,默认启用(可不写)
  25 + mapValue.enableDragging();
  26 + //启用地图滚轮放大缩小
  27 + mapValue.enableScrollWheelZoom();
  28 + //禁用鼠标双击放大
  29 + mapValue.disableDoubleClickZoom();
  30 + //启用键盘上下左右键移动地图
  31 + mapValue.enableKeyboard();
  32 + return mapValue;
  33 + },
  34 + // 绘制线路走向线性几何图形.
  35 + drawingUpline : function(r) {
  36 + var sectionBsectionVectorStr = r[0].sectionBsectionVector;
  37 + var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1);
  38 + var lineArray = tempStr.split(',');
  39 + var polylineArray = [];
  40 + var lineaLen = lineArray.length
  41 + for(var i = 0;i<lineaLen;i++) {
  42 + polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
  43 + }
  44 + var centerI = Math.ceil(lineaLen/2);
  45 + // 中心坐标点
  46 + var point = new BMap.Point(lineArray[centerI].split(' ')[0],lineArray[centerI].split(' ')[1]);
  47 + // 创建线路走向
  48 + polyUpline = new BMap.Polyline(polylineArray, {strokeColor : "#5298ff",strokeWeight : 6,strokeOpacity :1,strokeStyle:'solid'});
  49 + // 把折线添加到地图上
  50 + mapValue.addOverlay(polyUpline);
  51 + // 信息窗口参数属性
  52 + var opts = {
  53 + // 信息窗口宽度
  54 + width : 200,
  55 + // 信息窗口高度
  56 + height : 450,
  57 + // 信息窗位置偏移值。
  58 + offset: new BMap.Size(500,-80),
  59 + //标题
  60 + title : '<h4 style="color:#FFFFFF">'+r[0].sectionName+'站详情</h4>',
  61 + //设置不允许信窗发送短息
  62 + enableMessage : false,
  63 + //是否开启点击地图关闭信息窗口
  64 + enableCloseOnClick : false,
  65 + // 是否开启信息窗口打开时地图自动移动(默认开启)。(自 1.1 新增)
  66 + enableAutoPan:true
  67 + };
  68 + var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+
  69 + '<span style="color:#DDD;font-size: 15px;">路段名称:' + r[0].sectionName + '</span>' +
  70 + '<span class="help-block" style="color:#DDD;font-size: 15px;">路段编码:' + r[0].sectionCode + '</span>' +
  71 + '<span class="help-block" style="color:#DDD;font-size: 15px;">路段序号:' + r[0].sectionRouteCode + '</span>' +
  72 + '<span class="help-block" style="color:#DDD;font-size: 15px;">限  速:' + r[0].sectionSpeedLimit + '</span>' +
  73 + '<span class="help-block" style="color:#DDD;font-size: 15px;">路段长度:' + r[0].sectionDistance + '</span>' +
  74 + '<span class="help-block" style="color:#DDD;font-size: 15px;">路段时间:' + r[0].sectionTime + '</span>' +
  75 + '<span class="help-block" style="width: 100%;font-size: 15px;;color:#DDD; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; " title="'+ 'ddd' +'" >说明/描述:' + 'ddd' + '</span>' ;
  76 + // 创建信息窗口
  77 + var infoWindow_target = new BMap.InfoWindow(htm, opts);
  78 + // 自定义标注物图片
  79 + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/blank.gif',new BMap.Size(20, 20));
  80 + // 创建点
  81 + marker = new BMap.Marker(point,{icon : icon_target});
  82 + // 把标注添物加到地图上
  83 + mapValue.addOverlay(marker);
  84 + //开启信息窗口
  85 + marker.openInfoWindow(infoWindow_target,point);
  86 + var PanOptions_ ={noAnimation :true};
  87 + mapValue.reset();
  88 + mapValue.panTo(point,PanOptions_);
  89 + mapValue.panBy(0,-110,PanOptions_);
  90 + mapValue.setZoom(14);
  91 + },
  92 + // 编辑线路走向几何线性图形.
  93 + editPolyUpline : function() {
  94 + // 禁止覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增)
  95 + polyUpline.disableMassClear();
  96 + SectionPWorldsBMap.clearMarkAndOverlays();
  97 + // 允许覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增)
  98 + polyUpline.enableMassClear();
  99 + // 开启线路编辑
  100 + polyUpline.enableEditing();
  101 + // 添加双击折线保存事件
  102 + polyUpline.addEventListener('dblclick',function(e) {
  103 + // 关闭
  104 + layer.closeAll();
  105 + polyUpline.disableEditing();
  106 + // 获取折线坐标集合
  107 + var editPloyLineArray = polyUpline.getPath();
  108 + EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray));
  109 + polyUpline= '';
  110 + // 加载修改路段弹出层mobal页面
  111 + $.get('editsection_sut.html', function(m){
  112 + $(pjaxContainer).append(m);
  113 + $('#edit_section_mobal').trigger('editSectionMobal_show', [SectionPWorldsBMap,GetAjaxData,EditSectionObj,PositionsPublicFunctions]);
  114 + });
  115 + });
  116 + },
  117 + // 清楚地图覆盖物
  118 + clearMarkAndOverlays : function() {
  119 + mapValue.clearOverlays();
  120 + mapValue.removeOverlay();
  121 + }
  122 + }
  123 + return Bmap;
  124 +}();
0 125 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/list.html
1   -<div class="page-head">
2   - <div class="page-title">
3   - <h1>路段信息</h1>
4   - </div>
5   -</div>
6   -
7   -<ul class="page-breadcrumb breadcrumb">
8   - <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
9   - <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li>
10   - <li><span class="active">路段信息</span></li>
11   -</ul>
12   -
13   -<div class="row">
14   - <div class="col-md-12">
15   - <div class="portlet light porttlet-fit bordered">
16   - <div class="portlet-title">
17   - <div class="tipso-animation">
18   - </div>
19   - <div class="caption">
20   - <i class="fa fa-info-circle font-dark"></i>
21   - <span class="caption-subject font-dark sbold uppercase">路段信息</span>
22   - </div>
23   - <div class="actions">
24   - <div class="btn-group btn-group-devided" data-toggle="buttons">
25   - <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加路段</a>
26   - </div>
27   - </div>
28   - </div>
29   - <div class="portlet-body">
30   - <div class="table-container" style="margin-top: 10px">
31   - <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_setion">
32   - <thead>
33   - <tr role="row" class="heading">
34   - <th width="2%">#</th>
35   - <th width="4%">线路编号</th>
36   - <th width="11%">线路名称</th>
37   - <th width="6%">线路方向</th>
38   - <th width="11%">路段名称</th>
39   - <th width="4%">路段编码</th>
40   - <th width="4%">路段序号</th>
41   - <th width="4%">路段限速</th>
42   - <th width="4%">路段长度</th>
43   - <th width="4%">路段历时</th>
44   - <th width="4%">版本号</th>
45   - <th width="6%">是否撤销</th>
46   - <th width="9%">操作</th>
47   - </tr>
48   - <tr role="row" class="filter">
49   - <td></td>
50   - <td>
51   - <input type="text" class="form-control form-filter input-sm" name="lineCode_eq" id="lineCodeInput">
52   - </td>
53   - <td>
54   - <select name="line.name_like" class="form-control" style="width:100%" id="lineSelect"></select>
55   - </td>
56   - <td>
57   - <select class="form-control form-filter" id ="dirSelect" name="directions_eq">
58   - <option value="">请选择...</option>
59   - <option value="0">上行</option>
60   - <option value="1">下行</option>
61   - </select>
62   - </td>
63   - <td>
64   - <!-- <input type="text" class="form-control form-filter input-sm" name="section.sectionName_like"> -->
65   - <select name="section.sectionName_like" class="form-control" style="width:100%" id="sectionNameSelect"></select>
66   - </td>
67   - <td>
68   - <input type="text" class="form-control form-filter input-sm" name="sectionCode_eq">
69   - </td>
70   - <td>
71   - <input type="text" class="form-control form-filter input-sm" name="sectionrouteCode_eq">
72   - </td>
73   - <td>
74   - <input type="text" class="form-control form-filter input-sm" name="section.speedLimit_eq">
75   - </td>
76   - <td>
77   - <input type="text" class="form-control form-filter input-sm" name="section.sectionDistance_eq">
78   - </td>
79   - <td>
80   - <input type="text" class="form-control form-filter input-sm" name="section.sectionTime_eq">
81   - </td>
82   - <td>
83   - <input type="text" class="form-control form-filter input-sm" name="versions_eq">
84   - </td>
85   - <td>
86   - <select class="form-control form-filter" id="destroy" name="destroy_eq">
87   - <option value="">请选择...</option>
88   - <option value="0">运营</option>
89   - <option value="1">撤销</option>
90   - </select>
91   - </td>
92   - <td>
93   - <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
94   - <i class="fa fa-search"></i> 搜索
95   - </button>
96   -
97   - <button class="btn btn-sm red btn-outline filter-cancel">
98   - <i class="fa fa-times"></i> 重置
99   - </button>
100   - </td>
101   - </tr>
102   - </thead>
103   - <tbody></tbody>
104   - </table>
105   - <div style="text-align: right;">
106   - <ul id="pagination" class="pagination"></ul>
107   - </div>
108   - </div>
109   - </div>
110   - </div>
111   - </div>
112   -</div>
113   -<script type="text/html" id="sectionInfo_list_table_temp">
114   - {{each list as obj i }}
115   - <tr>
116   - <td style="vertical-align: middle;">
117   - {{(list.page*10)+(i+1)}}
118   - </td>
119   - <td>
120   - {{obj.lineCode}}
121   - </td>
122   - <td>
123   - {{obj.line.name}}
124   - </td>
125   - <td>
126   - {{if obj.directions == '0'}}
127   - 上行
128   - {{else if obj.directions == '1'}}
129   - 下行
130   - {{/if}}
131   - </td>
132   - <td>
133   - {{obj.section.sectionName}}
134   - </td>
135   - <td>
136   - {{obj.sectionCode}}
137   - </td>
138   - <td>
139   - {{obj.sectionrouteCode}}
140   - </td>
141   - <td>
142   - {{obj.speedLimit}}
143   - </td>
144   - <td>
145   - {{obj.sectionDistance}}
146   - </td>
147   - <td>
148   - {{obj.sectionTime}}
149   - </td>
150   - <td>
151   - {{obj.versions}}
152   - </td>
153   - <td>
154   - {{if obj.destroy == 1}}
155   - <span style="font-weight: bold; color: red; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">撤销</span>
156   - {{else if obj.destroy == 0}}
157   - <span style="font-weight: bold; color: #07824e; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">运营</span>
158   - {{/if}}
159   - </td>
160   - <td>
161   - <a href="positions.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 定位 </a>
162   - </td>
163   - </tr>
164   - {{/each}}
165   - {{if list.length == 0}}
166   - <tr>
167   - <td colspan=13><h6 class="muted">没有找到相关数据</h6></td>
168   - </tr>
169   - {{/if}}
170   -</script>
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>路段信息</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  9 + <li><span class="active">基础信息</span> <i class="fa fa-circle"></i></li>
  10 + <li><span class="active">路段信息</span></li>
  11 +</ul>
  12 +
  13 +<div class="row">
  14 + <div class="col-md-12">
  15 + <div class="portlet light porttlet-fit bordered">
  16 + <div class="portlet-title">
  17 + <div class="tipso-animation">
  18 + </div>
  19 + <div class="caption">
  20 + <i class="fa fa-info-circle font-dark"></i>
  21 + <span class="caption-subject font-dark sbold uppercase">路段信息</span>
  22 + </div>
  23 + <div class="actions">
  24 + <div class="btn-group btn-group-devided" data-toggle="buttons">
  25 + <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加路段</a>
  26 + </div>
  27 + </div>
  28 + </div>
  29 + <div class="portlet-body">
  30 + <div class="table-container" style="margin-top: 10px">
  31 + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_setion">
  32 + <thead>
  33 + <tr role="row" class="heading">
  34 + <th width="2%">#</th>
  35 + <th width="4%">线路编号</th>
  36 + <th width="11%">线路名称</th>
  37 + <th width="6%">线路方向</th>
  38 + <th width="11%">路段名称</th>
  39 + <th width="4%">路段编码</th>
  40 + <th width="4%">路段序号</th>
  41 + <th width="4%">路段限速</th>
  42 + <th width="4%">路段长度</th>
  43 + <th width="4%">路段历时</th>
  44 + <th width="4%">版本号</th>
  45 + <th width="6%">是否撤销</th>
  46 + <th width="9%">操作</th>
  47 + </tr>
  48 + <tr role="row" class="filter">
  49 + <td></td>
  50 + <td>
  51 + <input type="text" class="form-control form-filter input-sm" name="lineCode_eq" id="lineCodeInput">
  52 + </td>
  53 + <td>
  54 + <select name="line.name_like" class="form-control" style="width:100%" id="lineSelect"></select>
  55 + </td>
  56 + <td>
  57 + <select class="form-control form-filter" id ="dirSelect" name="directions_eq">
  58 + <option value="">请选择...</option>
  59 + <option value="0">上行</option>
  60 + <option value="1">下行</option>
  61 + </select>
  62 + </td>
  63 + <td>
  64 + <!-- <input type="text" class="form-control form-filter input-sm" name="section.sectionName_like"> -->
  65 + <select name="section.sectionName_like" class="form-control" style="width:100%" id="sectionNameSelect"></select>
  66 + </td>
  67 + <td>
  68 + <input type="text" class="form-control form-filter input-sm" name="sectionCode_eq">
  69 + </td>
  70 + <td>
  71 + <input type="text" class="form-control form-filter input-sm" name="sectionrouteCode_eq">
  72 + </td>
  73 + <td>
  74 + <input type="text" class="form-control form-filter input-sm" name="section.speedLimit_eq">
  75 + </td>
  76 + <td>
  77 + <input type="text" class="form-control form-filter input-sm" name="section.sectionDistance_eq">
  78 + </td>
  79 + <td>
  80 + <input type="text" class="form-control form-filter input-sm" name="section.sectionTime_eq">
  81 + </td>
  82 + <td>
  83 + <input type="text" class="form-control form-filter input-sm" name="versions_eq">
  84 + </td>
  85 + <td>
  86 + <select class="form-control form-filter" id="destroy" name="destroy_eq">
  87 + <option value="">请选择...</option>
  88 + <option value="0">运营</option>
  89 + <option value="1">撤销</option>
  90 + </select>
  91 + </td>
  92 + <td>
  93 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
  94 + <i class="fa fa-search"></i> 搜索
  95 + </button>
  96 +
  97 + <button class="btn btn-sm red btn-outline filter-cancel">
  98 + <i class="fa fa-times"></i> 重置
  99 + </button>
  100 + </td>
  101 + </tr>
  102 + </thead>
  103 + <tbody></tbody>
  104 + </table>
  105 + <div style="text-align: right;">
  106 + <ul id="pagination" class="pagination"></ul>
  107 + </div>
  108 + </div>
  109 + </div>
  110 + </div>
  111 + </div>
  112 +</div>
  113 +<script type="text/html" id="sectionInfo_list_table_temp">
  114 + {{each list as obj i }}
  115 + <tr>
  116 + <td style="vertical-align: middle;">
  117 + {{(list.page*10)+(i+1)}}
  118 + </td>
  119 + <td>
  120 + {{obj.lineCode}}
  121 + </td>
  122 + <td>
  123 + {{obj.line.name}}
  124 + </td>
  125 + <td>
  126 + {{if obj.directions == '0'}}
  127 + 上行
  128 + {{else if obj.directions == '1'}}
  129 + 下行
  130 + {{/if}}
  131 + </td>
  132 + <td>
  133 + {{obj.section.sectionName}}
  134 + </td>
  135 + <td>
  136 + {{obj.sectionCode}}
  137 + </td>
  138 + <td>
  139 + {{obj.sectionrouteCode}}
  140 + </td>
  141 + <td>
  142 + {{obj.section.speedLimit}}
  143 + </td>
  144 + <td>
  145 + {{obj.section.sectionDistance}}
  146 + </td>
  147 + <td>
  148 + {{obj.section.sectionTime}}
  149 + </td>
  150 + <td>
  151 + {{obj.versions}}
  152 + </td>
  153 + <td>
  154 + {{if obj.destroy == 1}}
  155 + <span style="font-weight: bold; color: red; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">撤销</span>
  156 + {{else if obj.destroy == 0}}
  157 + <span style="font-weight: bold; color: #07824e; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">运营</span>
  158 + {{/if}}
  159 + </td>
  160 + <td>
  161 + <a href="positions.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 定位 </a>
  162 + </td>
  163 + </tr>
  164 + {{/each}}
  165 + {{if list.length == 0}}
  166 + <tr>
  167 + <td colspan=13><h6 class="muted">没有找到相关数据</h6></td>
  168 + </tr>
  169 + {{/if}}
  170 +</script>
171 171 <script src="/pages/base/section/js/section-list-table.js"></script>
172 172 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/list_sut.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>路段信息</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  9 + <li><span class="active">基础数据管理</span> <i class="fa fa-circle"></i></li>
  10 + <li><span class="active">路段信息</span></li>
  11 +</ul>
  12 +
  13 +<div class="row">
  14 + <div class="col-md-12">
  15 + <div class="portlet light porttlet-fit bordered">
  16 + <div class="portlet-title">
  17 + <div class="tipso-animation">
  18 + </div>
  19 + <div class="caption">
  20 + <i class="fa fa-info-circle font-dark"></i>
  21 + <span class="caption-subject font-dark sbold uppercase">路段信息</span>
  22 + </div>
  23 + <div class="actions">
  24 + <div class="btn-group btn-group-devided" data-toggle="buttons">
  25 + <a class="btn btn-circle blue" href="add_sut.html" data-pjax><i class="fa fa-plus"></i> 添加路段</a>
  26 + </div>
  27 + </div>
  28 + </div>
  29 + <div class="portlet-body">
  30 + <div class="table-container" style="margin-top: 10px">
  31 + <table class="table table-striped table-bordered table-hover table-checkable" id="datatable_setion">
  32 + <thead>
  33 + <tr role="row" class="heading">
  34 + <th width="2%">#</th>
  35 + <th width="4%">线路编号</th>
  36 + <th width="11%">线路名称</th>
  37 + <th width="6%">线路方向</th>
  38 + <th width="11%">路段名称</th>
  39 + <th width="4%">路段编码</th>
  40 + <th width="4%">路段序号</th>
  41 + <th width="4%">路段限速</th>
  42 + <th width="4%">路段长度</th>
  43 + <th width="4%">路段历时</th>
  44 + <th width="4%">版本号</th>
  45 + <th width="6%">是否撤销</th>
  46 + <th width="9%">操作</th>
  47 + </tr>
  48 + <tr role="row" class="filter">
  49 + <td></td>
  50 + <td>
  51 + <input type="text" class="form-control form-filter input-sm" name="lineCode_eq" id="lineCodeInput">
  52 + </td>
  53 + <td>
  54 + <select name="line.name_like" class="form-control" style="width:100%" id="lineSelect"></select>
  55 + </td>
  56 + <td>
  57 + <select class="form-control form-filter" id ="dirSelect" name="directions_eq">
  58 + <option value="">请选择...</option>
  59 + <option value="0">上行</option>
  60 + <option value="1">下行</option>
  61 + </select>
  62 + </td>
  63 + <td>
  64 + <!-- <input type="text" class="form-control form-filter input-sm" name="section.sectionName_like"> -->
  65 + <select name="section.sectionName_like" class="form-control" style="width:100%" id="sectionNameSelect"></select>
  66 + </td>
  67 + <td>
  68 + <input type="text" class="form-control form-filter input-sm" name="sectionCode_eq">
  69 + </td>
  70 + <td>
  71 + <input type="text" class="form-control form-filter input-sm" name="sectionrouteCode_eq">
  72 + </td>
  73 + <td>
  74 + <input type="text" class="form-control form-filter input-sm" name="section.speedLimit_eq">
  75 + </td>
  76 + <td>
  77 + <input type="text" class="form-control form-filter input-sm" name="section.sectionDistance_eq">
  78 + </td>
  79 + <td>
  80 + <input type="text" class="form-control form-filter input-sm" name="section.sectionTime_eq">
  81 + </td>
  82 + <td>
  83 + <input type="text" class="form-control form-filter input-sm" name="versions_eq">
  84 + </td>
  85 + <td>
  86 + <select class="form-control form-filter" id="destroy" name="destroy_eq">
  87 + <option value="">请选择...</option>
  88 + <option value="0">运营</option>
  89 + <option value="1">撤销</option>
  90 + </select>
  91 + </td>
  92 + <td>
  93 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
  94 + <i class="fa fa-search"></i> 搜索
  95 + </button>
  96 +
  97 + <button class="btn btn-sm red btn-outline filter-cancel">
  98 + <i class="fa fa-times"></i> 重置
  99 + </button>
  100 + </td>
  101 + </tr>
  102 + </thead>
  103 + <tbody></tbody>
  104 + </table>
  105 + <div style="text-align: right;">
  106 + <ul id="pagination" class="pagination"></ul>
  107 + </div>
  108 + </div>
  109 + </div>
  110 + </div>
  111 + </div>
  112 +</div>
  113 +<script type="text/html" id="sectionInfo_list_table_temp_sut">
  114 + {{each list as obj i }}
  115 + <tr>
  116 + <td style="vertical-align: middle;">
  117 + {{(list.page*10)+(i+1)}}
  118 + </td>
  119 + <td>
  120 + {{obj.lineCode}}
  121 + </td>
  122 + <td>
  123 + {{obj.line.name}}
  124 + </td>
  125 + <td>
  126 + {{if obj.directions == '0'}}
  127 + 上行
  128 + {{else if obj.directions == '1'}}
  129 + 下行
  130 + {{/if}}
  131 + </td>
  132 + <td>
  133 + {{obj.section.sectionName}}
  134 + </td>
  135 + <td>
  136 + {{obj.sectionCode}}
  137 + </td>
  138 + <td>
  139 + {{obj.sectionrouteCode}}
  140 + </td>
  141 + <td>
  142 + {{obj.section.speedLimit}}
  143 + </td>
  144 + <td>
  145 + {{obj.section.sectionDistance}}
  146 + </td>
  147 + <td>
  148 + {{obj.section.sectionTime}}
  149 + </td>
  150 + <td>
  151 + {{obj.versions}}
  152 + </td>
  153 + <td>
  154 + {{if obj.destroy == 1}}
  155 + <span style="font-weight: bold; color: red; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">撤销</span>
  156 + {{else if obj.destroy == 0}}
  157 + <span style="font-weight: bold; color: #07824e; padding: 5px; background-color: #FFE4E1; margin: 5px; font-size: 9px;border-radius: 4px;">运营</span>
  158 + {{/if}}
  159 + </td>
  160 + <td>
  161 + <a href="positions_sut.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 定位 </a>
  162 + </td>
  163 + </tr>
  164 + {{/each}}
  165 + {{if list.length == 0}}
  166 + <tr>
  167 + <td colspan=13><h6 class="muted">没有找到相关数据</h6></td>
  168 + </tr>
  169 + {{/if}}
  170 +</script>
  171 +<script>
  172 +</script>
  173 +<script src="/pages/base/section/js/section-list-table_sut.js"></script>
0 174 \ No newline at end of file
... ...
src/main/resources/static/pages/base/section/positions_sut.html 0 → 100644
  1 +<link href="/pages/base/section/css/positions.css" rel="stylesheet" type="text/css" />
  2 +<div id="sectionPbmap_basic"></div>
  3 +<div class="leftUtils">
  4 + <div class="btn-group" style="left: 100px;">
  5 + <a class="btn btn-sm green-seagreen dropdown-toggle" style="width: 98px;" href="javascript:;" data-toggle="dropdown" aria-expanded="false"> 操作工具
  6 + <i class="fa fa-angle-down"></i>
  7 + </a>
  8 + <ul class="dropdown-menu pull-right" style="min-width:100px">
  9 + <li>
  10 + <a href="javascript:;" id = "eidt"><i class="fa fa-pencil"></i> 修改 </a>
  11 + </li>
  12 + <li>
  13 + <a href="list_sut.html" id = "backUp"> <i class="fa fa-reply"></i> 返回 </a>
  14 + </li>
  15 +
  16 + </ul>
  17 + </div>
  18 +</div>
  19 +<!-- 编辑路段对象类 -->
  20 +<script src="/pages/base/section/js/positionsection.js"></script>
  21 +<!-- ajax异步请求类 -->
  22 +<script src="/pages/base/section/js/section-ajax-getdata.js"></script>
  23 +<!-- 函数方法类 -->
  24 +<script src="/pages/base/section/js/section-positions-function.js"></script>
  25 +<!-- 地图类 -->
  26 +<script src="/pages/base/section/js/section-positions-map_sut.js"></script>
  27 +<!-- 事件类 -->
  28 +<script src="/pages/base/section/js/section-positions-events_sut.js"></script>
  29 +<!-- reload类 -->
  30 +<script src="/pages/base/section/js/section-positions-reload.js"></script>
0 31 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/editsection_inout.html
... ... @@ -59,26 +59,25 @@
59 59 </div>
60 60 </div>
61 61 <script type="text/javascript">
62   -debugger;
63 62 $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,p,fun){
64 63 function setSectionFormValue(section) {
65 64 $('#edit_section_form input').each(function() {
66 65 $(this).val(eval('section.' + this.id));
67 66 });
68 67 }
69   - let section = p.data;
70   - let lineId = section.lineCode, version = section.versions, start = section.start, end = section.end;
  68 + var section = p.data;
  69 + var lineId = section.lineCode, version = section.versions, start = section.start, end = section.end;
71 70 setSectionFormValue(section);
72 71 // 获取路段号元素,并添加下拉属性值
73 72 ajaxd.getRouteByStartEnd(lineId,version,start, end,function(result) {
74   - let routes = result.data.routes,paramsD =new Array();
  73 + var routes = result.data.routes,paramsD =new Array();
75 74 var eq_scetionRouteCode = section.sectionrouteCode;
76 75 paramsD.push({'id':'请选择...','text':'将此路段设置位第一个路段'});
77 76 // 遍历
78 77 $.each(routes, function(i, g){
79 78 // 判断.
80 79 if(g.section.sectionName) {
81   - let ptions_v = g.sectionrouteCode;
  80 + var ptions_v = g.sectionrouteCode;
82 81 if(eq_scetionRouteCode != ptions_v) {
83 82 // 添加拼音检索下拉框格式数据数组.
84 83 paramsD.push({'id':ptions_v,
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -118,7 +118,7 @@ var PublicFunctions = function () {
118 118 $('#inout_carpark_tree').show();
119 119 $('#InoutCarparktreeMobal .table-toolbar').show();
120 120  
121   - GetAjaxData.getRouteByStartEnd(id, version, start[0], end[0], (result1) => {
  121 + GetAjaxData.getRouteByStartEnd(id, version, start[0], end[0], function (result1) {
122 122 var routes = result1.data.routes, rootNode;
123 123 WorldsBMap.clearMarkAndOverlays();
124 124 var startPoint = mapData[start.join('_')], endPoint = mapData[end.join('_')], point, points;
... ... @@ -144,7 +144,7 @@ var PublicFunctions = function () {
144 144  
145 145 rootNode = {id: -1, pId: null, name: '路段', text: '路段', icon: null, groupType: 2, container : 'pjax-container', enable : true, children: routes};
146 146 if (routes.length > 0) {
147   - for (let i = 0,route;i < routes.length;i++) {
  147 + for (var i = 0,route;i < routes.length;i++) {
148 148 route = routes[i];
149 149 route.pId = 1;
150 150 route.name = route.section.sectionName;
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -31,7 +31,7 @@ window.WorldsBMap = function () {
31 31 sectionArray = [], stationArray = new Map(),
32 32 map_status = 0,drawingManager,topOverlay;
33 33  
34   - let currentSection = {};
  34 + var currentSection = {};
35 35  
36 36 /**
37 37 * 编辑缓冲区
... ... @@ -1497,16 +1497,16 @@ window.WorldsBMap = function () {
1497 1497 * isMark 是否加站名
1498 1498 */
1499 1499 drawCircle: function (point, radius, stationName, isMark) {
1500   - let center = new BMap.Point(point.lng, point.lat);
1501   - let circle = new BMap.Circle(center, radius ,{strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5});
  1500 + var center = new BMap.Point(point.lng, point.lat);
  1501 + var circle = new BMap.Circle(center, radius ,{strokeColor:"blue", strokeWeight:2, strokeOpacity:0.5});
1502 1502 mapBValue.addOverlay(circle);
1503 1503 if (isMark) {
1504   - let html = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -3px; top: -30px; overflow: hidden;">'
  1504 + var html = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -3px; top: -30px; overflow: hidden;">'
1505 1505 + '<img class="rm3_image" style="border:none;left:0px; top:0px; position:absolute;" src="/pages/base/stationroute/css/img/back160.png">'
1506 1506 + '</div>'
1507 1507 + '<label class=" BMapLabel" unselectable="on" style="position: absolute; -moz-user-select: none; display: inline; cursor: inherit; border: 0px none; padding: 2px 1px 1px; white-space: nowrap; font: 12px arial,simsun; z-index: 80; color: rgb(255, 102, 0); left: 20px; top: -30px;">' + stationName + '</label>';
1508 1508  
1509   - let myRichMarker = new BMapLib.RichMarker(html, center, {
  1509 + var myRichMarker = new BMapLib.RichMarker(html, center, {
1510 1510 "title": stationName,
1511 1511 "anchor": new BMap.Size(-10, 8),
1512 1512 "enableDragging": true
... ... @@ -1522,20 +1522,20 @@ window.WorldsBMap = function () {
1522 1522 * points 点数组
1523 1523 */
1524 1524 drawPolygon: function (points, stationName, isMark) {
1525   - let bdPoints = new Array(), i = 0, point;
  1525 + var bdPoints = new Array(), i = 0, point;
1526 1526 for (i = 0;i < points.length;i++) {
1527 1527 point = points[i].split(' ');
1528 1528 bdPoints.push(new BMap.Point(point[0], point[1]));
1529 1529 }
1530   - let polygon = new BMap.Polygon(bdPoints), center = bdPoints[0];
  1530 + var polygon = new BMap.Polygon(bdPoints), center = bdPoints[0];
1531 1531 mapBValue.addOverlay(polygon);
1532 1532 if (isMark) {
1533   - let html = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -3px; top: -30px; overflow: hidden;">'
  1533 + var html = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -3px; top: -30px; overflow: hidden;">'
1534 1534 + '<img class="rm3_image" style="border:none;left:0px; top:0px; position:absolute;" src="/pages/base/stationroute/css/img/back160.png">'
1535 1535 + '</div>'
1536 1536 + '<label class=" BMapLabel" unselectable="on" style="position: absolute; -moz-user-select: none; display: inline; cursor: inherit; border: 0px none; padding: 2px 1px 1px; white-space: nowrap; font: 12px arial,simsun; z-index: 80; color: rgb(255, 102, 0); left: 20px; top: -30px;">' + stationName + '</label>';
1537 1537  
1538   - let myRichMarker = new BMapLib.RichMarker(html, center, {
  1538 + var myRichMarker = new BMapLib.RichMarker(html, center, {
1539 1539 "title": stationName,
1540 1540 "anchor": new BMap.Size(-10, 8),
1541 1541 "enableDragging": true
... ... @@ -1547,7 +1547,7 @@ window.WorldsBMap = function () {
1547 1547 },
1548 1548  
1549 1549 drawPolyLine: function (points, data, start, end) {
1550   - let bdPoints = new Array(), i = 0, point, polyline;
  1550 + var bdPoints = new Array(), i = 0, point, polyline;
1551 1551 for (i = 0;i < points.length;i++) {
1552 1552 point = points[i].split(' ');
1553 1553 bdPoints.push(new BMap.Point(point[0], point[1]));
... ...