mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-13 15:15:53 +08:00
增加返回列表
This commit is contained in:
parent
2765c5eca0
commit
befcbe0b05
@ -30,10 +30,11 @@ export default {
|
||||
}).then(response => response.data)
|
||||
},
|
||||
downLoad(keys) {
|
||||
const timestamp = new Date().getTime()
|
||||
return request({
|
||||
url: `fileAction.do?funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=`,
|
||||
url: `fileAction.do?funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`,
|
||||
method: 'post',
|
||||
data: `funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=`
|
||||
data: `funid=sys_attach&keyid=${keys}&pagetype=editgrid&eventcode=down&user_id=${roles}&dataType=byte&_dc=${timestamp}`
|
||||
}).then(response => response.data)
|
||||
}
|
||||
}
|
||||
|
@ -28,14 +28,7 @@ router.beforeEach(async(to, from, next) => {
|
||||
// determine whether the user has obtained his permission roles through getInfo
|
||||
const hasRoles = store.getters.roles && store.getters.roles.length > 0
|
||||
const sessionRoles = sessionStorage.getItem('ROLES')
|
||||
if (hasRoles) {
|
||||
// generate accessible routes map based on roles
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes', store.getters.roles)
|
||||
|
||||
// dynamically add accessible routes
|
||||
router.addRoutes(accessRoutes)
|
||||
next()
|
||||
} else if (sessionRoles) {
|
||||
if (!hasRoles && sessionRoles) {
|
||||
// generate accessible routes map based on roles
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes', sessionRoles)
|
||||
|
||||
@ -45,6 +38,8 @@ router.beforeEach(async(to, from, next) => {
|
||||
// 刷新页面获取当前账号权限
|
||||
store.dispatch('user/getRoles', sessionRoles)
|
||||
next()
|
||||
} else if (hasRoles) {
|
||||
next()
|
||||
} else {
|
||||
try {
|
||||
// get user info
|
||||
|
@ -67,6 +67,10 @@ service.interceptors.response.use(
|
||||
}
|
||||
return Promise.reject(new Error(res.message || 'Error'))
|
||||
} else {
|
||||
if (res.data.message === '当前用户没有登录!') {
|
||||
// store.dispatch('user/logout')
|
||||
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
||||
}
|
||||
return res
|
||||
}
|
||||
},
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -159,7 +162,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenCheckCreateForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -317,7 +320,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_check')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -341,4 +345,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -159,7 +162,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenCheckAuditForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -317,7 +320,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_check')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -341,4 +345,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -77,7 +77,7 @@ import buttons from '@/components/Buttons'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
name: 'HiddenCheck',
|
||||
components: {
|
||||
buttons,
|
||||
Attach
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -159,7 +162,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenReformCreateForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -317,7 +320,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_reform')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -341,4 +345,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -185,7 +188,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenReformAuditForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -347,7 +350,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_reform')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -371,4 +375,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -74,7 +74,7 @@ import buttons from '@/components/Buttons'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
name: 'HiddenReform',
|
||||
components: {
|
||||
buttons,
|
||||
Attach
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -159,7 +162,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenReviewCreateForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -317,7 +320,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_review')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -341,4 +345,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<div class="buttons">
|
||||
<buttons funid="hidden_check" style="margin-bottom:20px" @save="save" />
|
||||
<el-button type="primary" @click="back">返回列表</el-button>
|
||||
</div>
|
||||
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
@ -224,7 +227,7 @@ import buttons from '@/components/formBtn'
|
||||
import SelUser from '@/components/selUser'
|
||||
import SelDept from '@/components/selDept'
|
||||
export default {
|
||||
name: 'AuditForm',
|
||||
name: 'HiddenReviewAuditForm',
|
||||
components: {
|
||||
buttons,
|
||||
SelUser,
|
||||
@ -401,7 +404,8 @@ export default {
|
||||
})
|
||||
},
|
||||
back() {
|
||||
// this.$router__back(-1)
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.push('/hidden_danger/hidden_review')
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -425,4 +429,11 @@ export default {
|
||||
.el-col{
|
||||
margin-left: 2%;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
.el-button--primary {
|
||||
margin-left: 10px;
|
||||
height: 26.8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -70,7 +70,7 @@ import buttons from '@/components/Buttons'
|
||||
import Attach from '@/components/sys_attach'
|
||||
import { parseDay } from '@/utils/index'
|
||||
export default {
|
||||
name: 'SafeIdsp',
|
||||
name: 'HiddenReview',
|
||||
components: {
|
||||
buttons,
|
||||
Attach
|
||||
|
Loading…
x
Reference in New Issue
Block a user