Commit fde6ce84 authored by zhangyanni's avatar zhangyanni

左侧换成动态的数据统计

parent 20aabb09
......@@ -27,8 +27,8 @@
<el-menu-item :index="item.functionUrl" v-for="(item,busInd) in businessList" v-if="!item.systemFunctionlist">
<i class="iconfont" :class="'icon-'+item.functionIcon"></i>
<span>{{item.functionName}}</span>
<span class="nav-count" v-if="busInd==0">12</span>
<span class="nav-count" v-if="busInd==1">1212</span>
<span class="nav-count" v-if="busInd==0">{{countData.projectCount}}</span>
<span class="nav-count" v-if="busInd==1">{{countData.businessCount}}</span>
</el-menu-item>
<el-submenu :index="item.functionUrl" v-for="(item,busInd) in businessList"
......@@ -72,7 +72,13 @@
businessList: [],
currentMenuIndex: [1],
currentIndex:'1',
isPosition:true
isPosition:true,
countData:{
projectCount: 0,
requirementCount: 0,
businessCount: 0,
matchedCount: 0
},
});
},
methods: {
......@@ -110,10 +116,25 @@
handleToGW(){
window.open("http://techcode.com");
}
},
//获取统计数据
getCountData(){
let that = this;
api.getCountAxios().then((res)=>{
if(res.code==0){
that.countData = res.result;
}else{
that.$message.error(res.msg);
}
}).catch((err)=>{
that.$message.error(err)
})
},
},
mounted() {
this.getInitData();
this.getCountData();
},
};
</script>
......
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