Skip to content

Commit 7541045

Browse files
fix: bug
1 parent ac6716b commit 7541045

File tree

87 files changed

+856
-925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+856
-925
lines changed

ui/src/api/application/chat-log.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const putChatRecordLog: (
127127
loading,
128128
) => {
129129
return put(
130-
`${prefix}/${application_id}/chat/${chart_id}/chat_record/${chart_record_id}/dataset/${knowledge_id}/document/${document_id}/improve`,
130+
`${prefix}/${application_id}/chat/${chart_id}/chat_record/${chart_record_id}/knowledge/${knowledge_id}/document/${document_id}/improve`,
131131
data,
132132
undefined,
133133
loading,
@@ -137,7 +137,7 @@ const putChatRecordLog: (
137137
/**
138138
* 删除标注
139139
* @param 参数
140-
* application_id, chart_id, chart_record_id, dataset_id, document_id,paragraph_id
140+
* application_id, chart_id, chart_record_id, knowledge_id, document_id,paragraph_id
141141
*/
142142
const delMarkChatRecord: (
143143
application_id: String,

ui/src/api/knowledge/paragraph.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const putMigrateMulParagraph: (
225225
loading,
226226
) => {
227227
return put(
228-
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/migrate/dataset/${target_knowledge_id}/document/${target_document_id}`,
228+
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/migrate/knowledge/${target_knowledge_id}/document/${target_document_id}`,
229229
data,
230230
undefined,
231231
loading,
@@ -234,19 +234,19 @@ const putMigrateMulParagraph: (
234234

235235
/**
236236
* 解除某段落关联问题
237-
* @param 参数 dataset_id, document_id,
237+
* @param 参数 knowledge_id, document_id,
238238
* @query data {
239239
* paragraph_id 段落id problem_id 问题id
240240
* }
241241
*/
242242
const putDisassociationProblem: (
243-
dataset_id: string,
243+
knowledge_id: string,
244244
document_id: string,
245245
data: any,
246246
loading?: Ref<boolean>,
247-
) => Promise<Result<boolean>> = (dataset_id, document_id, data, loading) => {
247+
) => Promise<Result<boolean>> = (knowledge_id, document_id, data, loading) => {
248248
return put(
249-
`${prefix}/${dataset_id}/document/${document_id}/paragraph/unassociation`,
249+
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/unassociation`,
250250
{},
251251
data,
252252
loading,

ui/src/api/shared/paragraph.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const putMigrateMulParagraph: (
225225
loading,
226226
) => {
227227
return put(
228-
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/migrate/dataset/${target_knowledge_id}/document/${target_document_id}`,
228+
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/migrate/knowledge/${target_knowledge_id}/document/${target_document_id}`,
229229
data,
230230
undefined,
231231
loading,
@@ -234,19 +234,19 @@ const putMigrateMulParagraph: (
234234

235235
/**
236236
* 解除某段落关联问题
237-
* @param 参数 dataset_id, document_id,
237+
* @param 参数 knowledge_id, document_id,
238238
* @query data {
239239
* paragraph_id 段落id problem_id 问题id
240240
* }
241241
*/
242242
const putDisassociationProblem: (
243-
dataset_id: string,
243+
knowledge_id: string,
244244
document_id: string,
245245
data: any,
246246
loading?: Ref<boolean>,
247-
) => Promise<Result<boolean>> = (dataset_id, document_id, data, loading) => {
247+
) => Promise<Result<boolean>> = (knowledge_id, document_id, data, loading) => {
248248
return put(
249-
`${prefix}/${dataset_id}/document/${document_id}/paragraph/unassociation`,
249+
`${prefix}/${knowledge_id}/document/${document_id}/paragraph/unassociation`,
250250
{},
251251
data,
252252
loading,

ui/src/api/user/user.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Result } from '@/request/Result'
22
import { get, post } from '@/request/index'
3-
import type { User } from '@/api/type/user'
3+
import type { User, ResetPasswordRequest } from '@/api/type/user'
44
import type { Ref } from 'vue'
55

66
/**
@@ -29,12 +29,28 @@ const getProfile: (loading?: Ref<boolean>) => Promise<Result<any>> = (loading) =
2929
/**
3030
* 获取全部用户
3131
*/
32-
const getUserList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (loading) => {
32+
const getUserList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (
33+
loading,
34+
) => {
3335
return get('/user/list', undefined, loading)
3436
}
3537

38+
/**
39+
* 重置密码
40+
* @param request 重置密码请求参数
41+
* @param loading 接口加载器
42+
* @returns
43+
*/
44+
const resetPassword: (
45+
request: ResetPasswordRequest,
46+
loading?: Ref<boolean>,
47+
) => Promise<Result<boolean>> = (request, loading) => {
48+
return post('/user/re_password', request, undefined, loading)
49+
}
50+
3651
export default {
3752
getUserProfile,
3853
getProfile,
39-
getUserList
54+
getUserList,
55+
resetPassword,
4056
}

ui/src/components/ai-chat/ExecutionDetailDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@
151151
</div>
152152
</template>
153153
<!-- 知识库检索 -->
154-
<template v-if="item.type == WorkflowType.SearchDataset">
154+
<template v-if="item.type == WorkflowType.SearchKnowledge">
155155
<div class="card-never border-r-4">
156156
<h5 class="p-8-12">
157157
{{ $t('chat.executionDetails.searchContent') }}

ui/src/components/ai-chat/ParagraphSourceDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ watch(dialogVisible, (bool) => {
5252
const open = (data: any, id?: string) => {
5353
detail.value = cloneDeep(data)
5454
detail.value.paragraph_list = id
55-
? detail.value.paragraph_list.filter((v: any) => v.dataset_id === id)
55+
? detail.value.paragraph_list.filter((v: any) => v.knowledge_id === id)
5656
: detail.value.paragraph_list
5757
detail.value.paragraph_list = arraySort(detail.value.paragraph_list, 'similarity', true)
5858
dialogVisible.value = true

ui/src/components/ai-chat/component/ParagraphCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
<img src="@/assets/knowledge/icon_document.svg" style="width: 58%" alt="" />
4242
</el-avatar>
4343

44-
<span class="ellipsis-1 break-all" :title="data?.dataset_name">
45-
{{ data?.dataset_name }}</span
44+
<span class="ellipsis-1 break-all" :title="data?.knowledge_name">
45+
{{ data?.knowledge_name }}</span
4646
>
4747
</div>
4848
</div>

ui/src/components/dynamics-form/items/complex/ArrayObjectCard.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
:parent_field="formField.field + '.' + index"
1616
></DynamicsForm>
1717
<el-tooltip effect="dark" :content="$t('common.delete')" placement="top">
18-
<el-button text @click.stop="deleteDataset(item)" class="delete-button">
18+
<el-button text @click.stop="deleteKnowledge(item)" class="delete-button">
1919
<el-icon><Delete /></el-icon>
2020
</el-button>
2121
</el-tooltip>
@@ -47,7 +47,7 @@ const props = defineProps<{
4747
const render_data = () => {
4848
return Promise.resolve(Result.success(props.formField.children as Array<FormField>))
4949
}
50-
const deleteDataset = (item: any) => {
50+
const deleteKnowledge = (item: any) => {
5151
_data.value = _data.value.filter((row) => row !== item)
5252
}
5353
const emit = defineEmits(['update:modelValue', 'change'])

ui/src/components/folder-tree/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const handleNodeClick = (data: Tree) => {
8989
}
9090
9191
const handleSharedNodeClick = () => {
92-
treeRef.value?.setCurrentKey(null)
92+
treeRef.value?.setCurrentKey(undefined)
9393
emit('handleNodeClick', { id: 'share', name: t('views.system.share_knowledge') })
9494
}
9595
</script>

ui/src/components/generate-related-dialog/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ import type { FormInstance } from 'element-plus'
8888
8989
const route = useRoute()
9090
const {
91-
params: { id, documentId } // id为datasetID
91+
params: { id, documentId } // id为knowledgeID
9292
} = route as any
9393
9494
const { model, prompt, user } = useStore()
@@ -134,8 +134,8 @@ watch(dialogVisible, (bool) => {
134134
}
135135
})
136136
137-
const open = (ids: string[], type: string, _datasetId?: string) => {
138-
knowledgeId.value = _datasetId
137+
const open = (ids: string[], type: string, _knowledgeId?: string) => {
138+
knowledgeId.value = _knowledgeId
139139
getModel()
140140
idList.value = ids
141141
apiType.value = type

0 commit comments

Comments
 (0)