| | |
| | | <template> |
| | | <avue-crud v-model:page="page" :option="option" :table-loading="loading" :data="data" @current-change="currentChange" |
| | | @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template #menu="{row}"> |
| | | <template #menu="{ row }"> |
| | | <referrerPopover :params="{ userId: row.user_id, evaluateTaskId: params.data.id }"> |
| | | <el-button type="success" icon="el-icon-view" text>推荐人预览</el-button> |
| | | </referrerPopover> |
| | | </template> |
| | | <template #menu-left> |
| | | <!-- <el-button type="success" plain icon="el-icon-download" @click="handleExport">导出</el-button> --> |
| | | <el-button type="success" plain icon="el-icon-download" @click="handleExport">导出当前数据</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </template> |
| | |
| | | <script> |
| | | import referrerPopover from './referrerPopover.vue' |
| | | import { getCandidateResult } from '@/api/evaluate/evaluateTask' |
| | | import { exportBlob } from "@/api/common"; |
| | | import { downloadXls } from "@/utils/util"; |
| | | import { dateNow } from "@/utils/date"; |
| | | import NProgress from 'nprogress'; |
| | | import 'nprogress/nprogress.css'; |
| | | |
| | | export default { |
| | | components: { |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | viewBtn: false, |
| | | header: false, |
| | | header: true, |
| | | menuWidth: 150, |
| | | // menu: false, |
| | | dialogClickModal: false, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | handleExport() { |
| | | const { id } = this.params.data |
| | | const downloadUrl = `/evaluate/evaluateTaskReferrer/export/${id}`; |
| | | this.$confirm("是否导出数据?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | NProgress.start(); |
| | | exportBlob(downloadUrl, {}).then(res => { |
| | | downloadXls(res.data, `第一轮评优结果(${dateNow()}).xlsx`); |
| | | NProgress.done(); |
| | | }) |
| | | }); |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | |
| | | column: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | prop: 'userName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | prop: 'postName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | prop: 'deptName', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | } |
| | | // { |
| | | // label: '票数', |
| | | // prop: 'voteNum', |
| | | // type: 'input' |
| | | // } |
| | | ] |
| | | }, |
| | | dialogParams: { |
| | |
| | | </li> |
| | | </ul> |
| | | </el-collapse-item> |
| | | <el-collapse-item v-if="!type()" title="第一轮候选结果" name="2"> |
| | | <el-collapse-item v-if="!type()" name="2"> |
| | | <template #title> |
| | | 第一轮候选结果 |
| | | <el-tag |
| | | style="margin-left: 10px;" |
| | | :type="status[props.params.data.candidateState].type"> |
| | | 当前状态:{{ status[props.params.data.candidateState].text }} |
| | | </el-tag> |
| | | </template> |
| | | <firstRoundResult :params="{ data: props.params.data }" /> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="最终评优结果" name="3"> |
| | | <el-collapse-item name="3"> |
| | | <template #title> |
| | | 最终评优结果 |
| | | <el-tag |
| | | style="margin-left: 10px;" |
| | | :type="status[props.params.data.evaluateState].type"> |
| | | 当前状态:{{ status[props.params.data.evaluateState].text }} |
| | | </el-tag> |
| | | </template> |
| | | <secondRoundResult :params="{ data: props.params.data }" /> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | |
| | | <script setup> |
| | | import firstRoundResult from './firstRoundResult.vue'; |
| | | import secondRoundResult from './secondRoundResult.vue'; |
| | | import { inject, onMounted, reactive } from 'vue'; |
| | | import { inject, markRaw, onMounted, reactive } from 'vue'; |
| | | import { getEcList } from '@/api/evaluate/evaluateTask' |
| | | |
| | | const props = defineProps({ |
| | |
| | | |
| | | const type = inject('type') |
| | | |
| | | const status = markRaw({ |
| | | 0: { |
| | | text: '未开始', |
| | | type: 'warning' |
| | | }, |
| | | 1: { |
| | | text: '进行中', |
| | | type: 'success' |
| | | }, |
| | | 2: { |
| | | text: '已完成', |
| | | type: 'primary' |
| | | }, |
| | | }) |
| | | |
| | | const collapseParams = reactive({ |
| | | activeNames: ['1'], |
| | | categoryEntities: [] |
| | |
| | | </ul>
|
| | | <div class="pagination">
|
| | | <el-pagination v-model:current-page="page.current" v-model:page-size="page.size" background pager-count="3"
|
| | | layout="prev, pager, next" :total="page.total" @current-change="handleCurrentChange" small hide-on-single-page />
|
| | | layout="prev, pager, next" :total="page.total" @current-change="handleCurrentChange" small
|
| | | hide-on-single-page />
|
| | | </div>
|
| | | </el-aside>
|
| | | <el-main>
|
| | |
| | | <el-collapse-item title="当前任务评优类别详情" name="1" v-if="!defaultTaskType">
|
| | | <evaluateTypeResult :params="{ data: taskList[taskActive] }" />
|
| | | </el-collapse-item>
|
| | | <el-collapse-item title="第一轮候选结果" name="2" v-if="!defaultTaskType">
|
| | | <el-collapse-item name="2" v-if="!defaultTaskType">
|
| | | <template #title>
|
| | | 第一轮候选结果
|
| | | <el-tag |
| | | style="margin-left: 10px;" |
| | | :type="status[taskList[taskActive].candidateState].type">
|
| | | 当前状态:{{ status[taskList[taskActive].candidateState].text }}
|
| | | </el-tag>
|
| | | </template>
|
| | | <firstRoundResult :params="{ data: taskList[taskActive] }" />
|
| | | </el-collapse-item>
|
| | | <el-collapse-item title="最终评优结果" name="3">
|
| | | <el-collapse-item name="3">
|
| | | <template #title>
|
| | | 最终评优结果
|
| | | <el-tag
|
| | | style="margin-left: 10px;" |
| | | :type="status[taskList[taskActive].evaluateState].type">
|
| | | 当前状态:{{ status[taskList[taskActive].evaluateState].text }}
|
| | | </el-tag>
|
| | | </template>
|
| | | <secondRoundResult :params="{ data: taskList[taskActive] }" />
|
| | | </el-collapse-item>
|
| | | </el-collapse>
|
| | |
| | | },
|
| | | ],
|
| | | },
|
| | | status: {
|
| | | 0: {
|
| | | text: '未开始',
|
| | | type: 'warning'
|
| | | },
|
| | | 1: {
|
| | | text: '进行中',
|
| | | type: 'success'
|
| | | },
|
| | | 2: {
|
| | | text: '已完成',
|
| | | type: 'primary'
|
| | | },
|
| | | }
|
| | | // firstRounParams: {},
|
| | | // secondRounParams: {}
|
| | | };
|