Skip to content

Commit dbf08ab

Browse files
perf: Optimize the folder to enter the second level page and retain records and the first conversation does not display the previous record
1 parent 600cd73 commit dbf08ab

File tree

10 files changed

+232
-116
lines changed

10 files changed

+232
-116
lines changed

ui/src/components/dynamics-form/items/upload/UploadInput.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
>
1212
<el-button type="primary">{{ $t('chat.uploadFile.label') }}</el-button>
1313
<template #file="{ file }">
14-
<el-card style="--el-card-padding: 0" shadow="never">
14+
<el-card style="--el-card-padding: 0" shadow="never" class="upload_content">
1515
<div
1616
class="flex-between"
1717
:class="[inputDisabled ? 'is-disabled' : '']"
@@ -112,13 +112,15 @@ const uploadFile = async (file: any, fileList: Array<any>) => {
112112
})
113113
}
114114
</script>
115-
<style lang="scss">
116-
.is-disabled {
117-
background-color: var(--el-fill-color-light);
118-
color: var(--el-text-color-placeholder);
119-
cursor: not-allowed;
120-
&:hover {
115+
<style lang="scss" scoped>
116+
.upload_content {
117+
.is-disabled {
118+
background-color: var(--el-fill-color-light);
119+
color: var(--el-text-color-placeholder);
121120
cursor: not-allowed;
121+
&:hover {
122+
cursor: not-allowed;
123+
}
122124
}
123125
}
124126
</style>

ui/src/layout/components/breadcrumb/index.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="breadcrumb ml-4 mt-4 mb-12 flex">
3-
<back-button :to="toBackPath" class="mt-4"></back-button>
3+
<back-button @click="toBack"></back-button>
44
<div class="flex align-center">
55
<el-avatar
66
v-if="isApplication"
@@ -30,8 +30,9 @@ import { onBeforeRouteLeave, useRouter, useRoute } from 'vue-router'
3030
import { resetUrl } from '@/utils/common'
3131
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
3232
import useStore from '@/stores'
33-
const { common, application } = useStore()
33+
const { common, folder } = useStore()
3434
const route = useRoute()
35+
const router = useRouter()
3536
3637
const {
3738
meta: { activeMenu },
@@ -104,6 +105,20 @@ function getApplicationDetail() {
104105
})
105106
}
106107
108+
function toBack() {
109+
if (isKnowledge.value) {
110+
folder.setCurrentFolder({
111+
id: folderId,
112+
})
113+
} else if (isApplication.value) {
114+
folder.setCurrentFolder({
115+
id: current.value.folder,
116+
})
117+
}
118+
119+
router.push({ path: toBackPath.value })
120+
}
121+
107122
onMounted(() => {
108123
if (isKnowledge.value) {
109124
getKnowledgeDetail()

0 commit comments

Comments
 (0)