我得待办添加标签
This commit is contained in:
parent
fe17edeb39
commit
7f662ee870
|
@ -9,6 +9,7 @@
|
||||||
<use :xlink:href="`#${menu.icon}`"></use>
|
<use :xlink:href="`#${menu.icon}`"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span class="first-level-text">{{ menu.name }}</span>
|
<span class="first-level-text">{{ menu.name }}</span>
|
||||||
|
<span class="tabNum" v-if="menu.total && menu.total !==0">{{menu.total}}</span>
|
||||||
</template>
|
</template>
|
||||||
<sub-menu
|
<sub-menu
|
||||||
v-for="item in menu.children"
|
v-for="item in menu.children"
|
||||||
|
@ -32,6 +33,7 @@
|
||||||
<use :xlink:href="`#${menu.icon}`"></use>
|
<use :xlink:href="`#${menu.icon}`"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<span>{{ menu.name }}</span>
|
<span>{{ menu.name }}</span>
|
||||||
|
<span class="tabNum" v-if="menu.total && menu.total !==0 ">{{menu.total}}</span>
|
||||||
</a>
|
</a>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -110,6 +112,13 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
.tabNum{
|
||||||
|
color: #ffffff;
|
||||||
|
margin-left: 5px;
|
||||||
|
background: red;
|
||||||
|
padding:1px 4px;
|
||||||
|
border-radius:5px;
|
||||||
|
}
|
||||||
.aui-sidebar__menu {
|
.aui-sidebar__menu {
|
||||||
.first-level-text {
|
.first-level-text {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
|
@ -18,29 +18,81 @@
|
||||||
:collapseTransition="false"
|
:collapseTransition="false"
|
||||||
class="aui-sidebar__menu"
|
class="aui-sidebar__menu"
|
||||||
>
|
>
|
||||||
|
<div >
|
||||||
<sub-menu
|
<sub-menu
|
||||||
v-for="menu in $store.state.sidebarMenuList"
|
v-for="menu in $store.state.sidebarMenuList"
|
||||||
:key="menu.id"
|
:key="menu.id"
|
||||||
:menu="menu"
|
:menu="menu"
|
||||||
/>
|
>
|
||||||
|
<span>sdddd</span>
|
||||||
|
|
||||||
|
</sub-menu>
|
||||||
|
</div>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import http from '@/utils/request'
|
||||||
import SubMenu from "./main-sidebar-sub-menu";
|
import SubMenu from "./main-sidebar-sub-menu";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
numObject:{}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
SubMenu,
|
SubMenu,
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
|
this.getNum()
|
||||||
|
//this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
|
||||||
},
|
},
|
||||||
};
|
methods: {
|
||||||
|
getNum(){
|
||||||
|
http.get('/act/task/myToDoTaskNum').then(({ data: res }) => {
|
||||||
|
this.numObject=res.data
|
||||||
|
console.log("this.numObject========",this.numObject)
|
||||||
|
let menuList= window.SITE_CONFIG["menuList"];
|
||||||
|
for(var i=0;i<menuList.length;i++){
|
||||||
|
let menu=menuList[i];
|
||||||
|
// menu.total=0;
|
||||||
|
if(menu.id=='1541261628388888578'){//我的待办
|
||||||
|
let daibanNum=0
|
||||||
|
for(let j=0;j<menu.children.length;j++){
|
||||||
|
let children=menu.children[j]
|
||||||
|
if(children.id=="1541261780432408577"){//能力申请 v3
|
||||||
|
children.total=Number(this.numObject.abilityprocess_v3)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
} if(children.id=="1559376285703081986"){//会议室审核
|
||||||
|
children.total=Number(this.numObject.meetingroom_book)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}if(children.id=="1545292602084827138"){//能力资源上架
|
||||||
|
children.total=Number(this.numObject.resourcemountapply)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}if(children.id=="1545312045695377410"){//能力需求申请
|
||||||
|
children.total=Number(this.numObject.abilitydemandapply)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}if(children.id=="1545313018614521857"){//能力需求下架
|
||||||
|
children.total=Number(this.numObject.resourcundercarriageapply)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}if(children.id=="1545313754106699777"){//评论审核
|
||||||
|
children.total=Number(this.numObject.comment_review)
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}if(children.id=="1554294862931562498"){//会议室 暂无
|
||||||
|
children.total=0
|
||||||
|
daibanNum=Number(daibanNum)+Number(children.total)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
menu.total=daibanNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$store.state.sidebarMenuList=menuList
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.aui-sidebar {
|
.aui-sidebar {
|
||||||
|
|
Loading…
Reference in New Issue