<template>
  <div class="page">
    <el-form :model="search" label-width="120px" size="small">
      <el-form-item label="档号：">
        <el-input style="width:80%" v-model="search.archiveNo" placeholder="请输入档号" clearable></el-input>
      </el-form-item>
      <el-form-item label="题名：">
        <el-input style="width:80%" v-model="search.maintitle" placeholder="请输入题名" clearable></el-input>
      </el-form-item>
      <el-form-item label="利用方式：">
        <el-select style="width:80%" v-model="search.purpose" placeholder="请选择利用方式" clearable>
          <el-option label="查看" value="view"></el-option>
          <el-option label="打印" value="print"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="利用部门：">
        <el-input style="width:80%" v-model="search.department" placeholder="请输入利用部门" clearable></el-input>
      </el-form-item>
      <el-form-item label="利用人：">
        <el-input style="width:80%" v-model="search.userChnName" placeholder="请输入利用人" clearable></el-input>
      </el-form-item>
      <el-form-item label="日期查询：">
        <el-date-picker v-model="search.expiryDate" type="daterange" range-separator="至" start-placeholder="开始日期"
          value-format="yyyy-MM-dd" end-placeholder="结束日期">
        </el-date-picker>
      </el-form-item>

      <el-form-item label-width="20px">
        <el-button size="mini" type="primary" @click="searchClick(1)">搜索</el-button>
        <el-button size="mini" type="info" @click="searchClick(2)">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
  export default {
    props: {
      search: {
        type: Object,
        default: () => {},
      },
    },
    data() {
      return {};
    },
    methods: {
      searchClick(val) {
        this.$emit("searchClick", val);
      },
    },
  };

</script>
<style lang="scss" scoped>
  .page {
    width: 100%;
    background-color: #fff;
    padding: 10px 10px 0 10px;
    box-sizing: border-box;

    .el-form {
      display: flex;
      flex-wrap: wrap;

      .el-form-item {
        margin-bottom: 10px;
      }

      .btn {
        text-align: right;
      }
    }
  }

</style>
