From ff0ae974a1c561eaf2915988dac63cd066af189f Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期四, 12 九月 2024 09:23:44 +0800
Subject: [PATCH] bug fix

---
 src/views/sessionManager/components/chatMenu.vue |   54 ++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/src/views/sessionManager/components/chatMenu.vue b/src/views/sessionManager/components/chatMenu.vue
index e3b63f3..b0c40fb 100644
--- a/src/views/sessionManager/components/chatMenu.vue
+++ b/src/views/sessionManager/components/chatMenu.vue
@@ -14,7 +14,11 @@
           "
         >
           <div class="myAgentToolIcon___gaAKI myAgentToolIconNew___DBZrW">
-            <img src="@/assets/images/icon-new.png" style="width: 24px" alt="" />
+            <img
+              src="@/assets/images/icon-new.png"
+              style="width: 24px"
+              alt=""
+            />
           </div>
         </div>
         <div
@@ -27,7 +31,7 @@
           "
         >
           <div class="myAgentToolIcon___gaAKI myAgentToolIconHistory___GTLWk">
-             <!-- <img
+            <!-- <img
               src="@/assets/images/historybg.png"
               style="width: 24px"
               alt=""
@@ -50,8 +54,11 @@
         >
           <div class="myAgentToolIcon___gaAKI myAgentToolIconSquare___Rj1o_">
             <!-- <img src="@/assets/images/agent.png" style="width: 24px" alt=""/> -->
-             <img src="@/assets/images/icon-zhi.png" style="width: 24px" alt=""
-          />
+            <img
+              src="@/assets/images/icon-zhi.png"
+              style="width: 24px"
+              alt=""
+            />
           </div>
         </div>
         <div class="myAgentLine___Isl6E" style="margin-top: 4px"></div>
@@ -202,23 +209,30 @@
   const createNewSession = async (session) => {
     console.log(session, 'session');
     // 鏌ヨ鍘嗗彶璁板綍
-    if (session.app_type == '1') {
-      // 鐢熸垚鏅鸿兘浣撴柊鐨勫璇�
-      emit('createSession', session.app_id, `鍜�${session.name}鐨勪細璇漙);
-      emit('changeAgentType', '1');
+
+    if (session.app_type == '3') {
+      //楂樼骇agent
+      EventBus.emit('createSeniorAgent', session);
+      emit('changeAgentType', '5');
     } else {
-      // 鐢熸垚agent鏂扮殑瀵硅瘽
-      // agent瀵硅薄鏁版嵁灏佽
-      const { code, data } = await getAgentSessionDetailsApi(session.app_id);
-      if (code == 0) {
-        console.log(data, '浼氳瘽璇︽儏');
-        let sessionObj = {
-          id: session.app_id,
-          dsl: data.dsl,
-          title: session.name,
-        };
-        EventBus.emit('createAgent', sessionObj);
-        emit('changeAgentType', '2');
+      if (session.app_type == '1') {
+        // 鐢熸垚鏅鸿兘浣撴柊鐨勫璇�
+        emit('createSession', session.app_id, `鍜�${session.name}鐨勪細璇漙);
+        emit('changeAgentType', '1');
+      } else {
+        // 鐢熸垚agent鏂扮殑瀵硅瘽
+        // agent瀵硅薄鏁版嵁灏佽
+        const { code, data } = await getAgentSessionDetailsApi(session.app_id);
+        if (code == 0) {
+          console.log(data, '浼氳瘽璇︽儏');
+          let sessionObj = {
+            id: session.app_id,
+            dsl: data.dsl,
+            title: session.name,
+          };
+          EventBus.emit('createAgent', sessionObj);
+          emit('changeAgentType', '2');
+        }
       }
     }
   };

--
Gitblit v1.8.0