fix: 高级分段添加类型限制,patterns数据传参修改
This commit is contained in:
parent
edf46204a8
commit
fdd96e39bd
@ -80,10 +80,16 @@ const loading = ref(false)
|
|||||||
const paragraphList = ref<any[]>([])
|
const paragraphList = ref<any[]>([])
|
||||||
const patternLoading = ref<boolean>(false)
|
const patternLoading = ref<boolean>(false)
|
||||||
|
|
||||||
const form = reactive<any>({
|
const form = reactive<{
|
||||||
patterns: [] as any,
|
patterns: Array<string>,
|
||||||
|
limit: number,
|
||||||
|
with_filter: boolean,
|
||||||
|
[propName: string]: any
|
||||||
|
}>({
|
||||||
|
patterns: [],
|
||||||
limit: 0,
|
limit: 0,
|
||||||
with_filter: false
|
with_filter: false,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function splitDocument() {
|
function splitDocument() {
|
||||||
@ -96,7 +102,11 @@ function splitDocument() {
|
|||||||
})
|
})
|
||||||
if (radio.value === '2') {
|
if (radio.value === '2') {
|
||||||
Object.keys(form).forEach((key) => {
|
Object.keys(form).forEach((key) => {
|
||||||
fd.append(key, form[key])
|
if (key == 'patterns') {
|
||||||
|
form.patterns.forEach(item => fd.append('patterns', item))
|
||||||
|
} else {
|
||||||
|
fd.append(key, form[key])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
DatasetApi.postSplitDocument(fd)
|
DatasetApi.postSplitDocument(fd)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user