update 系统优化
This commit is contained in:
parent
d8c6a24290
commit
cee1a14f12
18
index.html
18
index.html
@ -4,22 +4,10 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>人人快速开发平台</title>
|
||||
<% if (process.env.NODE_ENV === 'production') { %>
|
||||
<!-- 生产环境 -->
|
||||
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
|
||||
<% }else { %>
|
||||
<!-- 开发环境 -->
|
||||
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
|
||||
<script src="./static/config/index.js"></script>
|
||||
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
|
||||
<script src="./static/plugins/echarts-3.8.5/echarts.common.min.js"></script>
|
||||
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
|
||||
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script>
|
||||
<script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
|
||||
<% } %>
|
||||
<title>数字化管理系统</title>
|
||||
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
9
package-lock.json
generated
9
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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({
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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'
|
||||
})
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
5
src/views/business/staff/staff-archives/index.vue
Normal file
5
src/views/business/staff/staff-archives/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="staff-archives">
|
||||
员工档案
|
||||
</div>
|
||||
</template>
|
||||
5
src/views/business/staff/staff-manage/index.vue
Normal file
5
src/views/business/staff/staff-manage/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="staff-manage">
|
||||
员工管理
|
||||
</div>
|
||||
</template>
|
||||
5
src/views/business/staff/staff-profile/index.vue
Normal file
5
src/views/business/staff/staff-profile/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="staff-archives">
|
||||
员工概况
|
||||
</div>
|
||||
</template>
|
||||
@ -10,18 +10,28 @@
|
||||
<icon-svg name="shouye" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span slot="title">首页</span>
|
||||
</el-menu-item>
|
||||
<el-submenu index="demo">
|
||||
<el-submenu index="demo1">
|
||||
<template slot="title">
|
||||
<icon-svg name="shoucang" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span>demo</span>
|
||||
<span>组织管理</span>
|
||||
</template>
|
||||
<el-menu-item index="demo-echarts" @click="$router.push({ name: 'demo-echarts' })">
|
||||
<el-menu-item index="demo-echarts" @click="$router.push({ name: 'staff-manage' })">
|
||||
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span slot="title">echarts</span>
|
||||
<span slot="title">员工管理</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="demo-ueditor" @click="$router.push({ name: 'demo-ueditor' })">
|
||||
</el-submenu>
|
||||
<el-submenu index="demo2">
|
||||
<template slot="title">
|
||||
<icon-svg name="shoucang" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span>企业数字看板</span>
|
||||
</template>
|
||||
<el-menu-item index="demo-echarts" @click="$router.push({ name: 'staff-profile' })">
|
||||
<icon-svg name="tubiao" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span slot="title">员工概况</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="demo-ueditor" @click="$router.push({ name: 'staff-archives' })">
|
||||
<icon-svg name="editor" class="site-sidebar__menu-icon"></icon-svg>
|
||||
<span slot="title">ueditor</span>
|
||||
<span slot="title">员工档案</span>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
<sub-menu
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user