<template>
  <div>
    <el-dialog
      :title="$t2('文件历史列表','components.fileLibrary.fileHistoryList')"
      :append-to-body="true"
      :modal-append-to-body="true"
      :close-on-click-modal="falseValue"
      :visible.sync="showDialog"
      :modal="falseValue"
      custom-class="dialog-style list-dialog dialog-checkbox pd_0"
      width="1200px"
      @close="dialogClose"
      v-el-drag-dialog
      v-el-dialog-center
    >
      <div class="cont" style="height:450px">
        <vxe-grid
          class="is-pointer"
          ref="table-m1"
          v-bind="vxeOption"
          @resizable-change="$vxeTableUtil.onColumnWitchChange"
          @custom="$vxeTableUtil.customHandle"
          @checkbox-change="addDataTable"
          @checkbox-all="checkAll"
          @cell-dblclick="checkWithSubmit"
        >
          <template #form>
            <div class="clearfix screen-btns">
              <div class="fr">
                <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
                            plain>{{ $t2('重置', 'system.button.reset') }}
                </vxe-button>
                <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
                  {{ $t2('搜索', 'system.button.search') }}
                </vxe-button>
              </div>
            </div>
            <vxe-form class="screen-box" title-width="92px" title-align="right" :data="formData" @submit="searchEvent"
                      @reset="resetEvent">
              <vxe-form-item :title="$t2('文件名称','components.fileLibrary.fileName')+':'" field="fileName">
                <template v-slot>
                  <el-input v-model="formData.fileName" size="small" clearable/>
                </template>
              </vxe-form-item>
            </vxe-form>
          </template>
        </vxe-grid>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" plain class="button-sty" @click="dialogClose">
          <i class="el-icon-close el-icon"></i>
          {{ $t2('取 消', 'system.button.cancel2') }}
        </el-button>
        <el-button type="primary" @click="dialogClose" class="button-sty">
          <i class="el-icon-check el-icon"></i>
          {{ $t2('确 定', 'system.button.confirm2') }}
        </el-button>
      </span>
    </el-dialog>
    <el-image-viewer
      v-if="showViewer"
      :on-close="
        () => {
          showViewer = false;
        }
      "
      :initial-index="chooseIndex"
      :url-list="imageDTOs"
    />
  </div>
</template>

<script>

import mixins from './mixins/fileHistoryDialogMixins';

export default {
  mixins: [mixins]
}
</script>
