Commit 73bb096159f39d6e3b5eed7804f0a816da848a20

Authored by 徐烜
2 parents ab025e73 0f395614

Merge branch 'PSM-5' into qingpu

src/main/java/com/bsth/controller/BaseController.java
... ... @@ -3,6 +3,7 @@ package com.bsth.controller;
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.service.BaseService;
5 5 import com.bsth.service.schedule.utils.DataImportExportService;
  6 +import com.google.common.base.Splitter;
6 7 import org.springframework.beans.factory.annotation.Autowired;
7 8 import org.springframework.data.domain.Page;
8 9 import org.springframework.data.domain.PageRequest;
... ... @@ -17,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
17 18 import javax.servlet.http.HttpServletResponse;
18 19 import java.io.*;
19 20 import java.util.HashMap;
  21 +import java.util.List;
20 22 import java.util.Map;
21 23  
22 24 /**
... ... @@ -58,8 +60,12 @@ public class BaseController<T, ID extends Serializable> {
58 60 d = Direction.ASC;
59 61 else
60 62 d = Direction.DESC;
61   -
62   - return baseService.list(map, new PageRequest(page, size, new Sort(d, order)));
  63 +
  64 + // 允许多个字段排序,order可以写单个字段,也可以写多个字段
  65 + // 多个字段格式:{col1},{col2},{col3},....,{coln}
  66 + // 每个字段的排序方向都是一致,这个以后再看要不要改
  67 + List<String> list = Splitter.on(",").trimResults().splitToList(order);
  68 + return baseService.list(map, new PageRequest(page, size, new Sort(d, list)));
63 69 }
64 70  
65 71 /**
... ...
src/main/java/com/bsth/controller/schedule/SchedulePlanInfoController.java
... ... @@ -2,18 +2,9 @@ package com.bsth.controller.schedule;
2 2  
3 3 import com.bsth.controller.BaseController;
4 4 import com.bsth.entity.schedule.SchedulePlanInfo;
5   -import com.google.common.base.Splitter;
6   -import org.springframework.data.domain.Page;
7   -import org.springframework.data.domain.PageRequest;
8   -import org.springframework.data.domain.Sort;
9 5 import org.springframework.web.bind.annotation.RequestMapping;
10   -import org.springframework.web.bind.annotation.RequestMethod;
11   -import org.springframework.web.bind.annotation.RequestParam;
12 6 import org.springframework.web.bind.annotation.RestController;
13 7  
14   -import java.util.List;
15   -import java.util.Map;
16   -
17 8 /**
18 9 * Created by xu on 16/6/16.
19 10 */
... ... @@ -21,32 +12,4 @@ import java.util.Map;
21 12 @RequestMapping("spic")
22 13 public class SchedulePlanInfoController extends BaseController<SchedulePlanInfo, Long> {
23 14  
24   - /**
25   - *
26   - * @Title: list
27   - * @Description: TODO(多条件分页查询)
28   - * @param @param map 查询条件
29   - * @param @param page 页码
30   - * @param @param size 每页显示数量
31   - * @throws
32   - */
33   - @RequestMapping(method = RequestMethod.GET)
34   - public Page<SchedulePlanInfo> list(@RequestParam Map<String, Object> map,
35   - @RequestParam(defaultValue = "0") int page,
36   - @RequestParam(defaultValue = "10") int size,
37   - @RequestParam(defaultValue = "id") String order,
38   - @RequestParam(defaultValue = "DESC") String direction){
39   -
40   - Sort.Direction d;
41   -
42   - if(null != direction && direction.equals("ASC"))
43   - d = Sort.Direction.ASC;
44   - else
45   - d = Sort.Direction.DESC;
46   -
47   - // order由 col1,col2,col3 这样传入
48   - List<String> list = Splitter.on(",").trimResults().splitToList(order);
49   - return baseService.list(map, new PageRequest(page, size, new Sort(d, list)));
50   - }
51   -
52 15 }
... ...
src/main/java/com/bsth/controller/sys/UserLineController.java 0 → 100644
  1 +package com.bsth.controller.sys;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import com.bsth.controller.BaseController;
  13 +import com.bsth.entity.sys.UserLine;
  14 +import com.bsth.service.sys.UserLineService;
  15 +
  16 +@RestController
  17 +@RequestMapping("userline")
  18 +public class UserLineController extends BaseController<UserLine, Integer> {
  19 +
  20 +
  21 + @Autowired
  22 + private UserLineService service;
  23 +
  24 + @RequestMapping(value = "/userRoleTree", method = RequestMethod.GET)
  25 + public List<Map<String, Object>> userRoleTree(@RequestParam Map<String, Object> map){
  26 +
  27 + return service.userRoleTree(map);
  28 +
  29 + }
  30 +
  31 + /**
  32 + *
  33 + * @Title: setLineCasts
  34 + *
  35 + * @Description: TODO(为角色设置模块,全量覆盖)
  36 + *
  37 + * @param @param userId 用户ID
  38 + *
  39 + * @param @param mIds 线路ID字符串(1,2,3,4)
  40 + *
  41 + * @throws
  42 + */
  43 + @RequestMapping(value = "/setLineCasts", method = RequestMethod.POST)
  44 + public Map<String, Object> setLineCasts(@RequestParam Integer userId,@RequestParam String mIds){
  45 + return service.setLineCasts(userId, mIds);
  46 + }
  47 +}
... ...
src/main/java/com/bsth/entity/sys/UserLine.java 0 → 100644
  1 +package com.bsth.entity.sys;
  2 +
  3 +import javax.persistence.Entity;
  4 +import javax.persistence.GeneratedValue;
  5 +import javax.persistence.GenerationType;
  6 +import javax.persistence.Id;
  7 +import javax.persistence.ManyToOne;
  8 +import javax.persistence.Table;
  9 +
  10 +import com.bsth.entity.Line;
  11 +
  12 +/**
  13 + *
  14 + * @ClassName: Line(用户线路分配实体类)
  15 + *
  16 + * @Description: TODO(用户线路分配实体类)
  17 + *
  18 + * @Author bsth@lq
  19 + *
  20 + * @Date 2016年8月26日 09:03:33
  21 + *
  22 + * @Version 公交调度系统BS版 0.1
  23 + *
  24 + */
  25 +
  26 +@Entity
  27 +@Table(name = "bsth_c_user_line")
  28 +public class UserLine {
  29 +
  30 + @Id
  31 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  32 + private Integer id;
  33 +
  34 + @ManyToOne
  35 + private Line line;
  36 +
  37 + @ManyToOne
  38 + private SysUser user;
  39 +
  40 + public Line getLine() {
  41 + return line;
  42 + }
  43 +
  44 + public Integer getId() {
  45 + return id;
  46 + }
  47 +
  48 + public void setId(Integer id) {
  49 + this.id = id;
  50 + }
  51 +
  52 + public void setLine(Line line) {
  53 + this.line = line;
  54 + }
  55 +
  56 + public SysUser getUser() {
  57 + return user;
  58 + }
  59 +
  60 + public void setUser(SysUser user) {
  61 + this.user = user;
  62 + }
  63 +}
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -108,7 +108,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
108 108 *
109 109 * @return List<Object[]>
110 110 */
111   - @Query(value = "SELECT s.b_jwpoints FROM (" +
  111 + @Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" +
112 112 "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " +
113 113 "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)
114 114 List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction);
... ...
src/main/java/com/bsth/repository/sys/UserLineRepository.java 0 → 100644
  1 +package com.bsth.repository.sys;
  2 +
  3 +import org.springframework.data.jpa.repository.Modifying;
  4 +import org.springframework.data.jpa.repository.Query;
  5 +import org.springframework.stereotype.Repository;
  6 +import org.springframework.transaction.annotation.Transactional;
  7 +
  8 +import com.bsth.entity.sys.UserLine;
  9 +import com.bsth.repository.BaseRepository;
  10 +
  11 +
  12 +@Repository
  13 +public interface UserLineRepository extends BaseRepository<UserLine, Integer>{
  14 +
  15 + @Modifying
  16 + @Query(value="DELETE FROM bsth_c_user_line WHERE user = ?1", nativeQuery=true)
  17 + public void del(int userId);
  18 +
  19 +}
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -457,7 +457,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
457 457  
458 458 Map<String, Object> tempM = new HashMap<String,Object>();
459 459  
460   - tempM.put("bJwpoints", list.get(i));
  460 + tempM.put("bJwpoints", list.get(i)[0]);
  461 +
  462 + tempM.put("stationName", list.get(i)[1]);
461 463  
462 464 resultList.add(tempM);
463 465  
... ...
src/main/java/com/bsth/service/sys/UserLineService.java 0 → 100644
  1 +package com.bsth.service.sys;
  2 +import java.util.List;
  3 +import java.util.Map;
  4 +
  5 +import com.bsth.entity.sys.UserLine;
  6 +import com.bsth.service.BaseService;
  7 +
  8 +
  9 +
  10 +/**
  11 + *
  12 + * @Interface: LineService(线路service业务层实现接口)
  13 + *
  14 + * @extends : BaseService
  15 + *
  16 + * @Description: TODO(线路service业务层实现接口)
  17 + *
  18 + * @Author bsth@lq
  19 + *
  20 + * @Date 2016年4月28日 上午9:21:17
  21 + *
  22 + * @Version 公交调度系统BS版 0.1
  23 + *
  24 + */
  25 +public interface UserLineService extends BaseService<UserLine, Integer> {
  26 +
  27 + List<Map<String, Object>> userRoleTree(Map<String, Object> map);
  28 +
  29 + Map<String, Object> setLineCasts(Integer userId, String mIds);
  30 +
  31 +}
... ...
src/main/java/com/bsth/service/sys/impl/UserLineServiceImpl.java 0 → 100644
  1 +package com.bsth.service.sys.impl;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.HashMap;
  5 +import java.util.HashSet;
  6 +import java.util.Iterator;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +import java.util.Set;
  10 +
  11 +import org.apache.catalina.User;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.stereotype.Service;
  16 +import org.springframework.transaction.annotation.Transactional;
  17 +
  18 +import com.bsth.common.ResponseCode;
  19 +import com.bsth.entity.Line;
  20 +import com.bsth.entity.search.CustomerSpecs;
  21 +import com.bsth.entity.sys.Role;
  22 +import com.bsth.entity.sys.SysUser;
  23 +import com.bsth.entity.sys.UserLine;
  24 +import com.bsth.repository.LineRepository;
  25 +import com.bsth.repository.sys.RoleRepository;
  26 +import com.bsth.repository.sys.SysUserRepository;
  27 +import com.bsth.repository.sys.UserLineRepository;
  28 +import com.bsth.service.impl.BaseServiceImpl;
  29 +import com.bsth.service.sys.UserLineService;
  30 +
  31 +
  32 +/**
  33 + * Created by xu on 16/5/31.
  34 + */
  35 +@Service
  36 +public class UserLineServiceImpl extends BaseServiceImpl<UserLine, Integer> implements UserLineService {
  37 +
  38 + @Autowired
  39 + private UserLineRepository repository;
  40 +
  41 + @Autowired
  42 + private SysUserRepository userRepository;
  43 +
  44 + @Autowired
  45 + private RoleRepository roleRepository;
  46 +
  47 + @Autowired
  48 + private LineRepository lineRepository;
  49 +
  50 + Logger logger = LoggerFactory.getLogger(this.getClass());
  51 +
  52 + @Override
  53 + public List<Map<String, Object>> userRoleTree(Map<String, Object> map) {
  54 +
  55 + CustomerSpecs spec = new CustomerSpecs<Role>(map);
  56 +
  57 + List<Role> roleLine = roleRepository.findAll(spec);
  58 +
  59 + int size = roleLine.size();
  60 +
  61 + List<Map<String, Object>> list = new ArrayList<>();
  62 +
  63 + if(size>0){
  64 +
  65 + for(int i = 0; i <size;i++) {
  66 +
  67 + Map<String, Object> tempM = new HashMap<String, Object>();
  68 + int roleId = roleLine.get(i).getId();
  69 + String roleName = roleLine.get(i).getRoleName();
  70 + tempM.put("name", roleName);
  71 + tempM.put("text", roleName);
  72 + tempM.put("icon", "fa fa-database");
  73 + tempM.put("pId",null);
  74 + tempM.put("id", 100+roleId);
  75 + tempM.put("groupType", "1");
  76 + tempM.put("enable", true);
  77 + Set<SysUser> user = roleLine.get(i).getUsers();
  78 + Iterator<SysUser> it = user.iterator();
  79 + List<Map<String, Object>> roleChildren = new ArrayList<>();
  80 + while(it.hasNext()) {
  81 + Map<String, Object> userMap = new HashMap<String, Object>();
  82 + SysUser tempU = it.next();
  83 + String userName = tempU.getUserName();
  84 + int userId = tempU.getId();
  85 + userMap.put("name", userName);
  86 + userMap.put("text", userName);
  87 + userMap.put("icon", "fa fa-user");
  88 + userMap.put("pId",100+roleId);
  89 + userMap.put("id", 1000+userId);
  90 + userMap.put("userId", userId);
  91 + userMap.put("groupType", "2");
  92 + userMap.put("enable", true);
  93 + roleChildren.add(userMap);
  94 +
  95 + }
  96 + tempM.put("children", roleChildren);
  97 + list.add(tempM);
  98 + }
  99 +
  100 + }
  101 +
  102 + return list;
  103 + }
  104 +
  105 + @Override
  106 + @Transactional
  107 + public Map<String, Object> setLineCasts(Integer userId, String mIds) {
  108 + Map<String, Object> map = new HashMap<>();
  109 +
  110 + try {
  111 +
  112 + repository.del(userId);
  113 +
  114 + SysUser user = userRepository.findOne(userId);
  115 +
  116 + List<Integer> idList = new ArrayList<>();
  117 + String[] array = mIds.split(",");
  118 + for (String id : array) {
  119 + if (null == id || id.trim().equals(""))
  120 + continue;
  121 + idList.add(Integer.parseInt(id));
  122 + }
  123 +
  124 + int size = idList.size();
  125 +
  126 + if(size>0) {
  127 +
  128 + for(int i = 0 ; i<size;i++) {
  129 +
  130 + UserLine entity = new UserLine();
  131 +
  132 + int lineId = idList.get(i);
  133 +
  134 + Line line = lineRepository.findOne(lineId);
  135 +
  136 + entity.setUser(user);
  137 +
  138 + entity.setLine(line);
  139 +
  140 + repository.save(entity);
  141 + }
  142 +
  143 + }
  144 +
  145 + map.put("status", ResponseCode.SUCCESS);
  146 +
  147 + } catch (Exception e) {
  148 +
  149 + logger.error("", e);
  150 + map.put("status", ResponseCode.ERROR);
  151 + }
  152 +
  153 + return map;
  154 + }
  155 +}
... ...
src/main/resources/static/pages/base/line/add.html
... ... @@ -189,6 +189,24 @@
189 189 </div>
190 190 </div>
191 191  
  192 + <!-- 起始站名称 -->
  193 + <div class="form-group">
  194 + <label class="control-label col-md-3"> 起始站名称: </label>
  195 + <div class="col-md-4">
  196 + <input type="text" class="form-control" name="startStationName" id="startStationNameInput" placeholder="起始站名称">
  197 + <span class="help-block"> 说明 :上行起始站名称 </span>
  198 + </div>
  199 + </div>
  200 +
  201 + <!-- 终点站名称 -->
  202 + <div class="form-group">
  203 + <label class="control-label col-md-3"> 终点站名称: </label>
  204 + <div class="col-md-4">
  205 + <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称">
  206 + <span class="help-block"> 说明 :上行终点站名称 </span>
  207 + </div>
  208 + </div>
  209 +
192 210 <!-- 设备线路编码 -->
193 211 <div class="form-group">
194 212 <label class="control-label col-md-3"> 设备线路编码: </label>
... ... @@ -221,27 +239,12 @@
221 239 </div>
222 240 </div>
223 241  
224   - <!-- 起始站名称 -->
225   - <div class="form-group">
226   - <label class="control-label col-md-3"> 起始站名称: </label>
227   - <div class="col-md-4">
228   - <input type="text" class="form-control" name="startStationName" id="startStationNameInput" placeholder="起始站名称">
229   - </div>
230   - </div>
231   -
232   - <!-- 终点站名称 -->
233   - <div class="form-group">
234   - <label class="control-label col-md-3"> 终点站名称: </label>
235   - <div class="col-md-4">
236   - <input type="text" class="form-control" name="endStationName" id="endStationNameInput" placeholder="终点站名称">
237   - </div>
238   - </div>
239   -
240 242 <!-- 起始站首班车时间 -->
241 243 <div class="form-group">
242 244 <label class="control-label col-md-3"> 起始站首班车时间: </label>
243 245 <div class="col-md-4">
244 246 <input type="text" class="form-control" name="startStationFirstTime" id="startStationFirstTimeInput" placeholder="起始站首班车时间">
  247 + <span class="help-block"> 例如 :06:00 </span>
245 248 </div>
246 249 </div>
247 250  
... ... @@ -250,6 +253,7 @@
250 253 <label class="control-label col-md-3"> 起始站末班车时间: </label>
251 254 <div class="col-md-4">
252 255 <input type="text" class="form-control" name="StartStationEndTime" id="StartStationEndTimeInput" placeholder="起始站末班车时间 ">
  256 + <span class="help-block"> 例如 :17:00 </span>
253 257 </div>
254 258 </div>
255 259  
... ... @@ -259,6 +263,7 @@
259 263 <label class="control-label col-md-3"> 终点站首班车时间: </label>
260 264 <div class="col-md-4">
261 265 <input type="text" class="form-control" name="endStationFirstTime" id="endStationFirstTimeInput" placeholder="终点站首班车时间">
  266 + <span class="help-block"> 例如 :05:00 </span>
262 267 </div>
263 268 </div>
264 269  
... ... @@ -267,6 +272,7 @@
267 272 <label class="control-label col-md-3"> 终点站末班车时间: </label>
268 273 <div class="col-md-4">
269 274 <input type="text" class="form-control" name="endStationEndTime" id="endStationEndTimeInput" placeholder="终点站末班车时间 ">
  275 + <span class="help-block"> 例如 :18:00 </span>
270 276 </div>
271 277 </div>
272 278  
... ...
src/main/resources/static/pages/base/line/js/line-add-form.js
... ... @@ -162,7 +162,23 @@ $(function(){
162 162 required : true,
163 163  
164 164 // 最大长度
165   - maxlength: 20
  165 + maxlength: 30
  166 + },
  167 +
  168 + // 英文名称
  169 + 'es' : {
  170 +
  171 + // 最大长度
  172 + maxlength: 30
  173 +
  174 + },
  175 +
  176 + // 线路简称
  177 + 'shortName' : {
  178 +
  179 + // 最大长度
  180 + maxlength: 30
  181 +
166 182 },
167 183  
168 184 // 线路编码
... ... @@ -172,9 +188,49 @@ $(function(){
172 188 required : true,
173 189  
174 190 // 最大长度
175   - maxlength: 20
  191 + maxlength: 30
  192 + },
  193 +
  194 + // 所属公司
  195 + 'company' : {
  196 +
  197 + // 最大长度
  198 + maxlength: 30
176 199 },
177 200  
  201 + // 线路性质
  202 + 'nature' : {
  203 +
  204 + // 最大长度
  205 + maxlength: 30
  206 +
  207 + },
  208 +
  209 + // 线路等级
  210 + 'level' : {
  211 +
  212 + // 最大长度
  213 + maxlength: 30
  214 +
  215 + },
  216 +
  217 + // 起始站名称
  218 + 'startStationName' : {
  219 +
  220 + // 最大长度
  221 + maxlength: 30
  222 +
  223 + },
  224 +
  225 + // 终点站名称
  226 + 'endStationName' : {
  227 +
  228 + // 最大长度
  229 + maxlength: 30
  230 +
  231 + },
  232 +
  233 +
178 234 // 起始站调度电话
179 235 'startPhone' : {
180 236  
... ... @@ -185,7 +241,10 @@ $(function(){
185 241 digits : true,
186 242  
187 243 // 电话号码格式
188   - isPhone : true
  244 + isPhone : true,
  245 +
  246 + // 最大长度
  247 + maxlength: 30
189 248 },
190 249  
191 250 // 终点站调度电话
... ... @@ -198,7 +257,10 @@ $(function(){
198 257 digits : true,
199 258  
200 259 // 电话号码格式
201   - isPhone : true
  260 + isPhone : true,
  261 +
  262 + // 最大长度
  263 + maxlength: 30
202 264 },
203 265  
204 266 // 开辟日期
... ... @@ -221,21 +283,27 @@ $(function(){
221 283 // 上海市线路编码
222 284 'shanghaiLinecode' : {
223 285  
224   - // 必须输入合法的数字(负数,小数)。
  286 + /*// 必须输入合法的数字(负数,小数)。
225 287 number : true,
226 288  
227 289 // 必须输入整数。
228   - digits : true
  290 + digits : true,*/
  291 +
  292 + // 最大长度
  293 + maxlength: 30
229 294 },
230 295  
231 296 // 设备线路编码
232 297 'eqLinecode' : {
233 298  
234   - // 必须输入合法的数字(负数,小数)。
  299 + /*// 必须输入合法的数字(负数,小数)。
235 300 number : true,
236 301  
237 302 // 必须输入整数。
238   - digits : true
  303 + digits : true,*/
  304 +
  305 + // 最大长度
  306 + maxlength: 30
239 307 },
240 308  
241 309 // 车辆总数
... ... @@ -245,7 +313,10 @@ $(function(){
245 313 number : true,
246 314  
247 315 // 必须输入整数。
248   - digits : true
  316 + digits : true,
  317 +
  318 + // 最大长度
  319 + maxlength: 8
249 320 },
250 321  
251 322 // 空调车辆数
... ... @@ -255,7 +326,10 @@ $(function(){
255 326 number : true,
256 327  
257 328 // 必须输入整数。
258   - digits : true
  329 + digits : true,
  330 +
  331 + // 最大长度
  332 + maxlength: 8
259 333 },
260 334  
261 335 // 普通车辆数
... ... @@ -265,7 +339,10 @@ $(function(){
265 339 number : true,
266 340  
267 341 // 必须输入整数。
268   - digits : true
  342 + digits : true,
  343 +
  344 + // 最大长度
  345 + maxlength: 8
269 346 },
270 347  
271 348 // 描述/说明
... ...
src/main/resources/static/pages/base/line/js/line-list-table.js
... ... @@ -14,71 +14,16 @@
14 14  
15 15 (function(){
16 16  
17   - /** 填充公司下拉框选择值 */
18   - $get('/business/all', {upCode_eq: '77'}, function(array){
19   -
20   - // 公司下拉options属性值
21   - var options = '<option value="">请选择...</option>';
22   -
23   - // 遍历array
24   - $.each(array, function(i,d){
25   -
26   - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
27   -
28   - });
29   -
30   - // 填充公司下拉框options
31   - $('#companySelect').html(options)
32   -
33   - /** 闵行没下属公司,这里暂时注释公司值改变事件 */
34   - //$('#companySelect').html(options).on('change', setbrancheCompanySelectOptions);
35   -
36   - });
37   -
38   - /** 填充分公司下拉框。--- 闵行没下属公司,这里暂时注释*/
39   - /* setbrancheCompanySelectOptions();*/
40   -
41   - /** 填充分公司下拉框选择值 */
42   - function setbrancheCompanySelectOptions(){
43   -
44   - // 获取公司下拉框选择值
45   - var businessCode = $('#companySelect').val();
46   -
47   - // 分公司下拉框options属性值
48   - var options = '<option value="">请选择...</option>';
49   -
50   - // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码
51   - if(businessCode == null || businessCode ==''){
52   -
53   - // 填充分公司下拉框options
54   - $('#brancheCompanySelect').html(options);
55   -
56   - } else {
57   -
58   - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */
59   - $get('/business/all', {upCode_eq: businessCode}, function(array){
60   -
61   - // 遍历array
62   - $.each(array, function(i,d){
63   -
64   - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
65   -
66   - // 填充分公司下拉框options
67   - $('#brancheCompanySelect').html(options);
68   -
69   - });
70   - });
71   - }
72   - }
73   -
74 17 /** page : 当前页;initPag : */
75 18 var page = 0,initPag;
76 19  
77 20 // 选择框
78 21 var icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'};
79 22  
  23 + $('#destroy').val(0);
  24 +
80 25 /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */
81   - loadTableDate(null,true);
  26 + loadTableDate({'destroy_eq':0},true);
82 27  
83 28 /** 重置按钮事件 */
84 29 $('tr.filter .filter-cancel').on('click',function() {
... ... @@ -161,8 +106,6 @@
161 106 // 异步请求获取表格数据
162 107 $.get('/line',params,function(result){
163 108  
164   - debugger;
165   -
166 109 // 添加序号
167 110 result.content.page = page;
168 111  
... ... @@ -258,6 +201,64 @@
258 201 });
259 202 }
260 203  
  204 + /** 填充公司下拉框选择值 */
  205 + $get('/business/all', {upCode_eq: '77'}, function(array){
  206 +
  207 + // 公司下拉options属性值
  208 + var options = '<option value="">请选择...</option>';
  209 +
  210 + // 遍历array
  211 + $.each(array, function(i,d){
  212 +
  213 + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
  214 +
  215 + });
  216 +
  217 + // 填充公司下拉框options
  218 + $('#companySelect').html(options)
  219 +
  220 + /** 闵行没下属公司,这里暂时注释公司值改变事件 */
  221 + //$('#companySelect').html(options).on('change', setbrancheCompanySelectOptions);
  222 +
  223 + });
  224 +
  225 + /** 填充分公司下拉框。--- 闵行没下属公司,这里暂时注释*/
  226 + /* setbrancheCompanySelectOptions();*/
  227 +
  228 + /** 填充分公司下拉框选择值 */
  229 + function setbrancheCompanySelectOptions(){
  230 +
  231 + // 获取公司下拉框选择值
  232 + var businessCode = $('#companySelect').val();
  233 +
  234 + // 分公司下拉框options属性值
  235 + var options = '<option value="">请选择...</option>';
  236 +
  237 + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码
  238 + if(businessCode == null || businessCode ==''){
  239 +
  240 + // 填充分公司下拉框options
  241 + $('#brancheCompanySelect').html(options);
  242 +
  243 + } else {
  244 +
  245 + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */
  246 + $get('/business/all', {upCode_eq: businessCode}, function(array){
  247 +
  248 + // 遍历array
  249 + $.each(array, function(i,d){
  250 +
  251 + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
  252 +
  253 + // 填充分公司下拉框options
  254 + $('#brancheCompanySelect').html(options);
  255 +
  256 + });
  257 + });
  258 + }
  259 + }
  260 +
  261 +
261 262 /** 生成行单,这里暂时只做了单选生成。 */
262 263 $('#datatable_ajax_tools #createUsingSingle').on('click', function() {
263 264  
... ...
src/main/resources/static/pages/base/line/list.html
... ... @@ -110,7 +110,7 @@
110 110 </td>
111 111 <td>
112 112 <!-- 这里没使用字典表,暂时写在页面上 -->
113   - <select class="form-control form-filter " name="destroy_eq">
  113 + <select class="form-control form-filter " id='destroy' name="destroy_eq">
114 114 <option value="">请选择...</option>
115 115 <option value="0">运营</option>
116 116 <option value="1">撤销</option>
... ... @@ -291,4 +291,5 @@
291 291 </tr>
292 292 {{/if}}
293 293 </script>
294   -<script src="/pages/base/line/js/line-list-table.js"></script>
295 294 \ No newline at end of file
  295 +<script src="/pages/base/line/js/line-list-table.js"></script>
  296 +<!-- <a href="/pages/base/stationroute/list.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 查看 </a> -->
296 297 \ No newline at end of file
... ...
src/main/resources/static/pages/base/linecast/cast.html 0 → 100644
  1 +<link href="/pages/base/linecast/css/cast.css" rel="stylesheet" type="text/css" />
  2 +
  3 +<script type="text/javascript" src="/pages/base/linecast/js/jquery.quicksearch.js"></script>
  4 +
  5 +<div class="page-head">
  6 + <div class="page-title">
  7 + <h1>线路分配</h1>
  8 + </div>
  9 +</div>
  10 +<ul class="page-breadcrumb breadcrumb">
  11 + <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
  12 + <li><span class="active">权限管理</span> <i class="fa fa-circle"></i></li>
  13 + <li><span class="active">线路分配</span></li>
  14 +</ul>
  15 +
  16 +<div class="row">
  17 + <div class="col-md-4" style="padding-right: 0px;">
  18 + <div class="portlet light bordered" style="min-height: 520px;">
  19 + <div class="portlet-title">
  20 + <div class="caption">
  21 + <i class="fa fa-users font-dark"></i>
  22 + <span class="caption-subject font-dark sbold uppercase">用户菜单</span>
  23 + </div>
  24 + </div>
  25 + <div class="portlet-body">
  26 + <div id="modules_tree" ></div>
  27 + </div>
  28 + </div>
  29 + </div>
  30 + <div class="col-md-6" style="padding-left: 0px;">
  31 + <div class="portlet light bordered" style="height: 520px;">
  32 + <div class="portlet-body" style="min-height: 200px;" id="init-text">
  33 + <div class="text-info" style="text-align: center;line-height: 200px;">
  34 + <i class="fa fa-info"></i> 单击节点查看详细
  35 + </div>
  36 + </div>
  37 +
  38 + <div style="display:none" id="line-cast">
  39 + <!-- BEGIN PORTLET-->
  40 + <div class="portlet light bordered">
  41 + <div class="portlet-title">
  42 + <div class="caption">
  43 + <i class="icon-bar-chart font-green"></i>
  44 + <span class="caption-subject font-green bold uppercase">线路配置</span>
  45 + </div>
  46 + <div class="actions">
  47 + <button class="btn green btn-circle btn-sm" disabled="disabled" id="saveModuleSett"><i class="fa fa-check"></i> 保存修改</button>
  48 + </div>
  49 + </div>
  50 + <div class="portlet-body">
  51 + <div class="form-group last" >
  52 + <div>
  53 + <select multiple="multiple" class="multi-select" id="moduleSettSelect" ></select>
  54 + </div>
  55 + </div>
  56 + </div>
  57 + </div>
  58 + </div>
  59 + </div>
  60 + </div>
  61 +</div>
  62 +
  63 +<script type="text/html" id="left_line_cast">
  64 +
  65 +</script>
  66 +
  67 +<script>
  68 +
  69 +$(function(){
  70 +
  71 + getTreeData(function(treeData){
  72 +
  73 + //初始化树
  74 + $('#modules_tree').on('loaded.jstree', function(e, data){close_all();}).jstree({
  75 + 'core' : {
  76 + 'themes' : {
  77 + 'responsive': false
  78 + },
  79 + 'data': treeData,
  80 + 'multiple':false
  81 + },
  82 + 'types' : {
  83 + "default" : {
  84 + "icon" : false
  85 + },
  86 + 'enable_true' : {
  87 + "icon" : 'fa fa-check icon-lg'
  88 + },
  89 + 'enable_false' : {
  90 + 'icon' : 'fa fa-close icon-lg'
  91 + },
  92 + 'group':{
  93 + 'icon' : 'fa fa-object-group icon-lg'
  94 + }
  95 + },
  96 + 'plugins': ['types']
  97 + }).on('select_node.jstree', jstreeClick);
  98 + });
  99 +
  100 + $('.tooltips').tooltip();
  101 +
  102 +});
  103 +
  104 +function jstreeClick(){
  105 +
  106 + var selected = getCurrSelNode();
  107 +
  108 + var obj = selected[0].original;
  109 +
  110 + $('#saveModuleSett').attr('disabled', 'disabled');
  111 +
  112 + if(obj.pId==null) {
  113 +
  114 + $('#line-cast').hide();
  115 +
  116 + $('#init-text').show();
  117 + }else {
  118 +
  119 + $('#line-cast').show();
  120 +
  121 + $('#init-text').hide();
  122 +
  123 + var userId = obj.userId;
  124 +
  125 + getModuleTreeData(userId);
  126 +
  127 + }
  128 +
  129 +}
  130 +
  131 +function getCurrSelNode(){
  132 +
  133 + var array = [];
  134 +
  135 + try {
  136 +
  137 + array = $.jstree.reference("#modules_tree").get_selected(true);
  138 +
  139 + } catch (e) {
  140 +
  141 + console.log(e);
  142 +
  143 + }
  144 +
  145 + return array;
  146 +}
  147 +
  148 +function close_all(){
  149 +
  150 + $.jstree.reference("#modules_tree").close_all();
  151 +
  152 +}
  153 +
  154 +
  155 +
  156 +function getTreeData(cb){
  157 +
  158 + var treeData = [];
  159 +
  160 + $get('/userline/userRoleTree',null, function(arr){
  161 +
  162 + //转换为jsTree想要的数据格式
  163 + treeData = createTreeData(arr);
  164 +
  165 + cb && cb(treeData)
  166 + });
  167 +}
  168 +
  169 +function getModuleTreeData(userId){
  170 +
  171 +
  172 + $get('/line/all',null, function(linedata){
  173 +
  174 + $get('/userline/all',{'user.id_eq':userId}, function(userlinedata){
  175 +
  176 + var options = '';
  177 +
  178 + var len = userlinedata.length;
  179 +
  180 + $.each(linedata, function(i, g){
  181 +
  182 + //是否被当前用户持有
  183 + var selected = '';
  184 +
  185 + if(len>0) {
  186 +
  187 + for(var j = 0;j<userlinedata.length;j++ ) {
  188 +
  189 + if(userlinedata[j].line.id==g.id){
  190 +
  191 + selected = 'selected';
  192 +
  193 + break;
  194 +
  195 + }
  196 +
  197 + }
  198 +
  199 + }
  200 +
  201 + options += '<option value="'+g.id+'" ' + selected +'>'+g.name+'</option>'
  202 +
  203 + });
  204 +
  205 + //初始化multiSelect
  206 + $('#moduleSettSelect').html(options).multiSelect({
  207 + selectableOptgroup: true,
  208 +
  209 + selectableFooter: "<div class='multi-custom-header-left'>未分配</div>",
  210 + selectionFooter: "<div class='multi-custom-header-right'>已分配</div>",
  211 +
  212 + selectableHeader: "<input type='text' class='search-input' style='width: 221px;' autocomplete='off' placeholder='搜索线路'>",
  213 + selectionHeader: "<input type='text' class='search-input' style='width: 221px;' autocomplete='off' placeholder='搜索线路'>",
  214 + afterInit: function(ms){
  215 + var that = this,
  216 + $selectableSearch = that.$selectableUl.prev(),
  217 + $selectionSearch = that.$selectionUl.prev(),
  218 + selectableSearchString = '#'+that.$container.attr('id')+' .ms-elem-selectable:not(.ms-selected)',
  219 + selectionSearchString = '#'+that.$container.attr('id')+' .ms-elem-selection.ms-selected';
  220 +
  221 + that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
  222 + .on('keydown', function(e){
  223 + if (e.which === 40){
  224 + that.$selectableUl.focus();
  225 + return false;
  226 + }
  227 + });
  228 +
  229 + that.qs2 = $selectionSearch.quicksearch(selectionSearchString)
  230 + .on('keydown', function(e){
  231 + if (e.which == 40){
  232 + that.$selectionUl.focus();
  233 + return false;
  234 + }
  235 + });
  236 + },
  237 + afterSelect: function(){
  238 + this.qs1.cache();
  239 + this.qs2.cache();
  240 + },
  241 + afterDeselect: function(){
  242 + this.qs1.cache();
  243 + this.qs2.cache();
  244 + }
  245 + }).on('change',function(){
  246 +
  247 + if( $(this).val() ==null || $(this).val().length > 0)
  248 + $('#saveModuleSett').removeAttr('disabled');
  249 + else
  250 + $('#saveModuleSett').attr('disabled', 'disabled');
  251 + });
  252 +
  253 + $('#moduleSettSelect').multiSelect('refresh');
  254 +
  255 + });
  256 +
  257 + });
  258 +}
  259 +
  260 +
  261 +$('#saveModuleSett').on('click', function(){
  262 + if($(this).attr('disabled'))
  263 + return;
  264 +
  265 + var ids = '';
  266 +
  267 + if($('#moduleSettSelect').val() !=null) {
  268 +
  269 + $.each($('#moduleSettSelect').val(), function(i, mId){
  270 + ids += mId + ',';
  271 + });
  272 +
  273 + }
  274 +
  275 + var selected = getCurrSelNode();
  276 +
  277 + var obj = selected[0].original;
  278 +
  279 + if(obj) {
  280 +
  281 + $post('/userline/setLineCasts', {'userId': obj.userId,mIds: ids}, function(){
  282 + $('#saveModuleSett').attr('disabled', 'disabled');
  283 + layer.msg('修改成功!');
  284 + });
  285 +
  286 + }
  287 +
  288 +});
  289 +</script>
0 290 \ No newline at end of file
... ...
src/main/resources/static/pages/base/linecast/css/cast.css 0 → 100644
  1 +.jstree-default .jstree-hovered{
  2 + background-color: rgba(101, 155, 224, 0.19);
  3 +}
  4 +
  5 +.jstree-default .jstree-clicked {
  6 + background-color: #659BE0;
  7 + color: white;
  8 +}
  9 +.layui-layer-cfm-delete .layui-layer-btn0{
  10 + background-color: #e73d4a;
  11 + border-color: #CE3643;
  12 +}
0 13 \ No newline at end of file
... ...
src/main/resources/static/pages/base/linecast/js/jquery.quicksearch.js 0 → 100644
  1 +(function($, window, document, undefined) {
  2 + $.fn.quicksearch = function (target, opt) {
  3 +
  4 + var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({
  5 + delay: 100,
  6 + selector: null,
  7 + stripeRows: null,
  8 + loader: null,
  9 + noResults: '',
  10 + matchedResultsCount: 0,
  11 + bind: 'keyup',
  12 + onBefore: function () {
  13 + return;
  14 + },
  15 + onAfter: function () {
  16 + return;
  17 + },
  18 + show: function () {
  19 + this.style.display = "";
  20 + },
  21 + hide: function () {
  22 + this.style.display = "none";
  23 + },
  24 + prepareQuery: function (val) {
  25 + return val.toLowerCase().split(' ');
  26 + },
  27 + testQuery: function (query, txt, _row) {
  28 + for (var i = 0; i < query.length; i += 1) {
  29 + if (txt.indexOf(query[i]) === -1) {
  30 + return false;
  31 + }
  32 + }
  33 + return true;
  34 + }
  35 + }, opt);
  36 +
  37 + this.go = function () {
  38 +
  39 + var i = 0,
  40 + numMatchedRows = 0,
  41 + noresults = true,
  42 + query = options.prepareQuery(val),
  43 + val_empty = (val.replace(' ', '').length === 0);
  44 +
  45 + for (var i = 0, len = rowcache.length; i < len; i++) {
  46 + if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
  47 + options.show.apply(rowcache[i]);
  48 + noresults = false;
  49 + numMatchedRows++;
  50 + } else {
  51 + options.hide.apply(rowcache[i]);
  52 + }
  53 + }
  54 +
  55 + if (noresults) {
  56 + this.results(false);
  57 + } else {
  58 + this.results(true);
  59 + this.stripe();
  60 + }
  61 +
  62 + this.matchedResultsCount = numMatchedRows;
  63 + this.loader(false);
  64 + options.onAfter();
  65 +
  66 + return this;
  67 + };
  68 +
  69 + /*
  70 + * External API so that users can perform search programatically.
  71 + * */
  72 + this.search = function (submittedVal) {
  73 + val = submittedVal;
  74 + e.trigger();
  75 + };
  76 +
  77 + /*
  78 + * External API to get the number of matched results as seen in
  79 + * https://github.com/ruiz107/quicksearch/commit/f78dc440b42d95ce9caed1d087174dd4359982d6
  80 + * */
  81 + this.currentMatchedResults = function() {
  82 + return this.matchedResultsCount;
  83 + };
  84 +
  85 + this.stripe = function () {
  86 +
  87 + if (typeof options.stripeRows === "object" && options.stripeRows !== null)
  88 + {
  89 + var joined = options.stripeRows.join(' ');
  90 + var stripeRows_length = options.stripeRows.length;
  91 +
  92 + jq_results.not(':hidden').each(function (i) {
  93 + $(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
  94 + });
  95 + }
  96 +
  97 + return this;
  98 + };
  99 +
  100 + this.strip_html = function (input) {
  101 + var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
  102 + output = $.trim(output.toLowerCase());
  103 + return output;
  104 + };
  105 +
  106 + this.results = function (bool) {
  107 + if (typeof options.noResults === "string" && options.noResults !== "") {
  108 + if (bool) {
  109 + $(options.noResults).hide();
  110 + } else {
  111 + $(options.noResults).show();
  112 + }
  113 + }
  114 + return this;
  115 + };
  116 +
  117 + this.loader = function (bool) {
  118 + if (typeof options.loader === "string" && options.loader !== "") {
  119 + (bool) ? $(options.loader).show() : $(options.loader).hide();
  120 + }
  121 + return this;
  122 + };
  123 +
  124 + this.cache = function () {
  125 +
  126 + jq_results = $(target);
  127 +
  128 + if (typeof options.noResults === "string" && options.noResults !== "") {
  129 + jq_results = jq_results.not(options.noResults);
  130 + }
  131 +
  132 + var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
  133 + cache = t.map(function () {
  134 + return e.strip_html(this.innerHTML);
  135 + });
  136 +
  137 + rowcache = jq_results.map(function () {
  138 + return this;
  139 + });
  140 +
  141 + /*
  142 + * Modified fix for sync-ing "val".
  143 + * Original fix https://github.com/michaellwest/quicksearch/commit/4ace4008d079298a01f97f885ba8fa956a9703d1
  144 + * */
  145 + val = val || this.val() || "";
  146 +
  147 + return this.go();
  148 + };
  149 +
  150 + this.trigger = function () {
  151 + this.loader(true);
  152 + options.onBefore();
  153 +
  154 + window.clearTimeout(timeout);
  155 + timeout = window.setTimeout(function () {
  156 + e.go();
  157 + }, options.delay);
  158 +
  159 + return this;
  160 + };
  161 +
  162 + this.cache();
  163 + this.results(true);
  164 + this.stripe();
  165 + this.loader(false);
  166 +
  167 + return this.each(function () {
  168 +
  169 + /*
  170 + * Changed from .bind to .on.
  171 + * */
  172 + $(this).on(options.bind, function () {
  173 +
  174 + val = $(this).val();
  175 + e.trigger();
  176 + });
  177 + });
  178 +
  179 + };
  180 +
  181 +}(jQuery, this, document));
0 182 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/css/bmap_base.css
... ... @@ -12,6 +12,12 @@ html,body{
12 12 overflow:hidden;
13 13 }
14 14  
  15 +.rm3_image {
  16 + width: 120px;
  17 + height: 26px;
  18 +
  19 +}
  20 +
15 21 /* 隐藏百度地图logo */
16 22 .anchorBL,
17 23 .anchorBL,
... ...
src/main/resources/static/pages/base/stationroute/css/img/back160.png 0 → 100644

3.28 KB

src/main/resources/static/pages/base/stationroute/edit.html
... ... @@ -443,6 +443,8 @@ $(&#39;#edit_station_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,ajaxd,stati
443 443 // 弹出添加成功提示消息
444 444 layer.msg('修改成功...');
445 445  
  446 + /** 通知更新缓存区 */
  447 + $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)})
446 448  
447 449 }else {
448 450  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -650,6 +650,8 @@ var PublicFunctions = function () {
650 650 // 中心点坐标字符串
651 651 var bJwpointsStr = resultdata[s].bJwpoints;
652 652  
  653 + var stationName = resultdata[s].stationName;
  654 +
653 655 // 起个中心点坐标字符串
654 656 var bJwpointsArray = bJwpointsStr.split(' ');
655 657  
... ... @@ -657,7 +659,7 @@ var PublicFunctions = function () {
657 659 var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
658 660  
659 661 /** 在地图上画点 @param:<point_center:中心坐标点> */
660   - WorldsBMap.drawingUpStationPoint(point_center);
  662 + WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
661 663  
662 664 }
663 665  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -684,11 +684,26 @@ var WorldsBMap = function () {
684 684 },
685 685  
686 686 /** 在地图上画点 @param:<point_center:中心坐标点> */
687   - drawingUpStationPoint : function(point_center) {
  687 + drawingUpStationPoint : function(point_center,stationName,s) {
688 688  
689 689 // 自定义标注物图片
690   - var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/cz.png',new BMap.Size(20, 20));
691   -
  690 + var icon_target = new BMap.Icon('/pages/base/stationroute/css/img/gjzd.png',new BMap.Size(10, 10));
  691 +
  692 + var html2 = '<div style="position: absolute; margin: 0pt; padding: 0pt; width: 160px; height: 26px; left: -10px; top: -35px; overflow: hidden;">'
  693 + + '<img class="rm3_image" style="border:none;left:0px; top:0px; position:absolute;" src="/pages/base/stationroute/css/img/back160.png">'
  694 + + '</div>'
  695 + + '<label class=" BMapLabel" unselectable="on" style="position: absolute; -moz-user-select: none; display: inline; cursor: inherit; border: 0px none; padding: 2px 1px 1px; white-space: nowrap; font: 12px arial,simsun; z-index: 80; color: rgb(255, 102, 0); left: 15px; top: -35px;"><span style="float: left; color: #fdfdfd; margin-left: -22px; font-size: 6px;">'+ s+'</span>'+ stationName+'</label>';
  696 +
  697 +
  698 + var myRichMarker1 = new BMapLib.RichMarker(html2, point_center,{
  699 + "anchor" : new BMap.Size(-10,8),
  700 + "enableDragging" : true});
  701 +
  702 +
  703 + myRichMarker1.disableDragging();
  704 + mapBValue.addOverlay(myRichMarker1);
  705 +
  706 +
692 707 // 创建标注物
693 708 marker = new BMap.Marker(point_center,{icon : icon_target});
694 709  
... ...