You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
4.3 KiB

import Vue from 'vue';
import Vuex from 'vuex';
4 months ago
Vue.use(Vuex)
export default new Vuex.Store({
state: {
showSidebar: false,
3 weeks ago
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: {
3 weeks ago
SET_HEADER({
commit
}) {
commit('SET_HEADER');
},
3 weeks ago
SET_SIDEBAR({
commit
}) {
commit('SET_SIDEBAR');
},
3 weeks ago
SET_FOOTER({
commit
}) {
commit('SET_FOOTER');
},
3 weeks ago
SHOW_BREAD({
commit
}) {
commit('SHOW_BREAD');
},
3 weeks ago
SET_PAGETITLE({
commit
}) {
commit('SET_PAGETITLE');
},
3 weeks ago
SET_ADDSERVICELIST({
commit
}) {
commit('SET_ADDSERVICELIST');
},
3 weeks ago
showLoading({
commit
}) {
commit('SHOW_LOADING')
},
3 weeks ago
hideLoading({
commit
}) {
commit('HIDE_LOADING')
3 weeks ago
},
4 months ago
},
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;
}
},
3 weeks ago
getters: {},
modules: {}
})