diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue index ec3d448..bf84201 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoContent.vue @@ -2,10 +2,15 @@ import icon_expandRight_filled from '@/assets/svg/icon_expand-right_filled.svg' import { ref } from 'vue' import { propTypes } from '@/utils/propTypes' +import { timestampFormatDate } from '../dataset/form/util' +import { useI18n } from '@/hooks/web/useI18n' defineProps({ - name: propTypes.string.def('') + name: propTypes.string.def(''), + time: propTypes.number.def(0), + showTime: propTypes.bool.def(false) }) const active = ref(true) +const { t } = useI18n() defineExpose({ active }) @@ -13,13 +18,15 @@ defineExpose({ @@ -61,7 +68,12 @@ defineExpose({ line-height: 24px; margin-left: 8px; } - + .time { + color: #8f959e; + font-size: 14px; + line-height: 22px; + padding: 0 0 0 8px; + } &.active { .title { .ed-icon { diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue index d013785..cca145e 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/BaseInfoItem.vue @@ -7,10 +7,10 @@ defineProps({ diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue b/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue index ad2bdb6..4984a01 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/ExcelInfo.vue @@ -1,7 +1,7 @@ + + + + diff --git a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue index 0110386..391b99f 100644 --- a/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue +++ b/core/core-frontend/src/viewsnew/application/service/datasource/form/ApiHttpRequestDraw.vue @@ -190,7 +190,17 @@ const initApiItem = ( ) => { pluginDs.value = pluginDsList pluginIndex.value = indexPlugin - isPlugin.value = isPluginDs + if (!isPluginDs) { + const arr = pluginDs.value.filter(ele => { + return ele.type === from.type + }) + if (arr && arr.length > 0) { + isPlugin.value = true + } + } else { + isPlugin.value = isPluginDs + } + copyItem.value = val.copy copyDs.value = from.copy dsType.value = from.type @@ -354,6 +364,12 @@ const saveItem = () => { } } returnAPIItem('returnItem', cloneDeep(apiItem)) + if (isPlugin.value) { + xpackApiItemBasicInfo?.value?.invokeMethod({ + methodName: 'resetForm', + args: [] + }) + } edit_api_item.value = false } const before = () => { @@ -450,12 +466,14 @@ const validateItem = () => { } cancelMap['/datasource/checkApiDatasource']?.() const params = Base64.encode(JSON.stringify(paramsList)) + formLoading.value = true checkApiItem({ dsType: dsType.value, data: Base64.encode(JSON.stringify(apiItem)), paramsList: params }) .then(response => { + formLoading.value = false apiItem.jsonFields = response.data.jsonFields apiItem.fields = [] apiItem.name = response.data.name @@ -464,6 +482,7 @@ const validateItem = () => { ElMessage.success(t('datasource.validate_success')) }) .catch(() => { + formLoading.value = false ElMessage.error(t('data_source.verification_failed')) }) } @@ -483,6 +502,12 @@ const handleSubmit = param => { const closeEditItem = () => { cancelMap['/datasource/checkApiDatasource']?.() + if (isPlugin.value) { + xpackApiItemBasicInfo?.value?.invokeMethod({ + methodName: 'resetForm', + args: [] + }) + } edit_api_item.value = false } @@ -645,35 +670,25 @@ defineExpose({ activeName === 'table' ? t('datasource.data_table') : t('data_source.interface_parameters') " v-model="edit_api_item" - custom-class="api-datasource-drawer" + modal-class="api-datasource-drawer" size="1000px" :before-close="closeEditItem" direction="rtl" > -
- +
+ -