<el-main>
  <!--面包屑-->
  <breadcrumb-component></breadcrumb-component>

  <!--下面是搜索条件-->
  <el-form label-position="right" class="simple-search-form-outline" inline :model="searchForm" ref="searchForm">

    <el-form-item label="所属数据库" prop="databaseId" :rules="[{ required: true, message: '所属数据库不能为空', trigger: 'change'  }]">
      <el-select v-model="searchForm.databaseId" placeholder="请选择" clearable filterable>
        <el-option
          v-for="item in databaseOptions"
          :key="item.id"
          :label="item.resourceName"
          :value="item.id">
        </el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="目标数据库" prop="objectDatabase" :rules="[{ required: true, message: '目标数据库不能为空', trigger: 'change'  }]">
      <el-select v-model="searchForm.objectDatabase" placeholder="请选择" clearable filterable>
        <el-option
          v-for="item in objectDatabaseOptions"
          :key="item.id"
          :label="item.resourceName"
          :value="item.id">
        </el-option>
      </el-select>
    </el-form-item>

  </el-form>

  <!--主列表数据-->
  <div class="table-container">
    <div class="button-container">
      <div>
        <el-button type="primary" @click="getList">扫描源表</el-button>
      </div>
    </div>
    <el-form class="simple-search-form-outline" inline >
      <el-form-item label="表名">
        <el-input placeholder="请输入" maxlength="64" v-model="resourceName" ></el-input>
      </el-form-item>
      <el-form-item label="">
        <el-button type="primary" @click="getFilterList">搜索</el-button>
      </el-form-item>
    </el-form>
    <div class="table-container">
    <table-component @search="search" :tableOption="tableOption" :tableData="tableData" :pageParam="pageParam"
                     @action="action" @selectChange="selectChange" ref="table"></table-component>
    </div>
  </div>

    <div class="button-container-left">
      <el-button type="primary" @click="add">确定</el-button>
      <el-button   @click="go('MetaData')">取消并返回</el-button>
    </div>

</el-main>
