Browse Source

增加系统图json文件格式。

sybotan 4 years ago
parent
commit
664472e802
2 changed files with 97 additions and 1 deletions
  1. 1 1
      docs/dev/saga-graphy/index.js
  2. 96 0
      docs/dev/saga-graphy/system-diagram/json-file.md

+ 1 - 1
docs/dev/saga-graphy/index.js

@@ -45,7 +45,7 @@ const content = [
         title: "系统图",
         path: "/dev/saga-graphy/system-diagram/",
         children: [
-
+            ["/dev/saga-graphy/system-diagram/json-file", "json数据格式"]
         ]
     },
 ];

+ 96 - 0
docs/dev/saga-graphy/system-diagram/json-file.md

@@ -0,0 +1,96 @@
+# Json 文件格式
+::: details 目录
+[[toc]]
+:::
+
+## 整体数据格式
+
+```
+    {
+        EntityList:[
+            Elements:{                          // 系统图展示所需数据
+                Nodes:[],                       // 图例节点,所有与工程信息化相关的图例(图标类型与区域)
+                Markers:[],                     // 与工程信息无关的标识对象(增加文本注释,图上的图片说明)
+                Relations:[],                   // 管线对象
+            },
+            ID: '',                             // 图ID
+            Name: '',                           // 名称
+            CategoryID: '',                     // 图分类ID
+            ProjectID: '',                      // 项目ID
+            BuildingID: '',                     // 建筑ID
+            FloorID: '',                        // 楼层id
+            Note: '',                           // 图说明
+        ]
+    }
+```
+
+## 图例节点
+
+```
+    Nodes:[
+        {
+            ID: '',                             // ID
+            Name: '',                           // 名称
+            AttachObjectIds:[],                 // 返回工程信息化对象 ID 列表
+            GraphElementType: '',               // 图标,区域类型
+            GraphElementId: '',                 // 对应的图元ID
+            Pos: {X: 0, y: 0},                  // 位置
+            Scale: {X: 1, y: 1, Z: 1},          // 缩放
+            Rolate: {X: 0, y: 0, Z: 0},         // 旋转
+            Size: {Width:0, Height: 0},         // 大小
+            AnchorList:[
+                    {
+                        ID: '',                 // 锚点ID
+                        Pos: '',                // 锚点的坐标
+                    },
+                    ...
+                ],
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            Properties: {}                      // 由应用自己定义
+        },
+        ...
+    ]
+```
+
+## 标识对象
+
+```
+    Markers:[
+        {
+            ID: '',                             // ID
+            Name: '',                           // 名称
+            Type: '',                           // 图标(Image),线类型(Line)
+            Pos: {X: 0, y: 0},                  // 位置
+            Scale: {X: 1, y: 1, Z: 1},          // 缩放
+            Rolate: {X: 0, y: 0, Z: 0},         // 旋转
+            Size: {Width:0, Height: 0},         // 大小
+            Properties: {}                      // 由应用自己定义
+        },
+        ...
+    ]
+```
+
+## 对象关系
+
+```
+    Relations: [
+        {
+            ID: '',                             // ID
+            Name: '',                           // 名称
+            GraphElementId: '',                 // 对应的图例ID
+            NodeID1: '',                        // 关联节点1_id
+            NodeID2: '',                        // 关联节点2_id
+            Anchor1ID: '',                      // 关联锚点1_id
+            Anchor2ID: '',                      // 关联锚点2_id
+            Dir: 0,                             // 方向(0:无向,1:节点1到节点2,2:节点2到节点1)
+            LineType: '',                       // 直线,水平垂直
+            PointList: [],                      // 线的顶点坐标
+            Style: ''                           // 线的绘图样式
+        },
+        ...
+    ]
+```
+```