<template>
  <div class="plan-executor-form">
    <el-tabs tab-position="left" class="demo-tabs" :model-value="currentRow.data.userType">
      <el-tab-pane label="选择班组" :name="2">
        <choose-task-team :currentRow="currentRow" :defaultProps="defaultProps" @OK="getSelectWorkMember"
          @close="$emits('update:showChoosePeople', false)"></choose-task-team>
      </el-tab-pane>
      <el-tab-pane label="选择人员" :name="1">
        <choose-task-people :currentRow="currentRow" :defaultProps="defaultProps" @OK="getSelectWorkMember"
          @close="$emits('update:showChoosePeople', false)"></choose-task-people>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script setup>
import chooseTaskPeople from "@/Components/taskCenter/taskSet/chooseTaskPeopleCom.vue";
import chooseTaskTeam from "@/Components/taskCenter/taskSet/chooseTaskTeamCom.vue";
const props = defineProps({
  defaultProps: {
    type: Object,
    default: {
      buttonId: "",
      planId: null,
    },
  },
  currentRow: {
    type: Object,
    default: () => { },
  },
  showChoosePeople: Boolean,
});
const $emits = defineEmits(["OK", "update:showChoosePeople"]);
const getSelectWorkMember = (obj) => {
  console.log(obj);
  $emits("OK", obj);
  $emits("update:showChoosePeople", false);
};
</script>

<script>
export default {
  name: "planExecutorForm",
};
</script>
<style scoped>
.el-tabs--right .el-tabs__content,
.el-tabs--left .el-tabs__content {
  height: 100%;
}
</style>
