fix: 解决build报错

This commit is contained in:
shaohuzhang1 2024-07-19 18:51:14 +08:00
parent de0d93e6ca
commit 6ed619f00b

View File

@ -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() {