Commit af8ec3bedc8644f5813e9adab12a163e93cc7f50

Authored by 徐烜
2 parents f44ae6c9 b076e5e2

PSM-12

Showing 27 changed files with 4371 additions and 829 deletions
src/main/java/com/bsth/controller/schedule/GuideboardInfoController.java
@@ -8,8 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -8,8 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.boot.context.properties.EnableConfigurationProperties; 8 import org.springframework.boot.context.properties.EnableConfigurationProperties;
9 import org.springframework.web.bind.annotation.PathVariable; 9 import org.springframework.web.bind.annotation.PathVariable;
10 import org.springframework.web.bind.annotation.RequestMapping; 10 import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
11 import org.springframework.web.bind.annotation.RestController; 12 import org.springframework.web.bind.annotation.RestController;
12 13
  14 +import java.util.List;
  15 +import java.util.Map;
  16 +
13 /** 17 /**
14 * Created by xu on 16/5/11. 18 * Created by xu on 16/5/11.
15 */ 19 */
@@ -31,4 +35,10 @@ public class GuideboardInfoController extends BaseController<GuideboardInfo, Lon @@ -31,4 +35,10 @@ public class GuideboardInfoController extends BaseController<GuideboardInfo, Lon
31 public GuideboardInfo findById(@PathVariable("id") Long aLong) { 35 public GuideboardInfo findById(@PathVariable("id") Long aLong) {
32 return guideboardInfoRepository.findOneExtend(aLong); 36 return guideboardInfoRepository.findOneExtend(aLong);
33 } 37 }
  38 +
  39 +
  40 + @RequestMapping(value = "/ttlpnames", method = RequestMethod.GET)
  41 + public List<Map<String, Object>> findLpName(Long ttid) {
  42 + return guideboardInfoRepository.findLpName(ttid);
  43 + }
34 } 44 }
src/main/java/com/bsth/controller/schedule/RerunController.java 0 → 100644
  1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.entity.schedule.rule.RerunRule;
  5 +import com.bsth.repository.schedule.RerunRuleRepository;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.*;
  8 +
  9 +import java.util.Map;
  10 +
  11 +/**
  12 + * Created by xu on 16/10/20.
  13 + */
  14 +@RestController
  15 +@RequestMapping("rms")
  16 +public class RerunController extends BaseController<RerunRule, Long> {
  17 +
  18 + @Autowired
  19 + private RerunRuleRepository rerunRuleRepository;
  20 +
  21 + @Override
  22 + public RerunRule findById(@PathVariable("id") Long aLong) {
  23 + return super.findById(aLong);
  24 + }
  25 +
  26 + /**
  27 + * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody
  28 + * @Title: save
  29 + * @Description: TODO(持久化对象)
  30 + * @param @param t
  31 + * @param @return 设定文件
  32 + * @return Map<String,Object> {status: 1(成功),-1(失败)}
  33 + * @throws
  34 + */
  35 + @RequestMapping(method = RequestMethod.POST)
  36 + public Map<String, Object> save(@RequestBody RerunRule t){
  37 + return baseService.save(t);
  38 + }
  39 +
  40 +}
src/main/java/com/bsth/controller/schedule/TTInfoDetailController.java
@@ -16,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile; @@ -16,6 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
16 16
17 import java.util.HashMap; 17 import java.util.HashMap;
18 import java.util.Iterator; 18 import java.util.Iterator;
  19 +import java.util.List;
19 import java.util.Map; 20 import java.util.Map;
20 21
21 /** 22 /**
@@ -111,4 +112,9 @@ public class TTInfoDetailController extends BaseController&lt;TTInfoDetail, Long&gt; { @@ -111,4 +112,9 @@ public class TTInfoDetailController extends BaseController&lt;TTInfoDetail, Long&gt; {
111 public TTInfoDetail findById(@PathVariable("id") Long aLong) { 112 public TTInfoDetail findById(@PathVariable("id") Long aLong) {
112 return ttInfoDetailRepository.findOneExtend(aLong); 113 return ttInfoDetailRepository.findOneExtend(aLong);
113 } 114 }
  115 +
  116 + @RequestMapping(value = "/bcdetail", method = RequestMethod.GET)
  117 + public List<TTInfoDetail> findBcdetails(Integer xlId, Long ttinfoId, Long lpId) {
  118 + return ttInfoDetailRepository.findBcdetails(xlId, ttinfoId, lpId);
  119 + }
114 } 120 }
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java 0 → 100644
  1 +package com.bsth.entity.schedule.rule;
  2 +
  3 +import com.bsth.entity.Line;
  4 +import com.bsth.entity.schedule.CarConfigInfo;
  5 +import com.bsth.entity.schedule.EmployeeConfigInfo;
  6 +import com.bsth.entity.schedule.GuideboardInfo;
  7 +import com.bsth.entity.schedule.TTInfo;
  8 +import com.bsth.entity.sys.SysUser;
  9 +
  10 +import javax.persistence.*;
  11 +import java.util.Date;
  12 +
  13 +/**
  14 + * 套跑规则。
  15 + */
  16 +@Entity
  17 +@Table(name = "bsth_c_s_rerun_rule")
  18 +@NamedEntityGraphs({
  19 + @NamedEntityGraph(name = "dylp", attributeNodes = {
  20 + @NamedAttributeNode("rerunXl"),
  21 + @NamedAttributeNode("rerunTtinfo"),
  22 + @NamedAttributeNode("rerunLp"),
  23 + @NamedAttributeNode("useXl"),
  24 + @NamedAttributeNode("useLp"),
  25 + @NamedAttributeNode("useCarConfig"),
  26 + @NamedAttributeNode("useEmployeeConfig")
  27 + })
  28 +})
  29 +public class RerunRule {
  30 + /** 主键Id */
  31 + @Id
  32 + @GeneratedValue
  33 + private Long id;
  34 +
  35 + /** 套跑线路 */
  36 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  37 + private Line rerunXl;
  38 + /** 套跑时刻表 */
  39 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  40 + private TTInfo rerunTtinfo;
  41 + /** 套跑路牌 */
  42 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  43 + private GuideboardInfo rerunLp;
  44 + /** 套跑班次(时刻表明细ids,使用逗号连接) */
  45 + private String rerunTtinfodetailIds;
  46 +
  47 +
  48 + /** 套跑类型(dylp;对应路牌,dybc:对应班车) */
  49 + @Column(nullable = false)
  50 + private String rerunType;
  51 +
  52 + //--------- 对应路牌 ----------/
  53 + /** 使用线路 */
  54 + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  55 + private Line useXl;
  56 + /** 使用路牌 */
  57 + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  58 + private GuideboardInfo useLp;
  59 +
  60 + //--------- 对应班车 ----------/
  61 + /** 车辆配置 */
  62 + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  63 + private CarConfigInfo useCarConfig;
  64 + /** 人员配置 */
  65 + @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  66 + private EmployeeConfigInfo useEmployeeConfig;
  67 +
  68 + /** 创建人 */
  69 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  70 + private SysUser createBy;
  71 + /** 修改人 */
  72 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  73 + private SysUser updateBy;
  74 + /** 创建日期 */
  75 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  76 + private Date createDate;
  77 + /** 修改日期 */
  78 + @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  79 + private Date updateDate;
  80 +
  81 + public Long getId() {
  82 + return id;
  83 + }
  84 +
  85 + public void setId(Long id) {
  86 + this.id = id;
  87 + }
  88 +
  89 + public Line getRerunXl() {
  90 + return rerunXl;
  91 + }
  92 +
  93 + public void setRerunXl(Line rerunXl) {
  94 + this.rerunXl = rerunXl;
  95 + }
  96 +
  97 + public TTInfo getRerunTtinfo() {
  98 + return rerunTtinfo;
  99 + }
  100 +
  101 + public void setRerunTtinfo(TTInfo rerunTtinfo) {
  102 + this.rerunTtinfo = rerunTtinfo;
  103 + }
  104 +
  105 + public GuideboardInfo getRerunLp() {
  106 + return rerunLp;
  107 + }
  108 +
  109 + public void setRerunLp(GuideboardInfo rerunLp) {
  110 + this.rerunLp = rerunLp;
  111 + }
  112 +
  113 + public String getRerunTtinfodetailIds() {
  114 + return rerunTtinfodetailIds;
  115 + }
  116 +
  117 + public void setRerunTtinfodetailIds(String rerunTtinfodetailIds) {
  118 + this.rerunTtinfodetailIds = rerunTtinfodetailIds;
  119 + }
  120 +
  121 + public String getRerunType() {
  122 + return rerunType;
  123 + }
  124 +
  125 + public void setRerunType(String rerunType) {
  126 + this.rerunType = rerunType;
  127 + }
  128 +
  129 + public Line getUseXl() {
  130 + return useXl;
  131 + }
  132 +
  133 + public void setUseXl(Line useXl) {
  134 + this.useXl = useXl;
  135 + }
  136 +
  137 + public GuideboardInfo getUseLp() {
  138 + return useLp;
  139 + }
  140 +
  141 + public void setUseLp(GuideboardInfo useLp) {
  142 + this.useLp = useLp;
  143 + }
  144 +
  145 + public CarConfigInfo getUseCarConfig() {
  146 + return useCarConfig;
  147 + }
  148 +
  149 + public void setUseCarConfig(CarConfigInfo useCarConfig) {
  150 + this.useCarConfig = useCarConfig;
  151 + }
  152 +
  153 + public EmployeeConfigInfo getUseEmployeeConfig() {
  154 + return useEmployeeConfig;
  155 + }
  156 +
  157 + public void setUseEmployeeConfig(EmployeeConfigInfo useEmployeeConfig) {
  158 + this.useEmployeeConfig = useEmployeeConfig;
  159 + }
  160 +
  161 + public SysUser getCreateBy() {
  162 + return createBy;
  163 + }
  164 +
  165 + public void setCreateBy(SysUser createBy) {
  166 + this.createBy = createBy;
  167 + }
  168 +
  169 + public SysUser getUpdateBy() {
  170 + return updateBy;
  171 + }
  172 +
  173 + public void setUpdateBy(SysUser updateBy) {
  174 + this.updateBy = updateBy;
  175 + }
  176 +
  177 + public Date getCreateDate() {
  178 + return createDate;
  179 + }
  180 +
  181 + public void setCreateDate(Date createDate) {
  182 + this.createDate = createDate;
  183 + }
  184 +
  185 + public Date getUpdateDate() {
  186 + return updateDate;
  187 + }
  188 +
  189 + public void setUpdateDate(Date updateDate) {
  190 + this.updateDate = updateDate;
  191 + }
  192 +}
src/main/java/com/bsth/repository/schedule/GuideboardInfoRepository.java
1 package com.bsth.repository.schedule; 1 package com.bsth.repository.schedule;
2 2
3 import java.util.List; 3 import java.util.List;
  4 +import java.util.Map;
4 5
5 import com.bsth.entity.schedule.EmployeeConfigInfo; 6 import com.bsth.entity.schedule.EmployeeConfigInfo;
6 import com.bsth.entity.schedule.GuideboardInfo; 7 import com.bsth.entity.schedule.GuideboardInfo;
@@ -29,4 +30,11 @@ public interface GuideboardInfoRepository extends BaseRepository&lt;GuideboardInfo, @@ -29,4 +30,11 @@ public interface GuideboardInfoRepository extends BaseRepository&lt;GuideboardInfo,
29 30
30 @Query(value = " SELECT g FROM GuideboardInfo g where g.lpName like ?1") 31 @Query(value = " SELECT g FROM GuideboardInfo g where g.lpName like ?1")
31 List<GuideboardInfo> findLpName(String lpName); 32 List<GuideboardInfo> findLpName(String lpName);
  33 +
  34 + @Query(value = "" +
  35 + "select new map(td.lp.id as lpId, td.lp.lpName as lpName) " +
  36 + "from TTInfoDetail td " +
  37 + "where td.ttinfo.id=?1 " +
  38 + "group by td.ttinfo.id, td.lp.id, td.lp.lpName")
  39 + List<Map<String, Object>> findLpName(Long ttid);
32 } 40 }
src/main/java/com/bsth/repository/schedule/RerunRuleRepository.java 0 → 100644
  1 +package com.bsth.repository.schedule;
  2 +
  3 +import com.bsth.entity.schedule.rule.RerunRule;
  4 +import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
  5 +import com.bsth.repository.BaseRepository;
  6 +import org.springframework.data.domain.Page;
  7 +import org.springframework.data.domain.Pageable;
  8 +import org.springframework.data.jpa.domain.Specification;
  9 +import org.springframework.data.jpa.repository.EntityGraph;
  10 +import org.springframework.data.jpa.repository.Query;
  11 +import org.springframework.stereotype.Repository;
  12 +
  13 +/**
  14 + * Created by xu on 16/10/18.
  15 + */
  16 +@Repository
  17 +public interface RerunRuleRepository extends BaseRepository<RerunRule, Long> {
  18 + @EntityGraph(value = "dylp", type = EntityGraph.EntityGraphType.FETCH)
  19 + @Override
  20 + Page<RerunRule> findAll(Specification<RerunRule> spec, Pageable pageable);
  21 +
  22 + @EntityGraph(value = "dylp", type = EntityGraph.EntityGraphType.FETCH)
  23 + @Query("select cc from RerunRule cc where cc.id=?1")
  24 + RerunRule findOneExtend(Long aLong);
  25 +}
src/main/java/com/bsth/repository/schedule/TTInfoDetailRepository.java
@@ -35,4 +35,7 @@ public interface TTInfoDetailRepository extends BaseRepository&lt;TTInfoDetail, Lon @@ -35,4 +35,7 @@ public interface TTInfoDetailRepository extends BaseRepository&lt;TTInfoDetail, Lon
35 @Query(value = "select max(tt.fcno) as mx from bsth_c_s_ttinfo_detail tt where tt.xl =?1 and tt.ttinfo =?2", nativeQuery = true) 35 @Query(value = "select max(tt.fcno) as mx from bsth_c_s_ttinfo_detail tt where tt.xl =?1 and tt.ttinfo =?2", nativeQuery = true)
36 Long findMaxFcno(Integer xlid, Long ttinfoid); 36 Long findMaxFcno(Integer xlid, Long ttinfoid);
37 37
  38 + @Query(value = "select tt from TTInfoDetail tt where tt.xl.id = ?1 and tt.ttinfo.id = ?2 and tt.lp.id = ?3 order by tt.fcno asc")
  39 + List<TTInfoDetail> findBcdetails(Integer xlId, Long ttinfoId, Long lpId);
  40 +
38 } 41 }
src/main/java/com/bsth/service/schedule/RerunService.java 0 → 100644
  1 +package com.bsth.service.schedule;
  2 +
  3 +import com.bsth.entity.schedule.rule.RerunRule;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +/**
  7 + * Created by xu on 16/10/20.
  8 + */
  9 +public interface RerunService extends BaseService<RerunRule, Long> {
  10 +}
src/main/java/com/bsth/service/schedule/RerunServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule;
  2 +
  3 +import com.bsth.entity.schedule.rule.RerunRule;
  4 +import com.bsth.service.impl.BaseServiceImpl;
  5 +import org.springframework.stereotype.Service;
  6 +
  7 +/**
  8 + * Created by xu on 16/10/20.
  9 + */
  10 +@Service
  11 +public class RerunServiceImpl extends BaseServiceImpl<RerunRule, Long> implements RerunService {
  12 +}
src/main/resources/datatools/config-dev.properties
@@ -10,15 +10,15 @@ datatools.kvars_dbuname=root @@ -10,15 +10,15 @@ datatools.kvars_dbuname=root
10 #数据库密码 10 #数据库密码
11 datatools.kvars_dbpwd=123456 11 datatools.kvars_dbpwd=123456
12 #数据库库名 12 #数据库库名
13 -datatools.kvars_dbdname=mh_control 13 +datatools.kvars_dbdname=qp_control
14 14
15 # 3、上传数据配置信息 15 # 3、上传数据配置信息
16 # 上传文件目录配置(根据不同的环境需要修正) 16 # 上传文件目录配置(根据不同的环境需要修正)
17 -datatools.fileupload_dir=/Users/xu/resource/project/bsth_control_u_d_files 17 +datatools.fileupload_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
18 # ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正) 18 # ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
19 -datatools.trans_errordir=/Users/xu/resource/project/bsth_control_u_d_files/erroroutput 19 +datatools.trans_errordir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/erroroutput
20 # 临时输出文件目录 20 # 临时输出文件目录
21 -datatools.trans_tempdir=/Users/xu/resource/project/bsth_control_u_d_files/temp 21 +datatools.trans_tempdir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/temp
22 22
23 ##---------------------------- 导入数据ktr ----------------------------## 23 ##---------------------------- 导入数据ktr ----------------------------##
24 # 测试temp的ktr转换文件 24 # 测试temp的ktr转换文件
src/main/resources/static/pages/scheduleApp/module/common/dts1/select/MyUISelectWrapTemplate2.html 0 → 100644
  1 +<div class="input-group" name="指令compile阶段设定"
  2 + ng-model="$saSelectCtrl.$$internalmodel">
  3 + <ui-select ng-model="$saSelectCtrl.$$internal_select_value" on-select="$saSelectCtrl.$$internal_select_fn($item)"
  4 + theme="bootstrap" >
  5 + <ui-select-match placeholder="指令compile阶段设定">指令compile阶段设定</ui-select-match>
  6 + <ui-select-choices repeat="指令compile阶段设定"
  7 + refresh="$saSelectCtrl.$$internal_refresh_fn($select.search)"
  8 + refresh-delay="10">
  9 + <span ng-bind="指令compile阶段设定"></span>
  10 + </ui-select-choices>
  11 + </ui-select>
  12 + <span class="input-group-btn">
  13 + <button type="button" ng-click="$saSelectCtrl.$$internal_remove_fn()" class="btn btn-default">
  14 + <span class="glyphicon glyphicon-trash"></span>
  15 + </button>
  16 + </span>
  17 +</div>
0 \ No newline at end of file 18 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/dts1/select/legacy.txt 0 → 100644
  1 +/**
  2 + * saSelect4指令,封装angular-ui-select控件,并添加相应的业务。
  3 + * name(必须):控件的名字
  4 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  5 + * placeholder(可选):输入框占位符字符串
  6 + *
  7 + * dcvalue(必须):绑定的model字段值,如:dcvalue={{ctrl.employeeInfoForSave.xl.id}}
  8 + * dcname(必须):绑定的model字段名,如:dcname=xl.id
  9 + * icname(必须):内部与之对应的字段名,如:icname=code
  10 + *
  11 + * cmaps(可选):model其他字段和内部数据字段名映射,如:{{ {'xl.id' : 'id', 'xl.name' : 'name'} | json}}
  12 + * dsparams(必须):内部数据源查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  13 + * dscol(必须):内部显示的信息(暂时用内部字段),如:dscol=name
  14 + * required(可选):是否要用required验证
  15 + */
  16 +angular.module('ScheduleApp').directive('saSelect4', [
  17 + '$timeout',
  18 + '$$SearchInfoService_g',
  19 + function($timeout, $$searchInfoService_g) {
  20 + return {
  21 + restrict: 'E',
  22 + templateUrl: '/pages/scheduleApp/module/common/dts1/select/MyUISelectWrapTemplate2.html',
  23 + scope: {
  24 + model: "=" // 独立作用域,关联外部的模型object
  25 + },
  26 + controllerAs: "$saSelectCtrl",
  27 + bindToController: true,
  28 + controller: function($scope) {
  29 + var self = this;
  30 + self.$$data = []; // ui-select显示用的数据
  31 + self.$$data_real = []; // 内部真实的数据
  32 +
  33 + // saSelect4组件的ng-model,用于外部绑定验证等操作
  34 + self.$$internalmodel = undefined;
  35 +
  36 + self.$$internal_select_value = undefined; // 选中的值
  37 + },
  38 +
  39 + /**
  40 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  41 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  42 + * @param tElem
  43 + * @param tAttrs
  44 + * @returns {{pre: Function, post: Function}}
  45 + */
  46 + compile: function(tElem, tAttrs) {
  47 + // 获取属性
  48 + var $name_attr = tAttrs["name"]; // 控件的名字
  49 + var $placeholder_attr = tAttrs["placeholder"]; // 占位符的名字
  50 +
  51 + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名
  52 + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名
  53 +
  54 + var $cmaps_attr = tAttrs["cmaps"]; // model其他字段和内部数据字段名映射
  55 + var $dscol_attr = tAttrs["dscol"]; // 内部显示的信息
  56 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  57 +
  58 + // controlAs名字
  59 + var ctrlAs = "$saSelectCtrl";
  60 +
  61 + // 验证属性
  62 + if (!$name_attr) {
  63 + throw new error("name属性必须填写");
  64 + }
  65 + if (!$dcname_attr) {
  66 + throw new error("dcname属性必须填写");
  67 + }
  68 + if (!$icname_attr) {
  69 + throw new error("icname属性必须填写");
  70 + }
  71 + if (!$dscol_attr) {
  72 + throw new error("dscol属性必须填写");
  73 + }
  74 +
  75 + // 动态设置dom
  76 + // dom required 属性
  77 + if ($required_attr != undefined) {
  78 + tElem.find("div").attr("required", "");
  79 + }
  80 + // dom placeholder 属性
  81 + tElem.find("ui-select-match").attr("placeholder", $placeholder_attr);
  82 + // dom dscol 属性
  83 + tElem.find("ui-select-match").html("{{$select.selected" + "." + $dscol_attr + "}}");
  84 + tElem.find("ui-select-choices span").attr("ng-bind", "item" + "." + $dscol_attr);
  85 + // dom icname 属性
  86 + tElem.find("ui-select-choices").attr("repeat", "item" + "." + $icname_attr + " as item in $saSelectCtrl.$$data");
  87 + // dom name 属性
  88 + tElem.find("div").attr("name", $name_attr);
  89 +
  90 + return {
  91 + pre: function(scope, element, attr) {
  92 + // TODO:
  93 + },
  94 +
  95 + /**
  96 + * 相当于link函数。
  97 + * @param scope
  98 + * @param element
  99 + * @param attr
  100 + */
  101 + post: function(scope, element, attr) {
  102 +
  103 + // 添加选中事件处理函数
  104 + scope[ctrlAs].$$internal_select_fn = function($item) {
  105 + if ($dcname_attr && $icname_attr) {
  106 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";");
  107 + }
  108 +
  109 + if ($cmaps_attr) {
  110 + for (var mc in $cmaps_attr) { // model的字段名:内部数据源对应字段名
  111 + var ic = $cmaps_attr[mc]; // 内部数据源对应字段
  112 + eval("scope[ctrlAs].model" + "." + mc + " = $item" + "." + ic + ";");
  113 + }
  114 + }
  115 + };
  116 +
  117 + // 删除选中事件处理函数
  118 + scope[ctrlAs].$$internal_remove_fn = function() {
  119 + scope[ctrlAs].$$internal_select_value = undefined;
  120 + if ($dcname_attr) {
  121 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;");
  122 + }
  123 +
  124 + if ($cmaps_attr) {
  125 + var mc; // model的字段名
  126 + for (mc in $cmaps_attr) {
  127 + eval("scope[ctrlAs].model" + "." + mc + " = undefined;");
  128 + }
  129 + }
  130 + scope[ctrlAs].$$internal_validate_model();
  131 + };
  132 +
  133 + // 刷新数据
  134 + scope[ctrlAs].$$internal_refresh_fn = function(search) {
  135 + if (search && search != "") { // 有search值
  136 + // 处理search
  137 + console.log("search:" + search);
  138 +
  139 + scope[ctrlAs].$$data = [];
  140 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  141 + var upTerm = search.toUpperCase();
  142 + if (scope[ctrlAs].$$data.length < 10) {
  143 + if (scope[ctrlAs].$$data_real[k].fullChars.indexOf(upTerm) != -1
  144 + || scope[ctrlAs].$$data_real[k].camelChars.indexOf(upTerm) != -1) {
  145 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  146 + }
  147 + } else {
  148 + break;
  149 + }
  150 + }
  151 + }
  152 + };
  153 +
  154 + /**
  155 + * 验证内部数据,更新外部model
  156 + */
  157 + scope[ctrlAs].$$internal_validate_model = function() {
  158 + if (scope[ctrlAs].$$internal_select_value) {
  159 + var select_value_temp = scope[ctrlAs].$$internal_select_value;
  160 + if (scope[ctrlAs].$$data_real && scope[ctrlAs].$$data_real.length > 0) {
  161 + var obj;
  162 + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) {
  163 + if (eval("scope[ctrlAs].$$data_real[j]" + "." + $icname_attr + " == select_value_temp")) {
  164 + obj = angular.copy(scope[ctrlAs].$$data_real[j]);
  165 + break;
  166 + }
  167 + }
  168 + if (obj) { // 在data中判定有没有
  169 + for (var k = 0; k < scope[ctrlAs].$$data.length; k++) {
  170 + if (eval("scope[ctrlAs].$$data[k]" + "." + $icname_attr + " == obj." + $icname_attr)) {
  171 + obj = undefined;
  172 + break;
  173 + }
  174 + }
  175 + if (obj) {
  176 + scope[ctrlAs].$$data.push(obj);
  177 + }
  178 + // 更新内部model,用于外部验证
  179 + // 内部model的值暂时随意,以后再改
  180 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  181 + } else {
  182 + scope[ctrlAs].$$internalmodel = undefined;
  183 + }
  184 +
  185 + } else {
  186 + scope[ctrlAs].$$internalmodel = undefined;
  187 + }
  188 +
  189 + } else {
  190 + scope[ctrlAs].$$internalmodel = undefined;
  191 + }
  192 + };
  193 +
  194 + /**
  195 + * 内部方法,读取字典数据作为数据源。
  196 + * @param atype ajax查询类型
  197 + * @param ajaxparamobj 查询参数对象
  198 + */
  199 + scope[ctrlAs].$$internal_ajax_data = function(atype, ajaxparamobj) {
  200 + ajaxparamobj.type = 'all';
  201 + $$searchInfoService_g[atype].list(
  202 + ajaxparamobj,
  203 + function(result) {
  204 + console.log("$$internal_ajax_data result");
  205 +
  206 + // 清空内部数据
  207 + scope[ctrlAs].$$data_real = [];
  208 + scope[ctrlAs].$$data = [];
  209 +
  210 + // result中添加拼音数据,注意:这里要求result返回对象数组
  211 + for (var i = 0; i < result.length; i ++) {
  212 + if ($dscol_attr) {
  213 + if (eval("result[i]" + "." + $dscol_attr)) {
  214 + // 全拼
  215 + result[i]["fullChars"] = pinyin.getFullChars(eval("result[i]" + "." + $dscol_attr)).toUpperCase();
  216 + // 简拼
  217 + result[i]["camelChars"] = pinyin.getCamelChars(eval("result[i]" + "." + $dscol_attr));
  218 + }
  219 + }
  220 +
  221 + if (result[i]["fullChars"]) { // 有拼音的加入数据源
  222 + scope[ctrlAs].$$data_real.push(result[i]);
  223 + }
  224 +
  225 + }
  226 +
  227 + // 数据量太大,取10条记录显示
  228 + if (angular.isArray(scope[ctrlAs].$$data_real)) {
  229 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  230 + if (scope[ctrlAs].$$data.length < 10) {
  231 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  232 + } else {
  233 + break;
  234 + }
  235 + }
  236 + }
  237 +
  238 + scope[ctrlAs].$$internal_validate_model();
  239 + },
  240 + function(result) {
  241 +
  242 + }
  243 + );
  244 + };
  245 +
  246 + /**
  247 + * 内部方法,读取字典数据作为数据源。
  248 + * @param dictype 字典类型,如:gsType
  249 + */
  250 + scope[ctrlAs].$$internal_dic_data = function(dictype) {
  251 + if (!dictionaryUtils.getByGroup(dictype)) {
  252 + throw new error("字典数据不窜在=" + dictype);
  253 + }
  254 +
  255 + // 清空内部数据
  256 + scope[ctrlAs].$$data_real = [];
  257 + scope[ctrlAs].$$data = [];
  258 +
  259 + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup);
  260 + var dic_key; // 字典key
  261 +
  262 + for (dic_key in origin_dicgroup) {
  263 + var data = {}; // 重新组合的字典元素对象
  264 + if (dic_key == "true")
  265 + data[$icname_attr] = true;
  266 + else
  267 + data[$icname_attr] = dic_key;
  268 + data[$dscol_attr] = origin_dicgroup[dic_key];
  269 + scope[ctrlAs].$$data_real.push(data);
  270 + }
  271 + // 这里直接将$$data_real数据深拷贝到$$data
  272 + angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data);
  273 + scope[ctrlAs].$$internal_validate_model();
  274 + };
  275 +
  276 + attr.$observe("dsparams", function(value) {
  277 + if (value && value != "") {
  278 + var obj = JSON.parse(value);
  279 + console.log("observe 监控 dsparams=" + obj);
  280 +
  281 + // dsparams格式如下:
  282 + // {type: 'dic/ajax', param: 'dic名字'/'ajax查询参数对象', atype: 'ajax查询类型'}
  283 +
  284 + if (obj.type == 'dic') {
  285 + scope[ctrlAs].$$internal_dic_data(obj.param);
  286 +
  287 + } else if (obj.type == 'ajax') {
  288 + scope[ctrlAs].$$internal_ajax_data(obj.atype, obj.param);
  289 + } else {
  290 + throw new Error("dsparams参数格式异常=" + obj);
  291 + }
  292 +
  293 + }
  294 +
  295 + });
  296 +
  297 + // 监控model绑定的dcvalue值变化
  298 + attr.$observe("dcvalue", function(value) {
  299 + if (value && value != "") {
  300 + console.log("observe 监控 dcvalue=" + value);
  301 + scope[ctrlAs].$$internal_select_value = value;
  302 + scope[ctrlAs].$$internal_validate_model();
  303 + }
  304 + });
  305 + }
  306 + };
  307 +
  308 + }
  309 +
  310 + };
  311 + }
  312 +]);
0 \ No newline at end of file 313 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/dts1/select/saSelect5.js 0 → 100644
  1 +/**
  2 + * saSelect5指令,基于简拼查询的select,内部封装angular-ui-select控件,并嵌入相应的业务逻辑。
  3 + * name(必须):控件的名字
  4 + * model(必须):独立作用域,指定一个外部对象模型双向绑定,如:model=ctrl.employeeInfoForSave
  5 + * cmaps(必须):外部对象与指令内部数据对象字段名映射对象,如:{{ {'xl.id' : 'id', 'xl.name' : 'name'} | json}}
  6 + * dcname(必须):绑定的model字段名,如:dcname=xl.id
  7 + * icname(必须):内部与之对应的字段名,如:icname=id
  8 + *
  9 + * dsparams(必须):内部数据源查询参数对象,如:{{ {'ttid_eq': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  10 + * iterobjname(必须):内部数据源迭代的数据变量名,如:iterobjname=item
  11 + * iterobjexp(必须):内部显示用的表达式
  12 + * searchph(必须):查询输入占位符字符串,如:searchph=请输入...
  13 + * searchexp(必须):查询基于的内部数据源的表达式,如:searchexp=this.name+'('+this.code+')'
  14 + *
  15 + * required(可选):是否需要form的required验证
  16 + *
  17 + */
  18 +angular.module('ScheduleApp').directive('saSelect5', [
  19 + '$timeout',
  20 + '$$SearchInfoService_g',
  21 + function($timeout, $$searchInfoService_g) {
  22 + return {
  23 + restrict: 'E',
  24 + templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html',
  25 + scope: { // 独立作用域
  26 + model: "=" // 绑定外部对象
  27 + },
  28 + controllerAs: "$saSelectCtrl",
  29 + bindToController: true,
  30 + controller: function($scope) {
  31 + var self = this;
  32 + self.$$data = []; // 内部ui-select显示用数据
  33 + self.$$data_real = []; // 内部保存的实际数据
  34 +
  35 + // myselect组件的ng-model,用于外部绑定验证等操作
  36 + self.$$internalmodel = undefined;
  37 +
  38 + self.$$internal_select_value = undefined; // 选中的值
  39 +
  40 + },
  41 +
  42 + /**
  43 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  44 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  45 + * @param tElem
  46 + * @param tAttrs
  47 + * @returns {{pre: Function, post: Function}}
  48 + */
  49 + compile: function(tElem, tAttrs) {
  50 + // 获取属性,并验证必须按属性
  51 + var $name_attr = tAttrs["name"]; // 控件的名字
  52 + var $cmaps_attr = tAttrs["cmaps"]; // 外部对象与指令内部数据对象字段名映射对象
  53 + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名
  54 + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名
  55 +
  56 + var $dsparams_attr = tAttrs["dsparams"]; // 内部数据源查询参数对象
  57 + var $iterobjname_attr = tAttrs["iterobjname"]; // 内部数据源迭代的数据变量名
  58 + var $iterobjexp_attr = tAttrs["iterobjexp"]; // 内部显示用的表达式
  59 + var $searchph_attr = tAttrs["searchph"]; // 查询输入占位符字符串
  60 + var $searchexp_attr = tAttrs["searchexp"]; // 查询基于的内部数据源的表达式
  61 +
  62 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  63 +
  64 + if (!$name_attr) {
  65 + throw new Error("name属性必须填写");
  66 + }
  67 + if (!$cmaps_attr) {
  68 + throw new Error("cmaps属性必须填写")
  69 + }
  70 + if (!$dcname_attr || !$icname_attr) {
  71 + throw new Error("dcname、icname属性必须填写");
  72 + }
  73 + if (!$dsparams_attr) {
  74 + throw new Error("dsparams属性必须填写");
  75 + }
  76 + if (!$iterobjname_attr) {
  77 + throw new Error("iterobjname属性必须填写");
  78 + }
  79 + if (!$iterobjexp_attr) {
  80 + throw new Error("iterobjexp属性必须填写");
  81 + }
  82 + if (!$searchph_attr) {
  83 + throw new Error("searchph属性必须填写");
  84 + }
  85 + if (!$searchexp_attr) {
  86 + throw new Error("searchexp属性必须填写");
  87 + }
  88 +
  89 + // 内部controlAs名字
  90 + var ctrlAs = "$saSelectCtrl";
  91 +
  92 + // 动态设置dom
  93 + // dom,最外层name属性设置
  94 + tElem.find("div:first").attr("name", $name_attr);
  95 + // dom,最外层divrequired属性设置
  96 + if ($required_attr != undefined) {
  97 + tElem.find("div[name=\'" + $name_attr + "\']").attr("required", "");
  98 + }
  99 + // dom,ui-select-match的placeholder属性设定
  100 + tElem.find("ui-select-match").attr("placeholder", $searchph_attr);
  101 + // dom,ui-select-match的内容设定
  102 + var uiSelectMatchHtml = "{{" + ctrlAs + ".$$internal_match_str($select.selected)}}";
  103 + tElem.find("ui-select-match").html(uiSelectMatchHtml);
  104 + // dom,ui-select-choices的repeat属性设定
  105 + var uiSelectChoices_repeatAttr = $iterobjname_attr + "." + $icname_attr + " as " + $iterobjname_attr + " in " + ctrlAs + ".$$data";
  106 + tElem.find("ui-select-choices").attr("repeat", uiSelectChoices_repeatAttr);
  107 + // dom,span ng-bind属性设置,TODO:暂时无法用transclude设置,先用属性设置
  108 + tElem.find("ui-select-choices").html("{{" + $iterobjexp_attr + "}}");
  109 +
  110 + return {
  111 + pre: function (scope, element, attr) {
  112 + // TODO:
  113 + },
  114 +
  115 + /**
  116 + * 相当于link函数。
  117 + * @param scope
  118 + * @param element
  119 + * @param attr
  120 + */
  121 + post: function (scope, element, attr) {
  122 +
  123 + // 添加选中事件处理函数
  124 + scope[ctrlAs].$$internal_select_fn = function($item) {
  125 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";");
  126 +
  127 + for (var mc in $cmaps_attr) { // model的字段名:内部数据源对应字段名
  128 + var ic = $cmaps_attr[mc]; // 内部数据源对应字段
  129 + eval("scope[ctrlAs].model" + "." + mc + " = $item" + "." + ic + ";");
  130 + }
  131 + };
  132 +
  133 + // 删除选中事件处理函数
  134 + scope[ctrlAs].$$internal_remove_fn = function() {
  135 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;");
  136 +
  137 + var mc; // model的字段名
  138 + for (mc in $cmaps_attr) {
  139 + eval("scope[ctrlAs].model" + "." + mc + " = undefined;");
  140 + }
  141 + };
  142 +
  143 + // 刷新数据
  144 + scope[ctrlAs].$$internal_refresh_fn = function(search) {
  145 + if (search && search != "") { // 有search值
  146 + // 处理search
  147 + console.log("search:" + search);
  148 +
  149 + scope[ctrlAs].$$data = [];
  150 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  151 + var upTerm = search.toUpperCase();
  152 + if (scope[ctrlAs].$$data.length < 10) {
  153 + if (scope[ctrlAs].$$data_real[k].$fullChars.indexOf(upTerm) != -1
  154 + || scope[ctrlAs].$$data_real[k].$camelChars.indexOf(upTerm) != -1
  155 + || scope[ctrlAs].$$data_real[k].$calcu_str.indexOf(upTerm) != -1) {
  156 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  157 + }
  158 + } else {
  159 + break;
  160 + }
  161 + }
  162 + }
  163 + };
  164 +
  165 + /**
  166 + * 验证内部数据,更新外部model
  167 + */
  168 + scope[ctrlAs].$$internal_validate_model = function() {
  169 + if (scope[ctrlAs].$$internal_select_value) {
  170 + var select_value_temp = scope[ctrlAs].$$internal_select_value;
  171 + if (scope[ctrlAs].$$data_real && scope[ctrlAs].$$data_real.length > 0) {
  172 + var obj;
  173 + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) {
  174 + if (eval("scope[ctrlAs].$$data_real[j]" + "." + $icname_attr + " == select_value_temp")) {
  175 + obj = angular.copy(scope[ctrlAs].$$data_real[j]);
  176 + break;
  177 + }
  178 + }
  179 + if (obj) { // 在data中判定有没有
  180 + for (var k = 0; k < scope[ctrlAs].$$data.length; k++) {
  181 + if (eval("scope[ctrlAs].$$data[k]" + "." + $icname_attr + " == obj." + $icname_attr)) {
  182 + obj = undefined;
  183 + break;
  184 + }
  185 + }
  186 + if (obj) {
  187 + scope[ctrlAs].$$data.push(obj);
  188 + }
  189 + // 更新内部model,用于外部验证
  190 + // 内部model的值暂时随意,以后再改
  191 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  192 + } else {
  193 + scope[ctrlAs].$$internalmodel = undefined;
  194 + }
  195 +
  196 + } else {
  197 + scope[ctrlAs].$$internalmodel = undefined;
  198 + }
  199 +
  200 + } else {
  201 + scope[ctrlAs].$$internalmodel = undefined;
  202 + }
  203 + };
  204 +
  205 + /**
  206 + * 内部match表达式转换函数,需要外部绑定此函数的上下文。
  207 + * @param context function上下文
  208 + */
  209 + scope[ctrlAs].$$internal_match_str = function (context) {
  210 + var fx = function() {
  211 + return eval($searchexp_attr);
  212 + };
  213 +
  214 + var str = fx.bind(context)();
  215 + if (str && str != "")
  216 + return str;
  217 + else
  218 + return undefined;
  219 + };
  220 +
  221 + /**
  222 + * 内部方法,读取字典数据作为数据源。
  223 + * @param atype ajax查询类型
  224 + * @param ajaxparamobj 查询参数对象
  225 + */
  226 + scope[ctrlAs].$$internal_ajax_data = function(atype, ajaxparamobj) {
  227 + ajaxparamobj.type = 'all';
  228 + $$searchInfoService_g[atype].list(
  229 + ajaxparamobj,
  230 + function(result) {
  231 + console.log("$$internal_ajax_data result");
  232 +
  233 + // 重新创建内部保存的数据
  234 + scope[ctrlAs].$$data = [];
  235 + // result中添加拼音数据,注意:这里要求result返回对象数组
  236 + for (var i = 0; i < result.length; i ++) {
  237 + // 闭包绑定返回最终查询的值
  238 + var calcu_str = scope[ctrlAs].$$internal_match_str(result[i]);
  239 + if (calcu_str) {
  240 + // 全拼
  241 + result[i]["$fullChars"] = pinyin.getFullChars(calcu_str);
  242 + // 简拼
  243 + result[i]["$camelChars"] = pinyin.getCamelChars(calcu_str);
  244 + // 原值
  245 + result[i]["$calcu_str"] = calcu_str;
  246 +
  247 + scope[ctrlAs].$$data_real.push(result[i]);
  248 + }
  249 + }
  250 +
  251 + // 重新创建内部ui-select显示用数据,默认取10条记录显示
  252 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  253 + if (scope[ctrlAs].$$data.length < 10) {
  254 + scope[ctrlAs].$$data.push(scope[ctrlAs].$$data_real[k]);
  255 + } else {
  256 + break;
  257 + }
  258 + }
  259 +
  260 + scope[ctrlAs].$$internal_validate_model();
  261 + },
  262 + function(result) {
  263 + throw new Error("ajax查询出错");
  264 + }
  265 + );
  266 + };
  267 +
  268 + /**
  269 + * 内部方法,读取字典数据作为数据源。
  270 + * @param dictype 字典类型,如:gsType
  271 + */
  272 + scope[ctrlAs].$$internal_dic_data = function(dictype) {
  273 + if (!dictionaryUtils.getByGroup(dictype)) {
  274 + throw new error("字典数据不窜在=" + dictype);
  275 + }
  276 +
  277 + // 重新创建内部保存的数据
  278 + scope[ctrlAs].$$data_real = [];
  279 + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup);
  280 + var dic_key; // 字典key
  281 +
  282 + for (dic_key in origin_dicgroup) {
  283 + var data = {}; // 重新组合的字典元素对象
  284 + if (dic_key == "true")
  285 + data[$icname_attr] = true;
  286 + else
  287 + data[$icname_attr] = dic_key;
  288 + data[$dscol_attr] = origin_dicgroup[dic_key];
  289 + scope[ctrlAs].$$data_real.push(data);
  290 + }
  291 +
  292 + // 重新创建内部ui-select显示用数据,直接复制所有的字典数据
  293 + scope[ctrlAs].$$data = [];
  294 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  295 + scope[ctrlAs].$$data.push(scope[ctrlAs].$$data_real[k]);
  296 + }
  297 +
  298 + scope[ctrlAs].$$internal_validate_model();
  299 + };
  300 +
  301 + /**
  302 + * 监控dsparams属性变化
  303 + */
  304 + attr.$observe("dsparams", function(value) {
  305 + if (value && value != "") {
  306 + var obj = JSON.parse(value);
  307 + console.log("saSelect5 监控到dsparams属性变化,old=" + $dsparams_attr + ",new=" + value);
  308 +
  309 + // dsparams格式如下:
  310 + // {type: 'dic/ajax', param: 'dic名字'/'ajax查询参数对象', atype: 'ajax查询类型'}
  311 +
  312 + if (obj.type == 'dic') {
  313 + scope[ctrlAs].$$internal_dic_data(obj.param);
  314 +
  315 + } else if (obj.type == 'ajax') {
  316 + scope[ctrlAs].$$internal_ajax_data(obj.atype, obj.param);
  317 + } else {
  318 + throw new Error("dsparams参数格式异常=" + obj);
  319 + }
  320 +
  321 + }
  322 + });
  323 +
  324 + /**
  325 + * 监控外部模型dcname的值的变化。
  326 + */
  327 + scope.$watch(
  328 + function() {
  329 + return eval("scope." + ctrlAs + ".model" + "." + $dcname_attr);
  330 + },
  331 + function(newValue, oldValue) {
  332 + if (newValue === undefined && oldValue === undefined) {
  333 + // 两侧都是undefined,不处理
  334 +
  335 + } else {
  336 + console.log("saSelect5 监控到外部模型" + $dcname_attr + "属性值变化,old=" + oldValue + ",new=" + newValue);
  337 + scope[ctrlAs].$$internal_select_value = newValue;
  338 + scope[ctrlAs].$$internal_validate_model();
  339 + }
  340 + },
  341 + true
  342 + );
  343 + }
  344 + };
  345 + }
  346 + };
  347 + }
  348 +]);
0 \ No newline at end of file 349 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html 0 → 100644
  1 +<div class="input-group" name="指令compile阶段设定1"
  2 + ng-model="$saSelectCtrl.$$internalmodel">
  3 + <ui-select ng-model="$saSelectCtrl.$$internal_select_value" on-select="$saSelectCtrl.$$internal_select_fn($item)"
  4 + theme="bootstrap" >
  5 + <ui-select-match placeholder="指令compile阶段设定">指令compile阶段设定2</ui-select-match>
  6 + <ui-select-choices repeat="指令compile阶段设定3"
  7 + refresh="$saSelectCtrl.$$internal_refresh_fn($select.search)"
  8 + refresh-delay="10">
  9 +
  10 + 指令compile阶段设定777
  11 +
  12 + </ui-select-choices>
  13 + </ui-select>
  14 + <span class="input-group-btn">
  15 + <button type="button" ng-click="$saSelectCtrl.$$internal_remove_fn()" class="btn btn-default">
  16 + <span class="glyphicon glyphicon-trash"></span>
  17 + </button>
  18 + </span>
  19 +</div>
0 \ No newline at end of file 20 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/dts1/ttt.txt 0 → 100644
src/main/resources/static/pages/scheduleApp/module/common/dts2/bcGroup/MyBcGroupWrapTemplate.html 0 → 100644
  1 +<div name="{{$saBcgroupCtrl.$name_attr}}"
  2 + ng-model="$saBcgroupCtrl.$$internalmodel">
  3 +
  4 + <style>
  5 + .bc-select {
  6 + min-height: 180px;
  7 + border: 1px solid #ddd;
  8 + }
  9 + .bc-select .bc-input {
  10 + margin: 5px 5px 0px 5px;
  11 + padding-left: 0;
  12 + }
  13 + .bc-select .bc-select-cont {
  14 + text-align: left;
  15 + min-height: 60px;
  16 + padding-right: 0px;
  17 + }
  18 + .bc-select .bc-select-body {
  19 + margin-top: 5px;
  20 + overflow: auto;
  21 + width: auto;
  22 + min-height: 5px;
  23 + }
  24 + .bc-select .bc {
  25 + display: inline-block;
  26 + padding: 8px;
  27 + min-width: 50px;
  28 + text-align: center;
  29 + border: 1px solid #C1C1C1;
  30 + color: #666;
  31 + border-radius: 5px !important;
  32 + margin: 5px;
  33 + }
  34 + .bc-select .bc.active {
  35 + color: white;
  36 + background: #4095E8;
  37 + border: 1px solid #4095E8;
  38 + }
  39 +
  40 +
  41 + </style>
  42 +
  43 + <div class="col-md-12 bc-select">
  44 + <div class="col-md-12 bc-input">
  45 + <div class="col-md-9">
  46 + 班次列表,共{{$saBcgroupCtrl.$$data.length}}个
  47 + </div>
  48 + </div>
  49 + <div class="col-md-12 bc-select-cont">
  50 + <div class="bc-select-body">
  51 + <div class="bc active"
  52 + ng-repeat="$d in $saBcgroupCtrl.$$data track by $index"
  53 + ng-click="$saBcgroupCtrl.$$internal_bclist_click($index)">
  54 + <i class="fa fa-list" aria-hidden="true"></i>
  55 + <span ng-if="$d.bctype == 'out'">
  56 + 出场
  57 + </span>
  58 + <span ng-if="$d.bctype == 'in'">
  59 + 进场
  60 + </span>
  61 + {{"(" + $d.bcfcsj + ")"}}
  62 + </div>
  63 + </div>
  64 + </div>
  65 + <div class="col-md-12 bc-input">
  66 + <div class="col-md-12">
  67 + 已经选中的班次列表,共{{$saBcgroupCtrl.$$dataSelected.length}}个
  68 + </div>
  69 + </div>
  70 + <div class="col-md-12 bc-select-cont">
  71 + <div class="bc-select-body">
  72 + <div ng-class="{bc: true, active: true}"
  73 + ng-repeat="$d in $saBcgroupCtrl.$$dataSelected track by $index"
  74 + ng-click="$saBcgroupCtrl.$$internal_selbclist_click($index)"
  75 + ng-dblclick="$saBcgroupCtrl.$$internal_selbclist_dbclick($index)">
  76 + <i class="fa fa-list" aria-hidden="true"></i>
  77 + <span ng-if="$d.bctype == 'out'">
  78 + 出场
  79 + </span>
  80 + <span ng-if="$d.bctype == 'in'">
  81 + 进场
  82 + </span>
  83 + {{"(" + $d.bcfcsj + ")"}}
  84 + </div>
  85 + </div>
  86 + </div>
  87 + </div>
  88 +
  89 +
  90 +</div>
0 \ No newline at end of file 91 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/dts2/bcGroup/saBcgroup.js 0 → 100644
  1 +/**
  2 + * saBcgroup指令,用于套跑界面中,从指定线路,指定时刻表,指定路牌的班次列表中选择套跑班次。
  3 + * 属性如下:
  4 + * name(必须):控件的名字
  5 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  6 + * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}}
  7 + * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange
  8 + * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  9 + * required(可选):是否要用required验证
  10 + *
  11 + */
  12 +angular.module('ScheduleApp').directive('saBcgroup', [
  13 + 'TimeTableDetailManageService_g',
  14 + function(timeTableDetailManageService_g) {
  15 + return {
  16 + restrict: 'E',
  17 + templateUrl: '/pages/scheduleApp/module/common/dts2/bcGroup/MyBcGroupWrapTemplate.html',
  18 + scope: {
  19 + model: "=" // 独立作用域,关联外部的模型object
  20 + },
  21 + controllerAs: '$saBcgroupCtrl',
  22 + bindToController: true,
  23 + controller: function($scope) {
  24 + var self = this;
  25 + self.$$data = []; // 选择线路,时刻表,路牌后的班次列表
  26 +
  27 + // 测试数据
  28 + //self.$$data = [
  29 + // {bcttinfoid: 1, bcfcsj: '7:30', bctype: 'out'},
  30 + // {bcttinfoid: 2, bcfcsj: '8:30', bctype: 'normal'},
  31 + // {bcttinfoid: 3, bcfcsj: '9:30', bctype: 'in'}
  32 + //];
  33 +
  34 +
  35 + self.$$dataSelected = []; // 套跑选中的班次列表
  36 +
  37 + //self.$$dataSelected = [
  38 + // {bcttinfoid: 1, bcfcsj: '7:30', bctype: 'out'},
  39 + // {bcttinfoid: 2, bcfcsj: '8:30', bctype: 'normal'},
  40 + // {bcttinfoid: 3, bcfcsj: '9:30', bctype: 'in'}
  41 + //];
  42 +
  43 + // saBcgroup组件的ng-model,用于外部绑定等操作
  44 + self.$$internalmodel = undefined;
  45 +
  46 + self.$$data_bcdata_first_init = false; // 班次数据首次初始化标志
  47 + self.$$data_bcttinfoids_first_init = false; // 班次ids数据首次初始化标志
  48 + self.$$data_bcttinfoids_first_data = undefined; // 班次ids数据首次初始化数据
  49 +
  50 + },
  51 +
  52 + /**
  53 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  54 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  55 + * @param tElem
  56 + * @param tAttrs
  57 + * @returns {{pre: Function, post: Function}}
  58 + */
  59 + compile: function(tElem, tAttrs) {
  60 + // TODO:获取所有的属性
  61 + var $name_attr = tAttrs["name"]; // 控件的名字
  62 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  63 + var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名
  64 +
  65 + // controlAs名字
  66 + var ctrlAs = '$saBcgroupCtrl';
  67 +
  68 + // 如果有required属性,添加angularjs required验证
  69 + if ($required_attr != undefined) {
  70 + //console.log(tElem.html());
  71 + tElem.find("div").attr("required", "");
  72 + }
  73 +
  74 + return {
  75 + pre: function(scope, element, attr) {
  76 + // TODO:
  77 + },
  78 +
  79 + /**
  80 + * 相当于link函数。
  81 + * @param scope
  82 + * @param element
  83 + * @param attr
  84 + */
  85 + post: function(scope, element, attr) {
  86 + // name属性
  87 + if ($name_attr) {
  88 + scope[ctrlAs]["$name_attr"] = $name_attr;
  89 + }
  90 +
  91 + // TODO:
  92 +
  93 +
  94 + /**
  95 + * 班次列表点击(班次列表中选中班次)
  96 + * @param $index
  97 + */
  98 + scope[ctrlAs].$$internal_bclist_click = function($index) {
  99 + var data_temp = scope[ctrlAs].$$data;
  100 + var data_temp2 = scope[ctrlAs].$$dataSelected;
  101 + var i = 0;
  102 + var isunique = true; // 是否已经选择过
  103 + if (data_temp && data_temp.length > $index) {
  104 + for (i = 0; i < data_temp2.length; i++) {
  105 + if (data_temp2[i].bcttinfoid == data_temp[$index].bcttinfoid) {
  106 + isunique = false;
  107 + break;
  108 + }
  109 + }
  110 + if (isunique) {
  111 + data_temp2.push({
  112 + bcttinfoid: data_temp[$index].bcttinfoid,
  113 + bcfcsj: data_temp[$index].bcfcsj,
  114 + bctype: data_temp[$index].bctype
  115 + });
  116 + }
  117 +
  118 + }
  119 + };
  120 + /**
  121 + * 选中的班次双击(删除选中的班次)
  122 + * @param $index
  123 + */
  124 + scope[ctrlAs].$$internal_selbclist_dbclick = function($index) {
  125 + var data_temp = scope[ctrlAs].$$dataSelected;
  126 + if (data_temp && data_temp.length > $index) {
  127 + data_temp.splice($index, 1);
  128 + }
  129 + };
  130 +
  131 +
  132 + /**
  133 + * 验证内部数据,更新外部model
  134 + */
  135 + scope[ctrlAs].$$internal_validate_model = function() {
  136 + var data_temp = scope[ctrlAs].$$dataSelected;
  137 + var bcttinfoIds = [];
  138 + var i = 0;
  139 +
  140 + if (data_temp &&
  141 + data_temp.length > 0) {
  142 +
  143 + for (i = 0; i < data_temp.length; i++) {
  144 + bcttinfoIds.push(data_temp[i].bcttinfoid);
  145 + }
  146 +
  147 + // 更新外部model字段
  148 + if ($bcttinfoidsname_attr) {
  149 + console.log("bcttinfoidsname=" + bcttinfoIds.join(','));
  150 + eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');");
  151 + }
  152 +
  153 + // 更新内部model,用于外部验证
  154 + // 内部model的值暂时随意,以后再改
  155 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  156 +
  157 + scope[ctrlAs].$$data_bcdata_first_init = true;
  158 + scope[ctrlAs].$$data_bcttinfoids_first_init = true;
  159 +
  160 + } else {
  161 + scope[ctrlAs].$$internalmodel = undefined;
  162 + }
  163 +
  164 + };
  165 +
  166 + // 监控内部数据,$$data_selected 变化
  167 + scope.$watch(
  168 + function() {
  169 + return scope[ctrlAs].$$dataSelected;
  170 + },
  171 + function(newValue, oldValue) {
  172 + scope[ctrlAs].$$internal_validate_model();
  173 + },
  174 + true
  175 + );
  176 +
  177 + /**
  178 + * 验证数据是否初始化完成,
  179 + * 所谓的初始化就是内部所有的数据被有效设定过一次。
  180 + */
  181 + scope[ctrlAs].$$internal_validate_init = function() {
  182 + var self = scope[ctrlAs];
  183 +
  184 + var data_temp = self.$$data;
  185 + var dataSelect_temp = self.$$dataSelected;
  186 + var bcttinfoids = null;
  187 +
  188 + var i = 0;
  189 + var j = 0;
  190 +
  191 + if (self.$$data_bcdata_first_init &&
  192 + self.$$data_bcttinfoids_first_init) {
  193 + console.log("开始初始化数据");
  194 +
  195 + bcttinfoids = self.$$data_bcttinfoids_first_data ? self.$$data_bcttinfoids_first_data.split(",") : [];
  196 +
  197 + for (i = 0; i < bcttinfoids.length; i++) {
  198 + dataSelect_temp.push({
  199 + bcttinfoid: bcttinfoids[i]
  200 + });
  201 + for (j = 0; j < data_temp.length; j++) {
  202 + if (dataSelect_temp[i].bcttinfoid == data_temp[j].bcttinfoid) {
  203 + dataSelect_temp[i].bcfcsj = data_temp[j].bcfcsj;
  204 + dataSelect_temp[i].bctype = data_temp[j].bctype;
  205 + break;
  206 + }
  207 + }
  208 + }
  209 +
  210 + console.log("数据初始化完毕!");
  211 + }
  212 +
  213 + };
  214 +
  215 + // 监控初始化标志
  216 + scope.$watch(
  217 + function() {
  218 + return scope[ctrlAs].$$data_bcdata_first_init;
  219 + },
  220 + function(newValue, oldValue) {
  221 + scope[ctrlAs].$$internal_validate_init();
  222 + }
  223 + );
  224 + scope.$watch(
  225 + function() {
  226 + return scope[ctrlAs].$$data_bcttinfoids_first_init;
  227 + },
  228 + function(newValue, oldValue) {
  229 + scope[ctrlAs].$$internal_validate_init();
  230 + }
  231 + );
  232 +
  233 + // 监控内部数据的变化
  234 + attr.$observe("dataparams", function(value) {
  235 + if (value && value != "") {
  236 + console.log("observe 监控 dataparams=" + value);
  237 +
  238 + var obj = JSON.parse(value);
  239 + timeTableDetailManageService_g.bcdetails.list(
  240 + obj,
  241 + function(result) {
  242 + // 获取值了
  243 + console.log("内部班次数据获取了");
  244 +
  245 + scope[ctrlAs].$$data = [];
  246 + for (var i = 0; i < result.length; i++) {
  247 + scope[ctrlAs].$$data.push({
  248 + bcttinfoid: result[i].id,
  249 + bcfcsj: result[i].fcsj,
  250 + bctype: result[i].bcType
  251 + });
  252 + }
  253 + if (scope[ctrlAs].$$data_bcdata_first_init &&
  254 + scope[ctrlAs].$$data_bcttinfoids_first_init) {
  255 +
  256 + scope[ctrlAs].$$dataSelected = [];
  257 + scope[ctrlAs].$$internalmodel = undefined;
  258 + }
  259 + scope[ctrlAs].$$data_bcdata_first_init = true;
  260 + },
  261 + function(result) {
  262 +
  263 + }
  264 + );
  265 + }
  266 + });
  267 + // 监控班次ids数据的变化
  268 + attr.$observe("bcttinfoidsvalue", function(value) {
  269 + if (value && value != "") {
  270 + console.log("observe 监控 bcttinfoidsvalue=" + value);
  271 + scope[ctrlAs].$$data_bcttinfoids_first_init = true;
  272 + scope[ctrlAs].$$data_bcttinfoids_first_data = value;
  273 + }
  274 + });
  275 +
  276 + }
  277 + }
  278 +
  279 + }
  280 + }
  281 + }
  282 +]);
0 \ No newline at end of file 283 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
@@ -458,6 +458,26 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun @@ -458,6 +458,26 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun
458 } 458 }
459 } 459 }
460 ), 460 ),
  461 + lpInfo: $resource(
  462 + '/gic/ttlpnames',
  463 + {order: "lpName", direction: 'ASC'},
  464 + {
  465 + list: {
  466 + method: 'GET',
  467 + isArray: true
  468 + }
  469 + }
  470 + ),
  471 + lpInfo2: $resource(
  472 + '/gic/:type',
  473 + {order: "lpName", direction: 'ASC'},
  474 + {
  475 + list: {
  476 + method: 'GET',
  477 + isArray: true
  478 + }
  479 + }
  480 + ),
461 cci: $resource( 481 cci: $resource(
462 '/cci/cars', 482 '/cci/cars',
463 {}, 483 {},
@@ -509,7 +529,17 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun @@ -509,7 +529,17 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;$$SearchInfoService_g&#39;, [&#39;$resource&#39;, fun
509 isArray: true 529 isArray: true
510 } 530 }
511 } 531 }
512 - ) 532 + ),
  533 + eci3: $resource(
  534 + '/eci/:type',
  535 + {},
  536 + {
  537 + list: {
  538 + method: 'GET',
  539 + isArray: true
  540 + }
  541 + }
  542 + ),
513 } 543 }
514 }]); 544 }]);
515 angular.module('ScheduleApp').filter("$$pyFilter", function() { 545 angular.module('ScheduleApp').filter("$$pyFilter", function() {
@@ -872,7 +902,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&quot;saSelect3&quot;, [ @@ -872,7 +902,7 @@ angular.module(&#39;ScheduleApp&#39;).directive(&quot;saSelect3&quot;, [
872 * @param dcvalue 传入的关联数据 902 * @param dcvalue 传入的关联数据
873 */ 903 */
874 scope[ctrlAs].$$internal_other_data = function(result, dcvalue) { 904 scope[ctrlAs].$$internal_other_data = function(result, dcvalue) {
875 - //console.log("start"); 905 + console.log("start=" + dcvalue);
876 // 清空内部数据 906 // 清空内部数据
877 scope[ctrlAs].$$data_real = []; 907 scope[ctrlAs].$$data_real = [];
878 scope[ctrlAs].$$data = []; 908 scope[ctrlAs].$$data = [];
@@ -2431,3 +2461,997 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saEmployeegroup&#39;, [ @@ -2431,3 +2461,997 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saEmployeegroup&#39;, [
2431 } 2461 }
2432 ]); 2462 ]);
2433 2463
  2464 +
  2465 +/**
  2466 + * saBcgroup指令,用于套跑界面中,从指定线路,指定时刻表,指定路牌的班次列表中选择套跑班次。
  2467 + * 属性如下:
  2468 + * name(必须):控件的名字
  2469 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  2470 + * bcttinfoidsvalue(必须):绑定的model班次ids字段值,如:bcttinfoidsvalue={{ctrl.employeeInfoForSave.lprange}}
  2471 + * bcttinfoidsname(必须):bind的model班次ids字段名,如:bcttinfoidsname=lprange
  2472 + * dataparams (必须):内部数据关联的查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  2473 + * required(可选):是否要用required验证
  2474 + *
  2475 + */
  2476 +angular.module('ScheduleApp').directive('saBcgroup', [
  2477 + 'TimeTableDetailManageService_g',
  2478 + function(timeTableDetailManageService_g) {
  2479 + return {
  2480 + restrict: 'E',
  2481 + templateUrl: '/pages/scheduleApp/module/common/dts2/bcGroup/MyBcGroupWrapTemplate.html',
  2482 + scope: {
  2483 + model: "=" // 独立作用域,关联外部的模型object
  2484 + },
  2485 + controllerAs: '$saBcgroupCtrl',
  2486 + bindToController: true,
  2487 + controller: function($scope) {
  2488 + var self = this;
  2489 + self.$$data = []; // 选择线路,时刻表,路牌后的班次列表
  2490 +
  2491 + // 测试数据
  2492 + //self.$$data = [
  2493 + // {bcttinfoid: 1, bcfcsj: '7:30', bctype: 'out'},
  2494 + // {bcttinfoid: 2, bcfcsj: '8:30', bctype: 'normal'},
  2495 + // {bcttinfoid: 3, bcfcsj: '9:30', bctype: 'in'}
  2496 + //];
  2497 +
  2498 +
  2499 + self.$$dataSelected = []; // 套跑选中的班次列表
  2500 +
  2501 + //self.$$dataSelected = [
  2502 + // {bcttinfoid: 1, bcfcsj: '7:30', bctype: 'out'},
  2503 + // {bcttinfoid: 2, bcfcsj: '8:30', bctype: 'normal'},
  2504 + // {bcttinfoid: 3, bcfcsj: '9:30', bctype: 'in'}
  2505 + //];
  2506 +
  2507 + // saBcgroup组件的ng-model,用于外部绑定等操作
  2508 + self.$$internalmodel = undefined;
  2509 +
  2510 + self.$$data_bcdata_first_init = false; // 班次数据首次初始化标志
  2511 + self.$$data_bcttinfoids_first_init = false; // 班次ids数据首次初始化标志
  2512 + self.$$data_bcttinfoids_first_data = undefined; // 班次ids数据首次初始化数据
  2513 +
  2514 + },
  2515 +
  2516 + /**
  2517 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  2518 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  2519 + * @param tElem
  2520 + * @param tAttrs
  2521 + * @returns {{pre: Function, post: Function}}
  2522 + */
  2523 + compile: function(tElem, tAttrs) {
  2524 + // TODO:获取所有的属性
  2525 + var $name_attr = tAttrs["name"]; // 控件的名字
  2526 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  2527 + var $bcttinfoidsname_attr = tAttrs["bcttinfoidsname"]; // bind的model班次ids字段名
  2528 +
  2529 + // controlAs名字
  2530 + var ctrlAs = '$saBcgroupCtrl';
  2531 +
  2532 + // 如果有required属性,添加angularjs required验证
  2533 + if ($required_attr != undefined) {
  2534 + //console.log(tElem.html());
  2535 + tElem.find("div").attr("required", "");
  2536 + }
  2537 +
  2538 + return {
  2539 + pre: function(scope, element, attr) {
  2540 + // TODO:
  2541 + },
  2542 +
  2543 + /**
  2544 + * 相当于link函数。
  2545 + * @param scope
  2546 + * @param element
  2547 + * @param attr
  2548 + */
  2549 + post: function(scope, element, attr) {
  2550 + // name属性
  2551 + if ($name_attr) {
  2552 + scope[ctrlAs]["$name_attr"] = $name_attr;
  2553 + }
  2554 +
  2555 + // TODO:
  2556 +
  2557 +
  2558 + /**
  2559 + * 班次列表点击(班次列表中选中班次)
  2560 + * @param $index
  2561 + */
  2562 + scope[ctrlAs].$$internal_bclist_click = function($index) {
  2563 + var data_temp = scope[ctrlAs].$$data;
  2564 + var data_temp2 = scope[ctrlAs].$$dataSelected;
  2565 + var i = 0;
  2566 + var isunique = true; // 是否已经选择过
  2567 + if (data_temp && data_temp.length > $index) {
  2568 + for (i = 0; i < data_temp2.length; i++) {
  2569 + if (data_temp2[i].bcttinfoid == data_temp[$index].bcttinfoid) {
  2570 + isunique = false;
  2571 + break;
  2572 + }
  2573 + }
  2574 + if (isunique) {
  2575 + data_temp2.push({
  2576 + bcttinfoid: data_temp[$index].bcttinfoid,
  2577 + bcfcsj: data_temp[$index].bcfcsj,
  2578 + bctype: data_temp[$index].bctype
  2579 + });
  2580 + }
  2581 +
  2582 + }
  2583 + };
  2584 + /**
  2585 + * 选中的班次双击(删除选中的班次)
  2586 + * @param $index
  2587 + */
  2588 + scope[ctrlAs].$$internal_selbclist_dbclick = function($index) {
  2589 + var data_temp = scope[ctrlAs].$$dataSelected;
  2590 + if (data_temp && data_temp.length > $index) {
  2591 + data_temp.splice($index, 1);
  2592 + }
  2593 + };
  2594 +
  2595 +
  2596 + /**
  2597 + * 验证内部数据,更新外部model
  2598 + */
  2599 + scope[ctrlAs].$$internal_validate_model = function() {
  2600 + var data_temp = scope[ctrlAs].$$dataSelected;
  2601 + var bcttinfoIds = [];
  2602 + var i = 0;
  2603 +
  2604 + if (data_temp &&
  2605 + data_temp.length > 0) {
  2606 +
  2607 + for (i = 0; i < data_temp.length; i++) {
  2608 + bcttinfoIds.push(data_temp[i].bcttinfoid);
  2609 + }
  2610 +
  2611 + // 更新外部model字段
  2612 + if ($bcttinfoidsname_attr) {
  2613 + console.log("bcttinfoidsname=" + bcttinfoIds.join(','));
  2614 + eval("scope[ctrlAs].model" + "." + $bcttinfoidsname_attr + " = bcttinfoIds.join(',');");
  2615 + }
  2616 +
  2617 + // 更新内部model,用于外部验证
  2618 + // 内部model的值暂时随意,以后再改
  2619 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  2620 +
  2621 + scope[ctrlAs].$$data_bcdata_first_init = true;
  2622 + scope[ctrlAs].$$data_bcttinfoids_first_init = true;
  2623 +
  2624 + } else {
  2625 + scope[ctrlAs].$$internalmodel = undefined;
  2626 + }
  2627 +
  2628 + };
  2629 +
  2630 + // 监控内部数据,$$data_selected 变化
  2631 + scope.$watch(
  2632 + function() {
  2633 + console.log("长度:" + scope[ctrlAs].$$dataSelected.length);
  2634 + return scope[ctrlAs].$$dataSelected;
  2635 + },
  2636 + function(newValue, oldValue) {
  2637 + scope[ctrlAs].$$internal_validate_model();
  2638 + },
  2639 + true
  2640 + );
  2641 +
  2642 + /**
  2643 + * 验证数据是否初始化完成,
  2644 + * 所谓的初始化就是内部所有的数据被有效设定过一次。
  2645 + */
  2646 + scope[ctrlAs].$$internal_validate_init = function() {
  2647 + var self = scope[ctrlAs];
  2648 +
  2649 + var data_temp = self.$$data;
  2650 + var dataSelect_temp = self.$$dataSelected;
  2651 + var bcttinfoids = null;
  2652 +
  2653 + var i = 0;
  2654 + var j = 0;
  2655 +
  2656 + if (self.$$data_bcdata_first_init &&
  2657 + self.$$data_bcttinfoids_first_init) {
  2658 + console.log("开始初始化数据");
  2659 +
  2660 + bcttinfoids = self.$$data_bcttinfoids_first_data ? self.$$data_bcttinfoids_first_data.split(",") : [];
  2661 +
  2662 + for (i = 0; i < bcttinfoids.length; i++) {
  2663 + dataSelect_temp.push({
  2664 + bcttinfoid: bcttinfoids[i]
  2665 + });
  2666 + for (j = 0; j < data_temp.length; j++) {
  2667 + if (dataSelect_temp[i].bcttinfoid == data_temp[j].bcttinfoid) {
  2668 + dataSelect_temp[i].bcfcsj = data_temp[j].bcfcsj;
  2669 + dataSelect_temp[i].bctype = data_temp[j].bctype;
  2670 + break;
  2671 + }
  2672 + }
  2673 + }
  2674 +
  2675 + console.log("数据初始化完毕!");
  2676 + }
  2677 +
  2678 + };
  2679 +
  2680 + // 监控初始化标志
  2681 + scope.$watch(
  2682 + function() {
  2683 + return scope[ctrlAs].$$data_bcdata_first_init;
  2684 + },
  2685 + function(newValue, oldValue) {
  2686 + scope[ctrlAs].$$internal_validate_init();
  2687 + }
  2688 + );
  2689 + scope.$watch(
  2690 + function() {
  2691 + return scope[ctrlAs].$$data_bcttinfoids_first_init;
  2692 + },
  2693 + function(newValue, oldValue) {
  2694 + scope[ctrlAs].$$internal_validate_init();
  2695 + }
  2696 + );
  2697 +
  2698 + // 监控内部数据的变化
  2699 + attr.$observe("dataparams", function(value) {
  2700 + if (value && value != "") {
  2701 + if (value == '{}') {
  2702 + return;
  2703 + }
  2704 +
  2705 + console.log("bcgroup observe 监控 dataparams=" + value);
  2706 +
  2707 + timeTableDetailManageService_g.bcdetails.list(
  2708 + JSON.parse(value),
  2709 + function(result) {
  2710 + // 获取值了
  2711 + console.log("内部班次数据获取了");
  2712 +
  2713 + scope[ctrlAs].$$data = [];
  2714 + for (var i = 0; i < result.length; i++) {
  2715 + scope[ctrlAs].$$data.push({
  2716 + bcttinfoid: result[i].id,
  2717 + bcfcsj: result[i].fcsj,
  2718 + bctype: result[i].bcType
  2719 + });
  2720 + }
  2721 + if (scope[ctrlAs].$$data_bcdata_first_init &&
  2722 + scope[ctrlAs].$$data_bcttinfoids_first_init) {
  2723 +
  2724 + scope[ctrlAs].$$dataSelected = [];
  2725 + scope[ctrlAs].$$internalmodel = undefined;
  2726 + }
  2727 + scope[ctrlAs].$$data_bcdata_first_init = true;
  2728 + },
  2729 + function(result) {
  2730 +
  2731 + }
  2732 + );
  2733 + }
  2734 + });
  2735 + // 监控班次ids数据的变化
  2736 + attr.$observe("bcttinfoidsvalue", function(value) {
  2737 + if (value && value != "") {
  2738 + console.log("observe 监控 bcttinfoidsvalue=" + value);
  2739 + scope[ctrlAs].$$data_bcttinfoids_first_init = true;
  2740 + scope[ctrlAs].$$data_bcttinfoids_first_data = value;
  2741 + }
  2742 + });
  2743 +
  2744 + }
  2745 + }
  2746 +
  2747 + }
  2748 + }
  2749 + }
  2750 +]);
  2751 +
  2752 +/**
  2753 + * saSelect4指令,封装angular-ui-select控件,并添加相应的业务。
  2754 + * name(必须):控件的名字
  2755 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  2756 + * placeholder(可选):输入框占位符字符串
  2757 + *
  2758 + * dcvalue(必须):绑定的model字段值,如:dcvalue={{ctrl.employeeInfoForSave.xl.id}}
  2759 + * dcname(必须):绑定的model字段名,如:dcname=xl.id
  2760 + * icname(必须):内部与之对应的字段名,如:icname=code
  2761 + *
  2762 + * cmaps(可选):model其他字段和内部数据字段名映射,如:{{ {'xl.id' : 'id', 'xl.name' : 'name'} | json}}
  2763 + * dsparams(必须):内部数据源查询参数,如:{{ {'ttid': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  2764 + * dscol(必须):内部显示的信息(暂时用内部字段),如:dscol=name
  2765 + * required(可选):是否要用required验证
  2766 + */
  2767 +angular.module('ScheduleApp').directive('saSelect4', [
  2768 + '$timeout',
  2769 + '$$SearchInfoService_g',
  2770 + function($timeout, $$searchInfoService_g) {
  2771 + return {
  2772 + restrict: 'E',
  2773 + templateUrl: '/pages/scheduleApp/module/common/dts1/select/MyUISelectWrapTemplate2.html',
  2774 + scope: {
  2775 + model: "=" // 独立作用域,关联外部的模型object
  2776 + },
  2777 + controllerAs: "$saSelectCtrl",
  2778 + bindToController: true,
  2779 + controller: function($scope) {
  2780 + var self = this;
  2781 + self.$$data = []; // ui-select显示用的数据
  2782 + self.$$data_real = []; // 内部真实的数据
  2783 +
  2784 + // saSelect4组件的ng-model,用于外部绑定验证等操作
  2785 + self.$$internalmodel = undefined;
  2786 +
  2787 + self.$$internal_select_value = undefined; // 选中的值
  2788 + },
  2789 +
  2790 + /**
  2791 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  2792 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  2793 + * @param tElem
  2794 + * @param tAttrs
  2795 + * @returns {{pre: Function, post: Function}}
  2796 + */
  2797 + compile: function(tElem, tAttrs) {
  2798 + // 获取属性
  2799 + var $name_attr = tAttrs["name"]; // 控件的名字
  2800 + var $placeholder_attr = tAttrs["placeholder"]; // 占位符的名字
  2801 +
  2802 + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名
  2803 + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名
  2804 +
  2805 + var $cmaps_attr = tAttrs["cmaps"]; // model其他字段和内部数据字段名映射
  2806 + var $dscol_attr = tAttrs["dscol"]; // 内部显示的信息
  2807 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  2808 +
  2809 + // controlAs名字
  2810 + var ctrlAs = "$saSelectCtrl";
  2811 +
  2812 + // 验证属性
  2813 + if (!$name_attr) {
  2814 + throw new error("name属性必须填写");
  2815 + }
  2816 + if (!$dcname_attr) {
  2817 + throw new error("dcname属性必须填写");
  2818 + }
  2819 + if (!$icname_attr) {
  2820 + throw new error("icname属性必须填写");
  2821 + }
  2822 + if (!$dscol_attr) {
  2823 + throw new error("dscol属性必须填写");
  2824 + }
  2825 +
  2826 + // 动态设置dom
  2827 + // dom required 属性
  2828 + if ($required_attr != undefined) {
  2829 + tElem.find("div").attr("required", "");
  2830 + }
  2831 + // dom placeholder 属性
  2832 + tElem.find("ui-select-match").attr("placeholder", $placeholder_attr);
  2833 + // dom dscol 属性
  2834 + tElem.find("ui-select-match").html("{{$select.selected" + "." + $dscol_attr + "}}");
  2835 + tElem.find("ui-select-choices span").attr("ng-bind", "item" + "." + $dscol_attr);
  2836 + // dom icname 属性
  2837 + tElem.find("ui-select-choices").attr("repeat", "item" + "." + $icname_attr + " as item in $saSelectCtrl.$$data");
  2838 + // dom name 属性
  2839 + tElem.find("div").attr("name", $name_attr);
  2840 +
  2841 + return {
  2842 + pre: function(scope, element, attr) {
  2843 + // TODO:
  2844 + },
  2845 +
  2846 + /**
  2847 + * 相当于link函数。
  2848 + * @param scope
  2849 + * @param element
  2850 + * @param attr
  2851 + */
  2852 + post: function(scope, element, attr) {
  2853 +
  2854 + // 添加选中事件处理函数
  2855 + scope[ctrlAs].$$internal_select_fn = function($item) {
  2856 + if ($dcname_attr && $icname_attr) {
  2857 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";");
  2858 + }
  2859 +
  2860 + if ($cmaps_attr) {
  2861 + for (var mc in $cmaps_attr) { // model的字段名:内部数据源对应字段名
  2862 + var ic = $cmaps_attr[mc]; // 内部数据源对应字段
  2863 + eval("scope[ctrlAs].model" + "." + mc + " = $item" + "." + ic + ";");
  2864 + }
  2865 + }
  2866 + };
  2867 +
  2868 + // 删除选中事件处理函数
  2869 + scope[ctrlAs].$$internal_remove_fn = function() {
  2870 + scope[ctrlAs].$$internal_select_value = undefined;
  2871 + if ($dcname_attr) {
  2872 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;");
  2873 + }
  2874 +
  2875 + if ($cmaps_attr) {
  2876 + var mc; // model的字段名
  2877 + for (mc in $cmaps_attr) {
  2878 + eval("scope[ctrlAs].model" + "." + mc + " = undefined;");
  2879 + }
  2880 + }
  2881 + scope[ctrlAs].$$internal_validate_model();
  2882 + };
  2883 +
  2884 + // 刷新数据
  2885 + scope[ctrlAs].$$internal_refresh_fn = function(search) {
  2886 + if (search && search != "") { // 有search值
  2887 + // 处理search
  2888 + console.log("search:" + search);
  2889 +
  2890 + scope[ctrlAs].$$data = [];
  2891 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  2892 + var upTerm = search.toUpperCase();
  2893 + if (scope[ctrlAs].$$data.length < 10) {
  2894 + if (scope[ctrlAs].$$data_real[k].fullChars.indexOf(upTerm) != -1
  2895 + || scope[ctrlAs].$$data_real[k].camelChars.indexOf(upTerm) != -1) {
  2896 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  2897 + }
  2898 + } else {
  2899 + break;
  2900 + }
  2901 + }
  2902 + }
  2903 + };
  2904 +
  2905 + /**
  2906 + * 验证内部数据,更新外部model
  2907 + */
  2908 + scope[ctrlAs].$$internal_validate_model = function() {
  2909 + if (scope[ctrlAs].$$internal_select_value) {
  2910 + var select_value_temp = scope[ctrlAs].$$internal_select_value;
  2911 + if (scope[ctrlAs].$$data_real && scope[ctrlAs].$$data_real.length > 0) {
  2912 + var obj;
  2913 + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) {
  2914 + if (eval("scope[ctrlAs].$$data_real[j]" + "." + $icname_attr + " == select_value_temp")) {
  2915 + obj = angular.copy(scope[ctrlAs].$$data_real[j]);
  2916 + break;
  2917 + }
  2918 + }
  2919 + if (obj) { // 在data中判定有没有
  2920 + for (var k = 0; k < scope[ctrlAs].$$data.length; k++) {
  2921 + if (eval("scope[ctrlAs].$$data[k]" + "." + $icname_attr + " == obj." + $icname_attr)) {
  2922 + obj = undefined;
  2923 + break;
  2924 + }
  2925 + }
  2926 + if (obj) {
  2927 + scope[ctrlAs].$$data.push(obj);
  2928 + }
  2929 + // 更新内部model,用于外部验证
  2930 + // 内部model的值暂时随意,以后再改
  2931 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  2932 + } else {
  2933 + scope[ctrlAs].$$internalmodel = undefined;
  2934 + }
  2935 +
  2936 + } else {
  2937 + scope[ctrlAs].$$internalmodel = undefined;
  2938 + }
  2939 +
  2940 + } else {
  2941 + scope[ctrlAs].$$internalmodel = undefined;
  2942 + }
  2943 + };
  2944 +
  2945 + /**
  2946 + * 内部方法,读取字典数据作为数据源。
  2947 + * @param atype ajax查询类型
  2948 + * @param ajaxparamobj 查询参数对象
  2949 + */
  2950 + scope[ctrlAs].$$internal_ajax_data = function(atype, ajaxparamobj) {
  2951 + ajaxparamobj.type = 'all';
  2952 + $$searchInfoService_g[atype].list(
  2953 + ajaxparamobj,
  2954 + function(result) {
  2955 + console.log("$$internal_ajax_data result");
  2956 +
  2957 + // 清空内部数据
  2958 + scope[ctrlAs].$$data_real = [];
  2959 + scope[ctrlAs].$$data = [];
  2960 +
  2961 + // result中添加拼音数据,注意:这里要求result返回对象数组
  2962 + for (var i = 0; i < result.length; i ++) {
  2963 + if ($dscol_attr) {
  2964 + if (eval("result[i]" + "." + $dscol_attr)) {
  2965 + // 全拼
  2966 + result[i]["fullChars"] = pinyin.getFullChars(eval("result[i]" + "." + $dscol_attr)).toUpperCase();
  2967 + // 简拼
  2968 + result[i]["camelChars"] = pinyin.getCamelChars(eval("result[i]" + "." + $dscol_attr));
  2969 + }
  2970 + }
  2971 +
  2972 + if (result[i]["fullChars"]) { // 有拼音的加入数据源
  2973 + scope[ctrlAs].$$data_real.push(result[i]);
  2974 + }
  2975 +
  2976 + }
  2977 +
  2978 + // 数据量太大,取10条记录显示
  2979 + if (angular.isArray(scope[ctrlAs].$$data_real)) {
  2980 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  2981 + if (scope[ctrlAs].$$data.length < 10) {
  2982 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  2983 + } else {
  2984 + break;
  2985 + }
  2986 + }
  2987 + }
  2988 +
  2989 + scope[ctrlAs].$$internal_validate_model();
  2990 + },
  2991 + function(result) {
  2992 +
  2993 + }
  2994 + );
  2995 + };
  2996 +
  2997 + /**
  2998 + * 内部方法,读取字典数据作为数据源。
  2999 + * @param dictype 字典类型,如:gsType
  3000 + */
  3001 + scope[ctrlAs].$$internal_dic_data = function(dictype) {
  3002 + if (!dictionaryUtils.getByGroup(dictype)) {
  3003 + throw new error("字典数据不窜在=" + dictype);
  3004 + }
  3005 +
  3006 + // 清空内部数据
  3007 + scope[ctrlAs].$$data_real = [];
  3008 + scope[ctrlAs].$$data = [];
  3009 +
  3010 + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup);
  3011 + var dic_key; // 字典key
  3012 +
  3013 + for (dic_key in origin_dicgroup) {
  3014 + var data = {}; // 重新组合的字典元素对象
  3015 + if (dic_key == "true")
  3016 + data[$icname_attr] = true;
  3017 + else
  3018 + data[$icname_attr] = dic_key;
  3019 + data[$dscol_attr] = origin_dicgroup[dic_key];
  3020 + scope[ctrlAs].$$data_real.push(data);
  3021 + }
  3022 + // 这里直接将$$data_real数据深拷贝到$$data
  3023 + angular.copy(scope[ctrlAs].$$data_real, scope[ctrlAs].$$data);
  3024 + scope[ctrlAs].$$internal_validate_model();
  3025 + };
  3026 +
  3027 + attr.$observe("dsparams", function(value) {
  3028 + if (value && value != "") {
  3029 + var obj = JSON.parse(value);
  3030 + console.log("observe 监控 dsparams=" + obj);
  3031 +
  3032 + // dsparams格式如下:
  3033 + // {type: 'dic/ajax', param: 'dic名字'/'ajax查询参数对象', atype: 'ajax查询类型'}
  3034 +
  3035 + if (obj.type == 'dic') {
  3036 + scope[ctrlAs].$$internal_dic_data(obj.param);
  3037 +
  3038 + } else if (obj.type == 'ajax') {
  3039 + scope[ctrlAs].$$internal_ajax_data(obj.atype, obj.param);
  3040 + } else {
  3041 + throw new Error("dsparams参数格式异常=" + obj);
  3042 + }
  3043 +
  3044 + }
  3045 +
  3046 + });
  3047 +
  3048 + // 监控model绑定的dcvalue值变化
  3049 + attr.$observe("dcvalue", function(value) {
  3050 + if (value && value != "") {
  3051 + console.log("observe 监控 dcvalue=" + value);
  3052 + scope[ctrlAs].$$internal_select_value = value;
  3053 + scope[ctrlAs].$$internal_validate_model();
  3054 + }
  3055 +
  3056 + // 闭包测试
  3057 + var obj = {'a':1,'b':2};
  3058 + var tfx = scope[ctrlAs].$$test.bind(obj);
  3059 + console.log("闭包测试=" + tfx());
  3060 + });
  3061 +
  3062 + scope[ctrlAs].$$test = function() {
  3063 + var exp = "this.a + '(' + this.b + ')'";
  3064 + console.log("exp=" + exp);
  3065 + return eval(exp);
  3066 + };
  3067 + }
  3068 + };
  3069 +
  3070 + }
  3071 +
  3072 + };
  3073 + }
  3074 +]);
  3075 +
  3076 +/**
  3077 + * saSelect5指令,基于简拼查询的select,内部封装angular-ui-select控件,并嵌入相应的业务逻辑。
  3078 + * name(必须):控件的名字
  3079 + * model(必须):独立作用域,指定一个外部对象模型双向绑定,如:model=ctrl.employeeInfoForSave
  3080 + * cmaps(必须):外部对象与指令内部数据对象字段名映射对象字符串,如:{'xl.id' : 'id', 'xl.name' : 'name'}
  3081 + * dcname(必须):绑定的model字段名,如:dcname=xl.id
  3082 + * icname(必须):内部与之对应的字段名,如:icname=id
  3083 + *
  3084 + * dsparams(必须):内部数据源查询参数对象,如:{{ {'ttid_eq': ctrl.rerunManageForSave.rerunTtinfo.id} | json }}
  3085 + * dsparamsextra(可选):内部数据源查询附加参数对象字符串,如:{'type':'all'}
  3086 + * iterobjname(必须):内部数据源迭代的数据变量名,如:iterobjname=item
  3087 + * iterobjexp(必须):内部显示用的表达式
  3088 + * searchph(必须):查询输入占位符字符串,如:searchph=请输入...
  3089 + * searchexp(必须):查询基于的内部数据源的表达式,如:searchexp=this.name+'('+this.code+')'
  3090 + *
  3091 + * required(可选):是否需要form的required验证
  3092 + *
  3093 + */
  3094 +angular.module('ScheduleApp').directive('saSelect5', [
  3095 + '$timeout',
  3096 + '$$SearchInfoService_g',
  3097 + function($timeout, $$searchInfoService_g) {
  3098 + return {
  3099 + restrict: 'E',
  3100 + templateUrl: '/pages/scheduleApp/module/common/dts1/select/saSelect5Template.html',
  3101 + scope: { // 独立作用域
  3102 + model: "=" // 绑定外部对象
  3103 + },
  3104 + controllerAs: "$saSelectCtrl",
  3105 + bindToController: true,
  3106 + controller: function($scope) {
  3107 + var self = this;
  3108 + self.$$data = []; // 内部ui-select显示用数据
  3109 + self.$$data_real = []; // 内部保存的实际数据
  3110 +
  3111 + // myselect组件的ng-model,用于外部绑定验证等操作
  3112 + self.$$internalmodel = undefined;
  3113 +
  3114 + self.$$internal_select_value = undefined; // 选中的值
  3115 +
  3116 + },
  3117 +
  3118 + /**
  3119 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  3120 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  3121 + * @param tElem
  3122 + * @param tAttrs
  3123 + * @returns {{pre: Function, post: Function}}
  3124 + */
  3125 + compile: function(tElem, tAttrs) {
  3126 + // 获取属性,并验证必须按属性
  3127 + var $name_attr = tAttrs["name"]; // 控件的名字
  3128 + var $cmaps_attr = tAttrs["cmaps"]; // 外部对象与指令内部数据对象字段名映射对象
  3129 + var $dcname_attr = tAttrs["dcname"]; // 绑定的model字段名
  3130 + var $icname_attr = tAttrs["icname"]; // 内部与之对应的字段名
  3131 +
  3132 + var $dsparams_attr = tAttrs["dsparams"]; // 内部数据源查询参数对象
  3133 + var $dsparamsextra_attr = tAttrs["dsparamsextra"]; // 内部数据源查询附加参数对象字符串
  3134 + var $iterobjname_attr = tAttrs["iterobjname"]; // 内部数据源迭代的数据变量名
  3135 + var $iterobjexp_attr = tAttrs["iterobjexp"]; // 内部显示用的表达式
  3136 + var $searchph_attr = tAttrs["searchph"]; // 查询输入占位符字符串
  3137 + var $searchexp_attr = tAttrs["searchexp"]; // 查询基于的内部数据源的表达式
  3138 +
  3139 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  3140 +
  3141 + if (!$name_attr) {
  3142 + throw new Error("name属性必须填写");
  3143 + }
  3144 + if (!$cmaps_attr) {
  3145 + throw new Error("cmaps属性必须填写")
  3146 + }
  3147 + if (!$dcname_attr || !$icname_attr) {
  3148 + throw new Error("dcname、icname属性必须填写");
  3149 + }
  3150 + if (!$dsparams_attr) {
  3151 + throw new Error("dsparams属性必须填写");
  3152 + }
  3153 + if (!$iterobjname_attr) {
  3154 + throw new Error("iterobjname属性必须填写");
  3155 + }
  3156 + if (!$iterobjexp_attr) {
  3157 + throw new Error("iterobjexp属性必须填写");
  3158 + }
  3159 + if (!$searchph_attr) {
  3160 + throw new Error("searchph属性必须填写");
  3161 + }
  3162 + if (!$searchexp_attr) {
  3163 + throw new Error("searchexp属性必须填写");
  3164 + }
  3165 +
  3166 + // 内部controlAs名字
  3167 + var ctrlAs = "$saSelectCtrl";
  3168 +
  3169 + // 动态设置dom
  3170 + // dom,最外层name属性设置
  3171 + tElem.find("div:first").attr("name", $name_attr);
  3172 + // dom,最外层divrequired属性设置
  3173 + if ($required_attr != undefined) {
  3174 + tElem.find("div[name=\'" + $name_attr + "\']").attr("required", "");
  3175 + }
  3176 + // dom,ui-select-match的placeholder属性设定
  3177 + tElem.find("ui-select-match").attr("placeholder", $searchph_attr);
  3178 + // dom,ui-select-match的内容设定
  3179 + var uiSelectMatchHtml = "{{" + ctrlAs + ".$$internal_match_str($select.selected)}}";
  3180 + tElem.find("ui-select-match").html(uiSelectMatchHtml);
  3181 + // dom,ui-select-choices的repeat属性设定
  3182 + var uiSelectChoices_repeatAttr = $iterobjname_attr + "." + $icname_attr + " as " + $iterobjname_attr + " in " + ctrlAs + ".$$data";
  3183 + tElem.find("ui-select-choices").attr("repeat", uiSelectChoices_repeatAttr);
  3184 + // dom,span ng-bind属性设置,TODO:暂时无法用transclude设置,先用属性设置
  3185 + tElem.find("ui-select-choices").html("{{" + $iterobjexp_attr + "}}");
  3186 +
  3187 + return {
  3188 + pre: function (scope, element, attr) {
  3189 + // TODO:
  3190 + },
  3191 +
  3192 + /**
  3193 + * 相当于link函数。
  3194 + * @param scope
  3195 + * @param element
  3196 + * @param attr
  3197 + */
  3198 + post: function (scope, element, attr) {
  3199 +
  3200 + // 添加选中事件处理函数
  3201 + scope[ctrlAs].$$internal_select_fn = function($item) {
  3202 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = $item" + "." + $icname_attr + ";");
  3203 +
  3204 + eval("var obj=" + $cmaps_attr);
  3205 + for (var mc in obj) { // model的字段名:内部数据源对应字段名
  3206 + var ic = obj[mc]; // 内部数据源对应字段
  3207 + eval("scope[ctrlAs].model" + "." + mc + " = $item" + "." + ic + ";");
  3208 + }
  3209 + };
  3210 +
  3211 + // 删除选中事件处理函数
  3212 + scope[ctrlAs].$$internal_remove_fn = function() {
  3213 + eval("scope[ctrlAs].model" + "." + $dcname_attr + " = undefined;");
  3214 +
  3215 + eval("var obj=" + $cmaps_attr);
  3216 + var mc; // model的字段名
  3217 + for (mc in obj) {
  3218 + eval("scope[ctrlAs].model" + "." + mc + " = undefined;");
  3219 + }
  3220 + };
  3221 +
  3222 + // 刷新数据
  3223 + scope[ctrlAs].$$internal_refresh_fn = function(search) {
  3224 + if (search && search != "") { // 有search值
  3225 + // 处理search
  3226 + console.log("search:" + search);
  3227 +
  3228 + scope[ctrlAs].$$data = [];
  3229 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  3230 + var upTerm = search.toUpperCase();
  3231 + if (scope[ctrlAs].$$data.length < 10) {
  3232 + if (scope[ctrlAs].$$data_real[k].$fullChars.indexOf(upTerm) != -1
  3233 + || scope[ctrlAs].$$data_real[k].$camelChars.indexOf(upTerm) != -1
  3234 + || scope[ctrlAs].$$data_real[k].$calcu_str.indexOf(upTerm) != -1) {
  3235 + scope[ctrlAs].$$data.push(angular.copy(scope[ctrlAs].$$data_real[k]));
  3236 + }
  3237 + } else {
  3238 + break;
  3239 + }
  3240 + }
  3241 + }
  3242 + };
  3243 +
  3244 + /**
  3245 + * 验证内部数据,更新外部model
  3246 + */
  3247 + scope[ctrlAs].$$internal_validate_model = function() {
  3248 + if (scope[ctrlAs].$$internal_select_value) {
  3249 + var select_value_temp = scope[ctrlAs].$$internal_select_value;
  3250 + if (scope[ctrlAs].$$data_real && scope[ctrlAs].$$data_real.length > 0) {
  3251 + var obj;
  3252 + for (var j = 0; j < scope[ctrlAs].$$data_real.length; j++) {
  3253 + if (eval("scope[ctrlAs].$$data_real[j]" + "." + $icname_attr + " == select_value_temp")) {
  3254 + obj = angular.copy(scope[ctrlAs].$$data_real[j]);
  3255 + break;
  3256 + }
  3257 + }
  3258 + if (obj) { // 在data中判定有没有
  3259 + for (var k = 0; k < scope[ctrlAs].$$data.length; k++) {
  3260 + if (eval("scope[ctrlAs].$$data[k]" + "." + $icname_attr + " == obj." + $icname_attr)) {
  3261 + obj = undefined;
  3262 + break;
  3263 + }
  3264 + }
  3265 + if (obj) {
  3266 + scope[ctrlAs].$$data.push(obj);
  3267 + }
  3268 + // 更新内部model,用于外部验证
  3269 + // 内部model的值暂时随意,以后再改
  3270 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  3271 + } else {
  3272 + scope[ctrlAs].$$internalmodel = undefined;
  3273 + }
  3274 +
  3275 + } else {
  3276 + scope[ctrlAs].$$internalmodel = undefined;
  3277 + }
  3278 +
  3279 + } else {
  3280 + scope[ctrlAs].$$internalmodel = undefined;
  3281 + }
  3282 + };
  3283 +
  3284 + /**
  3285 + * 内部match表达式转换函数,需要外部绑定此函数的上下文。
  3286 + * @param context function上下文
  3287 + */
  3288 + scope[ctrlAs].$$internal_match_str = function (context) {
  3289 + var fx = function() {
  3290 + try {
  3291 + return eval($searchexp_attr);
  3292 + } catch (err) {
  3293 + //console.log(err);
  3294 + return undefined;
  3295 + }
  3296 +
  3297 + };
  3298 +
  3299 + var str = fx.bind(context)();
  3300 + if (str && str != "")
  3301 + return str;
  3302 + else
  3303 + return undefined;
  3304 + };
  3305 +
  3306 + /**
  3307 + * 内部方法,读取字典数据作为数据源。
  3308 + * @param atype ajax查询类型
  3309 + * @param ajaxparamobj 查询参数对象
  3310 + */
  3311 + scope[ctrlAs].$$internal_ajax_data = function(atype, ajaxparamobj) {
  3312 + // 如果ajaxparamobj为空对象,则表示清空内部选项
  3313 + var isEmptyObj = true;
  3314 + for (var name in ajaxparamobj) {
  3315 + isEmptyObj = false;
  3316 + }
  3317 + if (isEmptyObj) {
  3318 + // 重新创建内部保存的数据
  3319 + scope[ctrlAs].$$data_real = [];
  3320 + // 重新创建内部ui-select显示用数据,默认取10条记录显示
  3321 + scope[ctrlAs].$$data = [];
  3322 +
  3323 + scope[ctrlAs].$$internal_remove_fn();
  3324 + scope[ctrlAs].$$internal_validate_model();
  3325 +
  3326 + return;
  3327 + }
  3328 +
  3329 + if ($dsparamsextra_attr) { // 合并附加参数
  3330 + eval("var extra = " + $dsparamsextra_attr);
  3331 + for (var extrakey in extra) {
  3332 + ajaxparamobj[extrakey] = extra[extrakey];
  3333 + }
  3334 + }
  3335 +
  3336 + $$searchInfoService_g[atype].list(
  3337 + ajaxparamobj,
  3338 + function(result) {
  3339 + console.log("$$internal_ajax_data result");
  3340 +
  3341 + // 重新创建内部保存的数据
  3342 + scope[ctrlAs].$$data_real = [];
  3343 + // result中添加拼音数据,注意:这里要求result返回对象数组
  3344 + for (var i = 0; i < result.length; i++) {
  3345 + // 闭包绑定返回最终查询的值
  3346 + var calcu_str = scope[ctrlAs].$$internal_match_str(result[i]);
  3347 + if (calcu_str) {
  3348 + // 全拼
  3349 + result[i]["$fullChars"] = pinyin.getFullChars(calcu_str);
  3350 + // 简拼
  3351 + result[i]["$camelChars"] = pinyin.getCamelChars(calcu_str);
  3352 + // 原值
  3353 + result[i]["$calcu_str"] = calcu_str;
  3354 +
  3355 + scope[ctrlAs].$$data_real.push(result[i]);
  3356 + }
  3357 + }
  3358 +
  3359 + // 重新创建内部ui-select显示用数据,默认取10条记录显示
  3360 + scope[ctrlAs].$$data = [];
  3361 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  3362 + if (scope[ctrlAs].$$data.length < 10) {
  3363 + scope[ctrlAs].$$data.push(scope[ctrlAs].$$data_real[k]);
  3364 + } else {
  3365 + break;
  3366 + }
  3367 + }
  3368 +
  3369 + scope[ctrlAs].$$internal_validate_model();
  3370 + },
  3371 + function(result) {
  3372 + throw new Error("ajax查询出错");
  3373 + }
  3374 + );
  3375 + };
  3376 +
  3377 + /**
  3378 + * 内部方法,读取字典数据作为数据源。
  3379 + * @param dictype 字典类型,如:gsType
  3380 + */
  3381 + scope[ctrlAs].$$internal_dic_data = function(dictype) {
  3382 + if (!dictionaryUtils.getByGroup(dictype)) {
  3383 + throw new error("字典数据不窜在=" + dictype);
  3384 + }
  3385 +
  3386 + // 重新创建内部保存的数据
  3387 + scope[ctrlAs].$$data_real = [];
  3388 + var origin_dicgroup = dictionaryUtils.getByGroup(dicgroup);
  3389 + var dic_key; // 字典key
  3390 +
  3391 + for (dic_key in origin_dicgroup) {
  3392 + var data = {}; // 重新组合的字典元素对象
  3393 + if (dic_key == "true")
  3394 + data[$icname_attr] = true;
  3395 + else
  3396 + data[$icname_attr] = dic_key;
  3397 + data[$dscol_attr] = origin_dicgroup[dic_key];
  3398 + scope[ctrlAs].$$data_real.push(data);
  3399 + }
  3400 +
  3401 + // 重新创建内部ui-select显示用数据,直接复制所有的字典数据
  3402 + scope[ctrlAs].$$data = [];
  3403 + for (var k = 0; k < scope[ctrlAs].$$data_real.length; k++) {
  3404 + scope[ctrlAs].$$data.push(scope[ctrlAs].$$data_real[k]);
  3405 + }
  3406 +
  3407 + scope[ctrlAs].$$internal_validate_model();
  3408 + };
  3409 +
  3410 + /**
  3411 + * 监控dsparams属性变化
  3412 + */
  3413 + attr.$observe("dsparams", function(value) {
  3414 + if (value && value != "") {
  3415 + var obj = JSON.parse(value);
  3416 + console.log("saSelect5 监控到dsparams属性变化,old=" + $dsparams_attr + ",new=" + value);
  3417 +
  3418 + // dsparams格式如下:
  3419 + // {type: 'dic/ajax', param: 'dic名字'/'ajax查询参数对象', atype: 'ajax查询类型'}
  3420 +
  3421 + if (obj.type == 'dic') {
  3422 + scope[ctrlAs].$$internal_dic_data(obj.param);
  3423 +
  3424 + } else if (obj.type == 'ajax') {
  3425 + scope[ctrlAs].$$internal_ajax_data(obj.atype, obj.param);
  3426 + } else {
  3427 + throw new Error("dsparams参数格式异常=" + obj);
  3428 + }
  3429 +
  3430 + }
  3431 + });
  3432 +
  3433 + /**
  3434 + * 监控外部模型dcname的值的变化。
  3435 + */
  3436 + scope.$watch(
  3437 + function() {
  3438 + return eval("scope." + ctrlAs + ".model" + "." + $dcname_attr);
  3439 + },
  3440 + function(newValue, oldValue) {
  3441 + if (newValue === undefined && oldValue === undefined) {
  3442 + // 两侧都是undefined,不处理
  3443 +
  3444 + } else {
  3445 + console.log("saSelect5 监控到外部模型" + $dcname_attr + "属性值变化,old=" + oldValue + ",new=" + newValue);
  3446 + scope[ctrlAs].$$internal_select_value = newValue;
  3447 + scope[ctrlAs].$$internal_validate_model();
  3448 + }
  3449 + },
  3450 + true
  3451 + );
  3452 + }
  3453 + };
  3454 + }
  3455 + };
  3456 + }
  3457 +]);
2434 \ No newline at end of file 3458 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
@@ -304,6 +304,33 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;ScheduleRuleManageService_g&#39;, [&#39;$resource @@ -304,6 +304,33 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;ScheduleRuleManageService_g&#39;, [&#39;$resource
304 }; 304 };
305 }]); 305 }]);
306 306
  307 +// 套跑管理service
  308 +angular.module('ScheduleApp').factory('rerunManageService_g', ['$resource', function($resource) {
  309 + return {
  310 + rest: $resource(
  311 + 'rms/:id',
  312 + {order: 'rerunXl.name,createDate', direction: 'DESC', id: '@id_route'},
  313 + {
  314 + list: {
  315 + method: 'GET',
  316 + params: {
  317 + page: 0
  318 + }
  319 + },
  320 + get: {
  321 + method: 'GET'
  322 + },
  323 + save: {
  324 + method: 'POST'
  325 + },
  326 + delete: {
  327 + method: 'DELETE'
  328 + }
  329 + }
  330 + )
  331 + };
  332 +}]);
  333 +
307 // 时刻表管理service 334 // 时刻表管理service
308 angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', function($resource) { 335 angular.module('ScheduleApp').factory('TimeTableManageService_g', ['$resource', function($resource) {
309 return { 336 return {
@@ -363,6 +390,16 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;TimeTableDetailManageService_g&#39;, [&#39;$resou @@ -363,6 +390,16 @@ angular.module(&#39;ScheduleApp&#39;).factory(&#39;TimeTableDetailManageService_g&#39;, [&#39;$resou
363 method: 'GET' 390 method: 'GET'
364 } 391 }
365 } 392 }
  393 + ),
  394 + bcdetails: $resource(
  395 + '/tidc/bcdetail',
  396 + {},
  397 + {
  398 + list: {
  399 + method: 'GET',
  400 + isArray: true
  401 + }
  402 + }
366 ) 403 )
367 }; 404 };
368 }]); 405 }]);
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
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/:xlname/:ttname',  
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 - .state("timeTableDetailInfoManage_detail_edit", {  
565 - url: '/timeTableDetailInfoManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname',  
566 - views: {  
567 - "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html'}  
568 - },  
569 - resolve: {  
570 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
571 - return $ocLazyLoad.load({  
572 - name: 'timeTableDetailInfoManage_module',  
573 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
574 - files: [  
575 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
576 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
577 - "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js"  
578 - ]  
579 - });  
580 - }]  
581 - }  
582 - })  
583 -  
584 - // 排班规则管理模块  
585 - .state("scheduleRuleManage", {  
586 - url: '/scheduleRuleManage',  
587 - views: {  
588 - "": {  
589 - templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html'  
590 - },  
591 - "scheduleRuleManage_list@scheduleRuleManage": {  
592 - templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html'  
593 - }  
594 - },  
595 -  
596 - resolve: {  
597 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
598 - return $ocLazyLoad.load({  
599 - name: 'scheduleRuleManage_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_form", {  
611 - url: '/scheduleRuleManage_form',  
612 - views: {  
613 - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'}  
614 - },  
615 - resolve: {  
616 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
617 - return $ocLazyLoad.load({  
618 - name: 'scheduleRuleManage_form_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_edit", {  
630 - url: '/scheduleRuleManage_edit/:id',  
631 - views: {  
632 - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'}  
633 - },  
634 - resolve: {  
635 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
636 - return $ocLazyLoad.load({  
637 - name: 'scheduleRuleManage_edit_module',  
638 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
639 - files: [  
640 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
641 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
642 - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"  
643 - ]  
644 - });  
645 - }]  
646 - }  
647 - })  
648 - .state("scheduleRuleManage_detail", {  
649 - url: '/scheduleRuleManage_detail/:id',  
650 - views: {  
651 - "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'}  
652 - },  
653 - resolve: {  
654 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
655 - return $ocLazyLoad.load({  
656 - name: 'scheduleRuleManage_detail_module',  
657 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
658 - files: [  
659 - "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"  
660 - ]  
661 - });  
662 - }]  
663 - }  
664 - })  
665 -  
666 - // 排班计划管理模块  
667 - .state("schedulePlanManage", {  
668 - url: '/schedulePlanManage',  
669 - views: {  
670 - "": {  
671 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html'  
672 - },  
673 - "schedulePlanManage_list@schedulePlanManage": {  
674 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html'  
675 - }  
676 - },  
677 -  
678 - resolve: {  
679 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
680 - return $ocLazyLoad.load({  
681 - name: 'schedulePlanManage_module',  
682 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
683 - files: [  
684 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
685 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
686 - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"  
687 - ]  
688 - });  
689 - }]  
690 - }  
691 - })  
692 - .state("schedulePlanManage_form", {  
693 - url: '/schedulePlanManage_form',  
694 - views: {  
695 - "": {  
696 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html'  
697 - }  
698 - },  
699 -  
700 - resolve: {  
701 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
702 - return $ocLazyLoad.load({  
703 - name: 'schedulePlanManage_form_module',  
704 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
705 - files: [  
706 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
707 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
708 - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"  
709 - ]  
710 - });  
711 - }]  
712 - }  
713 - })  
714 -  
715 - // 排班计划明细管理模块  
716 - .state("schedulePlanInfoManage", {  
717 - url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime',  
718 - views: {  
719 - "": {  
720 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_info.html'  
721 - },  
722 - "schedulePlanInfoManage_list@schedulePlanInfoManage": {  
723 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_info.html'  
724 - }  
725 - },  
726 -  
727 - resolve: {  
728 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
729 - return $ocLazyLoad.load({  
730 - name: 'schedulePlanInfoManage_module',  
731 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
732 - files: [  
733 - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js"  
734 - ]  
735 - });  
736 - }]  
737 - }  
738 - })  
739 -  
740 - // 排班调度值勤日报模块  
741 - .state("schedulePlanReportManage", {  
742 - url: '/schedulePlanReportManage',  
743 - views: {  
744 - "": {  
745 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_report.html'  
746 - },  
747 - "schedulePlanReportManage_list@schedulePlanReportManage": {  
748 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_report.html'  
749 - }  
750 - },  
751 -  
752 - resolve: {  
753 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
754 - return $ocLazyLoad.load({  
755 - name: 'schedulePlanManage_module',  
756 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
757 - files: [  
758 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
759 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
760 - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js"  
761 - ]  
762 - });  
763 - }]  
764 - }  
765 - })  
766 -  
767 - .state("schedulePlanReportManage_edit", {  
768 - url: '/schedulePlanReportManage_edit',  
769 - params: {type: 0, groupInfo: null},  
770 - views: {  
771 - "": {  
772 - templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/edit_report.html'  
773 - }  
774 - },  
775 -  
776 - resolve: {  
777 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
778 - return $ocLazyLoad.load({  
779 - name: 'schedulePlanReportManage_edit_module',  
780 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
781 - files: [  
782 - "assets/bower_components/angular-ui-select/dist/select.min.css",  
783 - "assets/bower_components/angular-ui-select/dist/select.min.js",  
784 - "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js"  
785 - ]  
786 - });  
787 - }]  
788 - }  
789 - })  
790 -  
791 - // 线路运营概览模块  
792 - .state("busLineInfoStat", {  
793 - url: '/busLineInfoStat',  
794 - views: {  
795 - "": {  
796 - templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html'  
797 - },  
798 - "busLineInfoStat_list@busLineInfoStat": {  
799 - templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html'  
800 - }  
801 - },  
802 -  
803 - resolve: {  
804 - deps: ['$ocLazyLoad', function($ocLazyLoad) {  
805 - return $ocLazyLoad.load({  
806 - name: 'busLineInfoStat_module',  
807 - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置  
808 - files: [  
809 - "pages/scheduleApp/module/core/busLineInfoStat/busLineInfoStat.js"  
810 - ]  
811 - });  
812 - }]  
813 - }  
814 - })  
815 -  
816 -  
817 -  
818 -  
819 -  
820 - // TODO:  
821 -  
822 - ; 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/:xlname/:ttname',
  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 + .state("timeTableDetailInfoManage_detail_edit", {
  565 + url: '/timeTableDetailInfoManage_detail_edit/:id/:xlid/:ttid/:xlname/:ttname',
  566 + views: {
  567 + "": {templateUrl: 'pages/scheduleApp/module/core/timeTableManage/detail_info_edit.html'}
  568 + },
  569 + resolve: {
  570 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  571 + return $ocLazyLoad.load({
  572 + name: 'timeTableDetailInfoManage_module',
  573 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  574 + files: [
  575 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  576 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  577 + "pages/scheduleApp/module/core/timeTableManage/timeTableDetailManage.js"
  578 + ]
  579 + });
  580 + }]
  581 + }
  582 + })
  583 +
  584 + // 排班规则管理模块
  585 + .state("scheduleRuleManage", {
  586 + url: '/scheduleRuleManage',
  587 + views: {
  588 + "": {
  589 + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/index.html'
  590 + },
  591 + "scheduleRuleManage_list@scheduleRuleManage": {
  592 + templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/list.html'
  593 + }
  594 + },
  595 +
  596 + resolve: {
  597 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  598 + return $ocLazyLoad.load({
  599 + name: 'scheduleRuleManage_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_form", {
  611 + url: '/scheduleRuleManage_form',
  612 + views: {
  613 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/form.html'}
  614 + },
  615 + resolve: {
  616 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  617 + return $ocLazyLoad.load({
  618 + name: 'scheduleRuleManage_form_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_edit", {
  630 + url: '/scheduleRuleManage_edit/:id',
  631 + views: {
  632 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/edit.html'}
  633 + },
  634 + resolve: {
  635 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  636 + return $ocLazyLoad.load({
  637 + name: 'scheduleRuleManage_edit_module',
  638 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  639 + files: [
  640 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  641 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  642 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  643 + ]
  644 + });
  645 + }]
  646 + }
  647 + })
  648 + .state("scheduleRuleManage_detail", {
  649 + url: '/scheduleRuleManage_detail/:id',
  650 + views: {
  651 + "": {templateUrl: 'pages/scheduleApp/module/core/scheduleRuleManage/detail.html'}
  652 + },
  653 + resolve: {
  654 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  655 + return $ocLazyLoad.load({
  656 + name: 'scheduleRuleManage_detail_module',
  657 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  658 + files: [
  659 + "pages/scheduleApp/module/core/scheduleRuleManage/scheduleRuleManage.js"
  660 + ]
  661 + });
  662 + }]
  663 + }
  664 + })
  665 +
  666 + // 套跑管理模块
  667 + .state("rerunManage", {
  668 + url: '/rerunManage',
  669 + views: {
  670 + "": {
  671 + templateUrl: 'pages/scheduleApp/module/core/rerunManage/index.html'
  672 + },
  673 + "rerunManage_list@rerunManage": {
  674 + templateUrl: 'pages/scheduleApp/module/core/rerunManage/list.html'
  675 + }
  676 + },
  677 +
  678 + resolve: {
  679 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  680 + return $ocLazyLoad.load({
  681 + name: 'rerunManage_module',
  682 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  683 + files: [
  684 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  685 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  686 + "pages/scheduleApp/module/core/rerunManage/main.js"
  687 + ]
  688 + });
  689 + }]
  690 + }
  691 + })
  692 + .state("rerunManage_form", {
  693 + url: '/rerunManage_form',
  694 + views: {
  695 + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/form.html'}
  696 + },
  697 + resolve: {
  698 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  699 + return $ocLazyLoad.load({
  700 + name: 'rerunManage_form_module',
  701 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  702 + files: [
  703 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  704 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  705 + "pages/scheduleApp/module/core/rerunManage/main.js"
  706 + ]
  707 + });
  708 + }]
  709 + }
  710 + })
  711 + .state("rerunManage_edit", {
  712 + url: '/rerunManage_edit/:id',
  713 + views: {
  714 + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/edit.html'}
  715 + },
  716 + resolve: {
  717 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  718 + return $ocLazyLoad.load({
  719 + name: 'rerunManage_edit_module',
  720 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  721 + files: [
  722 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  723 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  724 + "pages/scheduleApp/module/core/rerunManage/main.js"
  725 + ]
  726 + });
  727 + }]
  728 + }
  729 + })
  730 + .state("rerunManage_detail", {
  731 + url: '/rerunManage_detail/:id',
  732 + views: {
  733 + "": {templateUrl: 'pages/scheduleApp/module/core/rerunManage/detail.html'}
  734 + },
  735 + resolve: {
  736 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  737 + return $ocLazyLoad.load({
  738 + name: 'rerunManage_detail_module',
  739 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  740 + files: [
  741 + "pages/scheduleApp/module/core/rerunManage/main.js"
  742 + ]
  743 + });
  744 + }]
  745 + }
  746 + })
  747 +
  748 + // 排班计划管理模块
  749 + .state("schedulePlanManage", {
  750 + url: '/schedulePlanManage',
  751 + views: {
  752 + "": {
  753 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index.html'
  754 + },
  755 + "schedulePlanManage_list@schedulePlanManage": {
  756 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list.html'
  757 + }
  758 + },
  759 +
  760 + resolve: {
  761 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  762 + return $ocLazyLoad.load({
  763 + name: 'schedulePlanManage_module',
  764 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  765 + files: [
  766 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  767 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  768 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"
  769 + ]
  770 + });
  771 + }]
  772 + }
  773 + })
  774 + .state("schedulePlanManage_form", {
  775 + url: '/schedulePlanManage_form',
  776 + views: {
  777 + "": {
  778 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/form.html'
  779 + }
  780 + },
  781 +
  782 + resolve: {
  783 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  784 + return $ocLazyLoad.load({
  785 + name: 'schedulePlanManage_form_module',
  786 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  787 + files: [
  788 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  789 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  790 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanManage.js"
  791 + ]
  792 + });
  793 + }]
  794 + }
  795 + })
  796 +
  797 + // 排班计划明细管理模块
  798 + .state("schedulePlanInfoManage", {
  799 + url: '/schedulePlanInfoManage/:spid/:xlname/:ttname/:stime/:etime',
  800 + views: {
  801 + "": {
  802 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_info.html'
  803 + },
  804 + "schedulePlanInfoManage_list@schedulePlanInfoManage": {
  805 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_info.html'
  806 + }
  807 + },
  808 +
  809 + resolve: {
  810 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  811 + return $ocLazyLoad.load({
  812 + name: 'schedulePlanInfoManage_module',
  813 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  814 + files: [
  815 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanInfoManage.js"
  816 + ]
  817 + });
  818 + }]
  819 + }
  820 + })
  821 +
  822 + // 排班调度值勤日报模块
  823 + .state("schedulePlanReportManage", {
  824 + url: '/schedulePlanReportManage',
  825 + views: {
  826 + "": {
  827 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/index_report.html'
  828 + },
  829 + "schedulePlanReportManage_list@schedulePlanReportManage": {
  830 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/list_report.html'
  831 + }
  832 + },
  833 +
  834 + resolve: {
  835 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  836 + return $ocLazyLoad.load({
  837 + name: 'schedulePlanManage_module',
  838 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  839 + files: [
  840 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  841 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  842 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js"
  843 + ]
  844 + });
  845 + }]
  846 + }
  847 + })
  848 +
  849 + .state("schedulePlanReportManage_edit", {
  850 + url: '/schedulePlanReportManage_edit',
  851 + params: {type: 0, groupInfo: null},
  852 + views: {
  853 + "": {
  854 + templateUrl: 'pages/scheduleApp/module/core/schedulePlanManage/edit_report.html'
  855 + }
  856 + },
  857 +
  858 + resolve: {
  859 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  860 + return $ocLazyLoad.load({
  861 + name: 'schedulePlanReportManage_edit_module',
  862 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  863 + files: [
  864 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  865 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  866 + "pages/scheduleApp/module/core/schedulePlanManage/schedulePlanReportManage.js"
  867 + ]
  868 + });
  869 + }]
  870 + }
  871 + })
  872 +
  873 + // 线路运营概览模块
  874 + .state("busLineInfoStat", {
  875 + url: '/busLineInfoStat',
  876 + views: {
  877 + "": {
  878 + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/index.html'
  879 + },
  880 + "busLineInfoStat_list@busLineInfoStat": {
  881 + templateUrl: 'pages/scheduleApp/module/core/busLineInfoStat/list.html'
  882 + }
  883 + },
  884 +
  885 + resolve: {
  886 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  887 + return $ocLazyLoad.load({
  888 + name: 'busLineInfoStat_module',
  889 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  890 + files: [
  891 + "pages/scheduleApp/module/core/busLineInfoStat/busLineInfoStat.js"
  892 + ]
  893 + });
  894 + }]
  895 + }
  896 + })
  897 +
  898 +
  899 +
  900 +
  901 +
  902 + // TODO:
  903 +
  904 + ;
823 }]); 905 }]);
824 \ No newline at end of file 906 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/detail.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>排班规则管理</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li>
  9 + <a href="/pages/home.html" data-pjax>首页</a>
  10 + <i class="fa fa-circle"></i>
  11 + </li>
  12 + <li>
  13 + <span class="active">运营计划管理</span>
  14 + <i class="fa fa-circle"></i>
  15 + </li>
  16 + <li>
  17 + <a ui-sref="scheduleRuleManage">排班规则管理</a>
  18 + <i class="fa fa-circle"></i>
  19 + </li>
  20 + <li>
  21 + <span class="active">排班规则详细信息</span>
  22 + </li>
  23 +</ul>
  24 +
  25 +<div class="portlet light bordered" ng-controller="ScheduleRuleManageDetailCtrl as ctrl">
  26 + <div class="portlet-title">
  27 + <div class="caption">
  28 + <i class="icon-equalizer font-red-sunglo"></i> <span
  29 + class="caption-subject font-red-sunglo bold uppercase"
  30 + ng-bind="ctrl.title"></span>
  31 + </div>
  32 + </div>
  33 +
  34 + <div class="portlet-body form">
  35 + <form class="form-horizontal" novalidate name="myForm">
  36 + <!--<div class="alert alert-danger display-hide">-->
  37 + <!--<button class="close" data-close="alert"></button>-->
  38 + <!--您的输入有误,请检查下面的输入项-->
  39 + <!--</div>-->
  40 +
  41 +
  42 + <!-- 其他信息放置在这里 -->
  43 + <div class="form-body">
  44 + <div class="form-group has-success has-feedback">
  45 + <label class="col-md-2 control-label">线路*:</label>
  46 + <div class="col-md-3">
  47 + <input type="text" class="form-control"
  48 + name="xl" ng-model="ctrl.scheduleRuleManageForDetail.xl.name" readonly/>
  49 + </div>
  50 + </div>
  51 +
  52 + <div class="form-group has-success has-feedback">
  53 + <label class="col-md-2 control-label">车辆*:</label>
  54 + <div class="col-md-3">
  55 + <input type="text" class="form-control" name="cl"
  56 + ng-model="ctrl.scheduleRuleManageForDetail.carConfigInfo.cl.insideCode" readonly/>
  57 + </div>
  58 + </div>
  59 +
  60 + <div class="form-group has-success has-feedback">
  61 + <label class="col-md-2 control-label">启用日期*:</label>
  62 + <div class="col-md-4">
  63 + <input type="text" class="form-control"
  64 + name="qyrq" uib-datepicker-popup="yyyy年MM月dd日"
  65 + ng-model="ctrl.scheduleRuleManageForDetail.qyrq" readonly/>
  66 + </div>
  67 + </div>
  68 +
  69 + <div class="form-group has-success has-feedback">
  70 + <label class="col-md-2 control-label">路牌范围*:</label>
  71 + <div class="col-md-4">
  72 + <input type="text" class="form-control"
  73 + ng-model="ctrl.scheduleRuleManageForDetail.lpNames" readonly/>
  74 + </div>
  75 + </div>
  76 +
  77 + <div class="form-group has-success has-feedback">
  78 + <label class="col-md-2 control-label">起始路牌*:</label>
  79 + <div class="col-md-4">
  80 + <input type="text" class="form-control"
  81 + ng-model="ctrl.scheduleRuleManageForDetail.lpStart" readonly/>
  82 + </div>
  83 + </div>
  84 +
  85 + <div class="form-group has-success has-feedback">
  86 + <label class="col-md-2 control-label">人员范围*:</label>
  87 + <div class="col-md-4">
  88 + <input type="text" class="form-control"
  89 + ng-model="ctrl.scheduleRuleManageForDetail.ryDbbms" readonly/>
  90 + </div>
  91 + </div>
  92 +
  93 + <div class="form-group has-success has-feedback">
  94 + <label class="col-md-2 control-label">起始人员*:</label>
  95 + <div class="col-md-4">
  96 + <input type="text" class="form-control"
  97 + ng-model="ctrl.scheduleRuleManageForDetail.ryStart" readonly/>
  98 + </div>
  99 + </div>
  100 +
  101 + <div class="form-group">
  102 + <label class="col-md-2 control-label">翻班格式:</label>
  103 + <div class="col-md-4">
  104 + <input type="text" class="form-control"
  105 + ng-model="ctrl.scheduleRuleManageForDetail.fbgs" readonly/>
  106 + </div>
  107 + </div>
  108 +
  109 + <!-- 其他form-group -->
  110 +
  111 + </div>
  112 +
  113 + </form>
  114 +
  115 + </div>
  116 +</div>
0 \ No newline at end of file 117 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>套跑管理</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li>
  9 + <a href="/pages/home.html" data-pjax>首页</a>
  10 + <i class="fa fa-circle"></i>
  11 + </li>
  12 + <li>
  13 + <span class="active">运营计划管理</span>
  14 + <i class="fa fa-circle"></i>
  15 + </li>
  16 + <li>
  17 + <a ui-sref="rerunManage">套跑管理</a>
  18 + <i class="fa fa-circle"></i>
  19 + </li>
  20 + <li>
  21 + <span class="active">修改套跑信息</span>
  22 + </li>
  23 +</ul>
  24 +
  25 +<div class="portlet light bordered" ng-controller="RerunManageFormCtrl as ctrl">
  26 + <div class="portlet-title">
  27 + <div class="caption">
  28 + <i class="icon-equalizer font-red-sunglo"></i> <span
  29 + class="caption-subject font-red-sunglo bold uppercase">表单</span>
  30 + </div>
  31 + </div>
  32 +
  33 + <div class="portlet-body form">
  34 + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
  35 + <!--<div class="alert alert-danger display-hide">-->
  36 + <!--<button class="close" data-close="alert"></button>-->
  37 + <!--您的输入有误,请检查下面的输入项-->
  38 + <!--</div>-->
  39 +
  40 +
  41 + <!-- 其他信息放置在这里 -->
  42 + <div class="form-body">
  43 + <div class="form-group has-success has-feedback">
  44 + <label class="col-md-2 control-label">线路*:</label>
  45 + <div class="col-md-3">
  46 + <sa-Select5 name="rerunXl"
  47 + model="ctrl.rerunManageForSave"
  48 + cmaps="{'rerunXl.id' : 'id'}"
  49 + dcname="rerunXl.id"
  50 + icname="id"
  51 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  52 + iterobjname="item"
  53 + iterobjexp="item.name"
  54 + searchph="请输拼音..."
  55 + searchexp="this.name"
  56 + required >
  57 + </sa-Select5>
  58 + </div>
  59 + <!-- 隐藏块,显示验证信息 -->
  60 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunXl.$error.required">
  61 + 线路必须选择
  62 + </div>
  63 + </div>
  64 + <div class="form-group has-success has-feedback">
  65 + <label class="col-md-2 control-label">时刻表*:</label>
  66 + <div class="col-md-3">
  67 + <sa-Select5 name="rerunTtinfo"
  68 + model="ctrl.rerunManageForSave"
  69 + cmaps="{'rerunTtinfo.id' : 'id'}"
  70 + dcname="rerunTtinfo.id"
  71 + icname="id"
  72 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.rerunManageForSave.rerunXl.id}, atype:'ttInfo' } | json }}"
  73 + dsparamsextra="{'type':'all'}"
  74 + iterobjname="item"
  75 + iterobjexp="item.name + '-' + item.xl.name"
  76 + searchph="请输拼音..."
  77 + searchexp="this.name + '-' + this.xl.name"
  78 + required >
  79 + </sa-Select5>
  80 + </div>
  81 + <!-- 隐藏块,显示验证信息 -->
  82 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunTtinfo.$error.required">
  83 + 先选择线路,再选择时刻表
  84 + </div>
  85 + </div>
  86 + <div class="form-group has-success has-feedback">
  87 + <label class="col-md-2 control-label">路牌*:</label>
  88 + <div class="col-md-3">
  89 + <sa-Select5 name="rerunLp"
  90 + model="ctrl.rerunManageForSave"
  91 + cmaps="{'rerunLp.id' : 'lpId'}"
  92 + dcname="rerunLp.id"
  93 + icname="lpId"
  94 + dsparams="{{ {type: 'ajax', param:{'ttid': ctrl.rerunManageForSave.rerunTtinfo.id}, atype:'lpInfo' } | json }}"
  95 + iterobjname="item"
  96 + iterobjexp="'路牌'+ item.lpName"
  97 + searchph="请输拼音..."
  98 + searchexp="'路牌' + this.lpName"
  99 + required >
  100 + </sa-Select5>
  101 + </div>
  102 + <!-- 隐藏块,显示验证信息 -->
  103 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunLp.$error.required">
  104 + 先选择时刻表,再选择路牌
  105 + </div>
  106 + </div>
  107 +
  108 + <div class="form-group has-success has-feedback">
  109 + <label class="col-md-2 control-label">套跑班次*:</label>
  110 + <div class="col-md-6">
  111 + <sa-Bcgroup model="ctrl.rerunManageForSave"
  112 + name="rerunTtinfodetailIds"
  113 + dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}"
  114 + bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}"
  115 + bcttinfoidsname="rerunTtinfodetailIds"
  116 + required >
  117 + </sa-Bcgroup>
  118 + </div>
  119 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunTtinfodetailIds.$error.required">
  120 + 套跑班次必须选择
  121 + </div>
  122 + </div>
  123 +
  124 + <div class="form-group has-success has-feedback">
  125 + <label class="col-md-2 control-label">套跑类型*:</label>
  126 + <div class="col-md-3">
  127 + <sa-Radiogroup model="ctrl.rerunManageForSave.rerunType" dicgroup="rerunType" name="rerunType"></sa-Radiogroup>
  128 + </div>
  129 + </div>
  130 +
  131 + <div class="form-group has-success has-feedback"
  132 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  133 + <label class="col-md-2 control-label">线路2*:</label>
  134 + <div class="col-md-3">
  135 + <sa-Select5 name="useXl"
  136 + model="ctrl.rerunManageForSave"
  137 + cmaps="{'useXl.id' : 'id'}"
  138 + dcname="useXl.id"
  139 + icname="id"
  140 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  141 + iterobjname="item"
  142 + iterobjexp="item.name"
  143 + searchph="请输拼音..."
  144 + searchexp="this.name"
  145 + required >
  146 + </sa-Select5>
  147 + </div>
  148 + <!-- 隐藏块,显示验证信息 -->
  149 + <div class="alert alert-danger well-sm" ng-show="myForm.useXl.$error.required">
  150 + 线路2必须选择
  151 + </div>
  152 + </div>
  153 + <div class="form-group has-success has-feedback"
  154 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  155 + <label class="col-md-2 control-label">路牌*:</label>
  156 + <div class="col-md-3">
  157 + <sa-Select5 name="useLp"
  158 + model="ctrl.rerunManageForSave"
  159 + cmaps="{'useLp.id' : 'id'}"
  160 + dcname="useLp.id"
  161 + icname="id"
  162 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.rerunManageForSave.useXl.id}, atype:'lpInfo2' } | json }}"
  163 + dsparamsextra="{'type':'all'}"
  164 + iterobjname="item"
  165 + iterobjexp="'路牌' + item.lpName"
  166 + searchph="请输拼音..."
  167 + searchexp="'路牌' + this.lpName"
  168 + required >
  169 + </sa-Select5>
  170 + </div>
  171 + <!-- 隐藏块,显示验证信息 -->
  172 + <div class="alert alert-danger well-sm" ng-show="myForm.useLp.$error.required">
  173 + 先选择线路2,再选择路牌2
  174 + </div>
  175 + </div>
  176 +
  177 +
  178 + <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
  179 + <label class="col-md-2 control-label">车辆配置*:</label>
  180 + <div class="col-md-3">
  181 + <sa-Select5 name="useCarConfig"
  182 + model="ctrl.rerunManageForSave"
  183 + cmaps="{'useCarConfig.id' : 'id'}"
  184 + dcname="useCarConfig.id"
  185 + icname="id"
  186 + dsparams="{{ {type: 'ajax', param:{'type': 'all'}, atype:'cci2' } | json }}"
  187 + iterobjname="item"
  188 + iterobjexp="item.cl.insideCode + '-' + item.xl.name"
  189 + searchph="请输拼音..."
  190 + searchexp="this.cl.insideCode + '-' + this.xl.name"
  191 + required >
  192 + </sa-Select5>
  193 + </div>
  194 + <!-- 隐藏块,显示验证信息 -->
  195 + <div class="alert alert-danger well-sm" ng-show="myForm.useCarConfig.$error.required">
  196 + 车辆必须选择(车辆配置中的车辆)
  197 + </div>
  198 + </div>
  199 +
  200 + <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
  201 + <label class="col-md-2 control-label">人员配置*:</label>
  202 + <div class="col-md-5">
  203 + <sa-Select5 name="useEmployeeConfig"
  204 + model="ctrl.rerunManageForSave"
  205 + cmaps="{'useEmployeeConfig.id' : 'id'}"
  206 + dcname="useEmployeeConfig.id"
  207 + icname="id"
  208 + dsparams="{{ {type: 'ajax', param:{'type': 'all'}, atype:'eci3' } | json }}"
  209 + iterobjname="item"
  210 + iterobjexp="item.xl.name + '---' + '驾:' + item.jsy.personnelName + '<' + item.jsy.jobCode + '>' + ' ' + (item.spy == null ? ' ' : ('售:' + item.spy.personnelName + '<' + item.spy.jobCode + '>'))"
  211 + searchph="请输拼音..."
  212 + searchexp="this.xl.name + '---' + '驾:' + this.jsy.personnelName + '<' + this.jsy.jobCode + '>' + ' ' + (this.spy == null ? ' ' : ('售:' + this.spy.personnelName + '<' + this.spy.jobCode + '>'))"
  213 + required >
  214 + </sa-Select5>
  215 + </div>
  216 + <!-- 隐藏块,显示验证信息 -->
  217 + <div class="alert alert-danger well-sm" ng-show="myForm.useCarConfig.$error.required">
  218 + 人员配置必须选择(线路下的驾驶员和售票员配置)
  219 + </div>
  220 + </div>
  221 +
  222 + </div>
  223 +
  224 + <div class="form-actions">
  225 + <div class="row">
  226 + <div class="col-md-offset-3 col-md-4">
  227 + <button type="submit" class="btn green"
  228 +
  229 + ng-disabled="!myForm.$valid"
  230 +
  231 + ><i class="fa fa-check"></i> 提交</button>
  232 + <a type="button" class="btn default" ui-sref="rerunManage" ><i class="fa fa-times"></i> 取消</a>
  233 + </div>
  234 + </div>
  235 + </div>
  236 +
  237 + </form>
  238 +
  239 + </div>
  240 +
  241 +
  242 +</div>
0 \ No newline at end of file 243 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>套跑管理</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li>
  9 + <a href="/pages/home.html" data-pjax>首页</a>
  10 + <i class="fa fa-circle"></i>
  11 + </li>
  12 + <li>
  13 + <span class="active">运营计划管理</span>
  14 + <i class="fa fa-circle"></i>
  15 + </li>
  16 + <li>
  17 + <a ui-sref="rerunManage">套跑管理</a>
  18 + <i class="fa fa-circle"></i>
  19 + </li>
  20 + <li>
  21 + <span class="active">添加套跑信息</span>
  22 + </li>
  23 +</ul>
  24 +
  25 +<div class="portlet light bordered" ng-controller="RerunManageFormCtrl as ctrl">
  26 + <div class="portlet-title">
  27 + <div class="caption">
  28 + <i class="icon-equalizer font-red-sunglo"></i> <span
  29 + class="caption-subject font-red-sunglo bold uppercase">表单</span>
  30 + </div>
  31 + </div>
  32 +
  33 + <div class="portlet-body form">
  34 + <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
  35 + <!--<div class="alert alert-danger display-hide">-->
  36 + <!--<button class="close" data-close="alert"></button>-->
  37 + <!--您的输入有误,请检查下面的输入项-->
  38 + <!--</div>-->
  39 +
  40 +
  41 + <!-- 其他信息放置在这里 -->
  42 + <div class="form-body">
  43 + <div class="form-group has-success has-feedback">
  44 + <label class="col-md-2 control-label">线路*:</label>
  45 + <div class="col-md-3">
  46 + <sa-Select5 name="rerunXl"
  47 + model="ctrl.rerunManageForSave"
  48 + cmaps="{'rerunXl.id' : 'id'}"
  49 + dcname="rerunXl.id"
  50 + icname="id"
  51 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  52 + iterobjname="item"
  53 + iterobjexp="item.name"
  54 + searchph="请输拼音..."
  55 + searchexp="this.name"
  56 + required >
  57 + </sa-Select5>
  58 + </div>
  59 + <!-- 隐藏块,显示验证信息 -->
  60 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunXl.$error.required">
  61 + 线路必须选择
  62 + </div>
  63 + </div>
  64 + <div class="form-group has-success has-feedback">
  65 + <label class="col-md-2 control-label">时刻表*:</label>
  66 + <div class="col-md-3">
  67 + <sa-Select5 name="rerunTtinfo"
  68 + model="ctrl.rerunManageForSave"
  69 + cmaps="{'rerunTtinfo.id' : 'id'}"
  70 + dcname="rerunTtinfo.id"
  71 + icname="id"
  72 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.rerunManageForSave.rerunXl.id}, atype:'ttInfo' } | json }}"
  73 + dsparamsextra="{'type':'all'}"
  74 + iterobjname="item"
  75 + iterobjexp="item.name + '-' + item.xl.name"
  76 + searchph="请输拼音..."
  77 + searchexp="this.name + '-' + this.xl.name"
  78 + required >
  79 + </sa-Select5>
  80 + </div>
  81 + <!-- 隐藏块,显示验证信息 -->
  82 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunTtinfo.$error.required">
  83 + 先选择线路,再选择时刻表
  84 + </div>
  85 + </div>
  86 + <div class="form-group has-success has-feedback">
  87 + <label class="col-md-2 control-label">路牌*:</label>
  88 + <div class="col-md-3">
  89 + <sa-Select5 name="rerunLp"
  90 + model="ctrl.rerunManageForSave"
  91 + cmaps="{'rerunLp.id' : 'lpId'}"
  92 + dcname="rerunLp.id"
  93 + icname="lpId"
  94 + dsparams="{{ {type: 'ajax', param:{'ttid': ctrl.rerunManageForSave.rerunTtinfo.id}, atype:'lpInfo' } | json }}"
  95 + iterobjname="item"
  96 + iterobjexp="'路牌'+ item.lpName"
  97 + searchph="请输拼音..."
  98 + searchexp="'路牌' + this.lpName"
  99 + required >
  100 + </sa-Select5>
  101 + </div>
  102 + <!-- 隐藏块,显示验证信息 -->
  103 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunLp.$error.required">
  104 + 先选择时刻表,再选择路牌
  105 + </div>
  106 + </div>
  107 +
  108 + <div class="form-group has-success has-feedback">
  109 + <label class="col-md-2 control-label">套跑班次*:</label>
  110 + <div class="col-md-6">
  111 + <sa-Bcgroup model="ctrl.rerunManageForSave"
  112 + name="rerunTtinfodetailIds"
  113 + dataparams="{{ {'xlId': ctrl.rerunManageForSave.rerunXl.id, 'ttinfoId' : ctrl.rerunManageForSave.rerunTtinfo.id, 'lpId' : ctrl.rerunManageForSave.rerunLp.id} | json }}"
  114 + bcttinfoidsvalue="{{ctrl.rerunManageForSave.rerunTtinfodetailIds}}"
  115 + bcttinfoidsname="rerunTtinfodetailIds"
  116 + required >
  117 + </sa-Bcgroup>
  118 + </div>
  119 + <div class="alert alert-danger well-sm" ng-show="myForm.rerunTtinfodetailIds.$error.required">
  120 + 套跑班次必须选择
  121 + </div>
  122 + </div>
  123 +
  124 + <div class="form-group has-success has-feedback">
  125 + <label class="col-md-2 control-label">套跑类型*:</label>
  126 + <div class="col-md-3">
  127 + <sa-Radiogroup model="ctrl.rerunManageForSave.rerunType" dicgroup="rerunType" name="rerunType"></sa-Radiogroup>
  128 + </div>
  129 + </div>
  130 +
  131 + <div class="form-group has-success has-feedback"
  132 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  133 + <label class="col-md-2 control-label">线路2*:</label>
  134 + <div class="col-md-3">
  135 + <sa-Select5 name="useXl"
  136 + model="ctrl.rerunManageForSave"
  137 + cmaps="{'useXl.id' : 'id'}"
  138 + dcname="useXl.id"
  139 + icname="id"
  140 + dsparams="{{ {type: 'ajax', param:{type: 'all'}, atype:'xl' } | json }}"
  141 + iterobjname="item"
  142 + iterobjexp="item.name"
  143 + searchph="请输拼音..."
  144 + searchexp="this.name"
  145 + required >
  146 + </sa-Select5>
  147 + </div>
  148 + <!-- 隐藏块,显示验证信息 -->
  149 + <div class="alert alert-danger well-sm" ng-show="myForm.useXl.$error.required">
  150 + 线路2必须选择
  151 + </div>
  152 + </div>
  153 + <div class="form-group has-success has-feedback"
  154 + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp'">
  155 + <label class="col-md-2 control-label">路牌*:</label>
  156 + <div class="col-md-3">
  157 + <sa-Select5 name="useLp"
  158 + model="ctrl.rerunManageForSave"
  159 + cmaps="{'useLp.id' : 'id'}"
  160 + dcname="useLp.id"
  161 + icname="id"
  162 + dsparams="{{ {type: 'ajax', param:{'xl.id_eq': ctrl.rerunManageForSave.useXl.id}, atype:'lpInfo2' } | json }}"
  163 + dsparamsextra="{'type':'all'}"
  164 + iterobjname="item"
  165 + iterobjexp="'路牌' + item.lpName"
  166 + searchph="请输拼音..."
  167 + searchexp="'路牌' + this.lpName"
  168 + required >
  169 + </sa-Select5>
  170 + </div>
  171 + <!-- 隐藏块,显示验证信息 -->
  172 + <div class="alert alert-danger well-sm" ng-show="myForm.useLp.$error.required">
  173 + 先选择线路2,再选择路牌2
  174 + </div>
  175 + </div>
  176 +
  177 +
  178 + <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
  179 + <label class="col-md-2 control-label">车辆配置*:</label>
  180 + <div class="col-md-3">
  181 + <sa-Select5 name="useCarConfig"
  182 + model="ctrl.rerunManageForSave"
  183 + cmaps="{'useCarConfig.id' : 'id'}"
  184 + dcname="useCarConfig.id"
  185 + icname="id"
  186 + dsparams="{{ {type: 'ajax', param:{'type': 'all'}, atype:'cci2' } | json }}"
  187 + iterobjname="item"
  188 + iterobjexp="item.cl.insideCode + '-' + item.xl.name"
  189 + searchph="请输拼音..."
  190 + searchexp="this.cl.insideCode + '-' + this.xl.name"
  191 + required >
  192 + </sa-Select5>
  193 + </div>
  194 + <!-- 隐藏块,显示验证信息 -->
  195 + <div class="alert alert-danger well-sm" ng-show="myForm.useCarConfig.$error.required">
  196 + 车辆必须选择(车辆配置中的车辆)
  197 + </div>
  198 + </div>
  199 +
  200 + <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'">
  201 + <label class="col-md-2 control-label">人员配置*:</label>
  202 + <div class="col-md-5">
  203 + <sa-Select5 name="useEmployeeConfig"
  204 + model="ctrl.rerunManageForSave"
  205 + cmaps="{'useEmployeeConfig.id' : 'id'}"
  206 + dcname="useEmployeeConfig.id"
  207 + icname="id"
  208 + dsparams="{{ {type: 'ajax', param:{'type': 'all'}, atype:'eci3' } | json }}"
  209 + iterobjname="item"
  210 + iterobjexp="item.xl.name + '---' + '驾:' + item.jsy.personnelName + '<' + item.jsy.jobCode + '>' + ' ' + (item.spy == null ? ' ' : ('售:' + item.spy.personnelName + '<' + item.spy.jobCode + '>'))"
  211 + searchph="请输拼音..."
  212 + searchexp="this.xl.name + '---' + '驾:' + this.jsy.personnelName + '<' + this.jsy.jobCode + '>' + ' ' + (this.spy == null ? ' ' : ('售:' + this.spy.personnelName + '<' + this.spy.jobCode + '>'))"
  213 + required >
  214 + </sa-Select5>
  215 + </div>
  216 + <!-- 隐藏块,显示验证信息 -->
  217 + <div class="alert alert-danger well-sm" ng-show="myForm.useCarConfig.$error.required">
  218 + 人员配置必须选择(线路下的驾驶员和售票员配置)
  219 + </div>
  220 + </div>
  221 +
  222 + </div>
  223 +
  224 + <div class="form-actions">
  225 + <div class="row">
  226 + <div class="col-md-offset-3 col-md-4">
  227 + <button type="submit" class="btn green"
  228 +
  229 + ng-disabled="!myForm.$valid"
  230 +
  231 + ><i class="fa fa-check"></i> 提交</button>
  232 + <a type="button" class="btn default" ui-sref="rerunManage" ><i class="fa fa-times"></i> 取消</a>
  233 + </div>
  234 + </div>
  235 + </div>
  236 +
  237 + </form>
  238 +
  239 + </div>
  240 +
  241 +
  242 +</div>
0 \ No newline at end of file 243 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/index.html 0 → 100644
  1 +<div class="page-head">
  2 + <div class="page-title">
  3 + <h1>套跑管理</h1>
  4 + </div>
  5 +</div>
  6 +
  7 +<ul class="page-breadcrumb breadcrumb">
  8 + <li>
  9 + <a href="/pages/home.html" data-pjax>首页</a>
  10 + <i class="fa fa-circle"></i>
  11 + </li>
  12 + <li>
  13 + <span class="active">运营计划管理</span>
  14 + <i class="fa fa-circle"></i>
  15 + </li>
  16 + <li>
  17 + <span class="active">套跑管理</span>
  18 + </li>
  19 +</ul>
  20 +
  21 +<div class="row">
  22 + <div class="col-md-12" ng-controller="RerunManageCtrl as ctrl">
  23 + <div class="portlet light bordered">
  24 + <div class="portlet-title">
  25 + <div class="caption font-dark">
  26 + <i class="fa fa-database font-dark"></i>
  27 + <span class="caption-subject bold uppercase">排班规则</span>
  28 + </div>
  29 + <div class="actions">
  30 + <a href="javascirpt:" class="btn btn-circle blue" ng-click="ctrl.goForm()">
  31 + <i class="fa fa-plus"></i>
  32 + 添加套跑
  33 + </a>
  34 +
  35 + <div class="btn-group">
  36 + <a href="javascript:" class="btn red btn-outline btn-circle" data-toggle="dropdown">
  37 + <i class="fa fa-share"></i>
  38 + <span>数据工具</span>
  39 + <i class="fa fa-angle-down"></i>
  40 + </a>
  41 + <ul class="dropdown-menu pull-right">
  42 + <li>
  43 + <a href="javascript:" class="tool-action">
  44 + <i class="fa fa-file-excel-o"></i>
  45 + 导入excel
  46 + </a>
  47 + </li>
  48 + <li>
  49 + <a href="javascript:" class="tool-action">
  50 + <i class="fa fa-file-excel-o"></i>
  51 + 导出excel
  52 + </a>
  53 + </li>
  54 + <li class="divider"></li>
  55 + <li>
  56 + <a href="javascript:" class="tool-action">
  57 + <i class="fa fa-refresh"></i>
  58 + 刷行数据
  59 + </a>
  60 + </li>
  61 + </ul>
  62 + </div>
  63 + </div>
  64 + </div>
  65 +
  66 + <div class="portlet-body">
  67 + <div ui-view="rerunManage_list"></div>
  68 + </div>
  69 + </div>
  70 + </div>
  71 +</div>
0 \ No newline at end of file 72 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/list.html 0 → 100644
  1 +<div ng-controller="RerunManageListCtrl as ctrl">
  2 + <div class="fixDiv">
  3 + <table class="fixTable table table-striped table-bordered table-hover table-checkable order-column">
  4 + <thead>
  5 + <tr role="row" class="heading">
  6 + <th style="width: 5%;">序号</th>
  7 + <th style="width: 15%;">套跑线路</th>
  8 + <th style="width: 15%;">套跑路牌</th>
  9 + <th style="width: 10%;">时刻表</th>
  10 + <th style="width: 10%;">线路</th>
  11 + <th>路牌</th>
  12 + <th>车辆</th>
  13 + <th>套跑类型</th>
  14 + <th style="width: 21%">操作</th>
  15 + </tr>
  16 + <tr role="row" class="filter">
  17 + <td></td>
  18 + <td>
  19 + <sa-Select3 model="ctrl.searchCondition()"
  20 + name="xl"
  21 + placeholder="请输拼音..."
  22 + dcvalue="{{ctrl.searchCondition()['xl.id_eq']}}"
  23 + dcname="xl.id_eq"
  24 + icname="id"
  25 + icnames="name"
  26 + datatype="xl">
  27 + </sa-Select3>
  28 + </td>
  29 + <td></td>
  30 + <td></td>
  31 + <td></td>
  32 + <td></td>
  33 + <td></td>
  34 + <td></td>
  35 + <td>
  36 + <button class="btn btn-sm green btn-outline filter-submit margin-bottom"
  37 + ng-click="ctrl.pageChanaged()">
  38 + <i class="fa fa-search"></i> 搜索</button>
  39 +
  40 + <button class="btn btn-sm red btn-outline filter-cancel"
  41 + ng-click="ctrl.resetSearchCondition()">
  42 + <i class="fa fa-times"></i> 重置</button>
  43 + </td>
  44 +
  45 + </tr>
  46 + </thead>
  47 + <tbody>
  48 + <tr ng-repeat="info in ctrl.pageInfo.infos" class="odd gradeX">
  49 + <td>
  50 + <span ng-bind="$index + 1"></span>
  51 + </td>
  52 + <td>
  53 + <span ng-bind="info.rerunXl.name"></span>
  54 + </td>
  55 + <td>
  56 + <span ng-bind="info.rerunLp.lpName"></span>
  57 + </td>
  58 + <td>
  59 + <span ng-bind="info.rerunTtinfo.name"></span>
  60 + </td>
  61 + <td>
  62 + <span ng-bind="info.useXl.name"></span>
  63 + </td>
  64 + <td>
  65 + <span ng-bind="info.useLp.lpName"></span>
  66 + </td>
  67 + <td>
  68 + <span ng-bind="info.useCarConfig.cl.insideCode"></span>
  69 + </td>
  70 + <td>
  71 + <span ng-bind="info.useLp.rerunType | dict:'rerunType':'未知' "></span>
  72 + </td>
  73 +
  74 + <td>
  75 + <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
  76 + <!--<a href="edit.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 修改 </a>-->
  77 + <a ui-sref="rerunManage_detail({id : info.id})" class="btn default blue-stripe btn-sm"> 详细 </a>
  78 + <a ui-sref="rerunManage_edit({id : info.id})" class="btn default blue-stripe btn-sm"> 修改 </a>
  79 + <a ng-click="ctrl.deleteRule(info.id)" class="btn default blue-stripe btn-sm"> 删除 </a>
  80 + </td>
  81 + </tr>
  82 + </tbody>
  83 + </table>
  84 + </div>
  85 +
  86 +
  87 + <div style="text-align: right;">
  88 + <uib-pagination total-items="ctrl.pageInfo.totalItems"
  89 + ng-model="ctrl.pageInfo.currentPage"
  90 + ng-change="ctrl.pageChanaged()"
  91 + rotate="false"
  92 + max-size="10"
  93 + boundary-links="true"
  94 + first-text="首页"
  95 + previous-text="上一页"
  96 + next-text="下一页"
  97 + last-text="尾页">
  98 + </uib-pagination>
  99 + </div>
  100 +</div>
0 \ No newline at end of file 101 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/main.js 0 → 100644
  1 +// 规则配置管理 service controller 等写在一起
  2 +angular.module('ScheduleApp').factory('RerunManageService', ['rerunManageService_g', function(service) {
  3 + /** 当前的查询条件信息 */
  4 + var currentSearchCondition = {};
  5 +
  6 + /** 当前第几页 */
  7 + var currentPageNo = 1;
  8 +
  9 + return {
  10 + /**
  11 + * 获取查询条件信息,
  12 + * 用于给controller用来和页面数据绑定。
  13 + */
  14 + getSearchCondition: function() {
  15 + return currentSearchCondition;
  16 + },
  17 + /**
  18 + * 重置查询条件信息。
  19 + */
  20 + resetSearchCondition: function() {
  21 + var key;
  22 + for (key in currentSearchCondition) {
  23 + currentSearchCondition[key] = undefined;
  24 + }
  25 + },
  26 + /**
  27 + * 设置当前页码。
  28 + * @param cpn 从1开始,后台是从0开始的
  29 + */
  30 + setCurrentPageNo: function(cpn) {
  31 + currentPageNo = cpn;
  32 + },
  33 + /**
  34 + * 组装查询参数,返回一个promise查询结果。
  35 + * @param params 查询参数
  36 + * @return 返回一个 promise
  37 + */
  38 + getPage: function() {
  39 + var params = currentSearchCondition; // 查询条件
  40 + params.page = currentPageNo - 1; // 服务端页码从0开始
  41 + return service.rest.list(params).$promise;
  42 + },
  43 + /**
  44 + * 获取明细信息。
  45 + * @param id 车辆id
  46 + * @return 返回一个 promise
  47 + */
  48 + getDetail: function(id) {
  49 + var params = {id: id};
  50 + return service.rest.get(params).$promise;
  51 + },
  52 + /**
  53 + * 保存信息。
  54 + * @param obj 车辆详细信息
  55 + * @return 返回一个 promise
  56 + */
  57 + saveDetail: function(obj) {
  58 + return service.rest.save(obj).$promise;
  59 + },
  60 + /**
  61 + * 删除信息。
  62 + * @param id 主键id
  63 + * @returns {*|Function|promise|n}
  64 + */
  65 + deleteDetail: function(id) {
  66 + return service.rest.delete({id: id}).$promise;
  67 + }
  68 + };
  69 +
  70 +}]);
  71 +
  72 +angular.module('ScheduleApp').controller('RerunManageCtrl', ['RerunManageService', '$state', function(rerunManageService, $state) {
  73 + var self = this;
  74 +
  75 + // 切换到form状态
  76 + self.goForm = function() {
  77 + //alert("切换");
  78 + $state.go("rerunManage_form");
  79 + };
  80 +
  81 +}]);
  82 +
  83 +angular.module('ScheduleApp').controller('RerunManageListCtrl', ['RerunManageService', function(rerunManageService) {
  84 + var self = this;
  85 + self.pageInfo = {
  86 + totalItems : 0,
  87 + currentPage : 1,
  88 + infos: []
  89 + };
  90 +
  91 + // 初始创建的时候,获取一次列表数据
  92 + rerunManageService.getPage().then(
  93 + function(result) {
  94 + self.pageInfo.totalItems = result.totalElements;
  95 + self.pageInfo.currentPage = result.number + 1;
  96 + self.pageInfo.infos = result.content;
  97 + rerunManageService.setCurrentPageNo(result.number + 1);
  98 + },
  99 + function(result) {
  100 + alert("出错啦!");
  101 + }
  102 + );
  103 +
  104 + //$scope.$watch("ctrl.pageInfo.currentPage", function() {
  105 + // alert("dfdfdf");
  106 + //});
  107 +
  108 + // 翻页的时候调用
  109 + self.pageChanaged = function() {
  110 + rerunManageService.setCurrentPageNo(self.pageInfo.currentPage);
  111 + rerunManageService.getPage().then(
  112 + function(result) {
  113 + self.pageInfo.totalItems = result.totalElements;
  114 + self.pageInfo.currentPage = result.number + 1;
  115 + self.pageInfo.infos = result.content;
  116 + rerunManageService.setCurrentPageNo(result.number + 1);
  117 + },
  118 + function(result) {
  119 + alert("出错啦!");
  120 + }
  121 + );
  122 + };
  123 + // 获取查询条件数据
  124 + self.searchCondition = function() {
  125 + return rerunManageService.getSearchCondition();
  126 + };
  127 + // 重置查询条件
  128 + self.resetSearchCondition = function() {
  129 + rerunManageService.resetSearchCondition();
  130 + self.pageInfo.currentPage = 1;
  131 + self.pageChanaged();
  132 + };
  133 +
  134 + // 删除规则
  135 + self.deleteRule = function(id) {
  136 + rerunManageService.deleteDetail(id).then(
  137 + function(result) {
  138 + alert("删除成功!");
  139 +
  140 + rerunManageService.getPage().then(
  141 + function(result) {
  142 + self.pageInfo.totalItems = result.totalElements;
  143 + self.pageInfo.currentPage = result.number + 1;
  144 + self.pageInfo.infos = result.content;
  145 + rerunManageService.setCurrentPageNo(result.number + 1);
  146 + },
  147 + function(result) {
  148 + alert("出错啦!");
  149 + }
  150 + );
  151 + },
  152 + function(result) {
  153 + alert("出错啦!");
  154 + }
  155 + );
  156 + }
  157 +
  158 +}]);
  159 +
  160 +angular.module('ScheduleApp').controller('RerunManageFormCtrl', ['RerunManageService', '$stateParams', '$state', '$scope', function(rerunManageService, $stateParams, $state, $scope) {
  161 + var self = this;
  162 +
  163 + // 启用日期 日期控件开关
  164 + self.qyrqOpen = false;
  165 + self.qyrq_open = function() {
  166 + self.qyrqOpen = true;
  167 + };
  168 +
  169 + // 欲保存的busInfo信息,绑定
  170 + self.rerunManageForSave = {rerunXl: {}, rerunTtinfo: {}, rerunLp: {}, rerunType: "dylp", useXl: {}, useLp: {}, useCarConfig: {}, useEmployeeConfig: {}};
  171 +
  172 + // 获取传过来的id,有的话就是修改,获取一遍数据
  173 + var id = $stateParams.id;
  174 + if (id) {
  175 + self.rerunManageForSave.id = id;
  176 + rerunManageService.getDetail(id).then(
  177 + function(result) {
  178 + var key;
  179 + for (key in result) {
  180 + if (result[key]) {
  181 + self.rerunManageForSave[key] = result[key];
  182 +
  183 + if (self.rerunManageForSave.rerunType == 'dylp') {
  184 + self.rerunManageForSave.useCarConfig = {};
  185 + self.rerunManageForSave.useEmployeeConfig = {};
  186 + } else if (self.rerunManageForSave.rerunType == 'dybc') {
  187 + self.rerunManageForSave.useXl = {};
  188 + self.rerunManageForSave.useLp = {};
  189 + } else {
  190 +
  191 + }
  192 + }
  193 + }
  194 + },
  195 + function(result) {
  196 + alert("出错啦!");
  197 + }
  198 + );
  199 + }
  200 +
  201 + // 提交方法
  202 + self.submit = function() {
  203 + if (self.rerunManageForSave.rerunType == 'dylp') {
  204 + delete self.rerunManageForSave.useCarConfig;
  205 + delete self.rerunManageForSave.useEmployeeConfig;
  206 + } else if (self.rerunManageForSave.rerunType == 'dybc') {
  207 + delete self.rerunManageForSave.useXl;
  208 + delete self.rerunManageForSave.useLp;
  209 + } else {
  210 + return;
  211 + }
  212 +
  213 + rerunManageService.saveDetail(self.rerunManageForSave).then(
  214 + function(result) {
  215 + // TODO:弹出框方式以后改
  216 + if (result.status == 'SUCCESS') {
  217 + alert("保存成功!");
  218 + $state.go("rerunManage");
  219 + } else {
  220 + alert("保存异常!");
  221 + }
  222 + },
  223 + function(result) {
  224 + // TODO:弹出框方式以后改
  225 + alert("出错啦!");
  226 + }
  227 + );
  228 + };
  229 +}]);
  230 +
  231 +angular.module('ScheduleApp').controller('RerunManageDetailCtrl', ['RerunManageService', '$stateParams', function(rerunManageService, $stateParams) {
  232 + var self = this;
  233 + self.title = "";
  234 + self.rerunManageForDetail = {};
  235 + self.rerunManageForDetail.id = $stateParams.id;
  236 +
  237 + // 当转向到此页面时,就获取明细信息并绑定
  238 + rerunManageService.getDetail($stateParams.id).then(
  239 + function(result) {
  240 + var key;
  241 + for (key in result) {
  242 + self.rerunManageForDetail[key] = result[key];
  243 + }
  244 +
  245 + self.title = "规则配置详细信息";
  246 + },
  247 + function(result) {
  248 + // TODO:弹出框方式以后改
  249 + alert("出错啦!");
  250 + }
  251 + );
  252 +}]);
  253 +
  254 +
  255 +
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/rerunManage.html deleted 100644 → 0
1 -套跑管理  
2 \ No newline at end of file 0 \ No newline at end of file