|
|
|
@ -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'}
|
|
|
|
|