<template>
  <div>
    <el-dialog
      :title="$t2('流程启动', 'components.wf.wfStart')"
      :visible.sync="showDialog"
      v-if="showDialog"
      :modal-append-to-body="false"
      @close="close"
      custom-class="dialog-style wf-dialog"
      v-el-drag-dialog
    >
      <el-form :model="wfStartForm">
        <div id="containt">
          <table class="table-detail">
            <tbody>
              <tr>
                <th>
                  <span class="t">
                    <em class="f-red">*</em>
                    {{ $t2("流程", "components.wf.flow") }}
                  </span>
                </th>
                <td>
                  <el-form-item field="modelId" label-width="120">
                    <el-radio-group v-model="wfStartForm.modelId">
                      <el-radio
                        v-for="(wfDefItem, index) in wfDefItems"
                        :label="wfDefItem.modelId"
                        :key="index"
                      >
                        {{ wfDefItem.modelName }}
                      </el-radio>
                    </el-radio-group>
                  </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="showDialog = false">
          <i class="el-icon-close el-icon"></i>
          {{ $t2("取 消", "system.button.cancel2") }}
        </el-button>
        <el-button type="primary" @click="startSubmit()" class="button-sty">
          <i class="el-icon-check el-icon"></i>
          {{ $t2("确 定", "system.button.confirm2") }}
        </el-button>
      </span>
    </el-dialog>
    <setCandidateDialog2
      v-if="showSetCandidateDialog2"
      :visiable.sync="showSetCandidateDialog2"
      :current_prefix="current_prefix"
      :rows="preStartResult"
      :modelId="startFormData.modelId"
      :objTypeCode="code"
      @confirm="confirmSetCandidateDialog"
    ></setCandidateDialog2>
  </div>
</template>

<script>
import { wfStartMixin } from "./wf.js";
// import setCandidateDialog2 from './setCandidateDialog2';
export default {
  mixins: [wfStartMixin],
  components: {
    setCandidateDialog2: () => import("./setCandidateDialog2.vue"),
  },
};
</script>
