|
@@ -0,0 +1,52 @@
|
|
|
+import { Node } from "@vue-flow/core";
|
|
|
+import type {
|
|
|
+ HJHandle,
|
|
|
+ HJNodeData,
|
|
|
+ HJNodeDataModel,
|
|
|
+} from "jxq-ui/dist/components/flow/src/types/comTypes";
|
|
|
+
|
|
|
+// 功能块名称 属性名称 初始值 数值类型 下限 上限 输入/输出
|
|
|
+
|
|
|
+// 功能块类别
|
|
|
+interface FunctionTypeModel {
|
|
|
+ id: string;
|
|
|
+ name: string;
|
|
|
+ functions: AutoTestNodeData[]; //指的是功能模块 不是函数
|
|
|
+}
|
|
|
+// 功能块类
|
|
|
+interface InformationModel {
|
|
|
+ // 保留类型的信息以便展示
|
|
|
+ functionType: string;
|
|
|
+ functionTypeId: string;
|
|
|
+
|
|
|
+ functionName: string;
|
|
|
+}
|
|
|
+
|
|
|
+type HJNodeData2 = Omit<HJNodeDataModel, "information"> & {
|
|
|
+ information: InformationModel;
|
|
|
+};
|
|
|
+
|
|
|
+// 这个类型里面的label 展示的是对应的FunctionTypeModel的名称, 以便在Node.vue中的header中展示
|
|
|
+export interface AutoTestNodeData extends Partial<Node> {
|
|
|
+ data: HJNodeData2;
|
|
|
+}
|
|
|
+
|
|
|
+export const propertyData: FunctionTypeModel[] = [
|
|
|
+ {
|
|
|
+ id: "1",
|
|
|
+ name: "信号源",
|
|
|
+ functions: [
|
|
|
+ {
|
|
|
+ type: "universal",
|
|
|
+ data: {
|
|
|
+ label: "",
|
|
|
+ information: {
|
|
|
+ functionType: "功能块类别",
|
|
|
+ functionTypeId: "功能块类别ID",
|
|
|
+ functionName: "功能块名称",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+];
|