06 debug分页

master
markma 4 years ago
parent 4814b80c01
commit c5e544c8f4

@ -67,7 +67,9 @@ export default {
axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/' + (currentPage) + '/6').then(function (resp) {
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/' + (currentPage) + '/6').then(function (resp) {
_this.total = resp.data
})
}
},
@ -92,18 +94,11 @@ export default {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/outDetail/findAndReturnOLDs/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
})
axios.get('http://localhost:8181/outDetail/findAndReturnOLDsNum/1/6').then(function (resp) {
_this.total = resp.data
})
}
}

@ -1,20 +1,25 @@
<template>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
<div class="block">
<span class="demonstration">离开时间</span>
<el-date-picker
v-model="ruleForm.leave_time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
placeholder="选择日期时间">
</el-date-picker>
</div>
<div class="block">
<span class="demonstration">返回时间</span>
<el-date-picker
v-model="ruleForm.back_time"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
placeholder="选择日期时间">
</el-date-picker>
</div>
<el-form-item label="外出地点" prop="place">
<el-input v-model="ruleForm.place"></el-input>
</el-form-item>
@ -41,6 +46,41 @@ export default {
reason: '',
type: '审核中'
},
pickerOptions: {
shortcuts: [{
text: '今早八点',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime());
date.setTime(date.setHours(8, 0, 0));
picker.$emit('pick', date);
}
}, {
text: '今晚十点',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime());
date.setTime(date.setHours(22, 0, 0));
picker.$emit('pick', date);
}
}, {
text: '明早八点',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() + 3600 * 1000 * 24);
date.setTime(date.setHours(8, 0, 0));
picker.$emit('pick', date);
}
}, {
text: '明晚十点',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() + 3600 * 1000 * 24);
date.setTime(date.setHours(22, 0, 0));
picker.$emit('pick', date);
}
}]
},
rules: {
leave_time: [
{required: true, message: '请输入起始时间', trigger: 'blur'}

@ -53,11 +53,12 @@ export default {
page(currentPage){
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByNotType/已过期/'+id+'/'+(currentPage)+'/6').then(function(resp){
axios.get('http://localhost:8181/leaveDetail/findByNotType/已过期/' + id + '/' + (currentPage) + '/6').then(function (resp) {
console.log(resp)
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNum/已过期/' + id + '/1/6').then(function (resp) {
_this.total = resp.data
})
}
},
@ -78,19 +79,13 @@ export default {
created() {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByNotType/已过期/'+id+'/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)
*/
axios.get('http://localhost:8181/leaveDetail/findByNotType/已过期/' + id + '/1/6').then(function (resp) {
console.log(axios.get('http://localhost:8181/leaveDetail/findByNotTypeNum/已过期/' + id + '/1/6'))
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNum/已过期/' + id + '/1/6').then(function (resp) {
_this.total = resp.data
})
}
}

@ -54,11 +54,13 @@ export default {
page(currentPage){
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByType/已过期/'+id+'/'+(currentPage)+'/6').then(function(resp){
axios.get('http://localhost:8181/leaveDetail/findByType/已过期/' + id + '/' + (currentPage) + '/6').then(function (resp) {
console.log(resp)
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByTypeNum/已过期/' + id + '/' + (currentPage) + '/6').then(function (resp) {
_this.total = resp.data
})
}
},
@ -79,20 +81,13 @@ export default {
created() {
const _this = this
let id = window.location.pathname.split('/')[3];
axios.get('http://localhost:8181/leaveDetail/findByType/已过期/'+id+'/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)
*/
axios.get('http://localhost:8181/leaveDetail/findByType/已过期/' + id + '/1/6').then(function (resp) {
console.log(resp.data)
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByTypeNum/已过期/' + id + '/1/6').then(function (resp) {
_this.total = resp.data
})
}
}

@ -74,7 +74,9 @@ export default {
console.log(resp)
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByTypeNoIDNum/审核中/' + (currentPage) + '/6').then(function (resp) {
_this.total = resp.data
})
},
toggleSelection(rows) {
@ -138,7 +140,9 @@ export default {
axios.get('http://localhost:8181/leaveDetail/findByTypeNoID/审核中/1/6').then(function (resp) {
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByTypeNoIDNum/审核中/1/6').then(function (resp) {
_this.total = resp.data
})
}
}

@ -58,7 +58,9 @@ export default {
console.log(resp)
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoIDNum/审核中/' + (currentPage) + '/6').then(function (resp) {
_this.total = resp.data
})
}
},
@ -79,19 +81,12 @@ export default {
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)
*/
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoID/审核中/1/6').then(function (resp) {
_this.tableData = resp.data
_this.pageSize = 6
_this.total = resp.data.length
})
axios.get('http://localhost:8181/leaveDetail/findByNotTypeNoIDNum/审核中/1/6').then(function (resp) {
_this.total = resp.data
})
}
}

Loading…
Cancel
Save