Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-fe
Commits
65c1c1f2
Commit
65c1c1f2
authored
Oct 25, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 知识库切片查询优化
parent
1bd7f85b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
document-detail.vue
...ews/personal-space/personal-knowledge/document-detail.vue
+21
-22
No files found.
src/views/personal-space/personal-knowledge/document-detail.vue
View file @
65c1c1f2
...
@@ -108,8 +108,6 @@ async function handleGetKnowledgeChunkList() {
...
@@ -108,8 +108,6 @@ async function handleGetKnowledgeChunkList() {
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
pagingInfo
.
value
=
res
.
pagingInfo
as
PaginationInfo
knowledgeChunkListLoading
.
value
=
false
knowledgeChunkListLoading
.
value
=
false
isSearchEmptyList
.
value
=
!!
searchKnowledgeChunkValue
.
value
&&
pagingInfo
.
value
.
totalRows
===
0
isSearchEmptyList
.
value
=
!!
searchKnowledgeChunkValue
.
value
&&
pagingInfo
.
value
.
totalRows
===
0
scrollBarRef
.
value
?.
scrollTo
({
top
:
0
})
}
}
}
}
...
@@ -120,17 +118,20 @@ function handleBackKnowledgeDocumentList() {
...
@@ -120,17 +118,20 @@ function handleBackKnowledgeDocumentList() {
async
function
handleGetKnowledgeChunkListUpdatePageNo
(
pageNo
:
number
)
{
async
function
handleGetKnowledgeChunkListUpdatePageNo
(
pageNo
:
number
)
{
pagingInfo
.
value
.
pageNo
=
pageNo
pagingInfo
.
value
.
pageNo
=
pageNo
await
handleGetKnowledgeChunkList
()
await
handleGetKnowledgeChunkList
()
scrollBarRef
.
value
?.
scrollTo
({
top
:
0
})
}
}
async
function
handleGetKnowledgeChunkListUpdatePageSize
(
pageSize
:
number
)
{
async
function
handleGetKnowledgeChunkListUpdatePageSize
(
pageSize
:
number
)
{
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
pageSize
=
pageSize
pagingInfo
.
value
.
pageSize
=
pageSize
await
handleGetKnowledgeChunkList
()
await
handleGetKnowledgeChunkList
()
scrollBarRef
.
value
?.
scrollTo
({
top
:
0
})
}
}
async
function
handleSearchKnowledgeChunkList
()
{
async
function
handleSearchKnowledgeChunkList
()
{
pagingInfo
.
value
.
pageNo
=
1
pagingInfo
.
value
.
pageNo
=
1
await
handleGetKnowledgeChunkList
()
await
handleGetKnowledgeChunkList
()
scrollBarRef
.
value
?.
scrollTo
({
top
:
0
})
}
}
function
handleEditKnowledgeChunkModal
(
chunkItem
:
KnowledgeChunkItem
)
{
function
handleEditKnowledgeChunkModal
(
chunkItem
:
KnowledgeChunkItem
)
{
...
@@ -204,7 +205,7 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
...
@@ -204,7 +205,7 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
})
})
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
await
handleGetKnowledgeChunkList
()
chunkItem
.
isOpen
=
isOpen
===
'Y'
?
'N'
:
'Y'
}
}
}
}
</
script
>
</
script
>
...
@@ -253,25 +254,23 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
...
@@ -253,25 +254,23 @@ async function handleUpdateOpenKnowledgeChunk(chunkItem: KnowledgeChunkItem) {
</div>
</div>
<n-spin
:show=
"knowledgeChunkListLoading"
class=
"w-full flex-1 overflow-hidden"
content-class=
"flex w-full h-full"
>
<n-spin
:show=
"knowledgeChunkListLoading"
class=
"w-full flex-1 overflow-hidden"
content-class=
"flex w-full h-full"
>
<n-scrollbar
<div
v-if=
"knowledgeChunkList.length"
class=
"flex flex-1"
>
v-if=
"!knowledgeChunkListLoading && knowledgeChunkList.length"
<n-scrollbar
v-show=
"!knowledgeChunkListLoading"
ref=
"scrollBarRef"
class=
"grid w-full flex-1 overflow-hidden"
>
ref=
"scrollBarRef"
<div
class=
"grid gap-5"
>
class=
"grid w-full flex-1 overflow-hidden"
<KnowledgeChuckItem
>
v-for=
"chunkItem in knowledgeChunkList"
<div
class=
"grid gap-5"
>
:key=
"chunkItem.chunkRelationId"
<KnowledgeChuckItem
:chunk-item=
"chunkItem"
v-for=
"chunkItem in knowledgeChunkList"
:total-chunk=
"totalChunk"
:key=
"chunkItem.chunkRelationId"
@
edit=
"handleEditKnowledgeChunkModal"
:chunk-item=
"chunkItem"
@
up-add-chunk=
"handleShowUpAddChunkModal"
:total-chunk=
"totalChunk"
@
down-add-chunk=
"handleShowDownAddChunkModal"
@
edit=
"handleEditKnowledgeChunkModal"
@
delete=
"handleDeleteKnowledgeChunk"
@
up-add-chunk=
"handleShowUpAddChunkModal"
@
update-open=
"handleUpdateOpenKnowledgeChunk"
@
down-add-chunk=
"handleShowDownAddChunkModal"
/>
@
delete=
"handleDeleteKnowledgeChunk"
</div>
@
update-open=
"handleUpdateOpenKnowledgeChunk"
</n-scrollbar>
/>
</div>
</div>
</n-scrollbar>
<div
<div
v-show=
"!knowledgeChunkListLoading && knowledgeChunkList.length === 0"
v-show=
"!knowledgeChunkListLoading && knowledgeChunkList.length === 0"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment