Przeglądaj źródła

feat: 增加ragflow聊天页面

zhupei@smartai.com 1 rok temu
rodzic
commit
655627a9a3

+ 1 - 0
src/router/index.js

@@ -47,6 +47,7 @@ const routes = [
 
   { path: '/xiaoshu', component: () => import('../views/Xiaoshu.vue') },
 
+  { path: '/ragchat', component: () => import('../views/RagFlowChat.vue') },
   { path: '/about', component: () => import('../views/About.vue') }
 ];
 

+ 7 - 1
src/views/About.vue

@@ -1,3 +1,9 @@
 <template>
-  <div>about</div>
+  <iframe
+    src="http://192.168.20.116/chatbot/q8F58WkrUB2j4BcK"
+    style="width: 100%; height: 100%; min-height: 700px"
+    frameborder="0"
+    allow="microphone"
+  >
+  </iframe>
 </template>

+ 2 - 2
src/views/Home.vue

@@ -1,7 +1,7 @@
 <template>
   <div>home</div>
 
-  <ApiGetExample1 />
+  <!-- <ApiGetExample1 />
 
   <ApiGetExample2 />
 
@@ -28,7 +28,7 @@
       <li><router-link class="arco-link" to="/setting">设置</router-link></li>
       <li><router-link class="arco-link" to="/about">关于</router-link></li>
     </ul>
-  </div>
+  </div> -->
 </template>
 
 <script setup>

+ 9 - 0
src/views/RagFlowChat.vue

@@ -0,0 +1,9 @@
+<template>
+  <iframe
+    src="http://192.168.20.116/chatbot/q8F58WkrUB2j4BcK"
+    style="width: 100%; height: 100%; min-height: 700px"
+    frameborder="0"
+    allow="microphone"
+  >
+  </iframe>
+</template>

+ 20 - 6
src/views/common/Header.vue

@@ -8,16 +8,30 @@
 
     <div class="header-center">
       <a-space>
-        <NavItem :label="$t('header.conversation')" to="/chat/history" v-hasPermi="'system:conversation:talk'"
-          icon_name="header-huihua" />
-        <NavItem :label="$t('header.knowledge')" to="/knowledge" v-hasPermi="'system:knowledge'"
-          icon_name="header-zhishiku" />
+        <NavItem
+          :label="$t('header.conversation')"
+          to="/chat/history"
+          v-hasPermi="'system:conversation:talk'"
+          icon_name="header-huihua"
+        />
+        <NavItem
+          :label="$t('header.knowledge')"
+          to="/knowledge"
+          v-hasPermi="'system:knowledge'"
+          icon_name="header-zhishiku"
+        />
         <NavItem :label="$t('header.model')" to="/model" v-hasPermi="'system:model'" icon_name="header-moxingguanli" />
         <!-- <NavItem :label="$t('header.agent')" to="/agent" icon_name="header-agent" /> -->
         <NavItem :label="'小数'" to="/xiaoshu" v-hasPermi="'system:xiaoshu'" icon_name="header-agent" />
-        <NavItem :label="$t('header.intelligent')" to="/intelligent" v-hasPermi="'system:conversation:talk'"
-          icon_name="header-zhinengti" />
+        <NavItem
+          :label="$t('header.intelligent')"
+          to="/intelligent"
+          v-hasPermi="'system:conversation:talk'"
+          icon_name="header-zhinengti"
+        />
         <PermissionDropdownV1 :label="$t('header.permission')" v-hasPermi="'system:permission'" />
+
+        <NavItem label="临时: RagFlow Chat" to="/ragchat" icon_name="header-zhinengti" />
       </a-space>
     </div>