This commit is contained in:
wenc000 2020-12-17 11:44:26 +08:00
parent 32f1b51acb
commit 6e15250a6b
5 changed files with 34 additions and 20 deletions

View File

@ -56,8 +56,11 @@ public class PartyOrganizeController extends AbstractController {
ClientTokenBO token = ClientTokenManager.getInstance().getClientToken();
RestTemplate restTemplate = new RestTemplate();
String url = partyBuildingProperties.getPartyUrl();
url += "/resource/partyorganize/bigdatarelease?belongLevel=" + params.get("belongLevel");
url += "&access_token=" + token.getAccessToken();
if("0".equals(params.get("belongLevel"))) {
url += "/resource/partyorganize/bigdatarelease?belongLevel=";
}else {
url += "/resource/partyorganize/bigdatarelease?belongLevel=" + params.get("belongLevel");
}
String str = restTemplate.getForObject(url, String.class, params);
JSONObject jsonObject = null;
if(StringUtils.isEmpty(str)) {
@ -77,6 +80,9 @@ public class PartyOrganizeController extends AbstractController {
resultPartyOrganize.setGirl(object.getInteger("girl"));
String jsonArrayStr = object.getString("partyOrganizeDTOList");
List<PartyOrganizeDTO> partyOrganizeDTOList = JSONArray.parseArray(jsonArrayStr, PartyOrganizeDTO.class);
for(PartyOrganizeDTO dto: partyOrganizeDTOList) {
dto.setLogo(partyBuildingProperties.getPartyUrl() + "/route/file/downloadfile/false/" + dto.getLogo());;
}
resultPartyOrganize.setPartyOrganizeDTOList(partyOrganizeDTOList);
}
@ -109,6 +115,9 @@ public class PartyOrganizeController extends AbstractController {
String jsonArrayStr = jsonObject.getString("rows");
PageHelper.startPage(page.getPage(), page.getRows());
partyOrganizeDTOs = JSONArray.parseArray(jsonArrayStr, PartyOrganizeDTO.class);
for(PartyOrganizeDTO dto: partyOrganizeDTOs) {
dto.setLogo(partyBuildingProperties.getPartyUrl() + "/route/file/downloadfile/false/" + dto.getLogo());
}
return new SuccessResultList<>(partyOrganizeDTOs, jsonObject.getInteger("page"), jsonObject.getLong("total"));
}
@ -193,7 +202,7 @@ public class PartyOrganizeController extends AbstractController {
return new SuccessResultData<>(new HashMap<>());
}
jsonArray = JSONArray.parseArray(str);
params.put("bossLevel", jsonArray);
params.put("meetingCharts", jsonArray);
return new SuccessResultData<>(params);
}

View File

@ -124,6 +124,6 @@ logging:
server-other:
port: 8085
titile: 党建
party-url: http://219.147.99.164:8082/partybuilding
servicecity-url: http://192.168.0.111:8084/servicecity
party-url: http://192.168.0.111:8085/partybuilding
servicecity-url: http://219.147.99.164:8082/servicecity

View File

@ -1,18 +1,19 @@
[v-cloak]{display: none}
*{text-shadow: 0 0 5px #fff}
body{background: url("../images/body-bg.png") no-repeat center; background-size: 100% 100%;}
.cm-page-title{position:relative;box-sizing: border-box;padding: .2rem 0; text-align: center; background: url("../images/title-border.png") no-repeat bottom center; background-size: 12.5rem .1rem; font-size: 0;}
.cm-page-title ul{position: absolute;top:50%;left:0;transform: translate(0, -50%);width:100%}
.cm-page-title ul:after{content: '';display: block;clear: both;}
.cm-page-title ul li{box-sizing:border-box;float:left;width:50%;text-align: center;font-size: .22rem;color: #fff;border-right: 1px solid #fff;line-height: .6rem;}
.cm-page-title ul li{box-sizing:border-box;float:left;width:50%;text-align: center;font-size: .3rem;color: #fff;border-right: 1px solid #fff;line-height: .6rem;}
.cm-page-title ul li:last-child{border: none}
.cm-page-title ul li a{display: block;color: #fff;}
.cm-page-title ul li a{display: block;color: #fff;font-weight: bold;text-shadow: 0 0 10px #fff}
.cm-main{width:95%;margin: 0 auto;padding: 1% 0;box-sizing: border-box;}
.cm-main-top{height:70%;}
.cm-main-top:after{content:'';display: block;clear: both;}
.cm-left-charts{width: 18%; height:100%;float: left;margin-right: 2%;}
.cm-left-charts-box{font-size:0;height: 32%; padding: .1rem; box-sizing: border-box; margin-bottom: 2%; background: rgba(63,188,239,.2) url("../images/box-bg.png") no-repeat center; background-size: 100% 100%;}
.cm-left-charts-box:last-child{margin-bottom: 0;}
.cm-left-charts-box h3{height:20%;text-shadow:1px 2px 12px rgba(0,132,255,0.26);color: #fff; font-weight: normal; font-size: .3rem; text-shadow:1px 2px 12px rgba(0,132,255,0.26);}
.cm-left-charts-box h3{text-shadow: 0 0 10px #fff;height:20%;color: #fff; font-weight: normal; font-size: .3rem;}
.cm-charts-container{width: 100%; height: 80%;text-align: center;position: relative}
.cm-charts-container span{font-size: .6rem;font-weight: bold;color: #fff;position: absolute;top:50%;left:50%;transform: translate(-50%,-50%)}
.cm-date, .cm-time{color: #fff; text-shadow:1px 2px 12px rgba(0,132,255,0.26);}
@ -52,7 +53,7 @@ body{background: url("../images/body-bg.png") no-repeat center; background-size:
.right-box h3{font-size: .2rem}
.right-box .cm-charts-container span{font-size: .4rem}
.map-container{width:100%;height:100%;}
.map-select{position: absolute;top:.1rem;right:.1rem;background: #fff;width:2.5rem;height:.4rem;cursor: pointer}
.map-select{position: absolute;top:.1rem;right:.1rem;background: #fff;width:2.5rem;height:.4rem;cursor: pointer;outline: none;border:none}
.result{padding: 0 .4rem 0 .1rem;font-size: .18rem;color: #000;line-height: .4rem;position: relative;}
.slide-icon{position:absolute;top:0;right:0;width:.4rem;height:.4rem;transition: all .5s}
.slide-icon.rotate{transform: rotate(180deg)}

View File

@ -54,7 +54,7 @@
<div class="container" style="padding-left: 15px;padding-right: 15px;padding-top: 15px;height: 655px;">
<div class="top">
<div class="logo-box">
<img :src="url + '/route/file/downloadfile/false/' + partyOrganizeData.logo" alt="" class="logo">
<img :src="partyOrganizeData.logo" alt="" class="logo">
</div>
<div class="layui-col-md6" style="width: 739px;">
<div class="layui-card-body">
@ -250,8 +250,7 @@ layui.config({
rows: 2,
totalPage: 1
},
meeting: [],
url: 'http://219.147.99.164:8082/partybuilding'
meeting: []
},
methods: {
paging: function (page) {

View File

@ -52,7 +52,7 @@
</div>
<div class="map-box">
<div id="map" class="map-container"></div>
<div class="map-select">
<div class="map-select" tabindex="0">
<div class="result" id="selId" v-cloak>
{{selectUl}}
<div class="slide-icon">
@ -121,8 +121,7 @@
markerList: [],
belongLevel: 2,
meeting: [],
meetingCharts: [],
url: 'http://192.168.0.111:8085/partybuilding',
meetingCharts: []
},
methods: {
// 请求支部数,党员数接口
@ -130,6 +129,7 @@
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) {
self.pointArr = data.data.partyOrganizeDTOList;
self.count.zbCount = data.data.zbCount;
@ -202,7 +202,8 @@
function addMapOverlay(){
for(var i = 0, item = self.pointArr[i]; item = self.pointArr[i++];) {
var point = new BMap.Point(item.longitude, item.latitude);
var imgSrc = self.url + '/route/file/downloadfile/false/' + item.logo;
// var imgSrc = self.url + '/route/file/downloadfile/false/' + item.logo;
var imgSrc = item.logo;
var el = createMark(point, imgSrc, item.partyOrganizeId);
}
}
@ -329,7 +330,6 @@
var self = this;
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/partyorganize/meetingcount?partyOrganizeId=' + partyOrganizeId, []), {}, null, function(code, data) {
console.log(data)
self.meeting = data.data.meeting;
}, function(code, data) {
top.dialog.msg(data.msg);
@ -349,7 +349,6 @@
}else {
url = 'api/partyorganize/meetingcharts';
}
console.log(url)
top.restAjax.get(top.restAjax.path(url, []), {}, null, function(code, data) {
console.log(data)
self.meetingCharts = data.data.meetingCharts;
@ -378,6 +377,8 @@
color:'#fff'
}
},
//设置饼状图每个颜色块的颜色
color : [ 'red', 'orange'],
series: [
{
name: '男女比例',
@ -483,14 +484,18 @@
$('.cm-main').css({'height': windowHeight * 0.9 + 'px'})
//创建和初始化地图函数
this.initPartyOrganizeData(2)
this.initPartyOrganizeData(1)
this.getMeetingCount('')
// this.getMeetingCharts('')
this.getMeetingCharts('')
$('.map-select').click(function () {
$('.slide-icon').toggleClass('rotate')
$('.map-select ul').slideToggle()
})
$('.map-select').blur(function () {
$('.slide-icon').removeClass('rotate')
$('.map-select ul').slideUp()
})
}
})
});