路由页面改为以Page为后缀

master
toesbieya 6 years ago
parent 2680c5e921
commit 59094e384c
  1. 4
      vue/src/router/authority/module/message.js
  2. 8
      vue/src/router/authority/module/purchase.js
  3. 8
      vue/src/router/authority/module/sell.js
  4. 2
      vue/src/router/authority/module/stock.js
  5. 12
      vue/src/router/authority/module/system.js
  6. 4
      vue/src/router/constant/module/app.js
  7. 20
      vue/src/router/constant/module/example.js
  8. 10
      vue/src/store/module/resource.js
  9. 0
      vue/src/view/example/component/regionSelectorPage.vue
  10. 0
      vue/src/view/example/component/ripplePage.vue
  11. 0
      vue/src/view/example/component/signaturePage.vue
  12. 0
      vue/src/view/example/component/skeletonPage.vue
  13. 0
      vue/src/view/example/component/treeSelectPage.vue
  14. 0
      vue/src/view/example/component/uploadPage.vue
  15. 0
      vue/src/view/example/cool/fluidPage.vue
  16. 0
      vue/src/view/example/cool/l2dPage.vue
  17. 0
      vue/src/view/example/developingTest/indexPage.vue
  18. 0
      vue/src/view/example/icon/indexPage.vue
  19. 0
      vue/src/view/index/indexPage.vue
  20. 0
      vue/src/view/message/manage/indexPage.vue
  21. 0
      vue/src/view/message/user/indexPage.vue
  22. 0
      vue/src/view/purchase/inbound/detailPage.vue
  23. 0
      vue/src/view/purchase/inbound/indexPage.vue
  24. 0
      vue/src/view/purchase/order/detailPage.vue
  25. 0
      vue/src/view/purchase/order/indexPage.vue
  26. 0
      vue/src/view/sell/order/detailPage.vue
  27. 0
      vue/src/view/sell/order/indexPage.vue
  28. 0
      vue/src/view/sell/outbound/detailPage.vue
  29. 0
      vue/src/view/sell/outbound/indexPage.vue
  30. 0
      vue/src/view/stock/current/indexPage.vue
  31. 0
      vue/src/view/system/category/indexPage.vue
  32. 0
      vue/src/view/system/customer/indexPage.vue
  33. 0
      vue/src/view/system/department/indexPage.vue
  34. 0
      vue/src/view/system/role/indexPage.vue
  35. 0
      vue/src/view/system/supplier/indexPage.vue
  36. 0
      vue/src/view/system/user/indexPage.vue
  37. 0
      vue/src/view/userCenter/indexPage.vue

@ -10,13 +10,13 @@ const router = {
{ {
path: 'manage', path: 'manage',
name: 'messageManagement', name: 'messageManagement',
component: lazyLoadView(import('@/view/message/manage')), component: lazyLoadView(import('@/view/message/manage/indexPage')),
meta: {title: '消息管理'} meta: {title: '消息管理'}
}, },
{ {
path: 'user', path: 'user',
name: 'userMessage', name: 'userMessage',
component: lazyLoadView(import('@/view/message/user')), component: lazyLoadView(import('@/view/message/user/indexPage')),
meta: {title: '个人消息', noAuth: true, noCache: true} meta: {title: '个人消息', noAuth: true, noCache: true}
} }
] ]

@ -10,13 +10,13 @@ const router = {
{ {
path: 'order', path: 'order',
name: 'purchaseOrder', name: 'purchaseOrder',
component: lazyLoadView(import('@/view/purchase/order')), component: lazyLoadView(import('@/view/purchase/order/indexPage')),
meta: {title: '采购订单'} meta: {title: '采购订单'}
}, },
{ {
path: 'order/detail/:type(see|add|edit)/:id?', path: 'order/detail/:type(see|add|edit)/:id?',
props: true, props: true,
component: lazyLoadView(import('@/view/purchase/order/detail')), component: lazyLoadView(import('@/view/purchase/order/detailPage')),
meta: { meta: {
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
@ -37,13 +37,13 @@ const router = {
{ {
path: 'inbound', path: 'inbound',
name: 'purchaseInbound', name: 'purchaseInbound',
component: lazyLoadView(import('@/view/purchase/inbound')), component: lazyLoadView(import('@/view/purchase/inbound/indexPage')),
meta: {title: '采购入库'} meta: {title: '采购入库'}
}, },
{ {
path: 'inbound/detail/:type(see|add|edit)/:id?', path: 'inbound/detail/:type(see|add|edit)/:id?',
props: true, props: true,
component: lazyLoadView(import('@/view/purchase/inbound/detail')), component: lazyLoadView(import('@/view/purchase/inbound/detailPage')),
meta: { meta: {
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params

@ -10,13 +10,13 @@ const router = {
{ {
path: 'order', path: 'order',
name: 'sellOrder', name: 'sellOrder',
component: lazyLoadView(import('@/view/sell/order')), component: lazyLoadView(import('@/view/sell/order/indexPage')),
meta: {title: '销售订单'} meta: {title: '销售订单'}
}, },
{ {
path: 'order/detail/:type(see|add|edit)/:id?', path: 'order/detail/:type(see|add|edit)/:id?',
props: true, props: true,
component: lazyLoadView(import('@/view/sell/order/detail')), component: lazyLoadView(import('@/view/sell/order/detailPage')),
meta: { meta: {
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params
@ -37,13 +37,13 @@ const router = {
{ {
path: 'outbound', path: 'outbound',
name: 'sellOutbound', name: 'sellOutbound',
component: lazyLoadView(import('@/view/sell/outbound')), component: lazyLoadView(import('@/view/sell/outbound/indexPage')),
meta: {title: '销售出库'} meta: {title: '销售出库'}
}, },
{ {
path: 'outbound/detail/:type(see|add|edit)/:id?', path: 'outbound/detail/:type(see|add|edit)/:id?',
props: true, props: true,
component: lazyLoadView(import('@/view/sell/outbound/detail')), component: lazyLoadView(import('@/view/sell/outbound/detailPage')),
meta: { meta: {
dynamicTitle(to) { dynamicTitle(to) {
const {type, id} = to.params const {type, id} = to.params

@ -10,7 +10,7 @@ const router = {
{ {
path: 'current', path: 'current',
name: 'currentStock', name: 'currentStock',
component: lazyLoadView(import('@/view/stock/current')), component: lazyLoadView(import('@/view/stock/current/indexPage')),
meta: {title: '当前库存'} meta: {title: '当前库存'}
} }
] ]

@ -10,37 +10,37 @@ const router = {
{ {
path: 'department', path: 'department',
name: 'departmentManagement', name: 'departmentManagement',
component: lazyLoadView(import('@/view/system/department')), component: lazyLoadView(import('@/view/system/department/indexPage')),
meta: {title: '部门管理'} meta: {title: '部门管理'}
}, },
{ {
path: 'role', path: 'role',
name: 'roleManagement', name: 'roleManagement',
component: lazyLoadView(import('@/view/system/role')), component: lazyLoadView(import('@/view/system/role/indexPage')),
meta: {title: '角色管理'} meta: {title: '角色管理'}
}, },
{ {
path: 'user', path: 'user',
name: 'userManagement', name: 'userManagement',
component: lazyLoadView(import('@/view/system/user')), component: lazyLoadView(import('@/view/system/user/indexPage')),
meta: {title: '用户管理'} meta: {title: '用户管理'}
}, },
{ {
path: 'category', path: 'category',
name: 'categorySetting', name: 'categorySetting',
component: lazyLoadView(import('@/view/system/category')), component: lazyLoadView(import('@/view/system/category/indexPage')),
meta: {title: '商品分类'} meta: {title: '商品分类'}
}, },
{ {
path: 'customer', path: 'customer',
name: 'customerManagement', name: 'customerManagement',
component: lazyLoadView(import('@/view/system/customer')), component: lazyLoadView(import('@/view/system/customer/indexPage')),
meta: {title: '客户管理'} meta: {title: '客户管理'}
}, },
{ {
path: 'supplier', path: 'supplier',
name: 'supplierManagement', name: 'supplierManagement',
component: lazyLoadView(import('@/view/system/supplier')), component: lazyLoadView(import('@/view/system/supplier/indexPage')),
meta: {title: '供应商管理'} meta: {title: '供应商管理'}
} }
] ]

@ -14,14 +14,14 @@ const router = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: lazyLoadView(import('@/view/index')), component: lazyLoadView(import('@/view/index/indexPage')),
name: 'index', name: 'index',
meta: {title: '首页', affix: true, icon: 'home', sort: 0} meta: {title: '首页', affix: true, icon: 'home', sort: 0}
}, },
{ {
path: 'user', path: 'user',
name: 'userCenter', name: 'userCenter',
component: lazyLoadView(import('@/view/userCenter')), component: lazyLoadView(import('@/view/userCenter/indexPage')),
meta: {title: '个人中心', noCache: true, icon: 'user', hidden: true}, meta: {title: '个人中心', noCache: true, icon: 'user', hidden: true},
} }
] ]

@ -14,7 +14,7 @@ const router = {
}, },
{ {
path: 'icon', path: 'icon',
component: lazyLoadView(import('@/view/example/icon')), component: lazyLoadView(import('@/view/example/icon/indexPage')),
meta: {title: '图 标'} meta: {title: '图 标'}
}, },
{ {
@ -28,12 +28,12 @@ const router = {
children: [ children: [
{ {
path: 'fluid', path: 'fluid',
component: lazyLoadView(import('@/view/example/cool/fluid')), component: lazyLoadView(import('@/view/example/cool/fluidPage')),
meta: {title: '流体动画'} meta: {title: '流体动画'}
}, },
{ {
path: 'l2d', path: 'l2d',
component: lazyLoadView(import('@/view/example/cool/l2d')), component: lazyLoadView(import('@/view/example/cool/l2dPage')),
meta: {title: '看板娘'} meta: {title: '看板娘'}
}, },
] ]
@ -45,39 +45,39 @@ const router = {
children: [ children: [
{ {
path: 'uploadExample', path: 'uploadExample',
component: lazyLoadView(import('@/view/example/component/uploadExample')), component: lazyLoadView(import('@/view/example/component/uploadPage')),
meta: {title: '上传文件'} meta: {title: '上传文件'}
}, },
{ {
path: 'skeletonExample', path: 'skeletonExample',
component: lazyLoadView(import('@/view/example/component/skeletonExample')), component: lazyLoadView(import('@/view/example/component/skeletonPage')),
meta: {title: '骨架屏'} meta: {title: '骨架屏'}
}, },
{ {
path: 'rippleExample', path: 'rippleExample',
component: lazyLoadView(import('@/view/example/component/rippleExample')), component: lazyLoadView(import('@/view/example/component/ripplePage')),
meta: {title: '波纹'} meta: {title: '波纹'}
}, },
{ {
path: 'signatureExample', path: 'signatureExample',
component: lazyLoadView(import('@/view/example/component/signatureExample')), component: lazyLoadView(import('@/view/example/component/signaturePage')),
meta: {title: '手写签名'} meta: {title: '手写签名'}
}, },
{ {
path: 'regionSelectorExample', path: 'regionSelectorExample',
component: lazyLoadView(import('@/view/example/component/regionSelectorExample')), component: lazyLoadView(import('@/view/example/component/regionSelectorPage')),
meta: {title: '行政区划选择'} meta: {title: '行政区划选择'}
}, },
{ {
path: 'treeSelectExample', path: 'treeSelectExample',
component: lazyLoadView(import('@/view/example/component/treeSelectExample')), component: lazyLoadView(import('@/view/example/component/treeSelectPage')),
meta: {title: '树选择'} meta: {title: '树选择'}
} }
] ]
}, },
{ {
path: 'developingTest', path: 'developingTest',
component: lazyLoadView(import('@/view/example/developingTest')), component: lazyLoadView(import('@/view/example/developingTest/indexPage')),
meta: {title: '开发测试'} meta: {title: '开发测试'}
}, },
{ {

@ -154,19 +154,17 @@ function sort(routes) {
} }
const getSortValue = item => { const getSortValue = item => {
const {meta: {sort} = {}} = deepTap(item) || {} const sort = deepTap(item)
return isEmpty(sort) ? 10000 : sort return isEmpty(sort) ? 10000 : sort
} }
const deepTap = item => { const deepTap = item => {
const {name, children, meta: {title, hidden, sort} = {}} = item const {name, children = [], meta: {title, hidden, sort} = {}} = item
if (hidden) return null if (hidden) return null
if (!isEmpty(sort)) return item if (!isEmpty(sort)) return sort
if (isEmpty(name, title)) {
//如果是类似首页那样的路由层级 //如果是类似首页那样的路由层级
if (children && children.length === 1) { if (isEmpty(name, title) && children.length === 1) {
return deepTap(children[0]) return deepTap(children[0])
} }
}
return null return null
} }

Loading…
Cancel
Save