-
+
-
- {{ errorMsg }}
-
-
- {{ emptyHint }}
-
-
+
+
+
+ {{ errorMsg }}
+
+
+ {{ emptyHint }}
+
+
+
@@ -311,6 +406,14 @@ onBeforeUnmount(() => {
padding: 0 2px 4px;
}
+.rule-knowledge-graph__fullscreen-btn {
+ margin-left: auto;
+ flex-shrink: 0;
+ color: #b8ccd6;
+ border-color: rgba(120, 170, 200, 0.45);
+ background: rgba(10, 28, 40, 0.65);
+}
+
.rule-knowledge-graph__hint {
font-size: 11px;
color: #7a8d96;
@@ -318,6 +421,35 @@ onBeforeUnmount(() => {
max-width: 100%;
}
+.rule-knowledge-graph__hint--compact {
+ font-size: 10px;
+ color: #6d8290;
+}
+
+.rule-knowledge-graph--four-blocks {
+ min-height: 0;
+}
+
+.rule-knowledge-graph--fullscreen {
+ box-sizing: border-box;
+ width: 100vw;
+ height: 100vh;
+ max-height: 100vh;
+ padding: 10px 12px;
+ gap: 10px;
+ background: #0d1f2c;
+}
+
+.rule-knowledge-graph--fullscreen .rule-knowledge-graph__host {
+ min-height: 0;
+ flex: 1;
+}
+
+.rule-knowledge-graph--fullscreen :deep(.rule-four-blocks) {
+ flex: 1;
+ min-height: 0;
+}
+
.rule-knowledge-graph__host {
flex: 1;
min-height: 200px;
diff --git a/modeler/src/views/decision/rule-config/api.ts b/modeler/src/views/decision/rule-config/api.ts
index c8f7308..7956c0d 100644
--- a/modeler/src/views/decision/rule-config/api.ts
+++ b/modeler/src/views/decision/rule-config/api.ts
@@ -9,7 +9,7 @@
import { HttpRequestClient } from '@/utils/request';
import type { ApiDataResponse, BasicResponse } from '@/types';
-import type { RuleConfig, RuleConfigPageableResponse, RuleConfigRequest, RuleDictItem, RuleGraphPayload, RuleParamMeta } from './types';
+import type { RuleConfig, RuleConfigPageableResponse, RuleConfigRequest, RuleDictItem, RuleFourBlocksPayload, RuleGraphPayload, RuleParamMeta } from './types';
const req = HttpRequestClient.create
({
baseURL: '/api',
@@ -46,3 +46,7 @@ export const findRuleParamMeta = (): Promise> =
export const findRuleConfigGraph = (query: Partial = {}): Promise> => {
return req.get('/system/rule/config/graph', query);
};
+
+export const findRuleFourBlocksGraph = (): Promise> => {
+ return req.get('/system/rule/config/graph/four-blocks');
+};
diff --git a/modeler/src/views/decision/rule-config/management.vue b/modeler/src/views/decision/rule-config/management.vue
index 4e9ad02..bfb3448 100644
--- a/modeler/src/views/decision/rule-config/management.vue
+++ b/modeler/src/views/decision/rule-config/management.vue
@@ -52,7 +52,7 @@
maxWidth: '78%',
}"
>
-
+
(null);
const splitRootRef = ref(null);
const graphRevision = ref(0);
const clampGraphPercent = (n: number) =>
Math.min(GRAPH_PANE_MAX, Math.max(GRAPH_PANE_MIN, Math.round(n)));
+const onRuleGraphDensityChange = (mode: 'overview' | 'full' | 'four-blocks') => {
+ if (mode === 'four-blocks') {
+ if (graphPanePercentBeforeFourBlocks.value === null) {
+ graphPanePercentBeforeFourBlocks.value = graphPanePercent.value;
+ }
+ graphPanePercent.value = clampGraphPercent(62);
+ return;
+ }
+ if (graphPanePercentBeforeFourBlocks.value !== null) {
+ graphPanePercent.value = clampGraphPercent(graphPanePercentBeforeFourBlocks.value);
+ graphPanePercentBeforeFourBlocks.value = null;
+ }
+};
+
const onGraphSplitMouseDown = (e: MouseEvent) => {
e.preventDefault();
const root = splitRootRef.value;
diff --git a/modeler/src/views/decision/rule-config/types.ts b/modeler/src/views/decision/rule-config/types.ts
index a2f6fb9..b269c8c 100644
--- a/modeler/src/views/decision/rule-config/types.ts
+++ b/modeler/src/views/decision/rule-config/types.ts
@@ -105,4 +105,33 @@ export interface RuleGraphEdge {
export interface RuleGraphPayload {
nodes: RuleGraphNode[],
edges: RuleGraphEdge[],
+ layoutHint?: string | null,
+ focusNodeId?: string | null,
+}
+
+export interface RuleFourBlockParamRow {
+ ruleCode: NullableString,
+ ruleName: NullableString,
+ paramKey: NullableString,
+ paramName: NullableString,
+ whenText: NullableString,
+ thenText: NullableString,
+ outputText: NullableString,
+}
+
+export interface RuleFourBlockCluster {
+ blockId: string,
+ moduleCode: NullableString,
+ title: NullableString,
+ droolsRuleName: NullableString,
+ salience: number | null,
+ whenExpr: NullableString,
+ thenAction: NullableString,
+ graph: RuleGraphPayload,
+ paramRows?: RuleFourBlockParamRow[] | null,
+}
+
+export interface RuleFourBlocksPayload {
+ globalParamsPreview: Record,
+ blocks: RuleFourBlockCluster[],
}