|
|
|
import Vue from 'vue';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
|
|
export default new Vuex.Store({
|
|
|
|
state: {
|
|
|
|
showSidebar: false,
|
|
|
|
showFooter: false,
|
|
|
|
showHeader: false,
|
|
|
|
menuList: [], //目录菜单
|
|
|
|
showBreadcrumb: false, //是否展示面包屑
|
|
|
|
pageTitle: '一般新文献', //页面标题
|
|
|
|
addServiceList: [], //选中的服务
|
|
|
|
isLoading: false, //页面loading
|
|
|
|
rankMenuData: [{
|
|
|
|
index: '1',
|
|
|
|
title: '总利润',
|
|
|
|
icon: 'Totalprofit',
|
|
|
|
children: [{
|
|
|
|
index: '1-1',
|
|
|
|
title: '年排行',
|
|
|
|
path: '/super/ranking/yearProfit'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '1-2',
|
|
|
|
title: '月排行',
|
|
|
|
path: '/super/ranking/monthProfit'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2',
|
|
|
|
title: '产品',
|
|
|
|
icon: 'Totalprofit1',
|
|
|
|
children: [{
|
|
|
|
index: '2-1',
|
|
|
|
title: '毛利润排行',
|
|
|
|
path: '/super/ranking/checkProfit'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2-2',
|
|
|
|
title: '订单数排行',
|
|
|
|
path: '/super/ranking/checkOrdernum'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2-3',
|
|
|
|
title: '退单数排行',
|
|
|
|
path: '/super/ranking/checkRefund'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2-4',
|
|
|
|
title: '负毛利排行',
|
|
|
|
path: '/super/ranking/loss'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '3',
|
|
|
|
title: '代理商',
|
|
|
|
icon: 'Totalprofit2',
|
|
|
|
children: [{
|
|
|
|
index: '3-1',
|
|
|
|
title: '毛利润排行',
|
|
|
|
path: '/super/ranking/agentProfit'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '3-2',
|
|
|
|
title: '充值排行',
|
|
|
|
path: '/super/ranking/agentRecharge'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '3-3',
|
|
|
|
title: '新加盟',
|
|
|
|
path: '/super/ranking/agentNew'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '4',
|
|
|
|
title: '设置',
|
|
|
|
icon: 'Totalprofit3',
|
|
|
|
children: [{
|
|
|
|
index: '4-1',
|
|
|
|
title: '采购价',
|
|
|
|
path: '/super/ranking/purchase'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '4-2',
|
|
|
|
title: '阶段采购',
|
|
|
|
path: '/super/ranking/stagePurchase'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
],
|
|
|
|
menuData: [
|
|
|
|
{
|
|
|
|
index: '1',
|
|
|
|
title: '首页',
|
|
|
|
path:'/',
|
|
|
|
icon: 'Totalprofit',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2',
|
|
|
|
title: '父级菜单1',
|
|
|
|
icon: 'Totalprofit',
|
|
|
|
children: [{
|
|
|
|
index: '2-1',
|
|
|
|
title: '子级菜单2-1',
|
|
|
|
path: '/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '2-2',
|
|
|
|
title: 'ui页面',
|
|
|
|
path: '/ui'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '3',
|
|
|
|
title: '父级菜单2',
|
|
|
|
icon: 'Totalprofit',
|
|
|
|
children: [{
|
|
|
|
index: '3-1',
|
|
|
|
title: '子级菜单3-1',
|
|
|
|
path: '/about'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
index: '3-2',
|
|
|
|
title: '加盟耶main',
|
|
|
|
path: '/franchise'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
actions: {
|
|
|
|
SET_HEADER({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SET_HEADER');
|
|
|
|
},
|
|
|
|
SET_SIDEBAR({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SET_SIDEBAR');
|
|
|
|
},
|
|
|
|
SET_FOOTER({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SET_FOOTER');
|
|
|
|
},
|
|
|
|
SHOW_BREAD({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SHOW_BREAD');
|
|
|
|
},
|
|
|
|
SET_PAGETITLE({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SET_PAGETITLE');
|
|
|
|
},
|
|
|
|
SET_ADDSERVICELIST({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SET_ADDSERVICELIST');
|
|
|
|
},
|
|
|
|
showLoading({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('SHOW_LOADING')
|
|
|
|
},
|
|
|
|
hideLoading({
|
|
|
|
commit
|
|
|
|
}) {
|
|
|
|
commit('HIDE_LOADING')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mutations: {
|
|
|
|
SHOW_LOADING(state) {
|
|
|
|
state.isLoading = true
|
|
|
|
// state.loadingText = text || '加载中...'
|
|
|
|
},
|
|
|
|
HIDE_LOADING(state) {
|
|
|
|
state.isLoading = false
|
|
|
|
},
|
|
|
|
SET_SIDEBAR(state, show) {
|
|
|
|
state.showSidebar = show;
|
|
|
|
},
|
|
|
|
SET_FOOTER(state, show) {
|
|
|
|
state.showFooter = show;
|
|
|
|
},
|
|
|
|
SET_HEADER(state, show) {
|
|
|
|
state.showHeader = show;
|
|
|
|
},
|
|
|
|
SHOW_BREAD(state, show) {
|
|
|
|
state.showBreadcrumb = show;
|
|
|
|
},
|
|
|
|
SET_PAGETITLE(state, title) {
|
|
|
|
state.pageTitle = title;
|
|
|
|
},
|
|
|
|
SET_ADDSERVICELIST(state, list) {
|
|
|
|
state.addServiceList = list;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getters: {},
|
|
|
|
|
|
|
|
modules: {}
|
|
|
|
})
|