xieb
2025-01-21 d13cebe7fbadd396e91a989af331df8a8e7b40f8
src/views/evaluate/components/viewEvaluateDetail.vue
@@ -1,13 +1,13 @@
<template>
    <el-drawer v-model="props.params.visible" @open="openDrawer" direction="rtl" size="50%">
        <template #header>
            <div class="drawer-title">{{ this.params.data?.taskName || '评优任务详情' }}</div>
            <div class="drawer-title">{{ props.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>
                        <div class="title">奖项</div>
                        <div class="introduction">认定标准</div>
                        <div class="number">名额</div>
                    </li>
@@ -26,11 +26,27 @@
                    </li>
                </ul>
            </el-collapse-item>
            <el-collapse-item 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>
    </el-drawer>
@@ -38,7 +54,8 @@
<script setup>
import firstRoundResult from './firstRoundResult.vue';
import { reactive } from 'vue';
import secondRoundResult from './secondRoundResult.vue';
import { inject, markRaw, onMounted, reactive } from 'vue';
import { getEcList } from '@/api/evaluate/evaluateTask'
const props = defineProps({
@@ -47,11 +64,27 @@
        default: () => {
            return {
                visible: false,
                type: 0,
                data: {}
            }
        }
    }
})
const type = inject('type')
const status = markRaw({
    0: {
        text: '未开始',
        type: 'warning'
    },
    1: {
        text: '进行中',
        type: 'success'
    },
    2: {
        text: '已完成',
        type: 'primary'
    },
})
const collapseParams = reactive({
@@ -78,9 +111,8 @@
        collapseParams.categoryEntities = records
    })
    currentTaskParams.data = props.params.data
    collapseParams.activeNames = !type() ? ['1'] : ['3']
}
</script>