Commit 013548b7 authored by beilang's avatar beilang

add 周浦

parent 6c0c5818
package com.ces.web.zp.controller;
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.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
/**
......@@ -17,43 +12,31 @@ import org.springframework.web.servlet.ModelAndView;
*/
@Controller
@RequestMapping("/zp")
@RequiresRoles({Constant.RoleCode.ZP})
public class ZPController {
@Autowired
private IDeviceService deviceService;
@GetMapping
@RequiresRoles({Constant.RoleCode.ZP})
public ModelAndView njIndex() {
return new ModelAndView("zp/areaPlan");
}
@GetMapping("/jcqy")
@RequiresRoles({Constant.RoleCode.ZP})
public ModelAndView jcqyIndex(String buildName) {
ModelAndView mv = new ModelAndView("zp/commonmodel");
mv.addObject("buildName", buildName);
mv.addObject("floorDeviceCnt",deviceService.getCntByPrisonNameAndBuildName("沪-周",buildName));
return mv;
@GetMapping("/onefloor")
public ModelAndView onefloorIndex() {
return new ModelAndView("zp/onefloor");
}
/**
* 获取所有楼层及监控数量信息
* @param buildName 大楼名称
*/
@GetMapping("/getCntByBuildName")
@RequiresRoles({Constant.RoleCode.ZP})
public Result getCntByBuildName(String buildName) {
return Result.success(deviceService.getCntByPrisonNameAndBuildName("沪-周",buildName));
@GetMapping("/twofloor")
public ModelAndView twofloorIndex() {
return new ModelAndView("zp/twofloor");
}
/**
* 获取楼层的监控信息
* @param buildName 大楼名称
*/
@GetMapping("/getGbidByBuildNameAndFloor")
@RequiresRoles({Constant.RoleCode.ZP})
@ResponseBody
public Result getGbidByBuildNameAndFloor(String buildName,String floor) {
return Result.success(deviceService.getGbidByPrisonNameAndBuildNameAndFloor("沪-周",buildName,floor));
@GetMapping("/therefloor")
public ModelAndView therefloorIndex() {
return new ModelAndView("zp/therefloor");
}
@GetMapping("/hjfloor")
public ModelAndView hjfloorIndex() {
return new ModelAndView("zp/hjfloor");
}
}
......@@ -62,7 +62,7 @@
<form class="loginForm">
<div class="mb-3">
<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 class="mb-3">
<label for="password" class="form-label">密 码</label>
......
......@@ -36,46 +36,46 @@
<div class="left-menu">
<ul>
<li>
<a href="${ctx}/zp/jcqy?buildName=1号楼">
<a href="${ctx}/zp/onefloor">
<div class="menu-mc">
<span>1号楼</span>
<span>号楼</span>
</div>
<div class="menu-num">
<span>监控点</span>
<span style="background-color: #ff6363;">138</span>
<span style="background-color: #ff6363;">60</span>
</div>
</a>
</li>
<li>
<a href="${ctx}/zp/jcqy?buildName=2号楼">
<a href="${ctx}/zp/twofloor">
<div class="menu-mc">
<span>2号楼</span>
<span>号楼</span>
</div>
<div class="menu-num">
<span>监控点</span>
<span style=" background-color: #ffba00;">239</span>
<span style=" background-color: #ffba00;">76</span>
</div>
</a>
</li>
<li>
<a href="${ctx}/zp/jcqy?buildName=3号楼">
<a href="${ctx}/zp/therefloor">
<div class="menu-mc">
<span>3号楼</span>
<span>号楼</span>
</div>
<div class="menu-num">
<span>监控点</span>
<span style="background-color: #43e04e;">295</span>
<span style="background-color: #43e04e;">96</span>
</div>
</a>
</li>
<li>
<a href="${ctx}/zp/jcqy?buildName=会见楼">
<a href="${ctx}/zp/hjfloor">
<div class="menu-mc">
<span>会见楼</span>
</div>
<div class="menu-num">
<span>监控点</span>
<span style=" background-color: #2f8fff;">80</span>
<span style=" background-color: #2f8fff;">76</span>
</div>
</a>
</li>
......@@ -86,25 +86,25 @@
<div class="area-box">
<ul>
<li class="a_floor">
<a href="${ctx}/zp/jcqy?buildName=1号楼">
<a href="${ctx}/zp/onefloor">
<img src="${ctx}/static/images/A_floor.png"/>
<span>1号楼</span>
<span>号楼</span>
</a>
</li>
<li class="bg1_floor">
<a href="${ctx}/zp/jcqy?buildName=2号楼">
<a href="${ctx}/zp/twofloor">
<img src="${ctx}/static/images/bgq_floor.png"/>
<span>2号楼</span>
<span>号楼</span>
</a>
</li>
<li class="b_floor">
<a href="${ctx}/zp/jcqy?buildName=3号楼">
<a href="${ctx}/zp/therefloor">
<img src="${ctx}/static/images/B_floor.png"/>
<span>3号楼</span>
<span>号楼</span>
</a>
</li>
<li class="g_floor">
<a href="${ctx}/zp/jcqy?buildName=会见楼">
<a href="${ctx}/zp/hjfloor">
<img src="${ctx}/static/images/G_floor.png"/>
<span>会见楼</span>
</a>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -206,7 +206,25 @@ var VideoPlayer = {
let gbIds = '';
$.each(data, function (i, obj) {
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);
_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