Commit 038dee302efd6bb7aea6c44002174694a234b362

Authored by 潘钊
2 parents 30b721fb 8be3fa26
Showing 53 changed files with 2990 additions and 512 deletions
... ... @@ -5,7 +5,7 @@
5 5 <groupId>com.bsth</groupId>
6 6 <artifactId>bsth_control</artifactId>
7 7 <version>0.0.1-SNAPSHOT</version>
8   - <packaging>war</packaging>
  8 + <packaging>jar</packaging>
9 9  
10 10 <parent>
11 11 <groupId>org.springframework.boot</groupId>
... ... @@ -22,7 +22,7 @@
22 22 <dependency>
23 23 <groupId>org.springframework.boot</groupId>
24 24 <artifactId>spring-boot-starter-tomcat</artifactId>
25   - <scope>provided</scope>
  25 + <!--<scope>provided</scope>-->
26 26 </dependency>
27 27  
28 28 <dependency>
... ... @@ -246,4 +246,4 @@
246 246 <properties>
247 247 <start-class>com.bsth.Application</start-class>
248 248 </properties>
249   -</project>
  249 +</project>
... ...
src/main/java/com/bsth/controller/LineController.java
... ... @@ -51,8 +51,11 @@ public class LineController extends BaseController&lt;Line, Integer&gt; {
51 51 @RequestMapping(method = RequestMethod.POST)
52 52 public Map<String, Object> save(Line t){
53 53  
54   - t.setId(Integer.valueOf(t.getLineCode()));
55   -
  54 + if(t.getId()==null) {
  55 +
  56 + t.setId(Integer.valueOf(t.getLineCode()));
  57 +
  58 + }
56 59 return service.save(t);
57 60 }
58 61 }
... ...
src/main/java/com/bsth/controller/StationRouteController.java
... ... @@ -92,11 +92,10 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
92 92 *
93 93 * @param map <id:线路ID>
94 94 *
95   - * @return Map<String, Object> <SUCCESS ; ERROR>
  95 + * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
96 96 */
97 97 @RequestMapping(value = "/usingSingle",method = RequestMethod.POST)
98 98 public Map<String, Object> usingSingle(@RequestParam Map<String, Object> map) {
99   -
100 99 return service.usingSingle(map);
101 100 }
102 101  
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -142,6 +142,13 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
142 142 @Query(value = " select MAX(r.sectionroute_code) as sectionrouteCode from bsth_c_sectionroute r WHERE r.line=?1 and r.directions =?2 and r.sectionroute_code< ?3", nativeQuery=true)
143 143 List<Object[]> findUpSectionRouteCode(Integer lineId,Integer direction,Integer stationRouteCode);
144 144  
  145 + /**
  146 + * @Description :TODO(获取路段路由信息)
  147 + *
  148 + * @param lineId:线路ID;directions:方向
  149 + *
  150 + * @return List<Map<String, Object>> {[0]:directions(方向);[1]:bsection_vector(路段坐标);[2]:speed_limit(限速);[3]:section_name(路段名称)}
  151 + */
145 152 @Query(value = "SELECT " +
146 153 "c.directions," +
147 154 "AsText(s.bsection_vector) as bsection_vector," +
... ... @@ -149,5 +156,5 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
149 156 "s.section_name " +
150 157 " FROM bsth_c_sectionroute c " +
151 158 " LEFT JOIN bsth_c_section s on c.section = s.id where c.line = ?1 and c.directions = ?2", nativeQuery=true)
152   -List<Object[]> sectionRouteVector(Integer lineId,Integer directions);
  159 + List<Object[]> sectionRouteVector(Integer lineId,Integer directions);
153 160 }
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -7,6 +7,8 @@ import org.springframework.data.jpa.repository.Query;
7 7 import org.springframework.stereotype.Repository;
8 8 import org.springframework.transaction.annotation.Transactional;
9 9  
  10 +import com.bsth.entity.Line;
  11 +import com.bsth.entity.LineInformation;
10 12 import com.bsth.entity.StationRoute;
11 13  
12 14 /**
... ... @@ -124,7 +126,11 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
124 126 *
125 127 * @param lineId:线路ID
126 128 *
127   - * @return List<Object[]>
  129 + * @return List<Object[]>:{[0]:g_lonx(GPS经度);[1]:g_laty(GPS纬度);[2]:b_jwpoints(百度经纬度坐标)
  130 + *
  131 + * [3]:station_mark(站点类型);[4]:station_route_code(站点序号);[5]:station_cod(站点编码);
  132 + *
  133 + * [6]:distances(站点距离);[7]:station_name(站点名称);[8]:directions(方向)}
128 134 */
129 135 @Query(value = "SELECT * FROM ("+
130 136 "SELECT b.g_lonx," +
... ... @@ -212,4 +218,6 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
212 218 " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.id = ?1 ) a " +
213 219 " LEFT JOIN bsth_c_station b ON a.stationRouteStation = b.id", nativeQuery=true)
214 220 List<Object[]> findStationRouteInfo(Integer id);
  221 +
  222 + List<StationRoute> findByLine(Line line);
215 223 }
... ...
src/main/java/com/bsth/service/StationRouteService.java
... ... @@ -65,7 +65,7 @@ public interface StationRouteService extends BaseService&lt;StationRoute, Integer&gt;
65 65 *
66 66 * @param map <id:线路ID>
67 67 *
68   - * @return Map<String, Object> <SUCCESS ; ERROR>
  68 + * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
69 69 */
70 70 Map<String, Object> usingSingle(Map<String, Object> map);
71 71  
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
1 1 package com.bsth.service.impl;
2 2  
3   -import java.awt.Point;
4 3 import java.io.ByteArrayInputStream;
5 4 import java.io.File;
6 5 import java.io.InputStream;
  6 +import java.text.DecimalFormat;
7 7 import java.util.ArrayList;
8 8 import java.util.HashMap;
9 9 import java.util.List;
... ... @@ -23,7 +23,7 @@ import com.bsth.repository.StationRepository;
23 23 import com.bsth.repository.StationRouteRepository;
24 24 import com.bsth.service.StationRouteService;
25 25 import com.bsth.util.FTPClientUtils;
26   -import com.bsth.util.Test;
  26 +import com.bsth.util.PackTarGZUtils;
27 27 import com.bsth.util.db.DBUtils_MS;
28 28  
29 29 /**
... ... @@ -505,11 +505,12 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
505 505 *
506 506 * @param map <lineId:线路ID>
507 507 *
508   - * @return Map<String, Object> <SUCCESS ; ERROR>
  508 + * @return Map<String, Object> <SUCCESS ; ERROR ; NOTDATA>
509 509 */
510 510 @Override
511 511 public Map<String, Object> usingSingle(Map<String, Object> map) {
512 512  
  513 + // 返回值map
513 514 Map<String, Object> resultMap = new HashMap<String,Object>();
514 515  
515 516 try {
... ... @@ -517,63 +518,75 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
517 518 // 获取线路ID
518 519 Integer lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
519 520  
520   - /** 查询线路信息 */
  521 + /** 查询线路信息 @param:<lineId:线路ID> */
521 522 Line line = lineRepository.findOne(lineId);
522 523  
  524 + /** 查询线路信息下的站点路由信息 @param:<lineId:线路ID> */
523 525 List<Object[]> objects = repository.usingSingle(lineId);
524 526  
525 527 if (objects.size()>0) {
526 528  
527   - /** 获取配置文件里的ftp参数 */
  529 + /** 获取配置文件里的ftp登录参数 */
528 530 Map<String, Object> FTPParamMap = readPropertiesGetFTPParam();
529 531  
530 532 // 压缩文件名
531 533 String odlGzFileName = line.getLineCode() + ".txt.gz";
532 534  
533   - // text文件名
  535 + // txt文件名
534 536 String textFileName = line.getLineCode() + ".txt";
535 537  
  538 + // 创建一个ftp上传实例
536 539 FTPClientUtils clientUtils = new FTPClientUtils();
537 540  
  541 + // IP
538 542 String url = FTPParamMap.get("url").toString();
539 543  
  544 + // 端口
540 545 int port = Integer.valueOf(FTPParamMap.get("port").toString());
541 546  
  547 + // 用户名
542 548 String username = FTPParamMap.get("username").toString();
543 549  
  550 + // 密码
544 551 String password = FTPParamMap.get("password").toString();
545 552  
  553 + // 相对路径
546 554 String remotePath = FTPParamMap.get("remotePath").toString();
547 555  
548   - /** 如果行单文件已存在则删除 */
  556 + /** 如果已存在相同行单文件名则先删除 */
549 557 clientUtils.deleteFtpFile(url, port, username, password, remotePath, odlGzFileName);
550 558  
551 559 clientUtils.deleteFtpFile(url, port, username, password, remotePath, textFileName);
552 560  
  561 + /** 行单文件内容 @param:<objects:站点路由;lineId:线路ID>*/
553 562 String textStr = newTextFileToFTP(objects,lineId);
554 563  
555   - /*textStr = line.getName() + "\t" + "2" + "\r\n" + textStr;*/
  564 + /*textStr = line.getName() + "\t" + "2" + "\r" + textStr;*/
556 565  
557   - textStr = line.getName() + "\t" + "2" + "\r" + textStr;
  566 + textStr = line.getName() + " " + "2" + "\r" + textStr;
558 567  
559 568 InputStream input = new ByteArrayInputStream(textStr.getBytes("gbk"));
560 569  
561   - /** 生成text文件 */
  570 + /** 生成txt文件,上传ftp */
562 571 clientUtils.uploadFile(url, port, username, password, remotePath, textFileName, input);
563 572  
564   - Test test= new Test();
  573 + // 创建打包实例
  574 + PackTarGZUtils packTarGZUtils= new PackTarGZUtils();
565 575  
  576 + /** 获取txt文件 */
566 577 File textFile = clientUtils.GetFtpFile(url, port, username, password, remotePath, textFileName);
567 578  
  579 + /*File[] sources = new File[] {textFile};*/
568 580 File[] sources = new File[] {textFile};
569 581  
570 582 File target = new File(odlGzFileName);
571   -
572   - File targetFile = test.pack(sources, target);
  583 +
  584 + // 将txt文件打包
  585 + File targetFile = packTarGZUtils.pack(sources, target);
573 586  
574 587 /*clientUtils.testUpLoadFromDisk(targetFile,targetFile.getName());*/
575 588  
576   - clientUtils.testUpLoadFromDisk(targetFile, targetFile.getName(), url, port, username, password, remotePath);
  589 + clientUtils.FTPUpLoadFromDisk(targetFile, targetFile.getName(), url, port, username, password, remotePath);
577 590  
578 591 resultMap.put("status", ResponseCode.SUCCESS);
579 592  
... ... @@ -593,12 +606,28 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
593 606 return resultMap;
594 607 }
595 608  
  609 + /**
  610 + * @Description : TODO(形成行单文件内容)
  611 + *
  612 + * @param objects :站点路由信息
  613 + *
  614 + * {[0]:g_lonx(GPS经度);[1]:g_laty(GPS纬度);[2]:b_jwpoints(百度经纬度坐标)
  615 + *
  616 + * [3]:station_mark(站点类型);[4]:station_route_code(站点序号);[5]:station_cod(站点编码);
  617 + *
  618 + * [6]:distances(站点距离);[7]:station_name(站点名称);[8]:directions(方向)}
  619 + *
  620 + * @param lineId :线路ID
  621 + *
  622 + * @return String
  623 + */
596 624 public String newTextFileToFTP(List<Object[]> objects,Integer lineId) {
597 625  
  626 + // 返回值String
598 627 String stationRStr = "";
599 628  
600 629 // windows下的文本文件换行符
601   - // String enterStr = "\r\n";
  630 + //String enterStr = "\r\n";
602 631  
603 632 // linux/unix下的文本文件换行符
604 633 String enterStr = "\r";
... ... @@ -616,15 +645,17 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
616 645 lat = "\t" + lat;
617 646  
618 647 // 站点类型
619   - String stationMake = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString();
  648 + String stationMakeStr = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString();
  649 +
  650 + String stationMake = "";
620 651  
621   - if(stationMake.equals("E")) {
  652 + if(stationMakeStr.equals("E")) {
622 653  
623   - stationMake = "\t" + "2";
  654 + stationMake = "\t2";
624 655  
625 656 }else {
626 657  
627   - stationMake ="\t" + "1";
  658 + stationMake ="\t1";
628 659  
629 660 }
630 661  
... ... @@ -638,30 +669,35 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
638 669  
639 670 stationCode = "\t" +stationCode;
640 671  
641   - double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString());
  672 + double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000;
642 673  
643   - double tempd = dis*1000;
  674 + String tempDistc = String.valueOf((int) dis);
644 675  
645 676 // 站点距离
646   - String staitondistance = "\t" + String.valueOf((int) tempd);
  677 + String staitondistance = "\t" + tempDistc;
647 678  
648 679 // 站点名称
649 680 String stationName = objects.get(i)[7].equals("") ? "" : objects.get(i)[7].toString();
650 681  
  682 + stationName = "\t" +stationName;
  683 +
651 684 // 限速
652 685 // String sleepStr = " " + "60";
653 686  
  687 + // 限速
654 688 String sleepStr = "";
655 689  
  690 + // 方向
656 691 int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString());
657 692  
  693 + /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */
658 694 List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions);
659 695  
660 696 if(sobje.size()==1) {
661 697  
662   - sleepStr = sobje.get(0)[2] == null ? "" : sobje.get(0)[2].toString();
  698 + double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString());
663 699  
664   - sleepStr = "\t" + sleepStr;
  700 + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr);
665 701  
666 702 }else if(sobje.size()>1){
667 703  
... ... @@ -674,9 +710,11 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
674 710  
675 711 if(stationName.equals(sectionNameA[0])){
676 712  
677   - sleepStr = sobje.get(j)[2].toString();
  713 + /*sleepStr = sobje.get(j)[2].toString();*/
  714 +
  715 + double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString());
678 716  
679   - sleepStr = "\t" + sleepStr;
  717 + sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt);
680 718  
681 719 }
682 720  
... ... @@ -698,12 +736,6 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
698 736 sleepStr = sleepStr + GetFormPointOnPolylineSeleepLimit(pointsM,sobje);*/
699 737 }
700 738  
701   - if(sleepStr.equals(""))
702   - sleepStr = "\t" + "60";
703   -
704   -
705   - stationName = "\t" +stationName;
706   -
707 739 stationRStr = stationRStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr;
708 740  
709 741 }
... ... @@ -798,8 +830,14 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
798 830 return success;
799 831 }
800 832  
  833 + /**
  834 + * @Description:TOOD(获取FTP登录参数) 这里暂时只做一个map值返回,以后可以作为ftp登录类提出来
  835 + *
  836 + * @return : Map<String, Object> <url:IP;port:端口;username:用户名;password:密码;remotePath:相对路径>
  837 + */
801 838 public Map<String, Object> readPropertiesGetFTPParam(){
802 839  
  840 + // 返回值map
803 841 Map<String, Object> resultMap = new HashMap<String, Object>();
804 842  
805 843 Properties env = new Properties();
... ...
src/main/java/com/bsth/service/impl/StationServiceImpl.java
... ... @@ -161,6 +161,11 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
161 161 // 更新里程
162 162 updateLineInfoUpOrDownMileage( resultLine , directions, sumUpOrDownMileage);
163 163  
  164 + if(directions==0) {
  165 +
  166 + lineUpdateStationName(resultLine);
  167 +
  168 + }
164 169 resultMap.put("status", ResponseCode.SUCCESS);
165 170  
166 171 } catch (Exception e) {
... ... @@ -175,6 +180,53 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
175 180 }
176 181  
177 182  
  183 + public void lineUpdateStationName(Line resultLine) {
  184 +
  185 + List<StationRoute> stationRoutes = routeRepository.findByLine(resultLine);
  186 +
  187 + int sizeL = stationRoutes.size();
  188 +
  189 + if(sizeL<0) {
  190 +
  191 + return;
  192 +
  193 + }
  194 +
  195 + if(resultLine.getStartStationName()==null){
  196 +
  197 + for(int k =0;k<sizeL;k++) {
  198 +
  199 + StationRoute tempS = stationRoutes.get(k);
  200 +
  201 + if(tempS.getStationMark().equals("B") && tempS.getDirections()==0) {
  202 +
  203 + resultLine.setStartStationName(tempS.getStationName());
  204 +
  205 + lineRepository.save(resultLine);
  206 +
  207 + }
  208 + }
  209 +
  210 + };
  211 +
  212 + if(resultLine.getEndStationName()==null) {
  213 +
  214 + for(int k =0;k<sizeL;k++) {
  215 +
  216 + StationRoute tempS = stationRoutes.get(k);
  217 +
  218 + if(tempS.getStationMark().equals("E") && tempS.getDirections()==0) {
  219 +
  220 + resultLine.setEndStationName(tempS.getStationName());
  221 +
  222 + lineRepository.save(resultLine);
  223 +
  224 + }
  225 + }
  226 +
  227 + }
  228 + }
  229 +
178 230 /**
179 231 * @Description :保存站点和站点路由信息(系统规划)
180 232 *
... ... @@ -877,7 +929,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
877 929  
878 930 String stationRouteCodeArray [] = stationRouteCodeStr.split("_");
879 931  
880   - stationRouteCode = Integer.parseInt(stationRouteCodeArray[0]+1);
  932 + stationRouteCode = Integer.parseInt(stationRouteCodeArray[0].toString())+1;
881 933  
882 934  
883 935 }else {
... ... @@ -1436,6 +1488,12 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1436 1488 // 更新里程
1437 1489 updateLineInfoUpOrDownMileage( resultLine , directions, sumUpOrDownMileage);
1438 1490  
  1491 + if(directions==0) {
  1492 +
  1493 + lineUpdateStationName(resultLine);
  1494 +
  1495 + }
  1496 +
1439 1497 resultMap.put("status", ResponseCode.SUCCESS);
1440 1498  
1441 1499 } catch (Exception e) {
... ...
src/main/java/com/bsth/service/schedule/utils/DataToolsProperties.java
... ... @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
8 8 * 配置数据导入导出用到的配置信息
9 9 */
10 10 @ConfigurationProperties(
11   - locations = "classpath:datatools/config.properties",
  11 + locations = "classpath:datatools/config-${spring.profiles.active}.properties",
12 12 ignoreInvalidFields = true,
13 13 prefix = "datatools"
14 14 )
... ...
src/main/java/com/bsth/util/FTPClientUtils.java
... ... @@ -11,6 +11,7 @@ import java.io.OutputStream;
11 11 import java.io.UnsupportedEncodingException;
12 12  
13 13 import org.apache.commons.net.ftp.FTPClient;
  14 +import org.apache.commons.net.ftp.FTPFile;
14 15 import org.apache.commons.net.ftp.FTPReply;
15 16 /**
16 17 * @Description: 向FTP服务器上传文件
... ... @@ -66,13 +67,16 @@ public class FTPClientUtils {
66 67  
67 68 ftp.changeWorkingDirectory(path);
68 69  
69   - ftp.storeFile(filename, input);
  70 + ftp.enterLocalPassiveMode();
  71 +
  72 + success = ftp.storeFile(new String(filename.getBytes("gbk"),"gbk"), input);
  73 + /*success = ftp.storeFile(filename, input); */
70 74  
71 75 input.close();
72 76  
73 77 ftp.logout();
74 78  
75   - success = true;
  79 + // success = true;
76 80  
77 81 } catch (IOException e) {
78 82  
... ... @@ -97,8 +101,25 @@ public class FTPClientUtils {
97 101 return success;
98 102 }
99 103  
100   - // 将本地文件上传到FTP服务器上
101   - public void testUpLoadFromDisk(File file,String name,String url, int port, String username, String password, String remotePath){
  104 + /**
  105 + * @Description : TOOD(将本地文件上传到FTP服务器上)
  106 + *
  107 + * @param file
  108 + *
  109 + * @param name
  110 + *
  111 + * @param url
  112 + *
  113 + * @param port
  114 + *
  115 + * @param username
  116 + *
  117 + * @param password
  118 + *
  119 + * @param remotePath
  120 + *
  121 + */
  122 + public void FTPUpLoadFromDisk(File file,String name,String url, int port, String username, String password, String remotePath){
102 123  
103 124 try {
104 125 FileInputStream in=new FileInputStream(file);
... ... @@ -137,16 +158,21 @@ public class FTPClientUtils {
137 158 }
138 159  
139 160 /**
140   - * <删除FTP上的文件>
141   - * <远程删除FTP服务器上的录音文件>
  161 + * @Description (删除FTP上的文件)
  162 + *
142 163 * @param url FTP服务器IP地址
  164 + *
143 165 * @param port FTP服务器端口
  166 + *
144 167 * @param username FTP服务器登录名
  168 + *
145 169 * @param password FTP服务器密码
  170 + *
146 171 * @param remotePath 远程文件路径
  172 + *
147 173 * @param fileName 待删除的文件名
148   - * @return
149   - * @see [类、类#方法、类#成员]
  174 + *
  175 + * @return boolean
150 176 */
151 177 public static boolean deleteFtpFile(String url, int port, String username, String password, String remotePath, String fileName){
152 178  
... ... @@ -170,8 +196,6 @@ public class FTPClientUtils {
170 196 // 登录
171 197 ftp.login(username, password);
172 198  
173   -
174   -
175 199 reply = ftp.getReplyCode();
176 200  
177 201 if (!FTPReply.isPositiveCompletion(reply)) {
... ... @@ -185,7 +209,9 @@ public class FTPClientUtils {
185 209  
186 210 ftp.changeWorkingDirectory(remotePath);
187 211  
188   - success = ftp.deleteFile(fileName);
  212 + /*success = ftp.deleteFile(fileName);*/
  213 +
  214 + success = ftp.deleteFile(new String(fileName.getBytes("gbk"),"gbk"));
189 215  
190 216 ftp.logout();
191 217  
... ... @@ -217,6 +243,8 @@ public class FTPClientUtils {
217 243 public static File GetFtpFile(String url, int port, String username, String password, String remotePath, String fileName){
218 244  
219 245 FTPClient ftp = new FTPClient();
  246 +
  247 + /*File destFile = new File(fileName); */
220 248  
221 249 File destFile = new File(fileName);
222 250  
... ... @@ -247,16 +275,42 @@ public class FTPClientUtils {
247 275 ftp.disconnect();
248 276  
249 277 }
250   -
  278 +
251 279 // 转移到FTP服务器目录
252   -
  280 +
253 281 ftp.changeWorkingDirectory(remotePath);
254 282  
255   - File srcFile = new File(fileName);
  283 + ftp.enterLocalPassiveMode();
  284 +
  285 + FTPFile[] fs = ftp.listFiles();
  286 +
  287 + System.out.println(fs.length);
  288 +
  289 + /* for (FTPFile ff : fs) {
  290 + //解决中文乱码问题,两次解码
  291 + byte[] bytes=ff.getName().getBytes("gbk");
  292 + String fn=new String(bytes,"gbk");
  293 + if (fn.equals(fileName)) {
  294 + //6.写操作,将其写入到本地文件中
  295 + File localFile = new File(ff.getName());
  296 +
  297 +
  298 + OutputStream is = new FileOutputStream(localFile);
  299 + ftp.retrieveFile(ff.getName(), is);
  300 + is.close();
  301 + }
  302 + } */
  303 +
  304 + /* File srcFile = new File(fileName); */
  305 +
  306 + /* File srcFile = new File(new String(fileName.getBytes("gbk"),"gbk"));*/
256 307  
257 308 int byteread = 0; // 读取的字节数
  309 +
  310 + /* in = ftp.retrieveFileStream(remotePath + fileName);*/
258 311  
259   - in = ftp.retrieveFileStream(fileName);
  312 + in = ftp.retrieveFileStream(new String(fileName.getBytes("gbk"),"gbk"));
  313 +
260 314  
261 315 out = new FileOutputStream(destFile);
262 316  
... ...
src/main/java/com/bsth/util/PackTarGZUtils.java 0 → 100644
  1 +package com.bsth.util;
  2 +
  3 +import java.io.File;
  4 +import java.io.FileInputStream;
  5 +import java.io.FileNotFoundException;
  6 +import java.io.FileOutputStream;
  7 +import java.io.IOException;
  8 +import java.util.zip.GZIPOutputStream;
  9 +
  10 +import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
  11 +import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
  12 +import org.apache.commons.compress.utils.IOUtils;
  13 +
  14 +public class PackTarGZUtils {
  15 +
  16 +
  17 + /**
  18 + * @Title: pack
  19 + *
  20 + * @Description: 将一组文件打成tar包
  21 + *
  22 + * @param sources 要打包的原文件数组
  23 + *
  24 + * @param target 打包后的文件
  25 + *
  26 + * @return File 返回打包后的文件
  27 + *
  28 + * @throws
  29 + *
  30 + */
  31 + public static File pack(File[] sources, File target){
  32 +
  33 + FileOutputStream out = null;
  34 +
  35 + try {
  36 +
  37 + out = new FileOutputStream(target);
  38 +
  39 + } catch (FileNotFoundException e1) {
  40 +
  41 + e1.printStackTrace();
  42 +
  43 + }
  44 +
  45 + TarArchiveOutputStream os = new TarArchiveOutputStream(out);
  46 +
  47 + for (File file : sources) {
  48 +
  49 + try {
  50 +
  51 + os.putArchiveEntry(new TarArchiveEntry(file));
  52 +
  53 + IOUtils.copy(new FileInputStream(file), os);
  54 +
  55 + os.closeArchiveEntry();
  56 +
  57 + } catch (FileNotFoundException e) {
  58 +
  59 + e.printStackTrace();
  60 +
  61 + } catch (IOException e) {
  62 +
  63 + e.printStackTrace();
  64 +
  65 + }
  66 + }
  67 + if(os != null) {
  68 +
  69 + try {
  70 +
  71 + os.flush();
  72 +
  73 + os.close();
  74 +
  75 + } catch (IOException e) {
  76 +
  77 + e.printStackTrace();
  78 + }
  79 + }
  80 +
  81 + return target;
  82 +
  83 + }
  84 +
  85 + /**
  86 + *
  87 + * @Title: compress
  88 + *
  89 + * @Description: 将文件用gzip压缩
  90 + *
  91 + * @param source 需要压缩的文件
  92 + *
  93 + * @return File 返回压缩后的文件
  94 + *
  95 + * @throws
  96 + *
  97 + */
  98 + public static File compress(File source) {
  99 +
  100 + File target = new File(source.getName() + ".gz");
  101 +
  102 + FileInputStream in = null;
  103 +
  104 + GZIPOutputStream out = null;
  105 +
  106 + try {
  107 +
  108 + in = new FileInputStream(source);
  109 +
  110 + out = new GZIPOutputStream(new FileOutputStream(target));
  111 +
  112 + byte[] array = new byte[1024];
  113 +
  114 + int number = -1;
  115 +
  116 + while((number = in.read(array, 0, array.length)) != -1) {
  117 +
  118 + out.write(array, 0, number);
  119 + }
  120 + } catch (FileNotFoundException e) {
  121 +
  122 + e.printStackTrace();
  123 +
  124 + return null;
  125 +
  126 + } catch (IOException e) {
  127 +
  128 + e.printStackTrace();
  129 +
  130 + return null;
  131 +
  132 + } finally {
  133 +
  134 + if(in != null) {
  135 +
  136 + try {
  137 +
  138 + in.close();
  139 +
  140 + } catch (IOException e) {
  141 +
  142 + e.printStackTrace();
  143 +
  144 + return null;
  145 +
  146 + }
  147 +
  148 + }
  149 +
  150 + if(out != null) {
  151 +
  152 + try {
  153 +
  154 + out.close();
  155 +
  156 + } catch (IOException e) {
  157 +
  158 + e.printStackTrace();
  159 + return null;
  160 + }
  161 + }
  162 + }
  163 +
  164 + return target;
  165 +
  166 + }
  167 +}
... ...
src/main/resources/application-dev.properties
... ... @@ -10,7 +10,7 @@ spring.jpa.show-sql= true
10 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 11 spring.datasource.url= jdbc:mysql://127.0.0.1:3306/control
12 12 spring.datasource.username= root
13   -spring.datasource.password= panzhao
  13 +spring.datasource.password=
14 14 #DATASOURCE
15 15 spring.datasource.max-active=100
16 16 spring.datasource.max-idle=8
... ...
src/main/resources/datatools/config-dev.properties 0 → 100644
  1 +# 配置数据导入导出用到的配置信息
  2 +
  3 +# 上传文件目录配置(根据不同的环境需要修正)
  4 +datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files
  5 +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
  6 +datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files/erroroutput
  7 +# 临时输出文件目录
  8 +datatools.trans_tempdir=/Users/xu/resource/project/bsth_control_u_d_files/temp
  9 +
  10 +#------------------- ktr主配置文件路径(类路径) ------------------
  11 +datatools.kettle_properties=/datatools/kettle.properties
  12 +
  13 +##------------------ ktr通用变量 ------------------
  14 +#数据库ip地址
  15 +datatools.kvars_dbip=localhost
  16 +#数据库用户名
  17 +datatools.kvars_dbuname=root
  18 +#数据库密码
  19 +datatools.kvars_dbpwd=
  20 +
  21 +# 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中
  22 +# 测试temp的ktr转换文件
  23 +datatools.temp_datainputktr=/datatools/ktrs/test.ktr
  24 +# 车辆信息导入ktr转换
  25 +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
  26 +# 人员信息导入
  27 +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
  28 +# 路牌信息导入
  29 +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
  30 +# 时刻表基础信息导入
  31 +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
  32 +# 时刻表明细信息导入(元数据)
  33 +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailMetaData.ktr
  34 +# 时刻表明细编辑用数据(TODO:之后要换成元数据形式输入)
  35 +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
  36 +# 时刻表明细信息导入
  37 +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
  38 +
  39 +# 车辆配置信息导入
  40 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
  41 +# 人员配置信息导入
  42 +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
  43 +
  44 +# 排班规则信息导入
  45 +
... ...
src/main/resources/datatools/config.properties renamed to src/main/resources/datatools/config-prod.properties
1   -# 配置数据导入导出用到的配置信息
2   -
3   -# 上传文件目录配置(根据不同的环境需要修正)
4   -datatools.fileupload_dir=/opt/bsth_control_u_d_files
5   -# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
6   -datatools.trans_errordir=/opt/bsth_control_u_d_files/erroroutput
7   -# 临时输出文件目录
8   -datatools.trans_tempdir=/opt/bsth_control_u_d_files/temp
9   -
10   -#------------------- ktr主配置文件路径(类路径) ------------------
11   -datatools.kettle_properties=/datatools/kettle.properties
12   -
13   -##------------------ ktr通用变量 ------------------
14   -#数据库ip地址
15   -#datatools.kvars_dbip=192.168.168.201
16   -datatools.kvars_dbip=192.168.168.171
17   -#数据库用户名
18   -datatools.kvars_dbuname=root
19   -#数据库密码
20   -#datatools.kvars_dbpwd=123456
21   -datatools.kvars_dbpwd=root2jsp
22   -
23   -# 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中
24   -# 测试temp的ktr转换文件
25   -datatools.temp_datainputktr=/datatools/ktrs/test.ktr
26   -# 车辆信息导入ktr转换
27   -datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
28   -# 人员信息导入
29   -datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
30   -# 路牌信息导入
31   -datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
32   -# 时刻表基础信息导入
33   -datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
34   -# 时刻表明细信息导入(元数据)
35   -datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailMetaData.ktr
36   -# 时刻表明细编辑用数据(TODO:之后要换成元数据形式输入)
37   -datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
38   -# 时刻表明细信息导入
39   -datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
40   -
41   -# 车辆配置信息导入
42   -datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
43   -# 人员配置信息导入
44   -datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
45   -
46   -# 排班规则信息导入
47   -
  1 +# 配置数据导入导出用到的配置信息
  2 +
  3 +# 上传文件目录配置(根据不同的环境需要修正)
  4 +#datatools.fileupload_dir=/opt/bsth_control_u_d_files
  5 +datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files
  6 +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
  7 +#datatools.trans_errordir=/opt/bsth_control_u_d_files/erroroutput
  8 +datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files/erroroutput
  9 +# 临时输出文件目录
  10 +#datatools.trans_tempdir=/opt/bsth_control_u_d_files/temp
  11 +datatools.trans_tempdir=/Users/xu/resource/project/bsth_control_u_d_files/temp
  12 +
  13 +#------------------- ktr主配置文件路径(类路径) ------------------
  14 +datatools.kettle_properties=/datatools/kettle.properties
  15 +
  16 +##------------------ ktr通用变量 ------------------
  17 +#数据库ip地址
  18 +#datatools.kvars_dbip=192.168.168.201
  19 +datatools.kvars_dbip=192.168.168.171
  20 +#数据库用户名
  21 +datatools.kvars_dbuname=root
  22 +#数据库密码
  23 +#datatools.kvars_dbpwd=123456
  24 +datatools.kvars_dbpwd=root2jsp
  25 +
  26 +# 以下是封装数据导入导出逻辑的ktr转换文件,类路径,以后考虑放到数据库中
  27 +# 测试temp的ktr转换文件
  28 +datatools.temp_datainputktr=/datatools/ktrs/test.ktr
  29 +# 车辆信息导入ktr转换
  30 +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
  31 +# 人员信息导入
  32 +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
  33 +# 路牌信息导入
  34 +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
  35 +# 时刻表基础信息导入
  36 +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
  37 +# 时刻表明细信息导入(元数据)
  38 +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailMetaData.ktr
  39 +# 时刻表明细编辑用数据(TODO:之后要换成元数据形式输入)
  40 +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
  41 +# 时刻表明细信息导入
  42 +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
  43 +
  44 +# 车辆配置信息导入
  45 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
  46 +# 人员配置信息导入
  47 +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
  48 +
  49 +# 排班规则信息导入
  50 +
... ...
src/main/resources/static/index.html
... ... @@ -38,7 +38,7 @@
38 38 <link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css" type="text/css" />
39 39  
40 40 <!-- schedule计划调度AngularJS模块主css -->
41   -<link rel="stylesheet" href="/pages/scheduleApp/module/main.css" type="text/css"/>
  41 +<link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css" type="text/css"/>
42 42  
43 43 <style type="text/css">
44 44 .searchForm{
... ... @@ -309,7 +309,11 @@ tr.row-active td {
309 309 <script src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" data-exclude=1></script>
310 310 <script src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" data-exclude=1></script>
311 311 <!-- schedule计划调度AngularJS模块主JS -->
312   -<script src="/pages/scheduleApp/module/main.js" data-exclude=1></script>
  312 +<script src="/pages/scheduleApp/module/common/main.js" data-exclude=1></script>
  313 +<script src="/pages/scheduleApp/module/common/prj-common-globalservice.js" data-exclude=1></script>
  314 +<script src="/pages/scheduleApp/module/common/prj-common-filter.js" data-exclude=1></script>
  315 +<script src="/pages/scheduleApp/module/common/prj-common-directive.js" data-exclude=1></script>
  316 +<script src="/pages/scheduleApp/module/common/prj-common-ui-route-state.js" data-exclude=1></script>
313 317  
314 318 <script data-exclude=1>
315 319 //初始打开的片段地址
... ...
src/main/resources/static/pages/base/line/js/line-add-form.js
... ... @@ -49,6 +49,8 @@ $(function(){
49 49 // 填充公司下拉框选择值
50 50 $get('/business/all', {upCode_eq: '77'}, function(array){
51 51  
  52 + console.log(array);
  53 +
52 54 // 公司下拉options属性值
53 55 var options = '<option value="">-- 请选择公司 --</option>';
54 56  
... ...
src/main/resources/static/pages/base/line/js/line-edit-form.js
... ... @@ -12,7 +12,7 @@
12 12 // 初始化公司下拉框
13 13 selectTemp(function(){
14 14  
15   - // 根据ID查询详细信息
  15 + /** 根据ID查询详细信息 */
16 16 $get('/line/' + lineId ,null, function(result){
17 17  
18 18 // 如果不为空
... ... @@ -24,7 +24,7 @@
24 24 // 设置日期
25 25 result.openDate = moment(result.openDate).format(fs);
26 26  
27   - // 填充修改线路表单元素值
  27 + /** 填充修改线路表单元素值 @param:<result:数据结果集;line_edit_form:表单元素> */
28 28 putFormData(result, '#line_edit_form');
29 29  
30 30 // 设置公司值
... ... @@ -60,7 +60,7 @@
60 60 // 输入线路名称,自动生成英文名称和线路简称
61 61 $('#nameInput').on('keyup', setPinYin);
62 62  
63   - // 根据线路名称值设置英文名称值和线路简称
  63 + /** 根据线路名称值设置英文名称值和线路简称 */
64 64 function setPinYin(){
65 65  
66 66 // 获取线路名称值
... ... @@ -74,7 +74,7 @@
74 74 }
75 75  
76 76  
77   - // 公司下拉框
  77 + /** 公司下拉框 @param:<callback:回调函数> */
78 78 function selectTemp(callback) {
79 79  
80 80 // 填充公司下拉框选择值
... ... @@ -453,7 +453,7 @@
453 453 }
454 454 });
455 455  
456   - // 联系电话(手机/电话皆可)验证
  456 + /** 联系电话(手机/电话皆可)验证 */
457 457 $.validator.addMethod("isPhone", function(value,element) {
458 458  
459 459 // 长度
... ...
src/main/resources/static/pages/base/line/js/line-list-table.js
1 1 /**
2 2 *
3   - * @JSName : list.js(线路信息list.html页面js)
  3 + * @JSName : line-list-table.js(线路信息list.html页面js)
4 4 *
5 5 * @Author : bsth@lq
6 6 *
... ... @@ -27,14 +27,16 @@
27 27  
28 28 });
29 29  
30   - // 填充公司下拉框options,并添加公司下拉框值改变事件setbrancheCompanySelectOptions
  30 + // 填充公司下拉框options
31 31 $('#companySelect').html(options)
  32 +
  33 + /** 闵行没下属公司,这里暂时注释公司值改变事件 */
32 34 //$('#companySelect').html(options).on('change', setbrancheCompanySelectOptions);
33 35  
34 36 });
35 37  
36   - /** 填充分公司下拉框 */
37   - setbrancheCompanySelectOptions();
  38 + /** 填充分公司下拉框。--- 闵行没下属公司,这里暂时注释*/
  39 + /* setbrancheCompanySelectOptions();*/
38 40  
39 41 /** 填充分公司下拉框选择值 */
40 42 function setbrancheCompanySelectOptions(){
... ... @@ -53,7 +55,7 @@
53 55  
54 56 } else {
55 57  
56   - // 查询出所属公司下的分公司名称和相应分公司代码
  58 + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */
57 59 $get('/business/all', {upCode_eq: businessCode}, function(array){
58 60  
59 61 // 遍历array
... ... @@ -75,7 +77,7 @@
75 77 // 选择框
76 78 var icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'};
77 79  
78   - // 表格数据分页加载
  80 + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */
79 81 loadTableDate(null,true);
80 82  
81 83 /** 重置按钮事件 */
... ... @@ -84,7 +86,7 @@
84 86 // 清空搜索框值
85 87 $('tr.filter input,select').val('').change();
86 88  
87   - // 重新加载表格数据
  89 + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */
88 90 loadTableDate(null,true);
89 91 });
90 92  
... ... @@ -120,8 +122,10 @@
120 122 }
121 123 }
122 124 });
  125 +
123 126 page = 0;
124 127  
  128 + /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */
125 129 loadTableDate(params,true);
126 130 });
127 131  
... ... @@ -149,8 +153,6 @@
149 153 // 异步请求获取表格数据
150 154 $.get('/line',params,function(result){
151 155  
152   - console.log(result);
153   -
154 156 // 添加序号
155 157 result.content.page = page;
156 158  
... ... @@ -244,7 +246,7 @@
244 246 });
245 247 }
246 248  
247   - // 生成行单
  249 + /** 生成行单,这里暂时只做了单选生成。 */
248 250 $('#datatable_ajax_tools #createUsingSingle').on('click', function() {
249 251  
250 252 // 获取选中行
... ... @@ -275,11 +277,13 @@
275 277  
276 278 lineName = arrChk.val();
277 279  
  280 + // 请求参数
278 281 var params = {lineId:id};
279 282  
280 283 // 弹出正在加载层
281 284 var index = layer.load(0);
282 285  
  286 + /** 生成线路行单 @pararm:<params:请求参数> */
283 287 $post('/stationroute/usingSingle',params,function(data) {
284 288  
285 289 // 关闭弹出框
... ...
src/main/resources/static/pages/base/line/list.html
... ... @@ -53,6 +53,7 @@
53 53 <th width="7%">线路编码</th>
54 54 <th width="8%">线路名称</th>
55 55 <th width="7%">所属公司</th>
  56 + <!-- 闵行没有下属公司,这里暂时注释掉 -->
56 57 <!-- <th width="8%">所属分公司</th> -->
57 58 <th width="6%">线路性质</th>
58 59 <th width="6%">线路等级</th>
... ... @@ -72,12 +73,15 @@
72 73 <input type="text" class="form-control form-filter input-sm" name="name_like">
73 74 </td>
74 75 <td>
  76 + <!-- 公司这里没使用字典表,暂时查的公司表 -->
75 77 <select name="company_eq" class="form-control" id="companySelect"></select>
76 78 </td>
  79 + <!-- 闵行没有下属公司,这里暂时注释掉 -->
77 80 <!-- <td>
78 81 <select name="brancheCompany_eq" class="form-control" id="brancheCompanySelect"></select>
79 82 </td> -->
80 83 <td>
  84 + <!-- 这里没使用字典表,暂时写在页面上 -->
81 85 <select name="nature_like" class="form-control" id="natureSelect">
82 86 <option value="">请选择...</option>
83 87 <option value="lj">路救</option>
... ... @@ -93,6 +97,7 @@
93 97 </select>
94 98 </td>
95 99 <td>
  100 + <!-- 这里没使用字典表,暂时写在页面上 -->
96 101 <select name="level_eq" class="form-control" id="levelSelect">
97 102 <option value="">请选择...</option>
98 103 <option value="1">一级线路</option>
... ... @@ -104,6 +109,7 @@
104 109 <input type="text" class="form-control form-filter input-sm" name="shanghaiLinecode_eq">
105 110 </td>
106 111 <td>
  112 + <!-- 这里没使用字典表,暂时写在页面上 -->
107 113 <select class="form-control form-filter " name="destroy_eq">
108 114 <option value="">请选择...</option>
109 115 <option value="0">运营</option>
... ... @@ -225,7 +231,6 @@
225 231 闵行公司
226 232 {{/if}}
227 233 </td>
228   -
229 234 <td>
230 235 {{if obj.nature == 'lj'}}
231 236 路救
... ...
src/main/resources/static/pages/base/stationroute/editsection.html
... ... @@ -399,9 +399,7 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
399 399  
400 400 console.log(params);
401 401  
402   - return;
403   -
404   - ajaxd.sectionUpdata(params,function(resuntDate) {
  402 + ajaxd.sectionUpdate(params,function(resuntDate) {
405 403  
406 404 if(resuntDate.status=='SUCCESS') {
407 405  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -431,6 +431,9 @@ var PublicFunctions = function () {
431 431  
432 432 var Line = LineObj.getLineObj();
433 433  
  434 + // 刷行左边树
  435 + PublicFunctions.resjtreeDate(Line.id,stationRouteDirections);
  436 +
434 437 /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */
435 438 GetAjaxData.getSectionRouteInfo(Line.id,stationRouteDirections,function(data) {
436 439  
... ...
src/main/resources/static/pages/base/stationroute/list.html
... ... @@ -85,7 +85,7 @@
85 85 </div>
86 86 <!-- 树 -->
87 87 <div class="portlet-body">
88   - <div id="station_Up_tree" style="height: 550px;overflow-y: auto;"></div>
  88 + <div id="station_Up_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div>
89 89 </div>
90 90 </div>
91 91  
... ... @@ -167,7 +167,7 @@
167 167 </div>
168 168 <!-- 树 -->
169 169 <div class="portlet-body">
170   - <div id="station_Down_tree" style="height: 550px;overflow-y: auto;"></div>
  170 + <div id="station_Down_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div>
171 171 </div>
172 172 </div>
173 173  
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js
... ... @@ -26,7 +26,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;BusInfoManageService&#39;, [&#39;BusInfoManageSer
26 26 resetSearchCondition: function() {
27 27 var key;
28 28 for (key in currentSearchCondition) {
29   - currentSearchCondition[key] = null;
  29 + currentSearchCondition[key] = undefined;
30 30 }
31 31 currentPageNo = 1;
32 32 },
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
... ... @@ -63,14 +63,18 @@
63 63 <div class="form-group has-success has-feedback">
64 64 <label class="col-md-2 control-label">所属公司*:</label>
65 65 <div class="col-md-3">
66   - <sa-Select model="ctrl.busInfoForSave"
67   - dicgroup="gsType"
68   - placeholder="请选择所属公司..."
69   - name="gs"
70   - codename="businessCode"
71   - dicname="company"
72   - required="true">
73   - </sa-Select>
  66 + <sa-Select3 model="ctrl.busInfoForSave"
  67 + name="gs"
  68 + placeholder="请选择所属公司..."
  69 + dcvalue="{{ctrl.busInfoForSave.businessCode}}"
  70 + dcname="businessCode"
  71 + icname="code"
  72 + dcname2="company"
  73 + icname2="name"
  74 + icnames="name"
  75 + datatype="gsType"
  76 + required >
  77 + </sa-Select3>
74 78 </div>
75 79 <!-- 隐藏块,显示验证信息 -->
76 80 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">
... ... @@ -121,13 +125,16 @@
121 125 <div class="form-group has-success has-feedback">
122 126 <label class="col-md-2 control-label">设备供应厂商*:</label>
123 127 <div class="col-md-3">
124   - <sa-Select model="ctrl.busInfoForSave"
125   - dicgroup="snames"
126   - placeholder="请选择设备厂商..."
127   - name="supplierName"
128   - codename="supplierName"
129   - required="true">
130   - </sa-Select>
  128 + <sa-Select3 model="ctrl.busInfoForSave"
  129 + name="supplierName"
  130 + placeholder="请选择设备厂商..."
  131 + dcvalue="{{ctrl.busInfoForSave.supplierName}}"
  132 + dcname="supplierName"
  133 + icname="code"
  134 + icnames="name"
  135 + datatype="snames"
  136 + required >
  137 + </sa-Select3>
131 138 </div>
132 139 <!-- 隐藏快,显示验证信息 -->
133 140 <div class="alert alert-danger well-sm" ng-show="myForm.supplierName.$error.required">
... ... @@ -337,36 +344,45 @@
337 344 <div class="form-group">
338 345 <label class="col-md-2 control-label">车辆类型:</label>
339 346 <div class="col-md-3">
340   - <sa-Select model="ctrl.busInfoForSave"
341   - dicgroup="carType"
342   - placeholder="请选择车辆类型..."
343   - name="carType"
344   - codename="carType" >
345   - </sa-Select>
  347 + <sa-Select3 model="ctrl.busInfoForSave"
  348 + name="carType"
  349 + placeholder="请选择车辆类型..."
  350 + dcvalue="{{ctrl.busInfoForSave.carType}}"
  351 + dcname="carType"
  352 + icname="code"
  353 + icnames="name"
  354 + datatype="carType" >
  355 + </sa-Select3>
346 356 </div>
347 357 </div>
348 358  
349 359 <div class="form-group">
350 360 <label class="col-md-2 control-label">是否机动车:</label>
351 361 <div class="col-md-3">
352   - <sa-Select model="ctrl.busInfoForSave"
353   - dicgroup="jdcType"
354   - placeholder="请选择机动车类型..."
355   - name="vehicleStats"
356   - codename="vehicleStats" >
357   - </sa-Select>
  362 + <sa-Select3 model="ctrl.busInfoForSave"
  363 + name="vehicleStats"
  364 + placeholder="请选择机动车类型..."
  365 + dcvalue="{{ctrl.busInfoForSave.vehicleStats}}"
  366 + dcname="vehicleStats"
  367 + icname="code"
  368 + icnames="name"
  369 + datatype="jdcType" >
  370 + </sa-Select3>
358 371 </div>
359 372 </div>
360 373  
361 374 <div class="form-group">
362 375 <label class="col-md-2 control-label">营运状态:</label>
363 376 <div class="col-md-3">
364   - <sa-Select model="ctrl.busInfoForSave"
365   - dicgroup="yyztType"
366   - placeholder="请选择营运状态..."
367   - name="operatorsState"
368   - codename="operatorsState" >
369   - </sa-Select>
  377 + <sa-Select3 model="ctrl.busInfoForSave"
  378 + name="operatorsState"
  379 + placeholder="请选择营运状态..."
  380 + dcvalue="{{ctrl.busInfoForSave.operatorsState}}"
  381 + dcname="operatorsState"
  382 + icname="code"
  383 + icnames="name"
  384 + datatype="yyztType" >
  385 + </sa-Select3>
370 386 </div>
371 387 </div>
372 388  
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
... ... @@ -63,14 +63,19 @@
63 63 <div class="form-group has-success has-feedback">
64 64 <label class="col-md-2 control-label">所属公司*:</label>
65 65 <div class="col-md-3">
66   - <sa-Select model="ctrl.busInfoForSave"
67   - dicgroup="gsType"
68   - placeholder="请选择所属公司..."
69   - name="gs"
70   - codename="businessCode"
71   - dicname="company"
72   - required="true">
73   - </sa-Select>
  66 + <sa-Select3 model="ctrl.busInfoForSave"
  67 + name="gs"
  68 + placeholder="请选择所属公司..."
  69 + dcvalue="{{ctrl.busInfoForSave.businessCode}}"
  70 + dcname="businessCode"
  71 + icname="code"
  72 + dcname2="company"
  73 + icname2="name"
  74 + icnames="name"
  75 + datatype="gsType"
  76 + required >
  77 + </sa-Select3>
  78 +
74 79 </div>
75 80 <!-- 隐藏块,显示验证信息 -->
76 81 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">
... ... @@ -121,13 +126,16 @@
121 126 <div class="form-group has-success has-feedback">
122 127 <label class="col-md-2 control-label">设备供应厂商*:</label>
123 128 <div class="col-md-3">
124   - <sa-Select model="ctrl.busInfoForSave"
125   - dicgroup="snames"
126   - placeholder="请选择设备厂商..."
127   - name="supplierName"
128   - codename="supplierName"
129   - required="true">
130   - </sa-Select>
  129 + <sa-Select3 model="ctrl.busInfoForSave"
  130 + name="supplierName"
  131 + placeholder="请选择设备厂商..."
  132 + dcvalue="{{ctrl.busInfoForSave.supplierName}}"
  133 + dcname="supplierName"
  134 + icname="code"
  135 + icnames="name"
  136 + datatype="snames"
  137 + required >
  138 + </sa-Select3>
131 139 </div>
132 140 <!-- 隐藏快,显示验证信息 -->
133 141 <div class="alert alert-danger well-sm" ng-show="myForm.supplierName.$error.required">
... ... @@ -337,36 +345,45 @@
337 345 <div class="form-group">
338 346 <label class="col-md-2 control-label">车辆类型:</label>
339 347 <div class="col-md-3">
340   - <sa-Select model="ctrl.busInfoForSave"
341   - dicgroup="carType"
342   - placeholder="请选择车辆类型..."
343   - name="carType"
344   - codename="carType" >
345   - </sa-Select>
  348 + <sa-Select3 model="ctrl.busInfoForSave"
  349 + name="carType"
  350 + placeholder="请选择车辆类型..."
  351 + dcvalue="{{ctrl.busInfoForSave.carType}}"
  352 + dcname="carType"
  353 + icname="code"
  354 + icnames="name"
  355 + datatype="carType" >
  356 + </sa-Select3>
346 357 </div>
347 358 </div>
348 359  
349 360 <div class="form-group">
350 361 <label class="col-md-2 control-label">是否机动车:</label>
351 362 <div class="col-md-3">
352   - <sa-Select model="ctrl.busInfoForSave"
353   - dicgroup="jdcType"
354   - placeholder="请选择机动车类型..."
355   - name="vehicleStats"
356   - codename="vehicleStats" >
357   - </sa-Select>
  363 + <sa-Select3 model="ctrl.busInfoForSave"
  364 + name="vehicleStats"
  365 + placeholder="请选择机动车类型..."
  366 + dcvalue="{{ctrl.busInfoForSave.vehicleStats}}"
  367 + dcname="vehicleStats"
  368 + icname="code"
  369 + icnames="name"
  370 + datatype="jdcType" >
  371 + </sa-Select3>
358 372 </div>
359 373 </div>
360 374  
361 375 <div class="form-group">
362 376 <label class="col-md-2 control-label">营运状态:</label>
363 377 <div class="col-md-3">
364   - <sa-Select model="ctrl.busInfoForSave"
365   - dicgroup="yyztType"
366   - placeholder="请选择营运状态..."
367   - name="operatorsState"
368   - codename="operatorsState" >
369   - </sa-Select>
  378 + <sa-Select3 model="ctrl.busInfoForSave"
  379 + name="operatorsState"
  380 + placeholder="请选择营运状态..."
  381 + dcvalue="{{ctrl.busInfoForSave.operatorsState}}"
  382 + dcname="operatorsState"
  383 + icname="code"
  384 + icnames="name"
  385 + datatype="yyztType" >
  386 + </sa-Select3>
370 387 </div>
371 388 </div>
372 389  
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
1 1 <!-- ui-route busInfoManage.list -->
2 2 <div ng-controller="BusInfoManageListCtrl as ctrl">
3   - <div style="width: 100%; height: 100%; overflow: auto">
  3 + <div class="fixDiv">
4 4 <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
5 5 <thead>
6 6 <tr role="row" class="heading">
... ... @@ -30,12 +30,15 @@
30 30 </td>
31 31 <td>
32 32 <div>
33   - <sa-Select model="ctrl.searchCondition()"
34   - dicgroup="gsType"
35   - placeholder="请选择..."
36   - name="gs"
37   - codename="businessCode_eq">
38   - </sa-Select>
  33 + <sa-Select3 model="ctrl.searchCondition()"
  34 + name="gs"
  35 + placeholder="请选择..."
  36 + dcvalue="{{ctrl.searchCondition().businessCode_eq}}"
  37 + dcname="businessCode_eq"
  38 + icname="code"
  39 + icnames="name"
  40 + datatype="gsType">
  41 + </sa-Select3>
39 42 </div>
40 43 </td>
41 44 <td>
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html
... ... @@ -36,14 +36,18 @@
36 36 <div class="form-group has-success has-feedback">
37 37 <label class="col-md-2 control-label">所属公司*:</label>
38 38 <div class="col-md-3">
39   - <sa-Select model="ctrl.employeeInfoForSave"
40   - dicgroup="gsType"
41   - placeholder="请选择所属公司..."
42   - name="gs"
43   - codename="companyCode"
44   - dicname="company"
45   - required="true">
46   - </sa-Select>
  39 + <sa-Select3 model="ctrl.employeeInfoForSave"
  40 + name="gs"
  41 + placeholder="请选择所属公司..."
  42 + dcvalue="{{ctrl.employeeInfoForSave.companyCode}}"
  43 + dcname="companyCode"
  44 + icname="code"
  45 + dcname2="company"
  46 + icname2="name"
  47 + icnames="name"
  48 + datatype="gsType"
  49 + required >
  50 + </sa-Select3>
47 51 </div>
48 52 <!-- 隐藏块,显示验证信息 -->
49 53 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">
... ... @@ -121,12 +125,15 @@
121 125 <div class="form-group">
122 126 <label class="col-md-2 control-label">工种:</label>
123 127 <div class="col-md-4">
124   - <sa-Select model="ctrl.employeeInfoForSave"
125   - dicgroup="gzType"
126   - placeholder="请选择工种..."
127   - name="posts"
128   - codename="posts" >
129   - </sa-Select>
  128 + <sa-Select3 model="ctrl.employeeInfoForSave"
  129 + name="posts"
  130 + placeholder="请选择工种..."
  131 + dcvalue="{{ctrl.employeeInfoForSave.posts}}"
  132 + dcname="posts"
  133 + icname="code"
  134 + icnames="name"
  135 + datatype="gzType">
  136 + </sa-Select3>
130 137 </div>
131 138 </div>
132 139  
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html
... ... @@ -36,14 +36,18 @@
36 36 <div class="form-group has-success has-feedback">
37 37 <label class="col-md-2 control-label">所属公司*:</label>
38 38 <div class="col-md-3">
39   - <sa-Select model="ctrl.employeeInfoForSave"
40   - dicgroup="gsType"
41   - placeholder="请选择所属公司..."
42   - name="gs"
43   - codename="companyCode"
44   - dicname="company"
45   - required="true">
46   - </sa-Select>
  39 + <sa-Select3 model="ctrl.employeeInfoForSave"
  40 + name="gs"
  41 + placeholder="请选择所属公司..."
  42 + dcvalue="{{ctrl.employeeInfoForSave.companyCode}}"
  43 + dcname="companyCode"
  44 + icname="code"
  45 + dcname2="company"
  46 + icname2="name"
  47 + icnames="name"
  48 + datatype="gsType"
  49 + required >
  50 + </sa-Select3>
47 51 </div>
48 52 <!-- 隐藏块,显示验证信息 -->
49 53 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">
... ... @@ -121,12 +125,15 @@
121 125 <div class="form-group">
122 126 <label class="col-md-2 control-label">工种:</label>
123 127 <div class="col-md-4">
124   - <sa-Select model="ctrl.employeeInfoForSave"
125   - dicgroup="gzType"
126   - placeholder="请选择工种..."
127   - name="posts"
128   - codename="posts" >
129   - </sa-Select>
  128 + <sa-Select3 model="ctrl.employeeInfoForSave"
  129 + name="posts"
  130 + placeholder="请选择工种..."
  131 + dcvalue="{{ctrl.employeeInfoForSave.posts}}"
  132 + dcname="posts"
  133 + icname="code"
  134 + icnames="name"
  135 + datatype="gzType">
  136 + </sa-Select3>
130 137 </div>
131 138 </div>
132 139  
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html
1 1 <!-- ui-route employeeInfoManage.list -->
2 2 <div ng-controller="EmployeeInfoManageListCtrl as ctrl">
3   - <div style="width: 100%; height: 100%; overflow: auto">
  3 + <div class="fixDiv">
4 4 <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
5 5 <thead>
6 6 <tr role="row" class="heading">
... ... @@ -26,12 +26,15 @@
26 26 </td>
27 27 <td>
28 28 <div>
29   - <sa-Select model="ctrl.searchCondition()"
30   - dicgroup="gsType"
31   - placeholder="请选择..."
32   - name="gs"
33   - codename="companyCode_eq">
34   - </sa-Select>
  29 + <sa-Select3 model="ctrl.searchCondition()"
  30 + name="gs"
  31 + placeholder="请选择..."
  32 + dcvalue="{{ctrl.searchCondition().companyCode_eq}}"
  33 + dcname="companyCode_eq"
  34 + icname="code"
  35 + icnames="name"
  36 + datatype="gsType">
  37 + </sa-Select3>
35 38 </div>
36 39 </td>
37 40 <td style="width: 100px">
... ... @@ -39,12 +42,15 @@
39 42 </td>
40 43 <td>
41 44 <div>
42   - <sa-Select model="ctrl.searchCondition()"
43   - dicgroup="gzType"
44   - placeholder="请选择..."
45   - name="posts"
46   - codename="posts_eq">
47   - </sa-Select>
  45 + <sa-Select3 model="ctrl.searchCondition()"
  46 + name="gs"
  47 + placeholder="请选择..."
  48 + dcvalue="{{ctrl.searchCondition().posts_eq}}"
  49 + dcname="posts_eq"
  50 + icname="code"
  51 + icnames="name"
  52 + datatype="gzType">
  53 + </sa-Select3>
48 54 </div>
49 55 </td>
50 56 <td>
... ...
src/main/resources/static/pages/scheduleApp/module/common/dt/MyUiSelectWrapTemplate1.html 0 → 100644
  1 +<div class="input-group">
  2 + <ui-select ng-model="$saSelectCtrl.$$internalmodel" on-select="$saSelectCtrl.$$internal_select_fn($item)"
  3 + theme="bootstrap" name="{{$saSelectCtrl.$name}}" >
  4 + <ui-select-match placeholder="{{$saSelectCtrl.$placeholder}}">{{$select.selected[$saSelectCtrl.$icname_s]}}</ui-select-match>
  5 + <ui-select-choices repeat="item[$saSelectCtrl.$icname] as item in $saSelectCtrl.$$data"
  6 + refresh="$saSelectCtrl.$$internal_refresh_fn($select.search)"
  7 + refresh-delay="10">
  8 + <span ng-bind="item[$saSelectCtrl.$icname_s]"></span>
  9 + </ui-select-choices>
  10 + </ui-select>
  11 + <span class="input-group-btn">
  12 + <button type="button" ng-click="$saSelectCtrl.$$internal_remove_fn()" class="btn btn-default">
  13 + <span class="glyphicon glyphicon-trash"></span>
  14 + </button>
  15 + </span>
  16 +</div>
0 17 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/common/main.css 0 → 100644
  1 +form input.ng-invalid.ng-dirty.ng-invalid-required {
  2 + background-color: #FFC0CB;
  3 +}
  4 +form input.ng-valid.ng-dirty.ng-valid-required {
  5 + background-color: #78FA89;
  6 +}
  7 +
  8 +/*.ng-invalid.ng-dirty {*/
  9 + /*background-color: #FFC0CB;*/
  10 +/*}*/
  11 +/*.ng-valid.ng-dirty {*/
  12 + /*background-color: #78FA89;*/
  13 +/*}*/
  14 +
  15 +.ui-select-container.ng-invalid.ng-dirty.ng-invalid-required .form-control {
  16 + background-color: #FFC0CB;
  17 +}
  18 +.ui-select-container.ng-valid.ng-dirty.ng-valid-required .form-control {
  19 + background-color: #78FA89;
  20 +}
  21 +
  22 +.center-modal {
  23 + position: fixed;
  24 + top: 10%;
  25 + left: 18.5%;
  26 + z-index: 1050;
  27 + width: 80%;
  28 + height: 80%;
  29 + margin-left: -10%;
  30 +}
  31 +
  32 +.fixDiv {
  33 + min-height: 200px;
  34 + min-width: 600px;
  35 + width: 100%;
  36 + height: 100%;
  37 + overflow: auto;
  38 +}
  39 +
  40 +/* 固定表格,防止内容撑出表格 */
  41 +.fixTable {
  42 + table-layout: fixed;
  43 +}
  44 +
  45 +/** 内容不换行,多余的用...表示 */
  46 +.fixTable thead th {
  47 + white-space: nowrap;
  48 + overflow: hidden;
  49 + text-overflow: ellipsis;
  50 +}
  51 +
  52 +/** 内容不换行,多余的用...表示 */
  53 +.fixTable tbody td {
  54 + white-space: nowrap;
  55 + overflow: hidden;
  56 + text-overflow: ellipsis;
  57 +}
... ...
src/main/resources/static/pages/scheduleApp/module/common/main.js 0 → 100644
  1 +// angular 主程序js,必须先导入,配置一些全局设置
  2 +
  3 +var ScheduleApp = angular.module('ScheduleApp', [
  4 + 'ui.router', // ui-route跳转
  5 + 'ui.bootstrap', // ui bootstrap封装
  6 + 'oc.lazyLoad', // 动态加载模块(html,js,css等)
  7 + 'ngSanitize', // 净化html标签,配合ng-bind-html使用
  8 + 'ngResource' // resource服务
  9 +]);
  10 +
  11 +ScheduleApp.config(['$httpProvider', function($httpProvider) {
  12 + $httpProvider.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
  13 +}]);
  14 +
  15 +/** ocLazyLoader 配置 */
  16 +ScheduleApp.config(['$ocLazyLoadProvider', function($ocLazyLoadProvider) {
  17 + $ocLazyLoadProvider.config({
  18 + // TODO:全局配置在这里
  19 + });
  20 +}]);
  21 +
  22 +/** 配置全局配置信息 */
  23 +ScheduleApp.factory('settings', ['$rootScope', function($rootScope) {
  24 + // 封装 settings服务,并设置给 $rootScope同名对象
  25 + var settings = {
  26 + // TODO:
  27 + };
  28 +
  29 + $rootScope.settings = settings;
  30 +
  31 + return settings;
  32 +}]);
  33 +
  34 +/** Schedule App 主应用控制器 */
  35 +ScheduleApp.controller('ScheduleAppController', ['$scope', function($scope) {
  36 + $scope.$on('$viewContentLoaded', function(event) {
  37 + console.log("子页面已载入:" + event);
  38 + });
  39 +}]);
0 40 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js 0 → 100644
  1 +// 自定义指令,指令模版在dt目录下
  2 +
  3 +angular.module('ScheduleApp').directive("saSelect", ['$timeout', function($timeout) {
  4 + return {
  5 + restrict: 'E',
  6 + templateUrl: '/pages/scheduleApp/module/other/MyDictionarySelectTemplate.html',
  7 + scope: {
  8 + model: "="
  9 + },
  10 + controllerAs: "$saSelectCtrl",
  11 + bindToController: true,
  12 + controller: function() {
  13 + var self = this;
  14 + self.datas = []; // 关联的字典数据,内部格式 {code:{值},name:{名字}}
  15 + },
  16 + /**
  17 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  18 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  19 + * @param tElem
  20 + * @param tAttrs
  21 + * @returns {{pre: Function, post: Function}}
  22 + */
  23 + compile: function(tElem, tAttrs) {
  24 + // 确定是否使用angularjs required验证
  25 + // 属性 required
  26 + // 如果没有填写,内部不添加验证,如果填写了,并且等于true添加验证,否则不添加
  27 + var required_attr = tAttrs["required"];
  28 + if (required_attr) {
  29 + if (required_attr == "true") {
  30 + // 添加required属性指令
  31 + tElem.find("ui-select").attr("required", "");
  32 + } else {
  33 + // 不等于true,不添加required属性指令
  34 + }
  35 + } else {
  36 + // 不添加required属性指令
  37 + }
  38 +
  39 + //console.log("saSelect" + ":compile = >" + tElem.html());
  40 +
  41 + return {
  42 + pre: function(scope, element, attr) {
  43 + // TODO:
  44 + },
  45 + /**
  46 + * 相当于link函数。
  47 + *
  48 + * 重要属性如下:
  49 + * model 是绑定外部值。
  50 + * dicgroup 字典组的类型
  51 + * name input name属性值
  52 + */
  53 + post: function(scope, element, attr) {
  54 + // 1、获取属性
  55 + var dicgroup_attr = attr['dicgroup']; // 字典组的类型
  56 + var name_attr = attr['name']; // input name属性值
  57 + var dicname_attr = attr['dicname']; // model关联的字典名字段
  58 + var codename_attr = attr['codename']; // model关联的字典值字段
  59 + var placeholder_attr = attr['placeholder']; // select placeholder提示
  60 +
  61 + // 系统的字典对象,使用dictionaryUtils类获取
  62 + var origin_dicgroup;
  63 + var dic_key; // 字典key
  64 +
  65 + if (dicgroup_attr) { // 赋值指定的字典数据
  66 + origin_dicgroup = dictionaryUtils.getByGroup(dicgroup_attr);
  67 + for (dic_key in origin_dicgroup) {
  68 + var data = {}; // 重新组合的字典元素对象
  69 + if (dic_key == "true")
  70 + data.code = true;
  71 + else
  72 + data.code = dic_key;
  73 + data.name = origin_dicgroup[dic_key];
  74 + scope["$saSelectCtrl"].datas.push(data);
  75 + }
  76 + }
  77 +
  78 + if (name_attr) {
  79 + scope["$saSelectCtrl"].nv = name_attr;
  80 + }
  81 + if (placeholder_attr) {
  82 + scope["$saSelectCtrl"].ph = placeholder_attr;
  83 + }
  84 +
  85 + scope["$saSelectCtrl"].select = function($item) {
  86 + if (codename_attr) {
  87 + scope["$saSelectCtrl"].model[codename_attr] = $item.code;
  88 + }
  89 + if (dicname_attr) {
  90 + scope["$saSelectCtrl"].model[dicname_attr] = $item.name;
  91 + }
  92 + };
  93 +
  94 + scope["$saSelectCtrl"].remove = function() {
  95 + if (codename_attr) {
  96 + scope["$saSelectCtrl"].model[codename_attr] = null;
  97 + }
  98 + if (dicname_attr) {
  99 + scope["$saSelectCtrl"].model[dicname_attr] = null;
  100 + }
  101 + scope["$saSelectCtrl"].cmodel = null;
  102 + };
  103 +
  104 + $timeout(function() {
  105 + // 创建内部使用的绑定对象
  106 + var model_code = scope["$saSelectCtrl"].model[codename_attr];
  107 + scope["$saSelectCtrl"].cmodel = model_code;
  108 + }, 0);
  109 + }
  110 + }
  111 + }
  112 + };
  113 +}]);
  114 +
  115 +angular.module('ScheduleApp').directive("saRadiogroup", [function() {
  116 + /**
  117 + * 使用字典数据的单选按钮组的指令。
  118 + * 指令名称:truefalse-Dic
  119 + */
  120 + return {
  121 + restrict: 'E',
  122 + templateUrl: '/pages/scheduleApp/module/other/MyDictionaryRadioGroupTemplate.html',
  123 + scope: {
  124 + model: "="
  125 + },
  126 + controllerAs: "ctrl",
  127 + bindToController: true,
  128 + controller: function($scope) {
  129 + //$scope["model"] = {selectedOption: null};
  130 + //console.log("controller");
  131 + //console.log("controller:" + $scope["model"]);
  132 + },
  133 + /**
  134 + * 重要属性如下:
  135 + * model 是绑定外部值。
  136 + * disabled 说明是否不能修改
  137 + * dicgroup 字典组的类型
  138 + * name input name属性值
  139 + */
  140 + link: function(scope, element, attr) {
  141 + //console.log("link");
  142 + //console.log("link:" + scope.model);
  143 + //scope["model"] = {selectedOption: null};
  144 +
  145 + if (attr["name"]) {
  146 + scope["ctrl"].nv = attr["name"];
  147 + }
  148 +
  149 + if (attr["disabled"]) {
  150 + scope["ctrl"].disabled = true;
  151 + }
  152 + if (attr["dicgroup"]) {
  153 + var obj = dictionaryUtils.getByGroup(attr['dicgroup']);
  154 + scope["ctrl"].dic = obj;
  155 + // 处理 scope["dic"] key值
  156 + scope["ctrl"].dicvalueCalcu = function(value) {
  157 + if (value == "true") {
  158 + //console.log(value);
  159 + return true;
  160 + } else if (value == "false") {
  161 + //console.log(value);
  162 + return false;
  163 + } else {
  164 + return value;
  165 + }
  166 + };
  167 + }
  168 + }
  169 + };
  170 +}]);
  171 +
  172 +angular.module('ScheduleApp').directive("remoteValidaton", [
  173 + 'BusInfoManageService_g',
  174 + 'EmployeeInfoManageService_g',
  175 + function(
  176 + busInfoManageService_g,
  177 + employeeInfoManageService_g
  178 + ) {
  179 + /**
  180 + * 远端验证指令,依赖于ngModel
  181 + * 指令名称 remote-Validation
  182 + * 需要属性 rvtype 表示验证类型
  183 + */
  184 + return {
  185 + restrict: "A",
  186 + require: "^ngModel",
  187 + link: function(scope, element, attr, ngModelCtrl) {
  188 + element.bind("keyup", function() {
  189 + var modelValue = ngModelCtrl.$modelValue;
  190 + var rv1_attr = attr["rv1"];
  191 + if (attr["rvtype"]) {
  192 +
  193 + // 根据rvtype的值,确定使用那个远端验证的url,
  194 + // rv1, rv2, rv3是关联比较值,暂时使用rv1
  195 + // 这个貌似没法通用,根据业务变换
  196 + // TODO:暂时有点乱以后改
  197 + if (attr["rvtype"] == "insideCode") {
  198 + busInfoManageService_g.validate.insideCode(
  199 + {"insideCode_eq": modelValue, type: "equale"},
  200 + function(result) {
  201 + //console.log(result);
  202 + if (result.status == "SUCCESS") {
  203 + ngModelCtrl.$setValidity('remote', true);
  204 + } else {
  205 + ngModelCtrl.$setValidity('remote', false);
  206 + }
  207 + },
  208 + function(result) {
  209 + //console.log(result);
  210 + ngModelCtrl.$setValidity('remote', true);
  211 + }
  212 + );
  213 + } else if (attr["rvtype"] == "jobCode") {
  214 + if (!rv1_attr) {
  215 + ngModelCtrl.$setValidity('remote', false);
  216 + return;
  217 + }
  218 +
  219 + employeeInfoManageService_g.validate.jobCode(
  220 + {"jobCode_eq": modelValue, "companyCode_eq": rv1_attr, type: "equale"},
  221 + function(result) {
  222 + //console.log(result);
  223 + if (result.status == "SUCCESS") {
  224 + ngModelCtrl.$setValidity('remote', true);
  225 + } else {
  226 + ngModelCtrl.$setValidity('remote', false);
  227 + }
  228 + },
  229 + function(result) {
  230 + //console.log(result);
  231 + ngModelCtrl.$setValidity('remote', true);
  232 + }
  233 + );
  234 + }
  235 + } else {
  236 + // 没有rvtype,就不用远端验证了
  237 + ngModelCtrl.$setValidity('remote', true);
  238 + }
  239 +
  240 + attr.$observe("rv1", function(value) {
  241 + if (attr["rvtype"] == "jobCode") {
  242 + if (!value) {
  243 + ngModelCtrl.$setValidity('remote', false);
  244 + return;
  245 + }
  246 +
  247 + employeeInfoManageService_g.validate.jobCode(
  248 + {"jobCode_eq": modelValue, "companyCode_eq": rv1_attr, type: "equale"},
  249 + function(result) {
  250 + //console.log(result);
  251 + if (result.status == "SUCCESS") {
  252 + ngModelCtrl.$setValidity('remote', true);
  253 + } else {
  254 + ngModelCtrl.$setValidity('remote', false);
  255 + }
  256 + },
  257 + function(result) {
  258 + //console.log(result);
  259 + ngModelCtrl.$setValidity('remote', true);
  260 + }
  261 + );
  262 + }
  263 +
  264 + });
  265 + });
  266 + }
  267 + };
  268 + }]);
  269 +
  270 +
  271 +/**
  272 + * saSelect2指令,根据属性值,动态载入数据,然后支持拼音搜索,点击右边的按钮清除选择并重新载入数据。
  273 + * 1、compile阶段使用的属性如下:
  274 + * required:用于和表单验证连接,指定成required="true"才有效。
  275 + * 2、link阶段使用的属性如下
  276 + * model:关联的模型对象
  277 + * name:表单验证时需要的名字
  278 + * type:关联的那种数据值(xl/cl/ry)-> 对应线路信息/车辆信息/人员信息,后面有的继续加
  279 + * modelcolname1:关联的模型字段名字1(一般应该是编码字段)
  280 + * modelcolname2:关联的模型字段名字2(一般应该是名字字段)
  281 + * datacolname1;内部数据对应的字段名字1(与模型字段1对应)
  282 + * datacolname2:内部数据对应的字段名字2(与模型字段2对应)
  283 + * showcolname:下拉框显示的内部数据字段名(注意:不是模型数据字段名),TODO:以后考虑放动态表达式,并在compile阶段使用
  284 + * placeholder:select placeholder字符串描述
  285 + *
  286 + * $$pyFilter,内部的filter指令,结合简拼音进行拼音过滤。
  287 + * $$SearchInfoService_g,内部使用的数据服务
  288 + */
  289 +// saSelect2指令使用的内部信service
  290 +angular.module('ScheduleApp').factory('$$SearchInfoService_g', ['$resource', function($resource) {
  291 + return {
  292 + xl: $resource(
  293 + '/line/:type',
  294 + {order: 'name', direction: 'ASC'},
  295 + {
  296 + list: {
  297 + method: 'GET',
  298 + isArray: true
  299 + }
  300 + }
  301 + ),
  302 + ry: $resource(
  303 + '/personnel/:type',
  304 + {order: 'personnelName', direction: 'ASC'},
  305 + {
  306 + list: {
  307 + method: 'GET',
  308 + isArray: true
  309 + }
  310 + }
  311 + ),
  312 + cl: $resource(
  313 + '/cars/:type',
  314 + {order: "insideCode", direction: 'ASC'},
  315 + {
  316 + list: {
  317 + method: 'GET',
  318 + isArray: true
  319 + }
  320 + }
  321 + ),
  322 + ttInfo: $resource(
  323 + '/tic/:type',
  324 + {order: "name", direction: 'ASC'},
  325 + {
  326 + list: {
  327 + method: 'GET',
  328 + isArray: true
  329 + }
  330 + }
  331 + ),
  332 + cci: $resource(
  333 + '/cci/cars',
  334 + {},
  335 + {
  336 + list: {
  337 + method: 'GET',
  338 + isArray: true
  339 + }
  340 + }
  341 +
  342 + )
  343 + }
  344 +}]);
  345 +angular.module('ScheduleApp').filter("$$pyFilter", function() {
  346 + return function(items, props) {
  347 + var out = [];
  348 + var limit = props["limit"] || 20; // 默认20条记录
  349 +
  350 + if (angular.isArray(items)) {
  351 + items.forEach(function(item) {
  352 + if (out.length < limit) {
  353 + if (props.search) {
  354 + var upTerm = props.search.toUpperCase();
  355 + if(item.fullChars.indexOf(upTerm) != -1
  356 + || item.camelChars.indexOf(upTerm) != -1) {
  357 + out.push(item);
  358 + }
  359 + }
  360 + }
  361 + });
  362 + }
  363 +
  364 + return out;
  365 + };
  366 +});
  367 +angular.module('ScheduleApp').directive("saSelect2", [
  368 + '$timeout', '$$SearchInfoService_g',
  369 + function($timeout, $$searchInfoService_g) {
  370 + return {
  371 + restrict: 'E',
  372 + templateUrl: '/pages/scheduleApp/module/other/MySearchSelectTemplate.html',
  373 + scope: {
  374 + model: "=" // 独立作用域,关联外部的模型对象
  375 + },
  376 + controllerAs: "$saSelectCtrl",
  377 + bindToController: true,
  378 + controller: function($scope) {
  379 + var self = this;
  380 + self.$$data = []; // 内部关联的数据
  381 + },
  382 + /**
  383 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  384 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  385 + * @param tElem
  386 + * @param tAttrs
  387 + * @returns {{pre: Function, post: Function}}
  388 + */
  389 + compile: function(tElem, tAttrs) {
  390 + // 1、获取此阶段使用的属性
  391 + var $required_attr = tAttrs["required"]; // 用于和表单验证连接,指定成required="true"才有效。
  392 +
  393 + // 2、处理属性
  394 +
  395 + // 确定是否使用angularjs required验证
  396 + // 属性 required
  397 + // 如果没有填写,内部不添加验证,如果填写了,并且等于true添加验证,否则不添加
  398 + if ($required_attr) {
  399 + if ($required_attr == "true") {
  400 + // 添加required属性指令
  401 + tElem.find("ui-select").attr("required", "");
  402 + } else {
  403 + // 不等于true,不添加required属性指令
  404 + }
  405 + } else {
  406 + // 不添加required属性指令
  407 + }
  408 +
  409 + //console.log("saSelect" + ":compile = >" + tElem.html());
  410 +
  411 + return {
  412 + pre: function(scope, element, attr) {
  413 + // TODO:
  414 + },
  415 + /**
  416 + * 相当于link函数。
  417 + *
  418 + * 重要属性如下:
  419 + * model 是绑定外部值。
  420 + * dicgroup 字典组的类型
  421 + * name input name属性值
  422 + */
  423 + post: function(scope, element, attr) {
  424 + // 1、获取此阶段使用的属性
  425 + var $name_attr = attr["name"]; // 表单验证时需要的名字
  426 + var $type_attr = attr["type"]; // 关联的那种数据值(xl/cl/ry)-> 对应线路信息/车辆信息/人员信息,后面有的继续加
  427 + var $modelcolname1_attr = attr["modelcolname1"]; // 关联的模型字段名字1(一般应该是编码字段)
  428 + var $modelcolname2_attr = attr["modelcolname2"]; // 关联的模型字段名字2(一般应该是名字字段)
  429 + var $datacolname1_attr = attr["datacolname1"]; // 内部数据对应的字段名字1(与模型字段1对应)
  430 + var $datacolname2_attr = attr["datacolname2"]; // 内部数据对应的字段名字2(与模型字段2对应)
  431 + var $showcolname_attr = attr["showcolname"]; // 下拉框显示的内部数据字段名
  432 + var $placeholder_attr = attr["placeholder"]; // select placeholder字符串描述
  433 +
  434 + // 2、处理属性、转换成$saSelectCtrl内部使用的属性
  435 + if ($name_attr) {
  436 + scope["$saSelectCtrl"].$name_attr = $name_attr;
  437 + }
  438 + if ($placeholder_attr) {
  439 + scope["$saSelectCtrl"].$placeholder_attr = $placeholder_attr;
  440 + }
  441 + if ($showcolname_attr) {
  442 + scope["$saSelectCtrl"].$showcolname_attr = $showcolname_attr;
  443 + }
  444 +
  445 + // 2-1、添加内部方法,根据type值,改变$$data的值
  446 + scope["$saSelectCtrl"].$$internal_data_change_fn = function() {
  447 + // 根据type属性动态载入数据
  448 + if ($type_attr) {
  449 + $$searchInfoService_g[$type_attr].list(
  450 + {type: "all"},
  451 + function(result) {
  452 + scope["$saSelectCtrl"].$$data = [];
  453 + for (var i = 0; i < result.length; i ++) {
  454 + var data = {}; // data是result的一部分属性集合,根据配置来确定
  455 + if ($datacolname1_attr) {
  456 + data[$datacolname1_attr] = result[i][$datacolname1_attr];
  457 + }
  458 + if ($datacolname2_attr) {
  459 + data[$datacolname2_attr] = result[i][$datacolname2_attr];
  460 + }
  461 + if ($showcolname_attr) {
  462 + // 动态添加基于名字的拼音
  463 + data[$showcolname_attr] = result[i][$showcolname_attr];
  464 + if (data[$showcolname_attr]) {
  465 + data["fullChars"] = pinyin.getFullChars(result[i][$showcolname_attr]).toUpperCase(); // 全拼
  466 + data["camelChars"] = pinyin.getCamelChars(result[i][$showcolname_attr]); // 简拼
  467 + }
  468 + }
  469 + if (data["fullChars"])
  470 + scope["$saSelectCtrl"].$$data.push(data);
  471 + }
  472 + },
  473 + function(result) {
  474 +
  475 + }
  476 + );
  477 + }
  478 + };
  479 +
  480 + // 3、选择、删除事件映射模型和内部数据对应的字段
  481 + scope["$saSelectCtrl"].$select_fn_attr = function($item) {
  482 + if ($modelcolname1_attr && $datacolname1_attr) {
  483 + scope["$saSelectCtrl"].model[$modelcolname1_attr] = $item[$datacolname1_attr];
  484 + }
  485 + if ($modelcolname2_attr && $datacolname2_attr) {
  486 + scope["$saSelectCtrl"].model[$modelcolname2_attr] = $item[$datacolname2_attr];
  487 + }
  488 + };
  489 + scope["$saSelectCtrl"].$remove_fn_attr = function() {
  490 + if ($modelcolname1_attr) {
  491 + scope["$saSelectCtrl"].model[$modelcolname1_attr] = null;
  492 + }
  493 + if ($modelcolname2_attr) {
  494 + scope["$saSelectCtrl"].model[$modelcolname2_attr] = null;
  495 + }
  496 + scope["$saSelectCtrl"].$$cmodel = null; // 内部模型清空
  497 +
  498 + scope["$saSelectCtrl"].$$internal_data_change_fn();
  499 + };
  500 +
  501 + // 4、搜索事件
  502 + scope["$saSelectCtrl"].$refreshdata_fn_attr = function($search) {
  503 + //var fullChars = pinyin.getFullChars($search).toUpperCase();
  504 + //var camelChars = pinyin.getCamelChars($search);
  505 + //
  506 + //console.log(fullChars + " " + camelChars);
  507 + // TODO:事件暂时没用,放着以后再说
  508 + };
  509 +
  510 + // 5、全部载入后,输入的
  511 + $timeout(function() {
  512 + // 创建内部使用的绑定对象,用于确认选中那个值
  513 + scope["$saSelectCtrl"].$$cmodel = scope["$saSelectCtrl"].model[$modelcolname1_attr];
  514 +
  515 + scope["$saSelectCtrl"].$$internal_data_change_fn();
  516 + }, 0);
  517 + }
  518 + }
  519 + }
  520 + };
  521 + }
  522 +]);
  523 +
  524 +/**
  525 + * saSelect3指令
  526 + * 属性如下:
  527 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  528 + * name(必须):控件的名字
  529 + * placeholder(可选):占位符字符串
  530 + * dcvalue(必须):绑定的model字段值,如:dcvalue={{ctrl.employeeInfoForSave.xl.id}}
  531 + * dcname(必须):绑定的model字段名,如:dcname=xl.id
  532 + * icname(必须):内部与之对应的字段名,如:icname=code
  533 + * dcname2(可选):其他需要赋值的model字段名2,如:dcname2=xl.name
  534 + * icname2(可选):内部与之对应的字段名2,如:icname2=name
  535 + * icnames(必须):用于用于显示,以及简评处理的内部数据字段,如:icnames=name
  536 + * required(可选):是否要用required验证
  537 + * datatype(必须):业务数据类型,有字典类型,动态数据类型,暂时写的死点
  538 + * mlp(可选):是否多级属性(这里假设外部model如果多级,内部model也是多级)
  539 + *
  540 + */
  541 +angular.module('ScheduleApp').directive("saSelect3", [
  542 + '$timeout',
  543 + '$$SearchInfoService_g',
  544 + function($timeout, $$searchInfoService_g) {
  545 + return {
  546 + restrict: 'E',
  547 + templateUrl: '/pages/scheduleApp/module/common/dt/MyUiSelectWrapTemplate1.html',
  548 + scope: {
  549 + model: "=" // 独立作用域,关联外部的模型object
  550 + },
  551 + controllerAs: "$saSelectCtrl",
  552 + bindToController: true,
  553 + controller: function($scope) {
  554 + var self = this;
  555 + self.$$data = []; // ui-select显示用的数据源
  556 + self.$$data_real= []; // 内部真实的数据源
  557 + },
  558 +
  559 + /**
  560 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  561 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  562 + * @param tElem
  563 + * @param tAttrs
  564 + * @returns {{pre: Function, post: Function}}
  565 + */
  566 + compile: function(tElem, tAttrs) {
  567 + // 获取所有的属性
  568 + var $name_attr = tAttrs["name"]; // 控件的名字
  569 + var $placeholder_attr = tAttrs["placeholder"]; // 占位符的名字
  570 + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名
  571 + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名
  572 + var $dcname2_attr = tAttrs["dcname2"]; // 其他需要赋值的model字段名2
  573 + var $icname2_attr = tAttrs["icname2"]; // 内部与之对应的字段名2
  574 + var $icname_s_attr = tAttrs["icnames"]; // 用于用于显示,以及简评处理的内部数据字段
  575 + var $datatype_attr = tAttrs["datatype"]; // 内部业务数据类型
  576 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  577 + var $mlp_attr = tAttrs["mlp"]; // 是否多级属性
  578 +
  579 + // controlAs名字
  580 + var ctrlAs = "$saSelectCtrl";
  581 +
  582 + // 数据源初始化标志
  583 + var $$data_init = false;
  584 + // 如果有required属性,添加angularjs required验证
  585 + if ($required_attr != undefined) {
  586 + tElem.find("ui-select").attr("required", "");
  587 + }
  588 +
  589 + // 由于有的属性是多级的如xl.name,所以要在compile阶段重写属性绑定属性定义
  590 + // 原来的设置:{{$select.selected[$saSelectCtrl.$icname_s]}}
  591 + tElem.find("ui-select-match").html("{{$select.selected" + "." + $icname_s_attr + "}}");
  592 + // 原来的设置:item[$saSelectCtrl.$icname] as item in $saSelectCtrl.$$data
  593 + tElem.find("ui-select-choices").attr("repeat", "item" + "." + $icname_attr + " as item in $saSelectCtrl.$$data");
  594 + // 原来的设置:item[$saSelectCtrl.$icname_s]
  595 + tElem.find("ui-select-choices span").attr("ng-bind", "item" + "." + $icname_s_attr);
  596 + // 原来的设置:{{$saSelectCtrl.$name}}
  597 + tElem.find("ui-select").attr("name", $name_attr);
  598 + // 原来的设置:{{$saSelectCtrl.$placeholder}}
  599 + tElem.find("ui-select-match").attr("placeholder", $placeholder_attr);
  600 +
  601 + return {
  602 + pre: function(scope, element, attr) {
  603 + // TODO:
  604 + },
  605 + /**
  606 + * 相当于link函数。
  607 + * @param scope
  608 + * @param element
  609 + * @param attr
  610 + */
  611 + post: function(scope, element, attr) {
  612 + // 添加选中事件处理函数
  613 + scope[ctrlAs].$$internal_select_fn = function($item) {
  614 + if ($dcname_attr && $icname_attr) {
  615 + if ($mlp_attr) {
  616 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";");
  617 + } else {
  618 + scope[ctrlAs].model[$dcname_attr] = $item[$icname_attr];
  619 + }
  620 + }
  621 + if ($dcname2_attr && $icname2_attr) {
  622 + if ($mlp_attr) {
  623 + eval("scope[ctrlAs].model" + "." + $dcname2_attr + " = $item" + "." + $icname2_attr + ";");
  624 + } else {
  625 + scope[ctrlAs].model[$dcname2_attr] = $item[$icname2_attr];
  626 + }
  627 + }
  628 + };
  629 +
  630 + // 删除选中事件处理函数
  631 + scope[ctrlAs].$$internal_remove_fn = function() {
  632 + scope[ctrlAs].$$internalmodel = undefined;
  633 + if ($mlp_attr) {
  634 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;");
  635 + } else {
  636 + scope[ctrlAs].model[$dcname_attr] = undefined;
  637 + }
  638 +
  639 + if ($dcname2_attr) {
  640 + if ($mlp_attr) {
  641 + eval("scope[ctrlAs].model" + "." + $dcname2_attr + " = undefined;");
  642 + } else {
  643 + scope[ctrlAs].model[$dcname2_attr] = undefined;
  644 + }
  645 + }
  646 + };
  647 +
  648 + /**
  649 + * 内部方法,读取字典数据作为数据源。
  650 + * @param dicgroup 字典类型,如:gsType
  651 + * @param ccol 代码字段名
  652 + * @param ncol 名字字段名
  653 + */
  654 + scope[ctrlAs].$$internal_dic_data = function(dicgroup, ccol, ncol) {
  655 + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup);
  656 + var dic_key; // 字典key
  657 + // 清空内部数据
  658 + scope[ctrlAs].$$data_real = [];
  659 + for (dic_key in origin_dicgroup) {
  660 + var data = {}; // 重新组合的字典元素对象
  661 + if (dic_key == "true")
  662 + data[ccol] = true;
  663 + else
  664 + data[ccol] = dic_key;
  665 + data[ncol] = origin_dicgroup[dic_key];
  666 + scope[ctrlAs].$$data_real.push(data);
  667 + }
  668 + // 这里直接将$$data_real数据深拷贝到$$data
  669 + angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data);
  670 + };
  671 +
  672 + /**
  673 + * TODO:这个方法有性能问题,result一多就会卡一卡,之后再解决把
  674 + * 内部方法,读取字典数据作为数据源。
  675 + * @param result 原始数据
  676 + * @param dcvalue 传入的关联数据
  677 + */
  678 + scope[ctrlAs].$$internal_other_data = function(result, dcvalue) {
  679 + //console.log("start");
  680 + // 清空内部数据
  681 + scope[ctrlAs].$$data_real = [];
  682 + for (var i = 0; i < result.length; i ++) {
  683 + var data = {}; // data是result的一部分属性集合,根据配置来确定
  684 + if ($icname_attr) {
  685 + if ($mlp_attr) {
  686 + eval("data" + "." + $icname_attr + " = result[i]" + "." + $icname_attr + ";");
  687 + } else {
  688 + data[$icname_attr] = result[i][$icname_attr];
  689 + }
  690 + }
  691 + if ($icname2_attr) {
  692 + if ($mlp_attr) {
  693 + eval("data" + "." + $icname2_attr + " = result[i]" + "." + $icname2_attr + ";");
  694 + } else {
  695 + data[$icname2_attr] = result[i][$icname2_attr];
  696 + }
  697 + }
  698 + if ($icname_s_attr) {
  699 + // 动态添加基于名字的拼音
  700 + if ($mlp_attr) {
  701 + eval("data" + "." + $icname_s_attr + " = result[i]" + "." + $icname_s_attr + ";");
  702 + if (eval("data" + "." + $icname_s_attr)) {
  703 + // 全拼
  704 + data["fullChars"] = pinyin.getFullChars(eval("result[i]" + "." + $icname_s_attr)).toUpperCase();
  705 + // 简拼
  706 + data["camelChars"] = pinyin.getCamelChars(eval("result[i]" + "." + $icname_s_attr));
  707 + }
  708 + } else {
  709 + data[$icname_s_attr] = result[i][$icname_s_attr];
  710 + if (data[$icname_s_attr]) {
  711 + data["fullChars"] = pinyin.getFullChars(result[i][$icname_s_attr]).toUpperCase(); // 全拼
  712 + data["camelChars"] = pinyin.getCamelChars(result[i][$icname_s_attr]); // 简拼
  713 + }
  714 + }
  715 + }
  716 + if (data["fullChars"]) { // 有拼音的加入数据源
  717 + scope[ctrlAs].$$data_real.push(data);
  718 + }
  719 + }
  720 + //console.log("start2");
  721 +
  722 + // 数量太大取前10条记录作为显示
  723 + if (angular.isArray(scope[ctrlAs].$$data_real)) {
  724 + // 先迭代循环查找已经传过来的值
  725 + if (scope[ctrlAs].$$data_real.length > 0) {
  726 + if (dcvalue) {
  727 + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) {
  728 + if (scope[ctrlAs].$$data_real[j][$icname_attr] == dcvalue) {
  729 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[j]));
  730 + break;
  731 + }
  732 + }
  733 + }
  734 + }
  735 + // 在插入剩余的数据
  736 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  737 + if (scope[ctrlAs].$$data.length < 10) {
  738 + if ($mlp_attr) {
  739 + if (eval("scope[ctrlAs].$$data_real[k]" + "." + $icname_attr + " != dcvalue")) {
  740 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  741 + }
  742 + } else {
  743 + if (scope[ctrlAs].$$data_real[k][$icname_attr] != dcvalue) {
  744 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  745 + }
  746 + }
  747 + } else {
  748 + break;
  749 + }
  750 + }
  751 + }
  752 +
  753 + //console.log("end");
  754 + };
  755 +
  756 + // 刷新数据
  757 + scope[ctrlAs].$$internal_refresh_fn = function(search) {
  758 + // 绑定的model字段值,此属性是绑定属性,只能在link阶段获取
  759 + var $dcvalue_attr = attr["dcvalue"];
  760 +
  761 + console.log("刷新数据:" + $dcvalue_attr);
  762 +
  763 + if (!$$data_init) { // 只初始化$$data_real一次,重新载入页面才能重新初始化
  764 + if (dictionaryUtils.getByGroup($datatype_attr)) { // 判定是否字典类型数据源
  765 + scope[ctrlAs].$$internal_dic_data(
  766 + $datatype_attr, $icname_attr, $icname_s_attr);
  767 + if ($dcvalue_attr) {
  768 + scope[ctrlAs].$$internalmodel = $dcvalue_attr;
  769 + }
  770 + } else { // 非字典类型数据源
  771 + $$searchInfoService_g[$datatype_attr].list(
  772 + {type: "all"},
  773 + function(result) {
  774 + //console.log("ok:" + $datatype_attr);
  775 + scope[ctrlAs].$$internal_other_data(result, $dcvalue_attr);
  776 + //console.log("ok2:" + $datatype_attr);
  777 + if ($dcvalue_attr) {
  778 + scope[ctrlAs].$$internalmodel = $dcvalue_attr;
  779 + }
  780 +
  781 + $$data_init = true;
  782 + },
  783 + function(result) {
  784 +
  785 + }
  786 + );
  787 + }
  788 + }
  789 +
  790 + if ($$data_init) {
  791 + if (search && search != "") { // 有search值
  792 + if (!dictionaryUtils.getByGroup($datatype_attr)) { // 其他数据源
  793 + // 处理search
  794 + console.log("search:" + search);
  795 +
  796 + scope[ctrlAs].$$data = [];
  797 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  798 + var upTerm = search.toUpperCase();
  799 + if (scope[ctrlAs].$$data.length < 10) {
  800 + if (scope[ctrlAs].$$data_real[k].fullChars.indexOf(upTerm) != -1
  801 + || scope[ctrlAs].$$data_real[k].camelChars.indexOf(upTerm) != -1) {
  802 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  803 + }
  804 + } else {
  805 + break;
  806 + }
  807 + }
  808 + }
  809 + }
  810 +
  811 + }
  812 +
  813 + };
  814 +
  815 +
  816 +
  817 +
  818 +
  819 +
  820 +
  821 +
  822 +
  823 +
  824 + // TODO:
  825 +
  826 + // dom全部载入后调用
  827 + $timeout(function() {
  828 + // TODO:
  829 +
  830 + console.log("dom全部载入后调用");
  831 + }, 0);
  832 + // 监控dcvalue model值变换
  833 + attr.$observe("dcvalue", function(value) {
  834 + // TODO:
  835 +
  836 + console.log("监控dc1 model值变换:" + value);
  837 + scope[ctrlAs].$$internalmodel = value;
  838 + }
  839 + );
  840 + }
  841 + };
  842 + }
  843 + };
  844 +
  845 + }
  846 +]);
  847 +
  848 +
  849 +
  850 +
  851 +
  852 +
  853 +
  854 +
  855 +
  856 +
  857 +
  858 +
  859 +
  860 +
  861 +
  862 +
  863 +
  864 +
  865 +
  866 +
  867 +
  868 +
  869 +
  870 +
  871 +
  872 +
  873 +
  874 +
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-filter.js 0 → 100644
  1 +// 自定义filter
  2 +
  3 +angular.module('ScheduleApp').filter("dict", [function() {
  4 + /**
  5 + * 字典过滤器,将后台的字典编码转换成文字说明。
  6 + * code,过滤的值,group,过滤的参数(字典group类型),dv没有匹配到的默认值
  7 + * 用例:sfdc | dict:'dctype':'默认值'
  8 + */
  9 + return function(code, group, dv) {
  10 + if (code == null) {
  11 + return dv;
  12 + } else {
  13 + return dictionaryUtils.transformCode(group, code);
  14 + }
  15 + };
  16 +}]);
0 17 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js 0 → 100644
  1 +// 项目通用的全局service服务,供不同的controller使用,自定义指令不使用
  2 +
  3 +// 车辆信息service
  4 +angular.module('ScheduleApp').factory('BusInfoManageService_g', ['$resource', function($resource) {
  5 + return {
  6 + rest: $resource(
  7 + '/cars/:id',
  8 + {order: 'carCode', direction: 'ASC', id: '@id_route'},
  9 + {
  10 + list: {
  11 + method: 'GET',
  12 + params: {
  13 + page: 0
  14 + }
  15 + },
  16 + get: {
  17 + method: 'GET'
  18 + },
  19 + save: {
  20 + method: 'POST'
  21 + }
  22 + }
  23 + ),
  24 + validate: $resource(
  25 + '/cars/validate/:type',
  26 + {},
  27 + {
  28 + insideCode: {
  29 + method: 'GET'
  30 + }
  31 + }
  32 + )
  33 + };
  34 +}]);
  35 +// 人员信息service
  36 +angular.module('ScheduleApp').factory('EmployeeInfoManageService_g', ['$resource', function($resource) {
  37 + return {
  38 + rest : $resource(
  39 + '/personnel/:id',
  40 + {order: 'jobCode', direction: 'ASC', id: '@id_route'},
  41 + {
  42 + list: {
  43 + method: 'GET',
  44 + params: {
  45 + page: 0
  46 + }
  47 + },
  48 + get: {
  49 + method: 'GET'
  50 + },
  51 + save: {
  52 + method: 'POST'
  53 + }
  54 + }
  55 + ),
  56 + validate: $resource(
  57 + '/personnel/validate/:type',
  58 + {},
  59 + {
  60 + jobCode: {
  61 + method: 'GET'
  62 + }
  63 + }
  64 + )
  65 + };
  66 +}]);
  67 +// 车辆设备信息service
  68 +angular.module('ScheduleApp').factory('DeviceInfoManageService_g', ['$resource', function($resource) {
  69 + return $resource(
  70 + '/carDevice/:id',
  71 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  72 + {
  73 + list: {
  74 + method: 'GET',
  75 + params: {
  76 + page: 0
  77 + }
  78 + },
  79 + get: {
  80 + method: 'GET'
  81 + },
  82 + save: {
  83 + method: 'POST'
  84 + }
  85 + }
  86 + );
  87 +}]);
  88 +
  89 +// 车辆配置service
  90 +angular.module('ScheduleApp').factory('BusConfigService_g', ['$resource', function($resource) {
  91 + return {
  92 + rest : $resource(
  93 + '/cci/:id',
  94 + {order: 'createDate', direction: 'ASC', id: '@id_route'},
  95 + {
  96 + list: {
  97 + method: 'GET',
  98 + params: {
  99 + page: 0
  100 + }
  101 + },
  102 + get: {
  103 + method: 'GET'
  104 + },
  105 + save: {
  106 + method: 'POST'
  107 + }
  108 + }
  109 + )
  110 + };
  111 +}]);
  112 +
  113 +// 人员配置service
  114 +angular.module('ScheduleApp').factory('EmployeeConfigService_g', ['$resource', function($resource) {
  115 + return {
  116 + rest : $resource(
  117 + '/eci/:id',
  118 + {order: 'createDate', direction: 'ASC', id: '@id_route'},
  119 + {
  120 + list: {
  121 + method: 'GET',
  122 + params: {
  123 + page: 0
  124 + }
  125 + },
  126 + get: {
  127 + method: 'GET'
  128 + },
  129 + save: {
  130 + method: 'POST'
  131 + }
  132 + }
  133 + ),
  134 + validate: $resource( // TODO:
  135 + '/personnel/validate/:type',
  136 + {},
  137 + {
  138 + jobCode: {
  139 + method: 'GET'
  140 + }
  141 + }
  142 + )
  143 + };
  144 +}]);
  145 +
  146 +// 路牌管理service
  147 +angular.module('ScheduleApp').factory('GuideboardManageService_g', ['$resource', function($resource) {
  148 + return {
  149 + rest: $resource(
  150 + '/gic/:id',
  151 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  152 + {
  153 + list: {
  154 + method: 'GET',
  155 + params: {
  156 + page: 0
  157 + }
  158 + },
  159 + get: {
  160 + method: 'GET'
  161 + },
  162 + save: {
  163 + method: 'POST'
  164 + }
  165 + }
  166 + )
  167 + };
  168 +}]);
  169 +
  170 +// 排班管理service
  171 +angular.module('ScheduleApp').factory('ScheduleRuleManageService_g', ['$resource', function($resource) {
  172 + return {
  173 + rest: $resource(
  174 + '/sr1fc/:id',
  175 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  176 + {
  177 + list: {
  178 + method: 'GET',
  179 + params: {
  180 + page: 0
  181 + }
  182 + },
  183 + get: {
  184 + method: 'GET'
  185 + },
  186 + save: {
  187 + method: 'POST'
  188 + }
  189 + }
  190 + )
  191 + };
  192 +}]);
  193 +
  194 +// 时刻表管理service
  195 +angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', function($resource) {
  196 + return {
  197 + rest: $resource(
  198 + '/tic/:id',
  199 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  200 + {
  201 + list: {
  202 + method: 'GET',
  203 + params: {
  204 + page: 0
  205 + }
  206 + },
  207 + get: {
  208 + method: 'GET'
  209 + },
  210 + save: {
  211 + method: 'POST'
  212 + }
  213 + }
  214 + )
  215 + };
  216 +}]);
  217 +// 时刻表明细管理service
  218 +angular.module('ScheduleApp').factory('TimeTableDetailManageService_g', ['$resource', function($resource) {
  219 + return {
  220 + rest: $resource(
  221 + '/tidc/:id',
  222 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  223 + {
  224 + get: {
  225 + method: 'GET'
  226 + },
  227 + save: {
  228 + method: 'POST'
  229 + }
  230 + }
  231 + ),
  232 + edit: $resource(
  233 + '/tidc/edit/:xlid/:ttid',
  234 + {},
  235 + {
  236 + list: {
  237 + method: 'GET'
  238 + }
  239 + }
  240 + )
  241 + };
  242 +}]);
  243 +
  244 +
  245 +
  246 +// 排班计划管理service
  247 +angular.module('ScheduleApp').factory('SchedulePlanManageService_g', ['$resource', function($resource) {
  248 + return {
  249 + rest : $resource(
  250 + '/spc/:id',
  251 + {order: 'createDate', direction: 'DESC', id: '@id_route'},
  252 + {
  253 + list: {
  254 + method: 'GET',
  255 + params: {
  256 + page: 0
  257 + }
  258 + },
  259 + get: {
  260 + method: 'GET'
  261 + },
  262 + save: {
  263 + method: 'POST'
  264 + }
  265 + }
  266 + )
  267 + };
  268 +}]);
  269 +
  270 +// 排班计划明细管理service
  271 +angular.module('ScheduleApp').factory('SchedulePlanInfoManageService_g', ['$resource', function($resource) {
  272 + return {
  273 + rest : $resource(
  274 + '/spic/:id',
  275 + {order: 'scheduleDate,lp,fcno', direction: 'ASC', id: '@id_route'},
  276 + {
  277 + list: {
  278 + method: 'GET',
  279 + params: {
  280 + page: 0
  281 + }
  282 + },
  283 + get: {
  284 + method: 'GET'
  285 + },
  286 + save: {
  287 + method: 'POST'
  288 + }
  289 + }
  290 + )
  291 + };
  292 +}]);
  293 +
  294 +// 线路运营统计service
  295 +angular.module('ScheduleApp').factory('BusLineInfoStatService_g', ['$resource', function($resource) {
  296 + return $resource(
  297 + '/bic/:id',
  298 + {order: 'createDate', direction: 'DESC', id: '@id_route'}, // TODO:以后需要根据属性对象的属性查询
  299 + {
  300 + list: {
  301 + method: 'GET',
  302 + params: {
  303 + page: 0
  304 + }
  305 + }
  306 + }
  307 + );
  308 +}]);
  309 +
  310 +
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js 0 → 100644
  1 +// ui route 配置
  2 +
  3 +/** 配置所有模块页面route */
  4 +ScheduleApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
  5 + // 默认路由
  6 + //$urlRouterProvider.otherwise('/busConfig.html');
  7 +
  8 + $stateProvider
  9 + // 车辆基础信息模块配置
  10 + .state("busInfoManage", {
  11 + url: '/busInfoManage',
  12 + views: {
  13 + "": {
  14 + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/index.html'
  15 + },
  16 + "busInfoManage_list@busInfoManage": {
  17 + templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/list.html'
  18 + }
  19 + },
  20 +
  21 + resolve: {
  22 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  23 + return $ocLazyLoad.load({
  24 + name: 'busInfoManage_module',
  25 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  26 + files: [
  27 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  28 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  29 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  30 + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js"
  31 + ]
  32 + });
  33 + }]
  34 + }
  35 + })
  36 + .state("busInfoManage_form", {
  37 + url: '/busInfoManage_form',
  38 + views: {
  39 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/form.html'}
  40 + },
  41 + resolve: {
  42 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  43 + return $ocLazyLoad.load({
  44 + name: 'busInfoManage_form_module',
  45 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  46 + files: [
  47 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  48 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  49 + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js"
  50 + ]
  51 + });
  52 + }]
  53 + }
  54 + })
  55 + .state("busInfoManage_edit", {
  56 + url: '/busInfoManage_edit/:id',
  57 + views: {
  58 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/edit.html'}
  59 + },
  60 + resolve: {
  61 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  62 + return $ocLazyLoad.load({
  63 + name: 'busInfoManage_edit_module',
  64 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  65 + files: [
  66 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  67 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  68 + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js"
  69 + ]
  70 + });
  71 + }]
  72 + }
  73 + })
  74 + .state("busInfoManage_detail", {
  75 + url: '/busInfoManage_detail/:id',
  76 + views: {
  77 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/busInfoManage/detail.html'}
  78 + },
  79 + resolve: {
  80 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  81 + return $ocLazyLoad.load({
  82 + name: 'busInfoManage_detail_module',
  83 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  84 + files: [
  85 + "pages/scheduleApp/module/basicInfo/busInfoManage/busInfoManage.js"
  86 + ]
  87 + });
  88 + }]
  89 + }
  90 + })
  91 +
  92 + // 人员基础信息模块配置
  93 + .state("employeeInfoManage", {
  94 + url: '/employeeInfoManage',
  95 + views: {
  96 + "": {
  97 + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/index.html'
  98 + },
  99 + "employeeInfoManage_list@employeeInfoManage": {
  100 + templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/list.html'
  101 + }
  102 + },
  103 +
  104 + resolve: {
  105 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  106 + return $ocLazyLoad.load({
  107 + name: 'employeeInfoManage_module',
  108 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  109 + files: [
  110 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  111 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  112 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  113 + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js"
  114 + ]
  115 + });
  116 + }]
  117 + }
  118 + })
  119 + .state("employeeInfoManage_form", {
  120 + url: '/employeeInfoManage_form',
  121 + views: {
  122 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/form.html'}
  123 + },
  124 + resolve: {
  125 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  126 + return $ocLazyLoad.load({
  127 + name: 'employeeInfoManage_form_module',
  128 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  129 + files: [
  130 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  131 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  132 + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js"
  133 + ]
  134 + });
  135 + }]
  136 + }
  137 + })
  138 + .state("employeeInfoManage_edit", {
  139 + url: '/employeeInfoManage_edit/:id',
  140 + views: {
  141 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/edit.html'}
  142 + },
  143 + resolve: {
  144 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  145 + return $ocLazyLoad.load({
  146 + name: 'employeeInfoManage_edit_module',
  147 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  148 + files: [
  149 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  150 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  151 + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js"
  152 + ]
  153 + });
  154 + }]
  155 + }
  156 + })
  157 + .state("employeeInfoManage_detail", {
  158 + url: '/employeeInfoManage_detail/:id',
  159 + views: {
  160 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/employeeInfoManage/detail.html'}
  161 + },
  162 + resolve: {
  163 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  164 + return $ocLazyLoad.load({
  165 + name: 'employeeInfoManage_detail_module',
  166 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  167 + files: [
  168 + "pages/scheduleApp/module/basicInfo/employeeInfoManage/employeeInfoManage.js"
  169 + ]
  170 + });
  171 + }]
  172 + }
  173 + })
  174 +
  175 + // 车辆设备信息模块配置
  176 + .state("deviceInfoManage", {
  177 + url: '/deviceInfoManage',
  178 + views: {
  179 + "": {
  180 + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/index.html'
  181 + },
  182 + "deviceInfoManage_list@deviceInfoManage": {
  183 + templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/list.html'
  184 + }
  185 + },
  186 +
  187 + resolve: {
  188 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  189 + return $ocLazyLoad.load({
  190 + name: 'deviceInfoManage_module',
  191 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  192 + files: [
  193 + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js"
  194 + ]
  195 + });
  196 + }]
  197 + }
  198 + })
  199 + .state("deviceInfoManage_form", {
  200 + url: '/deviceInfoManage_form',
  201 + views: {
  202 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/form.html'}
  203 + },
  204 + resolve: {
  205 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  206 + return $ocLazyLoad.load({
  207 + name: 'deviceInfoManage_form_module',
  208 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  209 + files: [
  210 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  211 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  212 + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js"
  213 + ]
  214 + });
  215 + }]
  216 + }
  217 + })
  218 + .state("deviceInfoManage_edit", {
  219 + url: '/deviceInfoManage_edit/:id',
  220 + views: {
  221 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/edit.html'}
  222 + },
  223 + resolve: {
  224 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  225 + return $ocLazyLoad.load({
  226 + name: 'deviceInfoManage_edit_module',
  227 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  228 + files: [
  229 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  230 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  231 + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js"
  232 + ]
  233 + });
  234 + }]
  235 + }
  236 + })
  237 + .state("deviceInfoManage_detail", {
  238 + url: '/deviceInfoManage_detail/:id',
  239 + views: {
  240 + "": {templateUrl: 'pages/scheduleApp/module/basicInfo/deviceInfoManage/detail.html'}
  241 + },
  242 + resolve: {
  243 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  244 + return $ocLazyLoad.load({
  245 + name: 'deviceInfoManage_detail_module',
  246 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  247 + files: [
  248 + "pages/scheduleApp/module/basicInfo/deviceInfoManage/deviceInfoManage.js"
  249 + ]
  250 + });
  251 + }]
  252 + }
  253 + })
  254 +
  255 + // 车辆配置模块
  256 + .state("busConfig", {
  257 + url: '/busConfig',
  258 + views: {
  259 + "": {
  260 + templateUrl: 'pages/scheduleApp/module/core/busConfig/index.html'
  261 + },
  262 + "busConfig_list@busConfig": {
  263 + templateUrl: 'pages/scheduleApp/module/core/busConfig/list.html'
  264 + }
  265 + },
  266 +
  267 + resolve: {
  268 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  269 + return $ocLazyLoad.load({
  270 + name: 'busConfig_module',
  271 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  272 + files: [
  273 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  274 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  275 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  276 + "pages/scheduleApp/module/core/busConfig/busConfig.js"
  277 + ]
  278 + });
  279 + }]
  280 + }
  281 + })
  282 + .state("busConfig_form", {
  283 + url: '/busConfig_form',
  284 + views: {
  285 + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/form.html'}
  286 + },
  287 + resolve: {
  288 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  289 + return $ocLazyLoad.load({
  290 + name: 'busConfig_form_module',
  291 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  292 + files: [
  293 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  294 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  295 + "pages/scheduleApp/module/core/busConfig/busConfig.js"
  296 + ]
  297 + });
  298 + }]
  299 + }
  300 + })
  301 + .state("busConfig_edit", {
  302 + url: '/busConfig_edit/:id',
  303 + views: {
  304 + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/edit.html'}
  305 + },
  306 + resolve: {
  307 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  308 + return $ocLazyLoad.load({
  309 + name: 'busConfig_edit_module',
  310 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  311 + files: [
  312 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  313 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  314 + "pages/scheduleApp/module/core/busConfig/busConfig.js"
  315 + ]
  316 + });
  317 + }]
  318 + }
  319 + })
  320 + .state("busConfig_detail", {
  321 + url: '/busConfig_detail/:id',
  322 + views: {
  323 + "": {templateUrl: 'pages/scheduleApp/module/core/busConfig/detail.html'}
  324 + },
  325 + resolve: {
  326 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  327 + return $ocLazyLoad.load({
  328 + name: 'busConfig_detail_module',
  329 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  330 + files: [
  331 + "pages/scheduleApp/module/core/busConfig/busConfig.js"
  332 + ]
  333 + });
  334 + }]
  335 + }
  336 + })
  337 +
  338 + // 人员配置模块
  339 + .state("employeeConfig", {
  340 + url: '/employeeConfig',
  341 + views: {
  342 + "": {
  343 + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/index.html'
  344 + },
  345 + "employeeConfig_list@employeeConfig": {
  346 + templateUrl: 'pages/scheduleApp/module/core/employeeConfig/list.html'
  347 + }
  348 + },
  349 +
  350 + resolve: {
  351 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  352 + return $ocLazyLoad.load({
  353 + name: 'employeeConfig_module',
  354 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  355 + files: [
  356 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  357 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  358 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  359 + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js"
  360 + ]
  361 + });
  362 + }]
  363 + }
  364 + })
  365 + .state("employeeConfig_form", {
  366 + url: '/employeeConfig_form',
  367 + views: {
  368 + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/form.html'}
  369 + },
  370 + resolve: {
  371 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  372 + return $ocLazyLoad.load({
  373 + name: 'employeeConfig_form_module',
  374 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  375 + files: [
  376 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  377 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  378 + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js"
  379 + ]
  380 + });
  381 + }]
  382 + }
  383 + })
  384 + .state("employeeConfig_edit", {
  385 + url: '/employeeConfig_edit/:id',
  386 + views: {
  387 + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/edit.html'}
  388 + },
  389 + resolve: {
  390 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  391 + return $ocLazyLoad.load({
  392 + name: 'employeeConfig_edit_module',
  393 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  394 + files: [
  395 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  396 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  397 + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js"
  398 + ]
  399 + });
  400 + }]
  401 + }
  402 + })
  403 + .state("employeeConfig_detail", {
  404 + url: '/employeeConfig_detail/:id',
  405 + views: {
  406 + "": {templateUrl: 'pages/scheduleApp/module/core/employeeConfig/detail.html'}
  407 + },
  408 + resolve: {
  409 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  410 + return $ocLazyLoad.load({
  411 + name: 'employeeConfig_detail_module',
  412 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  413 + files: [
  414 + "pages/scheduleApp/module/core/employeeConfig/employeeConfig.js"
  415 + ]
  416 + });
  417 + }]
  418 + }
  419 + })
  420 +
  421 + // 路牌管理
  422 + .state("guideboardManage", {
  423 + url: '/guideboardManage',
  424 + views: {
  425 + "": {
  426 + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/index.html'
  427 + },
  428 + "guideboardManage_list@guideboardManage": {
  429 + templateUrl: 'pages/scheduleApp/module/core/guideboardManage/list.html'
  430 + }
  431 + },
  432 +
  433 + resolve: {
  434 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  435 + return $ocLazyLoad.load({
  436 + name: 'guideboardManage_module',
  437 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  438 + files: [
  439 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  440 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  441 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  442 + "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js"
  443 + ]
  444 + });
  445 + }]
  446 + }
  447 + })
  448 + .state("guideboardManage_detail", {
  449 + url: '/guideboardManage_detail/:id',
  450 + views: {
  451 + "": {templateUrl: 'pages/scheduleApp/module/core/guideboardManage/detail.html'}
  452 + },
  453 + resolve: {
  454 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  455 + return $ocLazyLoad.load({
  456 + name: 'guideboardManage_detail_module',
  457 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  458 + files: [
  459 + "pages/scheduleApp/module/core/guideboardManage/guideboardManage.js"
  460 + ]
  461 + });
  462 + }]
  463 + }
  464 + })
  465 +
  466 +
  467 + // 时刻表管理
  468 + .state("timeTableManage", {
  469 + url: '/timeTableManage',
  470 + views: {
  471 + "": {
  472 + templateUrl: 'pages/scheduleApp/module/core/timeTableManage/index.html'
  473 + },
  474 + "timeTableManage_list@timeTableManage": {
  475 + templateUrl: 'pages/scheduleApp/module/core/timeTableManage/list.html'
  476 + }
  477 + },
  478 +
  479 + resolve: {
  480 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  481 + return $ocLazyLoad.load({
  482 + name: 'timeTableManage_module',
  483 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  484 + files: [
  485 + "assets/bower_components/angular-file-upload/dist/angular-file-upload.min.js",
  486 + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js"
  487 + ]
  488 + });
  489 + }]
  490 + }
  491 + })
  492 + .state("timeTableManage_form", {
  493 + url: '/timeTableManage_form',
  494 + views: {
  495 + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/form.html'}
  496 + },
  497 + resolve: {
  498 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  499 + return $ocLazyLoad.load({
  500 + name: 'timeTableManage_form_module',
  501 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  502 + files: [
  503 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  504 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  505 + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js"
  506 + ]
  507 + });
  508 + }]
  509 + }
  510 + })
  511 + .state("timeTableManage_edit", {
  512 + url: '/timeTableManage_edit/:id',
  513 + views: {
  514 + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/edit.html'}
  515 + },
  516 + resolve: {
  517 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  518 + return $ocLazyLoad.load({
  519 + name: 'timeTableManage_edit_module',
  520 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  521 + files: [
  522 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  523 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  524 + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js"
  525 + ]
  526 + });
  527 + }]
  528 + }
  529 + })
  530 + .state("timeTableManage_detail", {
  531 + url: '/timeTableManage_detail/:id',
  532 + views: {
  533 + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail.html'}
  534 + },
  535 + resolve: {
  536 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  537 + return $ocLazyLoad.load({
  538 + name: 'timeTableManage_detail_module',
  539 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  540 + files: [
  541 + "pages/scheduleApp/module/core/timeTableManage/timeTableManage.js"
  542 + ]
  543 + });
  544 + }]
  545 + }
  546 + })
  547 + .state("timeTableDetailInfoManage", {
  548 + url: '/timeTableDetailInfoManage/:xlid/:ttid',
  549 + views: {
  550 + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info.html'}
  551 + },
  552 + resolve: {
  553 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  554 + return $ocLazyLoad.load({
  555 + name: 'timeTableDetailInfoManage_module',
  556 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  557 + files: [
  558 + "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js"
  559 + ]
  560 + });
  561 + }]
  562 + }
  563 + })
  564 +
  565 + // 排班规则管理模块
  566 + .state("scheduleRuleManage", {
  567 + url: '/scheduleRuleManage',
  568 + views: {
  569 + "": {
  570 + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html'
  571 + },
  572 + "scheduleRuleManage_list@scheduleRuleManage": {
  573 + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html'
  574 + }
  575 + },
  576 +
  577 + resolve: {
  578 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  579 + return $ocLazyLoad.load({
  580 + name: 'scheduleRuleManage_module',
  581 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  582 + files: [
  583 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  584 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  585 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  586 + ]
  587 + });
  588 + }]
  589 + }
  590 + })
  591 + .state("scheduleRuleManage_form", {
  592 + url: '/scheduleRuleManage_form',
  593 + views: {
  594 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'}
  595 + },
  596 + resolve: {
  597 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  598 + return $ocLazyLoad.load({
  599 + name: 'scheduleRuleManage_form_module',
  600 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  601 + files: [
  602 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  603 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  604 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  605 + ]
  606 + });
  607 + }]
  608 + }
  609 + })
  610 + .state("scheduleRuleManage_edit", {
  611 + url: '/scheduleRuleManage_edit/:id',
  612 + views: {
  613 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'}
  614 + },
  615 + resolve: {
  616 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  617 + return $ocLazyLoad.load({
  618 + name: 'scheduleRuleManage_edit_module',
  619 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  620 + files: [
  621 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  622 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  623 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  624 + ]
  625 + });
  626 + }]
  627 + }
  628 + })
  629 + .state("scheduleRuleManage_detail", {
  630 + url: '/scheduleRuleManage_detail/:id',
  631 + views: {
  632 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'}
  633 + },
  634 + resolve: {
  635 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  636 + return $ocLazyLoad.load({
  637 + name: 'scheduleRuleManage_detail_module',
  638 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  639 + files: [
  640 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  641 + ]
  642 + });
  643 + }]
  644 + }
  645 + })
  646 +
  647 + // 排班计划管理模块
  648 + .state("schedulePlanManage", {
  649 + url: '/schedulePlanManage',
  650 + views: {
  651 + "": {
  652 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html'
  653 + },
  654 + "schedulePlanManage_list@schedulePlanManage": {
  655 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html'
  656 + }
  657 + },
  658 +
  659 + resolve: {
  660 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  661 + return $ocLazyLoad.load({
  662 + name: 'schedulePlanManage_module',
  663 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  664 + files: [
  665 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  666 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  667 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"
  668 + ]
  669 + });
  670 + }]
  671 + }
  672 + })
  673 + .state("schedulePlanManage_form", {
  674 + url: '/schedulePlanManage_form',
  675 + views: {
  676 + "": {
  677 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html'
  678 + }
  679 + },
  680 +
  681 + resolve: {
  682 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  683 + return $ocLazyLoad.load({
  684 + name: 'schedulePlanManage_form_module',
  685 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  686 + files: [
  687 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  688 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  689 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"
  690 + ]
  691 + });
  692 + }]
  693 + }
  694 + })
  695 +
  696 + // 排班计划明细管理模块
  697 + .state("schedulePlanInfoManage", {
  698 + url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime',
  699 + views: {
  700 + "": {
  701 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_info.html'
  702 + },
  703 + "schedulePlanInfoManage_list@schedulePlanInfoManage": {
  704 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_info.html'
  705 + }
  706 + },
  707 +
  708 + resolve: {
  709 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  710 + return $ocLazyLoad.load({
  711 + name: 'schedulePlanInfoManage_module',
  712 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  713 + files: [
  714 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js"
  715 + ]
  716 + });
  717 + }]
  718 + }
  719 + })
  720 +
  721 + // 线路运营概览模块
  722 + .state("busLineInfoStat", {
  723 + url: '/busLineInfoStat',
  724 + views: {
  725 + "": {
  726 + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html'
  727 + },
  728 + "busLineInfoStat_list@busLineInfoStat": {
  729 + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html'
  730 + }
  731 + },
  732 +
  733 + resolve: {
  734 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  735 + return $ocLazyLoad.load({
  736 + name: 'busLineInfoStat_module',
  737 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  738 + files: [
  739 + "pages/scheduleApp/module/core/busLineInfoStat/busLineInfoStat.js"
  740 + ]
  741 + });
  742 + }]
  743 + }
  744 + })
  745 +
  746 +
  747 +
  748 +
  749 +
  750 + // TODO:
  751 +
  752 + ;
  753 +}]);
0 754 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/busConfig.js
... ... @@ -202,7 +202,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;BusConfigFormCtrl&#39;, [&#39;BusConfigService
202 202 };
203 203  
204 204 // 欲保存的busInfo信息,绑定
205   - self.busConfigForSave = {};
  205 + self.busConfigForSave = {xl:{}, cl:{}};
206 206  
207 207 // 获取传过来的id,有的话就是修改,获取一遍数据
208 208 var id = $stateParams.id;
... ... @@ -214,10 +214,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;BusConfigFormCtrl&#39;, [&#39;BusConfigService
214 214 for (key in result) {
215 215 self.busConfigForSave[key] = result[key];
216 216 }
217   -
218   - // 添加xl_id,cl_id
219   - self.busConfigForSave["xl_id"] = self.busConfigForSave.xl.id;
220   - self.busConfigForSave["cl_id"] = self.busConfigForSave.cl.id;
221 217 },
222 218 function(result) {
223 219 alert("出错啦!");
... ... @@ -228,17 +224,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;BusConfigFormCtrl&#39;, [&#39;BusConfigService
228 224 // 提交方法
229 225 self.submit = function() {
230 226 console.log(self.busConfigForSave);
231   -
232   - var mf = $scope.myForm;
233   -
234   - // xl_id,cl_id要组织成对象,然后删除
235   - self.busConfigForSave["xl"] = {};
236   - self.busConfigForSave.xl["id"] = self.busConfigForSave["xl_id"];
237   - delete self.busConfigForSave["xl_id"];
238   - self.busConfigForSave["cl"] = {};
239   - self.busConfigForSave.cl["id"] = self.busConfigForSave["cl_id"];
240   - delete self.busConfigForSave["cl_id"];
241   -
242 227 busConfigService.saveDetail(self.busConfigForSave).then(
243 228 function(result) {
244 229 // TODO:弹出框方式以后改
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/edit.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.busConfigForSave"
  46 + <sa-Select3 model="ctrl.busConfigForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.busConfigForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -61,15 +63,17 @@
61 63 <div class="form-group has-success has-feedback">
62 64 <label class="col-md-2 control-label">车辆*:</label>
63 65 <div class="col-md-3">
64   - <sa-Select2 model="ctrl.busConfigForSave"
  66 + <sa-Select3 model="ctrl.busConfigForSave"
65 67 name="cl"
66   - required="true"
67   - type="cl"
68   - modelcolname1="cl_id"
69   - datacolname1="id"
70   - showcolname="insideCode"
71   - placeholder="请输拼音...">
72   - </sa-Select2>
  68 + placeholder="请输拼音..."
  69 + dcvalue="{{ctrl.busConfigForSave.cl.id}}"
  70 + dcname="cl.id"
  71 + icname="id"
  72 + icnames="insideCode"
  73 + datatype="cl"
  74 + mlp="true"
  75 + required >
  76 + </sa-Select3>
73 77 </div>
74 78 <!-- 隐藏块,显示验证信息 -->
75 79 <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
... ... @@ -140,11 +144,7 @@
140 144 <div class="row">
141 145 <div class="col-md-offset-3 col-md-4">
142 146 <button type="submit" class="btn green"
143   - ng-disabled="myForm.xl.$error.required ||
144   - myForm.cl.$error.required ||
145   - myForm.qyrq.$error.required ||
146   - myForm.tcd.$error.required"
147   - ><i class="fa fa-check"></i> 提交</button>
  147 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
148 148 <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a>
149 149 </div>
150 150 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/form.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.busConfigForSave"
  46 + <sa-Select3 model="ctrl.busConfigForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.busConfigForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -61,15 +63,17 @@
61 63 <div class="form-group has-success has-feedback">
62 64 <label class="col-md-2 control-label">车辆*:</label>
63 65 <div class="col-md-3">
64   - <sa-Select2 model="ctrl.busConfigForSave"
  66 + <sa-Select3 model="ctrl.busConfigForSave"
65 67 name="cl"
66   - required="true"
67   - type="cl"
68   - modelcolname1="cl_id"
69   - datacolname1="id"
70   - showcolname="insideCode"
71   - placeholder="请输拼音...">
72   - </sa-Select2>
  68 + placeholder="请输拼音..."
  69 + dcvalue="{{ctrl.busConfigForSave.cl.id}}"
  70 + dcname="cl.id"
  71 + icname="id"
  72 + icnames="insideCode"
  73 + datatype="cl"
  74 + mlp="true"
  75 + required >
  76 + </sa-Select3>
73 77 </div>
74 78 <!-- 隐藏块,显示验证信息 -->
75 79 <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
... ... @@ -140,11 +144,7 @@
140 144 <div class="row">
141 145 <div class="col-md-offset-3 col-md-4">
142 146 <button type="submit" class="btn green"
143   - ng-disabled="myForm.xl.$error.required ||
144   - myForm.cl.$error.required ||
145   - myForm.qyrq.$error.required ||
146   - myForm.tcd.$error.required"
147   - ><i class="fa fa-check"></i> 提交</button>
  147 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
148 148 <a type="button" class="btn default" ui-sref="busConfig" ><i class="fa fa-times"></i> 取消</a>
149 149 </div>
150 150 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/busConfig/list.html
... ... @@ -16,13 +16,15 @@
16 16 <td></td>
17 17 <td>
18 18 <div>
19   - <sa-Select2 model="ctrl.searchCondition()"
20   - type="xl"
21   - modelcolname1="xl.lineCode_eq"
22   - datacolname1="lineCode"
23   - showcolname="name"
24   - placeholder="请输拼音...">
25   - </sa-Select2>
  19 + <sa-Select3 model="ctrl.searchCondition()"
  20 + name="xl"
  21 + placeholder="请输拼音..."
  22 + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}"
  23 + dcname="xl.lineCode_eq"
  24 + icname="lineCode"
  25 + icnames="name"
  26 + datatype="xl">
  27 + </sa-Select3>
26 28 </div>
27 29 </td>
28 30 <td></td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/edit.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.employeeConfigForSave"
  46 + <sa-Select3 model="ctrl.employeeConfigForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.employeeConfigForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -74,15 +76,17 @@
74 76 <div class="form-group has-success has-feedback">
75 77 <label class="col-md-2 control-label">驾驶员*:</label>
76 78 <div class="col-md-3">
77   - <sa-Select2 model="ctrl.employeeConfigForSave"
  79 + <sa-Select3 model="ctrl.employeeConfigForSave"
78 80 name="jsy"
79   - required="true"
80   - type="ry"
81   - modelcolname1="jsy_id"
82   - datacolname1="id"
83   - showcolname="personnelName"
84   - placeholder="请输拼音...">
85   - </sa-Select2>
  81 + placeholder="请输拼音..."
  82 + dcvalue="{{ctrl.employeeConfigForSave.jsy.id}}"
  83 + dcname="jsy.id"
  84 + icname="id"
  85 + icnames="personnelName"
  86 + datatype="ry"
  87 + mlp="true"
  88 + required >
  89 + </sa-Select3>
86 90 </div>
87 91 <!-- 隐藏块,显示验证信息 -->
88 92 <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required">
... ... @@ -91,16 +95,18 @@
91 95 </div>
92 96  
93 97 <div class="form-group has-success has-feedback">
94   - <label class="col-md-2 control-label">售票员*:</label>
  98 + <label class="col-md-2 control-label">售票员:</label>
95 99 <div class="col-md-3">
96   - <sa-Select2 model="ctrl.employeeConfigForSave"
  100 + <sa-Select3 model="ctrl.employeeConfigForSave"
97 101 name="spy"
98   - type="ry"
99   - modelcolname1="spy_id"
100   - datacolname1="id"
101   - showcolname="personnelName"
102   - placeholder="请输拼音...">
103   - </sa-Select2>
  102 + placeholder="请输拼音..."
  103 + dcvalue="{{ctrl.employeeConfigForSave.spy.id}}"
  104 + dcname="spy.id"
  105 + icname="id"
  106 + icnames="personnelName"
  107 + datatype="ry"
  108 + mlp="true" >
  109 + </sa-Select3>
104 110 </div>
105 111 </div>
106 112  
... ... @@ -113,11 +119,7 @@
113 119 <div class="row">
114 120 <div class="col-md-offset-3 col-md-4">
115 121 <button type="submit" class="btn green"
116   - ng-disabled="myForm.xl.$error.required ||
117   - myForm.dbbm.$error.required ||
118   - myForm.jsy.$error.required ||
119   - myForm.spy.$error.required"
120   - ><i class="fa fa-check"></i> 提交</button>
  122 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
121 123 <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a>
122 124 </div>
123 125 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/employeeConfig.js
... ... @@ -21,7 +21,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;EmployeeConfigService&#39;, [&#39;EmployeeConfigS
21 21 resetSearchCondition: function() {
22 22 var key;
23 23 for (key in currentSearchCondition) {
24   - currentSearchCondition[key] = "";
  24 + currentSearchCondition[key] = null;
25 25 }
26 26 },
27 27 /**
... ... @@ -179,7 +179,9 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;EmployeeConfigListCtrl&#39;, [&#39;EmployeeCon
179 179 };
180 180 // 重置查询条件
181 181 self.resetSearchCondition = function() {
182   - return employeeConfigService.resetSearchCondition();
  182 + employeeConfigService.resetSearchCondition();
  183 + self.pageInfo.currentPage = 1;
  184 + self.pageChanaged();
183 185 };
184 186 }]);
185 187  
... ... @@ -187,7 +189,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;EmployeeConfigFormCtrl&#39;, [&#39;EmployeeCon
187 189 var self = this;
188 190  
189 191 // 欲保存的busInfo信息,绑定
190   - self.employeeConfigForSave = {};
  192 + self.employeeConfigForSave = {xl:{}, jsy:{}, spy:{}};
191 193  
192 194 // 获取传过来的id,有的话就是修改,获取一遍数据
193 195 var id = $stateParams.id;
... ... @@ -200,12 +202,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;EmployeeConfigFormCtrl&#39;, [&#39;EmployeeCon
200 202 self.employeeConfigForSave[key] = result[key];
201 203 }
202 204  
203   - // 添加xl_id,jsy_id,spy_id
204   - self.employeeConfigForSave["xl_id"] = self.employeeConfigForSave.xl.id;
205   - self.employeeConfigForSave["jsy_id"] = self.employeeConfigForSave.jsy.id;
206   - self.employeeConfigForSave["spy_id"] =
207   - self.employeeConfigForSave.spy || self.employeeConfigForSave.spy.id;
208   -
209 205 },
210 206 function(result) {
211 207 alert("出错啦!");
... ... @@ -217,17 +213,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;EmployeeConfigFormCtrl&#39;, [&#39;EmployeeCon
217 213 self.submit = function() {
218 214 console.log(self.employeeConfigForSave);
219 215  
220   - // jsy_id,cl_id要组织成对象,然后删除
221   - self.employeeConfigForSave["xl"] = {};
222   - self.employeeConfigForSave.xl["id"] = self.employeeConfigForSave["xl_id"];
223   - delete self.employeeConfigForSave["xl_id"];
224   - self.employeeConfigForSave["jsy"] = {};
225   - self.employeeConfigForSave.jsy["id"] = self.employeeConfigForSave["jsy_id"];
226   - delete self.employeeConfigForSave["jsy_id"];
227   - self.employeeConfigForSave["spy"] = {};
228   - self.employeeConfigForSave.spy["id"] = self.employeeConfigForSave["spy_id"];
229   - delete self.employeeConfigForSave["spy_id"];
230   -
231 216 employeeConfigService.saveDetail(self.employeeConfigForSave).then(
232 217 function(result) {
233 218 // TODO:弹出框方式以后改
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/form.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.employeeConfigForSave"
  46 + <sa-Select3 model="ctrl.employeeConfigForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.employeeConfigForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -74,15 +76,17 @@
74 76 <div class="form-group has-success has-feedback">
75 77 <label class="col-md-2 control-label">驾驶员*:</label>
76 78 <div class="col-md-3">
77   - <sa-Select2 model="ctrl.employeeConfigForSave"
  79 + <sa-Select3 model="ctrl.employeeConfigForSave"
78 80 name="jsy"
79   - required="true"
80   - type="ry"
81   - modelcolname1="jsy_id"
82   - datacolname1="id"
83   - showcolname="personnelName"
84   - placeholder="请输拼音...">
85   - </sa-Select2>
  81 + placeholder="请输拼音..."
  82 + dcvalue="{{ctrl.employeeConfigForSave.jsy.id}}"
  83 + dcname="jsy.id"
  84 + icname="id"
  85 + icnames="personnelName"
  86 + datatype="ry"
  87 + mlp="true"
  88 + required >
  89 + </sa-Select3>
86 90 </div>
87 91 <!-- 隐藏块,显示验证信息 -->
88 92 <div class="alert alert-danger well-sm" ng-show="myForm.jsy.$error.required">
... ... @@ -91,16 +95,18 @@
91 95 </div>
92 96  
93 97 <div class="form-group has-success has-feedback">
94   - <label class="col-md-2 control-label">售票员*:</label>
  98 + <label class="col-md-2 control-label">售票员:</label>
95 99 <div class="col-md-3">
96   - <sa-Select2 model="ctrl.employeeConfigForSave"
  100 + <sa-Select3 model="ctrl.employeeConfigForSave"
97 101 name="spy"
98   - type="ry"
99   - modelcolname1="spy_id"
100   - datacolname1="id"
101   - showcolname="personnelName"
102   - placeholder="请输拼音...">
103   - </sa-Select2>
  102 + placeholder="请输拼音..."
  103 + dcvalue="{{ctrl.employeeConfigForSave.spy.id}}"
  104 + dcname="spy.id"
  105 + icname="id"
  106 + icnames="personnelName"
  107 + datatype="ry"
  108 + mlp="true" >
  109 + </sa-Select3>
104 110 </div>
105 111 </div>
106 112  
... ... @@ -113,11 +119,7 @@
113 119 <div class="row">
114 120 <div class="col-md-offset-3 col-md-4">
115 121 <button type="submit" class="btn green"
116   - ng-disabled="myForm.xl.$error.required ||
117   - myForm.dbbm.$error.required ||
118   - myForm.jsy.$error.required ||
119   - myForm.spy.$error.required"
120   - ><i class="fa fa-check"></i> 提交</button>
  122 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
121 123 <a type="button" class="btn default" ui-sref="employeeConfig" ><i class="fa fa-times"></i> 取消</a>
122 124 </div>
123 125 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/employeeConfig/list.html
... ... @@ -17,26 +17,30 @@
17 17 <td></td>
18 18 <td>
19 19 <div>
20   - <sa-Select2 model="ctrl.searchCondition()"
21   - type="xl"
22   - modelcolname1="xl.lineCode_eq"
23   - datacolname1="lineCode"
24   - showcolname="name"
25   - placeholder="请输拼音...">
26   - </sa-Select2>
  20 + <sa-Select3 model="ctrl.searchCondition()"
  21 + name="xl"
  22 + placeholder="请输拼音..."
  23 + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}"
  24 + dcname="xl.lineCode_eq"
  25 + icname="lineCode"
  26 + icnames="name"
  27 + datatype="xl">
  28 + </sa-Select3>
27 29 </div>
28 30 </td>
29 31 <td></td>
30 32 <td></td>
31 33 <td>
32 34 <div>
33   - <sa-Select2 model="ctrl.searchCondition()"
34   - type="ry"
35   - modelcolname1="jsy.id_eq"
36   - datacolname1="id"
37   - showcolname="personnelName"
38   - placeholder="请输拼音...">
39   - </sa-Select2>
  35 + <sa-Select3 model="ctrl.searchCondition()"
  36 + name="ry"
  37 + placeholder="请输拼音..."
  38 + dcvalue="{{ctrl.searchCondition()['jsy.id_eq']}}"
  39 + dcname="jsy.id_eq"
  40 + icname="id"
  41 + icnames="personnelName"
  42 + datatype="ry">
  43 + </sa-Select3>
40 44 </div>
41 45 </td>
42 46 <td></td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/guideboardManage.js
... ... @@ -178,7 +178,9 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;GuideboardManageListCtrl&#39;, [&#39;Guideboar
178 178 };
179 179 // 重置查询条件
180 180 self.resetSearchCondition = function() {
181   - return guideboardManageService.resetSearchCondition();
  181 + guideboardManageService.resetSearchCondition();
  182 + self.pageInfo.currentPage = 1;
  183 + self.pageChanaged();
182 184 };
183 185  
184 186 }]);
... ...
src/main/resources/static/pages/scheduleApp/module/core/guideboardManage/list.html
... ... @@ -15,13 +15,15 @@
15 15 <td></td>
16 16 <td>
17 17 <div>
18   - <sa-Select2 model="ctrl.searchCondition()"
19   - type="xl"
20   - modelcolname1="xl.lineCode_eq"
21   - datacolname1="lineCode"
22   - showcolname="name"
23   - placeholder="请输拼音...">
24   - </sa-Select2>
  18 + <sa-Select3 model="ctrl.searchCondition()"
  19 + name="xl"
  20 + placeholder="请输拼音..."
  21 + dcvalue="{{ctrl.searchCondition()['xl.lineCode_eq']}}"
  22 + dcname="xl.lineCode_eq"
  23 + icname="lineCode"
  24 + icnames="name"
  25 + datatype="xl">
  26 + </sa-Select3>
25 27 </div>
26 28 </td>
27 29 <td></td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/form.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.schedulePlanManageForSave"
  46 + <sa-Select3 model="ctrl.schedulePlanManageForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.schedulePlanManageForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -111,10 +113,7 @@
111 113 <div class="row">
112 114 <div class="col-md-offset-3 col-md-4">
113 115 <button type="submit" class="btn green"
114   - ng-disabled="myForm.xl.$error.required ||
115   - myForm.scheduleFromTime.$error.required ||
116   - myForm.scheduleToTime.$error.required"
117   - ><i class="fa fa-check"></i> 提交</button>
  116 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
118 117 <a type="button" class="btn default" ui-sref="schedulePlanManage" ><i class="fa fa-times"></i> 取消</a>
119 118 </div>
120 119 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
... ... @@ -15,13 +15,15 @@
15 15 <tr role="row" class="filter">
16 16 <td></td>
17 17 <td>
18   - <sa-Select2 model="ctrl.searchCondition()"
19   - type="xl"
20   - modelcolname1="xl.id_eq"
21   - datacolname1="id"
22   - showcolname="name"
23   - placeholder="请输拼音...">
24   - </sa-Select2>
  18 + <sa-Select3 model="ctrl.searchCondition()"
  19 + name="xl"
  20 + placeholder="请输拼音..."
  21 + dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}"
  22 + dcname="xl.id_eq"
  23 + icname="id"
  24 + icnames="name"
  25 + datatype="xl">
  26 + </sa-Select3>
25 27 </td>
26 28 <td></td>
27 29 <td></td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js
... ... @@ -108,7 +108,9 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;SchedulePlanManageListCtrl&#39;, [&#39;Schedul
108 108 };
109 109 // 重置查询条件
110 110 self.resetSearchCondition = function() {
111   - return schedulePlanManageService.resetSearchCondition();
  111 + schedulePlanManageService.resetSearchCondition();
  112 + self.pageInfo.currentPage = 1;
  113 + self.pageChanaged();
112 114 };
113 115  
114 116 }]);
... ... @@ -130,22 +132,12 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;SchedulePlanManageFormCtrl&#39;, [&#39;Schedul
130 132 };
131 133  
132 134 // 欲保存的busInfo信息,绑定
133   - self.schedulePlanManageForSave = {};
  135 + self.schedulePlanManageForSave = {xl: {}};
134 136  
135 137 // 提交方法
136 138 self.submit = function() {
137 139 console.log(self.schedulePlanManageForSave);
138 140  
139   - var mf = $scope.myForm;
140   -
141   - // xl_id,ttInfo_id要组织成对象,然后删除
142   - self.schedulePlanManageForSave["xl"] = {};
143   - self.schedulePlanManageForSave.xl["id"] = self.schedulePlanManageForSave["xl_id"];
144   - delete self.schedulePlanManageForSave["xl_id"];
145   - self.schedulePlanManageForSave["ttInfo"] = {};
146   - self.schedulePlanManageForSave.ttInfo["id"] = self.schedulePlanManageForSave["ttInfo_id"];
147   - delete self.schedulePlanManageForSave["ttInfo_id"];
148   -
149 141 schedulePlanManageService.saveDetail(self.schedulePlanManageForSave).then(
150 142 function(result) {
151 143 // TODO:弹出框方式以后改
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/edit.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.scheduleRuleManageForSave"
  46 + <sa-Select3 model="ctrl.scheduleRuleManageForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.scheduleRuleManageForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -59,17 +61,19 @@
59 61 </div>
60 62 </div>
61 63 <div class="form-group has-success has-feedback">
62   - <label class="col-md-2 control-label">车辆*:</label>
  64 + <label class="col-md-2 control-label">车辆配置*:</label>
63 65 <div class="col-md-3">
64   - <sa-Select2 model="ctrl.scheduleRuleManageForSave"
  66 + <sa-Select3 model="ctrl.scheduleRuleManageForSave"
65 67 name="cl"
66   - required="true"
67   - type="ccl"
68   - modelcolname1="cl_id"
69   - datacolname1="id"
70   - showcolname="nbbm"
71   - placeholder="请输拼音...">
72   - </sa-Select2>
  68 + placeholder="请输拼音..."
  69 + dcvalue="{{ctrl.scheduleRuleManageForSave.carConfigInfo.id}}"
  70 + dcname="carConfigInfo.id"
  71 + icname="id"
  72 + icnames="nbbm"
  73 + datatype="cci"
  74 + mlp="true"
  75 + required >
  76 + </sa-Select3>
73 77 </div>
74 78 <!-- 隐藏块,显示验证信息 -->
75 79 <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
... ... @@ -165,14 +169,7 @@
165 169 <div class="row">
166 170 <div class="col-md-offset-3 col-md-4">
167 171 <button type="submit" class="btn green"
168   - ng-disabled="myForm.xl.$error.required ||
169   - myForm.cl.$error.required ||
170   - myForm.qyrq.$error.required ||
171   - myForm.lpNames.$error.required ||
172   - myForm.lpStart.$error.required ||
173   - myForm.ryDbbms.$error.required ||
174   - myForm.ryStart.$error.required"
175   - ><i class="fa fa-check"></i> 提交</button>
  172 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
176 173 <a type="button" class="btn default" ui-sref="scheduleRuleManage" ><i class="fa fa-times"></i> 取消</a>
177 174 </div>
178 175 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/form.html
... ... @@ -43,15 +43,17 @@
43 43 <div class="form-group has-success has-feedback">
44 44 <label class="col-md-2 control-label">线路*:</label>
45 45 <div class="col-md-3">
46   - <sa-Select2 model="ctrl.scheduleRuleManageForSave"
  46 + <sa-Select3 model="ctrl.scheduleRuleManageForSave"
47 47 name="xl"
48   - required="true"
49   - type="xl"
50   - modelcolname1="xl_id"
51   - datacolname1="id"
52   - showcolname="name"
53   - placeholder="请输拼音...">
54   - </sa-Select2>
  48 + placeholder="请输拼音..."
  49 + dcvalue="{{ctrl.scheduleRuleManageForSave.xl.id}}"
  50 + dcname="xl.id"
  51 + icname="id"
  52 + icnames="name"
  53 + datatype="xl"
  54 + mlp="true"
  55 + required >
  56 + </sa-Select3>
55 57 </div>
56 58 <!-- 隐藏块,显示验证信息 -->
57 59 <div class="alert alert-danger well-sm" ng-show="myForm.xl.$error.required">
... ... @@ -61,15 +63,17 @@
61 63 <div class="form-group has-success has-feedback">
62 64 <label class="col-md-2 control-label">车辆*:</label>
63 65 <div class="col-md-3">
64   - <sa-Select2 model="ctrl.scheduleRuleManageForSave"
  66 + <sa-Select3 model="ctrl.scheduleRuleManageForSave"
65 67 name="cl"
66   - required="true"
67   - type="ccl"
68   - modelcolname1="cl_id"
69   - datacolname1="id"
70   - showcolname="nbbm"
71   - placeholder="请输拼音...">
72   - </sa-Select2>
  68 + placeholder="请输拼音..."
  69 + dcvalue="{{ctrl.scheduleRuleManageForSave.carConfigInfo.id}}"
  70 + dcname="carConfigInfo.id"
  71 + icname="id"
  72 + icnames="nbbm"
  73 + datatype="cci"
  74 + mlp="true"
  75 + required >
  76 + </sa-Select3>
73 77 </div>
74 78 <!-- 隐藏块,显示验证信息 -->
75 79 <div class="alert alert-danger well-sm" ng-show="myForm.cl.$error.required">
... ... @@ -165,14 +169,7 @@
165 169 <div class="row">
166 170 <div class="col-md-offset-3 col-md-4">
167 171 <button type="submit" class="btn green"
168   - ng-disabled="myForm.xl.$error.required ||
169   - myForm.cl.$error.required ||
170   - myForm.qyrq.$error.required ||
171   - myForm.lpNames.$error.required ||
172   - myForm.lpStart.$error.required ||
173   - myForm.ryDbbms.$error.required ||
174   - myForm.ryStart.$error.required"
175   - ><i class="fa fa-check"></i> 提交</button>
  172 + ng-disabled="!myForm.$valid"><i class="fa fa-check"></i> 提交</button>
176 173 <a type="button" class="btn default" ui-sref="scheduleRuleManage" ><i class="fa fa-times"></i> 取消</a>
177 174 </div>
178 175 </div>
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/list.html
... ... @@ -18,13 +18,15 @@
18 18 <tr role="row" class="filter">
19 19 <td></td>
20 20 <td>
21   - <sa-Select2 model="ctrl.searchCondition()"
22   - type="xl"
23   - modelcolname1="xl.id_eq"
24   - datacolname1="id"
25   - showcolname="name"
26   - placeholder="请输拼音...">
27   - </sa-Select2>
  21 + <sa-Select3 model="ctrl.searchCondition()"
  22 + name="xl"
  23 + placeholder="请输拼音..."
  24 + dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}"
  25 + dcname="xl.id_eq"
  26 + icname="id"
  27 + icnames="name"
  28 + datatype="xl">
  29 + </sa-Select3>
28 30 </td>
29 31 <td></td>
30 32 <td></td>
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js
... ... @@ -135,7 +135,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;ScheduleRuleManageFormCtrl&#39;, [&#39;Schedul
135 135 };
136 136  
137 137 // 欲保存的busInfo信息,绑定
138   - self.scheduleRuleManageForSave = {};
  138 + self.scheduleRuleManageForSave = {xl: {}, carConfigInfo: {}};
139 139  
140 140 // 获取传过来的id,有的话就是修改,获取一遍数据
141 141 var id = $stateParams.id;
... ... @@ -147,10 +147,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;ScheduleRuleManageFormCtrl&#39;, [&#39;Schedul
147 147 for (key in result) {
148 148 self.scheduleRuleManageForSave[key] = result[key];
149 149 }
150   -
151   - // 添加xl_id,cl_id
152   - self.scheduleRuleManageForSave["xl_id"] = self.scheduleRuleManageForSave.xl.id;
153   - self.scheduleRuleManageForSave["cl_id"] = self.scheduleRuleManageForSave.cl.id;
154 150 },
155 151 function(result) {
156 152 alert("出错啦!");
... ... @@ -162,16 +158,6 @@ angular.module(&#39;ScheduleApp&#39;).controller(&#39;ScheduleRuleManageFormCtrl&#39;, [&#39;Schedul
162 158 self.submit = function() {
163 159 console.log(self.scheduleRuleManageForSave);
164 160  
165   - var mf = $scope.myForm;
166   -
167   - // xl_id,cl_id要组织成对象,然后删除
168   - self.scheduleRuleManageForSave["xl"] = {};
169   - self.scheduleRuleManageForSave.xl["id"] = self.scheduleRuleManageForSave["xl_id"];
170   - delete self.scheduleRuleManageForSave["xl_id"];
171   - self.scheduleRuleManageForSave["carConfigInfo"] = {};
172   - self.scheduleRuleManageForSave.carConfigInfo["id"] = self.scheduleRuleManageForSave["cl_id"];
173   - delete self.scheduleRuleManageForSave["cl_id"];
174   -
175 161 scheduleRuleManageService.saveDetail(self.scheduleRuleManageForSave).then(
176 162 function(result) {
177 163 // TODO:弹出框方式以后改
... ...