4141 chatUser.chat_profile.authentication_type === 'password'
4242 "
4343 >
44- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
44+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
4545 </el-avatar >
4646 <el-dropdown v-else trigger =" click" type =" primary" class =" w-full" >
4747 <div class =" flex align-center" >
4848 <el-avatar :size =" 32" >
49- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
49+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
5050 </el-avatar >
5151 <span v-show =" !isPcCollapse" class =" ml-8 color-text-primary" >{{
52- chatUser.chatUserProfile?.nick_name
53- }}</span >
52+ chatUser.chatUserProfile?.nick_name
53+ }}</span >
5454 </div >
5555
5656 <template #dropdown >
5757 <el-dropdown-menu style =" min-width : 260px " >
5858 <div class =" flex align-center p-8" >
5959 <div class =" mr-8 flex align-center" >
6060 <el-avatar :size =" 40" >
61- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
61+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
6262 </el-avatar >
6363 </div >
6464 <div >
8383 style =" padding-top : 8px ; padding-bottom : 8px "
8484 @click =" logout"
8585 >
86- <AppIcon iconName =" app-export" class =" color-secondary" />
86+ <AppIcon iconName =" app-export" class =" color-secondary" />
8787 {{ $t('layout.logout') }}
8888 </el-dropdown-item >
8989 </el-dropdown-menu >
9898 @click =" isPcCollapse = !isPcCollapse"
9999 >
100100 <el-icon >
101- <component :is =" isPcCollapse ? 'ArrowRightBold' : 'ArrowLeftBold'" />
101+ <component :is =" isPcCollapse ? 'ArrowRightBold' : 'ArrowLeftBold'" />
102102 </el-icon >
103103 </el-button >
104104 </div >
134134 <template #dropdown >
135135 <el-dropdown-menu >
136136 <el-dropdown-item @click =" exportMarkdown"
137- >{{ $t('common.export') }} Markdown</el-dropdown-item
137+ >{{ $t('common.export') }} Markdown</el-dropdown-item
138138 >
139139 <el-dropdown-item @click =" exportHTML"
140- >{{ $t('common.export') }} HTML</el-dropdown-item
140+ >{{ $t('common.export') }} HTML</el-dropdown-item
141141 >
142142 <el-dropdown-item @click =" openPDFExport"
143- >{{ $t('common.export') }} PDF</el-dropdown-item
143+ >{{ $t('common.export') }} PDF</el-dropdown-item
144144 >
145145 </el-dropdown-menu >
146146 </template >
191191 </span> -->
192192 <span >
193193 <el-button text @click =" closeExecutionDetail" >
194- <el-icon size =" 20" ><Close /></el-icon
195- ></el-button >
194+ <el-icon size =" 20" ><Close /></el-icon
195+ ></el-button >
196196 </span >
197197 </div >
198198 </div >
206206 :detail =" executionDetail"
207207 :appType =" applicationDetail?.type"
208208 />
209- <ParagraphDocumentContent :detail =" rightPanelDetail" v-else />
209+ <ParagraphDocumentContent :detail =" rightPanelDetail" v-else />
210210 </div >
211211 </div >
212212 </div >
222222</template >
223223
224224<script setup lang="ts">
225- import {ref , onMounted , nextTick , computed , watch } from ' vue'
226- import {marked } from ' marked'
227- import {saveAs } from ' file-saver'
225+ import { ref , onMounted , nextTick , computed , watch } from ' vue'
226+ import { marked } from ' marked'
227+ import { saveAs } from ' file-saver'
228228import chatAPI from ' @/api/chat/chat'
229229import useStore from ' @/stores'
230230import useResize from ' @/layout/hooks/useResize'
231- import {hexToRgba } from ' @/utils/theme'
232- import {useRoute , useRouter } from ' vue-router'
231+ import { hexToRgba } from ' @/utils/theme'
232+ import { useRoute , useRouter } from ' vue-router'
233233import ResetPassword from ' @/layout/layout-header/avatar/ResetPassword.vue'
234- import {t } from ' @/locales'
235- import type {ResetCurrentUserPasswordRequest } from ' @/api/type/user'
236- import ExecutionDetailContent
237- from ' @/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
238- import ParagraphSourceContent
239- from ' @/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
240- import ParagraphDocumentContent
241- from ' @/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
234+ import { t } from ' @/locales'
235+ import type { ResetCurrentUserPasswordRequest } from ' @/api/type/user'
236+ import ExecutionDetailContent from ' @/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
237+ import ParagraphSourceContent from ' @/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
238+ import ParagraphDocumentContent from ' @/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
242239import HistoryPanel from ' @/views/chat/component/HistoryPanel.vue'
243- import {cloneDeep } from ' lodash'
244- import {getFileUrl } from ' @/utils/common'
240+ import { cloneDeep } from ' lodash'
241+ import { getFileUrl } from ' @/utils/common'
245242import PdfExport from ' @/components/pdf-export/index.vue'
246243
247244useResize ()
248245const pdfExportRef = ref <InstanceType <typeof PdfExport >>()
249- const {common, chatUser} = useStore ()
246+ const { common, chatUser } = useStore ()
250247const router = useRouter ()
251248const openPDFExport = () => {
252249 pdfExportRef .value ?.open (document .getElementById (' chatListId' ))
@@ -279,7 +276,7 @@ const openResetPassword = () => {
279276
280277const handleResetPassword = (param : ResetCurrentUserPasswordRequest ) => {
281278 chatAPI .resetCurrentPassword (param ).then (() => {
282- router .push ({name: ' login' })
279+ router .push ({ name: ' login' })
283280 })
284281}
285282
@@ -307,8 +304,7 @@ const applicationDetail = computed({
307304 get : () => {
308305 return props .application_profile
309306 },
310- set : (v ) => {
311- },
307+ set : (v ) => {},
312308})
313309
314310const chatLogData = ref <any []>([])
@@ -331,15 +327,15 @@ function refreshFieldTitle(chatId: string, abstract: string) {
331327}
332328
333329function deleteLog(row : any ) {
334- chatAPI .deleteChat (row .id , left_loading ).then (() => {
330+ chatAPI .deleteChat (row .id ).then (() => {
335331 if (currentChatId .value === row .id ) {
336332 currentChatId .value = ' new'
337333 currentChatName .value = t (' chat.createChat' )
338334 paginationConfig .value .current_page = 1
339335 paginationConfig .value .total = 0
340336 currentRecordList .value = []
341337 }
342- getChatLog ( )
338+ chatLogData . value = chatLogData . value . filter (( item ) => item . id !== row . id )
343339 })
344340}
345341
@@ -470,7 +466,7 @@ async function exportMarkdown(): Promise<void> {
470466 .map ((record : any ) => ` # ${record .problem_text }\n\n ${record .answer_text }\n\n ` )
471467 .join (' \n ' )
472468
473- const blob: Blob = new Blob ([markdownContent ], {type: ' text/markdown;charset=utf-8' })
469+ const blob: Blob = new Blob ([markdownContent ], { type: ' text/markdown;charset=utf-8' })
474470 saveAs (blob , suggestedName )
475471}
476472
@@ -481,7 +477,7 @@ async function exportHTML(): Promise<void> {
481477 .join (' \n ' )
482478 const htmlContent: any = marked (markdownContent )
483479
484- const blob: Blob = new Blob ([htmlContent ], {type: ' text/html;charset=utf-8' })
480+ const blob: Blob = new Blob ([htmlContent ], { type: ' text/html;charset=utf-8' })
485481 saveAs (blob , suggestedName )
486482}
487483
0 commit comments