<template>
  <el-dialog
    :title="$t1('提交内容')"
    :visible.sync="showDialog"
    :modal-append-to-body="false"
    :close-on-click-modal="false"
    :modal="false"
    custom-class="dialog-style wf-dialog"
    v-el-drag-dialog
    v-el-dialog-center
    @close="closeDialog"
  >
    <el-form ref="editForm" :model="formData">
      <div id="containt">
        <table class="table-detail">
          <tbody>
          <tr v-show="showTransactions">
            <th>{{ $t1('开启事务') }}</th>
            <td>
              <el-radio-group v-model="formData.transactions">
                <el-radio :label="1">{{ $t1('是') }}</el-radio>
                <el-radio :label="0">{{ $t1('否') }}</el-radio>
              </el-radio-group>
              <span class="tips" style="margin-left:24px"  v-show="showTransactions && !formData.transactions">
                 {{ $t1('注：当前脚本未开启事务') }}
              </span>
            </td>
          </tr>
          <tr>
            <th>
                <span class="t">
                  <em class="f-red">*</em>
                  {{ $t1('内容') }}
                </span>
            </th>
            <td>
              <el-form-item prop="logContent" :rules="[{ required:true, trigger: ['blur', 'change'] }]">
                <el-input type="textarea" :rows="8" :placeholder="$t1('请输入内容')"
                          v-model="formData.logContent"></el-input>
              </el-form-item>
            </td>
          </tr>
          </tbody>
        </table>
      </div>
    </el-form>
    <span slot="footer" class="dialog-footer">
          <el-button type="primary" plain class="button-sty" @click="closeDialog">
            <i class="el-icon-close el-icon"></i>
            {{ $t1('取 消') }}
          </el-button>
          <el-button type="primary" @click="confirmDialog" class="button-sty">
            <i class="el-icon-check el-icon"></i>
            {{ $t1('确 定') }}
          </el-button>
        </span>
  </el-dialog>
</template>
<script>
import mixin from "./mixins/preformDialog";

export default {
  name: 'preformDialog',
  mixins: [mixin]
}
</script>
<style scoped>

</style>
