fix: clean up code formatting and improve consistency in index.vue
parent
7683c39d66
commit
79b590d94f
|
|
@ -229,17 +229,21 @@ import chatAPI from '@/api/chat/chat'
|
||||||
import useStore from '@/stores'
|
import useStore from '@/stores'
|
||||||
import useResize from '@/layout/hooks/useResize'
|
import useResize from '@/layout/hooks/useResize'
|
||||||
import {hexToRgba} from '@/utils/theme'
|
import {hexToRgba} from '@/utils/theme'
|
||||||
import { useRouter } from 'vue-router'
|
import {useRoute, useRouter} from 'vue-router'
|
||||||
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
||||||
import {t} from '@/locales'
|
import {t} from '@/locales'
|
||||||
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
||||||
import ExecutionDetailContent from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
import ExecutionDetailContent
|
||||||
import ParagraphSourceContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
||||||
import ParagraphDocumentContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
import ParagraphSourceContent
|
||||||
|
from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
||||||
|
import ParagraphDocumentContent
|
||||||
|
from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
||||||
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
||||||
import {cloneDeep} from 'lodash'
|
import {cloneDeep} from 'lodash'
|
||||||
import {getFileUrl} from '@/utils/common'
|
import {getFileUrl} from '@/utils/common'
|
||||||
import PdfExport from '@/components/pdf-export/index.vue'
|
import PdfExport from '@/components/pdf-export/index.vue'
|
||||||
|
|
||||||
useResize()
|
useResize()
|
||||||
const pdfExportRef = ref<InstanceType<typeof PdfExport>>()
|
const pdfExportRef = ref<InstanceType<typeof PdfExport>>()
|
||||||
const {common, chatUser} = useStore()
|
const {common, chatUser} = useStore()
|
||||||
|
|
@ -247,6 +251,7 @@ const router = useRouter()
|
||||||
const openPDFExport = () => {
|
const openPDFExport = () => {
|
||||||
pdfExportRef.value?.open(document.getElementById('chatListId'))
|
pdfExportRef.value?.open(document.getElementById('chatListId'))
|
||||||
}
|
}
|
||||||
|
const route = useRoute()
|
||||||
const isCollapse = ref(false)
|
const isCollapse = ref(false)
|
||||||
const isPcCollapse = ref(false)
|
const isPcCollapse = ref(false)
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -260,7 +265,10 @@ watch(
|
||||||
|
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
chatUser.logout().then(() => {
|
chatUser.logout().then(() => {
|
||||||
router.push({ name: 'login' })
|
router.push({
|
||||||
|
name: 'login',
|
||||||
|
query: route.query,
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,7 +307,8 @@ const applicationDetail = computed({
|
||||||
get: () => {
|
get: () => {
|
||||||
return props.application_profile
|
return props.application_profile
|
||||||
},
|
},
|
||||||
set: (v) => {},
|
set: (v) => {
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const chatLogData = ref<any[]>([])
|
const chatLogData = ref<any[]>([])
|
||||||
|
|
@ -578,13 +587,16 @@ function closeExecutionDetail() {
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-pc__right {
|
.chat-pc__right {
|
||||||
width: calc(100vw - 280px);
|
width: calc(100vw - 280px);
|
||||||
--execution-detail-panel-width: 400px;
|
--execution-detail-panel-width: 400px;
|
||||||
|
|
||||||
.execution-detail-panel {
|
.execution-detail-panel {
|
||||||
width: var(--execution-detail-panel-width, 400px);
|
width: var(--execution-detail-panel-width, 400px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1000px) {
|
@media only screen and (max-width: 1000px) {
|
||||||
.chat-width {
|
.chat-width {
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue