mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:02:46 +00:00
fix: bug
This commit is contained in:
parent
77a824235f
commit
fcba4c376f
|
|
@ -230,7 +230,7 @@ const putDocumentSync: (
|
|||
"source_file_id": string
|
||||
}
|
||||
*/
|
||||
const postMulDocument: (
|
||||
const putMulDocument: (
|
||||
knowledge_id: string,
|
||||
data: any,
|
||||
loading?: Ref<boolean>,
|
||||
|
|
@ -485,7 +485,7 @@ export default {
|
|||
exportDocumentZip,
|
||||
putDocumentRefresh,
|
||||
putDocumentSync,
|
||||
postMulDocument,
|
||||
putMulDocument,
|
||||
delMulDocument,
|
||||
putBatchGenerateRelated,
|
||||
putBatchEditHitHandling,
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ const putDocumentSync: (
|
|||
"source_file_id": string
|
||||
}
|
||||
*/
|
||||
const postMulDocument: (
|
||||
const putMulDocument: (
|
||||
knowledge_id: string,
|
||||
data: any,
|
||||
loading?: Ref<boolean>,
|
||||
|
|
@ -478,7 +478,7 @@ export default {
|
|||
exportDocumentZip,
|
||||
putDocumentRefresh,
|
||||
putDocumentSync,
|
||||
postMulDocument,
|
||||
putMulDocument,
|
||||
delMulDocument,
|
||||
putBatchGenerateRelated,
|
||||
putBatchEditHitHandling,
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ const useDocumentStore = defineStore('documen', {
|
|||
})
|
||||
})
|
||||
},
|
||||
async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
|
||||
async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
documentApi
|
||||
.postMulDocument(knowledgeId, data, loading)
|
||||
.putMulDocument(knowledgeId, data, loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ const useDocumentStore = defineStore('document', {
|
|||
})
|
||||
})
|
||||
},
|
||||
async asyncPostDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
|
||||
async asyncPutDocument(knowledgeId: string, data: any, loading?: Ref<boolean>) {
|
||||
return new Promise((resolve, reject) => {
|
||||
documentApi
|
||||
.postMulDocument(knowledgeId, data, loading)
|
||||
.putMulDocument(knowledgeId, data, loading)
|
||||
.then((data) => {
|
||||
resolve(data)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ function submit() {
|
|||
if (id) {
|
||||
// 上传文档
|
||||
document
|
||||
.asyncPostDocument(id as string, documents)
|
||||
.asyncPutDocument(id as string, documents)
|
||||
.then(() => {
|
||||
MsgSuccess(t('common.submitSuccess'))
|
||||
clearStore()
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ function creatQuickHandle(val: string) {
|
|||
loading.value = true
|
||||
const obj = [{ name: val }]
|
||||
document
|
||||
.asyncPostDocument(id, obj)
|
||||
.asyncPutDocument(id, obj)
|
||||
.then(() => {
|
||||
getList()
|
||||
MsgSuccess(t('common.createSuccess'))
|
||||
|
|
|
|||
|
|
@ -130,11 +130,11 @@
|
|||
</div>
|
||||
<el-form-item :label="$t('上传的每个文档最大限制')">
|
||||
<el-slider
|
||||
v-model="form.max_paragraph_char_number"
|
||||
v-model="form.file_count_limit"
|
||||
show-input
|
||||
:show-input-controls="false"
|
||||
:min="500"
|
||||
:max="100000"
|
||||
:min="1"
|
||||
:max="1000"
|
||||
class="custom-slider"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -177,6 +177,7 @@ const form = ref<any>({
|
|||
app_id: '',
|
||||
app_secret: '',
|
||||
folder_token: '',
|
||||
file_count_limit: 100,
|
||||
})
|
||||
|
||||
const rules = reactive({
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ function submit() {
|
|||
if (id) {
|
||||
// 上传文档
|
||||
document
|
||||
.asyncPostDocument(id as string, documents)
|
||||
.asyncPutDocument(id as string, documents)
|
||||
.then(() => {
|
||||
MsgSuccess(t('common.submitSuccess'))
|
||||
clearStore()
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ function creatQuickHandle(val: string) {
|
|||
loading.value = true
|
||||
const obj = [{ name: val }]
|
||||
document
|
||||
.asyncPostDocument(id, obj)
|
||||
.asyncPutDocument(id, obj)
|
||||
.then(() => {
|
||||
getList()
|
||||
MsgSuccess(t('common.createSuccess'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue