Commit 0ada2b45 authored by “yiyousong”'s avatar “yiyousong”
parents 0daa4acb f251984b
...@@ -80,23 +80,30 @@ export default { ...@@ -80,23 +80,30 @@ export default {
this.queryform.dateTimeStart = this.time ? this.time[0] : null; this.queryform.dateTimeStart = this.time ? this.time[0] : null;
this.queryform.dateTimeStart = this.time ? this.time[1] : null; this.queryform.dateTimeStart = this.time ? this.time[1] : null;
getWayAccessAnalyse(this.queryform).then((res) => { getWayAccessAnalyse(this.queryform).then((res) => {
let data = res.data.data.map((item, i) => let newobj = {};
item.code != "/sceneSignIn" let data = res.data.data.reduce((preVal, curVal) => {
? { newobj[curVal.name]
name: item.name, ? ""
} : (newobj[curVal.name] = preVal.push(curVal));
: "" return preVal;
); }, []);
// let data = res.data.data.map((item, i) =>
// item.code != "/sceneSignIn"
// ? {
// name: item.name,
// }
// : ""
// );
let links = res.data.links.map((item) => ({ let links = res.data.links.map((item) => ({
source: item.sourceName, source: item.sourceName,
target: item.targetName, target: item.targetName,
value: item.value, value: item.value,
lineStyle: { lineStyle: {
color: "source", color: "source",
}, },
})); }));
data = data.filter((v) => v); data = data.filter((v) => v);
links = links.filter((v) => v.target != "首页"); links = links.filter((v) => v.target != "首页" && v.target != v.source);
this.init(data, links); this.init(data, links);
}); });
}, },
......
...@@ -217,12 +217,14 @@ export default { ...@@ -217,12 +217,14 @@ export default {
display: flex; display: flex;
.img-dv { .img-dv {
width: 60%; flex: 1;
margin: 100px; margin: 100px;
height: 600px;
position: relative; position: relative;
img { img {
width: 100%; width: 100%;
height: 100%;
} }
#queuing { #queuing {
...@@ -236,7 +238,7 @@ export default { ...@@ -236,7 +238,7 @@ export default {
} }
.list-dv { .list-dv {
width: 40%; width: 55%;
min-height: 100%; min-height: 100%;
border-left: solid 1px #efefef; border-left: solid 1px #efefef;
box-sizing: border-box; box-sizing: border-box;
......
package com.mortals.xhx.module.page.service.impl; package com.mortals.xhx.module.page.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.util.DateUtils;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.page.dao.PageAccessDao; import com.mortals.xhx.module.page.dao.PageAccessDao;
import com.mortals.xhx.module.page.model.PageAccessEntity; import com.mortals.xhx.module.page.model.PageAccessEntity;
import com.mortals.xhx.module.page.model.pdu.BuryPointPdu;
import com.mortals.xhx.module.page.model.pdu.PageCensusPdu;
import com.mortals.xhx.module.page.service.PageAccessService; import com.mortals.xhx.module.page.service.PageAccessService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
...@@ -122,7 +121,7 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao ...@@ -122,7 +121,7 @@ public class PageAccessServiceImpl extends AbstractCRUDServiceImpl<PageAccessDao
if(CollectionUtils.isNotEmpty(todayList)){ if(CollectionUtils.isNotEmpty(todayList)){
for (PageAccessEntity item:todayList){ for (PageAccessEntity item:todayList){
if(item!=null) { if(item!=null) {
DecimalFormat decimalFormat=new DecimalFormat(".00"); DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String key = item.getTimeStr() + "_" + item.getFirstCode() + "_" + item.getSecondCode() + "_" + item.getThirdCode() + "_" + item.getFourthCode(); String key = item.getTimeStr() + "_" + item.getFirstCode() + "_" + item.getSecondCode() + "_" + item.getThirdCode() + "_" + item.getFourthCode();
if (mp.containsKey(key)) { if (mp.containsKey(key)) {
PageAccessEntity last = mp.get(key); PageAccessEntity last = mp.get(key);
......
...@@ -127,7 +127,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -127,7 +127,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)vo.getValue(); float a = (float)vo.getValue();
float b = (float)clickSum; float b = (float)clickSum;
float p = a/b; float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00%"); DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
vo.setProportion(s); vo.setProportion(s);
} }
...@@ -173,7 +173,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -173,7 +173,7 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum; float a = (float)clickSum;
float b = (float)trendCensusVos.size(); float b = (float)trendCensusVos.size();
float p = a/b; float p = a/b;
DecimalFormat decimalFormat=new DecimalFormat(".00"); DecimalFormat decimalFormat=new DecimalFormat("#0.00");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
dayAccessAvg = Float.valueOf(s); dayAccessAvg = Float.valueOf(s);
} }
...@@ -232,8 +232,8 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao, ...@@ -232,8 +232,8 @@ public class PageEventServiceImpl extends AbstractCRUDServiceImpl<PageEventDao,
float a = (float)clickSum; float a = (float)clickSum;
float b = (float)item.getAccessCount(); float b = (float)item.getAccessCount();
float p = b/a; float p = b/a;
DecimalFormat decimalFormat=new DecimalFormat(".00%"); DecimalFormat decimalFormat=new DecimalFormat("#0.00%");
DecimalFormat df=new DecimalFormat(".00"); DecimalFormat df=new DecimalFormat("#0.00");
String s = decimalFormat.format(p); String s = decimalFormat.format(p);
String s1 = df.format(p); String s1 = df.format(p);
item.setProportion(s); item.setProportion(s);
......
...@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao, ...@@ -75,7 +75,15 @@ public class PageRouteServiceImpl extends AbstractCRUDServiceImpl<PageRouteDao,
} }
Map<String,Object> result = new HashMap<>(); Map<String,Object> result = new HashMap<>();
List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu); List<PageWayCensusVo> pageWayCensusVos = dao.getPageWayCensus(pdu);
result.put("links",pageWayCensusVos); List<PageWayCensusVo> list = new ArrayList<>();
Map<String,String> source = new HashMap<>();
for(PageWayCensusVo item:pageWayCensusVos){
source.put(item.getSource(),item.getSourceName());
if(!source.containsKey(item.getTarget())){
list.add(item);
}
}
result.put("links",list);
List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu); List<Map<String, Object>> pageCodes = dao.getPageWayCode(pdu);
result.put("data",pageCodes); result.put("data",pageCodes);
return result; return result;
......
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