4343 chatUser.chat_profile.authentication_type === 'password'
4444 "
4545 >
46- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
46+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
4747 </el-avatar >
4848 <el-dropdown v-else trigger =" click" type =" primary" class =" w-full" >
4949 <div class =" flex align-center" >
5050 <el-avatar :size =" 32" >
51- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
51+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
5252 </el-avatar >
5353 <span v-show =" !isPcCollapse" class =" ml-8 color-text-primary" >{{
54- chatUser.chatUserProfile?.nick_name
55- }}</span >
54+ chatUser.chatUserProfile?.nick_name
55+ }}</span >
5656 </div >
5757
5858 <template #dropdown >
5959 <el-dropdown-menu style =" min-width : 260px " >
6060 <div class =" flex align-center p-8" >
6161 <div class =" mr-8 flex align-center" >
6262 <el-avatar :size =" 40" >
63- <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
63+ <img src =" @/assets/user-icon.svg" style =" width : 54% " alt =" " />
6464 </el-avatar >
6565 </div >
6666 <div >
8484 style =" padding-top : 8px ; padding-bottom : 8px "
8585 @click =" logout"
8686 >
87- <AppIcon iconName="app-export" class="color-secondary"/>
87+ <AppIcon iconName="app-export" class="color-secondary" />
8888 {{ $t('layout.logout') }}
8989 </el-dropdown-item >
9090 </el-dropdown-menu >
9999 @click =" isPcCollapse = !isPcCollapse"
100100 >
101101 <el-icon >
102- <component :is =" isPcCollapse ? 'ArrowRightBold' : 'ArrowLeftBold'" />
102+ <component :is =" isPcCollapse ? 'ArrowRightBold' : 'ArrowLeftBold'" />
103103 </el-icon >
104104 </el-button >
105105 </div >
148148 <template #dropdown >
149149 <el-dropdown-menu >
150150 <el-dropdown-item @click =" exportMarkdown"
151- >{{ $t('common.export') }} Markdown</el-dropdown-item
151+ >{{ $t('common.export') }} Markdown</el-dropdown-item
152152 >
153153 <el-dropdown-item @click =" exportHTML"
154- >{{ $t('common.export') }} HTML</el-dropdown-item
154+ >{{ $t('common.export') }} HTML</el-dropdown-item
155155 >
156156 <el-dropdown-item @click =" openPDFExport"
157- >{{ $t('common.export') }} PDF</el-dropdown-item
157+ >{{ $t('common.export') }} PDF</el-dropdown-item
158158 >
159159 </el-dropdown-menu >
160160 </template >
208208 </span> -->
209209 <span >
210210 <el-button text @click =" closeExecutionDetail" >
211- <el-icon size =" 20" ><Close /></el-icon
212- ></el-button >
211+ <el-icon size =" 20" ><Close /></el-icon
212+ ></el-button >
213213 </span >
214214 </div >
215215 </div >
225225 :detail =" executionDetail "
226226 :appType =" applicationDetail ?.type "
227227 />
228- <ParagraphDocumentContent :detail =" rightPanelDetail " v-else />
228+ <ParagraphDocumentContent :detail =" rightPanelDetail " v-else />
229229 </el-scrollbar >
230230 </div >
231231 </div >
242242</template >
243243
244244<script setup lang="ts">
245- import {ref , onMounted , nextTick , computed , watch , provide } from ' vue'
246- import {marked } from ' marked'
247- import {saveAs } from ' file-saver'
245+ import { ref , onMounted , nextTick , computed , watch , provide } from ' vue'
246+ import { marked } from ' marked'
247+ import { saveAs } from ' file-saver'
248248import sanitizeHtml from ' sanitize-html'
249249import chatAPI from ' @/api/chat/chat'
250250import useStore from ' @/stores'
251251import useResize from ' @/layout/hooks/useResize'
252- import {hexToRgba } from ' @/utils/theme'
253- import {useRoute , useRouter } from ' vue-router'
252+ import { hexToRgba } from ' @/utils/theme'
253+ import { useRoute , useRouter } from ' vue-router'
254254import ResetPassword from ' @/layout/layout-header/avatar/ResetPassword.vue'
255- import {t } from ' @/locales'
256- import type {ResetCurrentUserPasswordRequest } from ' @/api/type/user'
257- import ExecutionDetailContent
258- from ' @/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
259- import ParagraphSourceContent
260- from ' @/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
261- import ParagraphDocumentContent
262- from ' @/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
255+ import { t } from ' @/locales'
256+ import type { ResetCurrentUserPasswordRequest } from ' @/api/type/user'
257+ import ExecutionDetailContent from ' @/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
258+ import ParagraphSourceContent from ' @/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
259+ import ParagraphDocumentContent from ' @/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
263260import HistoryPanel from ' @/views/chat/component/HistoryPanel.vue'
264- import {cloneDeep } from ' lodash'
265- import {getFileUrl } from ' @/utils/common'
261+ import { cloneDeep } from ' lodash'
262+ import { getFileUrl } from ' @/utils/common'
266263import PdfExport from ' @/components/pdf-export/index.vue'
267- import JSEncrypt from " jsencrypt" ;
264+ import JSEncrypt from ' jsencrypt'
268265
269- const {user} = useStore ()
266+ const { user } = useStore ()
270267useResize ()
271268
272269provide (' scrollData' , loadInfiniteScroll )
273270provide (' chatLogPagination' , () => chatLogPagination )
274271const pdfExportRef = ref <InstanceType <typeof PdfExport >>()
275- const {common, chatUser} = useStore ()
272+ const { common, chatUser } = useStore ()
276273const router = useRouter ()
277274const openPDFExport = () => {
278275 pdfExportRef .value ?.open (document .getElementById (' chatListId' ))
@@ -307,13 +304,13 @@ const openResetPassword = () => {
307304}
308305
309306const handleResetPassword = (param : ResetCurrentUserPasswordRequest ) => {
310- const JSEncryptCtor = (JSEncrypt as any )?.default ? (JSEncrypt as any ).default : JSEncrypt ;
311- const js = new (JSEncryptCtor as any )();
312- js .setPublicKey (user . rsaKey );
313- const jsonData = JSON .stringify (param );
314- const encryptedBase64 = js .encrypt (jsonData );
315- chatAPI .resetCurrentPassword ({encryptedData: encryptedBase64 }).then (() => {
316- router .push ({name: ' login' })
307+ const JSEncryptCtor = (JSEncrypt as any )?.default ? (JSEncrypt as any ).default : JSEncrypt
308+ const js = new (JSEncryptCtor as any )()
309+ js .setPublicKey (chatUser ?. chat_profile ?. rsaKey )
310+ const jsonData = JSON .stringify (param )
311+ const encryptedBase64 = js .encrypt (jsonData )
312+ chatAPI .resetCurrentPassword ({ encryptedData: encryptedBase64 }).then (() => {
313+ router .push ({ name: ' login' })
317314 })
318315}
319316
@@ -340,8 +337,7 @@ const applicationDetail = computed({
340337 get : () => {
341338 return props .application_profile
342339 },
343- set : (v ) => {
344- },
340+ set : (v ) => {},
345341})
346342
347343const chatLogData = ref <any []>([])
@@ -522,7 +518,7 @@ async function exportMarkdown(): Promise<void> {
522518 })
523519 .join (' \n ' )
524520
525- const blob: Blob = new Blob ([markdownContent ], {type: ' text/markdown;charset=utf-8' })
521+ const blob: Blob = new Blob ([markdownContent ], { type: ' text/markdown;charset=utf-8' })
526522 saveAs (blob , suggestedName )
527523}
528524
@@ -586,7 +582,7 @@ async function exportHTML(): Promise<void> {
586582 allowProtocolRelative: false ,
587583 })
588584
589- const blob: Blob = new Blob ([htmlContent ], {type: ' text/html;charset=utf-8' })
585+ const blob: Blob = new Blob ([htmlContent ], { type: ' text/html;charset=utf-8' })
590586 saveAs (blob , suggestedName )
591587}
592588
0 commit comments