| | |
| | | <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> |
| | |
| | | </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" /> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isLoading: true, |
| | | employeeDict: [], |
| | | form: { |
| | | categoryEntities: [], |
| | | pollingPersons: [], |
| | | isSelfDept: '', |
| | | isSelfDept: 1, |
| | | votePersonObjInfo: [], |
| | | evaluateCutoffTimeStart: '', |
| | | evaluateCutoffTimeEnd: '' |
| | |
| | | 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 || '' |
| | | }, |
| | |
| | | const { code, data: { records } } = ecResult.data |
| | | if (code !== 200) return this.$message.error('评优类别加载失败') |
| | | this.form.categoryEntities = records |
| | | this.isLoading = false |
| | | }) |
| | | }, |
| | | initDict() { |