<template>
  <app-dialog v-model="visible" :loading="resultLoading" :title="title" append-to-body class="detail-dialog"
              hide-footer width="60%"
  >
    <div class="page-view flex-1 ml-15 h-100">
      <el-form ref="form" :model="form" :rules="rules" class="demo-form ml-150 mr-150" label-width="120px">
        <el-divider content-position="left"><i class="el-icon-document" style="color: rgb(24, 144, 255)" /><span
          class="divider-top"
        >路线信息</span>
        </el-divider>
        <div class="form-content ml-120">
          <el-row :gutter="20">
            <app-filter-item :span="13" label="资源项名称" prop="name">
              <el-input v-model="form.name" clearable placeholder="请输入" />
            </app-filter-item>
            <app-filter-item :span="13" label="资源项编码" prop="code">
              <el-input v-model="form.code" v-pinyin="form.name" clearable placeholder="请输入" />
            </app-filter-item>
          </el-row>

          <el-row :gutter="20">
            <app-filter-item :span="13" label="数据库表名" prop="tableNameEn">
              <el-input v-model="form.tableNameEn" clearable placeholder="请输入" />
            </app-filter-item>
          </el-row>
          <el-row :gutter="20" type="flex">
            <app-filter-item :span="20" label="实体表描述" prop="tableDesc">
              <el-input v-model="form.tableDesc" :rows="4" clearable placeholder="请输入" type="textarea" />
            </app-filter-item>
          </el-row>
        </div>
      </el-form>
    </div>
    <div ref="dialogFooter" slot="footer" class="gz-dialog-footer text-r" style="margin-top: 10px">
      <el-button :loading="resultLoading" class="confirm_btn"
                 type="primary" @click="handleSubmitAdd"
      >确
      定
      </el-button>
      <el-button class="cancel_btn" @click="onCancel">取 消</el-button>
    </div>
  </app-dialog>
</template>

<script>
import dialogMixin from '@/mixins/dialog.js';
import tableMixin from '@/mixins/table.js';

export default {
  name: 'ResultDialog',
  mixins: [dialogMixin, tableMixin],
  props: {
    title: {
      type: String,
      default: '',
    },
  },
  data() {
    return {
      form: {},
      rules: {},
      resultLoading: false,
    };
  },
  methods: {
    initData(data) {
      console.log(data);
    },
    handleSubmitAdd() {
      this.visible = false;
    },
    onCancel() {
      this.visible = false;
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
