<template>
  <div id="leaveDetail">
    <el-row>
      <el-col :span="24" class="info">
        <el-col :span="24" class="top">
          请假条
        </el-col>
        <el-col :span="24">
          <el-form ref="form" :model="form" label-width="100px">
            <el-form-item label="开始日期">
              <el-date-picker v-model="form.starttime" type="date" placeholder="选择开始日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
            </el-form-item>
            <el-form-item label="结束日期">
              <el-date-picker v-model="form.endtime" type="date" placeholder="选择开始日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
            </el-form-item>
            <el-form-item label="请假理由">
              <el-input type="textarea" v-model="form.reason" :rows="4" placeholder="请输入请假理由"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="onSubmit">保存</el-button>
              <el-button @click="cancelClick()">取消</el-button>
            </el-form-item>
          </el-form>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'leaveDetail',
  props: {},
  components: {},
  data: () => ({
    form: {},
  }),
  created() {},
  computed: {},
  methods: {
    onSubmit() {
      console.log(form);
    },
    cancelClick() {
      this.$router.push({ path: '/user/leave' });
    },
  },
};
</script>

<style lang="less" scoped>
.info {
  width: 100%;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: #edeae8;
}
.info .top {
  text-align: center;
  padding: 15px 0;
  font-size: 30px;
}
/deep/.el-textarea__inner {
  width: 98%;
}
</style>
