From caf1f99e718ca2ac07fa64e7a71a6d7fa88b8989 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 20 十二月 2023 17:57:18 +0800
Subject: [PATCH] 报价单列表和对应产品列表的数据调试

---
 src/components/layout/components/appsidebar/index.vue |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index a3e7990..7be1f15 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -13,7 +13,7 @@
         text-color="#bfcbd9"
         active-text-color="#fff"
       >
-        <el-submenu v-for="item in menus" :key="item.id" :index="item.id" >
+        <el-submenu v-for="item in menus" :key="item.id" :index="item.id.toString()" >
           <template slot="title">
             <i class="el-icon-money icon"></i>
             <span>{{ item.title }}</span>
@@ -66,7 +66,21 @@
         console.log(res.data.list,"crm鑿滃崟")
         res.data.list.map((item)=>{
           if(item.systemType===2){
-            this.menus=item.menus
+            let newList= JSON.parse(JSON.stringify([...item.menus]))
+            // 闅愯棌浜� 鐢熸垚璁″垝 鍜� 鏈嶅姟鏀惰垂绠$悊妯″潡
+            if(newList[1]){
+              const found = newList[1].children.find(obj => obj.title === "鐢熸垚璁″垝")
+              if(found){
+                newList[1].children=[...newList[1].children.slice(0, -1)];  
+              }
+            }
+            if(newList[2]){
+              const found1 = newList[2].children.find(obj => obj.title === "鏈嶅姟鏀惰垂绠$悊")
+              if(found1){
+                newList[2].children=[...newList[2].children.slice(0, -1)];  
+              }
+            }
+            this.menus=newList
           }
         }) 
       })

--
Gitblit v1.8.0