diff --git a/index.html b/index.html index 9aa7be6..11f621b 100644 --- a/index.html +++ b/index.html @@ -4,22 +4,10 @@ - 人人快速开发平台 - <% if (process.env.NODE_ENV === 'production') { %> - - - <% }else { %> - - - - - - - - - <% } %> + 数字化管理系统 +
- \ No newline at end of file + diff --git a/package-lock.json b/package-lock.json index 0bb4ca3..0d515d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9960,6 +9960,15 @@ } } }, + "mockjs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mockjs/-/mockjs-1.1.0.tgz", + "integrity": "sha512-eQsKcWzIaZzEZ07NuEyO4Nw65g0hdWAyurVol1IPl1gahRwY+svqzfgfey8U8dahLwG44d6/RwEzuK52rSa/JQ==", + "dev": true, + "requires": { + "commander": "*" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/package.json b/package.json index 48a69c6..4231af7 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,7 @@ "ip": "^1.1.5", "jest": "21.2.0", "jest-serializer-vue": "0.3.0", + "mockjs": "^1.1.0", "nightwatch": "0.9.12", "node-notifier": "5.1.2", "optimize-css-assets-webpack-plugin": "3.2.0", diff --git a/src/main.js b/src/main.js index 493ab57..17c495d 100644 --- a/src/main.js +++ b/src/main.js @@ -9,7 +9,7 @@ import '@/element-ui-theme' import '@/assets/scss/index.scss' import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios import { isAuth } from '@/utils' -import cloneDeep from 'lodash/cloneDeep' +// import cloneDeep from 'lodash/cloneDeep' Vue.use(VueCookie) Vue.config.productionTip = false @@ -24,7 +24,7 @@ Vue.prototype.$http = httpRequest // ajax请求方法 Vue.prototype.isAuth = isAuth // 权限方法 // 保存整站vuex本地储存初始状态 -window.SITE_CONFIG['storeState'] = cloneDeep(store.state) +// window.SITE_CONFIG['storeState'] = cloneDeep(store.state) /* eslint-disable no-new */ new Vue({ diff --git a/src/router/index.js b/src/router/index.js index 54f7383..bf9eabc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -6,7 +6,7 @@ */ import Vue from 'vue' import Router from 'vue-router' -import { apiGetMenuNav } from '../api/api_menu' +import { apiGetMenuNav } from '@/api/api_menu' import { isURL } from '@/utils/validate' import { clearLoginInfo } from '@/utils' @@ -35,8 +35,9 @@ const mainRoutes = { // 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理! { path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } }, { path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } }, - { path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } }, - { path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } } + { path: '/staff-manage', component: _import('business/staff/staff-manage/index'), name: 'staff-manage', meta: { title: '员工管理', isTab: true } }, + { path: '/staff-profile', component: _import('business/staff/staff-profile/index'), name: 'staff-profile', meta: { title: '员工概述', isTab: true } }, + { path: '/staff-archives', component: _import('business/staff/staff-archives/index'), name: 'staff-archives', meta: { title: '员工档案', isTab: true } } ], beforeEnter (to, from, next) { let token = Vue.cookie.get('token') @@ -107,11 +108,9 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) { } else if (menuList[i].url && /\S/.test(menuList[i].url)) { menuList[i].url = menuList[i].url.replace(/^\//, '') var route = { - // path: menuList[i].url.replace('/', '-'), - path: menuList[i].url, + path: menuList[i].url.replace('/', '-'), component: null, - // name: menuList[i].url.replace('/', '-'), - name: menuList[i].url, + name: menuList[i].url.replace('/', '-'), meta: { menuId: menuList[i].menuId, title: menuList[i].name, diff --git a/src/store/index.js b/src/store/index.js index 258c9f1..d2ae107 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,6 +1,6 @@ import Vue from 'vue' import Vuex from 'vuex' -import cloneDeep from 'lodash/cloneDeep' +// import cloneDeep from 'lodash/cloneDeep' import common from './modules/common' import user from './modules/user' @@ -13,11 +13,11 @@ export default new Vuex.Store({ }, mutations: { // 重置vuex本地储存状态 - resetStore (state) { - Object.keys(state).forEach((key) => { - state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key]) - }) - } + // resetStore (state) { + // Object.keys(state).forEach((key) => { + // state[key] = cloneDeep(window.SITE_CONFIG['storeState'][key]) + // }) + // } }, strict: process.env.NODE_ENV !== 'production' }) diff --git a/src/utils/index.js b/src/utils/index.js index 024c562..62124aa 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -1,6 +1,6 @@ import Vue from 'vue' import router from '@/router' -import store from '@/store' +// import store from '@/store' /** * 获取uuid @@ -53,6 +53,6 @@ export function treeDataTranslate (data, id = 'id', pid = 'parentId') { */ export function clearLoginInfo () { Vue.cookie.delete('token') - store.commit('resetStore') + // store.commit('resetStore') router.options.isAddDynamicMenuRoutes = false } diff --git a/src/views/business/staff/staff-archives/index.vue b/src/views/business/staff/staff-archives/index.vue new file mode 100644 index 0000000..6f23797 --- /dev/null +++ b/src/views/business/staff/staff-archives/index.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/business/staff/staff-manage/index.vue b/src/views/business/staff/staff-manage/index.vue new file mode 100644 index 0000000..42a6d16 --- /dev/null +++ b/src/views/business/staff/staff-manage/index.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/business/staff/staff-profile/index.vue b/src/views/business/staff/staff-profile/index.vue new file mode 100644 index 0000000..fb39763 --- /dev/null +++ b/src/views/business/staff/staff-profile/index.vue @@ -0,0 +1,5 @@ + diff --git a/src/views/layout/main-sidebar.vue b/src/views/layout/main-sidebar.vue index e3b18e8..cf4dbe7 100644 --- a/src/views/layout/main-sidebar.vue +++ b/src/views/layout/main-sidebar.vue @@ -10,18 +10,28 @@ 首页 - + - + - echarts + 员工管理 - + + + + + + 员工概况 + + - ueditor + 员工档案