<template>
  <dialog-edit :visible.sync="dialogVisible" :editModel="'V'" :form="form" :footerBtnShow="false" :title="$t('traceMgr.inputAgainAllocationReason')" :width="'30%'"  :close-on-click-modal="false" center>
    <el-input
            type="textarea"
            :placeholder="$t('common.MultilineInput')"
            v-model="textarea"
            maxlength="256"
            :rows="5"
    >
    </el-input>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" size="medium" @click="complete">{{$t('common.save')}}</el-button>
      <el-button type="button" size="medium" @click="dialogVisible = false">{{$t('traceMgr.pageClose')}}</el-button>
    </div>

  </dialog-edit>
</template>
<script>
import BasePage from '@/pages/basePage'
import mixin from '@/pages/mixin'
import { DialogEdit } from 'newepoch-components'
export default {
  extends: new BasePage(),
  name: 'inputReDistributionResionDialog',
  mixins: [mixin],
  components: {
    DialogEdit
  },
  props: {
    visible: {
      type: Boolean
    },
    form: {
      type: Object
    }
  },
  data: function () {
    return {
      // 履历弹框是否显示
      textarea: ''

    }
  },
  computed: {
    dialogVisible: {
      get: function () {
        return this.visible
      },
      set: function (val) {
        this.$emit('update:visible', val)
      }
    }
  },
  methods: {
    complete: function () {
      this.$emit('transfer', this.textarea)
      this.dialogVisible = false
    },
    setTextarea: function (val) {
          this.textarea = val
        }
  }
}
</script>
