| @@ -2,30 +2,30 @@ | |||||
| <el-row style="height:100%;width: 100%; flex:1" > | <el-row style="height:100%;width: 100%; flex:1" > | ||||
| <el-col :span="3" style="height:100%;padding-right:15px;"> | <el-col :span="3" style="height:100%;padding-right:15px;"> | ||||
| <el-menu | <el-menu | ||||
| default-active="this.$route.path" | |||||
| :default-active="this.$router.path" | |||||
| class="el-menu-vertical-demo" | class="el-menu-vertical-demo" | ||||
| :router="true" style="height:100%; background-color: #F5F5F6;" > | :router="true" style="height:100%; background-color: #F5F5F6;" > | ||||
| <el-menu-item index="Overview" > | |||||
| <el-menu-item index="/Overview" > | |||||
| <i class="ri-home-4-line"></i> | <i class="ri-home-4-line"></i> | ||||
| <span slot="title">概览</span> | <span slot="title">概览</span> | ||||
| </el-menu-item> | </el-menu-item> | ||||
| <el-submenu index="1"> | |||||
| <el-submenu index="/"> | |||||
| <template slot="title"> | <template slot="title"> | ||||
| <i class="ri-numbers-line"></i> | <i class="ri-numbers-line"></i> | ||||
| <span>项目分析</span> | <span>项目分析</span> | ||||
| </template> | </template> | ||||
| <el-menu-item index="ProTrend">增长趋势分析</el-menu-item> | |||||
| <el-menu-item index="ProAnalysis">详细数据</el-menu-item> | |||||
| <el-menu-item index="/ProTrend">增长趋势分析</el-menu-item> | |||||
| <el-menu-item index="/ProAnalysis">详细数据</el-menu-item> | |||||
| </el-submenu> | </el-submenu> | ||||
| <el-submenu index="2"> | <el-submenu index="2"> | ||||
| <template slot="title"> | <template slot="title"> | ||||
| <i class="ri-contacts-line"></i> | <i class="ri-contacts-line"></i> | ||||
| <span>用户分析</span> | <span>用户分析</span> | ||||
| </template> | </template> | ||||
| <el-menu-item index="UserTrend">增长趋势分析</el-menu-item> | |||||
| <el-menu-item index="UserAnalysis">活动分析</el-menu-item> | |||||
| <el-menu-item index="/UserTrend">增长趋势分析</el-menu-item> | |||||
| <el-menu-item index="/UserAnalysis">活动分析</el-menu-item> | |||||
| </el-submenu> | </el-submenu> | ||||
| <el-menu-item index="BrainAnalysis"> | |||||
| <el-menu-item index="/BrainAnalysis"> | |||||
| <i class="ri-server-fill"></i> | <i class="ri-server-fill"></i> | ||||
| <span slot="title">云脑分析(建设中..)</span> | <span slot="title">云脑分析(建设中..)</span> | ||||
| </el-menu-item> | </el-menu-item> | ||||
| @@ -45,11 +45,10 @@ | |||||
| }, | }, | ||||
| created(){ | created(){ | ||||
| var url_params = document.getElementById("url_params").value; | var url_params = document.getElementById("url_params").value; | ||||
| // console.log('url_params:',url_params); | |||||
| // console.log('this.$router.path:',this.$router.path); | |||||
| if (url_params!='' && url_params!=undefined){ | |||||
| this.$router.push(url_params) | |||||
| // console.log('this.$router.pathbefore:',this.$router.path); | |||||
| if (url_params!='' && url_params!=undefined && url_params!='/'){ | |||||
| this.$router.path = '/'+url_params.split('/')[0] | |||||
| }else{ | |||||
| this.$router.path = '/ProAnalysis' | |||||
| } | } | ||||
| }, | }, | ||||
| } | } | ||||
| @@ -1091,7 +1091,7 @@ | |||||
| // this.echartsSelectData.resize() | // this.echartsSelectData.resize() | ||||
| var checkboxs=document.getElementsByName('checkboxchart'); | var checkboxs=document.getElementsByName('checkboxchart'); | ||||
| for(var i=0; i<checkboxs.length; i++){ | for(var i=0; i<checkboxs.length; i++){ | ||||
| console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| // console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| if(checkboxs[i].checked){ | if(checkboxs[i].checked){ | ||||
| this.option.legend.selected[this.option.legend.data[i]]=true; | this.option.legend.selected[this.option.legend.data[i]]=true; | ||||
| }else{ | }else{ | ||||
| @@ -500,8 +500,8 @@ | |||||
| ydata_add_mirror.push(this.tableData[this.tableData.length-1-i].numRepoMirrorAdd) | ydata_add_mirror.push(this.tableData[this.tableData.length-1-i].numRepoMirrorAdd) | ||||
| ydata_cumulative_pro.push(this.tableData[this.tableData.length-1-i].numRepos) | ydata_cumulative_pro.push(this.tableData[this.tableData.length-1-i].numRepos) | ||||
| } | } | ||||
| console.log("ydata_openI:"+ydata_add_pro) | |||||
| console.log(xdata) | |||||
| // console.log("ydata_openI:"+ydata_add_pro) | |||||
| // console.log(xdata) | |||||
| this.option = { | this.option = { | ||||
| title : { | title : { | ||||
| text: '', | text: '', | ||||
| @@ -680,7 +680,7 @@ | |||||
| // this.echartsSelectData.resize() | // this.echartsSelectData.resize() | ||||
| var checkboxs=document.getElementsByName('checkboxchart'); | var checkboxs=document.getElementsByName('checkboxchart'); | ||||
| for(var i=0; i<checkboxs.length; i++){ | for(var i=0; i<checkboxs.length; i++){ | ||||
| console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| // console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| if(checkboxs[i].checked){ | if(checkboxs[i].checked){ | ||||
| this.option.legend.selected[this.option.legend.data[i]]=true; | this.option.legend.selected[this.option.legend.data[i]]=true; | ||||
| }else{ | }else{ | ||||
| @@ -699,7 +699,7 @@ | |||||
| // $(".checkboxchart").click(function(){ | // $(".checkboxchart").click(function(){ | ||||
| for(var i=0; i<checkboxs.length; i++){ | for(var i=0; i<checkboxs.length; i++){ | ||||
| console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| // console.log("selectArr[i]:",this.option.legend.data[i]) | |||||
| if(checkboxs[i].checked){ | if(checkboxs[i].checked){ | ||||
| this.option.legend.selected[this.option.legend.data[i]]=true; | this.option.legend.selected[this.option.legend.data[i]]=true; | ||||
| }else{ | }else{ | ||||
| @@ -747,7 +747,7 @@ | |||||
| obj[selectArr[i]] = false; | obj[selectArr[i]] = false; | ||||
| } | } | ||||
| } | } | ||||
| console.log("obj:",obj) | |||||
| // console.log("obj:",obj) | |||||
| this.option.legend.selected = obj; | this.option.legend.selected = obj; | ||||
| this.echartsSelectData.setOption(this.option); | this.echartsSelectData.setOption(this.option); | ||||
| // }); | // }); | ||||
| @@ -21,7 +21,7 @@ export default new Router({ | |||||
| scrollBehavior: () => ({ y: 0 }), | scrollBehavior: () => ({ y: 0 }), | ||||
| routes:[ | routes:[ | ||||
| { | { | ||||
| path:'/', | |||||
| path:'/',redirect:'/ProAnalysis', | |||||
| name:'ProAnalysis', | name:'ProAnalysis', | ||||
| component:ProAnalysis, | component:ProAnalysis, | ||||
| }, | }, | ||||