mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
Merge pull request #7465 from dataease/pr@dev-v2_dzz
fix: 建议通过创建完上一个数据源后的继续创建操作的默认文件夹仍然保持为同一个
This commit is contained in:
commit
10f2eabc2d
@ -107,7 +107,10 @@ const showAll = ref(true)
|
||||
const datasource = ref()
|
||||
const loading = ref(false)
|
||||
const createDataset = ref(false)
|
||||
const filterMethod = (value, data) => data.name.includes(value)
|
||||
const filterMethod = (value, data) => {
|
||||
if (!data) return false
|
||||
data.name.includes(value)
|
||||
}
|
||||
const resetForm = () => {
|
||||
createDataset.value = false
|
||||
}
|
||||
@ -277,7 +280,7 @@ const saveDataset = () => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
wsCache.set('ds-new-success', true)
|
||||
emits('handleShowFinishPage', res)
|
||||
emits('handleShowFinishPage', { ...res, pid: params.pid })
|
||||
ElMessage.success('保存数据源成功')
|
||||
successCb()
|
||||
}
|
||||
@ -292,7 +295,7 @@ const saveDataset = () => {
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
wsCache.set('ds-new-success', true)
|
||||
emits('handleShowFinishPage', res)
|
||||
emits('handleShowFinishPage', { ...res, pid: params.pid })
|
||||
ElMessage.success('保存数据源成功')
|
||||
successCb()
|
||||
}
|
||||
|
@ -211,7 +211,14 @@ const next = () => {
|
||||
}
|
||||
|
||||
const complete = (params, successCb, finallyCb) => {
|
||||
excel.value.saveExcelDs(params, successCb, finallyCb)
|
||||
excel.value.saveExcelDs(
|
||||
params,
|
||||
() => {
|
||||
pid.value = params.pid
|
||||
successCb()
|
||||
},
|
||||
finallyCb
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
@ -239,8 +246,9 @@ const continueCreating = () => {
|
||||
init(null, pid.value)
|
||||
}
|
||||
|
||||
const handleShowFinishPage = ({ id, name }) => {
|
||||
isShowFinishPage().then(res => {
|
||||
const handleShowFinishPage = ({ id, name, pid }) => {
|
||||
isShowFinishPage()
|
||||
.then(res => {
|
||||
if (editDs.value || !res.data) {
|
||||
emits('refresh')
|
||||
visible.value = false
|
||||
@ -250,13 +258,17 @@ const handleShowFinishPage = ({ id, name }) => {
|
||||
Object.assign(dsInfo, { id, name })
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
pid.value = pid
|
||||
})
|
||||
}
|
||||
|
||||
emitter.on('showFinishPage', handleShowFinishPage)
|
||||
|
||||
const prev = () => {
|
||||
if (currentDsType.value === 'API' && activeApiStep.value === 2) {
|
||||
activeApiStep.value = activeStep.value = 1
|
||||
activeApiStep.value = 1
|
||||
activeStep.value = 1
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user