Commit 53b1a3d8 authored by 刘洪铨's avatar 刘洪铨

登录

parent 98d9fb76
...@@ -3,7 +3,7 @@ ENV = 'development' ...@@ -3,7 +3,7 @@ ENV = 'development'
# base api # base api
ZD_TEST = '/dev-api' VUE_APP_BASE_API = '/dev-api'
# workFlow链接地址 # workFlow链接地址
# VUE_APP_WORKFLOW = 'http://106.2.17.219:10180' # VUE_APP_WORKFLOW = 'http://106.2.17.219:10180'
VUE_APP_WORKFLOW = '/workFlow' VUE_APP_WORKFLOW = '/workFlow'
......
...@@ -3,8 +3,8 @@ import request from '@/utils/request' ...@@ -3,8 +3,8 @@ import request from '@/utils/request'
// 获取路由 // 获取路由
export const getRouters = () => { export const getRouters = () => {
return request({ return request({
url: '/authority/getRouters', url: '/auth/getRouters',
method: 'get', method: 'get'
params: { path: '/zhongtai' } // params: { path: '/zhongtai' }
}) })
} }
...@@ -3,7 +3,8 @@ import store from './store' ...@@ -3,7 +3,8 @@ import store from './store'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie import { getToken } from '@/utils/auth'
import de from "element-ui/src/locale/lang/de"; // get token from cookie
// import getPageTitle from '@/utils/get-page-title' // import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration NProgress.configure({ showSpinner: false }) // NProgress Configuration
...@@ -49,7 +50,6 @@ router.beforeEach((to, from, next) => { ...@@ -49,7 +50,6 @@ router.beforeEach((to, from, next) => {
} }
}) })
.catch(err => { .catch(err => {
}) })
} else { } else {
next() next()
......
...@@ -97,11 +97,11 @@ export const constantRoutes = [ ...@@ -97,11 +97,11 @@ export const constantRoutes = [
{ {
path: '/log', path: '/log',
component: Layout, component: Layout,
redirect: '/log/operlog', redirect: '/log/operLog',
children: [{ children: [{
path: '/log/operlog', path: '/log/operLog',
name: 'Operlog', name: 'Operlog',
component: () => import('@/views/monitor/operlog/index.vue'), component: () => import('@/views/monitor/operLog/index.vue'),
meta: { title: '操作日志', icon: 'dashboard' } meta: { title: '操作日志', icon: 'dashboard' }
}] }]
}*/ }*/
......
...@@ -20,6 +20,7 @@ const permission = { ...@@ -20,6 +20,7 @@ const permission = {
// 向后端请求路由数据 // 向后端请求路由数据
getRouters().then(res => { getRouters().then(res => {
const accessedRoutes = filterAsyncRouter(res.data) const accessedRoutes = filterAsyncRouter(res.data)
console.log(accessedRoutes)
if (accessedRoutes[0]) { if (accessedRoutes[0]) {
const firstChild = getFirstChild(accessedRoutes[0]) const firstChild = getFirstChild(accessedRoutes[0])
accessedRoutes.push({ path: '*', redirect: '/404', hidden: true }) accessedRoutes.push({ path: '*', redirect: '/404', hidden: true })
......
...@@ -19,7 +19,6 @@ const service = axios.create({ ...@@ -19,7 +19,6 @@ const service = axios.create({
// let loadingInstance = '' // let loadingInstance = ''
// request拦截器 // request拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
debugger
// 请求开始 loading 开始 // 请求开始 loading 开始
/* const loadingCount = store.state.app.loadingCount /* const loadingCount = store.state.app.loadingCount
console.log(loadingCount) console.log(loadingCount)
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['zt:operlog:detail']" v-hasPermi="['zt:operLog:detail']"
size="mini" size="mini"
type="text" type="text"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row,scope.index)"
......
...@@ -128,10 +128,10 @@ ...@@ -128,10 +128,10 @@
</template> </template>
<script> <script>
import { list, delLogininfor, cleanLogininfor, exportLogininfor } from '@/api/monitor/logininfor' import { list, delLogininfor, cleanLogininfor, exportLogininfor } from '@/api/monitor/loginInfo'
export default { export default {
name: 'Logininfor', name: 'LoginInfo',
data() { data() {
return { return {
// 遮罩层 // 遮罩层
......
...@@ -70,20 +70,20 @@ ...@@ -70,20 +70,20 @@
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-button <el-button
v-hasPermi="['zt:operlog:delete']" v-hasPermi="['zt:operLog:delete']"
type="danger" type="danger"
size="small" size="small"
:disabled="ids.length === 0" :disabled="ids.length === 0"
@click="handleDelete" @click="handleDelete"
>删除</el-button> >删除</el-button>
<el-button <el-button
v-hasPermi="['zt:operlog:clear']" v-hasPermi="['zt:operLog:clear']"
type="danger" type="danger"
size="small" size="small"
@click="handleClean" @click="handleClean"
>清空</el-button> >清空</el-button>
<el-button <el-button
v-hasPermi="['zt:operlog:export']" v-hasPermi="['zt:operLog:export']"
type="success" type="success"
size="small" size="small"
@click="handleExport" @click="handleExport"
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-hasPermi="['zt:operlog:detail']" v-hasPermi="['zt:operLog:detail']"
size="mini" size="mini"
type="text" type="text"
@click="handleView(scope.row,scope.index)" @click="handleView(scope.row,scope.index)"
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
</template> </template>
<script> <script>
import { list, delOperlog, cleanOperlog, exportOperlog } from '@/api/monitor/operlog' import { list, delOperlog, cleanOperlog, exportOperlog } from '@/api/monitor/operLog'
export default { export default {
name: 'Operlog', name: 'Operlog',
......
...@@ -78,15 +78,15 @@ module.exports = { ...@@ -78,15 +78,15 @@ module.exports = {
// ['^' + process.env.VUE_APP_INTERNAL]: '' // ['^' + process.env.VUE_APP_INTERNAL]: ''
// } // }
// }, // },
[process.env.ZD_TEST]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.1.17:10010/internal`, // target: `http://192.168.1.17:10010/internal`,
// target: `http://10.5.87.231:10010/internal`, // target: `http://10.5.87.231:10010/internal`,
target: `http://localhost:8082/`, target: `http://127.0.0.1:8082/`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.ZD_TEST]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
} }
}, }
} }
}, },
configureWebpack: { configureWebpack: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment