<template>
  <div>
    <div class="pop-box">
      <div>
        <div class="header-box">
          <i class="back el-icon-close" @click="dialogClose"></i>
          {{ $t2('修改候选人', 'components.wf.setCandidateTitle') }}<span>—</span>
          <b class="f-red">{{ $t2('节点', 'components.wf.node') }}：{{ wfInfo.taskName }}</b>
        </div>
        <div class="flex">
          <div class="checkbox-all_list">
            <div v-for="(row,rowIndex) in page.records" :key="rowIndex" class="order-item">
              <div class="t1">
                <i class="icon"></i>
                <span>候选人：{{ getUsernames(row) }}</span>
              </div>
              <div class="t2">
                <p>节点名称：{{ row.nodeName }}</p>
              </div>
              <div class="btns">
                <el-button type="primary" plain class="btn" @click="openUserDialig(row, rowIndex)" icon="el-icon-edit">
                  设置候选人
                </el-button>
              </div>
            </div>
          </div>
        </div>
        <div class="fixed-bottom-btns">
          <el-button type="primary" plain class="btn" @click="dialogClose" icon="el-icon-close">取 消</el-button>
          <el-button type="primary" class="btn" @click="dialogClose" icon="el-icon-check">确 定</el-button>
        </div>
      </div>
    </div>
    <user-dialog v-if="showUserDialog" :visiable.sync="showUserDialog" @close="showUserDialog = false"
                 @confirm="userConfirm" multi="true" :rows="userRows"></user-dialog>
  </div>
</template>

<script>
import selectDialogMixins from '../../../mixins/mobile/selectDialog/index.js';
import mixin from './mixins/setCandidateDialogMixin';
import userDialog from "../../../views/mobile/user/user/dialog.vue";

export default {
  mixins: [selectDialogMixins, mixin],
  components: {userDialog}
};
</script>
