diff --git a/package.json b/package.json index 0712f4f..7c5a8d3 100755 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "chalk": "2.4.2", "chokidar": "2.1.5", "connect": "3.6.6", - "eslint": "5.15.3", + "eslint": "^5.15.3", "eslint-plugin-vue": "5.2.2", "html-webpack-plugin": "3.2.0", "husky": "1.3.1", diff --git a/src/router/index.js b/src/router/index.js index 32479fd..3c19154 100755 --- a/src/router/index.js +++ b/src/router/index.js @@ -7,16 +7,22 @@ Vue.use(Router) import Layout from '@/layout' /* Router Modules */ -import componentsRouter from './modules/components' +// import componentsRouter from './modules/components' // import chartsRouter from './modules/charts' // import tableRouter from './modules/table' // import nestedRouter from './modules/nested' -import userRouter from './modules/user' -import systemRouter from './modules/system' -import prodRouter from './modules/prod' -import orderRouter from './modules/order' -import metaRouter from './modules/meta' -import sitesRouter from './modules/sites' +import userRouter from './modules/user'// 用户 +import systemRouter from './modules/system'// 系统设置 +import prodRouter from './modules/prod'// 产品 +import orderRouter from './modules/order'// 订单 +import metaRouter from './modules/meta'// 元定义 +// import sitesRouter from './modules/sites' +import applicationRouter from './modules/application'// 应用 +import operationsRouter from './modules/operations'// 运营官 +import logisticsRouter from './modules/logistics'// 物流路由 +import staffRouter from './modules/staff'// 员工 +import recommendRouter from './modules/recommend'// 推荐 +// import manufacturerRouter from './modules/manufacturer' /** * Note: sub-menu only appear when route children.length >= 1 @@ -92,7 +98,7 @@ export const constantRoutes = [{ affix: true } }] -}, +} // { // path: '/documentation', // component: Layout, @@ -105,21 +111,21 @@ export const constantRoutes = [{ // } // ] // }, -{ - path: '/guide', - component: Layout, - redirect: '/guide/index', - children: [{ - path: 'index', - component: () => import('@/views/guide/index'), - name: 'Guide', - meta: { - title: 'guide', - icon: 'guide', - noCache: true - } - }] -} +// { +// path: '/guide', +// component: Layout, +// redirect: '/guide/index', +// children: [{ +// path: 'index', +// component: () => import('@/views/guide/index'), +// name: 'Guide', +// meta: { +// title: 'guide', +// icon: 'guide', +// noCache: true +// } +// }] +// } // { // path: '/profile', // component: Layout, @@ -184,13 +190,19 @@ export const asyncRoutes = [ // ] // }, // tableRouter, - metaRouter, - userRouter, - prodRouter, - orderRouter, - sitesRouter, - systemRouter, - componentsRouter, + applicationRouter, // 应用 + operationsRouter, // 运营官 + // manufacturerRouter, + userRouter, // 用户 + orderRouter, // 订单 + prodRouter, // 产品 + logisticsRouter, // 物流 + staffRouter, // 员工 + recommendRouter, // 推荐 + metaRouter, // 元定义 + // sitesRouter, + systemRouter, // 系统设置 + // componentsRouter, // chartsRouter, // nestedRouter, // tableRouter, @@ -210,46 +222,46 @@ export const asyncRoutes = [ }, /** when your routing map is too long, you can split it into small modules **/ - { - path: '/example', - component: Layout, - redirect: '/example/list', - name: 'Example', - meta: { - title: 'example', - icon: 'example' - }, - children: [{ - path: 'create', - component: () => import('@/views/example/create'), - name: 'CreateArticle', - meta: { - title: 'createArticle', - icon: 'edit' - } - }, - { - path: 'edit/:id(\\d+)', - component: () => import('@/views/example/edit'), - name: 'EditArticle', - meta: { - title: 'editArticle', - noCache: true, - activeMenu: '/example/list' - }, - hidden: true - }, - { - path: 'list', - component: () => import('@/views/example/list'), - name: 'ArticleList', - meta: { - title: 'articleList', - icon: 'list' - } - } - ] - }, + // { + // path: '/example', + // component: Layout, + // redirect: '/example/list', + // name: 'Example', + // meta: { + // title: 'example', + // icon: 'example' + // }, + // children: [{ + // path: 'create', + // component: () => import('@/views/example/create'), + // name: 'CreateArticle', + // meta: { + // title: 'createArticle', + // icon: 'edit' + // } + // }, + // { + // path: 'edit/:id(\\d+)', + // component: () => import('@/views/example/edit'), + // name: 'EditArticle', + // meta: { + // title: 'editArticle', + // noCache: true, + // activeMenu: '/example/list' + // }, + // hidden: true + // }, + // { + // path: 'list', + // component: () => import('@/views/example/list'), + // name: 'ArticleList', + // meta: { + // title: 'articleList', + // icon: 'list' + // } + // } + // ] + // }, // { // path: '/tab', diff --git a/src/router/modules/application.js b/src/router/modules/application.js new file mode 100644 index 0000000..1c580c6 --- /dev/null +++ b/src/router/modules/application.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const applicationRouter = { + path: '/application', + component: Layout, + redirect: '/application/page', + alwaysShow: true, // will always show the root menu + name: 'Application', + meta: { + title: '应用', + icon: 'component', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'appManage', + component: () => import('@/views/application/appManage'), + name: 'appManage', + meta: { + title: '应用管理', + icon: 'component', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default applicationRouter diff --git a/src/router/modules/logistics.js b/src/router/modules/logistics.js new file mode 100644 index 0000000..df14fcd --- /dev/null +++ b/src/router/modules/logistics.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const logisticsRouter = { + path: '/logistics', + component: Layout, + redirect: '/logistics/page', + alwaysShow: true, // will always show the root menu + name: 'logistics', + meta: { + title: '物流', + icon: 'tree-table', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'logisticspage', + component: () => import('@/views/logistics/logistics'), + name: 'logistics', + meta: { + title: '物流管理', + icon: 'tree-table', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default logisticsRouter diff --git a/src/router/modules/manufacturer.js b/src/router/modules/manufacturer.js new file mode 100644 index 0000000..d352e2d --- /dev/null +++ b/src/router/modules/manufacturer.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const manufacturerRouter = { + path: '/manufacturer', + component: Layout, + redirect: '/manufacturer/page', + alwaysShow: true, // will always show the root menu + name: 'manufacturer', + meta: { + title: '厂商', + icon: 'tree-table', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'manufacturerpage', + component: () => import('@/views/manufacturer/manufacturer'), + name: 'manufacturer', + meta: { + title: '厂商管理', + icon: 'tree-table', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default manufacturerRouter diff --git a/src/router/modules/meta.js b/src/router/modules/meta.js index 85746d4..0444b2e 100644 --- a/src/router/modules/meta.js +++ b/src/router/modules/meta.js @@ -7,8 +7,8 @@ const metaRouter = { alwaysShow: true, // will always show the root menu name: 'Meta', meta: { - title: 'metas.metas', - icon: 'zip', + title: '元定义', + icon: 'tree', roles: ['admin', 'assistant'] // you can set roles in root nav }, children: [{ @@ -17,7 +17,7 @@ const metaRouter = { name: 'MetaList', meta: { title: 'metas.list', - icon: 'zip', + icon: 'tree', roles: ['admin', 'assistant'] // or you can only set roles in sub nav } }] diff --git a/src/router/modules/operations.js b/src/router/modules/operations.js new file mode 100644 index 0000000..1f59b64 --- /dev/null +++ b/src/router/modules/operations.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const operationsRouter = { + path: '/operations', + component: Layout, + redirect: '/operations/page', + alwaysShow: true, // will always show the root menu + name: 'operations', + meta: { + title: '运营官', + icon: 'user', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'operationsManage', + component: () => import('@/views/operations/operations'), + name: 'operations', + meta: { + title: '运营官管理', + icon: 'user', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default operationsRouter diff --git a/src/router/modules/recommend.js b/src/router/modules/recommend.js new file mode 100644 index 0000000..b384d7b --- /dev/null +++ b/src/router/modules/recommend.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const recommendRouter = { + path: '/recommend', + component: Layout, + redirect: '/recommend/page', + alwaysShow: true, // will always show the root menu + name: 'recommend', + meta: { + title: '推荐', + icon: 'table', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'recommendpage', + component: () => import('@/views/recommend/recommend'), + name: 'recommend', + meta: { + title: '推荐系统', + icon: 'table', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default recommendRouter diff --git a/src/router/modules/staff.js b/src/router/modules/staff.js new file mode 100644 index 0000000..86104dd --- /dev/null +++ b/src/router/modules/staff.js @@ -0,0 +1,25 @@ +import Layout from '@/layout' + +const staffRouter = { + path: '/staff', + component: Layout, + redirect: '/staff/page', + alwaysShow: true, // will always show the root menu + name: 'staff', + meta: { + title: '员工', + icon: 'people', + roles: ['admin', 'assistant'] // you can set roles in root nav + }, + children: [{ + path: 'staffpage', + component: () => import('@/views/staff/staff'), + name: 'staff', + meta: { + title: '员工管理', + icon: 'people', + roles: ['admin', 'assistant'] // or you can only set roles in sub nav + } + }] +} +export default staffRouter diff --git a/src/views/application/appManage.vue b/src/views/application/appManage.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/application/appManage.vue @@ -0,0 +1,577 @@ + + + diff --git a/src/views/logistics/logistics.vue b/src/views/logistics/logistics.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/logistics/logistics.vue @@ -0,0 +1,577 @@ + + + diff --git a/src/views/manufacturer/manufacturer.vue b/src/views/manufacturer/manufacturer.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/manufacturer/manufacturer.vue @@ -0,0 +1,577 @@ + + + diff --git a/src/views/operations/operations.vue b/src/views/operations/operations.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/operations/operations.vue @@ -0,0 +1,577 @@ + + + diff --git a/src/views/recommend/recommend.vue b/src/views/recommend/recommend.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/recommend/recommend.vue @@ -0,0 +1,577 @@ + + + diff --git a/src/views/staff/staff.vue b/src/views/staff/staff.vue new file mode 100644 index 0000000..10bde58 --- /dev/null +++ b/src/views/staff/staff.vue @@ -0,0 +1,577 @@ + + +