-
-
-
- {{ element?.name ?? '-' }}
+
+
+ {{element?.description}}
+
+
+
+
+ {{ substring(element?.description ?? '-' ,40) }}
+
-
-
+
@@ -47,6 +51,7 @@ import { elementProps } from './props';
import type { ModelElement } from './element';
import { DeleteOutlined, SettingOutlined } from '@ant-design/icons-vue';
import type { Graph } from '@antv/x6';
+import {substring} from '@/utils/strings'
export default defineComponent({
name: 'ModelElement',
@@ -116,6 +121,7 @@ export default defineComponent({
return {
element,
+ substring,
handleMenuClick,
handleVisibleChange,
};
@@ -164,8 +170,8 @@ export default defineComponent({
border-radius: 0;
font-size: 12px;
padding: 8px 15px;
- overflow-y: auto;
border-top: 1px solid #195693;
+ overflow: hidden;
}
&.ks-designer-task-node {
@@ -264,6 +270,10 @@ export default defineComponent({
height: 20px;
display: block;
background: url('@/assets/icons/point.svg') center / 100% 100%;
+
+ position: absolute;
+ left: 5px;
+ top: 10px;
}
// 右侧出桩样式
@@ -277,6 +287,10 @@ export default defineComponent({
height: 20px;
display: block;
background: url('@/assets/icons/arrow-right.svg') center / 100% 100%;
+
+ position: absolute;
+ right: 5px;
+ top: 10px;
}
// 节点文本样式
@@ -285,7 +299,7 @@ export default defineComponent({
line-height: 24px;
overflow: hidden;
text-overflow: ellipsis;
- white-space: nowrap;
+ //white-space: nowrap;
}
}
\ No newline at end of file
diff --git a/modeler/src/views/decision/types/index.ts b/modeler/src/views/decision/types/index.ts
index 64b6279..f49bae0 100644
--- a/modeler/src/views/decision/types/index.ts
+++ b/modeler/src/views/decision/types/index.ts
@@ -9,4 +9,3 @@
export * from './tree'
export * from './template'
-export * from './parameter'
diff --git a/modeler/src/views/decision/types/parameter.ts b/modeler/src/views/decision/types/parameter.ts
deleted file mode 100644
index 0abeacd..0000000
--- a/modeler/src/views/decision/types/parameter.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * This file is part of the kernelstudio package.
- *
- * (c) 2014-2026 zlin
- *
- * For the full copyright and license information, please view the LICENSE file
- * that was distributed with this source code.
- */
-
-import type { NullableString } from '@/types';
-
-export interface NodeSetting {
- id: number;
- name: NullableString;
- type: NullableString;
- default_value: NullableString;
- data_type: NullableString;
- required: boolean;
- description: NullableString;
-}
\ No newline at end of file
diff --git a/modeler/src/views/decision/utils/node.ts b/modeler/src/views/decision/utils/node.ts
index e0552b4..924f68b 100644
--- a/modeler/src/views/decision/utils/node.ts
+++ b/modeler/src/views/decision/utils/node.ts
@@ -33,22 +33,7 @@ export const createGraphTaskElementFromTemplate = (
height: realRect.height,
inputs: null,
outputs: null,
- parameters: [],
- variables: [
- {
- key: generateKey('var_'),
- name: '范围',
- value: '1000',
- defaults: '1000',
- unit: 'KM'
- },
- {
- key: generateKey('var_'),
- name: '武器名称',
- value: '地对空导弹',
- defaults: '地对空导弹',
- unit: '个'
- }
- ],
+ parameters: template.parameters ?? [],
+ variables: [],
} as GraphTaskElement;
};
diff --git a/modeler/types/components.d.ts b/modeler/types/components.d.ts
index 3045962..fb8c90d 100644
--- a/modeler/types/components.d.ts
+++ b/modeler/types/components.d.ts
@@ -12,6 +12,7 @@ export {}
/* prettier-ignore */
declare module 'vue' {
export interface GlobalComponents {
+ AAvatar: typeof import('ant-design-vue/es')['Avatar']
AButton: typeof import('ant-design-vue/es')['Button']
ACard: typeof import('ant-design-vue/es')['Card']
ACol: typeof import('ant-design-vue/es')['Col']
@@ -21,13 +22,16 @@ declare module 'vue' {
ADropdown: typeof import('ant-design-vue/es')['Dropdown']
AEmpty: typeof import('ant-design-vue/es')['Empty']
AFlex: typeof import('ant-design-vue/es')['Flex']
+ AFloatButton: typeof import('ant-design-vue/es')['FloatButton']
AForm: typeof import('ant-design-vue/es')['Form']
AFormItem: typeof import('ant-design-vue/es')['FormItem']
AInput: typeof import('ant-design-vue/es')['Input']
AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
ALayout: typeof import('ant-design-vue/es')['Layout']
+ ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
+ ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
AList: typeof import('ant-design-vue/es')['List']
AListItem: typeof import('ant-design-vue/es')['ListItem']
AMenu: typeof import('ant-design-vue/es')['Menu']
@@ -35,6 +39,7 @@ declare module 'vue' {
APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
ARow: typeof import('ant-design-vue/es')['Row']
ASpace: typeof import('ant-design-vue/es')['Space']
+ ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
ATable: typeof import('ant-design-vue/es')['Table']
ATabPane: typeof import('ant-design-vue/es')['TabPane']
ATabs: typeof import('ant-design-vue/es')['Tabs']
@@ -47,6 +52,7 @@ declare module 'vue' {
// For TSX support
declare global {
+ const AAvatar: typeof import('ant-design-vue/es')['Avatar']
const AButton: typeof import('ant-design-vue/es')['Button']
const ACard: typeof import('ant-design-vue/es')['Card']
const ACol: typeof import('ant-design-vue/es')['Col']
@@ -56,13 +62,16 @@ declare global {
const ADropdown: typeof import('ant-design-vue/es')['Dropdown']
const AEmpty: typeof import('ant-design-vue/es')['Empty']
const AFlex: typeof import('ant-design-vue/es')['Flex']
+ const AFloatButton: typeof import('ant-design-vue/es')['FloatButton']
const AForm: typeof import('ant-design-vue/es')['Form']
const AFormItem: typeof import('ant-design-vue/es')['FormItem']
const AInput: typeof import('ant-design-vue/es')['Input']
const AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
const AInputPassword: typeof import('ant-design-vue/es')['InputPassword']
const ALayout: typeof import('ant-design-vue/es')['Layout']
+ const ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
const ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
+ const ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
const AList: typeof import('ant-design-vue/es')['List']
const AListItem: typeof import('ant-design-vue/es')['ListItem']
const AMenu: typeof import('ant-design-vue/es')['Menu']
@@ -70,6 +79,7 @@ declare global {
const APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
const ARow: typeof import('ant-design-vue/es')['Row']
const ASpace: typeof import('ant-design-vue/es')['Space']
+ const ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
const ATable: typeof import('ant-design-vue/es')['Table']
const ATabPane: typeof import('ant-design-vue/es')['TabPane']
const ATabs: typeof import('ant-design-vue/es')['Tabs']