From 9d6b882981f7592efc8e375f8894b8eb183dec54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E5=A4=A7=E9=94=90?= <1070211640@qq.com> Date: Wed, 24 Apr 2024 17:19:46 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=88=AB=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?Tag=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RuoYiManagementPlatformApplication.java | 4 +++- .../com/ruoyi/platform/domain/AssetIcon.java | 4 ++-- .../com/ruoyi/platform/domain/Dataset.java | 23 +++++++++++++++++++ .../java/com/ruoyi/platform/domain/Image.java | 2 +- .../ruoyi/platform/mapper/AssetIconDao.java | 1 + .../platform/service/AssetIconService.java | 9 ++++++++ .../service/impl/AssetIconServiceImpl.java | 9 +++++++- .../service/impl/DatasetServiceImpl.java | 17 +++++++++++++- .../service/impl/ImageServiceImpl.java | 1 + .../managementPlatform/AssetIconDaoMapper.xml | 8 +++++++ .../managementPlatform/DatasetDaoMapper.xml | 7 +++--- .../managementPlatform/ModelsDaoMapper.xml | 2 +- 12 files changed, 77 insertions(+), 10 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java index b3b22ac9..9689cda6 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/RuoYiManagementPlatformApplication.java @@ -17,7 +17,9 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableRyFeignClients @SpringBootApplication @EnableScheduling -public class RuoYiManagementPlatformApplication { +public class + +RuoYiManagementPlatformApplication { public static void main(String[] args) { SpringApplication.run(RuoYiManagementPlatformApplication.class, args); System.out.println("(♥◠‿◠)ノ゙ 复杂智能软件管理平台启动成功 ლ(´ڡ`ლ)゙ \n" + diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java index 5cad60c3..9e45034a 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/AssetIcon.java @@ -19,8 +19,8 @@ public class AssetIcon implements Serializable { /** * 主键 */ -@ApiModelProperty(value = "资产ID") -private Integer id; + @ApiModelProperty(value = "资产ID") + private Integer id; @ApiModelProperty(value = "资产图标名称") private String name; diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java index f55cab11..1c49a7ee 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Dataset.java @@ -76,6 +76,13 @@ public class Dataset implements Serializable { @ApiModelProperty(value = "状态:0失效,1生效") private Integer state; + @ApiModelProperty(value = "数据集类型名字") + private String datasetTypeName; + + @ApiModelProperty(value = "数据集tag名字") + private String datasetTagName; + + public Integer getId() { return id; @@ -165,5 +172,21 @@ public class Dataset implements Serializable { this.state = state; } + public String getDatasetTypeName() { + return datasetTypeName; + } + + public String getDatasetTagName() { + return datasetTagName; + } + + public void setDatasetTagName(String datasetTagName) { + this.datasetTagName = datasetTagName; + } + + public void setDatasetTypeName(String datasetTypeName) { + this.datasetTypeName = datasetTypeName; + } + } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java index 08c5463c..981289a1 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Image.java @@ -118,7 +118,7 @@ public class Image implements Serializable { this.updateTime = updateTime; } - // Getter 和 Setter + public Integer getVersionCount() { return versionCount; } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java index 6e8fea20..d6379aee 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/mapper/AssetIconDao.java @@ -84,5 +84,6 @@ public interface AssetIconDao { List queryByCategoryId(Integer categoryId); + AssetIcon queryByPath(String path); } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java index 3dd35a39..7aa8a4ac 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/AssetIconService.java @@ -22,6 +22,15 @@ public interface AssetIconService { */ AssetIcon queryById(Integer id); + + /** + * 通过path查询单条数据 + * + * @param path 路径 + * @return 实例对象 + */ + AssetIcon queryByPath(String path); + /** * 分页查询 * diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java index 2ba4d300..09610ce8 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/AssetIconServiceImpl.java @@ -2,7 +2,6 @@ package com.ruoyi.platform.service.impl; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.platform.domain.AssetIcon; -import com.ruoyi.platform.domain.Models; import com.ruoyi.platform.mapper.AssetIconDao; import com.ruoyi.platform.service.AssetIconService; import com.ruoyi.system.api.model.LoginUser; @@ -38,6 +37,12 @@ public class AssetIconServiceImpl implements AssetIconService { return this.assetIconDao.queryById(id); } + + @Override + public AssetIcon queryByPath(String path) { + return this.assetIconDao.queryByPath(path); + } + /** * 分页查询 * @@ -125,4 +130,6 @@ public class AssetIconServiceImpl implements AssetIconService { public List queryByCategoryId(Integer categoryId) { return this.assetIconDao.queryByCategoryId(categoryId); } + + } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java index 58487bd8..1f27995c 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java @@ -3,10 +3,12 @@ package com.ruoyi.platform.service.impl; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.platform.annotations.CheckDuplicate; +import com.ruoyi.platform.domain.AssetIcon; import com.ruoyi.platform.domain.Dataset; import com.ruoyi.platform.domain.DatasetVersion; import com.ruoyi.platform.mapper.DatasetDao; import com.ruoyi.platform.mapper.DatasetVersionDao; +import com.ruoyi.platform.service.AssetIconService; import com.ruoyi.platform.service.DatasetService; import com.ruoyi.platform.service.DatasetVersionService; import com.ruoyi.platform.service.MinioService; @@ -58,6 +60,9 @@ public class DatasetServiceImpl implements DatasetService { @Resource private DatasetVersionService datasetVersionService; + @Resource + private AssetIconService assetIconService; + @Resource private MinioService minioService; @@ -77,7 +82,17 @@ public class DatasetServiceImpl implements DatasetService { */ @Override public Dataset queryById(Integer id) { - return this.datasetDao.queryById(id); + + Dataset dataset = this.datasetDao.queryById(id); + String dataType = dataset.getDataType(); + String dataTag = dataset.getDataTag(); + //去资产管理表中查询对应的图标名 + AssetIcon dataTypeAssetIcon = assetIconService.queryByPath(dataType); + AssetIcon dataTagAssetIcon = assetIconService.queryByPath(dataTag); + dataset.setDatasetTypeName(dataTypeAssetIcon.getName()); + dataset.setDatasetTagName(dataTagAssetIcon.getName()); + return dataset; + } /** diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java index 7b4b7775..76d510f5 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ImageServiceImpl.java @@ -316,6 +316,7 @@ public class ImageServiceImpl implements ImageService { String filePath = "/data/argo-workflow/" + bucketName + "/" +path; String logs2 = k8sClientUtil.executeCommand(pod,"docker load -i "+filePath); // 在容器里执行 docker tag name:tag nexus3.kube-system.svc:8083/imageName:imageTag + if (StringUtils.isNoneBlank(logs2)){ String substring = logs2.substring(logs2.indexOf(":")+1).trim(); String tagCmd = "docker tag " + substring + " " + harborUrl + "/" + repository + "/" + username + "/" + imageName + ":" + imageTag; diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml index 21422c29..119c5fa4 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/AssetIconDaoMapper.xml @@ -43,6 +43,13 @@ + + + insert into asset_icon(name, category_id, path, description, create_by, create_time, update_by, update_time, state) values (#{assetIcon.name}, #{assetIcon.categoryId}, #{assetIcon.path}, #{assetIcon.description}, #{assetIcon.createBy}, #{assetIcon.createTime}, #{assetIcon.updateBy}, #{assetIcon.updateTime}, #{assetIcon.state}) diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml index d7a0ec1d..d4bae103 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/DatasetDaoMapper.xml @@ -152,13 +152,13 @@ description = #{dataset.description}, - available_range = #{dataset.availableRange} - , + available_range = #{dataset.availableRange}, + data_type = #{dataset.dataType}, - data_tag = #{dataset.dataTag} + data_tag = #{dataset.dataTag}, create_by = #{dataset.createBy}, @@ -179,6 +179,7 @@ where id = #{dataset.id} + delete from dataset where id = #{id} diff --git a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml index 672f8a37..776cbbac 100644 --- a/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml +++ b/ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ModelsDaoMapper.xml @@ -154,7 +154,7 @@ description = #{models.description}, - available_range = #{models.availableRange} + available_range = #{models.availableRange}, model_type = #{models.modelType}, From c0ae1b1744843c8ce117b25f3448202919bc266d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E5=A4=A7=E9=94=90?= <1070211640@qq.com> Date: Wed, 24 Apr 2024 17:30:00 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=88=AB=E4=BB=A5=E5=8F=8ATag?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/platform/domain/Models.java | 26 +++++++++++++++++++ .../service/impl/DatasetServiceImpl.java | 1 - .../service/impl/ModelsServiceImpl.java | 15 ++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java index b79caea6..87eadc37 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/domain/Models.java @@ -52,6 +52,16 @@ public class Models implements Serializable { private Integer state; + @ApiModelProperty(value = "模型类型名") + private String modelTypeName; + + + + @ApiModelProperty(value = "模型tag名") + private String modelTagName; + + + public Integer getId() { return id; } @@ -158,5 +168,21 @@ public class Models implements Serializable { this.state = state; } + public String getModelTagName() { + return modelTagName; + } + + public void setModelTagName(String modelTagName) { + this.modelTagName = modelTagName; + } + + public String getModelTypeName() { + return modelTypeName; + } + + public void setModelTypeName(String modelTypeName) { + this.modelTypeName = modelTypeName; + } + } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java index 1f27995c..1268fa27 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java @@ -82,7 +82,6 @@ public class DatasetServiceImpl implements DatasetService { */ @Override public Dataset queryById(Integer id) { - Dataset dataset = this.datasetDao.queryById(id); String dataType = dataset.getDataType(); String dataTag = dataset.getDataTag(); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java index 653e9b76..e3b65b1f 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java @@ -1,10 +1,12 @@ package com.ruoyi.platform.service.impl; import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.platform.domain.AssetIcon; import com.ruoyi.platform.domain.Models; import com.ruoyi.platform.domain.ModelsVersion; import com.ruoyi.platform.mapper.ModelsDao; import com.ruoyi.platform.mapper.ModelsVersionDao; +import com.ruoyi.platform.service.AssetIconService; import com.ruoyi.platform.service.MinioService; import com.ruoyi.platform.service.ModelsService; import com.ruoyi.platform.service.ModelsVersionService; @@ -57,6 +59,9 @@ public class ModelsServiceImpl implements ModelsService { @Resource private MinioService minioService; + @Resource + private AssetIconService assetIconService; + // 固定存储桶名 private final String bucketName = "platform-data"; @@ -72,7 +77,15 @@ public class ModelsServiceImpl implements ModelsService { */ @Override public Models queryById(Integer id) { - return this.modelsDao.queryById(id); + Models models = this.modelsDao.queryById(id); + String dataType = models.getModelType(); + String dataTag = models.getModelTag(); + //去资产管理表中查询对应的图标名 + AssetIcon dataTypeAssetIcon = assetIconService.queryByPath(dataType); + AssetIcon dataTagAssetIcon = assetIconService.queryByPath(dataTag); + models.setModelTypeName(dataTypeAssetIcon.getName()); + models.setModelTagName(dataTagAssetIcon.getName()); + return models; } /** From 7938792424ba6936a44cb2ff5ae5c8dd3105b29a Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Wed, 24 Apr 2024 17:30:10 +0800 Subject: [PATCH 3/9] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dglobal=5Fparam?= =?UTF-8?q?=E4=B8=BAnull=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Experiment/experimentText/paramsModal.tsx | 4 +- .../editPipeline/globalParamsDrawer.tsx | 2 +- .../src/pages/Pipeline/editPipeline/index.jsx | 64 ++++++++++++++++--- 3 files changed, 57 insertions(+), 13 deletions(-) diff --git a/react-ui/src/pages/Experiment/experimentText/paramsModal.tsx b/react-ui/src/pages/Experiment/experimentText/paramsModal.tsx index 9a75c2e8..1bdb0cec 100644 --- a/react-ui/src/pages/Experiment/experimentText/paramsModal.tsx +++ b/react-ui/src/pages/Experiment/experimentText/paramsModal.tsx @@ -12,7 +12,7 @@ import styles from './paramsModal.less'; type ParamsModalProps = { open: boolean; onCancel: () => void; - globalParam?: PipelineGlobalParam[]; + globalParam?: PipelineGlobalParam[] | null; }; function ParamsModal({ open, onCancel, globalParam = [] }: ParamsModalProps) { @@ -26,7 +26,7 @@ function ParamsModal({ open, onCancel, globalParam = [] }: ParamsModalProps) { cancelButtonProps={{ style: { display: 'none' } }} >
- {globalParam.map((item) => ( + {globalParam?.map((item) => (
{getParamType(item)} {item.param_value} diff --git a/react-ui/src/pages/Pipeline/editPipeline/globalParamsDrawer.tsx b/react-ui/src/pages/Pipeline/editPipeline/globalParamsDrawer.tsx index 82532a06..7ab95f5d 100644 --- a/react-ui/src/pages/Pipeline/editPipeline/globalParamsDrawer.tsx +++ b/react-ui/src/pages/Pipeline/editPipeline/globalParamsDrawer.tsx @@ -14,7 +14,7 @@ import styles from './globalParamsDrawer.less'; type GlobalParamsDrawerProps = { open: boolean; onClose: () => void; - globalParam: PipelineGlobalParam[]; + globalParam: PipelineGlobalParam[] | null; }; const GlobalParamsDrawer = forwardRef( diff --git a/react-ui/src/pages/Pipeline/editPipeline/index.jsx b/react-ui/src/pages/Pipeline/editPipeline/index.jsx index 948cd364..af9e604c 100644 --- a/react-ui/src/pages/Pipeline/editPipeline/index.jsx +++ b/react-ui/src/pages/Pipeline/editPipeline/index.jsx @@ -281,7 +281,7 @@ const EditPipeline = () => { const getFirstWorkflow = (val) => { getWorkflowById(val).then((ret) => { if (ret && ret.data) { - setGlobalParam(ret.data.global_param); + setGlobalParam(ret.data.global_param || []); } if (graph && ret.data && ret.data.dag) { getGraphData(JSON.parse(ret.data.dag)); @@ -393,6 +393,8 @@ const EditPipeline = () => { // 上下各3,左右各1 [0.5, 0], [0.5, 1], + [0, 0.5], + [1, 0.5], ] ); }, @@ -456,6 +458,7 @@ const EditPipeline = () => { anchorPointIdx: i, // flag the idx of the anchor-point circle links: 0, // cache the number of edges connected to this shape visible: false, // invisible by default, shows up when links > 1 or the node is in showAnchors state + draggable: true, }); }); return image; @@ -503,7 +506,7 @@ const EditPipeline = () => { // config the shouldBegin and shouldEnd to make sure the create-edge is began and ended at anchor-point circles { type: 'create-edge', - // trigger: 'drag', + trigger: 'drag', shouldBegin: (e) => { // avoid beginning at other shapes on the node if (e.target && e.target.get('name') !== 'anchor-point') return false; @@ -619,16 +622,24 @@ const EditPipeline = () => { fitView: true, fitViewPadding: [320, 320, 220, 320], }); - graph.on('dblclick', (e) => { - console.log(e.item); - if (e.item) { - graph.setItemState(e.item, 'nodeClicked', true); - handlerClick(e); + // graph.on('dblclick', (e) => { + // console.log(e.item); + // if (e.item) { + // graph.setItemState(e.item, 'nodeClicked', true); + // handlerClick(e); + // } + // }); + graph.on('node:click', (e) => { + console.log(e.target.get('name')); + if (e.target.get('name') === 'anchor-point') { + // create edge + } else { + if (e.item) { + graph.setItemState(e.item, 'nodeClicked', true); + handlerClick(e); + } } }); - graph.on('click', (e) => { - console.log(e.item); - }); graph.on('aftercreateedge', (e) => { // update the sourceAnchor and targetAnchor for the newly added edge graph.updateItem(e.edge, { @@ -666,6 +677,39 @@ const EditPipeline = () => { }, }); }); + graph.on('node:dragenter', (e) => { + console.log(e.target.get('name')); + console.log('node:dragenter'); + graph.setItemState(e.item, 'nodeSelected', true); + graph.updateItem(e.item, { + // 节点的样式 + style: { + stroke: '#1664ff', + }, + }); + }); + graph.on('node:dragleave', (e) => { + console.log(e.target.get('name')); + console.log('node:dragleave'); + graph.setItemState(e.item, 'nodeSelected', false); + graph.updateItem(e.item, { + // 节点的样式 + style: { + stroke: 'transparent', + }, + }); + }); + graph.on('node:dragstart', (e) => { + console.log('node:dragstart'); + graph.setItemState(e.item, 'nodeSelected', true); + graph.updateItem(e.item, { + // 节点的样式 + style: { + stroke: '#1664ff', + }, + }); + }); + graph.on('afterremoveitem', (e) => { if (e.item && e.item.source && e.item.target) { const sourceNode = graph.findById(e.item.source); From 3eadc4611df28be4496690a56f5d64e719382e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E5=A4=A7=E9=94=90?= <1070211640@qq.com> Date: Wed, 24 Apr 2024 17:35:14 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/platform/service/DatasetService.java | 2 +- .../java/com/ruoyi/platform/service/ModelsService.java | 2 +- .../platform/service/impl/DatasetServiceImpl.java | 8 ++++---- .../ruoyi/platform/service/impl/ModelsServiceImpl.java | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/DatasetService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/DatasetService.java index 1ab61c27..0f8cc707 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/DatasetService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/DatasetService.java @@ -68,7 +68,7 @@ DatasetService { */ boolean deleteById(Integer id); - String removeById(Integer id); + String removeById(Integer id) throws Exception; ResponseEntity downloadDataset(Integer id) throws Exception; diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java index 71f94cb1..c2522728 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ModelsService.java @@ -64,7 +64,7 @@ public interface ModelsService { */ boolean deleteById(Integer id); - String removeById(Integer id); + String removeById(Integer id) throws Exception; ResponseEntity downloadModels(Integer id) throws Exception; diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java index 1268fa27..c919b583 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java @@ -160,10 +160,10 @@ public class DatasetServiceImpl implements DatasetService { } @Override - public String removeById(Integer id) { + public String removeById(Integer id) throws Exception { Dataset dataset = this.datasetDao.queryById(id); if (dataset == null){ - return "数据集不存在"; + throw new Exception("数据集不存在"); } //判断权限,只有admin和创建者本身可以删除该数据集 @@ -171,10 +171,10 @@ public class DatasetServiceImpl implements DatasetService { String username = loginUser.getUsername(); String createdBy = dataset.getCreateBy(); if (!(StringUtils.equals(username,"admin") || StringUtils.equals(username,createdBy))){ - return "无权限删除该数据集版本"; + throw new Exception("无权限删除该数据集"); } if (datasetVersionService.queryByDatasetId(id).size()>0){ - return "请先删除该数据集的版本文件"; + throw new Exception("请先删除该数据集下的版本文件"); } dataset.setState(0); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java index e3b65b1f..39ca7f31 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java @@ -150,23 +150,23 @@ public class ModelsServiceImpl implements ModelsService { } @Override - public String removeById(Integer id) { + public String removeById(Integer id) throws Exception { Models models = this.modelsDao.queryById(id); if (models == null){ - return "模型不存在"; + throw new Exception("模型不存在"); } - //判断权限,只有admin和创建者本身可以删除该数据集 + //判断权限,只有admin和创建者本身可以删除该模型 LoginUser loginUser = SecurityUtils.getLoginUser(); String username = loginUser.getUsername(); String createdBy = models.getCreateBy(); if (!(StringUtils.equals(username,"admin") || StringUtils.equals(username,createdBy))){ - return "无权限删除该模型"; + throw new Exception("无权限删除该模型"); } if (modelsVersionService.queryByModelsId(id).size()>0){ - return "请先删除该模型的版本文件"; + throw new Exception("请先删除该镜像下的版本文件"); } models.setState(0); return this.modelsDao.update(models)>0?"删除成功":"删除失败"; From 3ca9b491cef2ca2616229df0611819ce8a227da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E5=A4=A7=E9=94=90?= <1070211640@qq.com> Date: Thu, 25 Apr 2024 08:51:24 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/platform/controller/dataset/DatasetController.java | 2 +- .../com/ruoyi/platform/controller/model/ModelsController.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/DatasetController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/DatasetController.java index 0f8c6700..cbd87f41 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/DatasetController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/dataset/DatasetController.java @@ -158,7 +158,7 @@ public class DatasetController { */ @DeleteMapping({"{id}"}) @ApiOperation("根据id删除数据集") - public AjaxResult deleteById(@PathVariable("id") Integer id) { + public AjaxResult deleteById(@PathVariable("id") Integer id) throws Exception { return AjaxResult.success(this.datasetService.removeById(id)); } diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/model/ModelsController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/model/ModelsController.java index 7d372bf4..c754c673 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/model/ModelsController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/model/ModelsController.java @@ -161,7 +161,7 @@ public class ModelsController extends BaseController { */ @DeleteMapping("{id}") @ApiOperation("删除模型") - public GenericsAjaxResult deleteById(@PathVariable("id") Integer id) { + public GenericsAjaxResult deleteById(@PathVariable("id") Integer id) throws Exception { return genericsSuccess(this.modelsService.removeById(id)); } From 4065c42374905b323a937377ae9ab5f05d6ee297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A5=BF=E5=A4=A7=E9=94=90?= <1070211640@qq.com> Date: Fri, 26 Apr 2024 09:33:57 +0800 Subject: [PATCH 6/9] =?UTF-8?q?type=E3=80=81tag=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DatasetServiceImpl.java | 27 +++++++++++++------ .../service/impl/ModelsServiceImpl.java | 24 ++++++++++------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java index c919b583..0120caea 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/DatasetServiceImpl.java @@ -83,15 +83,26 @@ public class DatasetServiceImpl implements DatasetService { @Override public Dataset queryById(Integer id) { Dataset dataset = this.datasetDao.queryById(id); - String dataType = dataset.getDataType(); - String dataTag = dataset.getDataTag(); - //去资产管理表中查询对应的图标名 - AssetIcon dataTypeAssetIcon = assetIconService.queryByPath(dataType); - AssetIcon dataTagAssetIcon = assetIconService.queryByPath(dataTag); - dataset.setDatasetTypeName(dataTypeAssetIcon.getName()); - dataset.setDatasetTagName(dataTagAssetIcon.getName()); - return dataset; + if (dataset != null) { + String dataType = dataset.getDataType(); + String dataTag = dataset.getDataTag(); + + // 判空逻辑,只有当dataType和dataTag不为空时,才进行查询 + if (dataType != null && !dataType.isEmpty()) { + AssetIcon dataTypeAssetIcon = assetIconService.queryById(Integer.valueOf(dataType)); + if (dataTypeAssetIcon != null) { + dataset.setDatasetTypeName(dataTypeAssetIcon.getName()); + } + } + if (dataTag != null && !dataTag.isEmpty()) { + AssetIcon dataTagAssetIcon = assetIconService.queryById(Integer.valueOf(dataTag)); + if (dataTagAssetIcon != null) { + dataset.setDatasetTagName(dataTagAssetIcon.getName()); + } + } + } + return dataset; } /** diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java index 39ca7f31..14b1e470 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java @@ -78,13 +78,21 @@ public class ModelsServiceImpl implements ModelsService { @Override public Models queryById(Integer id) { Models models = this.modelsDao.queryById(id); - String dataType = models.getModelType(); - String dataTag = models.getModelTag(); - //去资产管理表中查询对应的图标名 - AssetIcon dataTypeAssetIcon = assetIconService.queryByPath(dataType); - AssetIcon dataTagAssetIcon = assetIconService.queryByPath(dataTag); - models.setModelTypeName(dataTypeAssetIcon.getName()); - models.setModelTagName(dataTagAssetIcon.getName()); + String modelType = models.getModelType(); + String modelTag = models.getModelTag(); + //去资产管理表中查询对应的图标名,注意判空逻辑,只有当dataType和dataTag不为空时,才进行查询 + if(modelType != null && !modelType.isEmpty()){ + AssetIcon modelTypeAssetIcon = assetIconService.queryById(Integer.valueOf(modelType)); + if (modelTypeAssetIcon != null){ + models.setModelTypeName(modelTypeAssetIcon.getName()); + } + } + if(modelTag != null && !modelTag.isEmpty()){ + AssetIcon modelTagAssetIcon = assetIconService.queryById(Integer.valueOf(modelTag)); + if (modelTagAssetIcon != null){ + models.setModelTagName(modelTagAssetIcon.getName()); + } + } return models; } @@ -220,7 +228,6 @@ public class ModelsServiceImpl implements ModelsService { */ @Override public List> uploadModels(MultipartFile[] files, String uuid) throws Exception { - List> results = new ArrayList<>(); for (MultipartFile file:files) { // 构建objectName @@ -245,7 +252,6 @@ public class ModelsServiceImpl implements ModelsService { ModelsVersion version = modelsVersionService.queryByModelsVersion(modelsVersion); - String url = ""; if (version == null) { //插表,因为这里是一次直接插表所以这里定掉date,然后用DAO插入 From 21007ce0389d259a710029e63811fd99b4d08dfe Mon Sep 17 00:00:00 2001 From: liu2592603532 <2592603532@qq.com> Date: Fri, 26 Apr 2024 13:50:01 +0800 Subject: [PATCH 7/9] merge --- react-ui/src/assets/img/delete-icon.png | Bin 0 -> 3295 bytes react-ui/src/assets/img/more-back.png | Bin 0 -> 12881 bytes react-ui/src/pages/Dataset/datasetIntro.jsx | 4 +- react-ui/src/pages/Dataset/index.less | 5 + react-ui/src/pages/Dataset/personalData.jsx | 33 ++++- react-ui/src/pages/Dataset/publicData.jsx | 26 +++- .../Experiment/experimentText/index.less | 25 ++++ .../pages/Experiment/experimentText/props.jsx | 9 +- react-ui/src/pages/Model/index.less | 5 + react-ui/src/pages/Model/modelIntro.jsx | 4 +- react-ui/src/pages/Model/personalData.jsx | 117 +++++++++++++++--- react-ui/src/pages/Model/publicData.jsx | 35 +++++- react-ui/src/services/dataset/index.js | 12 ++ 13 files changed, 247 insertions(+), 28 deletions(-) create mode 100644 react-ui/src/assets/img/delete-icon.png create mode 100644 react-ui/src/assets/img/more-back.png diff --git a/react-ui/src/assets/img/delete-icon.png b/react-ui/src/assets/img/delete-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..335b2c7f3a0eec61056073e598fcf2ecf1884a30 GIT binary patch literal 3295 zcmeHKX*Ane8%NWif?yDPA_*-Gp=xP0#F{@fDy3DK+O>AIyj4<)w3g{2GS(6;^Pjd_ zOBq_k)=KSb7_EI@Qc9}^#qeg{^M06*^X2{Uo--freeSvEd4Bgfzx$l~{BFv*@2y3T z$RFY3;}Zo)7G$1n`*R3Ed2@+#X+F>Jhm)<%_)2>exqN)E9KeF;c*FG*Gw7L*k6hx~ zHwna*?_6$GHud#azU8QPAk!)e?@6LTP+Swe(o86ZJ6=;&)zv5j(Ab~xhaFJTZ@!@= zVv;>iH6OKP!1r@tnjft{MUL%u`LTM91IBwMV^-h_ z5adg2ywb}et0^pF!tmhhkN!@h($Qx*&5TXk+InVs{|g~^`l*;Nmw@+!$DB$!N*EL8 zOGYe2Jm`CGvmOnp&vizSr{h4`>*Od^OC3^h!CG3x^-_z)kLwQ0V?A3Hc9C(!y*u?J zPE|wQ#d$3tYpb?3sNw`{MtjbV(X%yQuhH4Qd(H&9d8F`D51vHvOlmQ~a*w)Au-4x( z@>gQY(32?W7n#r9jMd-4fb&eOU+>5!furOF51D=-H*7!q6nmyO_hY3Kg6(z?!??b) z?wau$h>k3yj;Wn)M(&$sYC}6^Z+m?p7@h_iLt%oaD!tgq8tEE0j$e%=^F^a3cYwL( zle@}Co0GlXHVK;O?3ONk*!%7&g`YNfX}93=U8j2v4eYv#o{cAz!?Z!l?s{&?PYbtP zUCIJq*v!icQn4A02mLnfQyCDv(0%^+W_S~_QjoVk!^fY>Cp;5seo{gJ;jJptt#?KM z!JbX@SB2o)EMy+~MMLn(t)jnK@EA@xt~anD0iW*PP z$JtttBk@YhUGQI^GUnF_Mk&|+_Jw(6lH8$qTbH{80h`z*j9ylY2gN5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PZ>lxXLYSE?YUO8c+AHj=H3qf(Pt20B)1-9t;%SFd>jh}^NP7(F@UN7o%bfsL^y*Q~^e3Uop`UaWOcYC9$ahKGXax?J=^ z>eN93C|i6-;Ixu_JVR!F9aMN9<8F>`OL)_X&A6DvL~*MY{@`C;Xy1L1=TS*j~;xKbYsI@zYQK0dR7Yk a+2j>+U~|&e`z!Cq!UtG>Z&7OIp73un2dnM? literal 0 HcmV?d00001 diff --git a/react-ui/src/assets/img/more-back.png b/react-ui/src/assets/img/more-back.png new file mode 100644 index 0000000000000000000000000000000000000000..b9956ef55fced431b477ffbbf589c244e6d31fdb GIT binary patch literal 12881 zcmYj&c|26@`#;AV%P5o?>amv8*tJ=*O(7++FWIAPS;j8gI8RR~F-6H1gNm#pVk~hg zQnFT}EX_k9vW4v9cTb1Tv?ZZXq478b@_GU^X?WU*3D^zzPd-4n<&KU;n5*qa~S z?FkvoZmW&A8i*pm7yGJ&f=H{M%YG|)siFWSynDdyOi1 zL(2V&ysO*)%I1~;y?njla@yH}S_n&^5+@)sZ>jxOYjfLXz}(fKH=Enhkx6w@)(535{{g(HF*3H7S5O4ee3NEab^rkFF+{hoHHkXelr|T%fO?;bAM#}y0 zkkI72T&@7=sMINcH;-&N@A9!P!=tN&>r<2Vh^G|yh`v)n0b0bd&q?~mY{H<(0j;Y{;GfL*h)3Aiw zxu_O${{;D?Hmx$>A2*#VI$X1s^d+(`5A1k5m*^lyS(m~tCjB~Bv3$$*c`D(P4&Ua( zx!zvY&x3OBv+oRc)9-wqxc~0APrutz+wMQHv6e{Ab~aOf zDEMo1>Sn|c(~pHsbNm1`Q)BezRZXGGS!dPT{&B($t>|ZfRRy#i`Bo)9u;X# zZi8yAbbh_wT<9FK4V3F~=4<4$)u`pTcSgIC`s&}l{J-YKET{IrcE%k3XivTL5w5tU-uej1L%+|$JqsC%3&s+xWKAmzX^q$M=sY9m=nSb$AJ1xwc4vb;_Ne9ho?;AkwUUyeS=G4O=-?0W2C z8!r6l$nuakGl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H*Gmz&Z?oLi zy}Qd}JkOr0dMG(;)Xz>UXpha8c;?TGQIex`@A~3L?{`{+^8Y!t5O801#A;raJ0XG? zA;uxBMaNC-ZeC5e>KdI%uaF4jvo+)b|RdA0g=EO+5@X<{fZX*j$2 z%EV@*@E8cQSh~Li9roAE&(s&8TsB6B zGNrultbSb}*BbA0L9}6~B*y}x1UX!svqiZ4J2QVU{23ZZ*2%W`r%hP?&utU6A+koH zCxuL@8yi_1zrD7tVU0Ta%_eNmZr>UxkRKok-l6CKq{N|N@bY;>*plZ({J9SU#! g@5QJ<+Y$#&AdNYdvT5*tMA**ipVuot { {datasetDetailObj.name}
数据集 id:{datasetDetailObj.id}
-
{datasetDetailObj.data_tag || '...'}
-
{datasetDetailObj.data_type}
+
{datasetDetailObj.dataset_type_name || '...'}
+
{datasetDetailObj.dataset_tag_name || '...'}
diff --git a/react-ui/src/pages/Dataset/index.less b/react-ui/src/pages/Dataset/index.less index 8bd424d8..c1d7a116 100644 --- a/react-ui/src/pages/Dataset/index.less +++ b/react-ui/src/pages/Dataset/index.less @@ -229,6 +229,11 @@ border-color: #eaeaea; border-radius: 4px; cursor: pointer; + .dropdown{ + position: absolute; + right: 20px; + top: 15px; + } .itemText { position: absolute; top: 20px; diff --git a/react-ui/src/pages/Dataset/personalData.jsx b/react-ui/src/pages/Dataset/personalData.jsx index 2df373dd..87f1c2c8 100644 --- a/react-ui/src/pages/Dataset/personalData.jsx +++ b/react-ui/src/pages/Dataset/personalData.jsx @@ -1,14 +1,22 @@ import { getAccessToken } from '@/access'; import clock from '@/assets/img/clock.png'; import creatByImg from '@/assets/img/creatBy.png'; +import deleteIcon from '@/assets/img/delete-icon.png'; import KFIcon from '@/components/KFIcon'; -import { addDatesetAndVesion, getAssetIcon, getDatasetList } from '@/services/dataset/index.js'; +import { + addDatesetAndVesion, + deleteDataset, + getAssetIcon, + getDatasetList, +} from '@/services/dataset/index.js'; import { getDictSelectOption } from '@/services/system/dict'; +import { modalConfirm } from '@/utils/ui'; import { UploadOutlined } from '@ant-design/icons'; import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload } from 'antd'; import moment from 'moment'; import React, { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; + import './index.less'; import Styles from './index.less'; const { Search } = Input; @@ -277,7 +285,30 @@ const PublicData = (React.FC = () => { return (
routeToIntro(e, item)}> {item.name} + { + e.stopPropagation(); + modalConfirm({ + title: '确定删除该条数据集实例吗?', + onOk: () => { + deleteDataset(item.id).then((ret) => { + if (ret.code === 200) { + message.success('删除成功'); + getModelLists(queryFlow); + } else { + message.error(ret.msg); + } + }); + }, + }); + }} + className={Styles.dropdown} + style={{ width: '17px', marginRight: '6px' }} + src={deleteIcon} + alt="" + />
{item.description}
+
{ return (
routeToIntro(e, item)}> {item.name} + { + e.stopPropagation(); + modalConfirm({ + title: '确定删除该条数据集实例吗?', + onOk: () => { + deleteDataset(item.id).then((ret) => { + if (ret.code === 200) { + message.success('删除成功'); + getModelLists(queryFlow); + } else { + message.error(ret.msg); + } + }); + }, + }); + }} + className={Styles.dropdown} + style={{ width: '17px', marginRight: '6px' }} + src={deleteIcon} + alt="" + />
{item.description}
.ant-tabs-nav .ant-tabs-nav-list{ + margin-left: 24px; + } + .ant-drawer .ant-drawer-body{ + overflow-y: hidden; + } + .ant-tabs { + height: calc(100% - 160px); + overflow-y: auto; + } + } + +} .detailBox { display: flex; align-items: center; margin-bottom: 15px; color: #1d1d20; font-size: 15px; + padding-left: 24px; + } .allMessageItem { display: flex; diff --git a/react-ui/src/pages/Experiment/experimentText/props.jsx b/react-ui/src/pages/Experiment/experimentText/props.jsx index 32e660e2..d5ac7999 100644 --- a/react-ui/src/pages/Experiment/experimentText/props.jsx +++ b/react-ui/src/pages/Experiment/experimentText/props.jsx @@ -386,7 +386,7 @@ const Props = forwardRef(({ onParentChange }, ref) => { }, })); return ( - <> +
{ afterOpenChange={afterOpenChange} open={open} width={420} + className={Styles.experimentDrawer} destroyOnClose={true} > -
任务名称:{stagingItem.label}
+
+ 任务名称:{stagingItem.label} +
执行状态:
{
- +
); }); diff --git a/react-ui/src/pages/Model/index.less b/react-ui/src/pages/Model/index.less index 382c5bd0..db39e6b0 100644 --- a/react-ui/src/pages/Model/index.less +++ b/react-ui/src/pages/Model/index.less @@ -219,6 +219,11 @@ border-color: #eaeaea; border-radius: 4px; cursor: pointer; + .dropdown{ + position: absolute; + right: 20px; + top: 15px; + } .itemText { position: absolute; top: 20px; diff --git a/react-ui/src/pages/Model/modelIntro.jsx b/react-ui/src/pages/Model/modelIntro.jsx index 8a66ad17..b9f4f87d 100644 --- a/react-ui/src/pages/Model/modelIntro.jsx +++ b/react-ui/src/pages/Model/modelIntro.jsx @@ -222,8 +222,8 @@ const Dataset = () => { {datasetDetailObj.name}
模型 id:{datasetDetailObj.id}
-
{datasetDetailObj.data_tag || '...'}
-
{datasetDetailObj.data_type}
+
{datasetDetailObj.model_type_name || '...'}
+
{datasetDetailObj.model_tag_name || '...'}
diff --git a/react-ui/src/pages/Model/personalData.jsx b/react-ui/src/pages/Model/personalData.jsx index 2f08f149..cda03a9f 100644 --- a/react-ui/src/pages/Model/personalData.jsx +++ b/react-ui/src/pages/Model/personalData.jsx @@ -1,10 +1,12 @@ import { getAccessToken } from '@/access'; import clock from '@/assets/img/clock.png'; import creatByImg from '@/assets/img/creatBy.png'; +import deleteIcon from '@/assets/img/delete-icon.png'; import KFIcon from '@/components/KFIcon'; -import { addModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; +import { addModel, deleteModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; +import { modalConfirm } from '@/utils/ui'; import { UploadOutlined } from '@ant-design/icons'; -import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload } from 'antd'; +import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload, message } from 'antd'; import moment from 'moment'; import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -54,8 +56,8 @@ const PublicData = () => { }); const [activeType, setActiveType] = useState(null); const [activeTag, setActiveTag] = useState(null); - const [datasetTypeList, setDatasetTypeList] = useState([]); - const [datasetDirectionList, setDatasetDirectionList] = useState([]); + const [modelTypeList, setmodelTypeList] = useState([]); + const [modelDirectionList, setmodelDirectionList] = useState([]); const [isModalOpen, setIsModalOpen] = useState(false); const [datasetList, setDatasetList] = useState([]); const [total, setTotal] = useState(0); @@ -82,11 +84,11 @@ const PublicData = () => { getAssetIcon(params).then((ret) => { console.log(ret); if (ret.code == 200 && ret.data.content && ret.data.content.length > 0) { - setDatasetTypeList(ret.data.content.filter((item) => item.category_id == 3)); - setDatasetDirectionList(ret.data.content.filter((item) => item.category_id == 4)); + setmodelTypeList(ret.data.content.filter((item) => item.category_id == 3)); + setmodelDirectionList(ret.data.content.filter((item) => item.category_id == 4)); } else { - setDatasetTypeList([]); - setDatasetDirectionList([]); + setmodelTypeList([]); + setmodelDirectionList([]); } }); }; @@ -177,8 +179,8 @@ const PublicData = () => { />
模型框架
- {datasetTypeList && datasetTypeList.length > 0 - ? datasetTypeList.map((item) => { + {modelTypeList && modelTypeList.length > 0 + ? modelTypeList.map((item) => { return (
{
模型能力
- {datasetDirectionList && datasetDirectionList.length > 0 - ? datasetDirectionList.map((item) => { + {modelDirectionList && modelDirectionList.length > 0 + ? modelDirectionList.map((item) => { return (
{ {datasetList && datasetList.length > 0 ? datasetList.map((item) => { return ( -
routeToIntro(e, item)}> +
{ + routeToIntro(e, item); + }} + > {item.name} -
{item.description}
+ { + e.stopPropagation(); + modalConfirm({ + title: '确定删除该条模型实例吗?', + onOk: () => { + deleteModel(item.id).then((ret) => { + if (ret.code === 200) { + message.success('删除成功'); + getModelLists(queryFlow); + } else { + message.error(ret.msg); + } + }); + }, + }); + }} + className={Styles.dropdown} + style={{ width: '17px', marginRight: '6px' }} + src={deleteIcon} + alt="" + /> + {/* { + console.log(e); + if (e.key === 'detail') { + routeToIntro(e, item); + } else if (e.key === 'delete') { + modalConfirm({ + title: '确定删除该条模型实例吗?', + onOk: () => { + deleteModel(item.id).then((ret) => { + if (ret.code === 200) { + message.success('删除成功'); + getModelLists(queryFlow); + } else { + message.error(ret.msg); + } + }); + }, + }); + } + }, + }} + > +
+ +
+
*/} + ,
{item.description}
{ ] } > - { + return { value: item.id, label: item.name }; + })} + /> { ] } > - { + return { value: item.id, label: item.name }; + })} + /> diff --git a/react-ui/src/pages/Model/publicData.jsx b/react-ui/src/pages/Model/publicData.jsx index 17313f54..36261368 100644 --- a/react-ui/src/pages/Model/publicData.jsx +++ b/react-ui/src/pages/Model/publicData.jsx @@ -1,7 +1,9 @@ import clock from '@/assets/img/clock.png'; import creatByImg from '@/assets/img/creatBy.png'; -import { getAssetIcon, getModelList } from '@/services/dataset/index.js'; -import { Form, Input, Modal, Pagination, Radio } from 'antd'; +import deleteIcon from '@/assets/img/delete-icon.png'; +import { deleteModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; +import { modalConfirm } from '@/utils/ui'; +import { Form, Input, Modal, Pagination, Radio, message } from 'antd'; import moment from 'moment'; import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -224,8 +226,35 @@ const PublicData = () => { {datasetList && datasetList.length > 0 ? datasetList.map((item) => { return ( -
routeToIntro(e, item)}> +
{ + routeToIntro(e, item); + }} + > {item.name} + { + e.stopPropagation(); + modalConfirm({ + title: '确定删除该条模型实例吗?', + onOk: () => { + deleteModel(item.id).then((ret) => { + if (ret.code === 200) { + message.success('删除成功'); + getModelLists(queryFlow); + } else { + message.error(ret.msg); + } + }); + }, + }); + }} + className={Styles.dropdown} + style={{ width: '17px', marginRight: '6px' }} + src={deleteIcon} + alt="" + />
{item.description}
Date: Fri, 26 Apr 2024 14:09:38 +0800 Subject: [PATCH 8/9] =?UTF-8?q?fix:=20g6=20=E5=8F=8C=E5=87=BB=E6=94=B9?= =?UTF-8?q?=E5=8D=95=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/Experiment/experimentText/index.jsx | 19 ++----- .../src/pages/Pipeline/editPipeline/index.jsx | 51 ++++--------------- 2 files changed, 13 insertions(+), 57 deletions(-) diff --git a/react-ui/src/pages/Experiment/experimentText/index.jsx b/react-ui/src/pages/Experiment/experimentText/index.jsx index baa5bd04..a5ed2ffc 100644 --- a/react-ui/src/pages/Experiment/experimentText/index.jsx +++ b/react-ui/src/pages/Experiment/experimentText/index.jsx @@ -68,19 +68,9 @@ function ExperimentText() { }; const formChange = (val) => {}; const handlerClick = (e) => { - console.log(propsRef, graph, messageRef.current); - // let cache = []; - // let json_str = JSON.stringify(graph, function(key, value) { - // if (typeof value === 'object' && value !== null) { - // if (cache.indexOf(value) !== -1) { - // return; - // } - // cache.push(value); - // } - // return value; - // }); - // console.log(json_str); - propsRef.current.showDrawer(e, locationParams.id, messageRef.current); + if (e.target.get('name') !== 'anchor-point' && e.item) { + propsRef.current.showDrawer(e, locationParams.id, messageRef.current); + } }; const getGraphData = (data) => { if (graph) { @@ -387,8 +377,7 @@ function ExperimentText() { fitView: true, fitViewPadding: [320, 320, 220, 320], }); - - graph.on('dblclick', handlerClick); + graph.on('node:click', handlerClick); window.onresize = () => { if (!graph || graph.get('destroyed')) return; if (!graphRef.current || !graphRef.current.scrollWidth || !graphRef.current.scrollHeight) diff --git a/react-ui/src/pages/Pipeline/editPipeline/index.jsx b/react-ui/src/pages/Pipeline/editPipeline/index.jsx index af9e604c..406468e3 100644 --- a/react-ui/src/pages/Pipeline/editPipeline/index.jsx +++ b/react-ui/src/pages/Pipeline/editPipeline/index.jsx @@ -128,18 +128,7 @@ const EditPipeline = () => { }; const handlerClick = (e) => { e.stopPropagation(); - console.log(propsRef, graph); - // let cache = []; - // let json_str = JSON.stringify(graph, function(key, value) { - // if (typeof value === 'object' && value !== null) { - // if (cache.indexOf(value) !== -1) { - // return; - // } - // cache.push(value); - // } - // return value; - // }); - // console.log(json_str); + // console.log(propsRef, graph); propsRef.current.showDrawer(e); }; const getGraphData = (data) => { @@ -353,7 +342,7 @@ const EditPipeline = () => { // this.graph.setItemState(e.item, 'showAnchors', false); graph.setItemState(e.item, 'nodeSelected', false); }); - graph.off('dblclick', handlerClick); + // graph.off('dblclick', handlerClick); }; }, []); const initGraph = () => { @@ -390,32 +379,15 @@ const EditPipeline = () => { getAnchorPoints(cfg) { return ( cfg.anchorPoints || [ - // 上下各3,左右各1 - [0.5, 0], - [0.5, 1], + // 四个 + // [0.5, 0], + // [0.5, 1], [0, 0.5], [1, 0.5], ] ); }, - // draw(cfg, group) { - - // let rect=group.addShape('text', { - // attrs: { - // text: fittingString(cfg.label, 110, 15), - // x: 90 - getTextSize(cfg.label, 110, 15), - // y: 0, - // fontSize: 10, - // textAlign: 'center', - // textBaseline: 'middle', - // fill:'#000' - // }, - // name: 'text-shape', - // }); - // return rect; - // }, afterDraw(cfg, group) { - // console.log(group, cfg, 12312); const image = group.addShape('image', { attrs: { x: -45, @@ -444,7 +416,6 @@ const EditPipeline = () => { } const bbox = group.getBBox(); const anchorPoints = this.getAnchorPoints(cfg); - // console.log(anchorPoints); anchorPoints.forEach((anchorPos, i) => { group.addShape('circle', { attrs: { @@ -578,7 +549,7 @@ const EditPipeline = () => { }, defaultEdge: { // type: 'quadratic', - type: 'cubic-vertical', + // type: 'cubic-vertical', style: { endArrow: { @@ -631,13 +602,9 @@ const EditPipeline = () => { // }); graph.on('node:click', (e) => { console.log(e.target.get('name')); - if (e.target.get('name') === 'anchor-point') { - // create edge - } else { - if (e.item) { - graph.setItemState(e.item, 'nodeClicked', true); - handlerClick(e); - } + if (e.target.get('name') !== 'anchor-point' && e.item) { + graph.setItemState(e.item, 'nodeClicked', true); + handlerClick(e); } }); graph.on('aftercreateedge', (e) => { From c2fcd65d09c07bc41f2a7414cf252ae71cb4a907 Mon Sep 17 00:00:00 2001 From: liu2592603532 <2592603532@qq.com> Date: Fri, 26 Apr 2024 14:48:04 +0800 Subject: [PATCH 9/9] merge --- react-ui/src/pages/Experiment/index.jsx | 4 ++++ react-ui/src/pages/Model/personalData.jsx | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/react-ui/src/pages/Experiment/index.jsx b/react-ui/src/pages/Experiment/index.jsx index d8ac8f95..69748b4e 100644 --- a/react-ui/src/pages/Experiment/index.jsx +++ b/react-ui/src/pages/Experiment/index.jsx @@ -69,6 +69,7 @@ function Experiment() { return { ...item, key: item.id }; }), ); + setTotal(res.data.totalElements); } }; @@ -82,6 +83,7 @@ function Experiment() { // 获取实验实例 const getQueryByExperiment = (val) => { getQueryByExperimentId(val).then((ret) => { + console.log(val); setExpandedRowKeys(val); if (ret && ret.data && ret.data.length > 0) { try { @@ -159,6 +161,7 @@ function Experiment() { }; const expandChange = (e, record) => { clearExperimentInTimers(); + console.log(e, record); if (record.id === expandedRowKeys) { setExpandedRowKeys(null); } else { @@ -517,6 +520,7 @@ function Experiment() { : ''}
), + onExpand: (e, a) => { expandChange(e, a); }, diff --git a/react-ui/src/pages/Model/personalData.jsx b/react-ui/src/pages/Model/personalData.jsx index 096c4850..9595c6f1 100644 --- a/react-ui/src/pages/Model/personalData.jsx +++ b/react-ui/src/pages/Model/personalData.jsx @@ -6,11 +6,7 @@ import KFIcon from '@/components/KFIcon'; import { addModel, deleteModel, getAssetIcon, getModelList } from '@/services/dataset/index.js'; import { modalConfirm } from '@/utils/ui'; import { UploadOutlined } from '@ant-design/icons'; -<<<<<<< HEAD -import { Button, Form, Input, Modal, Pagination, Radio, Select, Upload, message } from 'antd'; -======= -import { Button, Form, Input, Modal, Pagination, Select, Upload } from 'antd'; ->>>>>>> 4065c42374905b323a937377ae9ab5f05d6ee297 +import { Button, Form, Input, Modal, Pagination, Select, Upload, message } from 'antd'; import moment from 'moment'; import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom';