diff --git a/core/core-backend/src/main/java/io/dataease/datasource/manage/DataSourceManage.java b/core/core-backend/src/main/java/io/dataease/datasource/manage/DataSourceManage.java index 2381557b24..85bb7af0d6 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/manage/DataSourceManage.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/manage/DataSourceManage.java @@ -83,29 +83,10 @@ public class DataSourceManage { return flag; } - private String getName(String type) { - String name = null; - for (DatasourceConfiguration.DatasourceType datasourceType : DatasourceConfiguration.DatasourceType.values()) { - if (datasourceType.getType().equals(type)) { - name = datasourceType.getName(); - } - - } - if (StringUtils.isEmpty(name)) { - List xpackPluginsDatasourceVOS = pluginManage.queryPluginDs(); - List list = xpackPluginsDatasourceVOS.stream().filter(ele -> StringUtils.equals(ele.getType(), type)).toList(); - if (ObjectUtils.isNotEmpty(list)) { - XpackPluginsDatasourceVO first = list.getFirst(); - name = first.getName(); - } - } - return name; - } - private DatasourceNodeBO convert(DataSourceNodePO po) { Integer flag = getFlag(po.getType()); int extraFlag = StringUtils.equalsIgnoreCase("error", po.getStatus()) ? Math.negateExact(flag) : flag; - return new DatasourceNodeBO(po.getId(), po.getName(), !StringUtils.equals(po.getType(), "folder"), 9, po.getPid(), extraFlag, getName(po.getType())); + return new DatasourceNodeBO(po.getId(), po.getName(), !StringUtils.equals(po.getType(), "folder"), 9, po.getPid(), extraFlag, po.getType()); } @XpackInteract(value = "datasourceResourceTree", replace = true, invalid = true) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelDetail.vue index f49bc54e4e..c8bb61d03f 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelDetail.vue @@ -337,68 +337,21 @@ const saveExcelData = (sheetFileMd5, table, params, successCb, finallyCb) => { } else { method = update } - if (new Set(sheetFileMd5).size !== sheetFileMd5.length && !props.param.id) { - ElMessageBox.confirm(t('dataset.merge_title'), { - confirmButtonText: t('dataset.merge'), - tip: t('dataset.task.excel_replace_msg'), - cancelButtonText: t('dataset.no_merge'), - confirmButtonType: 'primary', - type: 'warning', - autofocus: false, - callback: (action: Action) => { - if (action === 'close') return - loading.value = true - table.mergeSheet = action === 'confirm' - if (action === 'confirm') { - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } - - if (action === 'cancel') { - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } - } + if (loading.value) return + loading.value = true + method(table) + .then(res => { + emitter.emit('showFinishPage', res) + successCb?.() + ElMessage({ + message: t('commons.save_success'), + type: 'success' + }) + }) + .finally(() => { + finallyCb?.() + loading.value = false }) - } else { - if (loading.value) return - loading.value = true - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } } const onChange = file => { diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue index 76982eb43b..79bdb04e5f 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/ExcelRemoteDetail.vue @@ -648,68 +648,21 @@ const saveExcelData = (sheetFileMd5, table, params, successCb, finallyCb) => { } else { method = update } - if (new Set(sheetFileMd5).size !== sheetFileMd5.length && !props.form.id) { - ElMessageBox.confirm(t('dataset.merge_title'), { - confirmButtonText: t('dataset.merge'), - tip: t('dataset.task.excel_replace_msg'), - cancelButtonText: t('dataset.no_merge'), - confirmButtonType: 'primary', - type: 'warning', - autofocus: false, - callback: (action: Action) => { - if (action === 'close') return - loading.value = true - table.mergeSheet = action === 'confirm' - if (action === 'confirm') { - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } - - if (action === 'cancel') { - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } - } + if (loading.value) return + loading.value = true + method(table) + .then(res => { + emitter.emit('showFinishPage', res) + successCb?.() + ElMessage({ + message: t('commons.save_success'), + type: 'success' + }) + }) + .finally(() => { + finallyCb?.() + loading.value = false }) - } else { - if (loading.value) return - loading.value = true - method(table) - .then(res => { - emitter.emit('showFinishPage', res) - successCb?.() - ElMessage({ - message: t('commons.save_success'), - type: 'success' - }) - }) - .finally(() => { - finallyCb?.() - loading.value = false - }) - } } defineExpose({