Commit 11a38ebdde2abcf4f031e62dff8f09da40f218e4
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
# Conflicts: # src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html # src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
Showing
29 changed files
with
746 additions
and
1187 deletions
src/main/java/com/bsth/controller/sys/CompanyAuthorityController.java
| 1 | -package com.bsth.controller.sys; | |
| 2 | - | |
| 3 | -import com.alibaba.fastjson.JSONArray; | |
| 4 | -import com.bsth.controller.BaseController; | |
| 5 | -import com.bsth.entity.sys.CompanyAuthority; | |
| 6 | -import com.bsth.service.sys.CompanyAuthorityService; | |
| 7 | -import org.apache.commons.lang3.StringEscapeUtils; | |
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 10 | -import org.springframework.web.bind.annotation.RequestParam; | |
| 11 | -import org.springframework.web.bind.annotation.RestController; | |
| 12 | - | |
| 13 | -import java.util.List; | |
| 14 | -import java.util.Map; | |
| 15 | - | |
| 16 | -/** | |
| 17 | - * Created by panzhao on 2016/11/22. | |
| 18 | - */ | |
| 19 | -@RestController | |
| 20 | -@RequestMapping("companyAuthority") | |
| 21 | -public class CompanyAuthorityController extends BaseController<CompanyAuthority, Integer>{ | |
| 22 | - | |
| 23 | - @Autowired | |
| 24 | - CompanyAuthorityService companyAuthorityService; | |
| 25 | - | |
| 26 | - @RequestMapping(value = "save") | |
| 27 | - public Map<String, Object> save(@RequestParam Integer roleId, @RequestParam String authJsonStr){ | |
| 28 | - authJsonStr = StringEscapeUtils.unescapeHtml4(authJsonStr); | |
| 29 | - System.out.println(authJsonStr); | |
| 30 | - List<CompanyAuthority> list = JSONArray.parseArray(authJsonStr, CompanyAuthority.class); | |
| 31 | - return companyAuthorityService.save(roleId, list); | |
| 32 | - } | |
| 33 | -} | |
| 1 | +package com.bsth.controller.sys; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONArray; | |
| 4 | +import com.bsth.controller.BaseController; | |
| 5 | +import com.bsth.entity.sys.CompanyAuthority; | |
| 6 | +import com.bsth.service.sys.CompanyAuthorityService; | |
| 7 | +import org.apache.commons.lang3.StringEscapeUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | |
| 11 | +import org.springframework.web.bind.annotation.RestController; | |
| 12 | + | |
| 13 | +import java.util.List; | |
| 14 | +import java.util.Map; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * Created by panzhao on 2016/11/22. | |
| 18 | + */ | |
| 19 | +@RestController | |
| 20 | +@RequestMapping("companyAuthority") | |
| 21 | +public class CompanyAuthorityController extends BaseController<CompanyAuthority, Integer>{ | |
| 22 | + | |
| 23 | + @Autowired | |
| 24 | + CompanyAuthorityService companyAuthorityService; | |
| 25 | + | |
| 26 | + @RequestMapping(value = "save") | |
| 27 | + public Map<String, Object> save(@RequestParam Integer roleId, @RequestParam String authJsonStr){ | |
| 28 | + authJsonStr = StringEscapeUtils.unescapeHtml4(authJsonStr); | |
| 29 | + System.out.println(authJsonStr); | |
| 30 | + List<CompanyAuthority> list = JSONArray.parseArray(authJsonStr, CompanyAuthority.class); | |
| 31 | + return companyAuthorityService.save(roleId, list); | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/main/java/com/bsth/controller/sys/dto/CompanyData.java
| 1 | -package com.bsth.controller.sys.dto; | |
| 2 | - | |
| 3 | -import java.util.List; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * Created by panzhao on 2016/11/22. | |
| 7 | - */ | |
| 8 | -public class CompanyData { | |
| 9 | - | |
| 10 | - private String companyCode; | |
| 11 | - | |
| 12 | - private String companyName; | |
| 13 | - | |
| 14 | - private List<ChildrenCompany> children; | |
| 15 | - | |
| 16 | - public String getCompanyCode() { | |
| 17 | - return companyCode; | |
| 18 | - } | |
| 19 | - | |
| 20 | - public void setCompanyCode(String companyCode) { | |
| 21 | - this.companyCode = companyCode; | |
| 22 | - } | |
| 23 | - | |
| 24 | - public String getCompanyName() { | |
| 25 | - return companyName; | |
| 26 | - } | |
| 27 | - | |
| 28 | - public void setCompanyName(String companyName) { | |
| 29 | - this.companyName = companyName; | |
| 30 | - } | |
| 31 | - | |
| 32 | - public List<ChildrenCompany> getChildren() { | |
| 33 | - return children; | |
| 34 | - } | |
| 35 | - | |
| 36 | - public void setChildren(List<ChildrenCompany> children) { | |
| 37 | - this.children = children; | |
| 38 | - } | |
| 39 | - | |
| 40 | - public static class ChildrenCompany { | |
| 41 | - private String code; | |
| 42 | - | |
| 43 | - private String name; | |
| 44 | - | |
| 45 | - public ChildrenCompany(String code, String name){ | |
| 46 | - this.code = code; | |
| 47 | - this.name = name; | |
| 48 | - } | |
| 49 | - | |
| 50 | - public String getName() { | |
| 51 | - return name; | |
| 52 | - } | |
| 53 | - | |
| 54 | - public void setName(String name) { | |
| 55 | - this.name = name; | |
| 56 | - } | |
| 57 | - | |
| 58 | - public String getCode() { | |
| 59 | - return code; | |
| 60 | - } | |
| 61 | - | |
| 62 | - public void setCode(String code) { | |
| 63 | - this.code = code; | |
| 64 | - } | |
| 65 | - } | |
| 66 | -} | |
| 1 | +package com.bsth.controller.sys.dto; | |
| 2 | + | |
| 3 | +import java.util.List; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Created by panzhao on 2016/11/22. | |
| 7 | + */ | |
| 8 | +public class CompanyData { | |
| 9 | + | |
| 10 | + private String companyCode; | |
| 11 | + | |
| 12 | + private String companyName; | |
| 13 | + | |
| 14 | + private List<ChildrenCompany> children; | |
| 15 | + | |
| 16 | + public String getCompanyCode() { | |
| 17 | + return companyCode; | |
| 18 | + } | |
| 19 | + | |
| 20 | + public void setCompanyCode(String companyCode) { | |
| 21 | + this.companyCode = companyCode; | |
| 22 | + } | |
| 23 | + | |
| 24 | + public String getCompanyName() { | |
| 25 | + return companyName; | |
| 26 | + } | |
| 27 | + | |
| 28 | + public void setCompanyName(String companyName) { | |
| 29 | + this.companyName = companyName; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public List<ChildrenCompany> getChildren() { | |
| 33 | + return children; | |
| 34 | + } | |
| 35 | + | |
| 36 | + public void setChildren(List<ChildrenCompany> children) { | |
| 37 | + this.children = children; | |
| 38 | + } | |
| 39 | + | |
| 40 | + public static class ChildrenCompany { | |
| 41 | + private String code; | |
| 42 | + | |
| 43 | + private String name; | |
| 44 | + | |
| 45 | + public ChildrenCompany(String code, String name){ | |
| 46 | + this.code = code; | |
| 47 | + this.name = name; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public String getName() { | |
| 51 | + return name; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setName(String name) { | |
| 55 | + this.name = name; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public String getCode() { | |
| 59 | + return code; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setCode(String code) { | |
| 63 | + this.code = code; | |
| 64 | + } | |
| 65 | + } | |
| 66 | +} | ... | ... |
src/main/java/com/bsth/entity/sys/CompanyAuthority.java
| 1 | -package com.bsth.entity.sys; | |
| 2 | - | |
| 3 | -import javax.persistence.*; | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * Created by panzhao on 2016/11/22. | |
| 7 | - */ | |
| 8 | -@Entity | |
| 9 | -@Table(name = "bsth_c_sys_company_auth") | |
| 10 | -public class CompanyAuthority { | |
| 11 | - | |
| 12 | - @Id | |
| 13 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | |
| 14 | - private Integer id; | |
| 15 | - | |
| 16 | - /** 公司代码 */ | |
| 17 | - private String companyCode; | |
| 18 | - | |
| 19 | - /** 公司名称 */ | |
| 20 | - private String companyName; | |
| 21 | - | |
| 22 | - /** 分公司代码 */ | |
| 23 | - private String subCompanyCode; | |
| 24 | - | |
| 25 | - /** 分公司代码 */ | |
| 26 | - private String subCompanyName; | |
| 27 | - | |
| 28 | - private Integer roleId; | |
| 29 | - | |
| 30 | - public String getSubCompanyName() { | |
| 31 | - return subCompanyName; | |
| 32 | - } | |
| 33 | - | |
| 34 | - public void setSubCompanyName(String subCompanyName) { | |
| 35 | - this.subCompanyName = subCompanyName; | |
| 36 | - } | |
| 37 | - | |
| 38 | - public String getSubCompanyCode() { | |
| 39 | - return subCompanyCode; | |
| 40 | - } | |
| 41 | - | |
| 42 | - public void setSubCompanyCode(String subCompanyCode) { | |
| 43 | - this.subCompanyCode = subCompanyCode; | |
| 44 | - } | |
| 45 | - | |
| 46 | - public String getCompanyName() { | |
| 47 | - return companyName; | |
| 48 | - } | |
| 49 | - | |
| 50 | - public void setCompanyName(String companyName) { | |
| 51 | - this.companyName = companyName; | |
| 52 | - } | |
| 53 | - | |
| 54 | - public String getCompanyCode() { | |
| 55 | - return companyCode; | |
| 56 | - } | |
| 57 | - | |
| 58 | - public void setCompanyCode(String companyCode) { | |
| 59 | - this.companyCode = companyCode; | |
| 60 | - } | |
| 61 | - | |
| 62 | - public Integer getId() { | |
| 63 | - return id; | |
| 64 | - } | |
| 65 | - | |
| 66 | - public void setId(Integer id) { | |
| 67 | - this.id = id; | |
| 68 | - } | |
| 69 | - | |
| 70 | - public Integer getRoleId() { | |
| 71 | - return roleId; | |
| 72 | - } | |
| 73 | - | |
| 74 | - public void setRoleId(Integer roleId) { | |
| 75 | - this.roleId = roleId; | |
| 76 | - } | |
| 77 | -} | |
| 1 | +package com.bsth.entity.sys; | |
| 2 | + | |
| 3 | +import javax.persistence.*; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * Created by panzhao on 2016/11/22. | |
| 7 | + */ | |
| 8 | +@Entity | |
| 9 | +@Table(name = "bsth_c_sys_company_auth") | |
| 10 | +public class CompanyAuthority { | |
| 11 | + | |
| 12 | + @Id | |
| 13 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | |
| 14 | + private Integer id; | |
| 15 | + | |
| 16 | + /** 公司代码 */ | |
| 17 | + private String companyCode; | |
| 18 | + | |
| 19 | + /** 公司名称 */ | |
| 20 | + private String companyName; | |
| 21 | + | |
| 22 | + /** 分公司代码 */ | |
| 23 | + private String subCompanyCode; | |
| 24 | + | |
| 25 | + /** 分公司代码 */ | |
| 26 | + private String subCompanyName; | |
| 27 | + | |
| 28 | + private Integer roleId; | |
| 29 | + | |
| 30 | + public String getSubCompanyName() { | |
| 31 | + return subCompanyName; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setSubCompanyName(String subCompanyName) { | |
| 35 | + this.subCompanyName = subCompanyName; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public String getSubCompanyCode() { | |
| 39 | + return subCompanyCode; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setSubCompanyCode(String subCompanyCode) { | |
| 43 | + this.subCompanyCode = subCompanyCode; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public String getCompanyName() { | |
| 47 | + return companyName; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setCompanyName(String companyName) { | |
| 51 | + this.companyName = companyName; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public String getCompanyCode() { | |
| 55 | + return companyCode; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setCompanyCode(String companyCode) { | |
| 59 | + this.companyCode = companyCode; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public Integer getId() { | |
| 63 | + return id; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setId(Integer id) { | |
| 67 | + this.id = id; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public Integer getRoleId() { | |
| 71 | + return roleId; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setRoleId(Integer roleId) { | |
| 75 | + this.roleId = roleId; | |
| 76 | + } | |
| 77 | +} | ... | ... |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| ... | ... | @@ -37,14 +37,14 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI |
| 37 | 37 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,d.sender,d.timestamp," |
| 38 | 38 | + " d.txt_content FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 " |
| 39 | 39 | + "d ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 40 | - + "r.schedule_date like %?2% and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | |
| 40 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% order by d.timestamp",nativeQuery=true) | |
| 41 | 41 | List<Object[]> historyMessage(String line,String date,String code); |
| 42 | 42 | |
| 43 | 43 | @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs " |
| 44 | 44 | + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d " |
| 45 | 45 | + " ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND " |
| 46 | - + " r.schedule_date like %?2% and r.cl_zbh like %?3% group by " | |
| 47 | - + " lp_name,xl_name,cl_zbh order by d.timestamp",nativeQuery=true) | |
| 46 | + + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% group by " | |
| 47 | + + " lp_name,xl_name,cl_zbh",nativeQuery=true) | |
| 48 | 48 | List<Object[]> historyMessageCount(String line,String date,String code); |
| 49 | 49 | |
| 50 | 50 | @Query(value = "select max(id) from ScheduleRealInfo") | ... | ... |
src/main/java/com/bsth/repository/sys/CompanyAuthorityRepository.java
| 1 | -package com.bsth.repository.sys; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.CompanyAuthority; | |
| 4 | -import com.bsth.repository.BaseRepository; | |
| 5 | -import org.springframework.data.jpa.repository.Modifying; | |
| 6 | -import org.springframework.data.jpa.repository.Query; | |
| 7 | -import org.springframework.stereotype.Repository; | |
| 8 | - | |
| 9 | -import java.util.List; | |
| 10 | - | |
| 11 | -/** | |
| 12 | - * Created by panzhao on 2016/11/22. | |
| 13 | - */ | |
| 14 | -@Repository | |
| 15 | -public interface CompanyAuthorityRepository extends BaseRepository<CompanyAuthority, Integer>{ | |
| 16 | - | |
| 17 | - @Modifying | |
| 18 | - @Query(value="DELETE FROM CompanyAuthority WHERE roleId = ?1") | |
| 19 | - void deleteByRoleId(Integer roleId); | |
| 20 | - | |
| 21 | - @Query(value = "select ca from CompanyAuthority ca where ca.roleId in ?1") | |
| 22 | - List<CompanyAuthority> findByRoles(List<Integer> idx); | |
| 23 | -} | |
| 1 | +package com.bsth.repository.sys; | |
| 2 | + | |
| 3 | +import com.bsth.entity.sys.CompanyAuthority; | |
| 4 | +import com.bsth.repository.BaseRepository; | |
| 5 | +import org.springframework.data.jpa.repository.Modifying; | |
| 6 | +import org.springframework.data.jpa.repository.Query; | |
| 7 | +import org.springframework.stereotype.Repository; | |
| 8 | + | |
| 9 | +import java.util.List; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * Created by panzhao on 2016/11/22. | |
| 13 | + */ | |
| 14 | +@Repository | |
| 15 | +public interface CompanyAuthorityRepository extends BaseRepository<CompanyAuthority, Integer>{ | |
| 16 | + | |
| 17 | + @Modifying | |
| 18 | + @Query(value="DELETE FROM CompanyAuthority WHERE roleId = ?1") | |
| 19 | + void deleteByRoleId(Integer roleId); | |
| 20 | + | |
| 21 | + @Query(value = "select ca from CompanyAuthority ca where ca.roleId in ?1") | |
| 22 | + List<CompanyAuthority> findByRoles(List<Integer> idx); | |
| 23 | +} | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -1281,6 +1281,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1281 | 1281 | if(scheduleRealInfo.isSflj()){ |
| 1282 | 1282 | ljgl += tempJhlc; |
| 1283 | 1283 | } |
| 1284 | + }else{ | |
| 1285 | + ssgl += tempJhlc; | |
| 1286 | + ssgl_other += tempJhlc; | |
| 1284 | 1287 | } |
| 1285 | 1288 | }else{ |
| 1286 | 1289 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ... | ... |
src/main/java/com/bsth/service/sys/CompanyAuthorityService.java
| 1 | -package com.bsth.service.sys; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.CompanyAuthority; | |
| 4 | -import com.bsth.entity.sys.SysUser; | |
| 5 | -import com.bsth.service.BaseService; | |
| 6 | - | |
| 7 | -import java.util.List; | |
| 8 | -import java.util.Map; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * Created by panzhao on 2016/11/22. | |
| 12 | - */ | |
| 13 | -public interface CompanyAuthorityService extends BaseService<CompanyAuthority, Integer> { | |
| 14 | - Map<String,Object> save(Integer roleId, List<CompanyAuthority> list); | |
| 15 | - | |
| 16 | - List<CompanyAuthority> findByUser(SysUser user); | |
| 17 | -} | |
| 1 | +package com.bsth.service.sys; | |
| 2 | + | |
| 3 | +import com.bsth.entity.sys.CompanyAuthority; | |
| 4 | +import com.bsth.entity.sys.SysUser; | |
| 5 | +import com.bsth.service.BaseService; | |
| 6 | + | |
| 7 | +import java.util.List; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * Created by panzhao on 2016/11/22. | |
| 12 | + */ | |
| 13 | +public interface CompanyAuthorityService extends BaseService<CompanyAuthority, Integer> { | |
| 14 | + Map<String,Object> save(Integer roleId, List<CompanyAuthority> list); | |
| 15 | + | |
| 16 | + List<CompanyAuthority> findByUser(SysUser user); | |
| 17 | +} | ... | ... |
src/main/java/com/bsth/service/sys/impl/CompanyAuthorityServiceImpl.java
| 1 | -package com.bsth.service.sys.impl; | |
| 2 | - | |
| 3 | -import com.bsth.common.ResponseCode; | |
| 4 | -import com.bsth.entity.sys.CompanyAuthority; | |
| 5 | -import com.bsth.entity.sys.Role; | |
| 6 | -import com.bsth.entity.sys.SysUser; | |
| 7 | -import com.bsth.repository.sys.CompanyAuthorityRepository; | |
| 8 | -import com.bsth.service.impl.BaseServiceImpl; | |
| 9 | -import com.bsth.service.sys.CompanyAuthorityService; | |
| 10 | -import org.slf4j.Logger; | |
| 11 | -import org.slf4j.LoggerFactory; | |
| 12 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | -import org.springframework.stereotype.Service; | |
| 14 | -import org.springframework.transaction.annotation.Transactional; | |
| 15 | - | |
| 16 | -import java.util.*; | |
| 17 | - | |
| 18 | -/** | |
| 19 | - * Created by panzhao on 2016/11/22. | |
| 20 | - */ | |
| 21 | -@Service | |
| 22 | -public class CompanyAuthorityServiceImpl extends BaseServiceImpl<CompanyAuthority, Integer> implements CompanyAuthorityService { | |
| 23 | - | |
| 24 | - @Autowired | |
| 25 | - CompanyAuthorityRepository companyAuthorityRepository; | |
| 26 | - | |
| 27 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 28 | - | |
| 29 | - @Transactional | |
| 30 | - @Override | |
| 31 | - public Map<String, Object> save(Integer roleId, List<CompanyAuthority> list) { | |
| 32 | - Map<String, Object> rs = new HashMap(); | |
| 33 | - | |
| 34 | - try { | |
| 35 | - for(CompanyAuthority cauth : list){ | |
| 36 | - cauth.setRoleId(roleId); | |
| 37 | - } | |
| 38 | - | |
| 39 | - //删除原数据 | |
| 40 | - companyAuthorityRepository.deleteByRoleId(roleId); | |
| 41 | - | |
| 42 | - //重新写入数据 | |
| 43 | - companyAuthorityRepository.save(list); | |
| 44 | - | |
| 45 | - rs.put("status", ResponseCode.SUCCESS); | |
| 46 | - } catch (Exception e) { | |
| 47 | - logger.error("", e); | |
| 48 | - rs.put("status", ResponseCode.ERROR); | |
| 49 | - } | |
| 50 | - | |
| 51 | - return rs; | |
| 52 | - } | |
| 53 | - | |
| 54 | - @Override | |
| 55 | - public List<CompanyAuthority> findByUser(SysUser user) { | |
| 56 | - Set<Role> roles = user.getRoles(); | |
| 57 | - if(roles == null || roles.size() == 0) | |
| 58 | - return null; | |
| 59 | - | |
| 60 | - List<Integer> idx = new ArrayList<>(); | |
| 61 | - for(Role r : roles) | |
| 62 | - idx.add(r.getId()); | |
| 63 | - | |
| 64 | - List<CompanyAuthority> cAuths = companyAuthorityRepository.findByRoles(idx); | |
| 65 | - return cAuths; | |
| 66 | - } | |
| 67 | -} | |
| 1 | +package com.bsth.service.sys.impl; | |
| 2 | + | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 4 | +import com.bsth.entity.sys.CompanyAuthority; | |
| 5 | +import com.bsth.entity.sys.Role; | |
| 6 | +import com.bsth.entity.sys.SysUser; | |
| 7 | +import com.bsth.repository.sys.CompanyAuthorityRepository; | |
| 8 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 9 | +import com.bsth.service.sys.CompanyAuthorityService; | |
| 10 | +import org.slf4j.Logger; | |
| 11 | +import org.slf4j.LoggerFactory; | |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.stereotype.Service; | |
| 14 | +import org.springframework.transaction.annotation.Transactional; | |
| 15 | + | |
| 16 | +import java.util.*; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * Created by panzhao on 2016/11/22. | |
| 20 | + */ | |
| 21 | +@Service | |
| 22 | +public class CompanyAuthorityServiceImpl extends BaseServiceImpl<CompanyAuthority, Integer> implements CompanyAuthorityService { | |
| 23 | + | |
| 24 | + @Autowired | |
| 25 | + CompanyAuthorityRepository companyAuthorityRepository; | |
| 26 | + | |
| 27 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 28 | + | |
| 29 | + @Transactional | |
| 30 | + @Override | |
| 31 | + public Map<String, Object> save(Integer roleId, List<CompanyAuthority> list) { | |
| 32 | + Map<String, Object> rs = new HashMap(); | |
| 33 | + | |
| 34 | + try { | |
| 35 | + for(CompanyAuthority cauth : list){ | |
| 36 | + cauth.setRoleId(roleId); | |
| 37 | + } | |
| 38 | + | |
| 39 | + //删除原数据 | |
| 40 | + companyAuthorityRepository.deleteByRoleId(roleId); | |
| 41 | + | |
| 42 | + //重新写入数据 | |
| 43 | + companyAuthorityRepository.save(list); | |
| 44 | + | |
| 45 | + rs.put("status", ResponseCode.SUCCESS); | |
| 46 | + } catch (Exception e) { | |
| 47 | + logger.error("", e); | |
| 48 | + rs.put("status", ResponseCode.ERROR); | |
| 49 | + } | |
| 50 | + | |
| 51 | + return rs; | |
| 52 | + } | |
| 53 | + | |
| 54 | + @Override | |
| 55 | + public List<CompanyAuthority> findByUser(SysUser user) { | |
| 56 | + Set<Role> roles = user.getRoles(); | |
| 57 | + if(roles == null || roles.size() == 0) | |
| 58 | + return null; | |
| 59 | + | |
| 60 | + List<Integer> idx = new ArrayList<>(); | |
| 61 | + for(Role r : roles) | |
| 62 | + idx.add(r.getId()); | |
| 63 | + | |
| 64 | + List<CompanyAuthority> cAuths = companyAuthorityRepository.findByRoles(idx); | |
| 65 | + return cAuths; | |
| 66 | + } | |
| 67 | +} | ... | ... |
src/main/resources/application-dev.properties
| ... | ... | @@ -8,9 +8,9 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy |
| 8 | 8 | spring.jpa.database= MYSQL |
| 9 | 9 | spring.jpa.show-sql= false |
| 10 | 10 | spring.datasource.driver-class-name= com.mysql.jdbc.Driver |
| 11 | -spring.datasource.url= jdbc:mysql://192.168.168.201:3306/mh_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 11 | +spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 12 | 12 | spring.datasource.username= root |
| 13 | -spring.datasource.password= 123456 | |
| 13 | +spring.datasource.password= root | |
| 14 | 14 | #DATASOURCE |
| 15 | 15 | spring.datasource.max-active=100 |
| 16 | 16 | spring.datasource.max-idle=8 | ... | ... |
src/main/resources/static/pages/forms/statement/account.html
| ... | ... | @@ -80,44 +80,18 @@ |
| 80 | 80 | locale : 'zh-cn' |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - $('#line').select2({ | |
| 84 | - ajax: { | |
| 85 | - url: '/realSchedule/findLine', | |
| 86 | - type: 'post', | |
| 87 | - dataType: 'json', | |
| 88 | - delay: 150, | |
| 89 | - data: function(params){ | |
| 90 | - return{line: params.term}; | |
| 91 | - }, | |
| 92 | - processResults: function (data) { | |
| 93 | - return { | |
| 94 | - results: data | |
| 95 | - }; | |
| 96 | - }, | |
| 97 | - cache: true | |
| 98 | - }, | |
| 99 | - templateResult: function(repo){ | |
| 100 | - if (repo.loading) return repo.text; | |
| 101 | - var h = '<span>'+repo.text+'</span>'; | |
| 102 | - return h; | |
| 103 | - }, | |
| 104 | - escapeMarkup: function (markup) { return markup; }, | |
| 105 | - minimumInputLength: 1, | |
| 106 | - templateSelection: function(repo){ | |
| 107 | - return repo.text; | |
| 108 | - }, | |
| 109 | - language: { | |
| 110 | - noResults: function(){ | |
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 112 | - }, | |
| 113 | - inputTooShort : function(e) { | |
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 115 | - }, | |
| 116 | - searching : function() { | |
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 118 | - } | |
| 119 | - } | |
| 120 | - }); | |
| 83 | + $.get('/basic/lineCode2Name',function(result){ | |
| 84 | + var data=[]; | |
| 85 | + | |
| 86 | + for(var code in result){ | |
| 87 | + data.push({id: code, text: result[code]}); | |
| 88 | + } | |
| 89 | + console.log(data); | |
| 90 | + initPinYinSelect2('#line',data,''); | |
| 91 | + | |
| 92 | + }) | |
| 93 | + | |
| 94 | + | |
| 121 | 95 | $('#code').select2({ |
| 122 | 96 | ajax: { |
| 123 | 97 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/forms/statement/correctForm.html
| ... | ... | @@ -107,44 +107,19 @@ |
| 107 | 107 | locale : 'zh-cn' |
| 108 | 108 | }); |
| 109 | 109 | |
| 110 | - $('#line').select2({ | |
| 111 | - ajax: { | |
| 112 | - url: '/realSchedule/findLine', | |
| 113 | - type: 'post', | |
| 114 | - dataType: 'json', | |
| 115 | - delay: 150, | |
| 116 | - data: function(params){ | |
| 117 | - return{line: params.term}; | |
| 118 | - }, | |
| 119 | - processResults: function (data) { | |
| 120 | - return { | |
| 121 | - results: data | |
| 122 | - }; | |
| 123 | - }, | |
| 124 | - cache: true | |
| 125 | - }, | |
| 126 | - templateResult: function(repo){ | |
| 127 | - if (repo.loading) return repo.text; | |
| 128 | - var h = '<span>'+repo.text+'</span>'; | |
| 129 | - return h; | |
| 130 | - }, | |
| 131 | - escapeMarkup: function (markup) { return markup; }, | |
| 132 | - minimumInputLength: 1, | |
| 133 | - templateSelection: function(repo){ | |
| 134 | - return repo.text; | |
| 135 | - }, | |
| 136 | - language: { | |
| 137 | - noResults: function(){ | |
| 138 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 139 | - }, | |
| 140 | - inputTooShort : function(e) { | |
| 141 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 142 | - }, | |
| 143 | - searching : function() { | |
| 144 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 145 | - } | |
| 146 | - } | |
| 147 | - }); | |
| 110 | + | |
| 111 | + $.get('/basic/lineCode2Name',function(result){ | |
| 112 | + var data=[]; | |
| 113 | + | |
| 114 | + for(var code in result){ | |
| 115 | + data.push({id: code, text: result[code]}); | |
| 116 | + } | |
| 117 | + console.log(data); | |
| 118 | + initPinYinSelect2('#line',data,''); | |
| 119 | + | |
| 120 | + }) | |
| 121 | + | |
| 122 | + | |
| 148 | 123 | $('#lpName').select2({ |
| 149 | 124 | ajax: { |
| 150 | 125 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/daily.html
| ... | ... | @@ -92,45 +92,16 @@ |
| 92 | 92 | locale : 'zh-cn' |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | - $('#line').select2({ | |
| 96 | - ajax: { | |
| 97 | - url: '/realSchedule/findLine', | |
| 98 | - type: 'post', | |
| 99 | - dataType: 'json', | |
| 100 | - delay: 150, | |
| 101 | - data: function(params){ | |
| 102 | - return{line: params.term}; | |
| 103 | - }, | |
| 104 | - processResults: function (data) { | |
| 105 | - return { | |
| 106 | - results: data | |
| 107 | - }; | |
| 108 | - }, | |
| 109 | - cache: true | |
| 110 | - }, | |
| 111 | - templateResult: function(repo){ | |
| 112 | - if (repo.loading) return repo.text; | |
| 113 | - var h = '<span>'+repo.text+'</span>'; | |
| 114 | - return h; | |
| 115 | - }, | |
| 116 | - escapeMarkup: function (markup) { return markup; }, | |
| 117 | - minimumInputLength: 1, | |
| 118 | - templateSelection: function(repo){ | |
| 119 | - return repo.text; | |
| 120 | - }, | |
| 121 | - language: { | |
| 122 | - noResults: function(){ | |
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 124 | - }, | |
| 125 | - inputTooShort : function(e) { | |
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 127 | - }, | |
| 128 | - searching : function() { | |
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 130 | - } | |
| 131 | - } | |
| 132 | - }); | |
| 133 | - | |
| 95 | + $.get('/basic/lineCode2Name',function(result){ | |
| 96 | + var data=[]; | |
| 97 | + | |
| 98 | + for(var code in result){ | |
| 99 | + data.push({id: code, text: result[code]}); | |
| 100 | + } | |
| 101 | + console.log(data); | |
| 102 | + initPinYinSelect2('#line',data,''); | |
| 103 | + | |
| 104 | + }) | |
| 134 | 105 | var line; |
| 135 | 106 | var date; |
| 136 | 107 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/forms/statement/historyMessage.html
| ... | ... | @@ -80,44 +80,16 @@ |
| 80 | 80 | locale : 'zh-cn' |
| 81 | 81 | }); |
| 82 | 82 | |
| 83 | - $('#line').select2({ | |
| 84 | - ajax: { | |
| 85 | - url: '/realSchedule/findLine', | |
| 86 | - type: 'post', | |
| 87 | - dataType: 'json', | |
| 88 | - delay: 150, | |
| 89 | - data: function(params){ | |
| 90 | - return{line: params.term}; | |
| 91 | - }, | |
| 92 | - processResults: function (data) { | |
| 93 | - return { | |
| 94 | - results: data | |
| 95 | - }; | |
| 96 | - }, | |
| 97 | - cache: true | |
| 98 | - }, | |
| 99 | - templateResult: function(repo){ | |
| 100 | - if (repo.loading) return repo.text; | |
| 101 | - var h = '<span>'+repo.text+'</span>'; | |
| 102 | - return h; | |
| 103 | - }, | |
| 104 | - escapeMarkup: function (markup) { return markup; }, | |
| 105 | - minimumInputLength: 1, | |
| 106 | - templateSelection: function(repo){ | |
| 107 | - return repo.text; | |
| 108 | - }, | |
| 109 | - language: { | |
| 110 | - noResults: function(){ | |
| 111 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 112 | - }, | |
| 113 | - inputTooShort : function(e) { | |
| 114 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 115 | - }, | |
| 116 | - searching : function() { | |
| 117 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 118 | - } | |
| 83 | + $.get('/basic/lineCode2Name',function(result){ | |
| 84 | + var data=[]; | |
| 85 | + | |
| 86 | + for(var code in result){ | |
| 87 | + data.push({id: code, text: result[code]}); | |
| 119 | 88 | } |
| 120 | - }); | |
| 89 | + console.log(data); | |
| 90 | + initPinYinSelect2('#line',data,''); | |
| 91 | + | |
| 92 | + }) | |
| 121 | 93 | $('#code').select2({ |
| 122 | 94 | ajax: { |
| 123 | 95 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/forms/statement/jobSummary.html
| ... | ... | @@ -194,43 +194,17 @@ |
| 194 | 194 | locale : 'zh-cn' |
| 195 | 195 | }); |
| 196 | 196 | |
| 197 | - $('#line').select2({ | |
| 198 | - ajax: { | |
| 199 | - url: '/realSchedule/findLine', | |
| 200 | - dataType: 'json', | |
| 201 | - delay: 150, | |
| 202 | - data: function(params){ | |
| 203 | - return{line: params.term}; | |
| 204 | - }, | |
| 205 | - processResults: function (data) { | |
| 206 | - return { | |
| 207 | - results: data | |
| 208 | - }; | |
| 209 | - }, | |
| 210 | - cache: true | |
| 211 | - }, | |
| 212 | - templateResult: function(repo){ | |
| 213 | - if (repo.loading) return repo.text; | |
| 214 | - var h = '<span>'+repo.text+'</span>'; | |
| 215 | - return h; | |
| 216 | - }, | |
| 217 | - escapeMarkup: function (markup) { return markup; }, | |
| 218 | - minimumInputLength: 1, | |
| 219 | - templateSelection: function(repo){ | |
| 220 | - return repo.text; | |
| 221 | - }, | |
| 222 | - language: { | |
| 223 | - noResults: function(){ | |
| 224 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 225 | - }, | |
| 226 | - inputTooShort : function(e) { | |
| 227 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 228 | - }, | |
| 229 | - searching : function() { | |
| 230 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 231 | - } | |
| 232 | - } | |
| 233 | - }); | |
| 197 | + $.get('/basic/lineCode2Name',function(result){ | |
| 198 | + var data=[]; | |
| 199 | + | |
| 200 | + for(var code in result){ | |
| 201 | + data.push({id: code, text: result[code]}); | |
| 202 | + } | |
| 203 | + console.log(data); | |
| 204 | + initPinYinSelect2('#line',data,''); | |
| 205 | + | |
| 206 | + }) | |
| 207 | + | |
| 234 | 208 | }); |
| 235 | 209 | </script> |
| 236 | 210 | <script type="text/html" id="list_forms"> | ... | ... |
src/main/resources/static/pages/forms/statement/linepassengerflow.html
| ... | ... | @@ -21,12 +21,12 @@ |
| 21 | 21 | <h1>线路客流量报表</h1> |
| 22 | 22 | </div> |
| 23 | 23 | </div> |
| 24 | - | |
| 25 | -<div class="row"> | |
| 26 | - <div class="col-md-12"> | |
| 27 | - <div class="portlet light porttlet-fit bordered"> | |
| 28 | - <div class="portlet-title"> | |
| 29 | - <form class="form-inline" action=""> | |
| 24 | + | |
| 25 | +<div class="row"> | |
| 26 | + <div class="col-md-12"> | |
| 27 | + <div class="portlet light porttlet-fit bordered"> | |
| 28 | + <div class="portlet-title"> | |
| 29 | + <form class="form-inline" action=""> | |
| 30 | 30 | <div style="display: inline-block;"> |
| 31 | 31 | <span class="item-label" style="width: 80px;">线路: </span> |
| 32 | 32 | <select class="form-control" name="line" id="line" style="width: 180px;"></select> |
| ... | ... | @@ -38,10 +38,10 @@ |
| 38 | 38 | <div class="form-group"> |
| 39 | 39 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 40 | 40 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 41 | - </div> | |
| 42 | - </form> | |
| 43 | - </div> | |
| 44 | - <div class="portlet-body"> | |
| 41 | + </div> | |
| 42 | + </form> | |
| 43 | + </div> | |
| 44 | + <div class="portlet-body"> | |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | 46 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 47 | <thead> |
| ... | ... | @@ -56,63 +56,34 @@ |
| 56 | 56 | |
| 57 | 57 | </tbody> |
| 58 | 58 | </table> |
| 59 | - </div> | |
| 60 | - </div> | |
| 61 | - </div> | |
| 62 | - </div> | |
| 63 | -</div> | |
| 64 | - | |
| 65 | -<script> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + </div> | |
| 62 | + </div> | |
| 63 | +</div> | |
| 64 | + | |
| 65 | +<script> | |
| 66 | 66 | $(function(){ |
| 67 | - var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 68 | - // 关闭左侧栏 | |
| 69 | - if (!$('body').hasClass('page-sidebar-closed')) | |
| 67 | + var reqCodeMap = {"0xA1": '请求恢复运营', "0xA2": '申请调档', "0xA3": '出场请求', "0xA5": '进场请求', "0xA7": '加油请求', "0x50": '车辆故障', "0x70": '路阻报告', "0x60": '事故报告', "0x11": '扣证纠纷', "0x12" : '报警'}; | |
| 68 | + // 关闭左侧栏 | |
| 69 | + if (!$('body').hasClass('page-sidebar-closed')) | |
| 70 | 70 | $('.menu-toggler.sidebar-toggler').click(); |
| 71 | - | |
| 72 | - $("#date").datetimepicker({ | |
| 73 | - format : 'YYYY-MM-DD', | |
| 74 | - locale : 'zh-cn' | |
| 71 | + | |
| 72 | + $("#date").datetimepicker({ | |
| 73 | + format : 'YYYY-MM-DD', | |
| 74 | + locale : 'zh-cn' | |
| 75 | 75 | }); |
| 76 | 76 | |
| 77 | - $('#line').select2({ | |
| 78 | - ajax: { | |
| 79 | - url: '/realSchedule/findLine', | |
| 80 | - type: 'post', | |
| 81 | - dataType: 'json', | |
| 82 | - delay: 150, | |
| 83 | - data: function(params){ | |
| 84 | - return{line: params.term}; | |
| 85 | - }, | |
| 86 | - processResults: function (data) { | |
| 87 | - return { | |
| 88 | - results: data | |
| 89 | - }; | |
| 90 | - }, | |
| 91 | - cache: true | |
| 92 | - }, | |
| 93 | - templateResult: function(repo){ | |
| 94 | - if (repo.loading) return repo.text; | |
| 95 | - var h = '<span>'+repo.text+'</span>'; | |
| 96 | - return h; | |
| 97 | - }, | |
| 98 | - escapeMarkup: function (markup) { return markup; }, | |
| 99 | - minimumInputLength: 1, | |
| 100 | - templateSelection: function(repo){ | |
| 101 | - return repo.text; | |
| 102 | - }, | |
| 103 | - language: { | |
| 104 | - noResults: function(){ | |
| 105 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 106 | - }, | |
| 107 | - inputTooShort : function(e) { | |
| 108 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 109 | - }, | |
| 110 | - searching : function() { | |
| 111 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 112 | - } | |
| 113 | - } | |
| 114 | - }); | |
| 115 | - | |
| 77 | + $.get('/basic/lineCode2Name',function(result){ | |
| 78 | + var data=[]; | |
| 79 | + | |
| 80 | + for(var code in result){ | |
| 81 | + data.push({id: code, text: result[code]}); | |
| 82 | + } | |
| 83 | + console.log(data); | |
| 84 | + initPinYinSelect2('#line',data,''); | |
| 85 | + | |
| 86 | + }) | |
| 116 | 87 | |
| 117 | 88 | $("#query").on("click",function(){ |
| 118 | 89 | var line = $("#line").val(); |
| ... | ... | @@ -126,10 +97,10 @@ |
| 126 | 97 | // 把渲染好的模版html文本追加到表格中 |
| 127 | 98 | $('#forms tbody').html(tbodyHtml); |
| 128 | 99 | }); |
| 129 | - }); | |
| 130 | - }); | |
| 131 | -</script> | |
| 132 | -<script type="text/html" id="list_linepasswengerflow"> | |
| 100 | + }); | |
| 101 | + }); | |
| 102 | +</script> | |
| 103 | +<script type="text/html" id="list_linepasswengerflow"> | |
| 133 | 104 | {{each list as obj i}} |
| 134 | 105 | <tr> |
| 135 | 106 | <td>{{i+1}}</td> |
| ... | ... | @@ -142,5 +113,5 @@ |
| 142 | 113 | <tr> |
| 143 | 114 | <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> |
| 144 | 115 | </tr> |
| 145 | - {{/if}} | |
| 116 | + {{/if}} | |
| 146 | 117 | </script> |
| 147 | 118 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/forms/statement/operationservice.html
| ... | ... | @@ -102,44 +102,18 @@ |
| 102 | 102 | locale : 'zh-cn' |
| 103 | 103 | }); |
| 104 | 104 | |
| 105 | - $('#line').select2({ | |
| 106 | - ajax: { | |
| 107 | - url: '/realSchedule/findLine', | |
| 108 | - type: 'post', | |
| 109 | - dataType: 'json', | |
| 110 | - delay: 150, | |
| 111 | - data: function(params){ | |
| 112 | - return{line: params.term}; | |
| 113 | - }, | |
| 114 | - processResults: function (data) { | |
| 115 | - return { | |
| 116 | - results: data | |
| 117 | - }; | |
| 118 | - }, | |
| 119 | - cache: true | |
| 120 | - }, | |
| 121 | - templateResult: function(repo){ | |
| 122 | - if (repo.loading) return repo.text; | |
| 123 | - var h = '<span>'+repo.text+'</span>'; | |
| 124 | - return h; | |
| 125 | - }, | |
| 126 | - escapeMarkup: function (markup) { return markup; }, | |
| 127 | - minimumInputLength: 1, | |
| 128 | - templateSelection: function(repo){ | |
| 129 | - return repo.text; | |
| 130 | - }, | |
| 131 | - language: { | |
| 132 | - noResults: function(){ | |
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 134 | - }, | |
| 135 | - inputTooShort : function(e) { | |
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 137 | - }, | |
| 138 | - searching : function() { | |
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - }); | |
| 105 | + | |
| 106 | + $.get('/basic/lineCode2Name',function(result){ | |
| 107 | + var data=[]; | |
| 108 | + | |
| 109 | + for(var code in result){ | |
| 110 | + data.push({id: code, text: result[code]}); | |
| 111 | + } | |
| 112 | + console.log(data); | |
| 113 | + initPinYinSelect2('#line',data,''); | |
| 114 | + | |
| 115 | + }) | |
| 116 | + | |
| 143 | 117 | $('#lpName').select2({ |
| 144 | 118 | ajax: { |
| 145 | 119 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -43,6 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | <div class="portlet-body"> |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 46 | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 48 | <thead> |
| 48 | 49 | <tr> |
| ... | ... | @@ -82,23 +83,23 @@ |
| 82 | 83 | <td>援外</td> |
| 83 | 84 | <td>其他</td> |
| 84 | 85 | <td>全日</td> |
| 85 | - <td>6:31~<br>8:30</td> | |
| 86 | - <td>16:01~<br>18:00</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 87 | 88 | <td>全日</td> |
| 88 | - <td>6:31~<br>8:30</td> | |
| 89 | - <td>16:01~<br>18:00</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 90 | 91 | <td>全日</td> |
| 91 | - <td>6:31~<br>8:30</td> | |
| 92 | - <td>16:01~<br>18:00</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 93 | 94 | <td>全日</td> |
| 94 | - <td>6:31~<br>8:30</td> | |
| 95 | - <td>16:01~<br>18:00</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 96 | 97 | <td>全日</td> |
| 97 | - <td>6:31~<br>8:30</td> | |
| 98 | - <td>16:01~<br>18:00</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 99 | 100 | <td>全日</td> |
| 100 | - <td>6:31~<br>8:30</td> | |
| 101 | - <td>16:01~<br>18:00</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 102 | 103 | </tr> |
| 103 | 104 | </thead> |
| 104 | 105 | |
| ... | ... | @@ -260,44 +261,18 @@ |
| 260 | 261 | locale : 'zh-cn' |
| 261 | 262 | }); |
| 262 | 263 | |
| 263 | - $('#line').select2({ | |
| 264 | - ajax: { | |
| 265 | - url: '/realSchedule/findLine', | |
| 266 | - dataType: 'json', | |
| 267 | - delay: 150, | |
| 268 | - data: function(params){ | |
| 269 | - return{line: params.term}; | |
| 270 | - }, | |
| 271 | - processResults: function (data) { | |
| 272 | - return { | |
| 273 | - results: data | |
| 274 | - }; | |
| 275 | - }, | |
| 276 | - cache: true | |
| 277 | - }, | |
| 278 | - templateResult: function(repo){ | |
| 279 | - if (repo.loading) return repo.text; | |
| 280 | - var h = '<span>'+repo.text+'</span>'; | |
| 281 | - return h; | |
| 282 | - }, | |
| 283 | - escapeMarkup: function (markup) { return markup; }, | |
| 284 | - minimumInputLength: 1, | |
| 285 | - templateSelection: function(repo){ | |
| 286 | - return repo.text; | |
| 287 | - }, | |
| 288 | - language: { | |
| 289 | - noResults: function(){ | |
| 290 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 291 | - }, | |
| 292 | - inputTooShort : function(e) { | |
| 293 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 294 | - }, | |
| 295 | - searching : function() { | |
| 296 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 297 | - } | |
| 298 | - } | |
| 299 | - }); | |
| 300 | - | |
| 264 | + | |
| 265 | + | |
| 266 | + $.get('/basic/lineCode2Name',function(result){ | |
| 267 | + var data=[]; | |
| 268 | + | |
| 269 | + for(var code in result){ | |
| 270 | + data.push({id: code, text: result[code]}); | |
| 271 | + } | |
| 272 | + console.log(data); | |
| 273 | + initPinYinSelect2('#line',data,''); | |
| 274 | + | |
| 275 | + }) | |
| 301 | 276 | //查询 |
| 302 | 277 | $("#query").on('click',function(){ |
| 303 | 278 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/pages/forms/statement/shifday.html
| ... | ... | @@ -97,44 +97,17 @@ $(function(){ |
| 97 | 97 | locale : 'zh-cn' |
| 98 | 98 | }); |
| 99 | 99 | |
| 100 | - $('#line').select2({ | |
| 101 | - ajax: { | |
| 102 | - url: '/realSchedule/findLine', | |
| 103 | - type: 'post', | |
| 104 | - dataType: 'json', | |
| 105 | - delay: 150, | |
| 106 | - data: function(params){ | |
| 107 | - return{line: params.term}; | |
| 108 | - }, | |
| 109 | - processResults: function (data) { | |
| 110 | - return { | |
| 111 | - results: data | |
| 112 | - }; | |
| 113 | - }, | |
| 114 | - cache: true | |
| 115 | - }, | |
| 116 | - templateResult: function(repo){ | |
| 117 | - if (repo.loading) return repo.text; | |
| 118 | - var h = '<span>'+repo.text+'</span>'; | |
| 119 | - return h; | |
| 120 | - }, | |
| 121 | - escapeMarkup: function (markup) { return markup; }, | |
| 122 | - minimumInputLength: 1, | |
| 123 | - templateSelection: function(repo){ | |
| 124 | - return repo.text; | |
| 125 | - }, | |
| 126 | - language: { | |
| 127 | - noResults: function(){ | |
| 128 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 129 | - }, | |
| 130 | - inputTooShort : function(e) { | |
| 131 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 132 | - }, | |
| 133 | - searching : function() { | |
| 134 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 135 | - } | |
| 136 | - } | |
| 137 | - }); | |
| 100 | + | |
| 101 | + $.get('/basic/lineCode2Name',function(result){ | |
| 102 | + var data=[]; | |
| 103 | + | |
| 104 | + for(var code in result){ | |
| 105 | + data.push({id: code, text: result[code]}); | |
| 106 | + } | |
| 107 | + console.log(data); | |
| 108 | + initPinYinSelect2('#line',data,''); | |
| 109 | + | |
| 110 | + }) | |
| 138 | 111 | |
| 139 | 112 | $("#query").on("click",function(){ |
| 140 | 113 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
| ... | ... | @@ -87,44 +87,17 @@ |
| 87 | 87 | locale : 'zh-cn' |
| 88 | 88 | }); |
| 89 | 89 | |
| 90 | - $('#line').select2({ | |
| 91 | - ajax: { | |
| 92 | - url: '/realSchedule/findLine', | |
| 93 | - type: 'post', | |
| 94 | - dataType: 'json', | |
| 95 | - delay: 150, | |
| 96 | - data: function(params){ | |
| 97 | - return{line: params.term}; | |
| 98 | - }, | |
| 99 | - processResults: function (data) { | |
| 100 | - return { | |
| 101 | - results: data | |
| 102 | - }; | |
| 103 | - }, | |
| 104 | - cache: true | |
| 105 | - }, | |
| 106 | - templateResult: function(repo){ | |
| 107 | - if (repo.loading) return repo.text; | |
| 108 | - var h = '<span>'+repo.text+'</span>'; | |
| 109 | - return h; | |
| 110 | - }, | |
| 111 | - escapeMarkup: function (markup) { return markup; }, | |
| 112 | - minimumInputLength: 1, | |
| 113 | - templateSelection: function(repo){ | |
| 114 | - return repo.text; | |
| 115 | - }, | |
| 116 | - language: { | |
| 117 | - noResults: function(){ | |
| 118 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 119 | - }, | |
| 120 | - inputTooShort : function(e) { | |
| 121 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 122 | - }, | |
| 123 | - searching : function() { | |
| 124 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 125 | - } | |
| 126 | - } | |
| 127 | - }); | |
| 90 | + | |
| 91 | + $.get('/basic/lineCode2Name',function(result){ | |
| 92 | + var data=[]; | |
| 93 | + | |
| 94 | + for(var code in result){ | |
| 95 | + data.push({id: code, text: result[code]}); | |
| 96 | + } | |
| 97 | + console.log(data); | |
| 98 | + initPinYinSelect2('#line',data,''); | |
| 99 | + | |
| 100 | + }) | |
| 128 | 101 | $('#lpName').select2({ |
| 129 | 102 | ajax: { |
| 130 | 103 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/singledata.html
| ... | ... | @@ -92,44 +92,18 @@ |
| 92 | 92 | locale : 'zh-cn' |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | - $('#line').select2({ | |
| 96 | - ajax: { | |
| 97 | - url: '/realSchedule/findLine', | |
| 98 | - type: 'post', | |
| 99 | - dataType: 'json', | |
| 100 | - delay: 150, | |
| 101 | - data: function(params){ | |
| 102 | - return{line: params.term}; | |
| 103 | - }, | |
| 104 | - processResults: function (data) { | |
| 105 | - return { | |
| 106 | - results: data | |
| 107 | - }; | |
| 108 | - }, | |
| 109 | - cache: true | |
| 110 | - }, | |
| 111 | - templateResult: function(repo){ | |
| 112 | - if (repo.loading) return repo.text; | |
| 113 | - var h = '<span>'+repo.text+'</span>'; | |
| 114 | - return h; | |
| 115 | - }, | |
| 116 | - escapeMarkup: function (markup) { return markup; }, | |
| 117 | - minimumInputLength: 1, | |
| 118 | - templateSelection: function(repo){ | |
| 119 | - return repo.text; | |
| 120 | - }, | |
| 121 | - language: { | |
| 122 | - noResults: function(){ | |
| 123 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 124 | - }, | |
| 125 | - inputTooShort : function(e) { | |
| 126 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 127 | - }, | |
| 128 | - searching : function() { | |
| 129 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 130 | - } | |
| 131 | - } | |
| 132 | - }); | |
| 95 | + | |
| 96 | + $.get('/basic/lineCode2Name',function(result){ | |
| 97 | + var data=[]; | |
| 98 | + | |
| 99 | + for(var code in result){ | |
| 100 | + data.push({id: code, text: result[code]}); | |
| 101 | + } | |
| 102 | + console.log(data); | |
| 103 | + initPinYinSelect2('#line',data,''); | |
| 104 | + | |
| 105 | + }) | |
| 106 | + | |
| 133 | 107 | $('#lpName').select2({ |
| 134 | 108 | ajax: { |
| 135 | 109 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDaily .html
| ... | ... | @@ -43,6 +43,7 @@ |
| 43 | 43 | </div> |
| 44 | 44 | <div class="portlet-body"> |
| 45 | 45 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 46 | + <label>早高峰:6:31~8:30 晚高峰:16:01~18:00</label> | |
| 46 | 47 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 47 | 48 | <thead> |
| 48 | 49 | <tr> |
| ... | ... | @@ -70,7 +71,7 @@ |
| 70 | 71 | <td rowspan="2">原因</td> |
| 71 | 72 | </tr> |
| 72 | 73 | <tr> |
| 73 | - <td>路阻</td> | |
| 74 | + <td width="31px">路阻</td> | |
| 74 | 75 | <td>吊慢</td> |
| 75 | 76 | <td>故障</td> |
| 76 | 77 | <td>纠纷</td> |
| ... | ... | @@ -82,23 +83,23 @@ |
| 82 | 83 | <td>援外</td> |
| 83 | 84 | <td>其他</td> |
| 84 | 85 | <td>全日</td> |
| 85 | - <td>6:31~8:30</td> | |
| 86 | - <td>16:01~18:00</td> | |
| 86 | + <td>早高峰</td> | |
| 87 | + <td>晚高峰</td> | |
| 87 | 88 | <td>全日</td> |
| 88 | - <td>6:31~8:30</td> | |
| 89 | - <td>16:01~18:00</td> | |
| 89 | + <td>早高峰</td> | |
| 90 | + <td>晚高峰</td> | |
| 90 | 91 | <td>全日</td> |
| 91 | - <td>6:31~8:30</td> | |
| 92 | - <td>16:01~18:00</td> | |
| 92 | + <td>早高峰</td> | |
| 93 | + <td>晚高峰</td> | |
| 93 | 94 | <td>全日</td> |
| 94 | - <td>6:31~8:30</td> | |
| 95 | - <td>16:01~18:00</td> | |
| 95 | + <td>早高峰</td> | |
| 96 | + <td>晚高峰</td> | |
| 96 | 97 | <td>全日</td> |
| 97 | - <td>6:31~8:30</td> | |
| 98 | - <td>16:01~18:00</td> | |
| 98 | + <td>早高峰</td> | |
| 99 | + <td>晚高峰</td> | |
| 99 | 100 | <td>全日</td> |
| 100 | - <td>6:31~8:30</td> | |
| 101 | - <td>16:01~18:00</td> | |
| 101 | + <td>早高峰</td> | |
| 102 | + <td>晚高峰</td> | |
| 102 | 103 | </tr> |
| 103 | 104 | </thead> |
| 104 | 105 | <tbody class="statisticsDaily"> |
| ... | ... | @@ -163,44 +164,18 @@ |
| 163 | 164 | format : 'YYYY-MM-DD', |
| 164 | 165 | locale : 'zh-cn' |
| 165 | 166 | }); |
| 167 | + $.get('/basic/lineCode2Name',function(result){ | |
| 168 | + var data=[]; | |
| 169 | + | |
| 170 | + for(var code in result){ | |
| 171 | + data.push({id: code, text: result[code]}); | |
| 172 | + } | |
| 173 | + console.log(data); | |
| 174 | + initPinYinSelect2('#line',data,''); | |
| 175 | + | |
| 176 | + }) | |
| 166 | 177 | |
| 167 | - $('#line').select2({ | |
| 168 | - ajax: { | |
| 169 | - url: '/realSchedule/findLine', | |
| 170 | - dataType: 'json', | |
| 171 | - delay: 150, | |
| 172 | - data: function(params){ | |
| 173 | - return{line: params.term}; | |
| 174 | - }, | |
| 175 | - processResults: function (data) { | |
| 176 | - return { | |
| 177 | - results: data | |
| 178 | - }; | |
| 179 | - }, | |
| 180 | - cache: true | |
| 181 | - }, | |
| 182 | - templateResult: function(repo){ | |
| 183 | - if (repo.loading) return repo.text; | |
| 184 | - var h = '<span>'+repo.text+'</span>'; | |
| 185 | - return h; | |
| 186 | - }, | |
| 187 | - escapeMarkup: function (markup) { return markup; }, | |
| 188 | - minimumInputLength: 1, | |
| 189 | - templateSelection: function(repo){ | |
| 190 | - return repo.text; | |
| 191 | - }, | |
| 192 | - language: { | |
| 193 | - noResults: function(){ | |
| 194 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 195 | - }, | |
| 196 | - inputTooShort : function(e) { | |
| 197 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 198 | - }, | |
| 199 | - searching : function() { | |
| 200 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 201 | - } | |
| 202 | - } | |
| 203 | - }); | |
| 178 | + | |
| 204 | 179 | $("#query").on("click",function(){ |
| 205 | 180 | var line = $("#line").val(); |
| 206 | 181 | var xlName = $("#select2-line-container").html(); | ... | ... |
src/main/resources/static/pages/forms/statement/vehicleloading.html
| ... | ... | @@ -82,44 +82,19 @@ |
| 82 | 82 | locale : 'zh-cn' |
| 83 | 83 | }); |
| 84 | 84 | |
| 85 | - $('#line').select2({ | |
| 86 | - ajax: { | |
| 87 | - url: '/realSchedule/findLine', | |
| 88 | - type: 'post', | |
| 89 | - dataType: 'json', | |
| 90 | - delay: 150, | |
| 91 | - data: function(params){ | |
| 92 | - return{line: params.term}; | |
| 93 | - }, | |
| 94 | - processResults: function (data) { | |
| 95 | - return { | |
| 96 | - results: data | |
| 97 | - }; | |
| 98 | - }, | |
| 99 | - cache: true | |
| 100 | - }, | |
| 101 | - templateResult: function(repo){ | |
| 102 | - if (repo.loading) return repo.text; | |
| 103 | - var h = '<span>'+repo.text+'</span>'; | |
| 104 | - return h; | |
| 105 | - }, | |
| 106 | - escapeMarkup: function (markup) { return markup; }, | |
| 107 | - minimumInputLength: 1, | |
| 108 | - templateSelection: function(repo){ | |
| 109 | - return repo.text; | |
| 110 | - }, | |
| 111 | - language: { | |
| 112 | - noResults: function(){ | |
| 113 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 114 | - }, | |
| 115 | - inputTooShort : function(e) { | |
| 116 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 117 | - }, | |
| 118 | - searching : function() { | |
| 119 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 120 | - } | |
| 121 | - } | |
| 122 | - }); | |
| 85 | + | |
| 86 | + $.get('/basic/lineCode2Name',function(result){ | |
| 87 | + var data=[]; | |
| 88 | + | |
| 89 | + for(var code in result){ | |
| 90 | + data.push({id: code, text: result[code]}); | |
| 91 | + } | |
| 92 | + console.log(data); | |
| 93 | + initPinYinSelect2('#line',data,''); | |
| 94 | + | |
| 95 | + }) | |
| 96 | + | |
| 97 | + | |
| 123 | 98 | $('#lpName').select2({ |
| 124 | 99 | ajax: { |
| 125 | 100 | url: '/realSchedule/findLpName', | ... | ... |
src/main/resources/static/pages/forms/statement/waybill.html
| ... | ... | @@ -96,7 +96,18 @@ |
| 96 | 96 | locale : 'zh-cn' |
| 97 | 97 | }); |
| 98 | 98 | |
| 99 | - $('#line').select2({ | |
| 99 | + $.get('/basic/lineCode2Name',function(result){ | |
| 100 | + var data=[]; | |
| 101 | + | |
| 102 | + for(var code in result){ | |
| 103 | + data.push({id: code, text: result[code]}); | |
| 104 | + } | |
| 105 | + console.log(data); | |
| 106 | + initPinYinSelect2('#line',data,''); | |
| 107 | + | |
| 108 | + }) | |
| 109 | + | |
| 110 | + /* $('#line').select2({ | |
| 100 | 111 | ajax: { |
| 101 | 112 | url: '/realSchedule/findLine', |
| 102 | 113 | type: 'post', |
| ... | ... | @@ -134,6 +145,7 @@ |
| 134 | 145 | } |
| 135 | 146 | } |
| 136 | 147 | }); |
| 148 | + */ | |
| 137 | 149 | |
| 138 | 150 | var date = ''; |
| 139 | 151 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/forms/statement/waybillday.html
| ... | ... | @@ -79,45 +79,16 @@ |
| 79 | 79 | locale : 'zh-cn' |
| 80 | 80 | }); |
| 81 | 81 | |
| 82 | - $('#line').select2({ | |
| 83 | - ajax: { | |
| 84 | - url: '/realSchedule/findLine', | |
| 85 | - type: 'post', | |
| 86 | - dataType: 'json', | |
| 87 | - delay: 150, | |
| 88 | - data: function(params){ | |
| 89 | - return{line: params.term}; | |
| 90 | - }, | |
| 91 | - processResults: function (data) { | |
| 92 | - return { | |
| 93 | - results: data | |
| 94 | - }; | |
| 95 | - }, | |
| 96 | - cache: true | |
| 97 | - }, | |
| 98 | - templateResult: function(repo){ | |
| 99 | - if (repo.loading) return repo.text; | |
| 100 | - var h = '<span>'+repo.text+'</span>'; | |
| 101 | - return h; | |
| 102 | - }, | |
| 103 | - escapeMarkup: function (markup) { return markup; }, | |
| 104 | - minimumInputLength: 1, | |
| 105 | - templateSelection: function(repo){ | |
| 106 | - return repo.text; | |
| 107 | - }, | |
| 108 | - language: { | |
| 109 | - noResults: function(){ | |
| 110 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 111 | - }, | |
| 112 | - inputTooShort : function(e) { | |
| 113 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 114 | - }, | |
| 115 | - searching : function() { | |
| 116 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 117 | - } | |
| 118 | - } | |
| 119 | - }); | |
| 120 | - | |
| 82 | + $.get('/basic/lineCode2Name',function(result){ | |
| 83 | + var data=[]; | |
| 84 | + | |
| 85 | + for(var code in result){ | |
| 86 | + data.push({id: code, text: result[code]}); | |
| 87 | + } | |
| 88 | + console.log(data); | |
| 89 | + initPinYinSelect2('#line',data,''); | |
| 90 | + | |
| 91 | + }) | |
| 121 | 92 | var line; |
| 122 | 93 | var date; |
| 123 | 94 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/permission/role/companyAuthority.html
| 1 | -<style> | |
| 2 | - .cmpy-auth-card { | |
| 3 | - width: 760px; | |
| 4 | - background: #fff; | |
| 5 | - margin: auto; | |
| 6 | - padding: 15px; | |
| 7 | - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); | |
| 8 | - } | |
| 9 | - | |
| 10 | - .cmpy-auth-card .yunyin-company-panel:last-child { | |
| 11 | - border-bottom: none; | |
| 12 | - padding-bottom: 0px; | |
| 13 | - } | |
| 14 | - | |
| 15 | - .yunyin-company-panel { | |
| 16 | - border-bottom: 1px solid #e9e5e5; | |
| 17 | - padding-bottom: 5px; | |
| 18 | - | |
| 19 | - user-select:none; | |
| 20 | - } | |
| 21 | - | |
| 22 | - .yunyin-company-panel .company { | |
| 23 | - font-size: 13px; | |
| 24 | - } | |
| 25 | - | |
| 26 | - .yunyin-company-panel .sub-company { | |
| 27 | - display: inline-block; | |
| 28 | - text-align: center; | |
| 29 | - padding: 5px 15px; | |
| 30 | - border-radius: 5px !important; | |
| 31 | - color: #5d5c5c; | |
| 32 | - font-size: 13px; | |
| 33 | - background: linear-gradient(to bottom, #fafafa, #eeeeee); | |
| 34 | - cursor: pointer; | |
| 35 | - border: 1px solid #eeeeee; | |
| 36 | - } | |
| 37 | - | |
| 38 | - .yunyin-company-panel .sub-company.active { | |
| 39 | - background: linear-gradient(to bottom, #2ab4c0, #229ea9); | |
| 40 | - color: #fdfdfd; | |
| 41 | - } | |
| 42 | -</style> | |
| 43 | - | |
| 44 | -<div id="roleCompanyAuthority"> | |
| 45 | - | |
| 46 | - <div class="page-head"> | |
| 47 | - <div class="page-title"> | |
| 48 | - <h1>模块配置</h1> | |
| 49 | - </div> | |
| 50 | - </div> | |
| 51 | - | |
| 52 | - <ul class="page-breadcrumb breadcrumb"> | |
| 53 | - <li><a href="/pages/home.html" data-pjax>首页</a> <i | |
| 54 | - class="fa fa-circle"></i></li> | |
| 55 | - <li><span class="active">权限管理</span> <i class="fa fa-circle"></i></li> | |
| 56 | - <li><a href="list.html" data-pjax>角色管理</a> <i class="fa fa-circle"></i></li> | |
| 57 | - <li><span class="active">分公司数据权限</span></li> | |
| 58 | - </ul> | |
| 59 | - | |
| 60 | - <div class="cmpy-auth-card"> | |
| 61 | - | |
| 62 | - <h4>角色信息</h4> | |
| 63 | - <table class="table"> | |
| 64 | - <tr> | |
| 65 | - <td> | |
| 66 | - 代码:<span id="roleCode"></span> | |
| 67 | - </td> | |
| 68 | - <td> | |
| 69 | - 名称:<span id="roleName"></span> | |
| 70 | - </td> | |
| 71 | - </tr> | |
| 72 | - </table> | |
| 73 | - </div> | |
| 74 | - <br><br> | |
| 75 | - <div class="cmpy-auth-card cmpy-list"> | |
| 76 | - </div> | |
| 77 | - | |
| 78 | - <div class="cmpy-auth-card" style="text-align: right;"> | |
| 79 | - <button type="button" class="btn btn-default">返回</button> | |
| 80 | - <button type="button" class="btn btn-primary saveBtn" ><i class="fa fa-check"></i>保存</button> | |
| 81 | - </div> | |
| 82 | - | |
| 83 | - <script id="role-company-authority-temp" type="text/html"> | |
| 84 | - {{each list as obj i}} | |
| 85 | - <div class="yunyin-company-panel"> | |
| 86 | - <h5 class="company">{{obj.name}}</h5> | |
| 87 | - {{each obj.childs as fgs i}} | |
| 88 | - <div class="sub-company" data-company="{{obj.name}}" data-id="{{fgs.upCode}}_{{fgs.businessCode}}">{{fgs.businessName}}</div> | |
| 89 | - {{/each}} | |
| 90 | - </div> | |
| 91 | - {{/each}} | |
| 92 | - </script> | |
| 93 | - | |
| 94 | -</div> | |
| 95 | - | |
| 96 | -<script> | |
| 97 | -$(function () { | |
| 98 | - var id = $.url().param('no') | |
| 99 | - ,roleObj; | |
| 100 | - | |
| 101 | - if(!id){ | |
| 102 | - alert('缺少主键'); | |
| 103 | - } | |
| 104 | - else{ | |
| 105 | - $.get('/role/'+id , function(obj){ | |
| 106 | - $('#roleCompanyAuthority #roleCode').text(obj.codeName); | |
| 107 | - $('#roleCompanyAuthority #roleName').text(obj.roleName); | |
| 108 | - }); | |
| 109 | - } | |
| 110 | - | |
| 111 | - | |
| 112 | - $.get('/business/all', function (rs) { | |
| 113 | - var baseCode; | |
| 114 | - //找到跟节点 | |
| 115 | - $.each(rs, function () { | |
| 116 | - if(this.upCode == 0){ | |
| 117 | - baseCode=this.businessCode; | |
| 118 | - return false; | |
| 119 | - } | |
| 120 | - }); | |
| 121 | - if(!baseCode){ | |
| 122 | - alert('大爷找不到跟节点,数据有问题吧!!!'); | |
| 123 | - return; | |
| 124 | - } | |
| 125 | - //提取二级节点 | |
| 126 | - var secondMap={}; | |
| 127 | - $.each(rs, function () { | |
| 128 | - if(this.upCode==baseCode){ | |
| 129 | - secondMap[this.businessCode] = { | |
| 130 | - name: this.businessName, | |
| 131 | - childs: [] | |
| 132 | - }; | |
| 133 | - } | |
| 134 | - }); | |
| 135 | - //分公司节点 | |
| 136 | - $.each(rs, function () { | |
| 137 | - if(secondMap[this.upCode]) | |
| 138 | - secondMap[this.upCode].childs.push(this); | |
| 139 | - }); | |
| 140 | - | |
| 141 | - //排序 | |
| 142 | - for(var sid in secondMap){ | |
| 143 | - secondMap[sid].childs.sort(naturalSort); | |
| 144 | - } | |
| 145 | - | |
| 146 | - var htmlStr=template('role-company-authority-temp', {list: get_vals(secondMap)}); | |
| 147 | - $('#roleCompanyAuthority .cmpy-list').html(htmlStr); | |
| 148 | - | |
| 149 | - //查询公司权限信息 | |
| 150 | - $get('/companyAuthority/all', {roleId_eq: id}, function (rs) { | |
| 151 | - //console.log(rs); | |
| 152 | - var dataId; | |
| 153 | - $.each(rs, function () { | |
| 154 | - dataId=this.companyCode+'_'+this.subCompanyCode; | |
| 155 | - $('.cmpy-list div.sub-company[data-id='+dataId+']').addClass('active'); | |
| 156 | - }); | |
| 157 | - }); | |
| 158 | - }); | |
| 159 | - | |
| 160 | - $('#roleCompanyAuthority').on('click', '.cmpy-list .sub-company', function () { | |
| 161 | - if($(this).hasClass('active')) | |
| 162 | - $(this).removeClass('active'); | |
| 163 | - else | |
| 164 | - $(this).addClass('active'); | |
| 165 | - }); | |
| 166 | - | |
| 167 | - var get_vals = function(json) { | |
| 168 | - var array = []; | |
| 169 | - for (var key in json) { | |
| 170 | - array.push(json[key]); | |
| 171 | - } | |
| 172 | - | |
| 173 | - return array; | |
| 174 | - } | |
| 175 | - | |
| 176 | - var naturalSort=function (a, b) { | |
| 177 | - return a.businessCode.localeCompare(b.businessCode); | |
| 178 | - } | |
| 179 | - | |
| 180 | - //保存 | |
| 181 | - $('#roleCompanyAuthority .saveBtn').on('click', function () { | |
| 182 | - var ats=$('.cmpy-list div.sub-company.active', '#roleCompanyAuthority') | |
| 183 | - ,data=[]; | |
| 184 | - var code; | |
| 185 | - $.each(ats, function () { | |
| 186 | - code = $(this).data('id').split('_'); | |
| 187 | - data.push({ | |
| 188 | - companyCode: code[0], | |
| 189 | - subCompanyCode: code[1], | |
| 190 | - companyName: $(this).data('company'), | |
| 191 | - subCompanyName: $(this).text() | |
| 192 | - }); | |
| 193 | - }); | |
| 194 | - | |
| 195 | - $post('/companyAuthority/save', {roleId: id, authJsonStr: JSON.stringify(data)}, function (rs) { | |
| 196 | - alert('保存成功!'); | |
| 197 | - }) | |
| 198 | - }); | |
| 199 | -}); | |
| 1 | +<style> | |
| 2 | + .cmpy-auth-card { | |
| 3 | + width: 760px; | |
| 4 | + background: #fff; | |
| 5 | + margin: auto; | |
| 6 | + padding: 15px; | |
| 7 | + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); | |
| 8 | + } | |
| 9 | + | |
| 10 | + .cmpy-auth-card .yunyin-company-panel:last-child { | |
| 11 | + border-bottom: none; | |
| 12 | + padding-bottom: 0px; | |
| 13 | + } | |
| 14 | + | |
| 15 | + .yunyin-company-panel { | |
| 16 | + border-bottom: 1px solid #e9e5e5; | |
| 17 | + padding-bottom: 5px; | |
| 18 | + | |
| 19 | + user-select:none; | |
| 20 | + } | |
| 21 | + | |
| 22 | + .yunyin-company-panel .company { | |
| 23 | + font-size: 13px; | |
| 24 | + } | |
| 25 | + | |
| 26 | + .yunyin-company-panel .sub-company { | |
| 27 | + display: inline-block; | |
| 28 | + text-align: center; | |
| 29 | + padding: 5px 15px; | |
| 30 | + border-radius: 5px !important; | |
| 31 | + color: #5d5c5c; | |
| 32 | + font-size: 13px; | |
| 33 | + background: linear-gradient(to bottom, #fafafa, #eeeeee); | |
| 34 | + cursor: pointer; | |
| 35 | + border: 1px solid #eeeeee; | |
| 36 | + } | |
| 37 | + | |
| 38 | + .yunyin-company-panel .sub-company.active { | |
| 39 | + background: linear-gradient(to bottom, #2ab4c0, #229ea9); | |
| 40 | + color: #fdfdfd; | |
| 41 | + } | |
| 42 | +</style> | |
| 43 | + | |
| 44 | +<div id="roleCompanyAuthority"> | |
| 45 | + | |
| 46 | + <div class="page-head"> | |
| 47 | + <div class="page-title"> | |
| 48 | + <h1>模块配置</h1> | |
| 49 | + </div> | |
| 50 | + </div> | |
| 51 | + | |
| 52 | + <ul class="page-breadcrumb breadcrumb"> | |
| 53 | + <li><a href="/pages/home.html" data-pjax>首页</a> <i | |
| 54 | + class="fa fa-circle"></i></li> | |
| 55 | + <li><span class="active">权限管理</span> <i class="fa fa-circle"></i></li> | |
| 56 | + <li><a href="list.html" data-pjax>角色管理</a> <i class="fa fa-circle"></i></li> | |
| 57 | + <li><span class="active">分公司数据权限</span></li> | |
| 58 | + </ul> | |
| 59 | + | |
| 60 | + <div class="cmpy-auth-card"> | |
| 61 | + | |
| 62 | + <h4>角色信息</h4> | |
| 63 | + <table class="table"> | |
| 64 | + <tr> | |
| 65 | + <td> | |
| 66 | + 代码:<span id="roleCode"></span> | |
| 67 | + </td> | |
| 68 | + <td> | |
| 69 | + 名称:<span id="roleName"></span> | |
| 70 | + </td> | |
| 71 | + </tr> | |
| 72 | + </table> | |
| 73 | + </div> | |
| 74 | + <br><br> | |
| 75 | + <div class="cmpy-auth-card cmpy-list"> | |
| 76 | + </div> | |
| 77 | + | |
| 78 | + <div class="cmpy-auth-card" style="text-align: right;"> | |
| 79 | + <button type="button" class="btn btn-default">返回</button> | |
| 80 | + <button type="button" class="btn btn-primary saveBtn" ><i class="fa fa-check"></i>保存</button> | |
| 81 | + </div> | |
| 82 | + | |
| 83 | + <script id="role-company-authority-temp" type="text/html"> | |
| 84 | + {{each list as obj i}} | |
| 85 | + <div class="yunyin-company-panel"> | |
| 86 | + <h5 class="company">{{obj.name}}</h5> | |
| 87 | + {{each obj.childs as fgs i}} | |
| 88 | + <div class="sub-company" data-company="{{obj.name}}" data-id="{{fgs.upCode}}_{{fgs.businessCode}}">{{fgs.businessName}}</div> | |
| 89 | + {{/each}} | |
| 90 | + </div> | |
| 91 | + {{/each}} | |
| 92 | + </script> | |
| 93 | + | |
| 94 | +</div> | |
| 95 | + | |
| 96 | +<script> | |
| 97 | +$(function () { | |
| 98 | + var id = $.url().param('no') | |
| 99 | + ,roleObj; | |
| 100 | + | |
| 101 | + if(!id){ | |
| 102 | + alert('缺少主键'); | |
| 103 | + } | |
| 104 | + else{ | |
| 105 | + $.get('/role/'+id , function(obj){ | |
| 106 | + $('#roleCompanyAuthority #roleCode').text(obj.codeName); | |
| 107 | + $('#roleCompanyAuthority #roleName').text(obj.roleName); | |
| 108 | + }); | |
| 109 | + } | |
| 110 | + | |
| 111 | + | |
| 112 | + $.get('/business/all', function (rs) { | |
| 113 | + var baseCode; | |
| 114 | + //找到跟节点 | |
| 115 | + $.each(rs, function () { | |
| 116 | + if(this.upCode == 0){ | |
| 117 | + baseCode=this.businessCode; | |
| 118 | + return false; | |
| 119 | + } | |
| 120 | + }); | |
| 121 | + if(!baseCode){ | |
| 122 | + alert('大爷找不到跟节点,数据有问题吧!!!'); | |
| 123 | + return; | |
| 124 | + } | |
| 125 | + //提取二级节点 | |
| 126 | + var secondMap={}; | |
| 127 | + $.each(rs, function () { | |
| 128 | + if(this.upCode==baseCode){ | |
| 129 | + secondMap[this.businessCode] = { | |
| 130 | + name: this.businessName, | |
| 131 | + childs: [] | |
| 132 | + }; | |
| 133 | + } | |
| 134 | + }); | |
| 135 | + //分公司节点 | |
| 136 | + $.each(rs, function () { | |
| 137 | + if(secondMap[this.upCode]) | |
| 138 | + secondMap[this.upCode].childs.push(this); | |
| 139 | + }); | |
| 140 | + | |
| 141 | + //排序 | |
| 142 | + for(var sid in secondMap){ | |
| 143 | + secondMap[sid].childs.sort(naturalSort); | |
| 144 | + } | |
| 145 | + | |
| 146 | + var htmlStr=template('role-company-authority-temp', {list: get_vals(secondMap)}); | |
| 147 | + $('#roleCompanyAuthority .cmpy-list').html(htmlStr); | |
| 148 | + | |
| 149 | + //查询公司权限信息 | |
| 150 | + $get('/companyAuthority/all', {roleId_eq: id}, function (rs) { | |
| 151 | + //console.log(rs); | |
| 152 | + var dataId; | |
| 153 | + $.each(rs, function () { | |
| 154 | + dataId=this.companyCode+'_'+this.subCompanyCode; | |
| 155 | + $('.cmpy-list div.sub-company[data-id='+dataId+']').addClass('active'); | |
| 156 | + }); | |
| 157 | + }); | |
| 158 | + }); | |
| 159 | + | |
| 160 | + $('#roleCompanyAuthority').on('click', '.cmpy-list .sub-company', function () { | |
| 161 | + if($(this).hasClass('active')) | |
| 162 | + $(this).removeClass('active'); | |
| 163 | + else | |
| 164 | + $(this).addClass('active'); | |
| 165 | + }); | |
| 166 | + | |
| 167 | + var get_vals = function(json) { | |
| 168 | + var array = []; | |
| 169 | + for (var key in json) { | |
| 170 | + array.push(json[key]); | |
| 171 | + } | |
| 172 | + | |
| 173 | + return array; | |
| 174 | + } | |
| 175 | + | |
| 176 | + var naturalSort=function (a, b) { | |
| 177 | + return a.businessCode.localeCompare(b.businessCode); | |
| 178 | + } | |
| 179 | + | |
| 180 | + //保存 | |
| 181 | + $('#roleCompanyAuthority .saveBtn').on('click', function () { | |
| 182 | + var ats=$('.cmpy-list div.sub-company.active', '#roleCompanyAuthority') | |
| 183 | + ,data=[]; | |
| 184 | + var code; | |
| 185 | + $.each(ats, function () { | |
| 186 | + code = $(this).data('id').split('_'); | |
| 187 | + data.push({ | |
| 188 | + companyCode: code[0], | |
| 189 | + subCompanyCode: code[1], | |
| 190 | + companyName: $(this).data('company'), | |
| 191 | + subCompanyName: $(this).text() | |
| 192 | + }); | |
| 193 | + }); | |
| 194 | + | |
| 195 | + $post('/companyAuthority/save', {roleId: id, authJsonStr: JSON.stringify(data)}, function (rs) { | |
| 196 | + alert('保存成功!'); | |
| 197 | + }) | |
| 198 | + }); | |
| 199 | +}); | |
| 200 | 200 | </script> |
| 201 | 201 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/report/inoutstation.html
| ... | ... | @@ -169,44 +169,17 @@ |
| 169 | 169 | locale : 'zh-cn' |
| 170 | 170 | }); |
| 171 | 171 | |
| 172 | - $('#line').select2({ | |
| 173 | - ajax: { | |
| 174 | - url: '/realSchedule/findLine', | |
| 175 | - type: 'post', | |
| 176 | - dataType: 'json', | |
| 177 | - delay: 150, | |
| 178 | - data: function(params){ | |
| 179 | - return{line: params.term}; | |
| 180 | - }, | |
| 181 | - processResults: function (data) { | |
| 182 | - return { | |
| 183 | - results: data | |
| 184 | - }; | |
| 185 | - }, | |
| 186 | - cache: true | |
| 187 | - }, | |
| 188 | - templateResult: function(repo){ | |
| 189 | - if (repo.loading) return repo.text; | |
| 190 | - var h = '<span>'+repo.text+'</span>'; | |
| 191 | - return h; | |
| 192 | - }, | |
| 193 | - escapeMarkup: function (markup) { return markup; }, | |
| 194 | - minimumInputLength: 1, | |
| 195 | - templateSelection: function(repo){ | |
| 196 | - return repo.text; | |
| 197 | - }, | |
| 198 | - language: { | |
| 199 | - noResults: function(){ | |
| 200 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 201 | - }, | |
| 202 | - inputTooShort : function(e) { | |
| 203 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 204 | - }, | |
| 205 | - searching : function() { | |
| 206 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 207 | - } | |
| 172 | + | |
| 173 | + $.get('/basic/lineCode2Name',function(result){ | |
| 174 | + var data=[]; | |
| 175 | + | |
| 176 | + for(var code in result){ | |
| 177 | + data.push({id: code, text: result[code]}); | |
| 208 | 178 | } |
| 209 | - }); | |
| 179 | + console.log(data); | |
| 180 | + initPinYinSelect2('#line',data,''); | |
| 181 | + | |
| 182 | + }) | |
| 210 | 183 | |
| 211 | 184 | |
| 212 | 185 | $("#query").on("click",function(){ | ... | ... |
src/main/resources/static/pages/report/message/message.html
| ... | ... | @@ -112,44 +112,16 @@ |
| 112 | 112 | $("#date").val(year + "-0" + month + "-" + day); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | - $('#line').select2({ | |
| 116 | - ajax: { | |
| 117 | - url: '/realSchedule/findLine', | |
| 118 | - type: 'post', | |
| 119 | - dataType: 'json', | |
| 120 | - delay: 150, | |
| 121 | - data: function(params){ | |
| 122 | - return{line: params.term}; | |
| 123 | - }, | |
| 124 | - processResults: function (data) { | |
| 125 | - return { | |
| 126 | - results: data | |
| 127 | - }; | |
| 128 | - }, | |
| 129 | - cache: true | |
| 130 | - }, | |
| 131 | - templateResult: function(repo){ | |
| 132 | - if (repo.loading) return repo.text; | |
| 133 | - var h = '<span>'+repo.text+'</span>'; | |
| 134 | - return h; | |
| 135 | - }, | |
| 136 | - escapeMarkup: function (markup) { return markup; }, | |
| 137 | - minimumInputLength: 1, | |
| 138 | - templateSelection: function(repo){ | |
| 139 | - return repo.text; | |
| 140 | - }, | |
| 141 | - language: { | |
| 142 | - noResults: function(){ | |
| 143 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 144 | - }, | |
| 145 | - inputTooShort : function(e) { | |
| 146 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 147 | - }, | |
| 148 | - searching : function() { | |
| 149 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 150 | - } | |
| 115 | + $.get('/basic/lineCode2Name',function(result){ | |
| 116 | + var data=[]; | |
| 117 | + | |
| 118 | + for(var code in result){ | |
| 119 | + data.push({id: code, text: result[code]}); | |
| 151 | 120 | } |
| 152 | - }); | |
| 121 | + console.log(data); | |
| 122 | + initPinYinSelect2('#line',data,''); | |
| 123 | + | |
| 124 | + }) | |
| 153 | 125 | $('#code').select2({ |
| 154 | 126 | ajax: { |
| 155 | 127 | url: '/realSchedule/sreachVehic', | ... | ... |
src/main/resources/static/pages/report/oil/oilListMonth.html
| ... | ... | @@ -103,44 +103,16 @@ |
| 103 | 103 | $("#date").val(year + "-0" + month + "-" + day); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $('#line').select2({ | |
| 107 | - ajax: { | |
| 108 | - url: '/realSchedule/findLine', | |
| 109 | - dataType: 'json', | |
| 110 | - delay: 150, | |
| 111 | - data: function(params){ | |
| 112 | - return{line: params.term}; | |
| 113 | - }, | |
| 114 | - processResults: function (data) { | |
| 115 | - return { | |
| 116 | - results: data | |
| 117 | - }; | |
| 118 | - }, | |
| 119 | - cache: true | |
| 120 | - }, | |
| 121 | - templateResult: function(repo){ | |
| 122 | - if (repo.loading) return repo.text; | |
| 123 | - var h = '<span>'+repo.text+'</span>'; | |
| 124 | - return h; | |
| 125 | - }, | |
| 126 | - escapeMarkup: function (markup) { return markup; }, | |
| 127 | - minimumInputLength: 1, | |
| 128 | - templateSelection: function(repo){ | |
| 129 | - return repo.text; | |
| 130 | - }, | |
| 131 | - language: { | |
| 132 | - noResults: function(){ | |
| 133 | - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>'; | |
| 134 | - }, | |
| 135 | - inputTooShort : function(e) { | |
| 136 | - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>'; | |
| 137 | - }, | |
| 138 | - searching : function() { | |
| 139 | - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>'; | |
| 140 | - } | |
| 141 | - } | |
| 142 | - }); | |
| 143 | - | |
| 106 | + $.get('/basic/lineCode2Name',function(result){ | |
| 107 | + var data=[]; | |
| 108 | + | |
| 109 | + for(var code in result){ | |
| 110 | + data.push({id: code, text: result[code]}); | |
| 111 | + } | |
| 112 | + console.log(data); | |
| 113 | + initPinYinSelect2('#line',data,''); | |
| 114 | + | |
| 115 | + }) | |
| 144 | 116 | //查询 |
| 145 | 117 | $("#query").on('click',function(){ |
| 146 | 118 | var line = $("#line").val(); | ... | ... |
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html
| ... | ... | @@ -18,7 +18,7 @@ |
| 18 | 18 | <p class="date-str">{{dateStr}}</p> |
| 19 | 19 | <hr> |
| 20 | 20 | {{if expectStopTime!=null}} |
| 21 | - <a href="javascript:;" style="color: #07D;margin-right: 7px;">预计 {{expectStopTime}} 分钟到达终点</a> | |
| 21 | + <a href="javascript:;" style="color: #07D;margin-right: 7px;">预计 {{expectStopTime}} 分钟到达终点</a> | |
| 22 | 22 | {{/if}} |
| 23 | 23 | <a href="javascript:;" style="float: right;">轨迹回放</a> |
| 24 | 24 | </div> | ... | ... |