09 权限管理

master
markma 4 years ago
parent 5f22ad31f9
commit 2fd19fe149

@ -12,6 +12,7 @@ import OuterUserIndex from "../views/OuterUserIndex";
import OuterHistory from "../views/OuterHistory";
import OuterAppForm from "../views/OuterAppForm";
import OuterAppDetail from "../views/OuterAppDetail";
import NoAuthority from "../views/NoAuthority";
Vue.use(VueRouter)
@ -84,7 +85,13 @@ const routes = [
component: OuterAppDetail
}
]
},
{
path: '/noAuthority',
name: "无权限",
component: NoAuthority
}
]
const router = new VueRouter({

@ -0,0 +1,29 @@
<template>
<div>
<p>您没有权限访问该网站,3秒后将返回登录界面</p>
</div>
</template>
<script>
export default {
name: "NoAuthority",
data() {
return {}
},
created() {
this.autoRefresh()
},
methods: {
autoRefresh() {
const _this = this
setTimeout(function () {
_this.$router.push("/")
}, 3000);
},
}
}
</script>
<style scoped>
</style>

@ -5,6 +5,8 @@
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-divider direction="vertical"></el-divider>
<span>出入批准员</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router>
@ -36,6 +38,7 @@ export default {
}
},
created() {
const _this = this

@ -4,6 +4,8 @@
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-divider direction="vertical"></el-divider>
<span>学生</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router>

@ -6,6 +6,8 @@
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-divider direction="vertical"></el-divider>
<span>教师</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router>
@ -41,7 +43,13 @@ export default {
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/userDetail/findById/'+id).then(function (resp){
let type = window.location.pathname.split('/')[2];
axios.get('http://localhost:8181/user/checkUseridAndType/' + id + '/' + type).then(function (resp) {
if (resp.data != 'success') {
_this.$router.push("/NoAuthority")
}
})
axios.get('http://localhost:8181/userDetail/findById/' + id).then(function (resp) {
_this.information = resp.data
})

Loading…
Cancel
Save