<template>
  <div>
<!--    <el-form-item :label="i18nt('实体表')">
      <el-input
        class="search-input"
        max="200"
        v-model="optionModel.entityTableDesc"
        @clear="
          optionModel.entityTableCode = null;
          $forceUpdate();
        "

        clearable
      >
        <i slot="suffix" class="el-input__icon el-icon-search" @click="showDialog = true"></i>
      </el-input>
    </el-form-item>-->
<!--    <el-form-item :label="i18nt('实体表编码')">
      <el-input v-model="optionModel.entityTableCode" clearable></el-input>
    </el-form-item>
    <tableModelDialog
      v-if="showDialog"
      :visiable.sync="showDialog"
      @confirm="confirmDialog"
      multi="false"
      :param="{ reportCode: reportTemplate.reportCode }"
    />-->
  </div>
</template>

<script>
import i18n from '../../../../../components/xform/utils/i18n';


export default {
  name: 'entityTableCode-editor',
  mixins: [i18n],
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object,
    dataSourceList: Array
  },
  components: {
    /*tableModelDialog*/
  },
  inject: ['getReportTemplate'],
  computed: {
    reportTemplate: function () {
      return this.getReportTemplate();
    }
  },
  data() {
    return {
      showDialog: false
    };
  },
  methods: {
    confirmDialog(rows) {
      if (rows.length) {
        let row = rows[0];
        this.optionModel.accessName = row.accessName;
        this.optionModel.accessCode = row.accessCode;

        this.$set(this.optionModel, "entityTableDesc", row.taCh);
        this.$set(this.optionModel, "entityTableCode", row.taCode);
      }
    }
  }
};
</script>

<style scoped></style>
