Skip to content

Commit fcba4c3

Browse files
fix: bug
1 parent 77a8242 commit fcba4c3

File tree

9 files changed

+16
-15
lines changed

9 files changed

+16
-15
lines changed

ui/src/api/knowledge/document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const putDocumentSync: (
230230
"source_file_id": string
231231
}
232232
*/
233-
const postMulDocument: (
233+
const putMulDocument: (
234234
knowledge_id: string,
235235
data: any,
236236
loading?: Ref<boolean>,
@@ -485,7 +485,7 @@ export default {
485485
exportDocumentZip,
486486
putDocumentRefresh,
487487
putDocumentSync,
488-
postMulDocument,
488+
putMulDocument,
489489
delMulDocument,
490490
putBatchGenerateRelated,
491491
putBatchEditHitHandling,

ui/src/api/shared/document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ const putDocumentSync: (
223223
"source_file_id": string
224224
}
225225
*/
226-
const postMulDocument: (
226+
const putMulDocument: (
227227
knowledge_id: string,
228228
data: any,
229229
loading?: Ref<boolean>,
@@ -478,7 +478,7 @@ export default {
478478
exportDocumentZip,
479479
putDocumentRefresh,
480480
putDocumentSync,
481-
postMulDocument,
481+
putMulDocument,
482482
delMulDocument,
483483
putBatchGenerateRelated,
484484
putBatchEditHitHandling,

ui/src/stores/modules-shared-system/document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const useDocumentStore = defineStore('documen', {
1717
})
1818
})
1919
},
20-
async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
20+
async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
2121
return new Promise((resolve, reject) => {
2222
documentApi
23-
.postMulDocument(knowledgeId, data, loading)
23+
.putMulDocument(knowledgeId, data, loading)
2424
.then((data) => {
2525
resolve(data)
2626
})

ui/src/stores/modules/document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const useDocumentStore = defineStore('document', {
1717
})
1818
})
1919
},
20-
async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
20+
async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
2121
return new Promise((resolve, reject) => {
2222
documentApi
23-
.postMulDocument(knowledgeId, data, loading)
23+
.putMulDocument(knowledgeId, data, loading)
2424
.then((data) => {
2525
resolve(data)
2626
})

ui/src/views/document/UploadDocument.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function submit() {
147147
if (id) {
148148
// 上传文档
149149
document
150-
.asyncPostDocument(id as string, documents)
150+
.asyncPutDocument(id as string, documents)
151151
.then(() => {
152152
MsgSuccess(t('common.submitSuccess'))
153153
clearStore()

ui/src/views/document/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ function creatQuickHandle(val: string) {
779779
loading.value = true
780780
const obj = [{ name: val }]
781781
document
782-
.asyncPostDocument(id, obj)
782+
.asyncPutDocument(id, obj)
783783
.then(() => {
784784
getList()
785785
MsgSuccess(t('common.createSuccess'))

ui/src/views/knowledge/KnowledgeSetting.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@
130130
</div>
131131
<el-form-item :label="$t('上传的每个文档最大限制')">
132132
<el-slider
133-
v-model="form.max_paragraph_char_number"
133+
v-model="form.file_count_limit"
134134
show-input
135135
:show-input-controls="false"
136-
:min="500"
137-
:max="100000"
136+
:min="1"
137+
:max="1000"
138138
class="custom-slider"
139139
/>
140140
</el-form-item>
@@ -177,6 +177,7 @@ const form = ref<any>({
177177
app_id: '',
178178
app_secret: '',
179179
folder_token: '',
180+
file_count_limit: 100,
180181
})
181182
182183
const rules = reactive({

ui/src/views/shared/document-shared/UploadDocument.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ function submit() {
148148
if (id) {
149149
// 上传文档
150150
document
151-
.asyncPostDocument(id as string, documents)
151+
.asyncPutDocument(id as string, documents)
152152
.then(() => {
153153
MsgSuccess(t('common.submitSuccess'))
154154
clearStore()

ui/src/views/shared/document-shared/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ function creatQuickHandle(val: string) {
784784
loading.value = true
785785
const obj = [{ name: val }]
786786
document
787-
.asyncPostDocument(id, obj)
787+
.asyncPutDocument(id, obj)
788788
.then(() => {
789789
getList()
790790
MsgSuccess(t('common.createSuccess'))

0 commit comments

Comments
 (0)