<template>
<div class="archive-list">
  <div class="ytbd-search">
    <el-form :model="searchForm" ref="searchForm" :inline="true" label-width="110px">
      <el-form-item :label="$t('page.business.archive.sybh')" prop="sn">
        <el-input v-model="searchForm.sn" :placeholder="$t('form.placeholderInput')" clearable
          style="width: 200px" />
      </el-form-item>
      <el-form-item :label="$t('page.business.archive.symc')" prop="name">
        <el-input v-model="searchForm.name" :placeholder="$t('form.placeholderInput')" clearable
          style="width: 200px" />
      </el-form-item>
      <el-form-item prop="operateType" :label="$t('page.business.archive.czlx')">
        <el-select
          v-model="searchForm.operateType"
          :placeholder="$t('form.placeholderSelect')"
          clearable
          style="width: 200px"
          @change="search"
        >
          <el-option :label="$t('page.business.study.study.sqgd')" :value="$t('page.business.study.study.sqgd')" />
          <el-option :label="$t('page.business.study.study.tygd')" :value="$t('page.business.study.study.tygd')" />
          <el-option :label="$t('page.business.study.study.jjgd')" :value="$t('page.business.study.study.jjgd')" />
          <el-option :label="$t('page.business.study.study.sqjd')" :value="$t('page.business.study.study.sqjd')" />
          <el-option :label="$t('page.business.study.study.tyjd')" :value="$t('page.business.study.study.tyjd')" />
          <el-option :label="$t('page.business.study.study.jjjd')" :value="$t('page.business.study.study.jjjd')" />
          <el-option :label="$t('page.business.study.study.sqjy')" :value="$t('page.business.study.study.sqjy')" />
          <el-option :label="$t('page.business.study.study.tyjy')" :value="$t('page.business.study.study.tyjy')" />
          <el-option :label="$t('page.business.study.study.jjjy')" :value="$t('page.business.study.study.jjjy')" />
          <el-option :label="$t('page.business.study.study.qrgh')" :value="$t('page.business.study.study.qrgh')" />
        </el-select>
      </el-form-item>

      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="search">{{ $t('page.business.study.study.search') }}</el-button>
        <el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button>
      </el-form-item>
    </el-form>
  </div>
  <div class="ytbd-content">
    <el-table v-loading="loading" :data="list">
      <el-table-column :label="$t('page.business.archive.sybh')" prop="sn" />
      <el-table-column :label="$t('page.business.archive.symc')" prop="name" />
      <el-table-column :label="$t('page.business.archive.syfzr')" align="center" prop="leader" width="150" />
      <el-table-column :label="$t('page.business.archive.czlx')" align="center" :prop="$i18n.locale === 'zh_CN'?'operateType':'operateTypeEn'" width="200" />
      <el-table-column :label="$t('page.business.archive.czr')" align="center" prop="operateUser" width="100" />
      <el-table-column :label="$t('page.business.archive.czsj')" align="center" prop="createTime" width="140" />
    </el-table>
    <pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize"
      @pagination="getList" />
  </div>
</div>

</template>

<script>
import { archiveLog_list } from "@/api/business/archiveLog/archiveLog"
export default {
  name: 'Syfsyda',
  props: {
  },
  computed: {
  },
  data() {
    return {
      searchForm: {
        pageNum: 1,
        pageSize: 10,
        sn: '',
        name: '',
        operateType: '',

        type:1
      },
      loading: false,
      total: 0,
      list: [],
    }
  },
  created() {
    this.getList()
  },
  methods: {
    search() {
      this.searchForm.pageNum = 1
      this.getList()
    },
    reset() {
      this.searchForm.sn = ''
      this.searchForm.name = ''
      this.searchForm.operateType = ''
      this.search()
    },
    getList() {
      this.loading = true
      archiveLog_list(this.searchForm).then(response => {
        this.list = response.rows
        this.total = response.total
        this.loading = false
      })
    },
  }
}
</script>
<style lang="scss" scoped>
.archive-list {
  .ytbd-search {
    background: #fff;
    padding: 20px;
    padding-bottom: 0;
    margin-bottom: 10px;

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

  .ytbd-content {
    padding: 20px;
    background: #fff;

    .add-box {
      margin-bottom: 10px;
    }
  }
}
</style>
