大数据页面bug修改。
This commit is contained in:
parent
6e15250a6b
commit
b29dc7e92f
@ -20,6 +20,15 @@ public class PartyBuildingProperties {
|
||||
private String partyUrl;
|
||||
private String title;
|
||||
private String servicecityUrl;
|
||||
private String logoUrl;
|
||||
|
||||
public String getLogoUrl() {
|
||||
return logoUrl == null ? "" : logoUrl;
|
||||
}
|
||||
|
||||
public void setLogoUrl(String logoUrl) {
|
||||
this.logoUrl = logoUrl;
|
||||
}
|
||||
|
||||
public String getServicecityUrl() {
|
||||
return servicecityUrl == null ? "" : servicecityUrl;
|
||||
|
@ -56,11 +56,19 @@ public class PartyOrganizeController extends AbstractController {
|
||||
ClientTokenBO token = ClientTokenManager.getInstance().getClientToken();
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
String url = partyBuildingProperties.getPartyUrl();
|
||||
if("0".equals(params.get("belongLevel"))) {
|
||||
url += "/resource/partyorganize/bigdatarelease?belongLevel=";
|
||||
}else {
|
||||
url += "/resource/partyorganize/bigdatarelease?belongLevel=" + params.get("belongLevel");
|
||||
url += "/resource/partyorganize/bigdatarelease";
|
||||
if("0".equals(params.get("belongLevel")) && StringUtils.isEmpty(params.get("belongLevel"))) {
|
||||
// url += "/resource/partyorganize/bigdatarelease?belongLevel=";
|
||||
}else if(!"0".equals(params.get("belongLevel")) && !StringUtils.isEmpty(params.get("belongLevel"))) {
|
||||
url += "?belongLevel=" + params.get("belongLevel");
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(params.get("partyOrganizeId")) && ("0".equals(params.get("belongLevel")) || StringUtils.isEmpty(params.get("belongLevel")))) {
|
||||
url += "?partyOrganizeId=" + params.get("partyOrganizeId");
|
||||
}else if(!StringUtils.isEmpty(params.get("partyOrganizeId")) && !"0".equals(params.get("belongLevel")) && !StringUtils.isEmpty(params.get("belongLevel"))){
|
||||
url += "&partyOrganizeId=" + params.get("partyOrganizeId");
|
||||
}
|
||||
|
||||
String str = restTemplate.getForObject(url, String.class, params);
|
||||
JSONObject jsonObject = null;
|
||||
if(StringUtils.isEmpty(str)) {
|
||||
|
@ -330,18 +330,17 @@ layui.config({
|
||||
// 党组织列表(下级)
|
||||
subPartyOrganizeList: function () {
|
||||
var self = this;
|
||||
var newLevel = parseInt(self.belongLevel);
|
||||
if (newLevel < 5) {
|
||||
$('#tableDiv').hide();
|
||||
var newLevel = parseInt(self.belongLevel) + 1;
|
||||
if (newLevel <= 5) {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/partyorganize/listpagepartyorganize?belongLevel=' + newLevel + '&bigData=yes', []), {page: self.page.page, rows: self.page.rows}, null, function(code, data) {
|
||||
console.log(data)
|
||||
if(data && data.rows.length > 0) {
|
||||
$('#tableDiv').show();
|
||||
self.partyOrganizeList = data.rows;
|
||||
self.page.page = data.page;
|
||||
self.page.totalPage = data.total;
|
||||
self.page.totalPage = Math.ceil(data.total / self.page.rows)
|
||||
console.log(self.page.totalPage)
|
||||
}else {
|
||||
$('#tableDiv').hide();
|
||||
}
|
||||
|
@ -215,7 +215,6 @@
|
||||
var self = this;
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/servicecity/listuserandpoints?communityBossLevel={level}', [level]), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
// 划片
|
||||
self.takeUserArea(data);
|
||||
}, function(code, data) {
|
||||
|
@ -125,12 +125,12 @@
|
||||
},
|
||||
methods: {
|
||||
// 请求支部数,党员数接口
|
||||
initPartyOrganizeData: function(value) {
|
||||
initPartyOrganizeData: function(value, value2) {
|
||||
var self = this;
|
||||
self.belongLevel = value;
|
||||
var loadLayerIndex;
|
||||
var url;
|
||||
top.restAjax.get(top.restAjax.path('api/partyorganize/bigdata?belongLevel={belongLevel}', [value]), {}, null, function(code, data) {
|
||||
top.restAjax.get(top.restAjax.path('api/partyorganize/bigdata?belongLevel={belongLevel}&partyOrganizeId={partyOrganizeId}', [value, value2]), {}, null, function(code, data) {
|
||||
self.pointArr = data.data.partyOrganizeDTOList;
|
||||
self.count.zbCount = data.data.zbCount;
|
||||
self.count.peopleCount = data.data.peopleCount;
|
||||
@ -166,7 +166,7 @@
|
||||
$('#selId').text(text);
|
||||
$('#selId').append(icoHtml);
|
||||
|
||||
self.initPartyOrganizeData(value);
|
||||
self.initPartyOrganizeData(value, '');
|
||||
},
|
||||
initBaiduMap: function () {
|
||||
var self = this;
|
||||
@ -204,11 +204,11 @@
|
||||
var point = new BMap.Point(item.longitude, item.latitude);
|
||||
// var imgSrc = self.url + '/route/file/downloadfile/false/' + item.logo;
|
||||
var imgSrc = item.logo;
|
||||
var el = createMark(point, imgSrc, item.partyOrganizeId);
|
||||
var el = createMark(point, imgSrc, item.partyOrganizeId, item.belongLevel);
|
||||
}
|
||||
}
|
||||
// 给地图添加点
|
||||
function createMark(point, imgSrc, partyOrganizeId) {
|
||||
function createMark(point, imgSrc, partyOrganizeId, belongLevel) {
|
||||
// 定义绘制图标方法
|
||||
function customizeOverlay(center, length){
|
||||
this._center = center;
|
||||
@ -228,7 +228,7 @@
|
||||
|
||||
// 监听点击
|
||||
$(el).on('click', function(e){
|
||||
self.showPartyOrganize(partyOrganizeId);
|
||||
self.showPartyOrganize(partyOrganizeId, belongLevel);
|
||||
})
|
||||
|
||||
// 保存div实例
|
||||
@ -273,10 +273,12 @@
|
||||
oDiv.appendChild(oBottom);
|
||||
return oDiv;
|
||||
},
|
||||
showPartyOrganize: function(partyOrganizeId) {
|
||||
showPartyOrganize: function(partyOrganizeId, belongLevel) {
|
||||
var self = this;
|
||||
top.dialog.dialogData.partyOrganizeId = '';
|
||||
top.dialog.dialogData.belongLevel = '';
|
||||
top.dialog.open({
|
||||
url: top.restAjax.path('route/bigdata/detail.html?partyOrganizeId={partyOrganizeId}&belongLevel='+self.belongLevel, [partyOrganizeId]),
|
||||
url: top.restAjax.path('route/bigdata/detail.html?partyOrganizeId={partyOrganizeId}&belongLevel='+belongLevel, [partyOrganizeId]),
|
||||
title: '详情',
|
||||
width: '1080px',
|
||||
height: '98%',
|
||||
@ -285,11 +287,12 @@
|
||||
self.getPartyMemberCount(top.dialog.dialogData.partyOrganizeId);
|
||||
self.getMeetingCount(top.dialog.dialogData.partyOrganizeId);
|
||||
self.getMeetingCharts(top.dialog.dialogData.partyOrganizeId);
|
||||
self.initPartyOrganizeData('', top.dialog.dialogData.partyOrganizeId);
|
||||
}else if(top.dialog.dialogData.partyOrganizeId && top.dialog.dialogData.belongLevel) {
|
||||
self.getPartyMemberCount(top.dialog.dialogData.partyOrganizeId);
|
||||
self.getMeetingCount(top.dialog.dialogData.partyOrganizeId);
|
||||
self.getMeetingCharts(top.dialog.dialogData.partyOrganizeId);
|
||||
self.initPartyOrganizeData(top.dialog.dialogData.belongLevel + 1);
|
||||
self.initPartyOrganizeData(top.dialog.dialogData.belongLevel, '');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -350,7 +353,6 @@
|
||||
url = 'api/partyorganize/meetingcharts';
|
||||
}
|
||||
top.restAjax.get(top.restAjax.path(url, []), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
self.meetingCharts = data.data.meetingCharts;
|
||||
self.initZhuCharts();
|
||||
}, function(code, data) {
|
||||
@ -484,7 +486,7 @@
|
||||
$('.cm-main').css({'height': windowHeight * 0.9 + 'px'})
|
||||
|
||||
//创建和初始化地图函数
|
||||
this.initPartyOrganizeData(1)
|
||||
this.initPartyOrganizeData(0, '')
|
||||
this.getMeetingCount('')
|
||||
this.getMeetingCharts('')
|
||||
|
||||
|
@ -215,7 +215,6 @@
|
||||
var self = this;
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/servicecity/listuserandpoints?communityBossLevel={level}', [level]), {}, null, function(code, data) {
|
||||
console.log(data)
|
||||
// 划片
|
||||
self.takeUserArea(data);
|
||||
}, function(code, data) {
|
||||
|
Loading…
Reference in New Issue
Block a user