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

性别问题

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