<div class="block">
<span></span>
<el-date-picker
v-model="value1"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
<el-button type="primary" @click="getMainData()" icon="el-icon-search">搜索</el-button>
var vm = new Vue({
el: '#rrapp',
data() {
return {
form: {
title: null,
mainShow: false,
main: {
}
},
value1: [],
}}
getMainData() {
this.table.main.loading = true
const {page, limit} = this.table.main
const time = this.value1
const startTime = time[0]
const endTime = time[1]
axios.get('prepareExam/queryExamInfo', {
params: {
page,
limit,
phone: this.form.main.phone,
startTime: startTime,
endTime: endTime
}
}).then(
resp => {
this.table.main.loading = false
if (resp.data.code === 0) {
this.table.main.data = resp.data.page.list;
this.table.main.total = resp.data.page.totalCount;
}
},
err => {
this.table.main.loading = false
}
)
},