Commit 013548b7 authored by beilang's avatar beilang

add 周浦

parent 6c0c5818
package com.ces.web.zp.controller; package com.ces.web.zp.controller;
import com.ces.common.constant.Constant; import com.ces.common.constant.Constant;
import com.ces.common.core.domain.Result;
import com.ces.web.device.service.IDeviceService;
import org.apache.shiro.authz.annotation.RequiresRoles; import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
/** /**
...@@ -17,43 +12,31 @@ import org.springframework.web.servlet.ModelAndView; ...@@ -17,43 +12,31 @@ import org.springframework.web.servlet.ModelAndView;
*/ */
@Controller @Controller
@RequestMapping("/zp") @RequestMapping("/zp")
@RequiresRoles({Constant.RoleCode.ZP})
public class ZPController { public class ZPController {
@Autowired
private IDeviceService deviceService;
@GetMapping @GetMapping
@RequiresRoles({Constant.RoleCode.ZP})
public ModelAndView njIndex() { public ModelAndView njIndex() {
return new ModelAndView("zp/areaPlan"); return new ModelAndView("zp/areaPlan");
} }
@GetMapping("/jcqy") @GetMapping("/onefloor")
@RequiresRoles({Constant.RoleCode.ZP}) public ModelAndView onefloorIndex() {
public ModelAndView jcqyIndex(String buildName) { return new ModelAndView("zp/onefloor");
ModelAndView mv = new ModelAndView("zp/commonmodel");
mv.addObject("buildName", buildName);
mv.addObject("floorDeviceCnt",deviceService.getCntByPrisonNameAndBuildName("沪-周",buildName));
return mv;
} }
/** @GetMapping("/twofloor")
* 获取所有楼层及监控数量信息 public ModelAndView twofloorIndex() {
* @param buildName 大楼名称 return new ModelAndView("zp/twofloor");
*/
@GetMapping("/getCntByBuildName")
@RequiresRoles({Constant.RoleCode.ZP})
public Result getCntByBuildName(String buildName) {
return Result.success(deviceService.getCntByPrisonNameAndBuildName("沪-周",buildName));
} }
/** @GetMapping("/therefloor")
* 获取楼层的监控信息 public ModelAndView therefloorIndex() {
* @param buildName 大楼名称 return new ModelAndView("zp/therefloor");
*/ }
@GetMapping("/getGbidByBuildNameAndFloor")
@RequiresRoles({Constant.RoleCode.ZP}) @GetMapping("/hjfloor")
@ResponseBody public ModelAndView hjfloorIndex() {
public Result getGbidByBuildNameAndFloor(String buildName,String floor) { return new ModelAndView("zp/hjfloor");
return Result.success(deviceService.getGbidByPrisonNameAndBuildNameAndFloor("沪-周",buildName,floor));
} }
} }
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<form class="loginForm"> <form class="loginForm">
<div class="mb-3"> <div class="mb-3">
<label for="loginName" class="form-label">账 号</label> <label for="loginName" class="form-label">账 号</label>
<input type="text" class="form-control" id="loginName" value="邓滔"> <input type="text" class="form-control" id="loginName" value="dengtao">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="password" class="form-label">密 码</label> <label for="password" class="form-label">密 码</label>
......
...@@ -36,46 +36,46 @@ ...@@ -36,46 +36,46 @@
<div class="left-menu"> <div class="left-menu">
<ul> <ul>
<li> <li>
<a href="${ctx}/zp/jcqy?buildName=1号楼"> <a href="${ctx}/zp/onefloor">
<div class="menu-mc"> <div class="menu-mc">
<span>1号楼</span> <span>号楼</span>
</div> </div>
<div class="menu-num"> <div class="menu-num">
<span>监控点</span> <span>监控点</span>
<span style="background-color: #ff6363;">138</span> <span style="background-color: #ff6363;">60</span>
</div> </div>
</a> </a>
</li> </li>
<li> <li>
<a href="${ctx}/zp/jcqy?buildName=2号楼"> <a href="${ctx}/zp/twofloor">
<div class="menu-mc"> <div class="menu-mc">
<span>2号楼</span> <span>号楼</span>
</div> </div>
<div class="menu-num"> <div class="menu-num">
<span>监控点</span> <span>监控点</span>
<span style=" background-color: #ffba00;">239</span> <span style=" background-color: #ffba00;">76</span>
</div> </div>
</a> </a>
</li> </li>
<li> <li>
<a href="${ctx}/zp/jcqy?buildName=3号楼"> <a href="${ctx}/zp/therefloor">
<div class="menu-mc"> <div class="menu-mc">
<span>3号楼</span> <span>号楼</span>
</div> </div>
<div class="menu-num"> <div class="menu-num">
<span>监控点</span> <span>监控点</span>
<span style="background-color: #43e04e;">295</span> <span style="background-color: #43e04e;">96</span>
</div> </div>
</a> </a>
</li> </li>
<li> <li>
<a href="${ctx}/zp/jcqy?buildName=会见楼"> <a href="${ctx}/zp/hjfloor">
<div class="menu-mc"> <div class="menu-mc">
<span>会见楼</span> <span>会见楼</span>
</div> </div>
<div class="menu-num"> <div class="menu-num">
<span>监控点</span> <span>监控点</span>
<span style=" background-color: #2f8fff;">80</span> <span style=" background-color: #2f8fff;">76</span>
</div> </div>
</a> </a>
</li> </li>
...@@ -86,25 +86,25 @@ ...@@ -86,25 +86,25 @@
<div class="area-box"> <div class="area-box">
<ul> <ul>
<li class="a_floor"> <li class="a_floor">
<a href="${ctx}/zp/jcqy?buildName=1号楼"> <a href="${ctx}/zp/onefloor">
<img src="${ctx}/static/images/A_floor.png"/> <img src="${ctx}/static/images/A_floor.png"/>
<span>1号楼</span> <span>号楼</span>
</a> </a>
</li> </li>
<li class="bg1_floor"> <li class="bg1_floor">
<a href="${ctx}/zp/jcqy?buildName=2号楼"> <a href="${ctx}/zp/twofloor">
<img src="${ctx}/static/images/bgq_floor.png"/> <img src="${ctx}/static/images/bgq_floor.png"/>
<span>2号楼</span> <span>号楼</span>
</a> </a>
</li> </li>
<li class="b_floor"> <li class="b_floor">
<a href="${ctx}/zp/jcqy?buildName=3号楼"> <a href="${ctx}/zp/therefloor">
<img src="${ctx}/static/images/B_floor.png"/> <img src="${ctx}/static/images/B_floor.png"/>
<span>3号楼</span> <span>号楼</span>
</a> </a>
</li> </li>
<li class="g_floor"> <li class="g_floor">
<a href="${ctx}/zp/jcqy?buildName=会见楼"> <a href="${ctx}/zp/hjfloor">
<img src="${ctx}/static/images/G_floor.png"/> <img src="${ctx}/static/images/G_floor.png"/>
<span>会见楼</span> <span>会见楼</span>
</a> </a>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -206,7 +206,25 @@ var VideoPlayer = { ...@@ -206,7 +206,25 @@ var VideoPlayer = {
let gbIds = ''; let gbIds = '';
$.each(data, function (i, obj) { $.each(data, function (i, obj) {
gbIds += obj.gbId + ','; gbIds += obj.gbId + ',';
html += '<li data-gbid="' + obj.gbId + '"><img src="'+ctx+'/static/images/sp_icon.png"><span ' + (obj.gbId === _this.gbid ? 'style="color:#00e5ff;"' : '') + '>' + obj.place + (obj.deviceNo ? '-' + obj.deviceNo : '') + '</span></li>'; let name = obj.place + (obj.deviceNo ? '-' + obj.deviceNo : '');
let title = name;
if (name.length > 6) {
let splitArray = name.split('-');
if (splitArray.length === 2) {
if (splitArray[0].length <= 4 && splitArray[1].length <=2) {
name = splitArray[0] + '-' + splitArray[1];
} else {
if (splitArray[0].length >= 5) {
name = name.substring(0, 5) + '...';
} else {
name = name.substring(0, 6) + '...';
}
}
} else {
name = name.substring(0, 5) + '...';
}
}
html += '<li data-gbid="' + obj.gbId + '" title="' + title + '"><img src="'+ctx+'/static/images/sp_icon.png"><span ' + (obj.gbId === _this.gbid ? 'style="color:#00e5ff;"' : '') + '>' + name + '</span></li>';
}) })
$("#videos").append(html); $("#videos").append(html);
_this.getListStatus(gbIds); _this.getListStatus(gbIds);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment