master
markma 4 years ago
parent fd827f6563
commit 30d3b3ff65

@ -3,11 +3,14 @@ import VueRouter from 'vue-router'
import Login from '../views/Login'
import StudentUserIndex from '../views/StudentUserIndex'
import StudentHistory from '../views/StudentHistory'
import StudentApplication from '../views/StudentApplication'
import StudentApplication from '../views/StudentApplication'
import StudentAppForm from '../views/StudentAppForm'
import TeacherUserIndex from "../views/TeacherUserIndex";
import TeacherApplication from "../views/TeacherApplication";
import TeacherHistory from "../views/TeacherHistory";
import OuterUserIndex from "../views/OuterUserIndex";
import OuterHistory from "../views/OuterHistory";
import OuterAppForm from "../views/OuterAppForm";
Vue.use(VueRouter)
@ -57,7 +60,25 @@ const routes = [
component: TeacherApplication
},
]
}
},
{
path: '/user/outer/:id',
name: '外出批准用户主界面',
component: OuterUserIndex,
redirect: "/user/outer/:id/history",
children: [
{
path: "/user/outer/:id/history",
name: "外出批准历史",
component: OuterHistory
},
{
path: "/user/outer/:id/application",
name: "处理外出申请",
component: OuterAppForm
},
]
},
]
const router = new VueRouter({

@ -0,0 +1,114 @@
<template>
<div>
<el-table
:data="tableData"
border
style="width: 90%">
<el-table-column
fixed
prop="id"
label="编号"
width="100">
</el-table-column>
<el-table-column
prop="username"
label="姓名"
width="200">
</el-table-column>
<el-table-column
prop="school_id"
label="学号"
width="200">
</el-table-column>
<el-table-column
prop="leave_time"
label="预计外出时间"
width="200">
</el-table-column>
<el-table-column
prop="back_time"
label="预计返回时间"
width="200">
</el-table-column>
<el-table-column
prop="out_time"
label="实际外出时间"
width="200">
</el-table-column>
<el-table-column
prop="return_time"
label="实际返回时间"
width="200">
</el-table-column>
<el-table-column
prop="is_exceed"
label="超假"
width="200">
</el-table-column>
</el-table>
<el-pagination
background
layout="prev, pager, next"
:page-size="pageSize"
:total="total"
@current-change="page">
</el-pagination>
</div>
</template>
<script>
export default {
name: "OuterHistory",
methods: {
page(currentPage) {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoID/审核中/' + (currentPage) + '/6').then(function (resp) {
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
}
},
data() {
return {
pageSize: 6,
total: 1,
tableData: [{
id: 1,
username: '张三',
school_id: '201902001031',
leave_time: '2021-12-20 16:59:15',
back_time: '2222-12-21 17:28:59',
out_time: '2021-12-20 18:59:15',
return_time: '2021-12-20 22:59:15',
is_exceed: '否'
}]
}
},
created() {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoID/审核中/1/6').then(function (resp) {
/*
_this.id = resp.data.id
_this.leave_time = resp.data.leave_time
_this.back_time = resp.data.back_time
_this.place = resp.data.place
_this.reason = resp.data.reason
_this.type = resp.data.type
console.log(resp)
*/
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
}
}
</script>
<style scoped>
</style>

@ -0,0 +1,53 @@
<template>
<div>
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router>
<el-menu-item index="history">外出批准历史</el-menu-item>
<el-menu-item index="application">处理外出申请</el-menu-item>
</el-menu>
</el-aside>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
</div>
</template>
<script>
export default {
name: "StudentUserIndex",
data() {
return {
information: [
{
id: 1,
school_id: '123',
name: '张三'
}
]
}
},
created() {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/userDetail/findById/' + id).then(function (resp) {
_this.information = resp.data
})
}
}
</script>
<style scoped>
</style>

@ -1,9 +1,11 @@
<template>
<div>
<h4>姓名{{information.name}} 编号{{information.school_id}}</h4>
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router >
<el-menu router>
<el-menu-item index="history">外出历史</el-menu-item>
<el-menu-item index="application">申请记录</el-menu-item>
<el-menu-item index="appForm">填写申请表单</el-menu-item>
@ -21,7 +23,7 @@
<script>
export default {
name: "StudentUserIndex",
data(){
data() {
return {
information: [
{
@ -37,7 +39,7 @@ export default {
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/userDetail/findById/'+id).then(function (resp){
axios.get('http://localhost:8181/userDetail/findById/' + id).then(function (resp) {
_this.information = resp.data
})

@ -65,7 +65,7 @@
</template>
<script>
export default {
name: "StudentApplication",
name: "TeacherApplication",
methods: {
page(currentPage) {
const _this = this

@ -49,12 +49,12 @@
<script>
export default {
name: "StudentHistory",
methods:{
page(currentPage){
name: "TeacherHistory",
methods: {
page(currentPage) {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoID/审核中/'+(currentPage)+'/6').then(function(resp){
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoID/审核中/' + (currentPage) + '/6').then(function (resp) {
console.log(resp)
_this.tableData = resp.data
_this.pageSize = 6

@ -1,9 +1,12 @@
<template>
<div>
<h4>姓名{{information.name}} 编号{{information.school_id}}</h4>
<span>姓名{{ information.name }}</span>
<el-divider direction="vertical"></el-divider>
<span>编号{{ information.school_id }}</span>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu router >
<el-menu router>
<el-menu-item index="history">批假历史</el-menu-item>
<el-menu-item index="application">处理批假申请</el-menu-item>
</el-menu>

Loading…
Cancel
Save