Commit 19b576c5 by cwq0219

路由配置

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