7 files modified
2 files added
| | |
| | | })
|
| | | }
|
| | |
|
| | | export const getReferrer = (type, beId, evaluateTaskId) => {
|
| | | export const getReferrer = (current, size, evaluateTaskId, userId) => {
|
| | | return request({
|
| | | url: '/evaluate/evaluateResult/list',
|
| | | url: `/evaluate/evaluateTaskReferrer/listInfo/${evaluateTaskId}/${userId}`,
|
| | | method: 'get',
|
| | | params: {
|
| | | type,
|
| | | beId,
|
| | | evaluateTaskId
|
| | | current,
|
| | | size
|
| | | }
|
| | | })
|
| | | }
|
| | |
| | | } |
| | | |
| | | // 获取最终结果 |
| | | // url: '/evaluate/evaluateCandidate/page', |
| | | export const getFinallyResult = (params) => { |
| | | export const getFinallyResult = (current, size, evaluateTaskId) => { |
| | | return request({ |
| | | url: '/evaluate/evaluateCandidate/page', |
| | | url: `/evaluate/evaluateTaskCategory/listByResult`, |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | descs: 'vote_num' |
| | | evaluateTaskId, |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | |
| | | export const getSectionFinallyResult = (params) => { |
| | | // 获取最终结果 |
| | | export const getFinallyTypeResult = (current, size, params) => { |
| | | return request({ |
| | | url: '/evaluate/evaluateTaskSet/page', |
| | | url: `/evaluate/evaluateCandidateResult/listByCategoryId`, |
| | | method: 'get', |
| | | params: { |
| | | ...params, |
| | | descs: 'vote_num' |
| | | current, |
| | | size |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // export const getSectionFinallyResult = (params) => { |
| | | // return request({ |
| | | // url: '/evaluate/evaluateTaskSet/page', |
| | | // method: 'get', |
| | | // params: { |
| | | // ...params, |
| | | // descs: 'vote_num' |
| | | // } |
| | | // }) |
| | | // } |
| New file |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <ul class="type-list"> |
| | | <li class="type-item"> |
| | | <div class="title">类别</div> |
| | | <div class="introduction">认定标准</div> |
| | | <div class="number">名额</div> |
| | | <div class="tool">操作</div> |
| | | </li> |
| | | <li class="type-item" v-for="(item, index) in categoryEntities" :key="index"> |
| | | <div class="title">{{ item.categoryName }}</div> |
| | | <el-tooltip effect="dark" placement="top"> |
| | | <template #content> |
| | | <p style="max-width: 500px;">{{ item.standard }}</p> |
| | | </template> |
| | | <div class="introduction"> |
| | | {{ item.standard }} |
| | | </div> |
| | | </el-tooltip> |
| | | <div class="number">{{ item.peopleNum }}</div> |
| | | <div class="tool"> |
| | | <el-button type="primary" icon="el-icon-view" text |
| | | @click="viewEcCandidateHandler(item)">查看详情</el-button> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <typeDetails :params="typeDetailsParams" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getEcList } from '@/api/evaluate/evaluateTask' |
| | | import typeDetails from './typeDetails.vue' |
| | | |
| | | export default { |
| | | components: { |
| | | typeDetails |
| | | }, |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | data: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | categoryEntities: [], |
| | | pageParams: { |
| | | current: 1, |
| | | size: 10, |
| | | total: 0 |
| | | }, |
| | | typeDetailsParams: {} |
| | | } |
| | | }, |
| | | watch: { |
| | | 'params.data': { |
| | | handler(value) { |
| | | this.pageParams.current = 1 |
| | | this.initEccList() |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | methods: { |
| | | initEccList() { |
| | | const { id } = this.params.data |
| | | const { current, size } = this.pageParams |
| | | getEcList(current, size, id).then(ecResult => { |
| | | const { code, data: { records } } = ecResult.data |
| | | if (code !== 200) return this.$message.error('评优类别加载失败') |
| | | this.categoryEntities = records |
| | | }) |
| | | }, |
| | | viewEcCandidateHandler(row) { |
| | | const evaluateTaskId = this.params.data.id |
| | | const evaluateTaskCategoryId = row.id |
| | | this.typeDetailsParams = { |
| | | visible: true, |
| | | data: { |
| | | evaluateTaskId, |
| | | evaluateTaskCategoryId |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.initEccList() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | $borderColor: var(--el-border-color); |
| | | |
| | | .type-list { |
| | | margin: 0; |
| | | padding: 0; |
| | | list-style-type: none; |
| | | width: 100%; |
| | | border: 1px solid $borderColor; |
| | | border-radius: var(--el-border-radius-base); |
| | | box-sizing: border-box; |
| | | |
| | | .type-item { |
| | | display: flex; |
| | | height: 40px; |
| | | line-height: 40px; |
| | | text-align: center; |
| | | |
| | | div { |
| | | border-bottom: 1px solid $borderColor; |
| | | flex-shrink: 0; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .title { |
| | | flex: 2; |
| | | } |
| | | |
| | | .introduction { |
| | | flex: 5; |
| | | flex-shrink: 0; |
| | | |
| | | border: { |
| | | right: 1px solid $borderColor; |
| | | left: 1px solid $borderColor; |
| | | } |
| | | } |
| | | |
| | | .number { |
| | | flex: 1; |
| | | } |
| | | |
| | | .tool { |
| | | flex: 2; |
| | | border-left: 1px solid $borderColor; |
| | | } |
| | | |
| | | &:last-child { |
| | | div { |
| | | border-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <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}"> |
| | | <referrerPopover :params="{ userId: row.id, evaluateTaskId: params.data.id }"> |
| | | <el-button type="success" icon="el-icon-view" text>推荐人预览</el-button> |
| | | </referrerPopover> |
| | | </template> |
| | | </avue-crud> |
| | | </template> |
| | | |
| | | <script> |
| | | import referrerPopover from './referrerPopover.vue' |
| | | import { getCandidateResult } from '@/api/evaluate/evaluateTask' |
| | | |
| | | export default { |
| | | components: { |
| | | referrerPopover |
| | | }, |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | |
| | | viewBtn: false, |
| | | header: false, |
| | | menuWidth: 150, |
| | | menu: false, |
| | | // menu: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | |
| | | }) |
| | | |
| | | const init = () => { |
| | | const { userId, type, evaluateTaskId } = props.params |
| | | getReferrer(type, userId, evaluateTaskId).then(res => { |
| | | const { userId, evaluateTaskId } = props.params |
| | | getReferrer(page.currentPage, page.pageSize, evaluateTaskId, userId).then(res => { |
| | | const { data } = res |
| | | const referrerRes = _.cloneDeep(data.data.records) |
| | | tableData.value = referrerRes |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getCandidateResult } from '@/api/evaluate/evaluateTask' |
| | | import { getFinallyResult } from '@/api/evaluate/evaluateTask' |
| | | |
| | | export default { |
| | | inject: ['type'], |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | |
| | | viewBtn: false, |
| | | header: false, |
| | | menuWidth: 150, |
| | | menu: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ] |
| | | column: [] |
| | | }, |
| | | defaultColumn: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ], |
| | | sectionColumn: [ |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '票数', |
| | | prop: 'voteNum', |
| | | type: 'input' |
| | | }, |
| | | ], |
| | | data: [] |
| | | } |
| | | }, |
| | |
| | | ...this.query, |
| | | ...params |
| | | }; |
| | | getCandidateResult(page.currentPage, page.pageSize, id).then(res => { |
| | | getFinallyResult(page.currentPage, page.pageSize, id).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | 'params.data': { |
| | | handler(value) { |
| | | this.onLoad(this.page) |
| | | this.option.column = (this.type() ? this.sectionColumn : this.defaultColumn) |
| | | }, |
| | | deep: true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| New file |
| | |
| | | <template> |
| | | <el-dialog v-model="params.visible" title="详情" @open="openDialog"> |
| | | <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"> |
| | | </avue-crud> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFinallyTypeResult } from '@/api/evaluate/evaluateTask' |
| | | |
| | | export default { |
| | | props: { |
| | | params: { |
| | | type: Object, |
| | | default: () => { |
| | | return { |
| | | visible: false, |
| | | data: {} |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | data: [], |
| | | loading: true, |
| | | query: {}, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | option: { |
| | | height: '400', |
| | | calcHeight: 30, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | border: true, |
| | | index: true, |
| | | viewBtn: false, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | viewBtn: false, |
| | | header: false, |
| | | menuWidth: 150, |
| | | menu: false, |
| | | dialogClickModal: false, |
| | | column: [ |
| | | { |
| | | label: '姓名', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '部门', |
| | | prop: 'user_name', |
| | | type: 'input' |
| | | }, |
| | | { |
| | | label: '职位', |
| | | prop: 'dept_name', |
| | | type: 'input' |
| | | } |
| | | ] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | openDialog() { |
| | | this.onLoad(this.page) |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | | }, |
| | | sizeChange(pageSize) { |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad(this.page, this.query); |
| | | }, |
| | | onLoad(page, params = {}) { |
| | | this.loading = true; |
| | | |
| | | const { |
| | | evaluateTaskId, |
| | | evaluateTaskCategoryId |
| | | } = this.params.data |
| | | |
| | | const { |
| | | } = this.query; |
| | | |
| | | let values = { |
| | | ...this.query, |
| | | ...params |
| | | }; |
| | | getFinallyTypeResult(page.currentPage, page.pageSize, { evaluateTaskId, evaluateTaskCategoryId }).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <div class="drawer-title">{{ this.params.data?.taskName || '评优任务详情' }}</div> |
| | | </template> |
| | | <el-collapse v-model="collapseParams.activeNames"> |
| | | <el-collapse-item title="当前任务评优类别" name="1"> |
| | | <el-collapse-item v-if="!type()" title="当前任务评优类别" name="1"> |
| | | <ul class="type-list"> |
| | | <li class="type-item"> |
| | | <div class="title">类别</div> |
| | |
| | | </li> |
| | | </ul> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="第一轮候选结果" name="2"> |
| | | <el-collapse-item v-if="!type()" title="第一轮候选结果" name="2"> |
| | | <firstRoundResult :params="{ data: props.params.data }" /> |
| | | </el-collapse-item> |
| | | <el-collapse-item title="最终评优结果" name="3"> |
| | | |
| | | <secondRoundResult :params="{ data: props.params.data }" /> |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-drawer> |
| | |
| | | |
| | | <script setup> |
| | | import firstRoundResult from './firstRoundResult.vue'; |
| | | import { reactive } from 'vue'; |
| | | import secondRoundResult from './secondRoundResult.vue'; |
| | | import { inject, reactive } from 'vue'; |
| | | import { getEcList } from '@/api/evaluate/evaluateTask' |
| | | |
| | | const props = defineProps({ |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const type = inject('type') |
| | | |
| | | const collapseParams = reactive({ |
| | | activeNames: ['1'], |
| | |
| | | collapseParams.categoryEntities = records |
| | | }) |
| | | currentTaskParams.data = props.params.data |
| | | collapseParams.activeNames = !type() ? ['1'] : ['3'] |
| | | } |
| | | |
| | | |
| | |
| | | <avue-tabs :option="taskTypeList" @change="tabChange"></avue-tabs>
|
| | | <el-container class="container">
|
| | | <el-aside width="250px">
|
| | | <el-input v-model="taskWord" class="search-box" clearable placeholder="请输入任务名称">
|
| | | <!-- <el-input v-model="taskWord" class="search-box" clearable placeholder="请输入任务名称">
|
| | | <template #append>
|
| | | <el-button icon="el-icon-search"></el-button>
|
| | | </template>
|
| | | </el-input>
|
| | | </el-input> -->
|
| | | <ul class="aside-box">
|
| | | <template v-if="this.taskList.length > 0">
|
| | | <li v-for="(item, index) in this.taskList" :key="item.id" :class="{ 'is-active': taskActive === index }"
|
| | |
| | | <el-main>
|
| | | <template v-if="this.taskList.length > 0">
|
| | | <el-collapse v-model="activeNames">
|
| | | <el-collapse-item title="第一轮评优结果" name="1">
|
| | | <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">
|
| | | <firstRoundResult :params="{ data: taskList[taskActive] }" />
|
| | | </el-collapse-item>
|
| | | <el-collapse-item title="第二轮评优结果" name="2">
|
| | | <el-collapse-item title="最终评优结果" name="3">
|
| | | <secondRoundResult :params="{ data: taskList[taskActive] }" />
|
| | | </el-collapse-item>
|
| | | </el-collapse>
|
| | |
| | |
|
| | | <script>
|
| | | import { getList } from '@/api/evaluate/evaluateTask'
|
| | | import evaluateTypeResult from './components/evaluateTypeResult.vue'
|
| | | import firstRoundResult from './components/firstRoundResult.vue'
|
| | | import secondRoundResult from './components/secondRoundResult.vue'
|
| | |
|
| | | export default {
|
| | | components: {
|
| | | evaluateTypeResult,
|
| | | firstRoundResult,
|
| | | secondRoundResult
|
| | | },
|
| | |
| | | tabChange(value) {
|
| | | this.defaultTaskType = value.prop;
|
| | | this.getTaskList()
|
| | | this.defaultTaskType ? this.activeNames = ['3'] : this.activeNames = ['1']
|
| | | },
|
| | | handleActive(index) {
|
| | | this.taskActive = index
|
| | |
| | | },
|
| | | mounted() {
|
| | | this.initData()
|
| | | },
|
| | | provide() {
|
| | | return {
|
| | | type: () => this.defaultTaskType
|
| | | }
|
| | | }
|
| | | }
|
| | | </script>
|