Browse Source

修复刷新浏览器导航栏高亮问题

tags/v1.22.5.1^2
wangjr 3 years ago
parent
commit
994464b128
5 changed files with 19 additions and 20 deletions
  1. +12
    -13
      web_src/js/components/DataAnalysis.vue
  2. +1
    -1
      web_src/js/components/ProAnalysis.vue
  3. +3
    -3
      web_src/js/components/ProTrend.vue
  4. +2
    -2
      web_src/js/components/UserTrend.vue
  5. +1
    -1
      web_src/js/router/index.js

+ 12
- 13
web_src/js/components/DataAnalysis.vue View File

@@ -2,30 +2,30 @@
<el-row style="height:100%;width: 100%; flex:1" >
<el-col :span="3" style="height:100%;padding-right:15px;">
<el-menu
default-active="this.$route.path"
:default-active="this.$router.path"
class="el-menu-vertical-demo"
: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>
<span slot="title">概览</span>
</el-menu-item>
<el-submenu index="1">
<el-submenu index="/">
<template slot="title">
<i class="ri-numbers-line"></i>
<span>项目分析</span>
</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 index="2">
<template slot="title">
<i class="ri-contacts-line"></i>
<span>用户分析</span>
</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-menu-item index="BrainAnalysis">
<el-menu-item index="/BrainAnalysis">
<i class="ri-server-fill"></i>
<span slot="title">云脑分析(建设中..)</span>
</el-menu-item>
@@ -45,11 +45,10 @@
},
created(){
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'
}
},
}


+ 1
- 1
web_src/js/components/ProAnalysis.vue View File

@@ -1091,7 +1091,7 @@
// this.echartsSelectData.resize()
var checkboxs=document.getElementsByName('checkboxchart');
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){
this.option.legend.selected[this.option.legend.data[i]]=true;
}else{


+ 3
- 3
web_src/js/components/ProTrend.vue View File

@@ -500,8 +500,8 @@
ydata_add_mirror.push(this.tableData[this.tableData.length-1-i].numRepoMirrorAdd)
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 = {
title : {
text: '',
@@ -680,7 +680,7 @@
// this.echartsSelectData.resize()
var checkboxs=document.getElementsByName('checkboxchart');
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){
this.option.legend.selected[this.option.legend.data[i]]=true;
}else{


+ 2
- 2
web_src/js/components/UserTrend.vue View File

@@ -699,7 +699,7 @@
// $(".checkboxchart").click(function(){
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){
this.option.legend.selected[this.option.legend.data[i]]=true;
}else{
@@ -747,7 +747,7 @@
obj[selectArr[i]] = false;
}
}
console.log("obj:",obj)
// console.log("obj:",obj)
this.option.legend.selected = obj;
this.echartsSelectData.setOption(this.option);
// });


+ 1
- 1
web_src/js/router/index.js View File

@@ -21,7 +21,7 @@ export default new Router({
scrollBehavior: () => ({ y: 0 }),
routes:[
{
path:'/',
path:'/',redirect:'/ProAnalysis',
name:'ProAnalysis',
component:ProAnalysis,
},


Loading…
Cancel
Save