From fd3ef41e30c4d262ceb5616075daacf61c40d20d Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期五, 21 三月 2025 17:25:12 +0800
Subject: [PATCH] bug修改

---
 src/views/signProject/components/record.vue |   87 +++++++++++++++++++++++--------------------
 1 files changed, 46 insertions(+), 41 deletions(-)

diff --git a/src/views/signProject/components/record.vue b/src/views/signProject/components/record.vue
index 0ee91a6..dd5b927 100644
--- a/src/views/signProject/components/record.vue
+++ b/src/views/signProject/components/record.vue
@@ -9,22 +9,37 @@
         :close-on-click-modal="false"
     >
       <el-timeline style="max-width: 600px">
+        <el-timeline-item size="large" color="#0bbd87" style="font-size: 16px">
+          <div>创建人:{{state.creatContent}}</div>
+        </el-timeline-item>
+        <el-timeline-item style="font-size: 16px" :color="state.firstPeopleState == 1 ? '#0bbd87' : '#B4B4B4' " size="large">
+          <div style="display: flex">
+            最初签署人:
+            <div style="display: flex;flex-direction: column">
+              <div v-for="item in firstArr">
+                {{item.firstPeopleContent}}
+                <span v-if="item.firstPeopleState == 1" style="color: #1ab394;font-size: 14px;">[已签]</span>
+                <span v-else style="color: #6d737b;font-size: 14px;">[未签]</span>
+              </div>
+            </div>
+
+          </div>
+        </el-timeline-item>
         <el-timeline-item
             v-for="(activity, index) in state.activities"
             :key="index"
-            :icon="activity.icon"
-            :type="activity.type"
-            :color="activity.state == 1 ? '#0bbd87' : '#B4B4B4' "
-            :size="activity.size"
+            size="large"
+            style="font-size: 16px"
+            :color="activity.signStatus == 1 || activity.signStatus == 3 ? '#0bbd87' : '#B4B4B4' "
         >
           <div style="display: flex;font-size: 16px">
             <div style="display: flex;flex-direction: column">
-              <span v-if="activity.title" style="font-size: 14px;margin-bottom: 5px;color: #6d737b">{{activity.title}}</span>
+              <span  style="font-size: 14px;margin-bottom: 5px;color: #6d737b">由 {{activity.deptName}} {{activity.userName}} 流转</span>
               <div>
-                <span style="font-size: 16px">{{activity.content}}</span>
-                <span v-if="activity.state == 1 && index != 3" style="color: #1ab394;font-size: 14px;margin-left: 5px">[已签]</span>
-                <span v-if="activity.state == 0 && index != 3" style="color: #6d737b;font-size: 14px;margin-left: 5px">[未签]</span>
-                <span v-if="activity.state == 1 && index == 3" style="color: #1ab394;font-size: 14px;margin-left: 5px">[已归档]</span>
+                <span style="font-size: 16px" >{{activity.signUserName}}({{activity.signDeptName}})</span>
+                <span v-if="activity.signStatus == 1" style="color: #1ab394;font-size: 14px;margin-left: 5px">[已签]</span>
+                <span v-else-if="activity.signStatus == 0 || activity.signStatus == null " style="color: #6d737b;font-size: 14px;margin-left: 5px">[未签]</span>
+                <span v-else-if="activity.signStatus == 3 && state.form.itemStatus == 2 " style="color: #1ab394;font-size: 14px;margin-left: 5px">[已归档]</span>
               </div>
             </div>
           </div>
@@ -52,47 +67,37 @@
     id: '',
   },
   activities: [],
+  creatContent: '',
+  firstPeopleContent: '',
+  firstPeopleState: null,
   formRules:{
     name: [{ required: true, trigger: "blur", message:'' }],
   },
 })
 
 
+const firstArr = ref([])
 const openDialog = async (value) => {
-  state.activities = [
-    {
-      content: '创建人:张三(综合办)',
-      timestamp: '2018-04-03 20:46',
-      size: 'large',
-      state: 1,
-    },
-    {
-      content: '最初签署人:李四',
-      timestamp: '2018-04-03 20:46',
-      size: 'large',
-      state: 1,
-    },
-    {
-      title: '由  XXX 部门 XX 流转',
-      content: 'XXXX',
-      timestamp: '2018-04-03 20:46',
-      size: 'large',
-      state: 1,
-    },
-    {
-      title: '由  XXX 部门 XX 流转',
-      content: 'XXXX',
-      timestamp: '2018-04-03 20:46',
-      size: 'large',
-      state: 1,
-    },
-
-
-
-  ]
+  console.log('va',value)
+  state.form = JSON.parse(JSON.stringify(value))
+  state.activities = JSON.parse(JSON.stringify(value)).signatureFlows
+  const newArr = []
+  state.activities.forEach(item => {
+    if(item.sort == 1){
+      state.creatContent = item.userName + '('+ item.deptName + ')'
+      const obj = {
+        firstPeopleContent: item.signUserName + '('+ item.signDeptName + ')',
+        firstPeopleState: item.signStatus
+      }
+      firstArr.value.push(obj)
+    }else {
+      newArr.push(item)
+    }
+  })
+  newArr.sort((a,b) => a.sort - b.sort)
+  state.activities = newArr
   dialogVisible.value = true;
 }
-
 
 const handleClose = () => {
   reset();

--
Gitblit v1.9.2