浏览代码

更新包;将编辑器item移入

haojianlong 4 年之前
父节点
当前提交
e81504a937

+ 2 - 2
package.json

@@ -9,10 +9,10 @@
     },
     "dependencies": {
         "@saga-web/base": "2.1.22",
-        "@saga-web/big": "1.0.59",
+        "@saga-web/big": "1.0.64",
         "@saga-web/draw": "2.1.100",
         "@saga-web/feng-map": "1.0.15",
-        "@saga-web/graph": "2.1.96",
+        "@saga-web/graph": "2.1.101",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",
         "core-js": "^3.4.4",

+ 0 - 14
src/lib/enums/SLineStyle.js

@@ -1,14 +0,0 @@
-/**
- * 线样式
- *
- * @author  张宇
- */
-export var SLineStyle;
-(function (SLineStyle) {
-    /** 实线    */
-    SLineStyle[SLineStyle["Soild"] = 0] = "Soild";
-    /** 虚线    */
-    SLineStyle[SLineStyle["Dashed"] = 1] = "Dashed";
-    /** 点线    */
-    SLineStyle[SLineStyle["Dotted"] = 2] = "Dotted";
-})(SLineStyle || (SLineStyle = {})); // Enum SLineStyle

+ 0 - 13
src/lib/enums/SLineStyle.ts

@@ -1,13 +0,0 @@
-/**
- * 线样式
- *
- * @author  张宇
- */
-export enum SLineStyle {
-    /** 实线    */
-    Soild,
-    /** 虚线    */
-    Dashed,
-    /** 点线    */
-    Dotted
-} // Enum SLineStyle

+ 86 - 0
src/lib/items/HighlightItem.js

@@ -0,0 +1,86 @@
+/*
+ * ********************************************************************************************************************
+ *
+ *                      :*$@@%$*:                         ;:                ;;    ;;
+ *                    :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
+ *                   :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
+ *                   =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
+ *                   =@*                                  %!              @ $= % %@=   =%@!      %=
+ *              *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
+ *            %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
+ *          ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
+ *          $@*   ;@@@%=!:                *@*
+ *          =@$    ;;;!=%@@@@=!           =@!
+ *           %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
+ *            ;%@@$=$@@%*       *@@@$=%@@%;
+ *               ::;::             ::;::                                              All rights reserved.
+ *
+ * ********************************************************************************************************************
+ */
+import { SGraphItem } from "@saga-web/graph/lib";
+import { SColor, SLine, SPoint, SRect } from "@saga-web/draw/lib";
+import { ItemOrder, ItemColor } from '@saga-web/big/lib';
+/**
+ * 吸附时高亮对象
+ *
+ * @author  郝建龙
+ */
+export class HighlightItem extends SGraphItem {
+    /**
+     * 构造函数
+     *
+     * @param   parent  指向父对象
+     */
+    constructor(parent) {
+        super(parent);
+        /** 对象与鼠标位置距离   */
+        this.distance = 0;
+        /** 对象类型   */
+        this.type = 1;
+        /** 点对象数据-当吸附的为线时,此点为垂线与线段的交点   */
+        this._point = new SPoint();
+        /** 点对象数据   */
+        this._line = new SLine();
+        this.visible = false;
+        this.zOrder = ItemOrder.highLightOrder;
+    } // Constructor
+    get point() {
+        return this._point;
+    } // Get point
+    set point(v) {
+        this._point = v;
+        this.type = 1;
+        this.update();
+    } // Set point
+    get line() {
+        return this._line;
+    } // Get line
+    set line(v) {
+        this._line = v;
+        this.type = 2;
+        this.update();
+    } // Set line
+    /**
+     * Item对象边界区域
+     *
+     * @return	SRect
+     */
+    boundingRect() {
+        return new SRect(this.point.x, this.point.y, 10, 10);
+    } // Function boundingRect()
+    /**
+     * Item绘制操作
+     *
+     * @param   painter painter对象
+     */
+    onDraw(painter) {
+        if (this.type == 2) {
+            painter.pen.color = ItemColor.highLightLineColor;
+            painter.pen.lineWidth = painter.toPx(6);
+            painter.drawLine(this.line);
+        }
+        painter.pen.color = SColor.Transparent;
+        painter.brush.color = ItemColor.highLightPointColor;
+        painter.drawCircle(this.point.x, this.point.y, painter.toPx(5));
+    } // Function onDraw()
+} // Class HighlightItem

+ 93 - 0
src/lib/items/HighlightItem.ts

@@ -0,0 +1,93 @@
+/*
+ * ********************************************************************************************************************
+ *
+ *                      :*$@@%$*:                         ;:                ;;    ;;
+ *                    :@@%!  :!@@%:                       %!             ;%%@@%$ =@@@@@@@%;     @%@@@%%%%@@@@@
+ *                   :@%;       :$=                       %%$$$%$$         ;$$  ;$@=   !@$
+ *                   =@!                                  %!              @ $=;%   !@@@%:      !$$$$$$$$$$$$$$=
+ *                   =@*                                  %!              @ $= % %@=   =%@!      %=
+ *              *$%%! @@=        ;=$%%%$*:                %!              @ $= % =%%%%%%@$      *%:         =%
+ *            %@@!:    !@@@%=$@@@@%!  :*@@$:              %!              @ $= % $*     ;@      @*          :%*
+ *          ;@@!          ;!!!;:         ;@%:      =======@%========*     @ $$ % $%*****$@     :@$=*********=@$
+ *          $@*   ;@@@%=!:                *@*
+ *          =@$    ;;;!=%@@@@=!           =@!
+ *           %@$:      =@%: :*@@@*       %@=                    Copyright (c) 2016-2019.  北京上格云技术有限公司
+ *            ;%@@$=$@@%*       *@@@$=%@@%;
+ *               ::;::             ::;::                                              All rights reserved.
+ *
+ * ********************************************************************************************************************
+ */
+
+import { SGraphItem } from "@saga-web/graph/lib";
+import { SColor, SLine, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
+import { ItemOrder, ItemColor } from '@saga-web/big/lib';
+
+/**
+ * 吸附时高亮对象
+ *
+ * @author  郝建龙
+ */
+export class HighlightItem extends SGraphItem {
+    /** 对象与鼠标位置距离   */
+    distance: number = 0;
+    /** 对象类型   */
+    private type: number = 1;
+
+    /** 点对象数据-当吸附的为线时,此点为垂线与线段的交点   */
+    _point: SPoint = new SPoint();
+    get point(): SPoint {
+        return this._point;
+    } // Get point
+    set point(v: SPoint) {
+        this._point = v;
+        this.type = 1;
+        this.update();
+    } // Set point
+
+    /** 点对象数据   */
+    _line: SLine = new SLine();
+    get line(): SLine {
+        return this._line;
+    } // Get line
+    set line(v: SLine) {
+        this._line = v;
+        this.type = 2;
+        this.update();
+    } // Set line
+
+    /**
+     * 构造函数
+     *
+     * @param   parent  指向父对象
+     */
+    constructor(parent: SGraphItem | null) {
+        super(parent);
+        this.visible = false;
+        this.zOrder = ItemOrder.highLightOrder;
+    } // Constructor
+
+    /**
+     * Item对象边界区域
+     *
+     * @return	SRect
+     */
+    boundingRect(): SRect {
+        return new SRect(this.point.x, this.point.y, 10, 10);
+    } // Function boundingRect()
+
+    /**
+     * Item绘制操作
+     *
+     * @param   painter painter对象
+     */
+    onDraw(painter: SPainter): void {
+        if (this.type == 2) {
+            painter.pen.color = ItemColor.highLightLineColor;
+            painter.pen.lineWidth = painter.toPx(6);
+            painter.drawLine(this.line);
+        }
+        painter.pen.color = SColor.Transparent;
+        painter.brush.color = ItemColor.highLightPointColor;
+        painter.drawCircle(this.point.x, this.point.y, painter.toPx(5));
+    } // Function onDraw()
+} // Class HighlightItem

+ 2 - 1
src/lib/items/SFHFQZoneLegendItem.js

@@ -1,7 +1,7 @@
 import { SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from "@/components/mapClass/until";
 import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
-import { hexify } from "../../components/mapClass/until";
 /**
  *图例节点Item(区域类型 --防火分区)
  *
@@ -22,6 +22,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
         this._showText = true;
         /** 是否蒙版遮罩  */
         this._maskFlag = false;
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 2 - 1
src/lib/items/SFHFQZoneLegendItem.ts

@@ -3,8 +3,8 @@ import { SGraphItem } from "@saga-web/graph/lib";
 import { Legend } from '../types/Legend';
 import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from "@/components/mapClass/until"
 import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
-import { hexify } from "../../components/mapClass/until";
 /**
  *图例节点Item(区域类型 --防火分区)
  *
@@ -105,6 +105,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
      */
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 19 - 1
src/lib/items/SImageLegendItem.js

@@ -14,9 +14,10 @@ export class SImageLegendItem extends SIconTextItem {
      * @param data      图例节点对象数据
      */
     constructor(parent, data) {
-        super(parent);
+        super(parent, data.AnchorList);
         /** 图例数量 */
         this._num = 1;
+        this.isTransform = false;
         this.zOrder = ItemOrder.markOrder;
         this.data = data;
         this.id = data.ID;
@@ -35,6 +36,12 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.Url) {
             this.img.url = data.Properties.Url;
         }
+        if (data.Properties.ImgPos) {
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
+        }
+        if (data.Properties.TextPos) {
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+        }
         if (data.Properties && data.Properties.sWidth) {
             this.sWidth = data.Properties.sWidth;
         }
@@ -69,10 +76,21 @@ export class SImageLegendItem extends SIconTextItem {
         this.data.Size = { Width: this.width, Height: this.height };
         this.data.Name = this.name;
         this.data.Properties.Url = this.img.url;
+        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
+        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
         this.data.Properties.sWidth = this.sWidth;
         this.data.Properties.sHeight = this.sHeight;
         this.data.Properties.font = this.font.size;
         this.data.Properties.color = this.color.value;
+        this.data.AnchorList = this.anchorList.map(t => {
+            return {
+                ID: t.id,
+                Pos: {
+                    X: t.x,
+                    Y: t.y
+                }
+            };
+        });
         return this.data;
     }
 } // Class SImageLegendItem

+ 23 - 6
src/lib/items/SImageLegendItem.ts

@@ -26,7 +26,7 @@ export class SImageLegendItem extends SIconTextItem {
             this.data.Num = 1;
         }
         this.data.Properties.Num = this._num;
-        this.text = `${this.data.Name}${this.data.Num > 1?` × ${this.data.Num}`:''}`;
+        this.text = `${this.data.Name}${this.data.Num > 1 ? ` × ${this.data.Num}` : ''}`;
         this.update();
     }
 
@@ -37,7 +37,8 @@ export class SImageLegendItem extends SIconTextItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent);
+        super(parent, data.AnchorList);
+        this.isTransform = false;
         this.zOrder = ItemOrder.markOrder;
         this.data = data;
         this.id = data.ID;
@@ -51,11 +52,17 @@ export class SImageLegendItem extends SIconTextItem {
             this.height = data.Size.Height;
         }
         if (data.Num) {
-            this.text = `${data.Name}${data.Num > 1?` × ${data.Num}`:''}`;
+            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`;
         }
         if (data.Properties && data.Properties.Url) {
             this.img.url = data.Properties.Url;
         }
+        if (data.Properties.ImgPos) {
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
+        }
+        if (data.Properties.TextPos) {
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+        }
         if (data.Properties && data.Properties.sWidth) {
             this.sWidth = data.Properties.sWidth;
         }
@@ -71,15 +78,25 @@ export class SImageLegendItem extends SIconTextItem {
     }
 
     toData(): Legend {
-        this.data.Pos = {X: this.x, Y: this.y};
-        this.data.Size = {Width: this.width, Height: this.height};
+        this.data.Pos = { X: this.x, Y: this.y };
+        this.data.Size = { Width: this.width, Height: this.height };
         this.data.Name = this.name;
         this.data.Properties.Url = this.img.url;
+        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
+        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
         this.data.Properties.sWidth = this.sWidth;
         this.data.Properties.sHeight = this.sHeight;
         this.data.Properties.font = this.font.size;
         this.data.Properties.color = this.color.value;
-
+        this.data.AnchorList = this.anchorList.map(t => {
+            return {
+                ID: t.id,
+                Pos: {
+                    X: t.x,
+                    Y: t.y
+                }
+            }
+        })
         return this.data;
     }
 } // Class SImageLegendItem

+ 1 - 0
src/lib/items/SImageMarkerItem.js

@@ -15,6 +15,7 @@ export class SImageMarkerItem extends SImageItem {
     constructor(parent, data) {
         super(parent);
         this.zOrder = ItemOrder.imageOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 1 - 0
src/lib/items/SImageMarkerItem.ts

@@ -22,6 +22,7 @@ export class SImageMarkerItem extends SImageItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.zOrder = ItemOrder.imageOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 41 - 0
src/lib/items/SLineMarkerItem.js

@@ -15,6 +15,10 @@ export class SLineMarkerItem extends SLineItem {
      */
     constructor(parent, data) {
         super(parent);
+        /** 起始锚点  */
+        this.startItem = null;
+        /** 结束锚点  */
+        this.endItem = null;
         /** 是否蒙版遮罩  */
         this._maskFlag = false;
         this.zOrder = ItemOrder.lineOrder;
@@ -39,6 +43,20 @@ export class SLineMarkerItem extends SLineItem {
             this.strokeColor = new SColor(data.Properties.StrokeColor);
         }
     } // Constructor
+    /** 是否完成绘制  */
+    get status() {
+        return this._status;
+    }
+    set status(v) {
+        this._status = v;
+        if (v == SItemStatus.Edit) {
+            this.zOrder = ItemOrder.markOrder;
+        }
+        else {
+            this.zOrder = ItemOrder.lineOrder;
+        }
+        this.update();
+    }
     get maskFlag() {
         return this._maskFlag;
     }
@@ -49,6 +67,23 @@ export class SLineMarkerItem extends SLineItem {
         this._maskFlag = v;
         this.update();
     }
+    /** 接收事件作出修改  */
+    changePos() {
+        if (this.startItem) {
+            // 判断删除equip后,不移动
+            if (this.startItem.parent) {
+                let scenePoint = this.startItem.boundingRect().center();
+                this.line[0] = this.startItem.mapToScene(scenePoint.x, scenePoint.y);
+            }
+        }
+        if (this.endItem) {
+            // 删除equip后
+            if (this.endItem.parent) {
+                let scenePoint = this.endItem.boundingRect().center();
+                this.line[1] = this.endItem.mapToScene(scenePoint.x, scenePoint.y);
+            }
+        }
+    }
     toData() {
         this.data.Pos = { X: this.x, Y: this.y };
         this.data.Properties.Line = this.line.map(pos => {
@@ -60,6 +95,12 @@ export class SLineMarkerItem extends SLineItem {
         this.data.Properties.LineWidth = this.lineWidth;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineStyle = this.lineStyle;
+        if (this.startItem && this.startItem.parent) {
+            this.data.Properties.StartItemId = this.startItem.id;
+        }
+        if (this.endItem && this.endItem.parent) {
+            this.data.Properties.EndItemId = this.endItem.id;
+        }
         return this.data;
     }
     onDraw(painter) {

+ 43 - 0
src/lib/items/SLineMarkerItem.ts

@@ -10,9 +10,28 @@ import { Marker } from '../types/Marker';
  * * @author  张宇(taohuzy@163.com)
  */
 export class SLineMarkerItem extends SLineItem {
+     /** 起始锚点  */
+    startItem: SGraphItem | null = null;
+    /** 结束锚点  */
+    endItem: SGraphItem | null = null;
+
     /** 标识对象数据 */
     data: Marker;
 
+    /** 是否完成绘制  */
+    get status(): SItemStatus {
+        return this._status;
+    }
+    set status(v: SItemStatus) {
+        this._status = v;
+        if (v == SItemStatus.Edit) {
+            this.zOrder = ItemOrder.markOrder;
+        } else {
+            this.zOrder = ItemOrder.lineOrder;
+        }
+        this.update();
+    }
+
     /** 是否蒙版遮罩  */
     _maskFlag: boolean = false;
     get maskFlag(): boolean {
@@ -57,6 +76,24 @@ export class SLineMarkerItem extends SLineItem {
         }
     } // Constructor
 
+    /** 接收事件作出修改  */
+    changePos() {
+        if (this.startItem) {
+            // 判断删除equip后,不移动
+            if (this.startItem.parent) {
+                let scenePoint: SPoint = this.startItem.boundingRect().center();
+                this.line[0] = this.startItem.mapToScene(scenePoint.x, scenePoint.y);
+            }
+        }
+        if (this.endItem) {
+            // 删除equip后
+            if (this.endItem.parent) {
+                let scenePoint: SPoint = this.endItem.boundingRect().center();
+                this.line[1] = this.endItem.mapToScene(scenePoint.x, scenePoint.y);
+            }
+        }
+    }
+
     toData(): Marker {
         this.data.Pos = { X: this.x, Y: this.y };
         this.data.Properties.Line = this.line.map(pos => {
@@ -68,6 +105,12 @@ export class SLineMarkerItem extends SLineItem {
         this.data.Properties.LineWidth = this.lineWidth;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineStyle = this.lineStyle;
+        if (this.startItem && this.startItem.parent) {
+            this.data.Properties.StartItemId = this.startItem.id;
+        }
+        if (this.endItem && this.endItem.parent) {
+            this.data.Properties.EndItemId = this.endItem.id;
+        }
         return this.data;
     }
 

+ 2 - 1
src/lib/items/SSCPZZoneLegendItem.js

@@ -1,7 +1,7 @@
 import { SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from "@/components/mapClass/until";
 import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
-import { hexify } from "../../components/mapClass/until";
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *
@@ -22,6 +22,7 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
         this._showText = true;
         /** 是否蒙版遮罩  */
         this._maskFlag = false;
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 2 - 1
src/lib/items/SSCPZZoneLegendItem.ts

@@ -3,8 +3,8 @@ import { SGraphItem } from "@saga-web/graph/lib";
 import { Legend } from '../types/Legend';
 import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
+import { hexify } from "@/components/mapClass/until"
 import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
-import { hexify } from "../../components/mapClass/until";
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *
@@ -113,6 +113,7 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
      */
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 1 - 0
src/lib/items/STextMarkerItem.js

@@ -16,6 +16,7 @@ export class STextMarkerItem extends STextItem {
     constructor(parent, data) {
         super(parent);
         this.zOrder = ItemOrder.textOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 1 - 0
src/lib/items/STextMarkerItem.ts

@@ -21,6 +21,7 @@ export class STextMarkerItem extends STextItem {
     constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.zOrder = ItemOrder.textOrder;
+        this.isTransform = false;
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;

+ 1 - 0
src/lib/items/SZoneLegendItem.js

@@ -22,6 +22,7 @@ export class SZoneLegendItem extends SPolygonItem {
         this._showText = true;
         /** 是否蒙版遮罩  */
         this._maskFlag = false;
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 1 - 0
src/lib/items/SZoneLegendItem.ts

@@ -105,6 +105,7 @@ export class SZoneLegendItem extends SPolygonItem {
      */
     constructor(parent: SGraphItem | null, data: Legend) {
         super(parent);
+        this.textItem.isTransform = false;
         this.zOrder = ItemOrder.polygonOrder;
         this.data = data;
         this.id = data.ID;

+ 17 - 9
src/lib/parsers/STopologyParser.js

@@ -6,7 +6,8 @@ import { SImageMarkerItem } from '../items/SImageMarkerItem';
 import { SLineMarkerItem } from '../items/SLineMarkerItem';
 import { STextMarkerItem } from '../items/STextMarkerItem';
 import { TipelineItem } from '../items/TipelineItem';
-import { ItemOrder } from "@saga-web/big";
+import { SSCPZZoneLegendItem } from '../items/SSCPZZoneLegendItem';
+import { SFHFQZoneLegendItem } from '../items/SFHFQZoneLegendItem';
 /**
  * 拓扑图信息解析器
  *
@@ -64,10 +65,21 @@ export class STopologyParser extends SParser {
             this.noneLegendList.push(item);
         }
         else if (t.GraphElementType == "Zone") {
-            let item = new SZoneLegendItem(null, t);
-            item.selectable = true;
-            item.zOrder == ItemOrder.polygonOrder;
-            this.zoneLegendList.push(item);
+            if (t.SubType == "SCPZ") {
+                let item = new SSCPZZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            }
+            else if (t.SubType == "FHFQ") {
+                let item = new SFHFQZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            }
+            else {
+                let item = new SZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            }
         }
         else if (t.GraphElementType == 'Image') {
             let item = new SImageLegendItem(null, t);
@@ -85,18 +97,15 @@ export class STopologyParser extends SParser {
             let item = new SImageMarkerItem(null, t);
             this.imageMarkerList.push(item);
             item.selectable = true;
-            item.zOrder = ItemOrder.imageOrder;
         }
         else if (t.Type == "Line") {
             let item = new SLineMarkerItem(null, t);
             item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
             this.lineMarkerList.push(item);
         }
         else if (t.Type == "Text") {
             let item = new STextMarkerItem(null, t);
             item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
             this.textMarkerList.push(item);
         }
     } // Function addMarker()
@@ -108,7 +117,6 @@ export class STopologyParser extends SParser {
     addRelation(t) {
         let item = new TipelineItem(null, t);
         item.selectable = true;
-        item.zOrder == ItemOrder.polylineOrder;
         this.relationList.push(item);
     } // Function addRelation()
 } // class STopologyParser

+ 15 - 8
src/lib/parsers/STopologyParser.ts

@@ -15,6 +15,8 @@ import { STextMarkerItem } from '../items/STextMarkerItem';
 import { TipelineItem } from '../items/TipelineItem';
 import { ItemOrder } from "@saga-web/big";
 import { SItemStatus } from "@saga-web/big";
+import { SSCPZZoneLegendItem } from '../items/SSCPZZoneLegendItem';
+import { SFHFQZoneLegendItem } from '../items/SFHFQZoneLegendItem';
 /**
  * 拓扑图信息解析器
  *
@@ -72,10 +74,19 @@ export class STopologyParser extends SParser {
             let item = new SNoneLegendItem(null, t);
             this.noneLegendList.push(item);
         } else if (t.GraphElementType == "Zone") {
-            let item = new SZoneLegendItem(null, t);
-            item.selectable = true;
-            item.zOrder == ItemOrder.polygonOrder;
-            this.zoneLegendList.push(item);
+            if (t.SubType == "SCPZ") {
+                let item = new SSCPZZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            } else if (t.SubType == "FHFQ") {
+                let item = new SFHFQZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            } else {
+                let item = new SZoneLegendItem(null, t);
+                item.selectable = true;
+                this.zoneLegendList.push(item);
+            }
         } else if (t.GraphElementType == 'Image') {
             let item = new SImageLegendItem(null, t);
             item.selectable = true;
@@ -93,16 +104,13 @@ export class STopologyParser extends SParser {
             let item = new SImageMarkerItem(null, t);
             this.imageMarkerList.push(item);
             item.selectable = true;
-            item.zOrder = ItemOrder.imageOrder;
         } else if (t.Type == "Line") {
             let item = new SLineMarkerItem(null, t);
             item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
             this.lineMarkerList.push(item);
         } else if (t.Type == "Text") {
             let item = new STextMarkerItem(null, t);
             item.selectable = true;
-            item.zOrder = ItemOrder.lineOrder;
             this.textMarkerList.push(item);
         }
     } // Function addMarker()
@@ -115,7 +123,6 @@ export class STopologyParser extends SParser {
     private addRelation(t: Relation): void {
         let item = new TipelineItem(null, t);
         item.selectable = true;
-        item.zOrder == ItemOrder.polylineOrder;
         this.relationList.push(item);
     } // Function addRelation()
 } // class STopologyParser

+ 3 - 2
src/lib/types/Legend.ts

@@ -23,6 +23,7 @@ import { Anchor } from "./Anchor";
 import { SGraphElementType } from "./../enums/SGraphElementType";
 import { Point } from "@saga-web/big/lib/types/Point";
 import { Size } from "@saga-web/big/lib/types/Size";
+import { SPoint } from '@saga-web/draw/lib';
 
 /**
  * 图例节点接口
@@ -37,7 +38,7 @@ export interface Legend {
     /** 返回工程信息化对象 ID 列表 */
     AttachObjectIds?: string[];
     /** 图标,区域类型  */
-    GraphElementType: SGraphElementType;
+    GraphElementType: string;
     /** 对应的图例ID  */
     GraphElementId: string;
     /** 图例数量  */
@@ -55,7 +56,7 @@ export interface Legend {
     /** 锚点List  */
     AnchorList?: Anchor[];
     /** 轮廓线  */
-    OutLine?: Point[];
+    OutLine?: Point[] | SPoint[];
     /** 由应用自己定义  */
     Properties?: any;
      /** zone 区分防火分区和石材铺装  */

+ 1 - 1
src/lib/types/Relation.ts

@@ -47,7 +47,7 @@ export interface Relation {
     /** 方向(0:无向,1:节点1到节点2,2:节点2到节点1) */
     Dir?: SRelationDir;
     /** 线类型(0:直线,1:水平/垂直线,2:曲线) */
-    LineType: SLineType;
+    LineType: string;
     /** 线的顶点坐标 */
     PointList: Point[];
     /** 线的绘图样式 */