提交 c6403393 编写于 作者: zhentian.jia's avatar zhentian.jia

性别问题

上级 670642ad
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); // commonUtil.resizeHeight();
//父组件传值 //父组件传值
this.$on("search", () => { this.$on("search", () => {
this.search(); this.search();
...@@ -136,27 +136,36 @@ export default { ...@@ -136,27 +136,36 @@ export default {
//用户性别分布 //用户性别分布
getSexData() { getSexData() {
let sexList = this.crowdData.sexList; let sexList = this.crowdData.sexList;
if(sexList.length <3) { // if(sexList.length <3) {
this.sexData = []; // this.sexData = [];
return; // return;
} // }
this.sexData = [ this.sexData = [
{ {
src: require("../../assets/image/man.png"), src: require("../../assets/image/man.png"),
type: "男性", type: "男性",
num: sexList[2].value num: 0
}, },
{ {
src: require("../../assets/image/weman.png"), src: require("../../assets/image/weman.png"),
type: "女性", type: "女性",
num: sexList[0].value num: 0
}, },
{ {
src: require("../../assets/image/question.png"), src: require("../../assets/image/question.png"),
type: "未完善信息", type: "未完善信息",
num: sexList[1].value num: 0
} }
]; ];
for(let i=0;i<sexList.length;i++) {
if(sexList[i].name == "男") {
this.sexData[0].num = sexList[i].value;
} else if(sexList[i].name == "女") {
this.sexData[1].num = sexList[i].value;
} else {
this.sexData[2].num = sexList[i].value;
}
}
}, },
educationDivision(data) { educationDivision(data) {
let myChart = echarts.init(this.$refs.education); let myChart = echarts.init(this.$refs.education);
...@@ -256,7 +265,7 @@ export default { ...@@ -256,7 +265,7 @@ export default {
position: relative; position: relative;
margin: 20px auto 0 auto; margin: 20px auto 0 auto;
width: 100%; width: 100%;
overflow: auto; // overflow: auto;
.item { .item {
position: relative; position: relative;
float: left; float: left;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册