Commit 36c2445d authored by 军师中郎将's avatar 军师中郎将

1 大屏端 居民用户 和 商业用户 上图后 界面拖动卡问题优化。

parent 623da5c2
...@@ -84,8 +84,6 @@ public class TDetectorUserController extends BaseController ...@@ -84,8 +84,6 @@ public class TDetectorUserController extends BaseController
return AjaxResult.success(tDetectorUserCount); return AjaxResult.success(tDetectorUserCount);
} }
/** /**
* 获取探测器用户列表 * 获取探测器用户列表
* @return * @return
...@@ -104,6 +102,17 @@ public class TDetectorUserController extends BaseController ...@@ -104,6 +102,17 @@ public class TDetectorUserController extends BaseController
return AjaxResult.success(tDetectorUserService.detectorUserList(tDetectorUser)); return AjaxResult.success(tDetectorUserService.detectorUserList(tDetectorUser));
} }
/**
* 获取探测器用户列表 大屏地图 labelsLayer 标注的方式
* @return ajaxResult
*/
@GetMapping("/labelsLayerMarksDetectorUserList")
public AjaxResult labelsLayerMarksDetectorUserList(TDetectorUser tDetectorUser){
return AjaxResult.success(tDetectorUserService.labelsLayerMarksDetectorUserList(tDetectorUser));
}
/** /**
* 获取探测器用户列表 * 获取探测器用户列表
* @return * @return
......
...@@ -33,6 +33,13 @@ public interface ITDetectorUserService ...@@ -33,6 +33,13 @@ public interface ITDetectorUserService
*/ */
// public Map<String, List<TMassMarksDetectorUserVO>> massMarksDetectorUserList(TDetectorUser tDetectorUser); // public Map<String, List<TMassMarksDetectorUserVO>> massMarksDetectorUserList(TDetectorUser tDetectorUser);
/**
* 查询探测器用户列表 地图使用 labelsLayer 标注的方式
* @param tDetectorUser tDetectorUser
* @return r
*/
public Map<String, List<TDetectorUserVO>> labelsLayerMarksDetectorUserList(TDetectorUser tDetectorUser);
/** /**
* 查询探测器用户列表 * 查询探测器用户列表
* *
......
...@@ -87,6 +87,43 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -87,6 +87,43 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
return tDetectorUserMapper.countTDetectorUserForMassMarks(tDetectorUser); return tDetectorUserMapper.countTDetectorUserForMassMarks(tDetectorUser);
} }
/**
* 查询探测器用户列表 地图使用 labelsLayerMarks 标注的方式
* @param tDetectorUser tDetectorUser
* @return r
*/
@Override
public Map<String, List<TDetectorUserVO>> labelsLayerMarksDetectorUserList(TDetectorUser tDetectorUser) {
Map<String, List<TDetectorUserVO>> collect ;
List<TDetectorUserVO> list = new ArrayList<>();
List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(tDetectorUser);
if (tDetectorUserList.size() > 0) {
for(TDetectorUserVO user : tDetectorUserList){
TDetectorUserVO userVO = new TDetectorUserVO();
BeanUtils.copyProperties(user, userVO);
List<Object> newList = new ArrayList<>();
newList.add(user);
userVO.setDetectorCountList(newList);
if("1".equals(userVO.getUserType())) {
userVO.setIconType("6");
} else if ("2".equals(userVO.getUserType())) {
userVO.setIconType("61");
}
list.add(userVO);
}
collect = list.stream().collect(Collectors.groupingBy(TDetectorUserVO::getIconType));
} else {
collect = new HashMap<>(0);
}
return collect;
}
/** /**
* 查询探测器用户列表 地图使用 massMarks 标注的方式 * 查询探测器用户列表 地图使用 massMarks 标注的方式
* @param tDetectorUser tDetectorUser * @param tDetectorUser tDetectorUser
......
...@@ -18,6 +18,14 @@ export function massMarksDetectorUserList(query) { ...@@ -18,6 +18,14 @@ export function massMarksDetectorUserList(query) {
}) })
} }
// 探测器用户列表 大屏端 labelsLayerMarks 标注方式
export function labelsLayerMarksDetectorUserList(query) {
return request({
url: '/supervise/user/labelsLayerMarksDetectorUserList',
method: 'get',
params: query
})
}
// 探测器用户列表 // 探测器用户列表
export function detectorUserList(query) { export function detectorUserList(query) {
return request({ return request({
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
import { EditorMap } from "@/utils/mapClass/map"; import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import { listDetectorInfo } from "@/api/detector/detectorInfo"; import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList,massMarksDetectorUserList } from "@/api/detector/detectorUser"; import { detectorUserList,massMarksDetectorUserList,labelsLayerMarksDetectorUserList } from "@/api/detector/detectorUser";
import { import {
pipeData, pipeData,
tiaoyaxiang, tiaoyaxiang,
...@@ -380,7 +380,7 @@ export default { ...@@ -380,7 +380,7 @@ export default {
// 用户要等一下 因为有报警数据 // 用户要等一下 因为有报警数据
this.massMarksDetectorUserGoMap(massMarksDetectorUserList,User, false).then((res) => { this.labelsLayerMarksDetectorUserGoMap(labelsLayerMarksDetectorUserList,User, false).then((res) => {
// 先查一下,然后开启定时器 // 先查一下,然后开启定时器
this.userAlarm(); this.userAlarm();
this.alarmTimer = setInterval(() => { this.alarmTimer = setInterval(() => {
...@@ -483,10 +483,10 @@ export default { ...@@ -483,10 +483,10 @@ export default {
}); });
}, },
massMarksDetectorUserGoMap(httpFunc, component, show) { labelsLayerMarksDetectorUserGoMap(httpFunc, component, show) {
return httpFunc().then((res) => { return httpFunc().then((res) => {
const mapData = res.data; const mapData = res.data;
this.map.addMassMarksDetectorUserGoMap(mapData, component, show); this.map.labelsLayerMarksDetectorUserList(mapData, component, show);
}); });
}, },
goMap(httpFunc, addFunc, component, show) { goMap(httpFunc, addFunc, component, show) {
......
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