From 4b6aedf977a71edaab0d3113952dff80f46410d4 Mon Sep 17 00:00:00 2001
From: dataeaseShu
Date: Wed, 17 Jul 2024 17:00:39 +0800
Subject: [PATCH 01/11] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6)?=
=?UTF-8?q?:=20=E8=AE=BE=E7=BD=AE=E5=9B=BA=E5=AE=9A=E9=BB=98=E8=AE=A4?=
=?UTF-8?q?=E5=80=BC=E6=9C=AA=E7=94=9F=E6=95=88=EF=BC=8C=E5=A4=A7=E5=B1=8F?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E7=BC=96=E8=BE=91=E8=BF=87?=
=?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E9=BB=98=E8=AE=A4=E5=80=BC=E5=90=8E?=
=?UTF-8?q?=EF=BC=8C=E7=82=B9=E5=87=BB=E9=A2=84=E8=A7=88=E5=90=8E=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E5=80=BC=E8=A2=AB=E6=B8=85=E7=A9=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/custom-component/v-query/Time.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/core-frontend/src/custom-component/v-query/Time.vue b/core/core-frontend/src/custom-component/v-query/Time.vue
index 7d6c764299..b494f25c0b 100644
--- a/core/core-frontend/src/custom-component/v-query/Time.vue
+++ b/core/core-frontend/src/custom-component/v-query/Time.vue
@@ -132,7 +132,7 @@ const handleValueChange = () => {
: selectValue.value
return
}
- config.value.defaultValue = value
+ config.value.defaultValue = new Date(value).toLocaleString()
}
const init = () => {
From 295d0fe7c651589fd89b6bdab719d54952bab579 Mon Sep 17 00:00:00 2001
From: wisonic
Date: Wed, 17 Jul 2024 17:40:18 +0800
Subject: [PATCH 02/11] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E6=9D=A1=E5=BD=A2=E5=9B=BE=E8=BE=85=E5=8A=A9=E7=BA=BF?=
=?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=B8=B2=E6=9F=93=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/chart/components/js/panel/common/common_antv.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
index eace7b904a..5bc9e3f96f 100644
--- a/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
+++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_antv.ts
@@ -751,7 +751,7 @@ export function getAnalyseHorizontal(chart: Chart) {
dynamicLineFields?.includes(item.fieldId) &&
!!_.find(quotaFields, d => d.id === item.fieldId)
)
- const lines = fixedLines.concat(dynamicLines)
+ const lines = fixedLines.concat(dynamicLines || [])
lines.forEach(ele => {
const value = parseFloat(ele.value)
From fb850d6c4bf506034c2ac4ec3f01f7e9b418764f Mon Sep 17 00:00:00 2001
From: dataeaseShu
Date: Wed, 17 Jul 2024 17:47:05 +0800
Subject: [PATCH 03/11] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE)?=
=?UTF-8?q?:=20=E3=80=90=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=E3=80=91?=
=?UTF-8?q?=E5=AD=97=E4=BD=93=E6=A0=B7=E5=BC=8F=E8=A7=86=E8=A7=89=E4=B8=8A?=
=?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/layout/components/AccountOperator.vue | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/core-frontend/src/layout/components/AccountOperator.vue b/core/core-frontend/src/layout/components/AccountOperator.vue
index 8a5c1b069a..f7f5756283 100644
--- a/core/core-frontend/src/layout/components/AccountOperator.vue
+++ b/core/core-frontend/src/layout/components/AccountOperator.vue
@@ -186,6 +186,7 @@ if (uid.value === '1') {
}
.is-light-top-info {
.uname-span {
+ font-family: "阿里巴巴普惠体 3.0 55 Regular L3";
color: var(--ed-color-black) !important;
}
&:hover {
@@ -209,6 +210,7 @@ if (uid.value === '1') {
border-radius: 50%;
}
.uname-span {
+ font-family: "阿里巴巴普惠体 3.0 55 Regular L3";
font-size: 14px;
color: rgba(255, 255, 255, 0.8);
}
From 831f838effbe1c4b7a9625d5415ffb5efce15aaf Mon Sep 17 00:00:00 2001
From: dataeaseShu
Date: Wed, 17 Jul 2024 18:01:17 +0800
Subject: [PATCH 04/11] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE)?=
=?UTF-8?q?:=20=E3=80=90=E9=A1=B6=E9=83=A8=E5=AF=BC=E8=88=AA=E3=80=91?=
=?UTF-8?q?=E5=AD=97=E4=BD=93=E6=A0=B7=E5=BC=8F=E8=A7=86=E8=A7=89=E4=B8=8A?=
=?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/core-frontend/src/layout/components/AccountOperator.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/core-frontend/src/layout/components/AccountOperator.vue b/core/core-frontend/src/layout/components/AccountOperator.vue
index f7f5756283..2e626eaf0e 100644
--- a/core/core-frontend/src/layout/components/AccountOperator.vue
+++ b/core/core-frontend/src/layout/components/AccountOperator.vue
@@ -186,7 +186,7 @@ if (uid.value === '1') {
}
.is-light-top-info {
.uname-span {
- font-family: "阿里巴巴普惠体 3.0 55 Regular L3";
+ font-family: '阿里巴巴普惠体 3.0 55 Regular L3';
color: var(--ed-color-black) !important;
}
&:hover {
@@ -210,7 +210,7 @@ if (uid.value === '1') {
border-radius: 50%;
}
.uname-span {
- font-family: "阿里巴巴普惠体 3.0 55 Regular L3";
+ font-family: '阿里巴巴普惠体 3.0 55 Regular L3';
font-size: 14px;
color: rgba(255, 255, 255, 0.8);
}
From f7ef95278b2dc6a26543e9c5deb99307d4477595 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Wed, 17 Jul 2024 23:25:57 +0800
Subject: [PATCH 05/11] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF=E3=80=81?=
=?UTF-8?q?=E5=A4=A7=E5=B1=8F):=20=E6=94=AF=E6=8C=81=E5=BA=94=E7=94=A8?=
=?UTF-8?q?=E5=AF=BC=E5=87=BA=E3=80=81=E5=BA=94=E7=94=A8=E5=AF=BC=E5=85=A5?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dataset/manage/DatasetGroupManage.java | 1 +
.../auto/entity/VisualizationTemplate.java | 2 +-
.../mapper/VisualizationTemplateMapper.java | 2 +-
.../server/DataVisualizationServer.java | 104 +++++++++-
.../data-visualization/DvToolbar.vue | 42 +++-
.../modules/data-visualization/dvMain.ts | 13 +-
core/core-frontend/src/utils/canvasUtils.ts | 12 +-
.../editor/dataset-select/DatasetSelect.vue | 23 ++-
.../src/views/common/DeAppApply.vue | 183 +++++++++++++++---
.../src/views/data-visualization/index.vue | 5 +-
.../visualization/DataVisualizationApi.java | 2 +-
.../request/DataVisualizationBaseRequest.java | 14 ++
.../visualization/vo/AppCoreDatasourceVO.java | 5 +
.../vo/VisualizationExport2AppVO.java | 46 +++--
14 files changed, 381 insertions(+), 73 deletions(-)
diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java
index 2fb6c13528..024d821ff2 100644
--- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java
+++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetGroupManage.java
@@ -80,6 +80,7 @@ public class DatasetGroupManage {
private Lock lock = new ReentrantLock();
+ @Transactional
public DatasetGroupInfoDTO save(DatasetGroupInfoDTO datasetGroupInfoDTO, boolean rename) throws Exception {
lock.lock();
try {
diff --git a/core/core-backend/src/main/java/io/dataease/template/dao/auto/entity/VisualizationTemplate.java b/core/core-backend/src/main/java/io/dataease/template/dao/auto/entity/VisualizationTemplate.java
index 5a4ced5f44..31d386df96 100644
--- a/core/core-backend/src/main/java/io/dataease/template/dao/auto/entity/VisualizationTemplate.java
+++ b/core/core-backend/src/main/java/io/dataease/template/dao/auto/entity/VisualizationTemplate.java
@@ -9,7 +9,7 @@ import java.io.Serializable;
*
*
* @author fit2cloud
- * @since 2024-07-16
+ * @since 2024-07-17
*/
@TableName("visualization_template")
public class VisualizationTemplate implements Serializable {
diff --git a/core/core-backend/src/main/java/io/dataease/template/dao/auto/mapper/VisualizationTemplateMapper.java b/core/core-backend/src/main/java/io/dataease/template/dao/auto/mapper/VisualizationTemplateMapper.java
index 28f93143c7..c4ef398bb9 100644
--- a/core/core-backend/src/main/java/io/dataease/template/dao/auto/mapper/VisualizationTemplateMapper.java
+++ b/core/core-backend/src/main/java/io/dataease/template/dao/auto/mapper/VisualizationTemplateMapper.java
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
*
*
* @author fit2cloud
- * @since 2024-07-16
+ * @since 2024-07-17
*/
@Mapper
public interface VisualizationTemplateMapper extends BaseMapper {
diff --git a/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java b/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java
index 1c647fe4fb..1400bfdd28 100644
--- a/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java
+++ b/core/core-backend/src/main/java/io/dataease/visualization/server/DataVisualizationServer.java
@@ -2,8 +2,16 @@ package io.dataease.visualization.server;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.google.gson.Gson;
+import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
import io.dataease.api.visualization.request.VisualizationAppExportRequest;
import io.dataease.api.visualization.vo.*;
+import io.dataease.dataset.dao.auto.entity.CoreDatasetGroup;
+import io.dataease.dataset.dao.auto.entity.CoreDatasetTable;
+import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
+import io.dataease.dataset.dao.auto.mapper.CoreDatasetGroupMapper;
+import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper;
+import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableMapper;
import io.dataease.dataset.manage.DatasetDataManage;
import io.dataease.dataset.manage.DatasetGroupManage;
import io.dataease.extensions.datasource.dto.DatasetTableDTO;
@@ -37,6 +45,7 @@ import io.dataease.template.dao.auto.mapper.VisualizationTemplateMapper;
import io.dataease.template.dao.ext.ExtVisualizationTemplateMapper;
import io.dataease.template.manage.TemplateCenterManage;
import io.dataease.utils.*;
+import io.dataease.visualization.dao.auto.entity.CoreStore;
import io.dataease.visualization.dao.auto.entity.DataVisualizationInfo;
import io.dataease.visualization.dao.auto.entity.VisualizationWatermark;
import io.dataease.visualization.dao.auto.mapper.DataVisualizationInfoMapper;
@@ -45,6 +54,7 @@ import io.dataease.visualization.dao.ext.mapper.ExtDataVisualizationMapper;
import io.dataease.visualization.manage.CoreVisualizationManage;
import jakarta.annotation.Resource;
import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
@@ -104,6 +114,15 @@ public class DataVisualizationServer implements DataVisualizationApi {
@Resource
private ExtVisualizationTemplateMapper appTemplateMapper;
+ @Resource
+ private CoreDatasetGroupMapper coreDatasetGroupMapper;
+
+ @Resource
+ private CoreDatasetTableMapper coreDatasetTableMapper;
+
+ @Resource
+ private CoreDatasetTableFieldMapper coreDatasetTableFieldMapper;
+
@Override
public DataVisualizationVO findCopyResource(Long dvId, String busiFlag) {
DataVisualizationVO result = findById(new DataVisualizationBaseRequest(dvId, busiFlag));
@@ -152,7 +171,84 @@ public class DataVisualizationServer implements DataVisualizationApi {
@DeLog(id = "#p0.id", pid = "#p0.pid", ot = LogOT.CREATE, stExp = "#p0.type")
@Override
@Transactional
- public String saveCanvas(DataVisualizationBaseRequest request) {
+ public String saveCanvas(DataVisualizationBaseRequest request) throws Exception{
+ Long time = System.currentTimeMillis();
+ // 如果是应用 则新进行应用校验 数据集名称和 数据源名称校验
+ VisualizationExport2AppVO appData = request.getAppData();
+ Map dsGroupIdMap = new HashMap<>();
+ Map dsTableIdMap = new HashMap<>();
+ Map dsTableFieldsIdMap = new HashMap<>();
+ if(appData != null){
+ try {
+ Map datasourceIdMap = appData.getDatasourceInfo().stream()
+ .collect(Collectors.toMap(AppCoreDatasourceVO::getId, AppCoreDatasourceVO::getSystemDatasourceId));
+ Long datasetFolderPid = request.getDatasetFolderPid();
+ String datasetFolderName = request.getDatasetFolderName();
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("name", datasetFolderName);
+ queryWrapper.eq("pid", datasetFolderPid);
+ if (coreDatasetGroupMapper.exists(queryWrapper)) {
+ DEException.throwException("当前数据集分组名称已存在");
+ }
+ //新建数据集分组
+ DatasetGroupInfoDTO datasetFolderNewRequest = new DatasetGroupInfoDTO();
+ datasetFolderNewRequest.setName(datasetFolderName);
+ datasetFolderNewRequest.setNodeType("folder");
+ datasetFolderNewRequest.setPid(datasetFolderPid);
+ DatasetGroupInfoDTO datasetFolderNew = datasetGroupManage.save(datasetFolderNewRequest, false);
+ Long datasetFolderNewId = datasetFolderNew.getId();
+ //新建数据集
+ appData.getDatasetGroupsInfo().forEach(appDatasetGroup -> {
+ if ("dataset".equals(appDatasetGroup.getNodeType())) {
+ Long oldId = appDatasetGroup.getId();
+ Long newId = IDUtils.snowID();
+ DatasetGroupInfoDTO datasetNewRequest = new DatasetGroupInfoDTO();
+ BeanUtils.copyBean(datasetNewRequest, appDatasetGroup);
+ datasetNewRequest.setId(newId);
+ datasetNewRequest.setCreateBy(AuthUtils.getUser().getUserId() + "");
+ datasetNewRequest.setUpdateBy(AuthUtils.getUser().getUserId() + "");
+ datasetNewRequest.setCreateTime(time);
+ datasetNewRequest.setLastUpdateTime(time);
+ datasetNewRequest.setPid(datasetFolderNewId);
+ try {
+ datasetGroupManage.innerSave(datasetNewRequest);
+ dsGroupIdMap.put(oldId,newId);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ });
+ // 新建数据集表
+ appData.getDatasetTablesInfo().forEach(appCoreDatasetTableVO -> {
+ Long oldId = appCoreDatasetTableVO.getId();
+ Long newId = IDUtils.snowID();
+ CoreDatasetTable datasetTable = new CoreDatasetTable();
+ BeanUtils.copyBean(datasetTable,appCoreDatasetTableVO);
+ datasetTable.setDatasetGroupId(dsGroupIdMap.get(datasetTable.getDatasetGroupId()));
+ datasetTable.setId(newId);
+ datasetTable.setDatasourceId(datasourceIdMap.get(datasetTable.getDatasourceId()));
+ coreDatasetTableMapper.insert(datasetTable);
+ dsTableIdMap.put(oldId,newId);
+
+ });
+ // 新建数据字段
+ appData.getDatasetTableFieldsInfo().forEach( appDsTableFields ->{
+ Long oldId = appDsTableFields.getId();
+ Long newId = IDUtils.snowID();
+ CoreDatasetTableField dsDsField = new CoreDatasetTableField();
+ BeanUtils.copyBean(dsDsField,appDsTableFields);
+ dsDsField.setDatasetGroupId(dsGroupIdMap.get(dsDsField.getDatasetGroupId()));
+ dsDsField.setDatasetTableId(dsTableIdMap.get(dsDsField.getDatasetTableId()));
+ dsDsField.setDatasourceId(datasourceIdMap.get(dsDsField.getDatasourceId()));
+ dsDsField.setId(newId);
+ coreDatasetTableFieldMapper.insert(dsDsField);
+ dsTableFieldsIdMap.put(oldId,newId);
+ });
+ }catch (Exception e){
+ DEException.throwException("应用创建失败");
+ }
+ }
DataVisualizationInfo visualizationInfo = new DataVisualizationInfo();
BeanUtils.copyBean(visualizationInfo, request);
visualizationInfo.setNodeType(request.getNodeType() == null ? DataVisualizationConstants.NODE_TYPE.LEAF : request.getNodeType());
@@ -168,6 +264,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
}
Long newDvId = coreVisualizationManage.innerSave(visualizationInfo);
request.setId(newDvId);
+ // TODO 还原ID信息
//保存图表信息
chartDataManage.saveChartViewFromVisualization(request.getComponentData(), newDvId, request.getCanvasViewInfo());
return newDvId.toString();
@@ -378,6 +475,11 @@ public class DataVisualizationServer implements DataVisualizationApi {
VisualizationTemplateExtendDataDTO extendDataDTO = new VisualizationTemplateExtendDataDTO(newDvId, newViewId, originViewData);
extendDataInfo.put(newViewId, extendDataDTO);
templateData = templateData.replaceAll(originViewId, newViewId.toString());
+ if(appData != null){
+ Map appDataFormat = JsonUtil.parse(appData,Map.class);
+ String sourceDvId = (String) appDataFormat.get("id");
+ appData = appData.replaceAll(originViewId, newViewId.toString()).replaceAll(sourceDvId, newDvId.toString());
+ }
canvasViewInfo.put(chartView.getId(), chartView);
//插入模板数据 此处预先插入减少数据交互量
VisualizationTemplateExtendData extendData = new VisualizationTemplateExtendData();
diff --git a/core/core-frontend/src/components/data-visualization/DvToolbar.vue b/core/core-frontend/src/components/data-visualization/DvToolbar.vue
index 2c175ab540..b0d73c0694 100644
--- a/core/core-frontend/src/components/data-visualization/DvToolbar.vue
+++ b/core/core-frontend/src/components/data-visualization/DvToolbar.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('datasource.priority') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
index b662c737b9..ef5ac99753 100644
--- a/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
+++ b/core/core-frontend/src/views/visualized/data/datasource/form/index.vue
@@ -2,11 +2,11 @@
import { reactive, ref, computed, watch, nextTick } from 'vue'
import { ElIcon, ElMessage, ElMessageBox, ElMessageBoxOptions } from 'element-plus-secondary'
import CreatDsGroup from './CreatDsGroup.vue'
-import { Icon } from '@/components/icon-custom'
import type { DsType } from './DsTypeList.vue'
import DsTypeList from './DsTypeList.vue'
import { useI18n } from '@/hooks/web/useI18n'
import EditorDetail from './EditorDetail.vue'
+import EditorDetailPlugin from './EditorDetailPlugin.vue'
import ExcelDetail from './ExcelDetail.vue'
import { save, update, validate, latestUse, isShowFinishPage, checkRepeat } from '@/api/datasource'
import { Base64 } from 'js-base64'
@@ -19,6 +19,9 @@ import { useEmitt } from '@/hooks/web/useEmitt'
import FinishPage from '../FinishPage.vue'
import { cloneDeep } from 'lodash-es'
import { useCache } from '@/hooks/web/useCache'
+import Icon from '@/components/icon-custom/src/Icon.vue'
+import { XpackComponent, PluginComponent } from '@/components/plugin'
+
interface Node {
name: string
id: string
@@ -70,6 +73,7 @@ const filterText = ref('')
const currentDsType = ref('')
const emits = defineEmits(['refresh'])
const { emitter } = useEmitt()
+const isPlugin = ref(false)
const selectDsType = (type: string) => {
currentDsType.value = type
activeStep.value = 1
@@ -83,6 +87,7 @@ const selectDsType = (type: string) => {
.some(ele => {
if (ele.type === currentDsType.value) {
dsTree.value.setCurrentNode(ele)
+ isPlugin.value = ele['isPlugin']
return true
}
return false
@@ -93,6 +98,7 @@ const selectDsType = (type: string) => {
const handleDsNodeClick = data => {
if (!data.type) return
selectDsType(data.type)
+ isPlugin.value = data['isPlugin']
}
const handleNodeClick = (data: Node) => {
currentType.value = data.type
@@ -135,25 +141,33 @@ const getDatasourceTypes = () => {
})
}
getDatasourceTypes()
+
+const pluginDs = ref([])
const loadDsPlugin = data => {
+ pluginDs.value = data
data.forEach(item => {
const { name, category, type, icon, extraParams, staticMap } = item
const node = {
name,
- category,
+ catalog: category,
type,
icon,
extraParams,
isPlugin: true,
staticMap
}
-
const index = typeList.findIndex(ele => ele === node.catalog)
if (index !== -1) {
- databaseList[index].push(node)
+ databaseList.value[index].push(node)
}
})
}
+const getPluginStatic = type => {
+ const arr = pluginDs.value.filter(ele => {
+ return ele.type === type
+ })
+ return arr && arr.length > 0 ? arr[0].staticMap?.index : null
+}
const getLatestUseTypes = () => {
latestUse({}).then(res => {
@@ -663,7 +677,8 @@ defineExpose({
-
+
+
{{ node.label }}
@@ -687,8 +702,21 @@ defineExpose({
:form="form"
:editDs="editDs"
:active-step="activeApiStep"
- v-if="activeStep !== 0 && currentDsType && currentDsType !== 'Excel' && visible"
+ v-if="
+ activeStep !== 0 && currentDsType && currentDsType !== 'Excel' && visible && !isPlugin
+ "
>
+
+
@@ -738,6 +766,11 @@ defineExpose({
:name="dsInfo.name"
v-if="showFinishPage"
>
+
+
-