| | |
| | | <template> |
| | | <el-dialog v-model="props.params.visible" :title="`${taskParams.evaluateTaskName}-候选人列表`" width="60%" destroy-on-close |
| | | <el-dialog v-model="props.params.visible" :title="`${taskParams.evaluateTaskName}-${curType ? '部门列表' : '候选人列表'}`" width="60%" destroy-on-close |
| | | align-center> |
| | | <avue-crud :data="table.data" :option="candidatesOptions" v-model:page="table.page" @refresh-change="refreshChange"> |
| | | <avue-crud :data="table.data" :option="option" v-model:page="table.page" @refresh-change="refreshChange"> |
| | | <template #menu-left> |
| | | <el-button type="primary" icon="el-icon-plus" @click="addCandidateDialog">新增候选人</el-button> |
| | | <el-button type="primary" icon="el-icon-plus" @click="addCandidateDialog"> |
| | | {{ curType? '添加部门' : '添加候选人' }} |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ row }"> |
| | | <el-button type="primary" icon="el-icon-plus" text plain @click="addAssessor(row)">添加评定人</el-button> |
| | |
| | | <script setup> |
| | | import addCandidate from './addCandidate.vue'; |
| | | import addAssessors from './addAssessors.vue'; |
| | | import { markRaw, reactive, watch } from 'vue'; |
| | | import { computed, inject, markRaw, reactive, watch } from 'vue'; |
| | | import { getCandidateList, removeCandidate } from '@/api/evaluate/evaluateTask' |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | |
| | | visible: false, |
| | | taskParams: {} |
| | | }) |
| | | |
| | | const type = inject('type') |
| | | |
| | | const props = defineProps({ |
| | | params: { |
| | |
| | | ] |
| | | }) |
| | | |
| | | const setcionOptions = markRaw({ |
| | | height: '400', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: false, |
| | | dialogClickModal: false, |
| | | menuFixed: 'right', |
| | | labelWidth: '70', |
| | | column: [ |
| | | { |
| | | label: '任务id', |
| | | prop: 'evaluateTaskId', |
| | | type: 'input', |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: '任务名称', |
| | | prop: 'evaluateTaskName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门id', |
| | | prop: 'deptId', |
| | | type: 'input', |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: '部门名称', |
| | | prop: 'deptName', |
| | | type: 'input' |
| | | }, |
| | | ] |
| | | }) |
| | | |
| | | const option = computed(() => type() ? setcionOptions : candidatesOptions) |
| | | |
| | | const table = reactive({ |
| | | data: [], |
| | | page: { |
| | |
| | | candidateInfo: {} |
| | | }) |
| | | |
| | | const curType = computed(() => type()) |
| | | |
| | | const addAssessor = (row) => { |
| | | dialogAssessorParams.visible = true |
| | | dialogAssessorParams.taskInfo = taskParams |