Merge branch 'bd-dev' of gitee.com:cabbage_qd/web-base-admin into bd-online

This commit is contained in:
woody 2025-05-13 14:35:12 +08:00
commit eef8baf748
4 changed files with 45 additions and 36 deletions

View File

@ -47,7 +47,7 @@ export const constantRoutes = [
{
path: '/',
component: Layout,
redirect: '/dashboard',
redirect: '/summaryDashboard',
name: 'index',
// alwaysShow: true,
meta: { title: '首页', icon: 'firstPage', icon1: 'firstPageSel' },

View File

@ -1,5 +1,5 @@
<template>
<div class="summary-dashboard">
<div v-show="visible" class="summary-dashboard">
<topBar
v-if="topList.length > 0 && userInfo.userType != 9"
:top-list="topList"
@ -34,22 +34,22 @@
<div class="dashboard-card-group dashboard-card-group--today">
<div class="dashboard-card-title dashboard-card-title--today">今日业绩</div>
<div class="dashboard-card-list dashboard-card-list--performance">
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
<div class="dashboard-card-label">首购业绩</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
<div class="dashboard-card-label">首购金额</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAchieve || '0.00' }}</div>
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
<div class="dashboard-card-label">复购金额</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
<div class="dashboard-card-label">复购业绩</div>
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAchieve || '0.00' }}</div>
</div>
<div class="dashboard-total-row">
<div class="dashboard-card dashboard-card--performance dashboard-card--today dashboard-card--total-amount">
<div class="dashboard-card-label">总金额</div>
@ -65,22 +65,22 @@
<div class="dashboard-card-group dashboard-card-group--yesterday">
<div class="dashboard-card-title dashboard-card-title--yesterday">昨日业绩</div>
<div class="dashboard-card-list dashboard-card-list--performance">
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
<div class="dashboard-card-label">首购业绩</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
<div class="dashboard-card-label">首购金额</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAchieve || '0.00' }}</div>
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
<div class="dashboard-card-label">复购金额</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
<div class="dashboard-card-label">复购业绩</div>
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAchieve || '0.00' }}</div>
</div>
<div class="dashboard-total-row">
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday dashboard-card--total-amount">
<div class="dashboard-card-label">总金额</div>
@ -96,22 +96,22 @@
<div class="dashboard-card-group dashboard-card-group--month">
<div class="dashboard-card-title dashboard-card-title--month">本月业绩</div>
<div class="dashboard-card-list dashboard-card-list--performance">
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
<div class="dashboard-card-label">首购业绩</div>
<div class="dashboard-card-value">{{ monthlyPerformance.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
<div class="dashboard-card-label">首购金额</div>
<div class="dashboard-card-value">{{ monthlyPerformance.firstAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value">{{ monthlyPerformance.repAchieve || '0.00' }}</div>
<div class="dashboard-card-label">购业绩</div>
<div class="dashboard-card-value">{{ monthlyPerformance.firstAchieve || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
<div class="dashboard-card-label">复购金额</div>
<div class="dashboard-card-value">{{ monthlyPerformance.repAmount || '0.00' }}</div>
</div>
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
<div class="dashboard-card-label">复购业绩</div>
<div class="dashboard-card-value">{{ monthlyPerformance.repAchieve || '0.00' }}</div>
</div>
<div class="dashboard-total-row">
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-amount">
<div class="dashboard-card-label">总金额</div>
@ -144,15 +144,19 @@ export default {
dailyPerformance: {},
monthlyPerformance: {},
defaultTabItem: 'summaryDashboard',
userInfo: {}
userInfo: {},
visible: false
}
},
mounted() {
this.getMemberSummary()
this.getDailyPerformance()
this.getMonthlyPerformance()
this.getApprovalStatus()
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
this.getRoles().then(() => {
this.visible = true
this.getMemberSummary()
this.getDailyPerformance()
this.getMonthlyPerformance()
this.getApprovalStatus()
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
})
},
methods: {
getMemberSummary() {

View File

@ -52,16 +52,21 @@ export default {
})
},
getRoles() {
getRouters().then((res) => {
this.roleMenu = res.data || []
if (!this.roleMenu.find((item) => item.routeName === 'summaryDashboard')) {
this.topList.splice(0, 1)
if (this.$route.name === 'summaryDashboard') {
this.$router.replace({
name: 'Dashboard'
})
return new Promise((resolve, reject) => {
getRouters().then((res) => {
this.roleMenu = res.data || []
if (!this.roleMenu.find((item) => item.routeName === 'summaryDashboard')) {
this.topList.splice(0, 1)
if (this.$route.name === 'SummaryDashboard') {
this.$router.replace({
name: 'Dashboard'
})
}
reject()
return
}
}
resolve()
})
})
}
}

View File

@ -543,7 +543,7 @@ export default {
} else {
this.menuAllList[index].changed = false
this.menuAllList[index].checkArr = []
this.menuAllList[index].children.forEach((item) => {
this.menuAllList[index].children && this.menuAllList[index].children.forEach((item) => {
item.changed = false
item.checkArr = []
if (item.children) {