sidemenu service demand count.
This commit is contained in:
@ -7,9 +7,6 @@
|
||||
:value="getCount(basePath)"
|
||||
class="count-badge"
|
||||
>
|
||||
<!-- <template #default>
|
||||
<div>231</div>
|
||||
</template> -->
|
||||
<div>
|
||||
<template
|
||||
v-if="
|
||||
@ -23,6 +20,9 @@
|
||||
:to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
|
||||
>
|
||||
<el-menu-item
|
||||
:style="{
|
||||
paddingRight: '0px',
|
||||
}"
|
||||
:index="resolvePath(onlyOneChild.path)"
|
||||
:class="{ 'submenu-title-noDropdown': !isNest }"
|
||||
>
|
||||
@ -35,7 +35,11 @@
|
||||
><span
|
||||
class="menu-title"
|
||||
:title="hasTitle(onlyOneChild.meta.title)"
|
||||
>{{ onlyOneChild.meta.title }}</span
|
||||
>{{
|
||||
["/auditing/serviceDemand"].includes(basePath)
|
||||
? `${onlyOneChild.meta.title} (${getCount(basePath)})`
|
||||
: onlyOneChild.meta.title
|
||||
}}</span
|
||||
></template
|
||||
>
|
||||
</el-menu-item>
|
||||
@ -95,11 +99,12 @@ const onlyOneChild = ref({});
|
||||
const userStore = useUserStore();
|
||||
|
||||
const getCount = (basePath) => {
|
||||
console.log(basePath);
|
||||
if (basePath == "/approval/list") {
|
||||
return userStore.unApprovedBusiness;
|
||||
} else if (props.basePath == "/approval/dataList/approval") {
|
||||
return userStore.unApprovedExpert;
|
||||
} else if (props.basePath == "/auditing/serviceDemand") {
|
||||
return userStore.serviceDemandTotal;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user