Commit 4b33c7b5b725a412b1189726dbeeed6a82679136
1 parent
21398848
Merge branch 'pudong' of 192.168.168.201:panzhaov5/bsth_control into pudong
# Conflicts: # src/main/resources/static/pages/base/timesmodel/add.html # src/main/resources/static/pages/base/timesmodel/fragments/addbc.html # src/main/resources/static/pages/base/timesmodel/fragments/deletelp.html # src/main/resources/static/pages/base/timesmodel/fragments/editbc.html # src/main/resources/static/pages/base/timesmodel/js/add-form-wizard.js # src/main/resources/static/pages/base/timesmodel/js/dateTimeTool.js # src/main/resources/static/pages/base/timesmodel/js/echartsDrawGanTT.js # src/main/resources/static/pages/base/timesmodel/js/gantt.js # src/main/resources/static/pages/base/timesmodel/js/systemTools.js # src/main/resources/static/pages/base/timesmodel/js/v1/AdjustTrip.js # src/main/resources/static/pages/base/timesmodel/js/v1/bcFun.js # src/main/resources/static/pages/base/timesmodel/js/v1/lpFun.js # src/main/resources/static/pages/base/timesmodel/js/v1/scheduleInitialize.js
Showing
14 changed files
with
108 additions
and
55 deletions
src/main/java/com/bsth/controller/LineVersionsController.java
| 1 | package com.bsth.controller; | 1 | package com.bsth.controller; |
| 2 | 2 | ||
| 3 | -import java.util.List; | ||
| 4 | -import java.util.Map; | ||
| 5 | - | 3 | +import com.bsth.entity.LineVersions; |
| 4 | +import com.bsth.repository.LineRepository; | ||
| 5 | +import com.bsth.service.LineVersionsService; | ||
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.web.bind.annotation.RequestMapping; | 7 | import org.springframework.web.bind.annotation.RequestMapping; |
| 8 | import org.springframework.web.bind.annotation.RequestMethod; | 8 | import org.springframework.web.bind.annotation.RequestMethod; |
| 9 | import org.springframework.web.bind.annotation.RequestParam; | 9 | import org.springframework.web.bind.annotation.RequestParam; |
| 10 | import org.springframework.web.bind.annotation.RestController; | 10 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 11 | ||
| 12 | -import com.bsth.entity.LineVersions; | ||
| 13 | -import com.bsth.repository.LineRepository; | ||
| 14 | -import com.bsth.service.LineVersionsService; | 12 | +import java.util.List; |
| 13 | +import java.util.Map; | ||
| 15 | 14 | ||
| 16 | /** | 15 | /** |
| 17 | * | 16 | * |
| @@ -75,7 +74,11 @@ public class LineVersionsController extends BaseController<LineVersions, Integer | @@ -75,7 +74,11 @@ public class LineVersionsController extends BaseController<LineVersions, Integer | ||
| 75 | public Map<String, Object> add(@RequestParam Map<String, Object> map) { | 74 | public Map<String, Object> add(@RequestParam Map<String, Object> map) { |
| 76 | return service.add(map); | 75 | return service.add(map); |
| 77 | } | 76 | } |
| 78 | - | 77 | + @RequestMapping(value = "delete", method = RequestMethod.POST) |
| 78 | + public Map<String, Object> delete(@RequestParam (defaultValue = "id") int id) { | ||
| 79 | + return service.delete(id); | ||
| 80 | + } | ||
| 81 | + | ||
| 79 | /** | 82 | /** |
| 80 | * 根据线路id获取当前版本号 | 83 | * 根据线路id获取当前版本号 |
| 81 | * | 84 | * |
src/main/java/com/bsth/service/geo_data/impl/GeoDataServiceImpl.java
| @@ -376,7 +376,7 @@ public class GeoDataServiceImpl implements GeoDataService { | @@ -376,7 +376,7 @@ public class GeoDataServiceImpl implements GeoDataService { | ||
| 376 | lVersion.setLineCode(lineCode); | 376 | lVersion.setLineCode(lineCode); |
| 377 | 377 | ||
| 378 | //如果有待启用的版本,设置为历史版本 | 378 | //如果有待启用的版本,设置为历史版本 |
| 379 | - jdbcTemplate.update("update bsth_c_line_versions set `status`=0, start_date=null,end_date=null where line_code='"+lineCode+"' and `status`=2"); | 379 | + jdbcTemplate.update("update bsth_c_line_versions set `status`=2, start_date=null,end_date=null where line_code='"+lineCode+"' and `status`=0"); |
| 380 | 380 | ||
| 381 | //入库线路版本 | 381 | //入库线路版本 |
| 382 | jdbcTemplate.update("insert into bsth_c_line_versions(name, line, line_code, versions, start_date, create_date, update_date, remark,status, isupdate) " + | 382 | jdbcTemplate.update("insert into bsth_c_line_versions(name, line, line_code, versions, start_date, create_date, update_date, remark,status, isupdate) " + |
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
| 1 | package com.bsth.service.impl; | 1 | package com.bsth.service.impl; |
| 2 | 2 | ||
| 3 | -import java.sql.PreparedStatement; | ||
| 4 | -import java.sql.SQLException; | ||
| 5 | -import java.text.ParseException; | ||
| 6 | -import java.text.SimpleDateFormat; | ||
| 7 | -import java.util.Date; | ||
| 8 | -import java.util.HashMap; | ||
| 9 | -import java.util.List; | ||
| 10 | -import java.util.Map; | ||
| 11 | - | ||
| 12 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 13 | -import org.springframework.jdbc.core.BatchPreparedStatementSetter; | ||
| 14 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 15 | -import org.springframework.stereotype.Service; | ||
| 16 | -import org.springframework.transaction.annotation.Transactional; | ||
| 17 | - | ||
| 18 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 19 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 20 | import com.bsth.common.ResponseCode; | 5 | import com.bsth.common.ResponseCode; |
| @@ -31,6 +16,20 @@ import com.bsth.repository.LsStationRouteRepository; | @@ -31,6 +16,20 @@ import com.bsth.repository.LsStationRouteRepository; | ||
| 31 | import com.bsth.service.LineVersionsService; | 16 | import com.bsth.service.LineVersionsService; |
| 32 | import com.bsth.service.SectionRouteService; | 17 | import com.bsth.service.SectionRouteService; |
| 33 | import com.bsth.service.StationRouteService; | 18 | import com.bsth.service.StationRouteService; |
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 20 | +import org.springframework.jdbc.core.BatchPreparedStatementSetter; | ||
| 21 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 22 | +import org.springframework.stereotype.Service; | ||
| 23 | +import org.springframework.transaction.annotation.Transactional; | ||
| 24 | + | ||
| 25 | +import java.sql.PreparedStatement; | ||
| 26 | +import java.sql.SQLException; | ||
| 27 | +import java.text.ParseException; | ||
| 28 | +import java.text.SimpleDateFormat; | ||
| 29 | +import java.util.Date; | ||
| 30 | +import java.util.HashMap; | ||
| 31 | +import java.util.List; | ||
| 32 | +import java.util.Map; | ||
| 34 | 33 | ||
| 35 | /** | 34 | /** |
| 36 | * | 35 | * |
| @@ -97,8 +96,10 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | @@ -97,8 +96,10 @@ public class LineVersionsServiceImpl extends BaseServiceImpl<LineVersions, Integ | ||
| 97 | int statu = repository.update(id,line,lineCode,new java.sql.Date(startDate.getTime()), | 96 | int statu = repository.update(id,line,lineCode,new java.sql.Date(startDate.getTime()), |
| 98 | new java.sql.Date(endDate.getTime()),versions,status,remark); | 97 | new java.sql.Date(endDate.getTime()),versions,status,remark); |
| 99 | LineVersions upLineVersions = repository.findBylineIdAndVersions(line.getId(),versions); | 98 | LineVersions upLineVersions = repository.findBylineIdAndVersions(line.getId(),versions); |
| 100 | - upLineVersions.setEndDate(new java.sql.Date(startDate.getTime())); | ||
| 101 | - repository.save(upLineVersions); | 99 | + if(upLineVersions != null){ |
| 100 | + upLineVersions.setEndDate(new java.sql.Date(startDate.getTime())); | ||
| 101 | + repository.save(upLineVersions); | ||
| 102 | + } | ||
| 102 | if (statu==1) { | 103 | if (statu==1) { |
| 103 | resultMap.put("status", ResponseCode.SUCCESS); | 104 | resultMap.put("status", ResponseCode.SUCCESS); |
| 104 | } else { | 105 | } else { |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| 1 | package com.bsth.service.impl; | 1 | package com.bsth.service.impl; |
| 2 | 2 | ||
| 3 | import com.bsth.common.ResponseCode; | 3 | import com.bsth.common.ResponseCode; |
| 4 | -import com.bsth.entity.*; | 4 | +import com.bsth.entity.Line; |
| 5 | +import com.bsth.entity.LsStationRoute; | ||
| 6 | +import com.bsth.entity.Station; | ||
| 7 | +import com.bsth.entity.StationRoute; | ||
| 8 | +import com.bsth.entity.StationRouteCache; | ||
| 5 | import com.bsth.entity.search.CustomerSpecs; | 9 | import com.bsth.entity.search.CustomerSpecs; |
| 6 | -import com.bsth.repository.*; | 10 | +import com.bsth.repository.LineRepository; |
| 11 | +import com.bsth.repository.LsStationRouteRepository; | ||
| 12 | +import com.bsth.repository.SectionRouteRepository; | ||
| 13 | +import com.bsth.repository.StationRepository; | ||
| 14 | +import com.bsth.repository.StationRouteCacheRepository; | ||
| 15 | +import com.bsth.repository.StationRouteRepository; | ||
| 7 | import com.bsth.service.StationRouteService; | 16 | import com.bsth.service.StationRouteService; |
| 8 | import com.bsth.util.ExcelUtil; | 17 | import com.bsth.util.ExcelUtil; |
| 9 | import com.bsth.util.FTPClientUtils; | 18 | import com.bsth.util.FTPClientUtils; |
| 10 | -import com.bsth.util.PackTarGZUtils; | ||
| 11 | import com.bsth.util.Geo.GeoUtils; | 19 | import com.bsth.util.Geo.GeoUtils; |
| 12 | import com.bsth.util.Geo.Point; | 20 | import com.bsth.util.Geo.Point; |
| 21 | +import com.bsth.util.PackTarGZUtils; | ||
| 13 | import com.bsth.util.db.DBUtils_MS; | 22 | import com.bsth.util.db.DBUtils_MS; |
| 14 | import com.google.common.base.Splitter; | 23 | import com.google.common.base.Splitter; |
| 15 | import org.springframework.beans.factory.annotation.Autowired; | 24 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -18,13 +27,17 @@ import org.springframework.data.domain.Sort.Direction; | @@ -18,13 +27,17 @@ import org.springframework.data.domain.Sort.Direction; | ||
| 18 | import org.springframework.stereotype.Service; | 27 | import org.springframework.stereotype.Service; |
| 19 | import org.springframework.transaction.annotation.Transactional; | 28 | import org.springframework.transaction.annotation.Transactional; |
| 20 | 29 | ||
| 30 | +import javax.servlet.http.HttpServletResponse; | ||
| 21 | import java.io.ByteArrayInputStream; | 31 | import java.io.ByteArrayInputStream; |
| 22 | import java.io.File; | 32 | import java.io.File; |
| 23 | import java.io.InputStream; | 33 | import java.io.InputStream; |
| 24 | import java.text.DecimalFormat; | 34 | import java.text.DecimalFormat; |
| 25 | -import java.util.*; | ||
| 26 | - | ||
| 27 | -import javax.servlet.http.HttpServletResponse; | 35 | +import java.util.ArrayList; |
| 36 | +import java.util.HashMap; | ||
| 37 | +import java.util.Iterator; | ||
| 38 | +import java.util.List; | ||
| 39 | +import java.util.Map; | ||
| 40 | +import java.util.Properties; | ||
| 28 | 41 | ||
| 29 | /** | 42 | /** |
| 30 | * | 43 | * |
| @@ -93,7 +106,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -93,7 +106,7 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 93 | public Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp) { | 106 | public Map<String, Object> getSectionRouteExport(Integer id, HttpServletResponse resp) { |
| 94 | Map<String, Object> resultMap = new HashMap<String, Object>(); | 107 | Map<String, Object> resultMap = new HashMap<String, Object>(); |
| 95 | try { | 108 | try { |
| 96 | - // List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); | 109 | + // List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); |
| 97 | Map<String,Object> resultExcel = new HashMap<String,Object>();//导出参数的对象 | 110 | Map<String,Object> resultExcel = new HashMap<String,Object>();//导出参数的对象 |
| 98 | /* 添加表头*/ | 111 | /* 添加表头*/ |
| 99 | List<String> title = new ArrayList<String>(); | 112 | List<String> title = new ArrayList<String>(); |
| @@ -113,10 +126,10 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -113,10 +126,10 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 113 | if(strtionList == null){ | 126 | if(strtionList == null){ |
| 114 | logger.info("没有数据导,出用户信息失败!"); | 127 | logger.info("没有数据导,出用户信息失败!"); |
| 115 | } else { | 128 | } else { |
| 116 | - | 129 | + |
| 117 | for (int i = 0; i < strtionList.size(); i++) { | 130 | for (int i = 0; i < strtionList.size(); i++) { |
| 118 | StationRoute station = strtionList.get(i); | 131 | StationRoute station = strtionList.get(i); |
| 119 | - | 132 | + |
| 120 | List<String> varList = new ArrayList<String>(); | 133 | List<String> varList = new ArrayList<String>(); |
| 121 | varList.add(station.getLine().getId().toString()); | 134 | varList.add(station.getLine().getId().toString()); |
| 122 | varList.add(station.getDirections().toString()); | 135 | varList.add(station.getDirections().toString()); |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| @@ -1372,8 +1372,11 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | @@ -1372,8 +1372,11 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem | ||
| 1372 | // 匹配到了用数据库中的点替换 | 1372 | // 匹配到了用数据库中的点替换 |
| 1373 | if (GeoUtils.isPointInCircle(point, circle)) { | 1373 | if (GeoUtils.isPointInCircle(point, circle)) { |
| 1374 | map.put("name", s.getStationName().toString()); | 1374 | map.put("name", s.getStationName().toString()); |
| 1375 | - map.put("potion_lng", points[0]); | ||
| 1376 | - map.put("potion_lat", points[1]); | 1375 | + // 匹配到站点后用这个站点的名字,但是使用gps点作为中心点 |
| 1376 | +// map.put("potion_lng", points[0]); | ||
| 1377 | +// map.put("potion_lat", points[1]); | ||
| 1378 | + map.put("potion_lng", lon); | ||
| 1379 | + map.put("potion_lat", lat); | ||
| 1377 | map.put("isHave", "true"); | 1380 | map.put("isHave", "true"); |
| 1378 | map.put("id", s.getId()); | 1381 | map.put("id", s.getId()); |
| 1379 | isMatch = true; | 1382 | isMatch = true; |
src/main/resources/static/pages/base/geo_data_edit/js/search.js
| @@ -28,7 +28,7 @@ var gb_ct_search = function () { | @@ -28,7 +28,7 @@ var gb_ct_search = function () { | ||
| 28 | 28 | ||
| 29 | var searchComplete = function (e) { | 29 | var searchComplete = function (e) { |
| 30 | console.log('e.wr', e); | 30 | console.log('e.wr', e); |
| 31 | - var htmlStr = template('geo_d_e_search_result-temp', {list: e.Br}); | 31 | + var htmlStr = template('geo_d_e_search_result-temp', {list: e.Ar}); |
| 32 | $('.ct_search_result').html(htmlStr); | 32 | $('.ct_search_result').html(htmlStr); |
| 33 | 33 | ||
| 34 | }; | 34 | }; |
src/main/resources/static/pages/base/lineversions/add.html
| @@ -108,6 +108,7 @@ | @@ -108,6 +108,7 @@ | ||
| 108 | <select name="status" class="form-control" id="statusInput"> | 108 | <select name="status" class="form-control" id="statusInput"> |
| 109 | <option value="">请选择...</option> | 109 | <option value="">请选择...</option> |
| 110 | <option value="1">当前版本</option> | 110 | <option value="1">当前版本</option> |
| 111 | + | ||
| 111 | <option value="2">待更新版本</option> | 112 | <option value="2">待更新版本</option> |
| 112 | <option value="0">历史版本</option> | 113 | <option value="0">历史版本</option> |
| 113 | </select> | 114 | </select> |
src/main/resources/static/pages/base/lineversions/edit.html
| @@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
| 54 | <span class="required"> * </span>线路名称 : | 54 | <span class="required"> * </span>线路名称 : |
| 55 | </label> | 55 | </label> |
| 56 | <div class="col-md-4"> | 56 | <div class="col-md-4"> |
| 57 | - <select name="line" class="form-control" style="width:100%" id="lineSelect"></select> | 57 | + <select name="line" class="form-control" style="width:100%" id="lineSelect" disabled="true"></select> |
| 58 | </div> | 58 | </div> |
| 59 | </div> | 59 | </div> |
| 60 | <!-- 表单分组组件 form-group END --> | 60 | <!-- 表单分组组件 form-group END --> |
| @@ -87,7 +87,7 @@ | @@ -87,7 +87,7 @@ | ||
| 87 | <span class="required"> * </span>线路版本 : | 87 | <span class="required"> * </span>线路版本 : |
| 88 | </label> | 88 | </label> |
| 89 | <div class="col-md-4"> | 89 | <div class="col-md-4"> |
| 90 | - <input type="text" class="form-control" name="versions" id="versionsInput" placeholder="线路版本" /> | 90 | + <input type="text" class="form-control" name="versions" id="versionsInput" placeholder="线路版本" readonly="true" /> |
| 91 | </div> | 91 | </div> |
| 92 | </div> | 92 | </div> |
| 93 | <!-- 表单分组组件 form-group END --> | 93 | <!-- 表单分组组件 form-group END --> |
src/main/resources/static/pages/base/lineversions/js/lineversions-edit-from.js
| @@ -207,7 +207,6 @@ | @@ -207,7 +207,6 @@ | ||
| 207 | submit(); | 207 | submit(); |
| 208 | // 提交 | 208 | // 提交 |
| 209 | function submit() { | 209 | function submit() { |
| 210 | - debugger | ||
| 211 | // 添加数据 | 210 | // 添加数据 |
| 212 | $post('/lineVersions/update', params, function(result) { | 211 | $post('/lineVersions/update', params, function(result) { |
| 213 | // 如果返回结果不为空 | 212 | // 如果返回结果不为空 |
src/main/resources/static/pages/base/lineversions/js/lineversions-list-table.js
| @@ -299,6 +299,36 @@ | @@ -299,6 +299,36 @@ | ||
| 299 | /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ | 299 | /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */ |
| 300 | loadTableDate(params,true); | 300 | loadTableDate(params,true); |
| 301 | }); | 301 | }); |
| 302 | + // 删除待更新线路版本 | ||
| 303 | + $(document).on('click', 'a.update_delete_btn', function () { | ||
| 304 | + var id = $(this).data('id'); | ||
| 305 | + swal({ | ||
| 306 | + title: "确认删除这个待更新线路版本!", | ||
| 307 | + type: "warning", | ||
| 308 | + showCancelButton: true, | ||
| 309 | + confirmButtonColor: "#DD6B55", | ||
| 310 | + confirmButtonText: "是的!", | ||
| 311 | + cancelButtonText: "我在考虑下...", | ||
| 312 | + closeOnConfirm: false }, | ||
| 313 | + function(isConfirm){ | ||
| 314 | + if(isConfirm){ | ||
| 315 | + $post('/lineVersions/delete', {"id":id}, function(result) { | ||
| 316 | + // 如果返回结果不为空 | ||
| 317 | + if(result){ | ||
| 318 | + // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败 | ||
| 319 | + if(result.status=='SUCCESS') { | ||
| 320 | + // 弹出添加成功提示消息 | ||
| 321 | + layer.msg('删除成功...'); | ||
| 322 | + } else if(result.status=='ERROR') { | ||
| 323 | + // 弹出添加失败提示消息 | ||
| 324 | + layer.msg('删除失败...'); | ||
| 325 | + } | ||
| 326 | + } | ||
| 327 | + }); | ||
| 328 | + swal.close(); | ||
| 329 | + } | ||
| 330 | + }); | ||
| 331 | + }); | ||
| 302 | // 线路版本编辑 | 332 | // 线路版本编辑 |
| 303 | $(document).on('click', 'a.update_versions_route_btn', function () { | 333 | $(document).on('click', 'a.update_versions_route_btn', function () { |
| 304 | var lineId = $(this).data('lineid'); | 334 | var lineId = $(this).data('lineid'); |
src/main/resources/static/pages/base/lineversions/list.html
| @@ -145,9 +145,12 @@ | @@ -145,9 +145,12 @@ | ||
| 145 | {{obj.remark}} | 145 | {{obj.remark}} |
| 146 | </td> | 146 | </td> |
| 147 | <td> | 147 | <td> |
| 148 | - <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> | 148 | + {{if obj.status != '0'}} |
| 149 | + <a href="edit.html?no={{obj.id}}" class="btn btn-info btn-sm" data-pjax> 修改 </a> | ||
| 150 | + {{/if}} | ||
| 149 | {{if obj.status == '2'}} | 151 | {{if obj.status == '2'}} |
| 150 | - <a class="update_versions_route_btn btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" data-pjax> 编辑版本路线 </a> | 152 | + <a class="update_delete_btn btn btn-danger btn-sm" data-id="{{obj.id}}" data-pjax> 删除 </a> |
| 153 | + <a class="update_versions_route_btn btn btn-info btn-sm" data-lineid="{{obj.line.id}}" data-pjax> 编辑版本路线 </a> | ||
| 151 | {{/if}} | 154 | {{/if}} |
| 152 | {{if obj.status == '2' && obj.isupdate!=1}} | 155 | {{if obj.status == '2' && obj.isupdate!=1}} |
| 153 | <a class="issue_btn btn btn-danger btn-sm" data-id="{{obj.id}}" data-pjax>发布</a> | 156 | <a class="issue_btn btn btn-danger btn-sm" data-id="{{obj.id}}" data-pjax>发布</a> |
src/main/resources/static/pages/base/roadspeed/js/add-form-wizard.js
| @@ -78,7 +78,6 @@ var FormWizard = function() { | @@ -78,7 +78,6 @@ var FormWizard = function() { | ||
| 78 | submitHandler : function(f) { | 78 | submitHandler : function(f) { |
| 79 | // 防止用户多次提交 | 79 | // 防止用户多次提交 |
| 80 | $("#submintBtn").addClass("disabled"); | 80 | $("#submintBtn").addClass("disabled"); |
| 81 | - debugger | ||
| 82 | var params = form.serializeJSON();// 表单序列化. | 81 | var params = form.serializeJSON();// 表单序列化. |
| 83 | if(params.roadVector=='') { | 82 | if(params.roadVector=='') { |
| 84 | layer.msg('路段几何图形为空~请先在路段位置步骤中绘制出线路走向!'); | 83 | layer.msg('路段几何图形为空~请先在路段位置步骤中绘制出线路走向!'); |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
| @@ -66,9 +66,9 @@ window.WorldsBMap = function () { | @@ -66,9 +66,9 @@ window.WorldsBMap = function () { | ||
| 66 | var dragMarkerDragEvent = function (e) { | 66 | var dragMarkerDragEvent = function (e) { |
| 67 | if (editPolygon) { | 67 | if (editPolygon) { |
| 68 | // 中心点是否超出多边形 | 68 | // 中心点是否超出多边形 |
| 69 | - if (!BMapLib.GeoUtils.isPointInPolygon(e.target._position, editPolygon)) { | ||
| 70 | - dragMarker.setPosition(dragMarker._old_point);//还原位置 | ||
| 71 | - } | 69 | + // if (!BMapLib.GeoUtils.isPointInPolygon(e.target._position, editPolygon)) { |
| 70 | + // dragMarker.setPosition(dragMarker._old_point);//还原位置 | ||
| 71 | + // } | ||
| 72 | centerPoint = e.target._position; | 72 | centerPoint = e.target._position; |
| 73 | } | 73 | } |
| 74 | else if (editCircle) { | 74 | else if (editCircle) { |
| @@ -321,7 +321,7 @@ window.WorldsBMap = function () { | @@ -321,7 +321,7 @@ window.WorldsBMap = function () { | ||
| 321 | mapBValue.centerAndZoom(point, 18); | 321 | mapBValue.centerAndZoom(point, 18); |
| 322 | editCircle = circle; | 322 | editCircle = circle; |
| 323 | // 允许覆盖物在map.clearOverlays方法中被清除 | 323 | // 允许覆盖物在map.clearOverlays方法中被清除 |
| 324 | - circle.enableMassClear(); | 324 | + // circle.enableMassClear(); |
| 325 | // 百度地图添加覆盖物圆 | 325 | // 百度地图添加覆盖物圆 |
| 326 | mapBValue.addOverlay(circle); | 326 | mapBValue.addOverlay(circle); |
| 327 | // 开启编辑功能 | 327 | // 开启编辑功能 |
| @@ -349,7 +349,7 @@ window.WorldsBMap = function () { | @@ -349,7 +349,7 @@ window.WorldsBMap = function () { | ||
| 349 | $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMap, GetAjaxData, EditStationObj, LineObj, PublicFunctions]); | 349 | $('#edit_station_mobal').trigger('editSelectMobal_show', [WorldsBMap, GetAjaxData, EditStationObj, LineObj, PublicFunctions]); |
| 350 | }); | 350 | }); |
| 351 | }); | 351 | }); |
| 352 | - // 编辑多变行 | 352 | + // 编辑多边行 |
| 353 | } else if (stationShapesTypeV == 'd') { | 353 | } else if (stationShapesTypeV == 'd') { |
| 354 | // 获取中心点坐标字符串 | 354 | // 获取中心点坐标字符串 |
| 355 | var testpointStr = station.stationJwpoints; | 355 | var testpointStr = station.stationJwpoints; |
| @@ -383,7 +383,9 @@ window.WorldsBMap = function () { | @@ -383,7 +383,9 @@ window.WorldsBMap = function () { | ||
| 383 | mapBValue.addOverlay(polygon); | 383 | mapBValue.addOverlay(polygon); |
| 384 | // 开启编辑功能(自 1.1 新增) | 384 | // 开启编辑功能(自 1.1 新增) |
| 385 | polygon.enableEditing(); | 385 | polygon.enableEditing(); |
| 386 | - // 添加多变行编辑事件 | 386 | + //禁止覆盖物在map.clearOverlays方法中被清除 |
| 387 | + // polygon.disableMassClear(); | ||
| 388 | + // 添加多边形编辑事件 | ||
| 387 | polygon.addEventListener('dblclick', function (e) { | 389 | polygon.addEventListener('dblclick', function (e) { |
| 388 | // 获取编辑的多边形对象 | 390 | // 获取编辑的多边形对象 |
| 389 | var edit_pointE = polygon; | 391 | var edit_pointE = polygon; |
src/main/resources/static/pages/base/stationroute/list.html
| @@ -351,7 +351,9 @@ | @@ -351,7 +351,9 @@ | ||
| 351 | 351 | ||
| 352 | function setPlace(){ | 352 | function setPlace(){ |
| 353 | // myMap.clearOverlays(); //清除地图上所有覆盖物 | 353 | // myMap.clearOverlays(); //清除地图上所有覆盖物 |
| 354 | - WorldsBMap.clearOtherOverlay(); | 354 | + var local = new BMap.LocalSearch(myMap, { //智能搜索 |
| 355 | + onSearchComplete: myFun | ||
| 356 | + }); | ||
| 355 | function myFun(){ | 357 | function myFun(){ |
| 356 | var pp = local.getResults().getPoi(0) == undefined? null:local.getResults().getPoi(0).point; | 358 | var pp = local.getResults().getPoi(0) == undefined? null:local.getResults().getPoi(0).point; |
| 357 | if(pp) { | 359 | if(pp) { |
| @@ -361,22 +363,19 @@ | @@ -361,22 +363,19 @@ | ||
| 361 | layer.msg('找不到您输入的位置!') | 363 | layer.msg('找不到您输入的位置!') |
| 362 | } | 364 | } |
| 363 | } | 365 | } |
| 364 | - var local = new BMap.LocalSearch(myMap, { //智能搜索 | ||
| 365 | - onSearchComplete: myFun | ||
| 366 | - }); | ||
| 367 | local.search(myValue); | 366 | local.search(myValue); |
| 368 | } | 367 | } |
| 369 | $("#searchInput").on('input propertychange change', function () { | 368 | $("#searchInput").on('input propertychange change', function () { |
| 370 | if($("#searchInput").val() != null && $("#searchInput").val() != "") | 369 | if($("#searchInput").val() != null && $("#searchInput").val() != "") |
| 371 | $('.search_panel .clear').removeClass('hide'); | 370 | $('.search_panel .clear').removeClass('hide'); |
| 372 | else { | 371 | else { |
| 373 | - WorldsBMap.clearOtherOverlay(); | 372 | + // WorldsBMap.clearOtherOverlay(); |
| 374 | $('.search_panel .clear').addClass('hide'); | 373 | $('.search_panel .clear').addClass('hide'); |
| 375 | } | 374 | } |
| 376 | }); | 375 | }); |
| 377 | 376 | ||
| 378 | $('.search_panel .clear').on('click',function () { | 377 | $('.search_panel .clear').on('click',function () { |
| 379 | - WorldsBMap.clearOtherOverlay(); | 378 | + // WorldsBMap.clearOtherOverlay(); |
| 380 | $("#searchInput").val(''); | 379 | $("#searchInput").val(''); |
| 381 | $("#searchInput").change(); | 380 | $("#searchInput").change(); |
| 382 | }); | 381 | }); |