GuLiMmo
2024-01-12 95436ce0cc5d8c7713a4ab1256921104463a8d8c
人员设置
2 files modified
1 files added
93 ■■■■■ changed files
src/views/evaluate/components/IndividualTaskPublic.vue 17 ●●●● patch | view | raw | blame | history
src/views/evaluate/components/selectionDialog.vue 74 ●●●●● patch | view | raw | blame | history
src/views/evaluate/evaluateTask.vue 2 ●●● patch | view | raw | blame | history
src/views/evaluate/components/IndividualTaskPublic.vue
@@ -36,7 +36,9 @@
                    <el-checkbox-group v-model="form.pollingPersons">
                        <el-checkbox v-for="item in employeeDict" :key="item.id" :label="item.dictKey">
                            {{ item.dictValue }}
                            <el-button type="primary" icon="el-icon-edit" text @click="selectionHandler(item)">设置人员</el-button>
                        </el-checkbox>
                    </el-checkbox-group>
                </el-form-item>
                <el-form-item label="第二轮任务结束时间" required>
@@ -60,6 +62,8 @@
        <candidateResult :params="candidateResultParams" />
        <!-- 添加评优种类候选人 -->
        <addEcCandidate :params="addEcCandidateParams" />
        <!-- 人员选择 -->
        <selectionDialog :params="selectionParams"  />
    </el-dialog>
</template>
@@ -69,11 +73,13 @@
import { update, getEcList } from '@/api/evaluate/evaluateTask'
import addEcCandidate from './addEcCandidate.vue';
import candidateResult from './candidateResult.vue';
import selectionDialog from './selectionDialog.vue';
export default {
    components: {
        addEcCandidate,
        candidateResult
        candidateResult,
        selectionDialog
    },
    props: {
        params: {
@@ -115,7 +121,8 @@
                total: 0
            },
            addEcCandidateParams: {},
            candidateResultParams: {}
            candidateResultParams: {},
            selectionParams: {}
        }
    },
    methods: {
@@ -169,6 +176,12 @@
                visible: true,
                data: this.params.data
            }
        },
        selectionHandler(row) {
            this.selectionParams = {
                visible: true,
                data: row
            }
        }
    }
};
src/views/evaluate/components/selectionDialog.vue
New file
@@ -0,0 +1,74 @@
<template>
    <el-dialog v-model="params.visible" :title="params.data.dictValue || '人员选择'" @close="dialogClose">
        <div class="container">
            <el-transfer v-model="value" :data="data" filterable filter-placeholder="请输入人员姓名"
                :titles="['参与投票人员', '不参与投票人员']" />
        </div>
        <template #footer>
            <el-button @click="params.visible = false">取消</el-button>
            <el-button type="primary">确认选择</el-button>
        </template>
    </el-dialog>
</template>
<script>
export default {
    props: {
        params: {
            type: Object,
            default: () => {
                return {
                    visible: false,
                    data: {}
                }
            }
        }
    },
    data() {
        return {
            value: [],
            data: [
                {
                    label: '张三',
                    key: '1'
                },
                {
                    label: '李四',
                    key: '2'
                },
                {
                    label: '王五',
                    key: '3'
                },
                {
                    label: '赵六',
                    key: '4'
                },
                {
                    label: '刘七',
                    key: '5'
                }
            ]
        }
    },
    methods: {
        dialogClose() {
            this.value = []
        }
    },
}
</script>
<style lang="scss" scoped>
.container {
    display: flex;
    justify-content: center;
    align-items: center;
}
:deep() {
    .el-transfer-panel {
        width: 250px;
    }
}
</style>
src/views/evaluate/evaluateTask.vue
@@ -32,7 +32,7 @@
          @click="viewVotingDetailsHandlerClick(row)">投票详情</el-button>
        <el-button type="primary" text plain icon="el-icon-position"
          v-if="!row.type && row.candidateState === 2 && !row.evaluateState" @click="taskPublicDialog(row)">发布</el-button>
        <el-button type="success" v-if="row.candidateState === 0" text plain icon="el-icon-edit"
        <el-button type="success" v-if="(row.candidateState === 0 && !row.type) || (row.evaluateState === 0 && row.type)" text plain icon="el-icon-edit"
          @click="editTaskDialog(row)">编辑</el-button>
        <el-button type="danger" text plain icon="el-icon-delete" @click="rowDel(row)">删除</el-button>
      </template>