From 41d1f2c058ff2802f7df15e181c9eaf1c280ecf8 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Sat, 22 Nov 2025 15:35:00 +0800
Subject: [PATCH] feat:删除无用按钮

---
 src/views/tickets/ticket.vue |   52 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index 4e9ff17..dc2a64b 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -514,7 +514,6 @@
 })
  // 动态过滤tabs,保证isShow为true/false
  const filteredTabs = computed(() => {
-  const tabStatus = permission.value?.tickets_tab_status === true 
   const tabPending = permission.value?.tickets_tab_pending === true//待审核
   const tabMyTickets = permission.value?.tickets_tab_mytickets === true  //我的工单
   const tabALL = permission.value?.tickets_allWorkOrders === true //全部工单
@@ -578,12 +577,12 @@
 });
 const stepStatusList = computed(() => {
 // “我发起的工单”tab用默认流程,其它tab用接口返回的stepInfos
-  if (activeTab.value === 'myTickets') {
-    if (workType.value === 1) {
-      return ['3', '4']
-    }
-    return fixedStatuses.value
-  }
+  // if (activeTab.value === 'myTickets') {
+  //   if (workType.value === 1) {
+  //     return ['3', '4']
+  //   }
+  //   return fixedStatuses.value
+  // }
    // 其它tab直接用接口返回的stepInfos
   return stepInfos.value.map(step => String(step.status))
 })
@@ -979,29 +978,42 @@
     const steps = Array.isArray(stepResponse.data.data)
       ? stepResponse.data.data
       : stepResponse.data.data?.steps || []
+    console.log('steps',steps);
     
     const finishedStep = steps.find(s => String(s.status) === '4')
     totalTime.value = finishedStep && finishedStep.total_time ? finishedStep.total_time : ''
     
-    if (activeTab.value !== 'myTickets') {
+    // if (activeTab.value !== 'myTickets') {
+    //   stepInfos.value = steps.map(step => ({
+    //     status: String(step.status),
+    //     name: step.name,
+    //     time: step.time,
+    //     create_time: step.create_time,
+    //   }))
+    // } else {
+      // const statusArr = workType.value === 1 ? ['3', '4'] : fixedStatuses.value
+      // stepInfos.value = statusArr.map(status => {
+      //   const step = steps.find(s => String(s.status) === String(status))
+      //   return {
+      //     status,
+      //     name: step ? step.name : '',
+      //     time: step ? step.time : null,
+      //     create_time: step ? step.create_time : null,
+      //   }
+      // })
+    //     stepInfos.value = steps.map(step => ({
+    //     status: String(step.status),
+    //     name: step.name,
+    //     time: step.time,
+    //     create_time: step.create_time,
+    //   }))
+    // }
       stepInfos.value = steps.map(step => ({
         status: String(step.status),
         name: step.name,
         time: step.time,
         create_time: step.create_time,
       }))
-    } else {
-      const statusArr = workType.value === 1 ? ['3', '4'] : fixedStatuses.value
-      stepInfos.value = statusArr.map(status => {
-        const step = steps.find(s => String(s.status) === String(status))
-        return {
-          status,
-          name: step ? step.name : '',
-          time: step ? step.time : null,
-          create_time: step ? step.create_time : null,
-        }
-      })
-    }
     return true
   } catch (error) {
     console.error('获取步骤信息失败:', error)

--
Gitblit v1.9.3