Compare commits

..

No commits in common. "b57d9c5b11c4402ef759d4b3f35e173aac13a465" and "720b26a902a047522c428a5a85bcc9a8f27b213a" have entirely different histories.

2 changed files with 5 additions and 66 deletions

View File

@ -9,7 +9,6 @@
<use :xlink:href="`#${menu.icon}`"></use>
</svg>
<span class="first-level-text">{{ menu.name }}</span>
<span class="tabNum" v-if="menu.total && menu.total !==0">{{menu.total}}</span>
</template>
<sub-menu
v-for="item in menu.children"
@ -33,7 +32,6 @@
<use :xlink:href="`#${menu.icon}`"></use>
</svg>
<span>{{ menu.name }}</span>
<span class="tabNum" v-if="menu.total && menu.total !==0 ">{{menu.total}}</span>
</a>
</el-menu-item>
</template>
@ -112,13 +110,6 @@ export default {
</script>
<style lang="scss">
.tabNum{
color: #ffffff;
margin-left: 5px;
background: red;
padding:1px 4px;
border-radius:5px;
}
.aui-sidebar__menu {
.first-level-text {
font-size: 16px;

View File

@ -18,81 +18,29 @@
:collapseTransition="false"
class="aui-sidebar__menu"
>
<div >
<sub-menu
v-for="menu in $store.state.sidebarMenuList"
v-for="menu in $store.state.sidebarMenuList"
:key="menu.id"
:menu="menu"
>
<span>sdddd</span>
</sub-menu>
</div>
/>
</el-menu>
</div>
</aside>
</template>
<script>
import http from '@/utils/request'
import SubMenu from "./main-sidebar-sub-menu";
export default {
data() {
return {
numObject:{}
};
return {};
},
components: {
SubMenu,
},
created() {
this.getNum()
//this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
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>
<style scoped lang="scss">
.aui-sidebar {