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

  <el-container class="detail-container">

    <el-form label-width="200px" label-position="right" class="create-form-outline-full-screen "  :class="readonly?'readonly':''"    :model="tableInfo"    ref="tableInfo" >

      <!--<el-form-item label="表名称" prop="tableName"  :rules="[{ required: true, message: '表名称不能为空', trigger: 'blur'  }]">-->
        <!--<el-input  :disabled="readonly"  v-model="tableInfo.tableName" placeholder="请输入"></el-input>-->
      <!--</el-form-item>-->
      <el-form-item label="表中文名"  prop="tableComment" :rules="[{ required: true, message: '表中文名称不能为空', trigger: 'blur'  },{ max: 64, message: '字数不能超过64', trigger: 'change' }]">
        <el-input  class="normal-width "  :disabled="readonly"  v-model="tableInfo.tableComment" placeholder="请输入"></el-input>
      </el-form-item>

      <el-form-item label="表所属数据库" prop="databaseId"  :rules="[{ required: true, message: '表所属数据库不能为空', trigger: 'blur'  }]">
        <el-select  class="normal-width "  v-model="tableInfo.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="DDL语句" prop="ddl" :rules="[{ required: true, message: 'DDL语句不能为空', trigger: 'blur'},{ max: 2000, message: '字数不能超过2000', trigger: 'change' }]">
        <el-input  class="normal-width "  :disabled="readonly" :rows="8" type="textarea" v-model="tableInfo.ddl" placeholder="请输入"></el-input>
        <div class="textarea-count normal-width">{{tableInfo.ddl.length}}/2000</div>
        <div  class="form-weak-alert normal-width">DDL语句必须按照“CREATE TABLE TABLENAME”方式定义，不支持定义外部表等；且语句尽量大写字符编写</div>
      </el-form-item>



      <el-form-item>
          <el-button type="primary" @click="add"  v-show="dialogState==0"  >确定</el-button>
          <el-button   @click="goBack">取消并返回</el-button>
      </el-form-item>

    </el-form>
  </el-container>
</el-main>








