Commit 19b576c5 by cwq0219

路由配置

1 parent 66fa5eae
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-26 18:02:55
* @Last Modified by: chenwq
* @Last Modified time: 2020-10-22 17:20:03
* @Last Modified time: 2020-10-29 17:45:50
*/
import request from './request'
......@@ -36,13 +36,14 @@ export function AccountLogin(data) {
// postCode: '2003',
// stationName: '哈尔滨',
// validTime: '2020-09-04 10:39:28',
authes: [{
authId: '101',
parentId: '0'
}, {
authId: '102',
parentId: '0'
}]
authes: []
// authes: [{
// authId: '101',
// parentId: '0'
// }, {
// authId: '102',
// parentId: '0'
// }]
})
})
}
......
......@@ -27,6 +27,6 @@ export function elSubmenu(createElement, menu) {
createElement('d2-icon-svg', { slot: 'title', props: { name: menu.iconSvg } })
] : [],
createElement('span', { slot: 'title' }, menu.title || '未命名菜单'),
...menu.children.map((child, childIndex) => (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child))
...menu.children.map((child, childIndex) => child.sideHidden ? '' : (child.children === undefined ? elMenuItem : elSubmenu).call(this, createElement, child))
])
}
/*
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Last Modified by: limin
* @Last Modified time: 2019-09-17 17:20:53
* @Last Modified by: chenwq
* @Last Modified time: 2020-10-29 18:13:28
*/
const permision = {}
/**
......@@ -107,13 +107,14 @@ const _loop = function(res, fnGetMenu) {
permision.format2Menu = function(oMenu) {
if (!oMenu) return null
const { icon, path, meta } = oMenu
const { title, authId, parentId } = meta
const { title, authId, parentId, sideHidden } = meta
return {
title,
icon,
path,
authId,
parentId }
parentId,
sideHidden }
}
/**
......
......@@ -23,12 +23,12 @@ export const home = {
name: 'index',
icon: 's-home',
meta: {
title: 'echats',
title: '预录客户',
authId: '101',
parentId: '0',
cache: true
},
component: _import('index')
component: _import('flow/editCustomer')
}
export const sys = [
// 刷新页面 必须保留
......@@ -49,168 +49,165 @@ export const sys = [
/**
* 所有需动态过滤的资源点
* 101 - 工作台
* 102 - 流量管理
* 103 - 商品库
* 104 - 订单管理
* 105 - 财务管理
* 106 - 系统设置
*/
export const resources = {
'102': {
path: '/bb',
'103': {
path: '/goods',
name: 'goods',
icon: 'document',
name: '表格组件',
meta: {
title: '表格组件',
authId: '102',
parentId: '0'
title: '商品库',
authId: '103',
parentId: '0',
cache: true
}
},
'10201': {
path: '/table1',
icon: 'document-copy',
name: 'fimsTable1',
'10301': {
path: '/product',
name: 'product',
icon: 'document',
meta: {
title: '默认使用',
authId: '10201',
parentId: '102',
title: '产品管理',
authId: '10301',
parentId: '103',
cache: true
},
component: _import('table1'),
auth: [{
authId: '1020101',
parentId: '10201',
label: '编辑',
handle: 'handleEdit'
authId: '1030101',
parentId: '10301',
label: '新增商品',
category: 'Button',
type: 'primary',
handle: 'handleAdd'
}, {
authId: '1020102',
parentId: '10201',
label: '删除',
color: '#FF0000',
handle: 'handleDelete'
authId: '1030102',
parentId: '10301',
label: '导出',
category: 'Button',
handle: 'handleExport'
}, {
authId: '1020103',
parentId: '10201',
label: '添加',
authId: '1030103',
parentId: '10301',
label: '修改',
handle: 'handleEdit'
}],
component: _import('goods/product')
},
'10304': {
path: '/editProduct',
name: 'editProduct',
icon: 'document',
meta: {
title: '产品编辑',
authId: '10304',
parentId: '103',
cache: true,
sideHidden: true
},
component: _import('goods/editProduct')
},
'10302': {
path: '/commodity',
name: 'commodity',
icon: 'document',
meta: {
title: '商品管理',
authId: '10302',
parentId: '103',
cache: true
},
auth: [{
authId: '1030201',
parentId: '10302',
label: '新增商品',
category: 'Button',
type: 'button',
handle: 'handleEdit',
icon: 'plus'
type: 'primary',
handle: 'handleAdd'
}, {
authId: '1020104',
parentId: '10201',
label: '批量操作',
authId: '1030202',
parentId: '10302',
label: '导出',
category: 'Button',
type: 'button',
handle: 'handleOperate'
}]
handle: 'handleExport'
}, {
authId: '1030203',
parentId: '10302',
label: '编辑',
handle: 'handleEdit'
}, {
authId: '1030204',
parentId: '10302',
label: '查看门店',
handle: 'handleDetail'
}],
component: _import('goods/commodity')
},
'10202': {
path: '/table2',
icon: 'finished',
name: 'fimsTable2',
'10305': {
path: '/editeCommodity',
name: 'editeCommodity',
icon: 'document',
meta: {
title: '外部数据传入',
authId: '10202',
parentId: '102',
cache: true
title: '商品编辑',
authId: '10305',
parentId: '103',
cache: true,
sideHidden: true
},
component: _import('table2')
component: _import('goods/editeCommodity')
},
'107': {
path: '/users',
icon: 'user',
name: '帐号管理',
'106': {
path: '/systemConfig',
name: 'systemConfig',
icon: 'document',
meta: {
title: '用户管理',
authId: '107',
parentId: '0'
title: '系统设置',
authId: '106',
parentId: '0',
cache: true
}
},
'10701': {
path: '/user',
name: 'FimsUsers',
icon: 'user-solid',
'10601': {
path: '/personalInfo',
name: 'personalInfo',
icon: 'document',
meta: {
title: '用户管理',
authId: '10701',
parentId: '107',
title: '个人信息',
authId: '10601',
parentId: '106',
cache: true
},
auth: [{ // 列表操作
authId: '1070101',
parentId: '10701',
label: '审核',
handle: 'handleVerify'
}, { //
authId: '1070102',
parentId: '10701',
label: '重置密码',
handle: 'handleOperation'
}, { //
authId: '1070103',
parentId: '10701',
label: '编辑',
handle: 'handleEdit'
}, { //
authId: '1070104',
parentId: '10701',
label: '延期',
handle: 'handleOperation'
}, { //
authId: '1070105',
parentId: '10701',
label: '禁用',
color: '#FF0000',
handle: 'handleOperation'
}, { //
authId: '1070106',
parentId: '10701',
label: '激活',
handle: 'handleOperation'
}, { // 列表操作
authId: '1070107',
parentId: '10701',
label: '创建用户',
category: 'action',
type: 'button',
handle: 'handleRegister',
icon: 'plus'
}],
component: _import('userManage/user')
component: _import('systemConfig/personalInfo')
},
'10702': {
path: '/role',
name: 'FimsRoles',
icon: 'open',
'10602': {
path: '/serviceStore',
name: 'serviceStore',
icon: 'document',
meta: {
title: '权限管理',
authId: '10702',
parentId: '107'
title: '服务4s店',
authId: '10602',
parentId: '106',
cache: true
},
auth: [{
authId: '1070201',
parentId: '10702',
label: '创建角色',
category: 'action',
handle: 'handleEdit',
type: 'button',
icon: 'plus'
authId: '1060201',
parentId: '10602',
label: '新增服务门店',
category: 'Button',
type: 'primary',
handle: 'handleAdd'
}, {
authId: '1070202',
parentId: '10702',
label: '权限编辑',
handle: 'handleEdit',
type: 'text'
authId: '1060202',
parentId: '10602',
label: '删除',
handle: 'handleDelete'
}],
component: _import('userManage/role')
},
'10703': {
path: '/loginLogs',
name: 'FimsLoginLogs',
icon: 'tickets',
meta: {
title: '登录日志',
authId: '10703',
parentId: '107',
cache: true
},
component: _import('userManage/loginLogs')
component: _import('systemConfig/serviceStore')
}
}
......
<!-- 客户预录 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'index',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 商品管理 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'commodity',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 产品编辑 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'editProduct',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 商品编辑 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'editeCommodity',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 产品管理 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'product',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 个人信息 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'personalInfo',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
<!-- 服务4s店 -->
<template>
<div></div>
</template>
<script>
export default {
name: 'serviceStore',
data() {
return {
}
},
components: {},
computed: {},
mounted() {},
methods: {}
}
</script>
<style scoped>
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!