From 515857e3ff203f6973da37183ba95c47c1d6fbce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=9A=E5=88=99?= Date: Mon, 11 Sep 2023 16:06:34 +0800 Subject: [PATCH 1/9] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=9B=BE=E5=88=86?= =?UTF-8?q?=E6=9E=90=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/studio/tugraph/global.less | 2 + .../src/client/GI_EXPORT_FILES.ts | 87 ++++++++++++++----- 2 files changed, 66 insertions(+), 23 deletions(-) diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less index ea66af9e..d9e71ae4 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less @@ -41,6 +41,8 @@ .gi-rich-container .gi-rich-container-toolbar { border-bottom: none !important; + box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.04), 0px 1px 6px -1px rgba(0, 0, 0, 0.04), 0px 2px 4px 0 rgba(0, 0, 0, 0.04); + z-index: 12; .toolbar-item { .anticon { svg { diff --git a/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts b/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts index 4d50d9f7..ce526ac3 100644 --- a/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts +++ b/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts @@ -33,7 +33,8 @@ export default { "TuGraphBack", "TuGraphStatisticsFilter", "TuGraphStyleSetting", - "ZoomStatus" + "ZoomStatus", + "TuGraphPathQuery" ], "layouts": [ "Force2", @@ -564,7 +565,7 @@ export default { { "id": "TuGraphStyleSetting", "type": "GIAC_CONTENT", - "name": "样式设置", + "name": "业务样式设置", "props": { "localServiceId": "TuGraph-DB/saveElementStyleToLocalService", "schemaServiceId": "TuGraph-DB/graphSchemaService", @@ -577,6 +578,7 @@ export default { "isShowIcon": true, "icon": "icon-tugraph-styling", "isShowTooltip": true, + "tooltip": "根据点上的属性值可指定颜色、大小、形状", "tooltipColor": "rgba(0,0,0,1)", "tooltipPlacement": "right", "hasDivider": false, @@ -593,8 +595,7 @@ export default { ], "containerWidth": "350px", "containerHeight": "calc(100% - 100px)", - "contaienrMask": false, - "tooltip": "根据点上的属性值可指定颜色、大小、形状" + "contaienrMask": false } } }, @@ -606,6 +607,48 @@ export default { "minZoom": 0.6, "statusName": "minZoom" } + }, + { + "id": "TuGraphPathQuery", + "type": "GIAC_CONTENT", + "name": "TuGraph 路径查询", + "props": { + "nodeSelectionMode": [ + "List", + "" + ], + "pathNodeLabel": "id", + "hasDirection": false, + "hasMaxDeep": false, + "GI_CONTAINER_INDEX": 2, + "GIAC_CONTENT": { + "visible": false, + "disabled": false, + "isShowTitle": true, + "title": "TuGraph 路径查询", + "isShowIcon": true, + "icon": "icon-path-analysis", + "isShowTooltip": true, + "tooltip": "", + "tooltipColor": "#3056e3", + "tooltipPlacement": "right", + "hasDivider": false, + "height": "60px", + "isVertical": true, + "containerType": "div", + "containerAnimate": false, + "containerDraggable": false, + "dragHandle": "header", + "containerPlacement": "RT", + "offset": [ + 0, + 0 + ], + "containerWidth": "400px", + "containerHeight": "calc(100% - 100px)", + "contaienrMask": false + } + } } ], "layout": { @@ -670,7 +713,10 @@ export default { "name": "导航右区", "required": true, "GI_CONTAINER": [ - "GraphDemo" + { + "value": "GraphDemo", + "label": "Graph Demo 示例" + } ], "display": true }, @@ -692,14 +738,9 @@ export default { "name": "数据查询", "required": true, "GI_CONTAINER": [ - { - "value": "LanguageQuery", - "label": "语句查询" - }, - { - "value": "ConfigQuery", - "label": "配置查询" - } + "LanguageQuery", + "ConfigQuery", + "TuGraphPathQuery" ], "icon": "icon-tugraph-query", "display": true @@ -726,13 +767,13 @@ export default { "name": "布局样式", "required": true, "GI_CONTAINER": [ - { - "value": "TuGraphStyleSetting", - "label": "业务样式设置" - }, { "value": "LayoutSwitchTool", "label": "高级布局切换" + }, + { + "value": "TuGraphStyleSetting", + "label": "业务样式设置" } ], "display": true @@ -1205,8 +1246,8 @@ export default { }, "GISDK": { "name": "@antv/gi-sdk", - "version": "2.4.10", - "url": "https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.4.10/dist/index.min.js", + "version": "2.4.12", + "url": "https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.4.12/dist/index.min.js", "global": "GISDK" }, "G2Plot": { @@ -1225,8 +1266,8 @@ export default { "GI_ASSETS_PACKAGES": { "GI_ASSETS_BASIC": { "name": "@antv/gi-assets-basic", - "version": "2.4.14", - "url": "https://gw.alipayobjects.com/os/lib/antv/gi-assets-basic/2.4.14/dist/index.min.js", + "version": "2.4.16", + "url": "https://gw.alipayobjects.com/os/lib/antv/gi-assets-basic/2.4.16/dist/index.min.js", "global": "GI_ASSETS_BASIC" }, "GI_ASSETS_ADVANCE": { @@ -1237,9 +1278,9 @@ export default { }, "GI_ASSETS_TUGRAPH_DB": { "name": "@tugraph/gi-assets-tugraph-db", - "version": "0.6.12", + "version": "0.6.14", "global": "GI_ASSETS_TUGRAPH_DB", - "url": "https://gw.alipayobjects.com/os/lib/tugraph/gi-assets-tugraph-db/0.6.12/dist/index.min.js" + "url": "https://gw.alipayobjects.com/os/lib/tugraph/gi-assets-tugraph-db/0.6.14/dist/index.min.js" } } } \ No newline at end of file From a3e38ffa669233825da57b12b600433423c63565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=9A=E5=88=99?= Date: Mon, 18 Sep 2023 10:35:36 +0800 Subject: [PATCH 2/9] fix: update tugraph analysis model --- .../src/components/studio/tugraph/global.less | 43 ++++-- .../src/client/GI_EXPORT_FILES.ts | 136 +++++++++--------- 2 files changed, 98 insertions(+), 81 deletions(-) diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less index d9e71ae4..6afe6601 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less @@ -49,6 +49,9 @@ font-size: 16px; } } + .ant-btn { + color: #6A6B71; + } } } @@ -67,23 +70,33 @@ .ant-segmented:not(.ant-segmented-disabled):focus { background: #eaeff9; } -} -.style-setting-container { - height: calc(100vh - 110px) !important; - .style-setting-element-container .nodeConfigurationContainer, .style-setting-element-container .edgeConfigurationContainer { - height: calc(100vh - 210px) !important; - .ant-slider-mark-text { - font-size: 12px; - color: #6A6B71; + .style-setting-container { + height: calc(100vh - 110px) !important; + .style-setting-element-container .nodeConfigurationContainer, .style-setting-element-container .edgeConfigurationContainer { + height: calc(100vh - 210px) !important; + .ant-slider-mark-text { + font-size: 12px; + color: #6A6B71; + } } } -} + + .attribute-filter-container .attribute-filter-container-form { + height: calc(100vh - 205px) !important; + } + + .statictics-filter-container .statictics-filter-container-form { + height: calc(100vh - 205px) !important; + } -.attribute-filter-container .attribute-filter-container-form { - height: calc(100vh - 195px) !important; + .tugraph-path-analysis { + height: calc(100vh - 176px); + .tugraph-path-analysis-result-container { + height: calc(100vh - 475px) !important; + } + .path-query-btn-group { + right: 10px; + } + } } - -.statictics-filter-container .statictics-filter-container-form { - height: calc(100vh - 195px) !important; -} \ No newline at end of file diff --git a/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts b/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts index ce526ac3..79a388cd 100644 --- a/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts +++ b/client/packages/plugins/graph-analysis/src/client/GI_EXPORT_FILES.ts @@ -14,6 +14,7 @@ export default { "ClearCanvas", "ConfigQuery", "ContextMenu", + "DoubleClickExpandNode", "GraphDemo", "Initializer", "JSONMode", @@ -24,17 +25,17 @@ export default { "PinNodeWithMenu", "Placeholder", "PointEdgeView", - "PropertiesPanel", "PropertyGraphInitializer", "RichContainer", "SimpleQuery", "ToggleClusterWithMenu", "TuGraphAttributesFilter", "TuGraphBack", + "TuGraphPathQuery", "TuGraphStatisticsFilter", "TuGraphStyleSetting", "ZoomStatus", - "TuGraphPathQuery" + "TuGraphPropertiesPanel" ], "layouts": [ "Force2", @@ -200,6 +201,12 @@ export default { ] } }, + { + "id": "DoubleClickExpandNode", + "type": "AUTO", + "name": "双击扩散节点", + "props": {} + }, { "id": "GraphDemo", "type": "GIAC", @@ -389,25 +396,6 @@ export default { "name": "TuGraph 图例", "props": {} }, - { - "id": "PropertiesPanel", - "type": "AUTO", - "name": "属性面板", - "props": { - "serviceId": "GI/PropertiesPanel", - "title": "属性面板", - "placement": "RT", - "width": "356px", - "height": "calc(100% - 0px)", - "offset": [ - 10, - 10 - ], - "animate": false, - "enableInfoDetect": true, - "defaultiStatistic": false - } - }, { "id": "PropertyGraphInitializer", "type": "AUTO", @@ -527,19 +515,25 @@ export default { "props": {} }, { - "id": "TuGraphStatisticsFilter", + "id": "TuGraphPathQuery", "type": "GIAC_CONTENT", - "name": "统计筛选", + "name": "TuGraph 路径查询", "props": { - "schemaServiceId": "TuGraph-DB/graphSchemaService", + "nodeSelectionMode": [ + "List", + "" + ], + "pathNodeLabel": "id", + "hasDirection": false, + "hasMaxDeep": false, "GI_CONTAINER_INDEX": 2, "GIAC_CONTENT": { "visible": false, "disabled": false, "isShowTitle": true, - "title": "未命名组件", + "title": "TuGraph 路径查询", "isShowIcon": true, - "icon": "icon-star", + "icon": "icon-path-analysis", "isShowTooltip": true, "tooltip": "", "tooltipColor": "#3056e3", @@ -556,30 +550,29 @@ export default { 0, 0 ], - "containerWidth": "350px", + "containerWidth": "400px", "containerHeight": "calc(100% - 100px)", "contaienrMask": false } } }, { - "id": "TuGraphStyleSetting", + "id": "TuGraphStatisticsFilter", "type": "GIAC_CONTENT", - "name": "业务样式设置", + "name": "统计筛选", "props": { - "localServiceId": "TuGraph-DB/saveElementStyleToLocalService", "schemaServiceId": "TuGraph-DB/graphSchemaService", - "GI_CONTAINER_INDEX": -8, + "GI_CONTAINER_INDEX": 2, "GIAC_CONTENT": { "visible": false, "disabled": false, "isShowTitle": true, - "title": "外观", + "title": "未命名组件", "isShowIcon": true, - "icon": "icon-tugraph-styling", + "icon": "icon-star", "isShowTooltip": true, - "tooltip": "根据点上的属性值可指定颜色、大小、形状", - "tooltipColor": "rgba(0,0,0,1)", + "tooltip": "", + "tooltipColor": "#3056e3", "tooltipPlacement": "right", "hasDivider": false, "height": "60px", @@ -600,37 +593,23 @@ export default { } }, { - "id": "ZoomStatus", - "type": "AUTO", - "name": "缩放状态", - "props": { - "minZoom": 0.6, - "statusName": "minZoom" - } - }, - { - "id": "TuGraphPathQuery", + "id": "TuGraphStyleSetting", "type": "GIAC_CONTENT", - "name": "TuGraph 路径查询", + "name": "业务样式设置", "props": { - "nodeSelectionMode": [ - "List", - "" - ], - "pathNodeLabel": "id", - "hasDirection": false, - "hasMaxDeep": false, - "GI_CONTAINER_INDEX": 2, + "localServiceId": "TuGraph-DB/saveElementStyleToLocalService", + "schemaServiceId": "TuGraph-DB/graphSchemaService", + "GI_CONTAINER_INDEX": -8, "GIAC_CONTENT": { "visible": false, "disabled": false, "isShowTitle": true, - "title": "TuGraph 路径查询", + "title": "外观", "isShowIcon": true, - "icon": "icon-path-analysis", + "icon": "icon-tugraph-styling", "isShowTooltip": true, - "tooltip": "", - "tooltipColor": "#3056e3", + "tooltip": "根据点上的属性值可指定颜色、大小、形状", + "tooltipColor": "rgba(0,0,0,1)", "tooltipPlacement": "right", "hasDivider": false, "height": "60px", @@ -644,11 +623,26 @@ export default { 0, 0 ], - "containerWidth": "400px", + "containerWidth": "350px", "containerHeight": "calc(100% - 100px)", "contaienrMask": false } } + }, + { + "id": "ZoomStatus", + "type": "AUTO", + "name": "缩放状态", + "props": { + "minZoom": 0.6, + "statusName": "minZoom" + } + }, + { + "id": "TuGraphPropertiesPanel", + "type": "AUTO", + "name": "TuGraph 属性面板", + "props": {} } ], "layout": { @@ -738,9 +732,18 @@ export default { "name": "数据查询", "required": true, "GI_CONTAINER": [ - "LanguageQuery", - "ConfigQuery", - "TuGraphPathQuery" + { + "value": "LanguageQuery", + "label": "语句查询" + }, + { + "value": "ConfigQuery", + "label": "配置查询" + }, + { + "value": "TuGraphPathQuery", + "label": "路径查询" + } ], "icon": "icon-tugraph-query", "display": true @@ -933,13 +936,14 @@ export default { "CanvasSetting", "Initializer", "ActivateRelations", + "DoubleClickExpandNode", "Loading", "Placeholder", "PointEdgeView", - "PropertiesPanel", "PropertyGraphInitializer", "SimpleQuery", - "ZoomStatus" + "ZoomStatus", + "TuGraphPropertiesPanel" ], "display": true } @@ -1278,9 +1282,9 @@ export default { }, "GI_ASSETS_TUGRAPH_DB": { "name": "@tugraph/gi-assets-tugraph-db", - "version": "0.6.14", + "version": "0.6.15", "global": "GI_ASSETS_TUGRAPH_DB", - "url": "https://gw.alipayobjects.com/os/lib/tugraph/gi-assets-tugraph-db/0.6.14/dist/index.min.js" + "url": "https://gw.alipayobjects.com/os/lib/tugraph/gi-assets-tugraph-db/0.6.15/dist/index.min.js" } } } \ No newline at end of file From 7440bef07f8db6ad0079e7387febe137ce846000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=81=9A=E5=88=99?= Date: Mon, 18 Sep 2023 16:53:31 +0800 Subject: [PATCH 3/9] fix: update style --- .../@@plugins/src/components/studio/tugraph/global.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less index 6afe6601..0393a00e 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less @@ -79,6 +79,12 @@ font-size: 12px; color: #6A6B71; } + + #nodeConfigurationForm_badgeValue { + .ant-checkbox { + left: 4px; + } + } } } From 9bf463c80c11280f42258014cd2e09a75c1acc2b Mon Sep 17 00:00:00 2001 From: wb-whq906489 Date: Thu, 21 Sep 2023 17:33:37 +0800 Subject: [PATCH 4/9] =?UTF-8?q?fix:=20=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../add-nodes-edges/index.module.less | 17 ++++ .../graph-construct/add-nodes-edges/index.tsx | 61 +++++++------ .../graph-construct/file-uploader/index.tsx | 2 +- .../graph-construct/index.module.less | 4 +- .../domain-core/graph-construct/index.tsx | 91 ++++++++++--------- .../nodes-edges-list/index.module.less | 3 + .../nodes-edges-list/index.tsx | 46 +++++----- .../statement-query-list/index.module.less | 5 +- .../components/statement-query-list/index.tsx | 40 ++++---- .../stored-procedure/index.module.less | 4 +- .../domain-core/graph-query/index.module.less | 4 +- 11 files changed, 150 insertions(+), 127 deletions(-) diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less index a2665c61..128b78ba 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.module.less @@ -17,6 +17,14 @@ overflow: hidden; } } + .ant-table-cell { + font-weight: 400; + font-size: 14px; + color: #6a6b71; + } + .ant-form-item-required { + color: #363740; + } } &-content { padding: 0 24px 24px; @@ -41,6 +49,12 @@ } &-addbtn { margin: 8px 0 10px 0; + &:hover { + border: 1px dashed #1650ff; + } + } + &-name:focus { + border: 1px solid #1650ff; } &-attr { margin-bottom: 16px; @@ -50,4 +64,7 @@ font-size: 14px; color: rgba(54, 55, 64, 1); } + &-attributes { + background-color: #1650ff; + } } diff --git a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx index 4a046ca2..0dfcd142 100644 --- a/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx +++ b/client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-construct/add-nodes-edges/index.tsx @@ -52,16 +52,16 @@ export const AddNodesEdges: React.FC = ({ }, []); const propertyList = () => { const attrPropertyNames = map( - filter(attrList, (attr) => !attr.optional), - (item) => item.name + filter(attrList, attr => !attr.optional), + item => item.name, ); - const indexPropertyNames = map(configList, (item) => item.propertyName); + const indexPropertyNames = map(configList, item => item.propertyName); return map( filter( xor(attrPropertyNames, indexPropertyNames), - (item) => item !== undefined + item => item !== undefined, ), - (item) => ({ label: item, value: item }) + item => ({ label: item, value: item }), ); }; const addButton = (handleAdd?: () => void, text: string = '添加属性') => { @@ -87,7 +87,7 @@ export const AddNodesEdges: React.FC = ({ return { inputType: EditType.SELECT, prop: { - options: map(data.nodes, (item) => ({ + options: map(data.nodes, item => ({ label: item.labelName, value: item.labelName, })), @@ -104,7 +104,7 @@ export const AddNodesEdges: React.FC = ({ return { inputType: EditType.SELECT, prop: { - options: map(data.nodes, (item) => ({ + options: map(data.nodes, item => ({ label: item.labelName, value: item.labelName, })), @@ -120,9 +120,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.startList = [ - ...startList.filter((item) => item.id !== record?.id), + ...startList.filter(item => item.id !== record?.id), ]; }); }} @@ -194,9 +194,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.attrList = [ - ...attrList.filter((item) => item.id !== record?.id), + ...attrList.filter(item => item.id !== record?.id), ]; }); }} @@ -294,9 +294,9 @@ export const AddNodesEdges: React.FC = ({ { - updateState((draft) => { + updateState(draft => { draft.configList = [ - ...configList.filter((item) => item.id !== record?.id), + ...configList.filter(item => item.id !== record?.id), ]; }); }} @@ -309,14 +309,14 @@ export const AddNodesEdges: React.FC = ({ }, ]; const addNodeAttr = () => { - updateState((draft) => { + updateState(draft => { const list = [...attrList]; list.push({ id: attrList.length + 1 }); draft.attrList = [...list]; }); }; const addNodeConfig = () => { - updateState((draft) => { + updateState(draft => { const list = [...configList]; list.push({ id: configList.length + 1, @@ -326,7 +326,7 @@ export const AddNodesEdges: React.FC = ({ }); }; const addEdge = () => { - updateState((draft) => { + updateState(draft => { const list = [...startList]; list.push({ id: `${startList.length + 1}` }); draft.startList = [...list]; @@ -347,7 +347,7 @@ export const AddNodesEdges: React.FC = ({ onClick={() => { onClose(); form.resetFields(); - updateState((draft) => { + updateState(draft => { draft.startList = []; draft.configList = []; draft.attrList = []; @@ -359,7 +359,7 @@ export const AddNodesEdges: React.FC = ({