Merge branch 'master' of http://117.78.1.188:8089/r/dkyChenJiang
1 文件已重命名
13个文件已修改
9个文件已添加
| | |
| | | //bindEvent(); |
| | | }) |
| | | // 加载地图 |
| | | var countries = []; |
| | | var countriesOverlay = new T.D3Overlay(init,redraw); |
| | | var countriesOverlay1 = new T.D3Overlay(init1,redraw1); |
| | | function loadMap() { |
| | | let map = new T.Map('map_div'); |
| | | map.centerAndZoom(new T.LngLat(116.38, 39.9), 11); |
| | |
| | | var control = new T.Control.Zoom(); |
| | | control.setPosition(T_ANCHOR_TOP_RIGHT); |
| | | map.addControl(control);// 添加缩放平移控件 |
| | | |
| | | var scale = new T.Control.Scale();// 创建比例尺控件对象 |
| | | // var ctrl = new T.Control.MapType(); |
| | | // ctrl.setPosition(T_ANCHOR_BOTTOM_RIGHT); |
| | | // 添加控件 |
| | | map.addControl(ctrl); |
| | | |
| | | |
| | | // const sourceGeoJson = new VectorSource({ |
| | | // format: new GeoJSON(), |
| | | // url:'/beijing.geojson' |
| | | // }); |
| | | // |
| | | // const layerGeoJson = new VectorLayer({ |
| | | // source:sourceGeoJson, |
| | | // }); |
| | | // |
| | | // map.addLayer(layerGeoJson); |
| | | d3.json("/bjfw/js/custom/beijing.json", function (data) { |
| | | countries = data.features; |
| | | map.addOverLay(countriesOverlay) |
| | | countriesOverlay.bringToBack(); |
| | | map.addOverLay(countriesOverlay1) |
| | | countriesOverlay.bringToBack(); |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | function init(sel, transform) { |
| | | var upd = sel.selectAll('path.geojson').data(countries); |
| | | upd.enter() |
| | | .append('path') |
| | | .attr("class", "geojson") |
| | | .attr('stroke', 'grey') |
| | | .attr('fill', function (d, i) { |
| | | //return d3.hsl(Math.random() * 360, 0.9, 0.5) |
| | | return "transparent" |
| | | }) |
| | | .attr('fill-opacity', '0') |
| | | } |
| | | |
| | | function redraw(sel, transform) { |
| | | sel.selectAll('path.geojson').each( |
| | | function (d, i) { |
| | | d3.select(this).attr('d', transform.pathFromGeojson) |
| | | } |
| | | ) |
| | | } |
| | | |
| | | |
| | | function init1(sel, transform) { |
| | | var upd = sel.selectAll('path.geojson1').data(countries); |
| | | upd.enter() |
| | | .append('path') |
| | | .attr("class", "geojson1") |
| | | .attr('stroke', 'grey') |
| | | .attr('fill', function (d, i) { |
| | | return d3.hsl(Math.random() * 360, 0.9, 0.5) |
| | | }) |
| | | .attr('fill-opacity', '0.1') |
| | | } |
| | | |
| | | function redraw1(sel, transform) { |
| | | sel.selectAll('path.geojson1').each( |
| | | function (d, i) { |
| | | d3.select(this).attr('d', transform.pathFromGeojson) |
| | | } |
| | | ) |
| | | } |
| | | |
| | | // 获取数据库真实数据 |
| | | function getReallyData() { |
| | | let url = window.location.protocol + "//" + window.location.host + "/bjfw/geotdp/index/indexCollect"; |
| | |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-8"> |
| | | <!-- <div>--> |
| | | <!-- <div class="col-md-4">--> |
| | | <!-- <input type="text" class="form-control" placeholder="项目关键词查询定位">--> |
| | | <!-- </div>--> |
| | | <!-- <button type="button" class="btn btn-success">查询</button>--> |
| | | <!-- </div>--> |
| | | <div id="map_div" style="width: 100%;height: 570px;margin-top: 10px"></div> |
| | | <div id="map_div" style="width: 100%;height: 750px;"></div> |
| | | </div> |
| | | |
| | | <div class="col-sm-4"> |
| | |
| | | <script th:src="@{/ajax/libs/flot/jquery.flot.js}"></script> |
| | | <script th:src="@{/ajax/libs/report/echarts/echarts-all.js}"></script> |
| | | <script th:src="@{/js/tdt.js}" type="text/javascript"></script> |
| | | |
| | | <script src="http://lbs.tianditu.gov.cn/js/lib/d3/d3.min.js" type="text/javascript"></script> |
| | | <script src="http://lbs.tianditu.gov.cn/api/js4.0/opensource/openlibrary/D3SvgOverlay.js" type="text/javascript"></script> |
| | | |
| | | <script th:src="@{/js/custom/main.js}"></script> |
| | | |
| | | |
| | | <th:block th:include="include :: sparkline-js" /> |
| | | |
| | | <th:block th:include="include :: footer" /> |
New file |
| | |
| | | package com.javaweb.geo.controller; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import com.javaweb.common.annotation.Log; |
| | | import com.javaweb.common.enums.BusinessType; |
| | | import com.javaweb.geo.domain.ProjectCamera; |
| | | import com.javaweb.geo.service.IProjectCameraService; |
| | | import com.javaweb.common.core.controller.BaseController; |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.common.utils.poi.ExcelUtil; |
| | | import com.javaweb.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * 监控设备Controller |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/geo/projectCamera") |
| | | public class ProjectCameraController extends BaseController { |
| | | private String prefix = "geo/projectCamera"; |
| | | |
| | | @Autowired |
| | | private IProjectCameraService projectCameraService; |
| | | |
| | | @RequiresPermissions("geo:projectCamera:view") |
| | | @GetMapping() |
| | | public String projectCamera(String id, ModelMap mmap) { |
| | | mmap.put("projectId", id); |
| | | return prefix + "/projectCamera"; |
| | | } |
| | | |
| | | /** |
| | | * 查询监控设备列表 |
| | | */ |
| | | @RequiresPermissions("geo:projectCamera:list") |
| | | @PostMapping("/list") |
| | | @ResponseBody |
| | | public TableDataInfo list(ProjectCamera projectCamera) { |
| | | startPage(); |
| | | List<ProjectCamera> list = projectCameraService.selectProjectCameraList(projectCamera); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出监控设备列表 |
| | | */ |
| | | @RequiresPermissions("geo:projectCamera:export") |
| | | @Log(title = "监控设备", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | @ResponseBody |
| | | public AjaxResult export(ProjectCamera projectCamera) { |
| | | List<ProjectCamera> list = projectCameraService.selectProjectCameraList(projectCamera); |
| | | ExcelUtil<ProjectCamera> util = new ExcelUtil<ProjectCamera>(ProjectCamera.class); |
| | | return util.exportExcel(list, "projectCamera"); |
| | | } |
| | | |
| | | /** |
| | | * 新增监控设备 |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add() { |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | | /** |
| | | * 新增保存监控设备 |
| | | */ |
| | | @RequiresPermissions("geo:projectCamera:add") |
| | | @Log(title = "监控设备", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | @ResponseBody |
| | | public AjaxResult addSave(ProjectCamera projectCamera) { |
| | | return toAjax(projectCameraService.insertProjectCamera(projectCamera)); |
| | | } |
| | | |
| | | /** |
| | | * 修改监控设备 |
| | | */ |
| | | @GetMapping("/edit/{id}") |
| | | public String edit(@PathVariable("id") String id, ModelMap mmap) { |
| | | ProjectCamera projectCamera = projectCameraService.selectProjectCameraById(id); |
| | | mmap.put("projectCamera", projectCamera); |
| | | return prefix + "/edit"; |
| | | } |
| | | |
| | | /** |
| | | * 修改保存监控设备 |
| | | */ |
| | | @RequiresPermissions("geo:projectCamera:edit") |
| | | @Log(title = "监控设备", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @ResponseBody |
| | | public AjaxResult editSave(ProjectCamera projectCamera) { |
| | | return toAjax(projectCameraService.updateProjectCamera(projectCamera)); |
| | | } |
| | | |
| | | /** |
| | | * 删除监控设备 |
| | | */ |
| | | @RequiresPermissions("geo:projectCamera:remove") |
| | | @Log(title = "监控设备", businessType = BusinessType.DELETE) |
| | | @PostMapping("/remove") |
| | | @ResponseBody |
| | | public AjaxResult remove(String ids) { |
| | | return toAjax(projectCameraService.deleteProjectCameraByIds(ids)); |
| | | } |
| | | } |
| | |
| | | * 新增项目资料 |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add() { |
| | | public String add(String projectId, String dataType, ModelMap mmap) { |
| | | mmap.put("projectId", projectId); |
| | | mmap.put("dataType", dataType); |
| | | return prefix + "/add"; |
| | | } |
| | | |
| | |
| | | */ |
| | | @GetMapping("/add") |
| | | public String add(String projectId, ModelMap mmap) { |
| | | mmap.put("project_Id", projectId); |
| | | mmap.put("projectId", projectId); |
| | | return prefix + "/add"; |
| | | } |
| | | |
New file |
| | |
| | | package com.javaweb.geo.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.javaweb.common.annotation.Excel; |
| | | import com.javaweb.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * 监控设备对象 js_project_camera |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | public class ProjectCamera extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主键 */ |
| | | private String id; |
| | | |
| | | /** 项目id */ |
| | | private String projectId; |
| | | |
| | | /** 名称 */ |
| | | @Excel(name = "名称") |
| | | private String name; |
| | | |
| | | /** 视频编号 */ |
| | | @Excel(name = "视频编号") |
| | | private String code; |
| | | |
| | | /** 经度 */ |
| | | @Excel(name = "经度") |
| | | private Double lng; |
| | | |
| | | /** 纬度 */ |
| | | @Excel(name = "纬度") |
| | | private Double lat; |
| | | |
| | | /** Ip地址 */ |
| | | @Excel(name = "Ip地址") |
| | | private String ip; |
| | | |
| | | public void setId(String id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setProjectId(String projectId) |
| | | { |
| | | this.projectId = projectId; |
| | | } |
| | | |
| | | public String getProjectId() |
| | | { |
| | | return projectId; |
| | | } |
| | | public void setName(String name) |
| | | { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getName() |
| | | { |
| | | return name; |
| | | } |
| | | public void setCode(String code) |
| | | { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getCode() |
| | | { |
| | | return code; |
| | | } |
| | | public void setLng(Double lng) |
| | | { |
| | | this.lng = lng; |
| | | } |
| | | |
| | | public Double getLng() |
| | | { |
| | | return lng; |
| | | } |
| | | public void setLat(Double lat) |
| | | { |
| | | this.lat = lat; |
| | | } |
| | | |
| | | public Double getLat() |
| | | { |
| | | return lat; |
| | | } |
| | | public void setIp(String ip) |
| | | { |
| | | this.ip = ip; |
| | | } |
| | | |
| | | public String getIp() |
| | | { |
| | | return ip; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("projectId", getProjectId()) |
| | | .append("name", getName()) |
| | | .append("code", getCode()) |
| | | .append("lng", getLng()) |
| | | .append("lat", getLat()) |
| | | .append("ip", getIp()) |
| | | .append("createBy", getCreateBy()) |
| | | .append("createTime", getCreateTime()) |
| | | .toString(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.mapper; |
| | | |
| | | import com.javaweb.geo.domain.ProjectCamera; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 监控设备Mapper接口 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | public interface ProjectCameraMapper |
| | | { |
| | | /** |
| | | * 查询监控设备 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 监控设备 |
| | | */ |
| | | public ProjectCamera selectProjectCameraById(String id); |
| | | |
| | | /** |
| | | * 查询监控设备列表 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 监控设备集合 |
| | | */ |
| | | public List<ProjectCamera> selectProjectCameraList(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 新增监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | public int insertProjectCamera(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 修改监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | public int updateProjectCamera(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 删除监控设备 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteProjectCameraById(String id); |
| | | |
| | | /** |
| | | * 批量删除监控设备 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteProjectCameraByIds(String[] ids); |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.service; |
| | | |
| | | import com.javaweb.geo.domain.ProjectCamera; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 监控设备Service接口 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | public interface IProjectCameraService |
| | | { |
| | | /** |
| | | * 查询监控设备 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 监控设备 |
| | | */ |
| | | public ProjectCamera selectProjectCameraById(String id); |
| | | |
| | | /** |
| | | * 查询监控设备列表 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 监控设备集合 |
| | | */ |
| | | public List<ProjectCamera> selectProjectCameraList(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 新增监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | public int insertProjectCamera(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 修改监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | public int updateProjectCamera(ProjectCamera projectCamera); |
| | | |
| | | /** |
| | | * 批量删除监控设备 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteProjectCameraByIds(String ids); |
| | | |
| | | /** |
| | | * 删除监控设备信息 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 结果 |
| | | */ |
| | | public int deleteProjectCameraById(String id); |
| | | } |
New file |
| | |
| | | package com.javaweb.geo.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.javaweb.common.utils.DateUtils; |
| | | import com.javaweb.common.utils.IdGenerate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.javaweb.geo.mapper.ProjectCameraMapper; |
| | | import com.javaweb.geo.domain.ProjectCamera; |
| | | import com.javaweb.geo.service.IProjectCameraService; |
| | | import com.javaweb.common.core.text.Convert; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | /** |
| | | * 监控设备Service业务层处理 |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | @Service |
| | | public class ProjectCameraServiceImpl implements IProjectCameraService { |
| | | @Autowired |
| | | private ProjectCameraMapper projectCameraMapper; |
| | | |
| | | /** |
| | | * 查询监控设备 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 监控设备 |
| | | */ |
| | | @Override |
| | | public ProjectCamera selectProjectCameraById(String id) { |
| | | return projectCameraMapper.selectProjectCameraById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询监控设备列表 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 监控设备 |
| | | */ |
| | | @Override |
| | | public List<ProjectCamera> selectProjectCameraList(ProjectCamera projectCamera) { |
| | | return projectCameraMapper.selectProjectCameraList(projectCamera); |
| | | } |
| | | |
| | | /** |
| | | * 新增监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertProjectCamera(ProjectCamera projectCamera) { |
| | | if(ObjectUtils.isEmpty(projectCamera.getId())){ |
| | | projectCamera.setId(IdGenerate.nextId()); |
| | | } |
| | | projectCamera.setCreateTime(DateUtils.getNowDate()); |
| | | return projectCameraMapper.insertProjectCamera(projectCamera); |
| | | } |
| | | |
| | | /** |
| | | * 修改监控设备 |
| | | * |
| | | * @param projectCamera 监控设备 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateProjectCamera(ProjectCamera projectCamera) { |
| | | return projectCameraMapper.updateProjectCamera(projectCamera); |
| | | } |
| | | |
| | | /** |
| | | * 删除监控设备对象 |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteProjectCameraByIds(String ids) { |
| | | return projectCameraMapper.deleteProjectCameraByIds(Convert.toStrArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除监控设备信息 |
| | | * |
| | | * @param id 监控设备ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteProjectCameraById(String id) { |
| | | return projectCameraMapper.deleteProjectCameraById(id); |
| | | } |
| | | } |
| | |
| | | package com.javaweb.geo.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.javaweb.common.utils.DateUtils; |
| | | import com.javaweb.common.utils.IdGenerate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | /** |
| | | * 项目资料Service业务层处理 |
| | | * |
| | | * |
| | | * @author cxy |
| | | * @date 2024-05-16 |
| | | */ |
| | | @Service |
| | | public class ProjectDataServiceImpl implements IProjectDataService |
| | | { |
| | | public class ProjectDataServiceImpl implements IProjectDataService { |
| | | @Autowired |
| | | private ProjectDataMapper projectDataMapper; |
| | | |
| | | /** |
| | | * 查询项目资料 |
| | | * |
| | | * |
| | | * @param id 项目资料ID |
| | | * @return 项目资料 |
| | | */ |
| | | @Override |
| | | public ProjectData selectProjectDataById(String id) |
| | | { |
| | | public ProjectData selectProjectDataById(String id) { |
| | | return projectDataMapper.selectProjectDataById(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询项目资料列表 |
| | | * |
| | | * |
| | | * @param projectData 项目资料 |
| | | * @return 项目资料 |
| | | */ |
| | | @Override |
| | | public List<ProjectData> selectProjectDataList(ProjectData projectData) |
| | | { |
| | | public List<ProjectData> selectProjectDataList(ProjectData projectData) { |
| | | if (!ObjectUtils.isEmpty(projectData.getDataType()) && projectData.getDataType().endsWith(",")){ |
| | | projectData.setDataType(projectData.getDataType().substring(0,1)); |
| | | } |
| | | return projectDataMapper.selectProjectDataList(projectData); |
| | | } |
| | | |
| | | /** |
| | | * 新增项目资料 |
| | | * |
| | | * |
| | | * @param projectData 项目资料 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertProjectData(ProjectData projectData) |
| | | { |
| | | if(ObjectUtils.isEmpty(projectData.getId())){ |
| | | public int insertProjectData(ProjectData projectData) { |
| | | if (ObjectUtils.isEmpty(projectData.getId())) { |
| | | projectData.setId(IdGenerate.nextId()); |
| | | } |
| | | projectData.setCreateTime(DateUtils.getNowDate()); |
| | |
| | | |
| | | /** |
| | | * 修改项目资料 |
| | | * |
| | | * |
| | | * @param projectData 项目资料 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateProjectData(ProjectData projectData) |
| | | { |
| | | public int updateProjectData(ProjectData projectData) { |
| | | projectData.setUpdateTime(DateUtils.getNowDate()); |
| | | return projectDataMapper.updateProjectData(projectData); |
| | | } |
| | | |
| | | /** |
| | | * 删除项目资料对象 |
| | | * |
| | | * |
| | | * @param ids 需要删除的数据ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteProjectDataByIds(String ids) |
| | | { |
| | | public int deleteProjectDataByIds(String ids) { |
| | | return projectDataMapper.deleteProjectDataByIds(Convert.toStrArray(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 删除项目资料信息 |
| | | * |
| | | * |
| | | * @param id 项目资料ID |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteProjectDataById(String id) |
| | | { |
| | | public int deleteProjectDataById(String id) { |
| | | return projectDataMapper.deleteProjectDataById(id); |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.javaweb.geo.mapper.ProjectCameraMapper"> |
| | | |
| | | <resultMap type="ProjectCamera" id="ProjectCameraResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="projectId" column="project_id" /> |
| | | <result property="name" column="name" /> |
| | | <result property="code" column="code" /> |
| | | <result property="lng" column="lng" /> |
| | | <result property="lat" column="lat" /> |
| | | <result property="ip" column="ip" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectProjectCameraVo"> |
| | | select id, project_id, name, code, lng, lat, ip, create_by, create_time from js_project_camera |
| | | </sql> |
| | | |
| | | <select id="selectProjectCameraList" parameterType="ProjectCamera" resultMap="ProjectCameraResult"> |
| | | <include refid="selectProjectCameraVo"/> |
| | | <where> |
| | | <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> |
| | | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| | | <if test="code != null and code != ''"> and code = #{code}</if> |
| | | <if test="lng != null "> and lng = #{lng}</if> |
| | | <if test="lat != null "> and lat = #{lat}</if> |
| | | <if test="ip != null and ip != ''"> and ip = #{ip}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectProjectCameraById" parameterType="String" resultMap="ProjectCameraResult"> |
| | | <include refid="selectProjectCameraVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertProjectCamera" parameterType="ProjectCamera"> |
| | | insert into js_project_camera |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''">id,</if> |
| | | <if test="projectId != null and projectId != ''">project_id,</if> |
| | | <if test="name != null and name != ''">name,</if> |
| | | <if test="code != null and code != ''">code,</if> |
| | | <if test="lng != null ">lng,</if> |
| | | <if test="lat != null ">lat,</if> |
| | | <if test="ip != null and ip != ''">ip,</if> |
| | | <if test="createBy != null ">create_by,</if> |
| | | <if test="createTime != null ">create_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''">#{id},</if> |
| | | <if test="projectId != null and projectId != ''">#{projectId},</if> |
| | | <if test="name != null and name != ''">#{name},</if> |
| | | <if test="code != null and code != ''">#{code},</if> |
| | | <if test="lng != null ">#{lng},</if> |
| | | <if test="lat != null ">#{lat},</if> |
| | | <if test="ip != null and ip != ''">#{ip},</if> |
| | | <if test="createBy != null ">#{createBy},</if> |
| | | <if test="createTime != null ">#{createTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateProjectCamera" parameterType="ProjectCamera"> |
| | | update js_project_camera |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="projectId != null and projectId != ''">project_id = #{projectId},</if> |
| | | <if test="name != null and name != ''">name = #{name},</if> |
| | | <if test="code != null and code != ''">code = #{code},</if> |
| | | <if test="lng != null ">lng = #{lng},</if> |
| | | <if test="lat != null ">lat = #{lat},</if> |
| | | <if test="ip != null and ip != ''">ip = #{ip},</if> |
| | | <if test="createBy != null ">create_by = #{createBy},</if> |
| | | <if test="createTime != null ">create_time = #{createTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteProjectCameraById" parameterType="String"> |
| | | delete from js_project_camera where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteProjectCameraByIds" parameterType="String"> |
| | | delete from js_project_camera where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | <include refid="selectProjectDataVo"/> |
| | | <where> |
| | | <if test="projectId != null and projectId != ''"> and project_id = #{projectId}</if> |
| | | <if test="holeId != null and holeId != ''"> and hole_id = #{holeId}</if> |
| | | <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> |
| | | <if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if> |
| | | <if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if> |
| | |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <th:block th:include="include :: datetimepicker-js" /> |
| | | <script type="text/javascript"> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "geo/device" |
| | | $("#form-device-add").validate({ |
| | | focusCleanup: true |
| | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <script type="text/javascript"> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "geo/deviceLog" |
| | | $("#form-deviceLog-add").validate({ |
| | | focusCleanup: true |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lng" class="form-control" required type="text"> |
| | | <input name="lng" class="form-control" required type="text" placeholder="请填写经度,经纬度格式"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">纬度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lat" class="form-control" required type="text"> |
| | | <input name="lat" class="form-control" required type="text" placeholder="请填写纬度,经纬度格式"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | |
| | | <i class="glyphicon glyphicon-tint"></i> <a class="afont" th:href="@{/geo/projectData(id=${project.ids},type='7')}" target="mainFrame" onclick="selected(this)">水质分析</a> |
| | | </div> |
| | | </div> |
| | | <div class="box-header "> |
| | | <div class="box-title"> |
| | | <i class="glyphicon glyphicon-facetime-video"></i> <a class="afont" th:href="@{/geo/projectCamera(id=${project.ids},type='7')}" target="mainFrame" onclick="selected(this)">现场监控设备</a> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
| | | <head> |
| | | <th:block th:include="include :: header('新增监控设备')" /> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-projectCamera-add"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="name" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">视频编号:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="code" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lng" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">纬度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lat" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">Ip地址:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="ip" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "geo/projectCamera" |
| | | $("#form-projectCamera-add").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/add", $('#form-projectCamera-add').serialize()); |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
| | | <head> |
| | | <th:block th:include="include :: header('修改监控设备')" /> |
| | | </head> |
| | | <body class="white-bg"> |
| | | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
| | | <form class="form-horizontal m" id="form-projectCamera-edit" th:object="${projectCamera}"> |
| | | <input name="id" th:field="*{id}" type="hidden"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">名称:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="name" th:field="*{name}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">视频编号:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="code" th:field="*{code}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">经度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lng" th:field="*{lng}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">纬度:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="lat" th:field="*{lat}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">Ip地址:</label> |
| | | <div class="col-sm-8"> |
| | | <input name="ip" th:field="*{ip}" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <script type="text/javascript"> |
| | | var prefix = ctx + "geo/projectCamera"; |
| | | $("#form-projectCamera-edit").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/edit", $('#form-projectCamera-edit').serialize()); |
| | | } |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
| | | <head> |
| | | <th:block th:include="include :: header('监控设备列表')" /> |
| | | </head> |
| | | <body class="gray-bg"> |
| | | <div class="container-div"> |
| | | <div class="row"> |
| | | <div class="col-sm-12 search-collapse"> |
| | | <form id="formId"> |
| | | <div class="select-list"> |
| | | <ul> |
| | | <li> |
| | | <p>项目id:</p> |
| | | <input type="text" name="projectId"/> |
| | | </li> |
| | | <li> |
| | | <p>名称:</p> |
| | | <input type="text" name="name"/> |
| | | </li> |
| | | <li> |
| | | <p>视频编号:</p> |
| | | <input type="text" name="code"/> |
| | | </li> |
| | | <li> |
| | | <p>经度:</p> |
| | | <input type="text" name="lng"/> |
| | | </li> |
| | | <li> |
| | | <p>纬度:</p> |
| | | <input type="text" name="lat"/> |
| | | </li> |
| | | <li> |
| | | <p>Ip地址:</p> |
| | | <input type="text" name="ip"/> |
| | | </li> |
| | | <li> |
| | | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
| | | <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="btn-group-sm" id="toolbar" role="group"> |
| | | <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="geo:projectCamera:add"> |
| | | <i class="fa fa-plus"></i> 添加 |
| | | </a> |
| | | <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="geo:projectCamera:edit"> |
| | | <i class="fa fa-edit"></i> 修改 |
| | | </a> |
| | | <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:projectCamera:remove"> |
| | | <i class="fa fa-remove"></i> 删除 |
| | | </a> |
| | | <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:projectCamera:export"> |
| | | <i class="fa fa-download"></i> 导出 |
| | | </a> |
| | | </div> |
| | | <div class="col-sm-12 select-table table-striped"> |
| | | <table id="bootstrap-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <script th:inline="javascript"> |
| | | var editFlag = [[${@permission.hasPermi('geo:projectCamera:edit')}]]; |
| | | var removeFlag = [[${@permission.hasPermi('geo:projectCamera:remove')}]]; |
| | | var prefix = ctx + "geo/projectCamera"; |
| | | |
| | | $(function() { |
| | | var options = { |
| | | url: prefix + "/list", |
| | | createUrl: prefix + "/add", |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | | modalName: "监控设备", |
| | | columns: [{ |
| | | checkbox: true |
| | | }, |
| | | { |
| | | field : 'id', |
| | | title : '主键', |
| | | visible: false |
| | | }, |
| | | { |
| | | field : 'name', |
| | | title : '名称' |
| | | }, |
| | | { |
| | | field : 'code', |
| | | title : '视频编号' |
| | | }, |
| | | { |
| | | field : 'lng', |
| | | title : '经度' |
| | | }, |
| | | { |
| | | field : 'lat', |
| | | title : '纬度' |
| | | }, |
| | | { |
| | | field : 'ip', |
| | | title : 'Ip地址' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | align: 'center', |
| | | formatter: function(value, row, index) { |
| | | var actions = []; |
| | | actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
| | | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | return actions.join(''); |
| | | } |
| | | }] |
| | | }; |
| | | $.table.init(options); |
| | | }); |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <input name="name" class="form-control" type="text"> |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">资料类型:</label> |
| | | <div class="col-sm-8"> |
| | | <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required> |
| | | <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="form-group">--> |
| | | <!-- <label class="col-sm-3 control-label">资料类型:</label>--> |
| | | <!-- <div class="col-sm-8">--> |
| | | <!-- <select name="dataType" class="form-control m-b" th:with="type=${@dict.getType('project_data_type')}" required>--> |
| | | <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">文件类型:</label> |
| | | <div class="col-sm-8"> |
| | |
| | | </form> |
| | | </div> |
| | | <th:block th:include="include :: footer" /> |
| | | <script type="text/javascript"> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "geo/projectData" |
| | | var projectId = [[${projectId}]]; |
| | | var dataType = [[${dataType}]]; |
| | | |
| | | $("#form-projectData-add").validate({ |
| | | focusCleanup: true |
| | | }); |
| | | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | $.operate.save(prefix + "/add", $('#form-projectData-add').serialize()); |
| | | let formData = $('#form-projectData-add').serialize(); |
| | | let data = formData + "&projectId=" + projectId + "&dataType=" + dataType; |
| | | console.log("222",data); |
| | | $.operate.save(prefix + "/add", data); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | var projectId=[[${projectId}]]; |
| | | var type=[[${type}]]; |
| | | var prefix = ctx + "geo/projectData"; |
| | | console.log("type",type); |
| | | |
| | | $(function() { |
| | | var options = { |
| | | url: prefix + "/list?projectId="+projectId + "&dataType=" + type, |
| | | createUrl: prefix + "/add", |
| | | url: prefix + "/list?projectId=" + projectId + "&dataType=" + type, |
| | | createUrl: prefix + "/add?projectId=" + projectId + "&dataType=" + type, |
| | | updateUrl: prefix + "/edit/{id}", |
| | | removeUrl: prefix + "/remove", |
| | | exportUrl: prefix + "/export", |
| | |
| | | <th:block th:include="include :: footer" /> |
| | | <script th:inline="javascript"> |
| | | var prefix = ctx + "geo/projectPerson" |
| | | var project_Ids = [[${project_Id}]]; |
| | | alert(project_Ids); |
| | | console.log("projectId",project_Id); |
| | | var projectId = [[${projectId}]]; |
| | | |
| | | $("#form-projectPerson-add").validate({ |
| | | focusCleanup: true |
| | |
| | | function submitHandler() { |
| | | if ($.validate.form()) { |
| | | let formData = $('#form-projectPerson-add').serialize(); |
| | | let data = formData + "&projectId=" + project_Id |
| | | console.log("projectId",project_Id); |
| | | console.log("data",data); |
| | | let data = formData + "&projectId=" + projectId; |
| | | $.operate.save(prefix + "/add", data); |
| | | } |
| | | } |