xieb
2025-01-21 d13cebe7fbadd396e91a989af331df8a8e7b40f8
src/views/evaluate/components/IndividualTaskPublic.vue
@@ -1,7 +1,7 @@
<template>
    <el-dialog v-model="params.visible" :title="`发布评优任务(${params.data?.taskName || ''})`" width="65%" @open="openDialog"
        @close="dialogClose">
        <div class="content">
        @close="dialogClose" destroy-on-close>
        <div class="content" v-loading="isLoading" element-loading-text="数据加载中,请稍后。。。">
            <el-form :model="form" ref="formRef" :rules="rules" label-position="top">
                <el-form-item prop="categoryEntities">
                    <template #label>
@@ -66,7 +66,7 @@
        </div>
        <template #footer>
            <el-button @click="() => params.visible = false">取消</el-button>
            <el-button type="primary" @click="taskPublic">确认发布</el-button>
            <el-button type="primary" @click="taskPublic" :loading="isLoading">确认发布</el-button>
        </template>
        <!-- 查看第一轮候选结果 -->
        <candidateResult :params="candidateResultParams" />
@@ -104,11 +104,12 @@
    },
    data() {
        return {
            isLoading: true,
            employeeDict: [],
            form: {
                categoryEntities: [],
                pollingPersons: [],
                isSelfDept: '',
                isSelfDept: 1,
                votePersonObjInfo: [],
                evaluateCutoffTimeStart: '',
                evaluateCutoffTimeEnd: ''
@@ -147,7 +148,11 @@
                console.log(this.params.data.pollingPersons);
                const pollingPersons = this.params.data.pollingPersons
                this.form.pollingPersons = pollingPersons !== "0" ? pollingPersons.split(',') : []
                this.form.votePersonObjInfo = JSON.parse(this.params.data.votePersonObjInfo) || []
                if (typeof this.params.data.votePersonObjInfo === 'object') {
                    this.form.votePersonObjInfo = []
                } else {
                    this.form.votePersonObjInfo = JSON.parse(this.params.data.votePersonObjInfo) || []
                }
                this.form.evaluateCutoffTimeStart = this.params.data.evaluateCutoffTimeStart || ''
                this.form.evaluateCutoffTimeEnd = this.params.data.evaluateCutoffTimeEnd || ''
            },
@@ -166,6 +171,7 @@
                const { code, data: { records } } = ecResult.data
                if (code !== 200) return this.$message.error('评优类别加载失败')
                this.form.categoryEntities = records
                this.isLoading = false
            })
        },
        initDict() {