From 1e60dd0443cc52374bac2018d086b6f6ee28a136 Mon Sep 17 00:00:00 2001
From: GuLiMmo <2820890765@qq.com>
Date: Mon, 25 Dec 2023 11:27:10 +0800
Subject: [PATCH] 部分页面细节调整

---
 src/views/evaluate/components/viewEvaluateDetail.vue |  149 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 115 insertions(+), 34 deletions(-)

diff --git a/src/views/evaluate/components/viewEvaluateDetail.vue b/src/views/evaluate/components/viewEvaluateDetail.vue
index d0657b2..0bf58bc 100644
--- a/src/views/evaluate/components/viewEvaluateDetail.vue
+++ b/src/views/evaluate/components/viewEvaluateDetail.vue
@@ -14,11 +14,14 @@
 </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: {
@@ -36,7 +39,9 @@
     total: 0
 })
 
-const taskDateil = reactive([
+const taskDateil = ref(null)
+
+const personOption = reactive([
     {
         title: '任务名称',
         prop: 'taskName',
@@ -103,39 +108,114 @@
             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
 })
@@ -151,11 +231,13 @@
 }
 
 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
@@ -170,7 +252,7 @@
         2: '已完成'
     }
 
-    for (const item of taskDateil) {
+    for (const item of taskDateil.value) {
         item.value = data[item.prop] || '暂未完善'
 
         if (['candidateState', 'evaluateState'].includes(item.prop)) {
@@ -208,8 +290,6 @@
             console.log(item.data);
         }
     }
-
-    // 获取当前数据
 }
 </script>
 
@@ -250,6 +330,7 @@
             background-color: aliceblue;
             border-right: 1px solid #eeeded;
         }
+
         .value {
             white-space: pre-line;
         }

--
Gitblit v1.9.3