|
|
|
@ -1,10 +1,121 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<el-table
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
border
|
|
|
|
|
style="width: 90%">
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
width="55">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
fixed
|
|
|
|
|
prop="id"
|
|
|
|
|
label="编号"
|
|
|
|
|
width="100">
|
|
|
|
|
</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="place"
|
|
|
|
|
label="地点"
|
|
|
|
|
width="200">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="reason"
|
|
|
|
|
label="外出原因"
|
|
|
|
|
width="200">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="type"
|
|
|
|
|
label="状态"
|
|
|
|
|
width="120">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<div style="margin-top: 20px">
|
|
|
|
|
<el-button @click="toggleSelection()">取消选择</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
background
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:page-size="pageSize"
|
|
|
|
|
:total="total"
|
|
|
|
|
@current-change="page">
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "TeacherApplication"
|
|
|
|
|
name: "StudentApplication",
|
|
|
|
|
methods: {
|
|
|
|
|
page(currentPage) {
|
|
|
|
|
const _this = this
|
|
|
|
|
let id = window.location.pathname.split('/')[3];
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/findByTypeNoID/审核中/' + (currentPage) + '/6').then(function (resp) {
|
|
|
|
|
console.log(resp)
|
|
|
|
|
_this.tableData = resp.data
|
|
|
|
|
_this.pageSize = 6
|
|
|
|
|
_this.total = resp.data.length
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
toggleSelection(rows) {
|
|
|
|
|
if (rows) {
|
|
|
|
|
rows.forEach(row => {
|
|
|
|
|
this.$refs.multipleTable.toggleRowSelection(row);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$refs.multipleTable.clearSelection();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.multipleSelection = val;
|
|
|
|
|
},
|
|
|
|
|
//this.$refs.multipleTable.selection
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
pageSize: 6,
|
|
|
|
|
total: 11,
|
|
|
|
|
tableData: [{
|
|
|
|
|
id: 1,
|
|
|
|
|
leave_time: '2021-12-20 16:59:15',
|
|
|
|
|
back_time: '2222-12-21 17:28:59',
|
|
|
|
|
place: '万家丽',
|
|
|
|
|
reason: '见导师',
|
|
|
|
|
type: '已过期'
|
|
|
|
|
}],
|
|
|
|
|
multipleSelection: []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
const _this = this
|
|
|
|
|
let id = window.location.pathname.split('/')[3];
|
|
|
|
|
axios.get('http://localhost:8181/leaveDetail/findByTypeNoID/审核中/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)
|
|
|
|
|
*/
|
|
|
|
|
console.log(resp.data)
|
|
|
|
|
_this.tableData = resp.data
|
|
|
|
|
_this.pageSize = 6
|
|
|
|
|
_this.total = resp.data.length
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|