<template>
  <el-dialog
    :title="title"
    :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-uploadannex"
    width="1200px"
    @close="dialogClose"
    v-el-drag-dialog
    v-el-dialog-center
  >
    <div id="containt">
      <div class="detail-wrap" style="height: 450px;padding: 10px 10px;">
        <baseUpload v-if="showUpload" v-bind="option" :file.sync="checkRows" :edit="isEdit"></baseUpload>
      </div>
    </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>
				{{ $t1('取 消') }}
			</el-button>
			<el-button type="primary" @click="dialogPrimary" class="button-sty">
				<i class="el-icon-check el-icon"></i>
				{{ $t1('确 定') }}
			</el-button>
		</span>
  </el-dialog>
</template>

<script>
import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';

export default {
  name: 'areaDialog',
  props: ['visiable', 'multi', 'rows', 'param'],
  mixins: [selectDialogMixins],
  created() {
    this.initSetting();
    this.checkRows = this.$baseLodash.cloneDeep(this.rows || [])
    Object.assign(this.option, this.param);
    this.showUpload = true;
    this.isEdit = this.$attrs.isEdit || false;
  },
  mounted() {

  },
  computed: {
    title() {
      return this.$attrs.title || this.$t1('附件上传');
    }
  },
  data() {
    var that = this;
    return {
      showDialog: true,
      falseValue: false,
      selectMulti: true,
      formData: {},
      vxeOption: {},
      option: {
        accept: "file",
        multi: true
      },
      showUpload: false,
      isEdit: false,
    };
  },
  methods: {}
};
</script>
