GuLiMmo
2023-12-25 f852f9a0078085efb2fe67824c4da69c3a72827b
考核任务详情修改
1 files modified
27 ■■■■■ changed files
src/views/evaluate/components/viewEvaluateDetail.vue 27 ●●●●● patch | view | raw | blame | history
src/views/evaluate/components/viewEvaluateDetail.vue
@@ -5,8 +5,11 @@
                <div class="label">{{ item.title }}</div>
                <div class="value" v-if="!item.isSlot">{{ item.value }}</div>
                <div class="table" v-else>
                    <avue-crud :option="item.option" :data="item.data" ref="crud" @current-change="currentChange"
                        @size-change="sizeChange" @refresh-change="refreshChange"></avue-crud>
                    <template v-if="item.evaluateState === 2">
                        <avue-crud :option="item.option" :data="item.data" ref="crud" @current-change="currentChange"
                            @size-change="sizeChange" @refresh-change="refreshChange"></avue-crud>
                    </template>
                    <template v-else>当前任务暂未结束</template>
                </div>
            </div>
        </div>
@@ -95,6 +98,7 @@
        prop: 'finallyResult',
        isSlot: true,
        width: '100%',
        evaluateState: 0,
        data: [],
        option: {
            height: 260,
@@ -170,16 +174,11 @@
        width: '100%'
    },
    {
        title: '候选结果',
        prop: 'candidateResult',
        value: '',
        width: '100%'
    },
    {
        title: '最终评定结果',
        prop: 'finallyResult',
        isSlot: true,
        width: '100%',
        evaluateState: 0,
        data: [],
        option: {
            height: 260,
@@ -214,7 +213,6 @@
watch(() => props.params.visible, (val) => {
    if (!val) return
    taskDateil.value = !props.params.type ? personOption : sectionOption
    initData()
}, {
    deep: true
@@ -246,6 +244,7 @@
const initData = async () => {
    const data = props.params.data
    taskDateil.value = !props.params.type ? personOption : sectionOption
    const status = {
        0: '未开始',
        1: '进行中',
@@ -256,7 +255,11 @@
        item.value = data[item.prop] || '暂未完善'
        if (['candidateState', 'evaluateState'].includes(item.prop)) {
            item.value = status[item.value]
            item.value = status[data[item.prop]]
            if (item.prop === 'evaluateState') {
                const obj = taskDateil.value.find(s => s.prop === 'finallyResult')
                obj.evaluateState = data[item.prop]
            }
        }
        if (item.prop === 'candidateResult') {
@@ -287,9 +290,11 @@
        if (item.prop === 'finallyResult') {
            const res = await getFinallyList()
            item.data = res
            console.log(item.data);
        }
    }
    console.log(taskDateil.value);
}
</script>