<template>
  <el-form ref="basicInfoForm" :model="info" :rules="rules" label-width="150px">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="表名称" prop="tableName">
          <el-input v-model="info.tableName" placeholder="请输入表名称" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="实际数据库表" prop="realTableName">
          <el-input v-model="info.realTableName" placeholder="请输入实际数据库表" />
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="表描述" prop="tableComment">
          <el-input v-model="info.tableComment" placeholder="请输入表描述" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="是否菜单" >
          <el-radio-group v-model="info.isMenu">
            <el-radio label="Y">是</el-radio>
            <el-radio label="N">否</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="菜单权限" prop="menuRole">
          <el-input v-model="info.menuRole" placeholder="请输入菜单权限" />
        </el-form-item>
      </el-col>
      <el-col :span="12" >
        <el-form-item label="新增程序" prop="triggerCreate">
          <el-input v-model="info.triggerCreate" placeholder="请输入新增程序" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="检索程序" prop="triggerRetrieve">
          <el-input v-model="info.triggerRetrieve" placeholder="请输入检索程序" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="修改程序" prop="triggerUpdate">
          <el-input v-model="info.triggerUpdate" placeholder="请输入修改程序" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="删除程序" prop="triggerDelete">
          <el-input v-model="info.triggerDelete" placeholder="请输入删除程序" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="提交程序" prop="triggerSubmit">
          <el-input v-model="info.triggerSubmit" placeholder="请输入提交程序" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="过滤条件" prop="filterConditions">
          <el-input v-model="info.filterConditions" placeholder="请输入过滤条件" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item   label="显示字段" prop="dkColumn">
          <el-input  :disabled="true" :value="info.dkColumnName" placeholder="请输入显示字段" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="输入字段" prop="akColumn">
          <el-input :disabled="true" :value="info.akColumnName" placeholder="请输入输入字段" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item   label="主键" prop="tablePrimaryKeyName">
          <el-input :disabled="true" :value="info.tablePrimaryKeyName" placeholder="请输入主键" maxlength="50" />
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="扩展属性" prop="extendedAttributes">
            <el-input v-model="info.extendedAttributes" type="textarea" placeholder="请输入内容"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item  label="备注" prop="remark">
            <el-input v-model="info.remark" type="textarea" placeholder="请输入内容"></el-input>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>
<script>
export default {
  name: "BasicInfoForm",
  props: {
    info: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      rules: {
        tableName: [
          { required: true, message: "表名称不能为空", trigger: "blur" }
        ],
        tableComment: [
          { required: true, message: "表描述不能为空", trigger: "blur" }
        ],
        menuRole: [
          { required: true, message: "菜单权限不能为空", trigger: "blur" }
        ]
      }
    };
  }
};
</script>
