Merge branch 'bd-dev' of gitee.com:cabbage_qd/web-base-admin into bd-online
This commit is contained in:
commit
eef8baf748
|
@ -47,7 +47,7 @@ export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/dashboard',
|
redirect: '/summaryDashboard',
|
||||||
name: 'index',
|
name: 'index',
|
||||||
// alwaysShow: true,
|
// alwaysShow: true,
|
||||||
meta: { title: '首页', icon: 'firstPage', icon1: 'firstPageSel' },
|
meta: { title: '首页', icon: 'firstPage', icon1: 'firstPageSel' },
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="summary-dashboard">
|
<div v-show="visible" class="summary-dashboard">
|
||||||
<topBar
|
<topBar
|
||||||
v-if="topList.length > 0 && userInfo.userType != 9"
|
v-if="topList.length > 0 && userInfo.userType != 9"
|
||||||
:top-list="topList"
|
:top-list="topList"
|
||||||
|
@ -34,22 +34,22 @@
|
||||||
<div class="dashboard-card-group dashboard-card-group--today">
|
<div class="dashboard-card-group dashboard-card-group--today">
|
||||||
<div class="dashboard-card-title dashboard-card-title--today">今日业绩</div>
|
<div class="dashboard-card-title dashboard-card-title--today">今日业绩</div>
|
||||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
<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 dashboard-card--performance dashboard-card--today">
|
||||||
<div class="dashboard-card-label">首购金额</div>
|
<div class="dashboard-card-label">首购金额</div>
|
||||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAmount || '0.00' }}</div>
|
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAmount || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||||
<div class="dashboard-card-label">复购业绩</div>
|
<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-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.firstAchieve || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--today">
|
||||||
<div class="dashboard-card-label">复购金额</div>
|
<div class="dashboard-card-label">复购金额</div>
|
||||||
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAmount || '0.00' }}</div>
|
<div class="dashboard-card-value dashboard-card-value--today">{{ dailyPerformance.today && dailyPerformance.today.repAmount || '0.00' }}</div>
|
||||||
</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-total-row">
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--today dashboard-card--total-amount">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--today dashboard-card--total-amount">
|
||||||
<div class="dashboard-card-label">总金额</div>
|
<div class="dashboard-card-label">总金额</div>
|
||||||
|
@ -65,22 +65,22 @@
|
||||||
<div class="dashboard-card-group dashboard-card-group--yesterday">
|
<div class="dashboard-card-group dashboard-card-group--yesterday">
|
||||||
<div class="dashboard-card-title dashboard-card-title--yesterday">昨日业绩</div>
|
<div class="dashboard-card-title dashboard-card-title--yesterday">昨日业绩</div>
|
||||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
<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 dashboard-card--performance dashboard-card--yesterday">
|
||||||
<div class="dashboard-card-label">首购金额</div>
|
<div class="dashboard-card-label">首购金额</div>
|
||||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAmount || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||||
<div class="dashboard-card-label">复购业绩</div>
|
<div class="dashboard-card-label">首购业绩</div>
|
||||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAchieve || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.firstAchieve || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday">
|
||||||
<div class="dashboard-card-label">复购金额</div>
|
<div class="dashboard-card-label">复购金额</div>
|
||||||
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ dailyPerformance.yesterday && dailyPerformance.yesterday.repAmount || '0.00' }}</div>
|
||||||
</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-total-row">
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday dashboard-card--total-amount">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--yesterday dashboard-card--total-amount">
|
||||||
<div class="dashboard-card-label">总金额</div>
|
<div class="dashboard-card-label">总金额</div>
|
||||||
|
@ -96,22 +96,22 @@
|
||||||
<div class="dashboard-card-group dashboard-card-group--month">
|
<div class="dashboard-card-group dashboard-card-group--month">
|
||||||
<div class="dashboard-card-title dashboard-card-title--month">本月业绩</div>
|
<div class="dashboard-card-title dashboard-card-title--month">本月业绩</div>
|
||||||
<div class="dashboard-card-list dashboard-card-list--performance">
|
<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 dashboard-card--performance dashboard-card--month">
|
||||||
<div class="dashboard-card-label">首购金额</div>
|
<div class="dashboard-card-label">首购金额</div>
|
||||||
<div class="dashboard-card-value">{{ monthlyPerformance.firstAmount || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ monthlyPerformance.firstAmount || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||||
<div class="dashboard-card-label">复购业绩</div>
|
<div class="dashboard-card-label">首购业绩</div>
|
||||||
<div class="dashboard-card-value">{{ monthlyPerformance.repAchieve || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ monthlyPerformance.firstAchieve || '0.00' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--month">
|
||||||
<div class="dashboard-card-label">复购金额</div>
|
<div class="dashboard-card-label">复购金额</div>
|
||||||
<div class="dashboard-card-value">{{ monthlyPerformance.repAmount || '0.00' }}</div>
|
<div class="dashboard-card-value">{{ monthlyPerformance.repAmount || '0.00' }}</div>
|
||||||
</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-total-row">
|
||||||
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-amount">
|
<div class="dashboard-card dashboard-card--performance dashboard-card--month dashboard-card--total-amount">
|
||||||
<div class="dashboard-card-label">总金额</div>
|
<div class="dashboard-card-label">总金额</div>
|
||||||
|
@ -144,15 +144,19 @@ export default {
|
||||||
dailyPerformance: {},
|
dailyPerformance: {},
|
||||||
monthlyPerformance: {},
|
monthlyPerformance: {},
|
||||||
defaultTabItem: 'summaryDashboard',
|
defaultTabItem: 'summaryDashboard',
|
||||||
userInfo: {}
|
userInfo: {},
|
||||||
|
visible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMemberSummary()
|
this.getRoles().then(() => {
|
||||||
this.getDailyPerformance()
|
this.visible = true
|
||||||
this.getMonthlyPerformance()
|
this.getMemberSummary()
|
||||||
this.getApprovalStatus()
|
this.getDailyPerformance()
|
||||||
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
this.getMonthlyPerformance()
|
||||||
|
this.getApprovalStatus()
|
||||||
|
this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
||||||
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getMemberSummary() {
|
getMemberSummary() {
|
||||||
|
|
|
@ -52,16 +52,21 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getRoles() {
|
getRoles() {
|
||||||
getRouters().then((res) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.roleMenu = res.data || []
|
getRouters().then((res) => {
|
||||||
if (!this.roleMenu.find((item) => item.routeName === 'summaryDashboard')) {
|
this.roleMenu = res.data || []
|
||||||
this.topList.splice(0, 1)
|
if (!this.roleMenu.find((item) => item.routeName === 'summaryDashboard')) {
|
||||||
if (this.$route.name === 'summaryDashboard') {
|
this.topList.splice(0, 1)
|
||||||
this.$router.replace({
|
if (this.$route.name === 'SummaryDashboard') {
|
||||||
name: 'Dashboard'
|
this.$router.replace({
|
||||||
})
|
name: 'Dashboard'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
reject()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
resolve()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -543,7 +543,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.menuAllList[index].changed = false
|
this.menuAllList[index].changed = false
|
||||||
this.menuAllList[index].checkArr = []
|
this.menuAllList[index].checkArr = []
|
||||||
this.menuAllList[index].children.forEach((item) => {
|
this.menuAllList[index].children && this.menuAllList[index].children.forEach((item) => {
|
||||||
item.changed = false
|
item.changed = false
|
||||||
item.checkArr = []
|
item.checkArr = []
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
|
|
Loading…
Reference in New Issue