Commit 9e0c6481394726f88069e6f66f088f36fdc6587a

Authored by 廖磊
2 parents b3d54b39 24a51013

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 36 changed files with 1967 additions and 324 deletions
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java
... ... @@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
5 5 import com.bsth.entity.schedule.TTInfoDetail;
6 6 import com.bsth.service.schedule.TTInfoDetailService;
  7 +import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
7 8 import org.springframework.beans.factory.annotation.Autowired;
8 9 import org.springframework.web.bind.annotation.*;
9 10  
... ... @@ -73,9 +74,13 @@ public class TTInfoDetailController extends BController<TTInfoDetail, Long> {
73 74 @RequestMapping(value = "/edit/{xlid}/{ttid}", method = RequestMethod.GET)
74 75 public Map<String, Object> getEditInfo(@PathVariable("xlid") Integer xlid,
75 76 @PathVariable("ttid") Long ttid) {
  77 +
  78 + // 获取最大的发车数,用于输出数据的数量
  79 + Long maxfcno = ttInfoDetailService.findMaxFcno(xlid, ttid);
  80 +
76 81 Map<String, Object> rtn = new HashMap<>();
77 82 try {
78   - TTInfoDetailService.EditInfo editInfo = ttInfoDetailService.getEditInfo(xlid, ttid);
  83 + TTInfoDetailForEdit.EditInfo editInfo = ttInfoDetailService.getEditInfo(xlid, ttid, maxfcno);
79 84 rtn.put("status", ResponseCode.SUCCESS);
80 85 rtn.put("data", editInfo);
81 86 } catch (Exception exp) {
... ...
src/main/java/com/bsth/data/safe_driv/SafeDrivCenter.java
1 1 package com.bsth.data.safe_driv;
2 2  
  3 +import com.bsth.Application;
3 4 import com.bsth.websocket.handler.SendUtils;
4 5 import org.joda.time.format.DateTimeFormat;
5 6 import org.joda.time.format.DateTimeFormatter;
... ... @@ -14,6 +15,7 @@ import java.util.HashMap;
14 15 import java.util.HashSet;
15 16 import java.util.Map;
16 17 import java.util.Set;
  18 +import java.util.concurrent.TimeUnit;
17 19  
18 20 /**
19 21 * 安全驾驶
... ... @@ -67,7 +69,7 @@ public class SafeDrivCenter implements CommandLineRunner,ApplicationContextAware
67 69 @Override
68 70 public void run(String... strings) throws Exception {
69 71 //定时加载安全驾驶数据
70   - //Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 60, 4, TimeUnit.SECONDS);
  72 + Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 60, 7, TimeUnit.SECONDS);
71 73 }
72 74  
73 75 @Override
... ...
src/main/java/com/bsth/data/safe_driv/SafeDrivDataLoadThread.java
... ... @@ -88,7 +88,7 @@ public class SafeDrivDataLoadThread extends Thread{
88 88 httpClient.close();
89 89 response.close();
90 90 } catch (Exception e) {
91   - logger.error(e.getMessage());
  91 + logger.error("安全驾驶接口报错了" , e.getMessage());
92 92 }
93 93 }
94 94 }
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -786,13 +786,14 @@ public class DayOfSchedule {
786 786 Collections.sort(list, schFCSJComparator);
787 787  
788 788 long t = System.currentTimeMillis();
789   - int distance=-1;
  789 + int distance=-1, diff;
790 790  
791 791 ScheduleRealInfo sch = null;
792 792 for(ScheduleRealInfo temp : list){
793   -
794   - if(Math.abs(temp.getDfsjT() - t) < distance || distance == -1){
  793 + diff = (int) Math.abs(temp.getDfsjT() - t);
  794 + if(diff < distance || distance == -1){
795 795 sch = temp;
  796 + distance = diff;
796 797 }
797 798 }
798 799 return sch;
... ...
src/main/java/com/bsth/data/schedule/SchModifyLog.java renamed to src/main/java/com/bsth/data/schedule/edit_logs/FormLogger.java
1   -package com.bsth.data.schedule;
  1 +package com.bsth.data.schedule.edit_logs;
2 2  
3 3 import com.bsth.controller.realcontrol.dto.ChangePersonCar;
4 4 import com.bsth.entity.mcy_forms.Changetochange;
... ... @@ -17,11 +17,11 @@ import org.springframework.stereotype.Service;
17 17 import java.util.Date;
18 18  
19 19 /**
20   - * 线调实际排班修改日志记录
  20 + * 为报表写入相关的班次修改记录
21 21 * Created by panzhao on 2017/5/7.
22 22 */
23 23 @Service
24   -public class SchModifyLog {
  24 +public class FormLogger {
25 25  
26 26 private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
27 27  
... ...
src/main/java/com/bsth/data/schedule/edit_logs/SchEditLogger.java renamed to src/main/java/com/bsth/data/schedule/edit_logs/ScheduleModifyLogger.java
... ... @@ -4,7 +4,7 @@ package com.bsth.data.schedule.edit_logs;
4 4 * 班次修正记录
5 5 * Created by panzhao on 2017/5/16.
6 6 */
7   -public class SchEditLogger {
  7 +public class ScheduleModifyLogger {
8 8  
9 9 /**
10 10 * 待发调整
... ... @@ -12,4 +12,4 @@ public class SchEditLogger {
12 12 public static void dftz(Long id, String remarks, String dfsj, String bcType, String opType){
13 13  
14 14 }
15   -}
  15 +}
16 16 \ No newline at end of file
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -13,7 +13,7 @@ import com.bsth.data.LineConfigData;
13 13 import com.bsth.data.msg_queue.DirectivePushQueue;
14 14 import com.bsth.data.schedule.DayOfSchedule;
15 15 import com.bsth.data.schedule.SchAttrCalculator;
16   -import com.bsth.data.schedule.SchModifyLog;
  16 +import com.bsth.data.schedule.edit_logs.FormLogger;
17 17 import com.bsth.data.schedule.ScheduleComparator;
18 18 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
19 19 import com.bsth.entity.Cars;
... ... @@ -135,7 +135,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
135 135 CulateMileageService culateService;
136 136  
137 137 @Autowired
138   - SchModifyLog schModifyLog;
  138 + FormLogger schModifyLog;
139 139  
140 140 @Autowired
141 141 DirectiveService directiveService;
... ... @@ -1081,6 +1081,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1081 1081 sch.setStatus(0);
1082 1082 sch.setRemarks("");//清空备注
1083 1083 sch.setJhlc(sch.getJhlcOrig());
  1084 +
  1085 + //入库
  1086 + dayOfSchedule.save(sch);
1084 1087 rs.put("status", ResponseCode.SUCCESS);
1085 1088 rs.put("t", sch);
1086 1089  
... ...
src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
1 1 package com.bsth.service.schedule;
2 2  
3 3 import com.bsth.entity.schedule.TTInfoDetail;
  4 +import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
4 5 import com.bsth.service.schedule.exception.ScheduleException;
5   -import org.apache.commons.lang3.StringUtils;
6 6  
7   -import java.util.ArrayList;
8 7 import java.util.List;
9 8 import java.util.Map;
10 9  
... ... @@ -14,157 +13,21 @@ import java.util.Map;
14 13 public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
15 14  
16 15 /**
17   - * 发车信息内部类。
18   - */
19   - public static class FcInfo {
20   - /** 时刻明细id */
21   - private Long ttdid;
22   - /** 发车时间 */
23   - private String fcsj;
24   - /** 班次类型 */
25   - private String bc_type;
26   - /** 线路上下行 */
27   - private String xldir;
28   - /** 是偶分班 */
29   - private Boolean isfb;
30   -
31   - /** 起点站code */
32   - private String qdzCode;
33   - /** 终点站code */
34   - private String zdzCode;
35   -
36   - public FcInfo() {
37   - }
38   -
39   - public FcInfo(
40   - String ttdid_str,
41   - String bc_type,
42   - String fcsj,
43   - String xldir,
44   - String isfb,
45   - String qdzCode,
46   - String zdzCode) {
47   - this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
48   - this.bc_type = bc_type;
49   - this.fcsj = fcsj;
50   - this.xldir = xldir;
51   - if ("N".equals(isfb))
52   - this.isfb = false;
53   - else if ("Y".equals(isfb) || "true".equals(isfb))
54   - this.isfb = true;
55   - else
56   - this.isfb = false;
57   -
58   - if (StringUtils.isNotEmpty(qdzCode) && !"null".equals(qdzCode)) {
59   - this.qdzCode = qdzCode;
60   - }
61   - if (StringUtils.isNotEmpty(zdzCode) && !"null".equals(zdzCode)) {
62   - this.zdzCode = zdzCode;
63   - }
64   -
65   - }
66   -
67   - public Long getTtdid() {
68   - return ttdid;
69   - }
70   -
71   - public void setTtdid(Long ttdid) {
72   - this.ttdid = ttdid;
73   - }
74   -
75   - public String getFcsj() {
76   - return fcsj;
77   - }
78   -
79   - public void setFcsj(String fcsj) {
80   - this.fcsj = fcsj;
81   - }
82   -
83   - public String getBc_type() {
84   - return bc_type;
85   - }
86   -
87   - public void setBc_type(String bc_type) {
88   - this.bc_type = bc_type;
89   - }
90   -
91   - public String getXldir() {
92   - return xldir;
93   - }
94   -
95   - public void setXldir(String xldir) {
96   - this.xldir = xldir;
97   - }
98   -
99   - public Boolean getIsfb() {
100   - return isfb;
101   - }
102   -
103   - public void setIsfb(Boolean isfb) {
104   - this.isfb = isfb;
105   - }
106   -
107   - public String getQdzCode() {
108   - return qdzCode;
109   - }
110   -
111   - public void setQdzCode(String qdzCode) {
112   - this.qdzCode = qdzCode;
113   - }
114   -
115   - public String getZdzCode() {
116   - return zdzCode;
117   - }
118   -
119   - public void setZdzCode(String zdzCode) {
120   - this.zdzCode = zdzCode;
121   - }
122   - }
123   -
124   - /**
125   - * 时刻表编辑用的返回数据。
  16 + * 获取待编辑的数据。
  17 + * @param xlid 线路id
  18 + * @param ttid 时刻表id
  19 + * @param maxfcno 最大发车顺序号
  20 + * @return
126 21 */
127   - public static class EditInfo {
128   - /** 标题数据 */
129   - private List<String> header = new ArrayList<>();
130   - /** 内容数据 */
131   - private List<List<FcInfo>> contents = new ArrayList<>();
132   -
133   - /** 营运描述 */
134   - private String yy_desc;
135   -
136   - public List<String> getHeader() {
137   - return header;
138   - }
139   -
140   - public void setHeader(List<String> header) {
141   - this.header = header;
142   - }
143   -
144   - public List<List<FcInfo>> getContents() {
145   - return contents;
146   - }
147   -
148   - public void setContents(List<List<FcInfo>> contents) {
149   - this.contents = contents;
150   - }
151   -
152   - public String getYy_desc() {
153   - return yy_desc;
154   - }
155   -
156   - public void setYy_desc(String yy_desc) {
157   - this.yy_desc = yy_desc;
158   - }
159   - }
  22 + TTInfoDetailForEdit.EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException;
160 23  
161 24 /**
162   - * 获取待编辑的数据。
  25 + * 获取时刻表最大发车顺序号
163 26 * @param xlid 线路id
164   - * @param ttid 时刻表id
  27 + * @param ttinfoid 时刻表id
165 28 * @return
166 29 */
167   - EditInfo getEditInfo(Integer xlid, Long ttid) throws ScheduleException;
  30 + Long findMaxFcno(Integer xlid, Long ttinfoid);
168 31  
169 32 /**
170 33 * 验证sheet(以后放到规则引擎里去做)。
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
... ... @@ -21,10 +21,7 @@ import org.springframework.stereotype.Service;
21 21 import java.io.File;
22 22 import java.io.PrintWriter;
23 23 import java.io.StringWriter;
24   -import java.util.ArrayList;
25   -import java.util.HashMap;
26   -import java.util.List;
27   -import java.util.Map;
  24 +import java.util.*;
28 25  
29 26 /**
30 27 * Created by xu on 17/5/16.
... ... @@ -206,8 +203,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
206 203 }
207 204  
208 205 @Override
209   - public File exportDataForEdit(Integer xlid, Long ttid) throws ScheduleException {
  206 + public EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
210 207 try {
  208 + LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");
  209 +
211 210 // 创建ktr转换所需参数
212 211 Map<String, Object> ktrParms = new HashMap<>();
213 212 File ktrFile = new File(this.getClass().getResource(
... ... @@ -225,9 +224,115 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
225 224 ktrParms.put("xlid", String.valueOf(xlid));
226 225 ktrParms.put("ttid", String.valueOf(ttid));
227 226  
228   - return dataToolsService.exportData(ktrParms);
  227 + dataToolsService.exportData(ktrParms);
  228 +
  229 + EditInfo editInfo = new EditInfo(); // 输出数据
  230 +
  231 +
  232 + // 1.6、获取最大的发车数,用于输出数据的数量
  233 + LOGGER.info("最大发车顺序号={}", maxfcno);
  234 + if (maxfcno != null) {
  235 + // 2、读取ktr生成的excel数据,组织编辑用数据返回
  236 + // 2-1、读取Excel文件
  237 + Workbook book = Workbook.getWorkbook(new File(dataToolsProperties.getTransTempdir() +
  238 + File.separator + outputFilePath + ".xls"));
  239 + Sheet sheet = book.getSheet(0);
  240 +
  241 + // 2-2、处理数据
  242 + int all_bc_ks = 0; // 总空驶班次
  243 + int all_bc_yy = 0; // 总营运班次
  244 + double all_lc_ks = 0; // 总空驶里程
  245 + double all_lc_yy = 0; // 总营运里程
  246 +
  247 + String[] headarrays = new String[maxfcno.intValue() + 3];
  248 + headarrays[0] = "路牌";
  249 + headarrays[maxfcno.intValue() + 1] = "空驶班次/空驶里程";
  250 + headarrays[maxfcno.intValue() + 2] = "运营班次/运营里程";
  251 +
  252 + for (int r = 1; r < sheet.getRows(); r++) {
  253 + List<FcInfo> fcInfos = new ArrayList<>();
  254 + // 每行第一列都是路牌
  255 + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null)); // 用fcsj放置路牌显示
  256 +
  257 + int bc_ks = 0; // 空驶班次
  258 + int bc_yy = 0; // 营运班次
  259 + double lc_ks = 0; // 空驶里程
  260 + double lc_yy = 0; // 营运里程
  261 +
  262 + for (int c = 1; c <= maxfcno; c++) {
  263 + String content_str = sheet.getCell(c, r).getContents();
  264 + try {
  265 + String[] content = StringUtils.isEmpty(content_str) ? null : content_str.split(","); // 总的内容
  266 +
  267 + String ttdid_str = content == null ? "" : content[0]; // 时刻表明细id
  268 + String fcsj = content == null ? "" : content[1]; // 发车时间
  269 + String jhlc = content == null ? "" : content[2]; // 计划里程
  270 + String fzdname = content == null ? "" : content[3]; // 发车站点名称
  271 + String bctype = content == null ? "" : content[4]; // 班次类型
  272 + String xldir = content == null ? "" : content[5]; // 线路上下行
  273 + String isfb = content == null ? "" : content[6]; // 是否分班
  274 +
  275 + String qdzCode = content == null ? "" : content[7]; // 起点站编码
  276 + String zdzCode = content == null ? "" : content[8]; // 终点站编码
  277 +
  278 + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode);
  279 +
  280 + if (StringUtils.isNotEmpty(fzdname))
  281 + headarrays[c] = fzdname;
  282 + fcInfos.add(fcInfo);
  283 +
  284 +
  285 + // 计算班次里程
  286 + if (StringUtils.isNotEmpty(jhlc)) {
  287 + if ("in".equals(bctype) || "out".equals(bctype) || "ldks".equals(bctype)) {
  288 + bc_ks += 1;
  289 + lc_ks += Double.valueOf(jhlc);
  290 +
  291 + all_bc_ks += 1;
  292 + all_lc_ks += Double.valueOf(jhlc);
  293 +
  294 + } else {
  295 + bc_yy += 1;
  296 + lc_yy += Double.valueOf(jhlc);
  297 +
  298 + all_bc_yy += 1;
  299 + all_lc_yy += Double.valueOf(jhlc);
  300 + }
  301 + }
  302 +
  303 + } catch (Exception exp) {
  304 + exp.printStackTrace();
  305 + LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());
  306 + break;
  307 + }
  308 +
  309 + }
  310 +
  311 + // 添加一列 空驶班次/空驶里程,fcsj放置数据
  312 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null));
  313 +
  314 + // 添加一列 营运班次/营运里程,fcsj放置数据
  315 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null));
  316 +
  317 + editInfo.getContents().add(fcInfos);
  318 + }
  319 + editInfo.getHeader().addAll(Arrays.asList(headarrays));
  320 +
  321 + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.3f,营运里程=%.3f,总里程=%.3f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));
  322 + }
  323 +
  324 + LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
  325 +
  326 + return editInfo;
229 327 } catch (Exception exp) {
230   - throw new ScheduleException(exp);
  328 + LOGGER.info("//---------------- 时刻表编辑用数据输出 failed... ----------------//");
  329 +
  330 + StringWriter sw = new StringWriter();
  331 + exp.printStackTrace(new PrintWriter(sw));
  332 + LOGGER.info(sw.toString());
  333 +
  334 + throw new ScheduleException(exp.getMessage());
231 335 }
232 336 }
  337 +
233 338 }
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
1 1 package com.bsth.service.schedule.datatools;
2 2  
3 3 import com.bsth.service.schedule.exception.ScheduleException;
  4 +import org.apache.commons.lang3.StringUtils;
4 5  
5   -import java.io.File;
  6 +import java.util.ArrayList;
  7 +import java.util.List;
6 8  
7 9 /**
8 10 * Created by xu on 17/5/16.
9 11 */
10 12 public interface TTInfoDetailForEdit {
11   - File exportDataForEdit(Integer xlid, Long ttid) throws ScheduleException;
  13 + /**
  14 + * 发车信息内部类。
  15 + */
  16 + public static class FcInfo {
  17 + /** 时刻明细id */
  18 + private Long ttdid;
  19 + /** 发车时间 */
  20 + private String fcsj;
  21 + /** 班次类型 */
  22 + private String bc_type;
  23 + /** 线路上下行 */
  24 + private String xldir;
  25 + /** 是偶分班 */
  26 + private Boolean isfb;
  27 +
  28 + /** 起点站code */
  29 + private String qdzCode;
  30 + /** 终点站code */
  31 + private String zdzCode;
  32 +
  33 + public FcInfo() {
  34 + }
  35 +
  36 + public FcInfo(
  37 + String ttdid_str,
  38 + String bc_type,
  39 + String fcsj,
  40 + String xldir,
  41 + String isfb,
  42 + String qdzCode,
  43 + String zdzCode) {
  44 + this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
  45 + this.bc_type = bc_type;
  46 + this.fcsj = fcsj;
  47 + this.xldir = xldir;
  48 + if ("N".equals(isfb))
  49 + this.isfb = false;
  50 + else if ("Y".equals(isfb) || "true".equals(isfb))
  51 + this.isfb = true;
  52 + else
  53 + this.isfb = false;
  54 +
  55 + if (StringUtils.isNotEmpty(qdzCode) && !"null".equals(qdzCode)) {
  56 + this.qdzCode = qdzCode;
  57 + }
  58 + if (StringUtils.isNotEmpty(zdzCode) && !"null".equals(zdzCode)) {
  59 + this.zdzCode = zdzCode;
  60 + }
  61 +
  62 + }
  63 +
  64 + public Long getTtdid() {
  65 + return ttdid;
  66 + }
  67 +
  68 + public void setTtdid(Long ttdid) {
  69 + this.ttdid = ttdid;
  70 + }
  71 +
  72 + public String getFcsj() {
  73 + return fcsj;
  74 + }
  75 +
  76 + public void setFcsj(String fcsj) {
  77 + this.fcsj = fcsj;
  78 + }
  79 +
  80 + public String getBc_type() {
  81 + return bc_type;
  82 + }
  83 +
  84 + public void setBc_type(String bc_type) {
  85 + this.bc_type = bc_type;
  86 + }
  87 +
  88 + public String getXldir() {
  89 + return xldir;
  90 + }
  91 +
  92 + public void setXldir(String xldir) {
  93 + this.xldir = xldir;
  94 + }
  95 +
  96 + public Boolean getIsfb() {
  97 + return isfb;
  98 + }
  99 +
  100 + public void setIsfb(Boolean isfb) {
  101 + this.isfb = isfb;
  102 + }
  103 +
  104 + public String getQdzCode() {
  105 + return qdzCode;
  106 + }
  107 +
  108 + public void setQdzCode(String qdzCode) {
  109 + this.qdzCode = qdzCode;
  110 + }
  111 +
  112 + public String getZdzCode() {
  113 + return zdzCode;
  114 + }
  115 +
  116 + public void setZdzCode(String zdzCode) {
  117 + this.zdzCode = zdzCode;
  118 + }
  119 + }
  120 +
  121 + /**
  122 + * 时刻表编辑用的返回数据。
  123 + */
  124 + public static class EditInfo {
  125 + /** 标题数据 */
  126 + private List<String> header = new ArrayList<>();
  127 + /** 内容数据 */
  128 + private List<List<FcInfo>> contents = new ArrayList<>();
  129 +
  130 + /** 营运描述 */
  131 + private String yy_desc;
  132 +
  133 + public List<String> getHeader() {
  134 + return header;
  135 + }
  136 +
  137 + public void setHeader(List<String> header) {
  138 + this.header = header;
  139 + }
  140 +
  141 + public List<List<FcInfo>> getContents() {
  142 + return contents;
  143 + }
  144 +
  145 + public void setContents(List<List<FcInfo>> contents) {
  146 + this.contents = contents;
  147 + }
  148 +
  149 + public String getYy_desc() {
  150 + return yy_desc;
  151 + }
  152 +
  153 + public void setYy_desc(String yy_desc) {
  154 + this.yy_desc = yy_desc;
  155 + }
  156 + }
  157 +
  158 + /**
  159 + * 获取待编辑的数据。
  160 + * @param xlid 线路id
  161 + * @param ttid 时刻表id
  162 + * @param maxfcno 最大发车顺序号
  163 + * @return
  164 + */
  165 + EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException;
  166 +
12 167 }
  168 +
... ...
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
... ... @@ -69,8 +69,6 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
69 69 @Autowired
70 70 private TTInfoDetailRepository ttInfoDetailRepository;
71 71 @Autowired
72   - private DataToolsProperties dataToolsProperties;
73   - @Autowired
74 72 private LineRepository lineRepository;
75 73 @Autowired
76 74 private TTInfoRepository infoRepository;
... ... @@ -114,6 +112,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
114 112 }
115 113  
116 114 @Override
  115 + public Long findMaxFcno(Integer xlid, Long ttinfoid) {
  116 + return ttInfoDetailRepository.findMaxFcno(xlid, ttinfoid);
  117 + }
  118 +
  119 + @Override
117 120 public TTInfoDetail findById(Long aLong) {
118 121 return ttInfoDetailRepository.findOneExtend(aLong);
119 122 }
... ... @@ -135,128 +138,12 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
135 138 return dataToolsService.exportData(params);
136 139 }
137 140  
138   - @Override
139   - public TTInfoDetailService.EditInfo getEditInfo(Integer xlid, Long ttid) throws ScheduleException {
140   - try {
141   - LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");
142   -
143   - // 附加参数
144   - String outputFilePath = String.format("ttinfodetail_(id=%s)_foredit-%s",
145   - String.valueOf(ttid), new DateTime().toString("yyyyMMddHHmmss"));
146   -
147   - ttInfoDetailForEdit.exportDataForEdit(xlid, ttid);
148   -
149   - TTInfoDetailService.EditInfo editInfo = new TTInfoDetailService.EditInfo(); // 输出数据
150   -
151   - // 1.6、获取最大的发车数,用于输出数据的数量
152   - Long maxfcno = ttInfoDetailRepository.findMaxFcno(xlid, ttid);
153   - LOGGER.info("最大发车顺序号={}", maxfcno);
154   - if (maxfcno != null) {
155   - // 2、读取ktr生成的excel数据,组织编辑用数据返回
156   - // 2-1、读取Excel文件
157   - Workbook book = Workbook.getWorkbook(new File(dataToolsProperties.getTransTempdir() +
158   - File.separator + outputFilePath + ".xls"));
159   - Sheet sheet = book.getSheet(0);
160   -
161   - // 2-2、处理数据
162   - int all_bc_ks = 0; // 总空驶班次
163   - int all_bc_yy = 0; // 总营运班次
164   - double all_lc_ks = 0; // 总空驶里程
165   - double all_lc_yy = 0; // 总营运里程
166   -
167   - String[] headarrays = new String[maxfcno.intValue() + 3];
168   - headarrays[0] = "路牌";
169   - headarrays[maxfcno.intValue() + 1] = "空驶班次/空驶里程";
170   - headarrays[maxfcno.intValue() + 2] = "运营班次/运营里程";
171   -
172   - for (int r = 1; r < sheet.getRows(); r++) {
173   - List<TTInfoDetailService.FcInfo> fcInfos = new ArrayList<>();
174   - // 每行第一列都是路牌
175   - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null)); // 用fcsj放置路牌显示
176   -
177   - int bc_ks = 0; // 空驶班次
178   - int bc_yy = 0; // 营运班次
179   - double lc_ks = 0; // 空驶里程
180   - double lc_yy = 0; // 营运里程
181   -
182   - for (int c = 1; c <= maxfcno; c++) {
183   - String content_str = sheet.getCell(c, r).getContents();
184   - try {
185   - String[] content = StringUtils.isEmpty(content_str) ? null : content_str.split(","); // 总的内容
186   -
187   - String ttdid_str = content == null ? "" : content[0]; // 时刻表明细id
188   - String fcsj = content == null ? "" : content[1]; // 发车时间
189   - String jhlc = content == null ? "" : content[2]; // 计划里程
190   - String fzdname = content == null ? "" : content[3]; // 发车站点名称
191   - String bctype = content == null ? "" : content[4]; // 班次类型
192   - String xldir = content == null ? "" : content[5]; // 线路上下行
193   - String isfb = content == null ? "" : content[6]; // 是否分班
194   -
195   - String qdzCode = content == null ? "" : content[7]; // 起点站编码
196   - String zdzCode = content == null ? "" : content[8]; // 终点站编码
197   -
198   - TTInfoDetailService.FcInfo fcInfo = new TTInfoDetailService.FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode);
199   -
200   - if (StringUtils.isNotEmpty(fzdname))
201   - headarrays[c] = fzdname;
202   - fcInfos.add(fcInfo);
203   -
204   -
205   - // 计算班次里程
206   - if (StringUtils.isNotEmpty(jhlc)) {
207   - if ("in".equals(bctype) || "out".equals(bctype) || "ldks".equals(bctype)) {
208   - bc_ks += 1;
209   - lc_ks += Double.valueOf(jhlc);
210   -
211   - all_bc_ks += 1;
212   - all_lc_ks += Double.valueOf(jhlc);
213   -
214   - } else {
215   - bc_yy += 1;
216   - lc_yy += Double.valueOf(jhlc);
217   -
218   - all_bc_yy += 1;
219   - all_lc_yy += Double.valueOf(jhlc);
220   - }
221   - }
222   -
223   - } catch (Exception exp) {
224   - exp.printStackTrace();
225   - LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());
226   - break;
227   - }
228   -
229   - }
230   -
231   - // 添加一列 空驶班次/空驶里程,fcsj放置数据
232   - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null));
233   -
234   - // 添加一列 营运班次/营运里程,fcsj放置数据
235   - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null));
236 141  
237   - editInfo.getContents().add(fcInfos);
238   - }
239   - editInfo.getHeader().addAll(Arrays.asList(headarrays));
240   -
241   - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.3f,营运里程=%.3f,总里程=%.3f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));
242   - }
243   -
244   - LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
245   -
246   - return editInfo;
247   - } catch (Exception exp) {
248   - LOGGER.info("//---------------- 时刻表编辑用数据输出 failed... ----------------//");
249   -
250   - StringWriter sw = new StringWriter();
251   - exp.printStackTrace(new PrintWriter(sw));
252   - LOGGER.info(sw.toString());
253   -
254   - throw new ScheduleException(exp.getMessage());
255   - }
  142 + @Override
  143 + public TTInfoDetailForEdit.EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
  144 + return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno);
256 145 }
257 146  
258   -
259   -
260 147 @Override
261 148 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException {
262 149 try {
... ...
src/main/java/com/bsth/service/schedule/utils/DataToolsServiceImpl.java
... ... @@ -125,7 +125,7 @@ public class DataToolsServiceImpl implements DataToolsService {
125 125 exp.printStackTrace(new PrintWriter(sw));
126 126 LOGGER.info(sw.toString());
127 127  
128   - throw new ScheduleException("上传文件错误!");
  128 + throw new ScheduleException(exp);
129 129 }
130 130 }
131 131  
... ... @@ -184,7 +184,7 @@ public class DataToolsServiceImpl implements DataToolsService {
184 184 exp.printStackTrace(new PrintWriter(sw));
185 185 LOGGER.info(sw.toString());
186 186  
187   - throw new ScheduleException("导入数据错误!");
  187 + throw new ScheduleException(exp);
188 188 } finally {
189 189 // 清除日志操作
190 190 KettleLogStore.discardLines(transLogId, true);
... ... @@ -259,7 +259,7 @@ public class DataToolsServiceImpl implements DataToolsService {
259 259 exp.printStackTrace(new PrintWriter(sw));
260 260 LOGGER.info(sw.toString());
261 261  
262   - throw new ScheduleException("导出数据错误!");
  262 + throw new ScheduleException(exp);
263 263 } finally {
264 264 // 清除日志操作
265 265 KettleLogStore.discardLines(transLogId, true);
... ...
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
... ... @@ -133,13 +133,14 @@ public class RealControlSocketHandler implements WebSocketHandler {
133 133 WebSocketSession user;
134 134 while(iterator.hasNext()){
135 135 user = iterator.next();
136   - try {
  136 + WebSocketPushQueue.put(user, message);
  137 + /*try {
137 138 if (user.isOpen()) {
138 139 user.sendMessage(message);
139 140 }
140 141 } catch (Exception e) {
141 142 logger.error("sendMessage error ...."+msg);
142   - }
  143 + }*/
143 144 }
144 145 }
145 146 }
... ...
src/main/resources/application-dev.properties
... ... @@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update
6 6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7 7 #DATABASE
8 8 spring.jpa.database= MYSQL
9   -spring.jpa.show-sql= true
  9 +spring.jpa.show-sql= false
10 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 11 spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 12 spring.datasource.username= root
... ...
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/layer.js 0 → 100644
  1 +/**
  2 +
  3 + @Name:layer v3.0.3 Web弹层组件
  4 + @Author:贤心
  5 + @Site:http://layer.layui.com
  6 + @License:MIT
  7 +
  8 + */
  9 +
  10 +;!function(window, undefined){
  11 +"use strict";
  12 +
  13 +var isLayui = window.layui && layui.define, $, win, ready = {
  14 + getPath: function(){
  15 + var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
  16 + if(script.getAttribute('merge')) return;
  17 + return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
  18 + }(),
  19 +
  20 + config: {}, end: {}, minIndex: 0, minLeft: [],
  21 + btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],
  22 +
  23 + //五种原始层模式
  24 + type: ['dialog', 'page', 'iframe', 'loading', 'tips']
  25 +};
  26 +
  27 +//默认内置方法。
  28 +var layer = {
  29 + v: '3.0.3',
  30 + ie: function(){ //ie版本
  31 + var agent = navigator.userAgent.toLowerCase();
  32 + return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
  33 + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识
  34 + ) : false;
  35 + }(),
  36 + index: (window.layer && window.layer.v) ? 100000 : 0,
  37 + path: ready.getPath,
  38 + config: function(options, fn){
  39 + options = options || {};
  40 + layer.cache = ready.config = $.extend({}, ready.config, options);
  41 + layer.path = ready.config.path || layer.path;
  42 + typeof options.extend === 'string' && (options.extend = [options.extend]);
  43 +
  44 + if(ready.config.path) layer.ready();
  45 +
  46 + if(!options.extend) return this;
  47 +
  48 + isLayui
  49 + ? layui.addcss('modules/layer/' + options.extend)
  50 + : layer.link('skin/' + options.extend);
  51 +
  52 + return this;
  53 + },
  54 +
  55 + //载入CSS配件
  56 + link: function(href, fn, cssname){
  57 +
  58 + //未设置路径,则不主动加载css
  59 + if(!layer.path) return;
  60 +
  61 + var head = $('head')[0], link = document.createElement('link');
  62 + if(typeof fn === 'string') cssname = fn;
  63 + var app = (cssname || href).replace(/\.|\//g, '');
  64 + var id = 'layuicss-'+app, timeout = 0;
  65 +
  66 + link.rel = 'stylesheet';
  67 + link.href = layer.path + href;
  68 + link.id = id;
  69 +
  70 + if(!$('#'+ id)[0]){
  71 + head.appendChild(link);
  72 + }
  73 +
  74 + if(typeof fn !== 'function') return;
  75 +
  76 + //轮询css是否加载完毕
  77 +/* (function poll() {
  78 + if(++timeout > 8 * 1000 / 100){
  79 + return window.console && console.error('layer.css: Invalid');
  80 + };
  81 + parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
  82 + }());*/
  83 + },
  84 +
  85 + ready: function(callback){
  86 + /*var cssname = 'skinlayercss', ver = '303';
  87 + isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
  88 + : layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);*/
  89 + return this;
  90 + },
  91 +
  92 + //各种快捷引用
  93 + alert: function(content, options, yes){
  94 + var type = typeof options === 'function';
  95 + if(type) yes = options;
  96 + return layer.open($.extend({
  97 + content: content,
  98 + yes: yes
  99 + }, type ? {} : options));
  100 + },
  101 +
  102 + confirm: function(content, options, yes, cancel){
  103 + var type = typeof options === 'function';
  104 + if(type){
  105 + cancel = yes;
  106 + yes = options;
  107 + }
  108 + return layer.open($.extend({
  109 + content: content,
  110 + btn: ready.btn,
  111 + yes: yes,
  112 + btn2: cancel
  113 + }, type ? {} : options));
  114 + },
  115 +
  116 + msg: function(content, options, end){ //最常用提示层
  117 + var type = typeof options === 'function', rskin = ready.config.skin;
  118 + var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
  119 + var anim = doms.anim.length - 1;
  120 + if(type) end = options;
  121 + return layer.open($.extend({
  122 + content: content,
  123 + time: 3000,
  124 + shade: false,
  125 + skin: skin,
  126 + title: false,
  127 + closeBtn: false,
  128 + btn: false,
  129 + resize: false,
  130 + end: end
  131 + }, (type && !ready.config.skin) ? {
  132 + skin: skin + ' layui-layer-hui',
  133 + anim: anim
  134 + } : function(){
  135 + options = options || {};
  136 + if(options.icon === -1 || options.icon === undefined && !ready.config.skin){
  137 + options.skin = skin + ' ' + (options.skin||'layui-layer-hui');
  138 + }
  139 + return options;
  140 + }()));
  141 + },
  142 +
  143 + load: function(icon, options){
  144 + return layer.open($.extend({
  145 + type: 3,
  146 + icon: icon || 0,
  147 + resize: false,
  148 + shade: 0.01
  149 + }, options));
  150 + },
  151 +
  152 + tips: function(content, follow, options){
  153 + return layer.open($.extend({
  154 + type: 4,
  155 + content: [content, follow],
  156 + closeBtn: false,
  157 + time: 3000,
  158 + shade: false,
  159 + resize: false,
  160 + fixed: false,
  161 + maxWidth: 210
  162 + }, options));
  163 + }
  164 +};
  165 +
  166 +var Class = function(setings){
  167 + var that = this;
  168 + that.index = ++layer.index;
  169 + that.config = $.extend({}, that.config, ready.config, setings);
  170 + document.body ? that.creat() : setTimeout(function(){
  171 + that.creat();
  172 + }, 30);
  173 +};
  174 +
  175 +Class.pt = Class.prototype;
  176 +
  177 +//缓存常用字符
  178 +var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
  179 +doms.anim = ['layer-anim', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
  180 +
  181 +//默认配置
  182 +Class.pt.config = {
  183 + type: 0,
  184 + shade: 0.3,
  185 + fixed: true,
  186 + move: doms[1],
  187 + title: '&#x4FE1;&#x606F;',
  188 + offset: 'auto',
  189 + area: 'auto',
  190 + closeBtn: 1,
  191 + time: 0, //0表示不自动关闭
  192 + zIndex: 19891014,
  193 + maxWidth: 360,
  194 + anim: 0,
  195 + isOutAnim: true,
  196 + icon: -1,
  197 + moveType: 1,
  198 + resize: true,
  199 + scrollbar: true, //是否允许浏览器滚动条
  200 + tips: 2
  201 +};
  202 +
  203 +//容器
  204 +Class.pt.vessel = function(conType, callback){
  205 + var that = this, times = that.index, config = that.config;
  206 + var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
  207 + var ismax = config.maxmin && (config.type === 1 || config.type === 2);
  208 + var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
  209 + + (titype ? config.title[0] : config.title)
  210 + + '</div>' : '');
  211 +
  212 + config.zIndex = zIndex;
  213 + callback([
  214 + //遮罩
  215 + config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
  216 +
  217 + //主体
  218 + '<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
  219 + + (conType && config.type != 2 ? '' : titleHTML)
  220 + + '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
  221 + + (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
  222 + + (config.type == 1 && conType ? '' : (config.content||''))
  223 + + '</div>'
  224 + + '<span class="layui-layer-setwin">'+ function(){
  225 + var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
  226 + config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
  227 + return closebtn;
  228 + }() + '</span>'
  229 + + (config.btn ? function(){
  230 + var button = '';
  231 + typeof config.btn === 'string' && (config.btn = [config.btn]);
  232 + for(var i = 0, len = config.btn.length; i < len; i++){
  233 + button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
  234 + }
  235 + return '<div class="'+ doms[6] + (config.btnAlign ? (' layui-layer-btn-' + config.btnAlign) : '') +'">'+ button +'</div>'
  236 + }() : '')
  237 + + (config.resize ? '<span class="layui-layer-resize"></span>' : '')
  238 + + '</div>'
  239 + ], titleHTML, $('<div class="layui-layer-move"></div>'));
  240 + return that;
  241 +};
  242 +
  243 +//创建骨架
  244 +Class.pt.creat = function(){
  245 + var that = this
  246 + ,config = that.config
  247 + ,times = that.index, nodeIndex
  248 + ,content = config.content
  249 + ,conType = typeof content === 'object'
  250 + ,body = $('body');
  251 +
  252 + if(config.id && $('#'+config.id)[0]) return;
  253 +
  254 + if(typeof config.area === 'string'){
  255 + config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];
  256 + }
  257 +
  258 + //anim兼容旧版shift
  259 + if(config.shift){
  260 + config.anim = config.shift;
  261 + }
  262 +
  263 + if(layer.ie == 6){
  264 + config.fixed = false;
  265 + }
  266 +
  267 + switch(config.type){
  268 + case 0:
  269 + config.btn = ('btn' in config) ? config.btn : ready.btn[0];
  270 + layer.closeAll('dialog');
  271 + break;
  272 + case 2:
  273 + var content = config.content = conType ? config.content : [config.content, 'auto'];
  274 + config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
  275 + break;
  276 + case 3:
  277 + delete config.title;
  278 + delete config.closeBtn;
  279 + config.icon === -1 && (config.icon === 0);
  280 + layer.closeAll('loading');
  281 + break;
  282 + case 4:
  283 + conType || (config.content = [config.content, 'body']);
  284 + config.follow = config.content[1];
  285 + config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
  286 + delete config.title;
  287 + config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
  288 + config.tipsMore || layer.closeAll('tips');
  289 + break;
  290 + }
  291 +
  292 + //建立容器
  293 + that.vessel(conType, function(html, titleHTML, moveElem){
  294 + body.append(html[0]);
  295 + conType ? function(){
  296 + (config.type == 2 || config.type == 4) ? function(){
  297 + $('body').append(html[1]);
  298 + }() : function(){
  299 + if(!content.parents('.'+doms[0])[0]){
  300 + content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);
  301 + $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);
  302 + }
  303 + }();
  304 + }() : body.append(html[1]);
  305 + $('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem);
  306 + that.layero = $('#'+ doms[0] + times);
  307 + config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
  308 + }).auto(times);
  309 +
  310 + config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
  311 +
  312 + //坐标自适应浏览器窗口尺寸
  313 + config.type == 4 ? that.tips() : that.offset();
  314 + if(config.fixed){
  315 + win.on('resize', function(){
  316 + that.offset();
  317 + (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times);
  318 + config.type == 4 && that.tips();
  319 + });
  320 + }
  321 +
  322 + config.time <= 0 || setTimeout(function(){
  323 + layer.close(that.index)
  324 + }, config.time);
  325 + that.move().callback();
  326 +
  327 + //为兼容jQuery3.0的css动画影响元素尺寸计算
  328 + if(doms.anim[config.anim]){
  329 + that.layero.addClass(doms.anim[config.anim]);
  330 + };
  331 +
  332 + //记录关闭动画
  333 + if(config.isOutAnim){
  334 + that.layero.data('isOutAnim', true);
  335 + }
  336 +};
  337 +
  338 +//自适应
  339 +Class.pt.auto = function(index){
  340 + var that = this, config = that.config, layero = $('#'+ doms[0] + index);
  341 + if(config.area[0] === '' && config.maxWidth > 0){
  342 + //为了修复IE7下一个让人难以理解的bug
  343 + if(layer.ie && layer.ie < 8 && config.btn){
  344 + layero.width(layero.innerWidth());
  345 + }
  346 + layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
  347 + }
  348 + var area = [layero.innerWidth(), layero.innerHeight()];
  349 + var titHeight = layero.find(doms[1]).outerHeight() || 0;
  350 + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
  351 + function setHeight(elem){
  352 + elem = layero.find(elem);
  353 + elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
  354 + }
  355 + switch(config.type){
  356 + case 2:
  357 + setHeight('iframe');
  358 + break;
  359 + default:
  360 + if(config.area[1] === ''){
  361 + if(config.fixed && area[1] >= win.height()){
  362 + area[1] = win.height();
  363 + setHeight('.'+doms[5]);
  364 + }
  365 + } else {
  366 + setHeight('.'+doms[5]);
  367 + }
  368 + break;
  369 + }
  370 + return that;
  371 +};
  372 +
  373 +//计算坐标
  374 +Class.pt.offset = function(){
  375 + var that = this, config = that.config, layero = that.layero;
  376 + var area = [layero.outerWidth(), layero.outerHeight()];
  377 + var type = typeof config.offset === 'object';
  378 + that.offsetTop = (win.height() - area[1])/2;
  379 + that.offsetLeft = (win.width() - area[0])/2;
  380 +
  381 + if(type){
  382 + that.offsetTop = config.offset[0];
  383 + that.offsetLeft = config.offset[1]||that.offsetLeft;
  384 + } else if(config.offset !== 'auto'){
  385 +
  386 + if(config.offset === 't'){ //上
  387 + that.offsetTop = 0;
  388 + } else if(config.offset === 'r'){ //右
  389 + that.offsetLeft = win.width() - area[0];
  390 + } else if(config.offset === 'b'){ //下
  391 + that.offsetTop = win.height() - area[1];
  392 + } else if(config.offset === 'l'){ //左
  393 + that.offsetLeft = 0;
  394 + } else if(config.offset === 'lt'){ //左上角
  395 + that.offsetTop = 0;
  396 + that.offsetLeft = 0;
  397 + } else if(config.offset === 'lb'){ //左下角
  398 + that.offsetTop = win.height() - area[1];
  399 + that.offsetLeft = 0;
  400 + } else if(config.offset === 'rt'){ //右上角
  401 + that.offsetTop = 0;
  402 + that.offsetLeft = win.width() - area[0];
  403 + } else if(config.offset === 'rb'){ //右下角
  404 + that.offsetTop = win.height() - area[1];
  405 + that.offsetLeft = win.width() - area[0];
  406 + } else {
  407 + that.offsetTop = config.offset;
  408 + }
  409 +
  410 + }
  411 +
  412 + if(!config.fixed){
  413 + that.offsetTop = /%$/.test(that.offsetTop) ?
  414 + win.height()*parseFloat(that.offsetTop)/100
  415 + : parseFloat(that.offsetTop);
  416 + that.offsetLeft = /%$/.test(that.offsetLeft) ?
  417 + win.width()*parseFloat(that.offsetLeft)/100
  418 + : parseFloat(that.offsetLeft);
  419 + that.offsetTop += win.scrollTop();
  420 + that.offsetLeft += win.scrollLeft();
  421 + }
  422 +
  423 + if(layero.attr('minLeft')){
  424 + that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);
  425 + that.offsetLeft = layero.css('left');
  426 + }
  427 +
  428 + layero.css({top: that.offsetTop, left: that.offsetLeft});
  429 +};
  430 +
  431 +//Tips
  432 +Class.pt.tips = function(){
  433 + var that = this, config = that.config, layero = that.layero;
  434 + var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);
  435 + if(!follow[0]) follow = $('body');
  436 + var goal = {
  437 + width: follow.outerWidth(),
  438 + height: follow.outerHeight(),
  439 + top: follow.offset().top,
  440 + left: follow.offset().left
  441 + }, tipsG = layero.find('.layui-layer-TipsG');
  442 +
  443 + var guide = config.tips[0];
  444 + config.tips[1] || tipsG.remove();
  445 +
  446 + goal.autoLeft = function(){
  447 + if(goal.left + layArea[0] - win.width() > 0){
  448 + goal.tipLeft = goal.left + goal.width - layArea[0];
  449 + tipsG.css({right: 12, left: 'auto'});
  450 + } else {
  451 + goal.tipLeft = goal.left;
  452 + };
  453 + };
  454 +
  455 + //辨别tips的方位
  456 + goal.where = [function(){ //上
  457 + goal.autoLeft();
  458 + goal.tipTop = goal.top - layArea[1] - 10;
  459 + tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);
  460 + }, function(){ //右
  461 + goal.tipLeft = goal.left + goal.width + 10;
  462 + goal.tipTop = goal.top;
  463 + tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]);
  464 + }, function(){ //下
  465 + goal.autoLeft();
  466 + goal.tipTop = goal.top + goal.height + 10;
  467 + tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);
  468 + }, function(){ //左
  469 + goal.tipLeft = goal.left - layArea[0] - 10;
  470 + goal.tipTop = goal.top;
  471 + tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);
  472 + }];
  473 + goal.where[guide-1]();
  474 +
  475 + /* 8*2为小三角形占据的空间 */
  476 + if(guide === 1){
  477 + goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();
  478 + } else if(guide === 2){
  479 + win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()
  480 + } else if(guide === 3){
  481 + (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();
  482 + } else if(guide === 4){
  483 + layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()
  484 + }
  485 +
  486 + layero.find('.'+doms[5]).css({
  487 + 'background-color': config.tips[1],
  488 + 'padding-right': (config.closeBtn ? '30px' : '')
  489 + });
  490 + layero.css({
  491 + left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0),
  492 + top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)
  493 + });
  494 +}
  495 +
  496 +//拖拽层
  497 +Class.pt.move = function(){
  498 + var that = this
  499 + ,config = that.config
  500 + ,_DOC = $(document)
  501 + ,layero = that.layero
  502 + ,moveElem = layero.find(config.move)
  503 + ,resizeElem = layero.find('.layui-layer-resize')
  504 + ,dict = {};
  505 +
  506 + if(config.move){
  507 + moveElem.css('cursor', 'move');
  508 + }
  509 +
  510 + moveElem.on('mousedown', function(e){
  511 + e.preventDefault();
  512 + if(config.move){
  513 + dict.moveStart = true;
  514 + dict.offset = [
  515 + e.clientX - parseFloat(layero.css('left'))
  516 + ,e.clientY - parseFloat(layero.css('top'))
  517 + ];
  518 + ready.moveElem.css('cursor', 'move').show();
  519 + }
  520 + });
  521 +
  522 + resizeElem.on('mousedown', function(e){
  523 + e.preventDefault();
  524 + dict.resizeStart = true;
  525 + dict.offset = [e.clientX, e.clientY];
  526 + dict.area = [
  527 + layero.outerWidth()
  528 + ,layero.outerHeight()
  529 + ];
  530 + ready.moveElem.css('cursor', 'se-resize').show();
  531 + });
  532 +
  533 + _DOC.on('mousemove', function(e){
  534 +
  535 + //拖拽移动
  536 + if(dict.moveStart){
  537 + var X = e.clientX - dict.offset[0]
  538 + ,Y = e.clientY - dict.offset[1]
  539 + ,fixed = layero.css('position') === 'fixed';
  540 +
  541 + e.preventDefault();
  542 +
  543 + dict.stX = fixed ? 0 : win.scrollLeft();
  544 + dict.stY = fixed ? 0 : win.scrollTop();
  545 +
  546 + //控制元素不被拖出窗口外
  547 + if(!config.moveOut){
  548 + var setRig = win.width() - layero.outerWidth() + dict.stX
  549 + ,setBot = win.height() - layero.outerHeight() + dict.stY;
  550 + X < dict.stX && (X = dict.stX);
  551 + X > setRig && (X = setRig);
  552 + Y < dict.stY && (Y = dict.stY);
  553 + Y > setBot && (Y = setBot);
  554 + }
  555 +
  556 + layero.css({
  557 + left: X
  558 + ,top: Y
  559 + });
  560 + }
  561 +
  562 + //Resize
  563 + if(config.resize && dict.resizeStart){
  564 + var X = e.clientX - dict.offset[0]
  565 + ,Y = e.clientY - dict.offset[1];
  566 +
  567 + e.preventDefault();
  568 +
  569 + layer.style(that.index, {
  570 + width: dict.area[0] + X
  571 + ,height: dict.area[1] + Y
  572 + })
  573 + dict.isResize = true;
  574 + config.resizing && config.resizing(layero);
  575 + }
  576 + }).on('mouseup', function(e){
  577 + if(dict.moveStart){
  578 + delete dict.moveStart;
  579 + ready.moveElem.hide();
  580 + config.moveEnd && config.moveEnd(layero);
  581 + }
  582 + if(dict.resizeStart){
  583 + delete dict.resizeStart;
  584 + ready.moveElem.hide();
  585 + }
  586 + });
  587 +
  588 + return that;
  589 +};
  590 +
  591 +Class.pt.callback = function(){
  592 + var that = this, layero = that.layero, config = that.config;
  593 + that.openLayer();
  594 + if(config.success){
  595 + if(config.type == 2){
  596 + layero.find('iframe').on('load', function(){
  597 + config.success(layero, that.index);
  598 + });
  599 + } else {
  600 + config.success(layero, that.index);
  601 + }
  602 + }
  603 + layer.ie == 6 && that.IE6(layero);
  604 +
  605 + //按钮
  606 + layero.find('.'+ doms[6]).children('a').on('click', function(){
  607 + var index = $(this).index();
  608 + if(index === 0){
  609 + if(config.yes){
  610 + config.yes(that.index, layero)
  611 + } else if(config['btn1']){
  612 + config['btn1'](that.index, layero)
  613 + } else {
  614 + layer.close(that.index);
  615 + }
  616 + } else {
  617 + var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
  618 + close === false || layer.close(that.index);
  619 + }
  620 + });
  621 +
  622 + //取消
  623 + function cancel(){
  624 + var close = config.cancel && config.cancel(that.index, layero);
  625 + close === false || layer.close(that.index);
  626 + }
  627 +
  628 + //右上角关闭回调
  629 + layero.find('.'+ doms[7]).on('click', cancel);
  630 +
  631 + //点遮罩关闭
  632 + if(config.shadeClose){
  633 + $('#layui-layer-shade'+ that.index).on('click', function(){
  634 + layer.close(that.index);
  635 + });
  636 + }
  637 +
  638 + //最小化
  639 + layero.find('.layui-layer-min').on('click', function(){
  640 + var min = config.min && config.min(layero);
  641 + min === false || layer.min(that.index, config);
  642 + });
  643 +
  644 + //全屏/还原
  645 + layero.find('.layui-layer-max').on('click', function(){
  646 + if($(this).hasClass('layui-layer-maxmin')){
  647 + layer.restore(that.index);
  648 + config.restore && config.restore(layero);
  649 + } else {
  650 + layer.full(that.index, config);
  651 + setTimeout(function(){
  652 + config.full && config.full(layero);
  653 + }, 100);
  654 + }
  655 + });
  656 +
  657 + config.end && (ready.end[that.index] = config.end);
  658 +};
  659 +
  660 +//for ie6 恢复select
  661 +ready.reselect = function(){
  662 + $.each($('select'), function(index , value){
  663 + var sthis = $(this);
  664 + if(!sthis.parents('.'+doms[0])[0]){
  665 + (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show();
  666 + }
  667 + sthis = null;
  668 + });
  669 +};
  670 +
  671 +Class.pt.IE6 = function(layero){
  672 + //隐藏select
  673 + $('select').each(function(index , value){
  674 + var sthis = $(this);
  675 + if(!sthis.parents('.'+doms[0])[0]){
  676 + sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();
  677 + }
  678 + sthis = null;
  679 + });
  680 +};
  681 +
  682 +//需依赖原型的对外方法
  683 +Class.pt.openLayer = function(){
  684 + var that = this;
  685 +
  686 + //置顶当前窗口
  687 + layer.zIndex = that.config.zIndex;
  688 + layer.setTop = function(layero){
  689 + var setZindex = function(){
  690 + layer.zIndex++;
  691 + layero.css('z-index', layer.zIndex + 1);
  692 + };
  693 + layer.zIndex = parseInt(layero[0].style.zIndex);
  694 + layero.on('mousedown', setZindex);
  695 + return layer.zIndex;
  696 + };
  697 +};
  698 +
  699 +ready.record = function(layero){
  700 + var area = [
  701 + layero.width(),
  702 + layero.height(),
  703 + layero.position().top,
  704 + layero.position().left + parseFloat(layero.css('margin-left'))
  705 + ];
  706 + layero.find('.layui-layer-max').addClass('layui-layer-maxmin');
  707 + layero.attr({area: area});
  708 +};
  709 +
  710 +ready.rescollbar = function(index){
  711 + if(doms.html.attr('layer-full') == index){
  712 + if(doms.html[0].style.removeProperty){
  713 + doms.html[0].style.removeProperty('overflow');
  714 + } else {
  715 + doms.html[0].style.removeAttribute('overflow');
  716 + }
  717 + doms.html.removeAttr('layer-full');
  718 + }
  719 +};
  720 +
  721 +/** 内置成员 */
  722 +
  723 +window.layer = layer;
  724 +
  725 +//获取子iframe的DOM
  726 +layer.getChildFrame = function(selector, index){
  727 + index = index || $('.'+doms[4]).attr('times');
  728 + return $('#'+ doms[0] + index).find('iframe').contents().find(selector);
  729 +};
  730 +
  731 +//得到当前iframe层的索引,子iframe时使用
  732 +layer.getFrameIndex = function(name){
  733 + return $('#'+ name).parents('.'+doms[4]).attr('times');
  734 +};
  735 +
  736 +//iframe层自适应宽高
  737 +layer.iframeAuto = function(index){
  738 + if(!index) return;
  739 + var heg = layer.getChildFrame('html', index).outerHeight();
  740 + var layero = $('#'+ doms[0] + index);
  741 + var titHeight = layero.find(doms[1]).outerHeight() || 0;
  742 + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
  743 + layero.css({height: heg + titHeight + btnHeight});
  744 + layero.find('iframe').css({height: heg});
  745 +};
  746 +
  747 +//重置iframe url
  748 +layer.iframeSrc = function(index, url){
  749 + $('#'+ doms[0] + index).find('iframe').attr('src', url);
  750 +};
  751 +
  752 +//设定层的样式
  753 +layer.style = function(index, options, limit){
  754 + var layero = $('#'+ doms[0] + index)
  755 + ,contElem = layero.find('.layui-layer-content')
  756 + ,type = layero.attr('type')
  757 + ,titHeight = layero.find(doms[1]).outerHeight() || 0
  758 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
  759 + ,minLeft = layero.attr('minLeft');
  760 +
  761 + if(type === ready.type[3] || type === ready.type[4]){
  762 + return;
  763 + }
  764 +
  765 + if(!limit){
  766 + if(parseFloat(options.width) <= 260){
  767 + options.width = 260;
  768 + };
  769 +
  770 + if(parseFloat(options.height) - titHeight - btnHeight <= 64){
  771 + options.height = 64 + titHeight + btnHeight;
  772 + };
  773 + }
  774 +
  775 + layero.css(options);
  776 + btnHeight = layero.find('.'+doms[6]).outerHeight();
  777 +
  778 + if(type === ready.type[2]){
  779 + layero.find('iframe').css({
  780 + height: parseFloat(options.height) - titHeight - btnHeight
  781 + });
  782 + } else {
  783 + contElem.css({
  784 + height: parseFloat(options.height) - titHeight - btnHeight
  785 + - parseFloat(contElem.css('padding-top'))
  786 + - parseFloat(contElem.css('padding-bottom'))
  787 + })
  788 + }
  789 +};
  790 +
  791 +//最小化
  792 +layer.min = function(index, options){
  793 + var layero = $('#'+ doms[0] + index)
  794 + ,titHeight = layero.find(doms[1]).outerHeight() || 0
  795 + ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
  796 + ,position = layero.css('position');
  797 +
  798 + ready.record(layero);
  799 +
  800 + if(ready.minLeft[0]){
  801 + left = ready.minLeft[0];
  802 + ready.minLeft.shift();
  803 + }
  804 +
  805 + layero.attr('position', position);
  806 +
  807 + layer.style(index, {
  808 + width: 180
  809 + ,height: titHeight
  810 + ,left: left
  811 + ,top: win.height() - titHeight
  812 + ,position: 'fixed'
  813 + ,overflow: 'hidden'
  814 + }, true);
  815 +
  816 + layero.find('.layui-layer-min').hide();
  817 + layero.attr('type') === 'page' && layero.find(doms[4]).hide();
  818 + ready.rescollbar(index);
  819 +
  820 + if(!layero.attr('minLeft')){
  821 + ready.minIndex++;
  822 + }
  823 + layero.attr('minLeft', left);
  824 +};
  825 +
  826 +//还原
  827 +layer.restore = function(index){
  828 + var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
  829 + var type = layero.attr('type');
  830 + layer.style(index, {
  831 + width: parseFloat(area[0]),
  832 + height: parseFloat(area[1]),
  833 + top: parseFloat(area[2]),
  834 + left: parseFloat(area[3]),
  835 + position: layero.attr('position'),
  836 + overflow: 'visible'
  837 + }, true);
  838 + layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
  839 + layero.find('.layui-layer-min').show();
  840 + layero.attr('type') === 'page' && layero.find(doms[4]).show();
  841 + ready.rescollbar(index);
  842 +};
  843 +
  844 +//全屏
  845 +layer.full = function(index){
  846 + var layero = $('#'+ doms[0] + index), timer;
  847 + ready.record(layero);
  848 + if(!doms.html.attr('layer-full')){
  849 + doms.html.css('overflow','hidden').attr('layer-full', index);
  850 + }
  851 + clearTimeout(timer);
  852 + timer = setTimeout(function(){
  853 + var isfix = layero.css('position') === 'fixed';
  854 + layer.style(index, {
  855 + top: isfix ? 0 : win.scrollTop(),
  856 + left: isfix ? 0 : win.scrollLeft(),
  857 + width: win.width(),
  858 + height: win.height()
  859 + }, true);
  860 + layero.find('.layui-layer-min').hide();
  861 + }, 100);
  862 +};
  863 +
  864 +//改变title
  865 +layer.title = function(name, index){
  866 + var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]);
  867 + title.html(name);
  868 +};
  869 +
  870 +//关闭layer总方法
  871 +layer.close = function(index){
  872 + var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
  873 + if(!layero[0]) return;
  874 + var WRAP = 'layui-layer-wrap', remove = function(){
  875 + if(type === ready.type[1] && layero.attr('conType') === 'object'){
  876 + layero.children(':not(.'+ doms[5] +')').remove();
  877 + var wrap = layero.find('.'+WRAP);
  878 + for(var i = 0; i < 2; i++){
  879 + wrap.unwrap();
  880 + }
  881 + wrap.css('display', wrap.data('display')).removeClass(WRAP);
  882 + } else {
  883 + //低版本IE 回收 iframe
  884 + if(type === ready.type[2]){
  885 + try {
  886 + var iframe = $('#'+doms[4]+index)[0];
  887 + iframe.contentWindow.document.write('');
  888 + iframe.contentWindow.close();
  889 + layero.find('.'+doms[5])[0].removeChild(iframe);
  890 + } catch(e){}
  891 + }
  892 + layero[0].innerHTML = '';
  893 + layero.remove();
  894 + }
  895 + typeof ready.end[index] === 'function' && ready.end[index]();
  896 + delete ready.end[index];
  897 + };
  898 +
  899 + if(layero.data('isOutAnim')){
  900 + layero.addClass(closeAnim);
  901 + }
  902 +
  903 + $('#layui-layer-moves, #layui-layer-shade' + index).remove();
  904 + layer.ie == 6 && ready.reselect();
  905 + ready.rescollbar(index);
  906 + if(layero.attr('minLeft')){
  907 + ready.minIndex--;
  908 + ready.minLeft.push(layero.attr('minLeft'));
  909 + }
  910 +
  911 + if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){
  912 + remove()
  913 + } else {
  914 + setTimeout(function(){
  915 + remove();
  916 + }, 200);
  917 + }
  918 +};
  919 +
  920 +//关闭所有层
  921 +layer.closeAll = function(type){
  922 + $.each($('.'+doms[0]), function(){
  923 + var othis = $(this);
  924 + var is = type ? (othis.attr('type') === type) : 1;
  925 + is && layer.close(othis.attr('times'));
  926 + is = null;
  927 + });
  928 +};
  929 +
  930 +/**
  931 +
  932 + 拓展模块,layui开始合并在一起
  933 +
  934 + */
  935 +
  936 +var cache = layer.cache||{}, skin = function(type){
  937 + return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');
  938 +};
  939 +
  940 +//仿系统prompt
  941 +layer.prompt = function(options, yes){
  942 + var style = '';
  943 + options = options || {};
  944 +
  945 + if(typeof options === 'function') yes = options;
  946 +
  947 + if(options.area){
  948 + var area = options.area;
  949 + style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
  950 + delete options.area;
  951 + }
  952 + var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'>' + (options.value||'') +'</textarea>' : function(){
  953 + return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input" value="'+ (options.value||'') +'">';
  954 + }();
  955 +
  956 + var success = options.success;
  957 + delete options.success;
  958 +
  959 + return layer.open($.extend({
  960 + type: 1
  961 + ,btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;']
  962 + ,content: content
  963 + ,skin: 'layui-layer-prompt' + skin('prompt')
  964 + ,maxWidth: win.width()
  965 + ,success: function(layero){
  966 + prompt = layero.find('.layui-layer-input');
  967 + prompt.focus();
  968 + typeof success === 'function' && success(layero);
  969 + }
  970 + ,resize: false
  971 + ,yes: function(index){
  972 + var value = prompt.val();
  973 + if(value === ''){
  974 + prompt.focus();
  975 + } else if(value.length > (options.maxlength||500)) {
  976 + layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
  977 + } else {
  978 + yes && yes(value, index, prompt);
  979 + }
  980 + }
  981 + }, options));
  982 +};
  983 +
  984 +//tab层
  985 +layer.tab = function(options){
  986 + options = options || {};
  987 +
  988 + var tab = options.tab || {}
  989 + ,success = options.success;
  990 +
  991 + delete options.success;
  992 +
  993 + return layer.open($.extend({
  994 + type: 1,
  995 + skin: 'layui-layer-tab' + skin('tab'),
  996 + resize: false,
  997 + title: function(){
  998 + var len = tab.length, ii = 1, str = '';
  999 + if(len > 0){
  1000 + str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
  1001 + for(; ii < len; ii++){
  1002 + str += '<span>'+ tab[ii].title +'</span>';
  1003 + }
  1004 + }
  1005 + return str;
  1006 + }(),
  1007 + content: '<ul class="layui-layer-tabmain">'+ function(){
  1008 + var len = tab.length, ii = 1, str = '';
  1009 + if(len > 0){
  1010 + str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
  1011 + for(; ii < len; ii++){
  1012 + str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
  1013 + }
  1014 + }
  1015 + return str;
  1016 + }() +'</ul>',
  1017 + success: function(layero){
  1018 + var btn = layero.find('.layui-layer-title').children();
  1019 + var main = layero.find('.layui-layer-tabmain').children();
  1020 + btn.on('mousedown', function(e){
  1021 + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
  1022 + var othis = $(this), index = othis.index();
  1023 + othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
  1024 + main.eq(index).show().siblings().hide();
  1025 + typeof options.change === 'function' && options.change(index);
  1026 + });
  1027 + typeof success === 'function' && success(layero);
  1028 + }
  1029 + }, options));
  1030 +};
  1031 +
  1032 +//相册层
  1033 +layer.photos = function(options, loop, key){
  1034 + var dict = {};
  1035 + options = options || {};
  1036 + if(!options.photos) return;
  1037 + var type = options.photos.constructor === Object;
  1038 + var photos = type ? options.photos : {}, data = photos.data || [];
  1039 + var start = photos.start || 0;
  1040 + dict.imgIndex = (start|0) + 1;
  1041 +
  1042 + options.img = options.img || 'img';
  1043 +
  1044 + var success = options.success;
  1045 + delete options.success;
  1046 +
  1047 + if(!type){ //页面直接获取
  1048 + var parent = $(options.photos), pushData = function(){
  1049 + data = [];
  1050 + parent.find(options.img).each(function(index){
  1051 + var othis = $(this);
  1052 + othis.attr('layer-index', index);
  1053 + data.push({
  1054 + alt: othis.attr('alt'),
  1055 + pid: othis.attr('layer-pid'),
  1056 + src: othis.attr('layer-src') || othis.attr('src'),
  1057 + thumb: othis.attr('src')
  1058 + });
  1059 + })
  1060 + };
  1061 +
  1062 + pushData();
  1063 +
  1064 + if (data.length === 0) return;
  1065 +
  1066 + loop || parent.on('click', options.img, function(){
  1067 + var othis = $(this), index = othis.attr('layer-index');
  1068 + layer.photos($.extend(options, {
  1069 + photos: {
  1070 + start: index,
  1071 + data: data,
  1072 + tab: options.tab
  1073 + },
  1074 + full: options.full
  1075 + }), true);
  1076 + pushData();
  1077 + })
  1078 +
  1079 + //不直接弹出
  1080 + if(!loop) return;
  1081 +
  1082 + } else if (data.length === 0){
  1083 + return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
  1084 + }
  1085 +
  1086 + //上一张
  1087 + dict.imgprev = function(key){
  1088 + dict.imgIndex--;
  1089 + if(dict.imgIndex < 1){
  1090 + dict.imgIndex = data.length;
  1091 + }
  1092 + dict.tabimg(key);
  1093 + };
  1094 +
  1095 + //下一张
  1096 + dict.imgnext = function(key,errorMsg){
  1097 + dict.imgIndex++;
  1098 + if(dict.imgIndex > data.length){
  1099 + dict.imgIndex = 1;
  1100 + if (errorMsg) {return};
  1101 + }
  1102 + dict.tabimg(key)
  1103 + };
  1104 +
  1105 + //方向键
  1106 + dict.keyup = function(event){
  1107 + if(!dict.end){
  1108 + var code = event.keyCode;
  1109 + event.preventDefault();
  1110 + if(code === 37){
  1111 + dict.imgprev(true);
  1112 + } else if(code === 39) {
  1113 + dict.imgnext(true);
  1114 + } else if(code === 27) {
  1115 + layer.close(dict.index);
  1116 + }
  1117 + }
  1118 + }
  1119 +
  1120 + //切换
  1121 + dict.tabimg = function(key){
  1122 + if(data.length <= 1) return;
  1123 + photos.start = dict.imgIndex - 1;
  1124 + layer.close(dict.index);
  1125 + return layer.photos(options, true, key);
  1126 + setTimeout(function(){
  1127 + layer.photos(options, true, key);
  1128 + }, 200);
  1129 + }
  1130 +
  1131 + //一些动作
  1132 + dict.event = function(){
  1133 + dict.bigimg.hover(function(){
  1134 + dict.imgsee.show();
  1135 + }, function(){
  1136 + dict.imgsee.hide();
  1137 + });
  1138 +
  1139 + dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
  1140 + event.preventDefault();
  1141 + dict.imgprev();
  1142 + });
  1143 +
  1144 + dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
  1145 + event.preventDefault();
  1146 + dict.imgnext();
  1147 + });
  1148 +
  1149 + $(document).on('keyup', dict.keyup);
  1150 + };
  1151 +
  1152 + //图片预加载
  1153 + function loadImage(url, callback, error) {
  1154 + var img = new Image();
  1155 + img.src = url;
  1156 + if(img.complete){
  1157 + return callback(img);
  1158 + }
  1159 + img.onload = function(){
  1160 + img.onload = null;
  1161 + callback(img);
  1162 + };
  1163 + img.onerror = function(e){
  1164 + img.onerror = null;
  1165 + error(e);
  1166 + };
  1167 + };
  1168 +
  1169 + dict.loadi = layer.load(1, {
  1170 + shade: 'shade' in options ? false : 0.9,
  1171 + scrollbar: false
  1172 + });
  1173 +
  1174 + loadImage(data[start].src, function(img){
  1175 + layer.close(dict.loadi);
  1176 + dict.index = layer.open($.extend({
  1177 + type: 1,
  1178 + id: 'layui-layer-photos',
  1179 + area: function(){
  1180 + var imgarea = [img.width, img.height];
  1181 + var winarea = [$(window).width() - 100, $(window).height() - 100];
  1182 +
  1183 + //如果 实际图片的宽或者高比 屏幕大(那么进行缩放)
  1184 + if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){
  1185 + var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例
  1186 + if(wh[0] > wh[1]){//取缩放比例最大的进行缩放
  1187 + imgarea[0] = imgarea[0]/wh[0];
  1188 + imgarea[1] = imgarea[1]/wh[0];
  1189 + } else if(wh[0] < wh[1]){
  1190 + imgarea[0] = imgarea[0]/wh[1];
  1191 + imgarea[1] = imgarea[1]/wh[1];
  1192 + }
  1193 + }
  1194 +
  1195 + return [imgarea[0]+'px', imgarea[1]+'px'];
  1196 + }(),
  1197 + title: false,
  1198 + shade: 0.9,
  1199 + shadeClose: true,
  1200 + closeBtn: false,
  1201 + move: '.layui-layer-phimg img',
  1202 + moveType: 1,
  1203 + scrollbar: false,
  1204 + moveOut: true,
  1205 + //anim: Math.random()*5|0,
  1206 + isOutAnim: false,
  1207 + skin: 'layui-layer-photos' + skin('photos'),
  1208 + content: '<div class="layui-layer-phimg">'
  1209 + +'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
  1210 + +'<div class="layui-layer-imgsee">'
  1211 + +(data.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : '')
  1212 + +'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt||'') +'</a><em>'+ dict.imgIndex +'/'+ data.length +'</em></span></div>'
  1213 + +'</div>'
  1214 + +'</div>',
  1215 + success: function(layero, index){
  1216 + dict.bigimg = layero.find('.layui-layer-phimg');
  1217 + dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar');
  1218 + dict.event(layero);
  1219 + options.tab && options.tab(data[start], layero);
  1220 + typeof success === 'function' && success(layero);
  1221 + }, end: function(){
  1222 + dict.end = true;
  1223 + $(document).off('keyup', dict.keyup);
  1224 + }
  1225 + }, options));
  1226 + }, function(){
  1227 + layer.close(dict.loadi);
  1228 + layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
  1229 + time: 30000,
  1230 + btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'],
  1231 + yes: function(){
  1232 + data.length > 1 && dict.imgnext(true,true);
  1233 + }
  1234 + });
  1235 + });
  1236 +};
  1237 +
  1238 +//主入口
  1239 +ready.run = function(_$){
  1240 + $ = _$;
  1241 + win = $(window);
  1242 + doms.html = $('html');
  1243 + layer.open = function(deliver){
  1244 + var o = new Class(deliver);
  1245 + return o.index;
  1246 + };
  1247 +};
  1248 +
  1249 +//加载方式
  1250 +window.layui && layui.define ? (
  1251 + layer.ready()
  1252 + ,layui.define('jquery', function(exports){ //layui加载
  1253 + layer.path = layui.cache.dir;
  1254 + ready.run(layui.jquery);
  1255 +
  1256 + //暴露模块
  1257 + window.layer = layer;
  1258 + exports('layer', layer);
  1259 + })
  1260 +) : (
  1261 + (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载
  1262 + ready.run(window.jQuery);
  1263 + return layer;
  1264 + }) : function(){ //普通script标签加载
  1265 + ready.run(window.jQuery);
  1266 + layer.ready();
  1267 + }()
  1268 +);
  1269 +
  1270 +}(window);
... ...
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon-ext.png 0 → 100644

5.77 KB

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon.png 0 → 100644

11.2 KB

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css 0 → 100644
  1 +/**
  2 +
  3 + @Name: layer
  4 + @Author: 贤心
  5 +
  6 + **/
  7 +
  8 +*html{background-image: url(about:blank); background-attachment: fixed;}
  9 +html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
  10 +
  11 +/* common */
  12 +.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}
  13 +.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}
  14 +.layui-layer{-webkit-overflow-scrolling: touch;}
  15 +.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
  16 +.layui-layer-close{position:absolute;}
  17 +.layui-layer-content{position:relative;}
  18 +.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
  19 +.layui-layer-load{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") #eee center center no-repeat;}
  20 +.layui-layer-ico{ background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon.png") no-repeat;}
  21 +.layui-layer-dialog .layui-layer-ico,
  22 +.layui-layer-setwin a,
  23 +.layui-layer-btn a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;}
  24 +
  25 +.layui-layer-move{display: none; position: fixed; *position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; filter:alpha(opacity=0); background-color: #fff; z-index: 2147483647;}
  26 +.layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;}
  27 +
  28 +/* 动画 */
  29 +.layui-layer{border-radius: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}
  30 +
  31 +@-webkit-keyframes layer-bounceIn { /* 默认 */
  32 + 0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
  33 + 100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)}
  34 +}
  35 +@keyframes layer-bounceIn {
  36 + 0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
  37 + 100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
  38 +}
  39 +.layer-anim{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}
  40 +
  41 +@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}
  42 +
  43 +@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}
  44 +
  45 +@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}
  46 +
  47 +@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}
  48 +
  49 +@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}
  50 +
  51 +@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
  52 +
  53 +/* 标题栏 */
  54 +.layui-layer-title{padding:0 80px 0 20px; height:42px; line-height:42px; border-bottom:1px solid #eee; font-size:14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-color: #F8F8F8; border-radius: 2px 2px 0 0;}
  55 +.layui-layer-setwin{position:absolute; right:15px; *right:0; top:15px; font-size:0; line-height: initial;}
  56 +.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}
  57 +.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}
  58 +.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA; }
  59 +.layui-layer-setwin .layui-layer-max{background-position:-32px -40px;}
  60 +.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px;}
  61 +.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px;}
  62 +.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px;}
  63 +.layui-layer-setwin .layui-layer-close1{background-position: 1px -40px; cursor: pointer;}
  64 +.layui-layer-setwin .layui-layer-close1:hover{opacity:0.7;}
  65 +.layui-layer-setwin .layui-layer-close2{position:absolute; right:-28px; top:-28px; width:30px; height:30px; margin-left:0; background-position:-149px -31px; *right:-18px; _display:none;}
  66 +.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}
  67 +
  68 +/* 按钮栏 */
  69 +.layui-layer-btn{text-align: right; padding:0 10px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;}
  70 +.layui-layer-btn a{height: 28px; line-height: 28px; margin: 6px 6px 0; padding: 0 15px; border:1px #dedede solid; background-color:#f1f1f1; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;}
  71 +.layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;}
  72 +.layui-layer-btn a:active{opacity: 0.8;}
  73 +.layui-layer-btn .layui-layer-btn0{border-color: #4898d5; background-color: #2e8ded; color:#fff;}
  74 +.layui-layer-btn-l{text-align: left;}
  75 +.layui-layer-btn-c{text-align: center;}
  76 +
  77 +/* 定制化 */
  78 +.layui-layer-dialog{min-width:260px;}
  79 +.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
  80 +.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}
  81 +.layui-layer-ico1{background-position:-30px 0 }
  82 +.layui-layer-ico2{background-position:-60px 0;}
  83 +.layui-layer-ico3{background-position:-90px 0;}
  84 +.layui-layer-ico4{background-position:-120px 0;}
  85 +.layui-layer-ico5{background-position:-150px 0;}
  86 +.layui-layer-ico6{background-position:-180px 0;}
  87 +.layui-layer-rim{border:6px solid #8D8D8D; border:6px solid rgba(0,0,0,.3); border-radius:5px; box-shadow: none;}
  88 +.layui-layer-msg{min-width:180px; border:1px solid #D3D4D3; box-shadow: none;}
  89 +.layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;}
  90 +.layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;}
  91 +.layui-layer-dialog .layui-layer-padding{padding: 20px 20px 20px 55px; text-align: left;}
  92 +.layui-layer-page .layui-layer-content{position:relative; overflow:auto;}
  93 +.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
  94 +.layui-layer-nobg{background:none;}
  95 +.layui-layer-iframe iframe{display: block; width: 100%;}
  96 +
  97 +.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}
  98 +.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-0.gif") no-repeat;}
  99 +.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") no-repeat;}
  100 +.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-2.gif") no-repeat;}
  101 +.layui-layer-tips{background: none; box-shadow:none; border:none;}
  102 +.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 5px 10px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
  103 +.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}
  104 +.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
  105 +.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}
  106 +.layui-layer-tips i.layui-layer-TipsT{bottom:-8px;}
  107 +.layui-layer-tips i.layui-layer-TipsB{top:-8px;}
  108 +.layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top:1px; border-bottom-style:solid; border-bottom-color: #000;}
  109 +.layui-layer-tips i.layui-layer-TipsR{left:-8px;}
  110 +.layui-layer-tips i.layui-layer-TipsL{right:-8px;}
  111 +
  112 +/* skin */
  113 +.layui-layer-lan[type="dialog"]{min-width:280px;}
  114 +.layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;}
  115 +.layui-layer-lan .layui-layer-btn{padding: 5px 10px 10px; text-align: right; border-top:1px solid #E9E7E7}
  116 +.layui-layer-lan .layui-layer-btn a{background:#BBB5B5; border:none;}
  117 +.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;}
  118 +.layui-layer-molv .layui-layer-title{background:#009f95; color:#fff; border: none;}
  119 +.layui-layer-molv .layui-layer-btn a{background:#009f95;}
  120 +.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;}
  121 +
  122 +
  123 +
  124 +/**
  125 +
  126 + @Name: layer拓展样式
  127 +
  128 + */
  129 +
  130 +.layui-layer-iconext{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon-ext.png") no-repeat;}
  131 +
  132 +/* prompt模式 */
  133 +.layui-layer-prompt .layui-layer-input{display:block; width:220px; height:30px; margin:0 auto; line-height:30px; padding: 0 5px; border: 1px solid #ccc; box-shadow: 1px 1px 5px rgba(0,0,0,.1) inset; color:#333;}
  134 +.layui-layer-prompt textarea.layui-layer-input{width:300px; height:100px; line-height:20px;}
  135 +.layui-layer-prompt .layui-layer-content{padding: 20px;}
  136 +.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
  137 +
  138 +/* tab模式 */
  139 +.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
  140 +.layui-layer-tab .layui-layer-title{padding-left:0; border-bottom:1px solid #ccc; background-color:#eee; overflow: visible;}
  141 +.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
  142 +.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}
  143 +.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
  144 +.layui-layer-tabmain{line-height:24px; clear:both;}
  145 +.layui-layer-tabmain .layui-layer-tabli{display:none;}
  146 +.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block;}
  147 +.xubox_tabclose{position:absolute; right:10px; top:5px; cursor:pointer;}
  148 +
  149 +/* photo模式 */
  150 +.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}
  151 +.layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;}
  152 +.layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;}
  153 +.layui-layer-imguide,.layui-layer-imgbar{display:none;}
  154 +.layui-layer-imgprev, .layui-layer-imgnext{position:absolute; top:50%; width:27px; _width:44px; height:44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());}
  155 +.layui-layer-imgprev{left:10px; background-position:-5px -5px; _background-position:-70px -5px;}
  156 +.layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;}
  157 +.layui-layer-imgnext{right:10px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;}
  158 +.layui-layer-imgnext:hover{background-position:-33px -50px; _background-position:-120px -50px;}
  159 +.layui-layer-imgbar{position:absolute; left:0; bottom:0; width:100%; height:32px; line-height:32px; background-color:rgba(0,0,0,.8); background-color:#000\9; filter:Alpha(opacity=80); color:#fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;}
  160 +.layui-layer-imgtit{/*position:absolute; left:20px;*/}
  161 +.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
  162 +.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;}
  163 +.layui-layer-imgtit a:hover{color:#fff; text-decoration:underline;}
  164 +.layui-layer-imgtit em{padding-left:10px; font-style: normal;}
  165 +
  166 +/* 关闭动画 */
  167 +@-webkit-keyframes layer-bounceOut {
  168 + 100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)}
  169 + 30% {-webkit-transform: scale(1.05); transform: scale(1.05)}
  170 + 0% {-webkit-transform: scale(1); transform: scale(1);}
  171 +}
  172 +@keyframes layer-bounceOut {
  173 + 100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);}
  174 + 30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
  175 + 0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
  176 +}
  177 +.layer-anim-close{-webkit-animation-name: layer-bounceOut;animation-name: layer-bounceOut; -webkit-animation-duration:.2s; animation-duration:.2s;}
  178 +
  179 +@media screen and (max-width: 1100px) {
  180 + .layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;}
  181 +}
  182 +
  183 +
... ...
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-0.gif 0 → 100644

5.66 KB

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif 0 → 100644

701 Bytes

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-2.gif 0 → 100644

1.75 KB

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png 0 → 100644

7.39 KB

src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/moon/style.css 0 → 100644
  1 +html #layui_layer_skinmoonstylecss{display:none;position:absolute;width:1989px}body .layer-ext-moon[type=dialog]{min-width:320px}body .layer-ext-moon-msg[type=dialog]{min-width:200px}body .layer-ext-moon .layui-layer-title{background:#f6f6f6;color:#212a31;font-size:16px;font-weight:700;height:46px;line-height:46px;border-bottom:1px solid #D5D5D5}body .layer-ext-moon .layui-layer-content .layui-layer-ico{height:32px;width:32px;top:18.5px}body .layer-ext-moon .layui-layer-ico0{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -96px 0 no-repeat}body .layer-ext-moon .layui-layer-ico1{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -224px 0 no-repeat}body .layer-ext-moon .layui-layer-ico2{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -192px 0 no-repeat}body .layer-ext-moon .layui-layer-ico3{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -160px 0 no-repeat}body .layer-ext-moon .layui-layer-ico4{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -320px 0 no-repeat}body .layer-ext-moon .layui-layer-ico5{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -288px 0 no-repeat}body .layer-ext-moon .layui-layer-ico6{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -256px 0}body .layer-ext-moon .layui-layer-ico7{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -128px 0 no-repeat}body .layer-ext-moon .layui-layer-setwin{top:15px;right:15px}body .layer-ext-moon .layui-layer-setwin a{width:16px;height:16px}body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover{background-color:#56abe4}body .layer-ext-moon .layui-layer-setwin .layui-layer-max{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -80px 0 no-repeat}body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -64px 0 no-repeat}body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -32px 0 no-repeat}body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -16px 0 no-repeat}body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png")}body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/moon/default.png") -48px 0}body .layer-ext-moon .layui-layer-padding{padding-top:24px}body .layer-ext-moon .layui-layer-btn{text-align:center;padding-top:15px;padding-bottom:15px;background:#f0f4f7;border-top:1px #c7c7c7 solid}body .layer-ext-moon .layui-layer-btn a{font-size:12px;font-weight:400;margin:0 7px;padding:6px 20px;color:#fff;border:1px solid #0064b6;background:no-repeat #0071ce;border-radius:3px;display:inline-block;height:20px;line-height:20px;text-align:center;vertical-align:middle;text-decoration:none;outline:0}body .layer-ext-moon .layui-layer-btn .layui-layer-btn0{background:#0071ce}body .layer-ext-moon .layui-layer-btn .layui-layer-btn1{background:#fff;color:#404a58;border:1px solid #c0c4cd;border-radius:3px}body .layer-ext-moon .layui-layer-btn .layui-layer-btn2{background:#f60;color:#fff;border:1px solid #f60;border-radius:3px}body .layer-ext-moon .layui-layer-btn .layui-layer-btn3{background:red;color:#fff;border:1px solid red;border-radius:3px}body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{height:47px}
0 2 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/modal_extend.css
... ... @@ -15,4 +15,37 @@
15 15 .uk-modal.ct_move_modal .uk-modal-header{
16 16 cursor: move;
17 17 user-select: none;
  18 +}
  19 +
  20 +#ssspVedioModal .uk-modal-dialog-large{
  21 + height: 650px;
  22 +}
  23 +
  24 +#ssspVedioModal .uk-modal-header{
  25 + border-bottom: 1px solid #a2bfe7;
  26 +}
  27 +
  28 +#ssspVedioModal iframe{
  29 + width: calc(100% + 37px);
  30 + height: calc(100% - 32px);
  31 + margin-left: -18px;
  32 + margin-top: -15px;
  33 +}
  34 +
  35 +#ssspVedioModal #vedioIframe{
  36 + display: none;
  37 +}
  38 +
  39 +#ssspVedioModal p.loading{
  40 + text-align: center;
  41 + margin-top: 50px;
  42 +}
  43 +
  44 +.layui-layer-border{
  45 + box-shadow: rgba(0, 0, 0, 0.2) 0px 8px 17px 0px, rgba(0, 0, 0, 0.19) 0px 6px 20px 0px !important;
  46 +}
  47 +
  48 +body .layer-ext-moon .layui-layer-title{
  49 + background: #707070 !important;
  50 + color: #e2e2e2 !important;
18 51 }
19 52 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
... ... @@ -154,6 +154,8 @@
154 154 gb_schedule_table.updateSchedule(rs.ts);
155 155 notify_succ('操作成功!');
156 156 UIkit.modal(modal).hide();
  157 + //重新计算应发未发
  158 + gb_schedule_table.calc_yfwf_num(sch.xlBm);
157 159 });
158 160 });
159 161  
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_other.html
... ... @@ -97,7 +97,7 @@
97 97 <div class="uk-form-row">
98 98 <label class="uk-form-label">烂班原因</label>
99 99 <div class="uk-form-controls">
100   - <select class="form-control" name="destroyReason">
  100 + <select class="form-control" name="destroyReason" required>
101 101 <option value="">请选择...</option>
102 102 {{each adjustExps as exp i}}
103 103 <option value="{{exp}}">{{exp}}</option>
... ... @@ -198,12 +198,11 @@
198 198  
199 199 //是否烂班
200 200 $('[name=destroy]', f).on('click', function () {
201   - console.log(this, this.checked);
202 201 if (this.checked) {
203   - $('.destroy_reason_wrap', modal).show();
  202 + $('.destroy_reason_wrap', modal).show();//.find('[name=destroyReason]').attr('required', 'required');
204 203 }
205 204 else {
206   - $('.destroy_reason_wrap', modal).hide();
  205 + $('.destroy_reason_wrap', modal).hide();//.find('[name=destroyReason]').removeAttr('required');
207 206 }
208 207 });
209 208  
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/safeDriving.html
... ... @@ -26,6 +26,7 @@
26 26 <option value="A7">行驶中与人交谈</option>
27 27 </select>
28 28 <button class="uk-button">检索</button>
  29 + <a id="showSSSpVedioModal" style="color: red;float: right;font-size: 12px;">查看实时视频</a>
29 30 </fieldset>
30 31 </form>
31 32 </div>
... ... @@ -52,6 +53,7 @@
52 53 </div>
53 54 </div>
54 55  
  56 +
55 57 <script id="all-safe_dring-table-temp" type="text/html">
56 58 {{each array as sd i}}
57 59 <tr>
... ... @@ -86,6 +88,9 @@
86 88 var page = 0;
87 89 var pageSize = 12;
88 90  
  91 + $('#showSSSpVedioModal', modal).on('click', function () {
  92 + gb_safe_driv.showVedioModal();
  93 + });
89 94 $(modal).on('init', function(e, data) {
90 95 e.stopPropagation();
91 96  
... ...
src/main/resources/static/real_control_v2/js/forms/form_embed.js
... ... @@ -5,6 +5,9 @@
5 5  
6 6 var gb_embed_form_hanlde = (function () {
7 7  
  8 + layer.config({
  9 + skin: 'layer-ext-moon'
  10 + })
8 11  
9 12 var temps;
10 13 $.get('/real_control_v2/js/forms/temps.html', function (dom) {
... ... @@ -14,7 +17,7 @@ var gb_embed_form_hanlde = (function () {
14 17 /**
15 18 * 打开表单片段
16 19 * @param pageUrl
17   - */
  20 +
18 21 var open_modal_form_fragment = function (pageUrl, title) {
19 22 //modal ID
20 23 var id = '#formFragmentModal';
... ... @@ -30,7 +33,36 @@ var gb_embed_form_hanlde = (function () {
30 33 var htmlStr = gb_embed_form_hanlde.temps()['forms-embed-modal-temp']({pageUrl: wrapUrl, title: title});
31 34 $(document.body).append(htmlStr);
32 35 UIkit.modal(id, {bgclose: false}).show();
33   - };
  36 + };*/
  37 + var open_modal_form_fragment = function (pageUrl, title) {
  38 + var id = '#formFragmentModal';
  39 + if($(id+'.uk-modal').length > 0){
  40 + $(id).remove();
  41 + }
  42 + //将片段路径写入 localStorage
  43 + window.localStorage.setItem('real_control_form_embed_pageUrl', pageUrl);
  44 + //包裹页面
  45 + var wrapUrl = '/real_control_v2/js/forms/wrap.html?origin=real_control_iframe';
  46 +
  47 + layer.open({
  48 + type: 2,
  49 + title: title,
  50 + shadeClose: true,
  51 + shade: false,
  52 + maxmin: true, //开启最大化最小化按钮
  53 + area: ['1093px', '600px'],
  54 + moveOut: true,
  55 + content: wrapUrl,
  56 + zIndex: layer.zIndex,
  57 + success: function(layero){
  58 + layer.setTop(layero);
  59 + },
  60 + end: function () {
  61 +
  62 + }
  63 + });
  64 + }
  65 +
34 66  
35 67 return {
36 68 temps: function () {
... ...
src/main/resources/static/real_control_v2/js/forms/wrap.html
... ... @@ -15,6 +15,9 @@
15 15 <!-- 日期控件 -->
16 16 <link href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css"
17 17 rel="stylesheet" type="text/css"/>
  18 + <!-- layer 弹层 插件 -->
  19 + <link href="/assets/plugins/layer-v2.4/layer/skin/layer.css"
  20 + rel="stylesheet" type="text/css" />
18 21  
19 22 <!-- jQuery -->
20 23 <script src="/metronic_v4.5.4/plugins/jquery.min.js"></script>
... ... @@ -28,6 +31,8 @@
28 31 <!-- art-template 模版引擎 -->
29 32 <script src="/assets/plugins/template.js"></script>
30 33 <script src="/pages/forms/statement/js/jquery.PrintArea.js"></script>
  34 + <!-- layer 弹层 -->
  35 + <script src="/assets/plugins/layer-v2.4/layer/layer.js" ></script>
31 36  
32 37 <style>
33 38 body{
... ... @@ -40,6 +45,36 @@
40 45 .form-page-content .portlet{
41 46 margin-bottom: 0px !important;
42 47 }
  48 +
  49 + .row{
  50 + margin-left: 0 !important;
  51 + margin-right: 0 !important;
  52 + }
  53 +
  54 + .row .col-md-12{
  55 + padding-left: 0 !important;
  56 + }
  57 +
  58 + .portlet{
  59 + padding-top: 0 !important;
  60 + padding-left: 0 !important;
  61 + }
  62 +
  63 + .form-page-content .portlet>.portlet-title{
  64 + position: fixed;
  65 + width: 100%;
  66 + background: #ffffff;
  67 + z-index: 9;
  68 + padding-top: 12px;
  69 + margin-top: -2px;
  70 + box-shadow: 0px 4px 2px 0 rgba(225, 225, 225, 0.2), 0px 4px 9px 0 rgba(139, 135, 135, 0.19);
  71 + border-bottom: 1px solid #dbdbdb;
  72 + }
  73 +
  74 + .form-page-content .portlet.light .portlet-body{
  75 + padding-top: 8px;
  76 + margin-top: 55px;
  77 + }
43 78 </style>
44 79 </head>
45 80 <body>
... ... @@ -65,10 +100,25 @@
65 100 if($("#ddrbBody").length > 0){
66 101 $("#ddrbBody").height("620px");
67 102 }
  103 +
  104 + //去掉公司和分公司选项
  105 + var company = $('select[name=company]', '.form-page-content');
  106 + var subCompany = $('select[name=subCompany]', '.form-page-content');
  107 + if(company.length > 0){
  108 + company.parent().remove();
  109 + }
  110 + if(subCompany.length > 0){
  111 + subCompany.parent().remove();
  112 + }
  113 +
  114 + //重新构造线路下拉框
  115 + //var lineSelect = $('select[name=line]', '.form-page-content');
  116 + //lineSelect.select2('destory').html('');
  117 + //initPinYinSelect2(lineSelect);
68 118 });
69 119  
70 120 //iframe 自适应高度
71   - var iframeHeight;
  121 +/* var iframeHeight;
72 122 var ifm = top.document.getElementById("formFragmentModalIframe");
73 123  
74 124 function changeFrameHeight() {
... ... @@ -84,13 +134,13 @@
84 134 var h = $('.form-page-content').height();
85 135 if (iframeHeight != h)
86 136 ifm.height = h + 'px';
87   - }, 600);
  137 + }, 600);*/
88 138  
89 139 })();
90 140  
91 141 function initPinYinSelect2(selector, data, cb) {
92 142 //过滤线路选择框数据
93   - if(selector === '#line'){
  143 + /*if(selector === '#line'){
94 144 var idx = ',' + top.gb_data_basic.line_idx + ',';
95 145 var newData = [];
96 146 $.each(data, function () {
... ... @@ -98,8 +148,17 @@
98 148 newData.push(this);
99 149 });
100 150 data = newData;
  151 + }*/
  152 + if(selector === '#line'){
  153 + //写死线路下拉框
  154 + data = [];
  155 + $.each(top.gb_data_basic.activeLines, function () {
  156 + data.push({
  157 + id: this.lineCode,
  158 + text: this.name
  159 + });
  160 + });
101 161 }
102   -
103 162 $.each(data, function () {
104 163 this.fullChars = pinyin.getFullChars(this.text).toUpperCase();
105 164 this.camelChars = pinyin.getCamelChars(this.text);
... ...
src/main/resources/static/real_control_v2/js/line_schedule/dbclick.js
... ... @@ -22,6 +22,8 @@ var gb_schedule_table_dbclick = (function() {
22 22 }, function(rs) {
23 23 gb_schedule_table.updateSchedule(rs.ts);
24 24 notify_succ('待发调整成功!');
  25 + //重新计算应发未发
  26 + gb_schedule_table.calc_yfwf_num(rs.ts[0].xlBm);
25 27 });
26 28 }
27 29 }
... ...
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -478,10 +478,11 @@ var gb_schedule_table = (function () {
478 478  
479 479 var carYfwfMap = {}, nbbm;
480 480 $.each(schArr, function () {
481   - if (this.fcsjT > t)
482   - return false;
  481 + /*if (this.dfsjT > t)
  482 + return false;*/
483 483  
484   - if (this.fcsjActual == null && this.fcsjActualTime == null && this.status != -1) {
  484 + if (this.dfsjT < t &&
  485 + this.fcsjActual == null && this.fcsjActualTime == null && this.status != -1) {
485 486 yfwf_num++;
486 487 nbbm = this.clZbh;
487 488 if (carYfwfMap[nbbm])
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -169,8 +169,9 @@ var disabled_submit_btn = function (form) {
169 169 function showUpdateDescription() {
170 170 //更新说明
171 171 var updateDescription = {
172   - date: '2017-05-16',
173   - text: '<h5>修复了进出场班次公里设置为0后自动烂班的问题</h5>'
  172 + date: '2017-05-18',
  173 + text: '<h5>现在自定义子任务,勾选是否烂班后,烂班原因必填。</h5><h5>修复了在驾驶员请求出场时,误下发分班出场指令的问题</h5>' +
  174 + '<h5>调整了报表的弹出窗口<br>1、取消了窗口遮罩,可同时打开多个报表窗口,窗口堆叠时,点击窗口title切换堆叠顺序<br>2、鼠标按住窗口右下角,可随意改变窗口大小。<br>3、拖动窗口时,允许拖出页面之外<br><br>注意:将窗口和窗口title拖出页面外时,会面临窗口丢失的风险,过多丢失的窗口会影响到页面性能,你可以刷新页面以重置!</h5>'
174 175 };
175 176  
176 177 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
... ... @@ -42,8 +42,16 @@ var gb_safe_driv = (function () {
42 42 $wrap.append(htmlStr);
43 43 };
44 44  
  45 + var vedioModal = '<div id="ssspVedioModal" class="uk-modal ct_move_modal">' +
  46 + '<div class="uk-modal-dialog uk-modal-dialog-large">' +
  47 + '<button type="button" class="uk-modal-close uk-close"></button>' +
  48 + '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+
  49 + '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=0"></iframe>' +
  50 + '</div>' +
  51 + '</div>';
  52 +
45 53 $wrap.on('click', '.safe_driv_pop', function () {
46   - var title = $(this).data('title');
  54 + var title = $(this).data('title') + '&nbsp;<button class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>';
47 55 var url = $(this).data('url');
48 56 $(this).remove();
49 57 var lightbox = UIkit.lightbox.create([
... ... @@ -53,9 +61,24 @@ var gb_safe_driv = (function () {
53 61 lightbox.show();
54 62 });
55 63  
  64 + var showVedioModal = function () {
  65 + open_modal_dom(vedioModal ,{}, {modal: false});
  66 + $('#ssspVedioModal #vedioIframe').on('load', function () {
  67 + var that = this;
  68 + setTimeout(function () {
  69 + $(that).show();
  70 + $('#ssspVedioModal p.loading').remove();
  71 + }, 500);
  72 + });
  73 + };
  74 +
  75 + $(document).on('click', '#openVedioModalBtn', showVedioModal);
  76 +
  77 +
56 78 return {
57 79 pop: pop,
58 80 safeCode: codes,
59   - urlPath: path
  81 + urlPath: path,
  82 + showVedioModal: showVedioModal
60 83 }
61 84 })();
62 85 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -40,6 +40,9 @@
40 40 <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/>
41 41 <!-- perfect-scrollbar style -->
42 42 <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" merge="plugins"/>
  43 + <!-- layer 3.0.3 -->
  44 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css" merge="plugins"/>
  45 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/layer3.0.3/skin/moon/style.css" merge="plugins"/>
43 46 </head>
44 47  
45 48 <body>
... ... @@ -147,6 +150,8 @@
147 150 <script src="/assets/plugins/pinyin.js" merge="plugins"></script>
148 151 <!-- qtip -->
149 152 <script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js" merge="plugins"></script>
  153 +<!-- layer 3.0.3 -->
  154 +<script src="/real_control_v2/assets/plugins/layer3.0.3/layer.js" merge="plugins"></script>
150 155  
151 156 <!-- 数据 -->
152 157 <script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script>
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v2/main.html
... ... @@ -760,17 +760,19 @@
760 760 var initDropdownList = function (lineCode) {
761 761 //从地图模块获取停车场数据
762 762 parks = gb_map_spatial_data.carparkArray();
763   - console.log('parksparks', parks);
  763 + //console.log('parksparks', parks);
764 764 //将线路标准停车场排在第一个
765 765 var information = gb_data_basic.getLineInformation(lineCode);
766   - var index;
767   - for(var i = 0,p; p=parks[i++];){
768   - if(p.parkCode == information.carPark){
769   - index = i - 1;
770   - break;
  766 + if(information){
  767 + var index;
  768 + for(var i = 0,p; p=parks[i++];){
  769 + if(p.parkCode == information.carPark){
  770 + index = i - 1;
  771 + break;
  772 + }
771 773 }
  774 + parks[index] = parks.splice(0, 1 , parks[index])[0];
772 775 }
773   - parks[index] = parks.splice(0, 1 , parks[index])[0];
774 776 //渲染
775 777 var htmlStr = template('pb_park_list_dropdown-temp', {list: parks});
776 778 $('.buffer_area_form .parks_list', modal).html(htmlStr);
... ... @@ -833,6 +835,8 @@
833 835 }
834 836  
835 837 //更新路段底图
  838 + if(gps.upDown!=0 && gps.upDown!=1)
  839 + gps.upDown = 0;
836 840 if(gps.upDown!=roadUpdown){
837 841 switchPolyline(gps.upDown);
838 842 //清除轨迹线
... ... @@ -859,13 +863,13 @@
859 863 /**
860 864 * 绘制路段底图(包括站点)
861 865 */
862   - var roadUpdown=-1;
  866 + var roadUpdown=-100;
863 867 var switchPolyline = function (upDown) {
864 868 if(typeof(upDown) == "undefined")
865 869 upDown = roadUpdown;
866 870  
867 871 if(upDown!= 0 && upDown != 1)
868   - return;
  872 + upDown = 0;
869 873 map.clearOverlays();
870 874 parkPolygons = {};//清除停车场对照
871 875 //路段
... ... @@ -966,7 +970,7 @@
966 970 if(gpsMarker)
967 971 gpsMarker.enableMassClear();
968 972 map.clearOverlays();
969   - roadUpdown = -1;
  973 + roadUpdown = -100;
970 974 trailArray=[];
971 975 trailPolyline = null;
972 976 gpsMarker = null;
... ...
src/test/resources/testdata/problem.properties
... ... @@ -20,7 +20,7 @@
20 20 20=排班规则备注
21 21 ##21=时刻表,两点间空驶,算空驶
22 22 22=搭班编码自动生成
23   -23=时刻表明细修改终点站停驶(停止1个半小时以上)
  23 +##23=时刻表明细修改终点站停驶(停止1个半小时以上)
24 24 ##24=线路标准里如果里程是0,用标准里程
25 25 ##25=规则导出的日期格式修正
26 26 ##26=人员录入,工号规则前加 "{公司编码}-"
... ...