forked from github/dataease
Merge pull request #12038 from dataease/pr@dev-v2_st
fix(数据源): 创建SQLServer不输入连接字符串提示异常后持续加载,无法恢复
This commit is contained in:
commit
4604864816
@ -459,7 +459,12 @@ defineExpose({
|
||||
class="setting-input"
|
||||
:class="curComponent.timeGranularity === 'datetime' && 'with-date'"
|
||||
>
|
||||
<el-input-number v-model="curComponent.timeNum" :min="0" controls-position="right" />
|
||||
<el-input-number
|
||||
step-strictly
|
||||
v-model="curComponent.timeNum"
|
||||
:min="0"
|
||||
controls-position="right"
|
||||
/>
|
||||
<el-select @focus="handleDialogClick" v-model="curComponent.relativeToCurrentType">
|
||||
<el-option
|
||||
v-for="item in relativeToCurrentTypeList"
|
||||
|
@ -504,11 +504,14 @@ const getDsSchema = () => {
|
||||
const request = JSON.parse(JSON.stringify(form.value))
|
||||
request.configuration = Base64.encode(JSON.stringify(request.configuration))
|
||||
loading.value = true
|
||||
getSchema(request).then(res => {
|
||||
loading.value = false
|
||||
schemas.value = res.data
|
||||
ElMessage.success(t('commons.success'))
|
||||
})
|
||||
getSchema(request)
|
||||
.then(res => {
|
||||
schemas.value = res.data
|
||||
ElMessage.success(t('commons.success'))
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -362,30 +362,33 @@ const validateDS = () => {
|
||||
|
||||
const doValidateDs = request => {
|
||||
dsLoading.value = true
|
||||
validate(request).then(res => {
|
||||
dsLoading.value = false
|
||||
if (res.data.type === 'API') {
|
||||
let error = 0
|
||||
const status = JSON.parse(res.data.status) as Array<{ status: string; name: string }>
|
||||
for (let i = 0; i < status.length; i++) {
|
||||
if (status[i].status === 'Error') {
|
||||
error++
|
||||
}
|
||||
for (let j = 0; j < form.apiConfiguration.length; j++) {
|
||||
if (status[i].name === form.apiConfiguration[j].name) {
|
||||
form.apiConfiguration[j].status = status[i].status
|
||||
validate(request)
|
||||
.then(res => {
|
||||
if (res.data.type === 'API') {
|
||||
let error = 0
|
||||
const status = JSON.parse(res.data.status) as Array<{ status: string; name: string }>
|
||||
for (let i = 0; i < status.length; i++) {
|
||||
if (status[i].status === 'Error') {
|
||||
error++
|
||||
}
|
||||
for (let j = 0; j < form.apiConfiguration.length; j++) {
|
||||
if (status[i].name === form.apiConfiguration[j].name) {
|
||||
form.apiConfiguration[j].status = status[i].status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (error === 0) {
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
if (error === 0) {
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
} else {
|
||||
ElMessage.error('校验失败')
|
||||
}
|
||||
} else {
|
||||
ElMessage.error('校验失败')
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
}
|
||||
} else {
|
||||
ElMessage.success(t('datasource.validate_success'))
|
||||
}
|
||||
})
|
||||
})
|
||||
.finally(() => {
|
||||
dsLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const typeTitle = computed(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user