fix: 解决build报错
This commit is contained in:
parent
de0d93e6ca
commit
6ed619f00b
@ -60,7 +60,6 @@ const loading = ref(false)
|
|||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
const active = ref(0)
|
const active = ref(0)
|
||||||
const successInfo = ref<any>(null)
|
const successInfo = ref<any>(null)
|
||||||
|
|
||||||
async function next() {
|
async function next() {
|
||||||
disabled.value = true
|
disabled.value = true
|
||||||
if (await UploadComponentRef.value.validate()) {
|
if (await UploadComponentRef.value.validate()) {
|
||||||
@ -78,15 +77,6 @@ async function next() {
|
|||||||
clearStore()
|
clearStore()
|
||||||
router.push({ path: `/dataset/${id}/document` })
|
router.push({ path: `/dataset/${id}/document` })
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
// QA知识库创建
|
|
||||||
fd.append('name', baseInfo.value?.name as string)
|
|
||||||
fd.append('desc', baseInfo.value?.desc as string)
|
|
||||||
|
|
||||||
datasetApi.postQADataset(fd, loading).then((res) => {
|
|
||||||
successInfo.value = res.data
|
|
||||||
active.value = 2
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (active.value++ > 2) active.value = 0
|
if (active.value++ > 2) active.value = 0
|
||||||
@ -117,7 +107,7 @@ function submit() {
|
|||||||
paragraphs: item.content
|
paragraphs: item.content
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const obj = { ...baseInfo.value, documents } as datasetData
|
|
||||||
if (id) {
|
if (id) {
|
||||||
// 上传文档
|
// 上传文档
|
||||||
document
|
document
|
||||||
@ -130,12 +120,6 @@ function submit() {
|
|||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
datasetApi.postDataset(obj, loading).then((res) => {
|
|
||||||
successInfo.value = res.data
|
|
||||||
active.value = 2
|
|
||||||
clearStore()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function back() {
|
function back() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user