forked from github/dataease
Merge pull request #6990 from dataease/pr@dev-v2@fixDatasource
fix: API 数据源更新数据
This commit is contained in:
commit
7669f6c8c1
@ -121,7 +121,7 @@ const initForm = type => {
|
||||
updateType: 'all_scope',
|
||||
syncRate: 'SIMPLE_CRON',
|
||||
simpleCronValue: '1',
|
||||
simpleCronType: 'hour',
|
||||
simpleCronType: 'minute',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
endLimit: '0',
|
||||
@ -363,6 +363,7 @@ const onRateChange = () => {
|
||||
}
|
||||
if (form.value.syncSetting.syncRate === 'SIMPLE_CRON') {
|
||||
form.value.syncSetting.cron = '0 0 0/1 * * ? *'
|
||||
form.value.syncSetting.simpleCronType = 'minute'
|
||||
}
|
||||
if (form.value.syncSetting.syncRate === 'CRON') {
|
||||
form.value.syncSetting.cron = '00 00 * ? * * *'
|
||||
|
@ -42,7 +42,7 @@ const { t } = useI18n()
|
||||
const creatDsFolder = ref()
|
||||
const router = useRouter()
|
||||
const { wsCache } = useCache()
|
||||
|
||||
const dsLoading = ref(false)
|
||||
const state = reactive({
|
||||
datasourceTree: []
|
||||
})
|
||||
@ -394,21 +394,37 @@ const saveDS = () => {
|
||||
if (res) {
|
||||
ElMessageBox.confirm(t('datasource.has_same_ds'), options as ElMessageBoxOptions).then(
|
||||
() => {
|
||||
save(request).then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
}
|
||||
})
|
||||
if (dsLoading.value === true) {
|
||||
return
|
||||
}
|
||||
dsLoading.value = true
|
||||
save(request)
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
dsLoading.value = false
|
||||
})
|
||||
}
|
||||
)
|
||||
} else {
|
||||
save(request).then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
}
|
||||
})
|
||||
if (dsLoading.value === true) {
|
||||
return
|
||||
}
|
||||
dsLoading.value = true
|
||||
save(request)
|
||||
.then(res => {
|
||||
if (res !== undefined) {
|
||||
handleShowFinishPage({ id: res.id, name: res.name })
|
||||
ElMessage.success('保存数据源成功')
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
dsLoading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@ -609,7 +625,7 @@ defineExpose({
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div class="ds-editor" :class="editDs && 'edit-ds'">
|
||||
<div class="ds-editor" :class="editDs && 'edit-ds'" v-loading="dsLoading">
|
||||
<div v-show="activeStep !== 0 && !editDs" class="ds-type-title">
|
||||
{{ typeTitle }}
|
||||
</div>
|
||||
@ -633,7 +649,7 @@ defineExpose({
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-footer">
|
||||
<div class="editor-footer" v-loading="dsLoading">
|
||||
<el-button secondary @click="visible = false"> {{ t('common.cancel') }}</el-button>
|
||||
<el-button
|
||||
v-show="!(activeStep === 0 || (editDs && activeApiStep <= 1))"
|
||||
|
Loading…
Reference in New Issue
Block a user