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