| | |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menuFixed: 'right', |
| | |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection: true, |
| | | dialogClickModal: false, |
| | | menuFixed: 'right', |
| | |
| | | <template #assessmentPerson="{ row }"> |
| | | <popoverTable :params="{...row, type: defaultTaskType}"> |
| | | <template #content> |
| | | xxxx |
| | | <el-button type="success" text size="small" icon="el-icon-pointer">考核人预览</el-button> |
| | | </template> |
| | | </popoverTable> |
| | | </template> |
| | |
| | | <template> |
| | | <el-popover placement="top-end" :title="!params.type ? '个人考核权重' : '部门考核权重'" :width="700" height="400" @show="popoverShow" @hide="popoverHide" trigger="hover"> |
| | | <!-- !params.type ? '个人考核权重' : '部门考核权重' --> |
| | | <el-popover placement="top-end" title="考核人预览" :width="700" height="400" @show="popoverShow" @hide="popoverHide" trigger="hover"> |
| | | <template v-if="visible"> |
| | | <avue-crud :option="option" v-model:defaults="defaults" v-model:search="search" v-model:page="page" |
| | | v-model="form" :table-loading="loading" :data="data" ref="crud" @selection-change="selectionChange" |
| | |
| | | label: "评分范围", |
| | | prop: "rangeVal", |
| | | type: "input", |
| | | hide: true, |
| | | placeholder: '评分范围(100分制)±N', |
| | | rules: [ |
| | | { |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { reactive, watch } from 'vue'; |
| | | import { reactive, watch, getCurrentInstance, ref } from 'vue'; |
| | | import { |
| | | getCandidateList, |
| | | getFinallyResult |
| | | } from '@/api/evaluate/evaluateTask' |
| | | |
| | | const { findObject } = getCurrentInstance().appContext.config.globalProperties; |
| | | |
| | | |
| | | const props = defineProps({ |
| | | params: { |
| | |
| | | total: 0 |
| | | }) |
| | | |
| | | const taskDateil = reactive([ |
| | | const taskDateil = ref(null) |
| | | |
| | | const personOption = reactive([ |
| | | { |
| | | title: '任务名称', |
| | | prop: 'taskName', |
| | |
| | | menuLeft: false, |
| | | header: false, |
| | | menuFixed: 'right', |
| | | column: [ |
| | | { |
| | | label: '评优项目', |
| | | prop: 'evaluateTaskName', |
| | | type: 'input', |
| | | }, |
| | | // { |
| | | // label: '任务类别', |
| | | // prop: '', |
| | | // type: 'input', |
| | | // }, |
| | | { |
| | | label: '候选人', |
| | | prop: 'userName', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'deptName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | } |
| | | ] |
| | | column: [{ |
| | | label: '评优项目', |
| | | prop: 'evaluateTaskName', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '候选人', |
| | | prop: 'userName', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'deptName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }], |
| | | } |
| | | } |
| | | ]) |
| | | |
| | | const sectionOption = reactive([ |
| | | { |
| | | title: '任务名称', |
| | | prop: 'taskName', |
| | | value: '', |
| | | width: 'calc(100% / 3)' |
| | | }, |
| | | { |
| | | title: '任务类别', |
| | | prop: 'taskType', |
| | | value: '', |
| | | width: 'calc(100% / 3)' |
| | | }, |
| | | { |
| | | title: '评定标准', |
| | | prop: 'remark', |
| | | value: '', |
| | | width: 'calc(100% / 3)' |
| | | }, |
| | | { |
| | | title: '候选人截止日期', |
| | | prop: 'candidateCutoffTime', |
| | | value: '', |
| | | width: '50%' |
| | | }, |
| | | { |
| | | title: '评优截止日期', |
| | | prop: 'evaluateCutoffTime', |
| | | value: '', |
| | | width: '50%' |
| | | }, |
| | | { |
| | | title: '评优评先状态', |
| | | prop: 'evaluateState', |
| | | value: '', |
| | | width: '100%' |
| | | }, |
| | | { |
| | | title: '候选结果', |
| | | prop: 'candidateResult', |
| | | value: '', |
| | | width: '100%' |
| | | }, |
| | | { |
| | | title: '最终评定结果', |
| | | prop: 'finallyResult', |
| | | isSlot: true, |
| | | width: '100%', |
| | | data: [], |
| | | option: { |
| | | height: 260, |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | border: true, |
| | | index: true, |
| | | dialogClickModal: false, |
| | | menu: false, |
| | | menuLeft: false, |
| | | header: false, |
| | | menuFixed: 'right', |
| | | column: [{ |
| | | label: '评优项目', |
| | | prop: 'evaluateTaskName', |
| | | type: 'input', |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'deptName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }], |
| | | } |
| | | } |
| | | ]) |
| | | |
| | | watch(() => props.params.visible, (val) => { |
| | | val && initData() |
| | | if (!val) return |
| | | taskDateil.value = !props.params.type ? personOption : sectionOption |
| | | initData() |
| | | }, { |
| | | deep: true |
| | | }) |
| | |
| | | } |
| | | |
| | | const getFinallyList = () => { |
| | | const { type } = props.params |
| | | const { id, evaluateNum } = props.params.data |
| | | const params = { |
| | | evaluateTaskId: id, |
| | | current: 1, |
| | | size: evaluateNum |
| | | size: evaluateNum, |
| | | type: !type ? 2 : 1 |
| | | } |
| | | return getFinallyResult(params).then(res => { |
| | | return res.data.data.records |
| | |
| | | 2: '已完成' |
| | | } |
| | | |
| | | for (const item of taskDateil) { |
| | | for (const item of taskDateil.value) { |
| | | item.value = data[item.prop] || '暂未完善' |
| | | |
| | | if (['candidateState', 'evaluateState'].includes(item.prop)) { |
| | |
| | | console.log(item.data); |
| | | } |
| | | } |
| | | |
| | | // 获取当前数据 |
| | | } |
| | | </script> |
| | | |
| | |
| | | background-color: aliceblue; |
| | | border-right: 1px solid #eeeded; |
| | | } |
| | | |
| | | .value { |
| | | white-space: pre-line; |
| | | } |
| | |
| | | </template> |
| | | <template #menu="{ size, row, index }"> |
| | | <el-button type="primary" text plain icon="el-icon-view" @click="viewDateilDialog(row)">详情</el-button> |
| | | <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)">编辑</el-button> |
| | | <!-- <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)">编辑</el-button> --> |
| | | <el-button type="primary" text plain icon="el-icon-position" @click="publicTimeBtn(row)" |
| | | v-if="row.candidateState === 2 && row.evaluateState === 0">发布</el-button> |
| | | <el-button type="primary" v-if="row.type === 0 && row.candidateState === 0" text plain icon="el-icon-plus" @click="addCandidateHandle(row)">新增候选人</el-button> |
| | | <!-- <el-button type="primary" text plain icon="el-icon-download">导出</el-button> --> |
| | | <el-button type="danger" text plain icon="el-icon-delete" @click="rowDel(row)">删除</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 发布弹窗 --> |
| | |
| | | viewDateilDialog(row) { |
| | | this.viewEvaluateDetailParams = { |
| | | visible: true, |
| | | type: this.defaultTaskType, |
| | | data: row |
| | | } |
| | | }, |