<template>
  <div class="detail-wrap">
    <el-form ref="editForm" :model="bdAttachSetting">
      <div class="d-header clearfix">
        <div class="fl">
          <i class="el-icon-info"/>
          {{ dataId ? $t1('查看导入模板文件') : $t1('新增导入模板文件') }}
        </div>
        <div class="fr">
          <el-form>
            <el-button type="primary" plain class="button-sty" @click="$baseReload()" icon="el-icon-refresh-right">
              {{ $t1('重置') }}
            </el-button>
            <el-button type="primary" class="button-sty" icon="el-icon-check" @click="saveData">{{ $t1('保存') }}
            </el-button>
          </el-form>
        </div>
      </div>
      <div class="d-cont">
        <div class="d-item">
          <div class="title first"><b>{{ $t1('基本信息') }}</b></div>
          <table class="table-detail">
            <tbody>
            <tr>
              <th>
                <em class="f-red">*</em>
                {{ $t1('模板文件名称') }}
              </th>
              <td colspan="3">
                <el-form-item prop="name" :rules="[{ required: true, trigger: 'blur' }]">
                  <el-input type="text" autocomplete="off" v-model="bdAttachSetting.name" clearable/>
                </el-form-item>
              </td>
            </tr>
            <tr>
              <th>
                <em class="f-red">*</em>
                {{ $t1('模板文件编码') }}
              </th>
              <td colspan="3">
                <el-form-item prop="code" :rules="[{ required: true, trigger: 'blur' }]">
                  <el-input type="text" autocomplete="off" v-model="bdAttachSetting.code" clearable/>
                </el-form-item>
              </td>
            </tr>
<!--            <tr>
              <th>
                <em class="f-red">*</em>
                {{ $t1('表单分类') }}
              </th>
              <td colspan="3">
                <el-form-item prop="menuKindName"
                              :rules="[{
                                  required:true,
                                  trigger: ['blur', 'change']
                                }]">
                  <el-input
                    class="search-input"
                    max="200"
                    v-model="bdAttachSetting.menuKindName"
                    @clear="
                        bdAttachSetting.menuKindCode = '';
                        $forceUpdate();
                      "
                    v-el-readonly
                    clearable
                  >
                    <i slot="suffix" class="el-input__icon el-icon-search" @click="showMenuKindDialog = true"></i>
                  </el-input>
                </el-form-item>
              </td>
            </tr>-->
            <tr>
              <th>{{ $t1('备注') }}</th>
              <td colspan="5">
                <el-input type="textarea" :rows="2" :placeholder="$t1('请输入内容')" size="small"
                          v-model="bdAttachSetting.remark"
                          clearable></el-input>
              </td>
            </tr>
            <tr>
              <th>{{ $t1('模板文件') }}</th>
              <td>
                <baseUpload
                  :limit="1"
                  accept=".xlsx, .xls"
                  multi="false"
                  :file.sync="bdAttachSetting.url"
                  dataType="url"
                ></baseUpload>
              </td>
            </tr>
            <tr>
              <th>{{ $t1('创建人') }}</th>
              <td>{{ bdAttachSetting.createBy }}</td>
              <th>{{ $t1('创建时间') }}</th>
              <td>{{ bdAttachSetting.createDate }}</td>
              <th>{{ $t1('更新人') }}</th>
              <td>{{ bdAttachSetting.modifyBy }}</td>
              <th>{{ $t1('更新时间') }}</th>
              <td>{{ bdAttachSetting.modifyDate }}</td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
    </el-form>
<!--    <MenuKindDialog v-if="showMenuKindDialog"
                    :visiable.sync="showMenuKindDialog"
                    @confirm="confirmInsertMenuKind"
                    :multi="false"
    />-->
  </div>
</template>

<script>
import mixin from "./mixins/edit";

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