xushiting 2 年之前
父节点
当前提交
9d2def073f
共有 24 个文件被更改,包括 355 次插入1666 次删除
  1. 2 3
      src/views/draw-file/board/editCAD/Constant.js
  2. 4 6
      src/views/draw-file/board/editCAD/Controls/AddWall.js
  3. 3 4
      src/views/draw-file/board/editCAD/Controls/UIControl.js
  4. 22 8
      src/views/draw-file/board/editCAD/Geometry/Arrow.js
  5. 9 8
      src/views/draw-file/board/editCAD/Geometry/Circle.js
  6. 0 12
      src/views/draw-file/board/editCAD/Geometry/Geometry.js
  7. 39 1
      src/views/draw-file/board/editCAD/Geometry/Icon.js
  8. 48 51
      src/views/draw-file/board/editCAD/Geometry/Sign.js
  9. 10 0
      src/views/draw-file/board/editCAD/Geometry/Wall.js
  10. 0 88
      src/views/draw-file/board/editCAD/History/Change.js
  11. 39 39
      src/views/draw-file/board/editCAD/History/History.js
  12. 2 50
      src/views/draw-file/board/editCAD/History/HistoryUtil.js
  13. 11 46
      src/views/draw-file/board/editCAD/Layer.js
  14. 78 49
      src/views/draw-file/board/editCAD/ListenLayer.js
  15. 1 2
      src/views/draw-file/board/editCAD/Load.js
  16. 57 679
      src/views/draw-file/board/editCAD/Renderer/Draw.js
  17. 0 41
      src/views/draw-file/board/editCAD/Renderer/Render.js
  18. 5 5
      src/views/draw-file/board/editCAD/Service/AnalyService.js
  19. 0 25
      src/views/draw-file/board/editCAD/Service/CompassService.js
  20. 0 26
      src/views/draw-file/board/editCAD/Service/ElementService.js
  21. 18 289
      src/views/draw-file/board/editCAD/Service/FloorplanService.js
  22. 0 44
      src/views/draw-file/board/editCAD/Service/WallService.js
  23. 7 188
      src/views/draw-file/board/editCAD/Style.js
  24. 0 2
      src/views/draw-file/board/editCAD/enum/ElementEvents.js

+ 2 - 3
src/views/draw-file/board/editCAD/Constant.js

@@ -8,10 +8,9 @@ const Constant = {
     minScreenDis: 2, //layer.js里,判断是否拖拽了,目前暂时不用
     minScreenDis: 2, //layer.js里,判断是否拖拽了,目前暂时不用
     minRealDis: 0.1,
     minRealDis: 0.1,
     minAdsorb: 0.1,
     minAdsorb: 0.1,
-    minAngle: 10,
-    maxAngle: 170,
+    minAngle: 15,
+    maxAngle: 175,
     defaultZoom: 100,
     defaultZoom: 100,
-    minSymbolLen: 0.2,
     ratio: 3, //1,
     ratio: 3, //1,
 }
 }
 export default Constant
 export default Constant

+ 4 - 6
src/views/draw-file/board/editCAD/Controls/AddWall.js

@@ -36,27 +36,25 @@ export default class AddWall {
         }
         }
     }
     }
 
 
-    //inoutSide表示内墙或者外墙
-    buildWall(inoutSide) {
+    buildWall() {
         console.log('添加新墙!')
         console.log('添加新墙!')
 
 
         let joinInfos = this.getJoinsForWalls()
         let joinInfos = this.getJoinsForWalls()
         let splitPointIds = this.splitAllJoins(joinInfos)
         let splitPointIds = this.splitAllJoins(joinInfos)
-        this.creatNewWalls(splitPointIds, inoutSide)
+        this.creatNewWalls(splitPointIds)
         this.canAdd = false
         this.canAdd = false
         this.updateStart(this.endInfo.position, splitPointIds[splitPointIds.length - 1])
         this.updateStart(this.endInfo.position, splitPointIds[splitPointIds.length - 1])
         listenLayer.clear()
         listenLayer.clear()
     }
     }
 
 
     //开始新建墙,可能是多个
     //开始新建墙,可能是多个
-    creatNewWalls(splitPointIds, inoutSide) {
+    creatNewWalls(splitPointIds) {
         for (let i = 0; i < splitPointIds.length - 1; ++i) {
         for (let i = 0; i < splitPointIds.length - 1; ++i) {
             let pointId1 = splitPointIds[i]
             let pointId1 = splitPointIds[i]
             let pointId2 = splitPointIds[i + 1]
             let pointId2 = splitPointIds[i + 1]
             let wallId = wallService.getWallId(pointId1, pointId2)
             let wallId = wallService.getWallId(pointId1, pointId2)
             if (!wallId) {
             if (!wallId) {
-                let wall = wallService.createWall(pointId1, pointId2)
-                wall.setOut(inoutSide)
+                wallService.createWall(pointId1, pointId2)
             }
             }
         }
         }
     }
     }

+ 3 - 4
src/views/draw-file/board/editCAD/Controls/UIControl.js

@@ -116,7 +116,7 @@ export default class UIControl {
                 }
                 }
                 break
                 break
             case 'split':
             case 'split':
-                if (type == VectorType.Wall || type == 'OutWall') {
+                if (type == VectorType.Wall) {
                     let wall = floorplanService.getWall(item.vectorId)
                     let wall = floorplanService.getWall(item.vectorId)
                     let startPoint = floorplanService.getPoint(wall.start)
                     let startPoint = floorplanService.getPoint(wall.start)
                     let endPoint = floorplanService.getPoint(wall.end)
                     let endPoint = floorplanService.getPoint(wall.end)
@@ -185,9 +185,8 @@ export default class UIControl {
         } else if (item.type == VectorType.Wall) {
         } else if (item.type == VectorType.Wall) {
             let wall = floorplanService.getWall(item.vectorId)
             let wall = floorplanService.getWall(item.vectorId)
             this.layer.$xui.currentAttributes = {
             this.layer.$xui.currentAttributes = {
-                name: wall.out ? 'OutWall' : item.type,
-                important: wall.important || wall.out,
-                wallType: wall.out ? 'OutWall' : item.type,
+                name: item.type,
+                wallType: item.type,
             }
             }
         } else if (signService.isSign(item.type)) {
         } else if (signService.isSign(item.type)) {
             let sign = floorplanService.getSign(item.vectorId)
             let sign = floorplanService.getSign(item.vectorId)

+ 22 - 8
src/views/draw-file/board/editCAD/Geometry/Arrow.js

@@ -1,21 +1,35 @@
 import VectorType from '../enum/VectorType.js'
 import VectorType from '../enum/VectorType.js'
 import Geometry from './Geometry.js'
 import Geometry from './Geometry.js'
+import SelectState from '../enum/SelectState.js'
+import { mathUtil } from '../MathUtil.js'
 
 
 export default class Arrow extends Geometry {
 export default class Arrow extends Geometry {
-    constructor(pointId1, pointId2, vectorId, floor) {
+    constructor(startPoint, endPoint, vectorId, floor) {
         super()
         super()
-        this.start = pointId1
-        this.end = pointId2
+        this.startPoint = startPoint
+        this.endPoint = endPoint
         this.floor = floor?floor:0
         this.floor = floor?floor:0
         this.geoType = VectorType.Arrow
         this.geoType = VectorType.Arrow
         this.setId(vectorId)
         this.setId(vectorId)
     }
     }
 
 
-    getPointId(dir) {
-        if (dir == 'start') {
-            return this.start
-        } else {
-            return this.end
+    isContain(position){
+
+        const dis1 = mathUtil.getDistance(position, this.startPoint)
+        const dis2 = mathUtil.getDistance(position, this.endPoint)
+
+        if(dis1 < Constant.minAdsorb){
+            return SelectState.Start
+        }
+
+        if(dis2 < Constant.minAdsorb){
+            return SelectState.End
+        }
+
+        let flag = mathUtil.isContainForSegment(position, this.startPoint, this.endPoint)
+        if(flag){
+            return SelectState.All
         }
         }
+        return null;
     }
     }
 }
 }

+ 9 - 8
src/views/draw-file/board/editCAD/Geometry/Circle.js

@@ -1,6 +1,7 @@
 import VectorType from '../enum/VectorType.js'
 import VectorType from '../enum/VectorType.js'
 import Geometry from './Geometry.js'
 import Geometry from './Geometry.js'
 import SelectState from '../enum/SelectState.js'
 import SelectState from '../enum/SelectState.js'
+import { mathUtil } from '../MathUtil.js'
 
 
 export default class Circle extends Geometry {
 export default class Circle extends Geometry {
     constructor(position,radius, vectorId, floor) {
     constructor(position,radius, vectorId, floor) {
@@ -15,20 +16,20 @@ export default class Circle extends Geometry {
 
 
     setPoints(){
     setPoints(){
         this.points[0] = {
         this.points[0] = {
-            x:this.center - this.radius/2,
-            y:this.center + this.radius/2
+            x:this.center - this.radius,
+            y:this.center + this.radius
         }
         }
         this.points[1] = {
         this.points[1] = {
-            x:this.center + this.radius/2,
-            y:this.center + this.radius/2
+            x:this.center + this.radius,
+            y:this.center + this.radius
         }
         }
         this.points[2] = {
         this.points[2] = {
-            x:this.center + this.radius/2,
-            y:this.center - this.radius/2
+            x:this.center + this.radius,
+            y:this.center - this.radius
         }
         }
         this.points[3] = {
         this.points[3] = {
-            x:this.center - this.radius/2,
-            y:this.center - this.radius/2
+            x:this.center - this.radius,
+            y:this.center - this.radius
         }
         }
     }
     }
 
 

+ 0 - 12
src/views/draw-file/board/editCAD/Geometry/Geometry.js

@@ -16,18 +16,6 @@ export default class Geometry {
         }
         }
     }
     }
 
 
-    setSymbolPosition(position, dir) {
-        if (dir == 'start') {
-            mathUtil.clonePoint(this.startPoint, position)
-        } else if (dir == 'end') {
-            mathUtil.clonePoint(this.endPoint, position)
-        }
-    }
-
-    setSymbolParent(wallId) {
-        this.parent = wallId
-    }
-
     setPointParent(wallId, dir) {
     setPointParent(wallId, dir) {
         if (this.parent == null) {
         if (this.parent == null) {
             this.parent = {}
             this.parent = {}

+ 39 - 1
src/views/draw-file/board/editCAD/Geometry/Icon.js

@@ -1,13 +1,51 @@
 import VectorType from '../enum/VectorType.js'
 import VectorType from '../enum/VectorType.js'
 import Geometry from './Geometry.js'
 import Geometry from './Geometry.js'
+import { mathUtil } from '../MathUtil.js'
 
 
 export default class Icon extends Geometry {
 export default class Icon extends Geometry {
     constructor(position,value, vectorId, floor) {
     constructor(position,value, vectorId, floor) {
         super()
         super()
-        this.position = position
+        this.center = position
+        this.radius = radius
+        this.points = [];              //顺时针
         this.value = value
         this.value = value
         this.floor = floor?floor:0
         this.floor = floor?floor:0
         this.geoType = VectorType.Icon
         this.geoType = VectorType.Icon
         this.setId(vectorId)
         this.setId(vectorId)
     }
     }
+
+    setPoints(){
+        this.points[0] = {
+            x:this.center - this.radius,
+            y:this.center + this.radius
+        }
+        this.points[1] = {
+            x:this.center + this.radius,
+            y:this.center + this.radius
+        }
+        this.points[2] = {
+            x:this.center + this.radius,
+            y:this.center - this.radius
+        }
+        this.points[3] = {
+            x:this.center - this.radius,
+            y:this.center - this.radius
+        }
+    }
+
+    isContain(position){
+        for(let i=0;i<this.points.length;++i){
+            const dis = mathUtil.getDistance(position, this.points[i])
+            if(dis < Constant.minAdsorb){
+                return SelectState.Scale
+            }
+        }
+
+        const dis = mathUtil.getDistance(position, this.center)
+        if(Math.abs(this.radius - dis)<Constant.minAdsorb){
+            return SelectState.All
+        }
+
+        return null;
+    }
 }
 }

+ 48 - 51
src/views/draw-file/board/editCAD/Geometry/Sign.js

@@ -8,65 +8,62 @@ export default class Sign extends Geometry {
         super()
         super()
         this.center = center
         this.center = center
         this.geoType = type
         this.geoType = type
+        this.points = []
         this.angle = 0 //逆时针为负,顺时针为正。单位是:°
         this.angle = 0 //逆时针为负,顺时针为正。单位是:°
         this.scale = 1 //缩放比例
         this.scale = 1 //缩放比例
+        this.radius = 1;
         this.setId(vectorId)
         this.setId(vectorId)
     }
     }
 
 
-    isContain(position) {
-        const dis = mathUtil.getDistance(position, this.center)
-        let len = this.getLen() * this.scale
-        if (dis < len / 2) {
-            return SelectState.Select
-        } else {
-            return null
+    setPoints(){
+        const point0 = {
+            x:-this.radius,
+            y:this.radius
+        }
+        const point1 = {
+            x:this.radius,
+            y:this.radius
+        }
+        const point2 = {
+            x:this.radius,
+            y:-this.radius
+        }
+        const point3 = {
+            x:-this.radius,
+            y:-this.radius
+        }
+        
+        this.points[0] = {
+            x:point0.x*Math.cos(this.angle)-point0.y*Math.sin(this.angle)+this.center.x,
+            y:point0.y*Math.cos(this.angle)+point0.x*Math.sin(this.angle)+this.center.y
+        }
+        this.points[1] = {
+            x:point1.x*Math.cos(this.angle)-point1.y*Math.sin(this.angle)+this.center.x,
+            y:point1.y*Math.cos(this.angle)+point1.x*Math.sin(this.angle)+this.center.y
+        }
+        this.points[2] = {
+            x:point2.x*Math.cos(this.angle)-point2.y*Math.sin(this.angle)+this.center.x,
+            y:point2.y*Math.cos(this.angle)+point2.x*Math.sin(this.angle)+this.center.y
+        }
+        this.points[3] = {
+            x:point3.x*Math.cos(this.angle)-point3.y*Math.sin(this.angle)+this.center.x,
+            y:point3.y*Math.cos(this.angle)+point3.x*Math.sin(this.angle)+this.center.y
         }
         }
     }
     }
 
 
-    getLen() {
-        switch (this.geoType) {
-            case VectorType.TV: //电视
-                return 1.3
-            case VectorType.CombinationSofa: //组合沙发
-                return 3.4
-            case VectorType.SingleSofa: //单人沙发
-                return 1
-            case VectorType.TeaTable: //茶几
-                return 0.8
-            case VectorType.Carpet: //地毯
-                return 2
-            case VectorType.Plant: //植物
-                return 0.3
-            case VectorType.DiningTable: //餐桌
-                return 2.4
-            case VectorType.DoubleBed: //双人床
-                return 2
-            case VectorType.SingleBed: //单人床
-                return 2
-            case VectorType.Wardrobe: //衣柜
-                return 1.2
-            case VectorType.Dresser: //梳妆台
-                return 0.8
-            case VectorType.BedsideCupboard: //床头柜
-                return 0.4
-            case VectorType.Pillow: //抱枕
-                return 0.6
-            case VectorType.GasStove: //燃气灶
-                return 1
-            case VectorType.Cupboard: //橱柜
-                return 1.2
-            case VectorType.Bathtub: //浴缸
-                return 1.6
-            case VectorType.Closestool: //马桶
-                return 0.63
-            case VectorType.Washstand: //洗漱台
-                return 0.8
-            case VectorType.Desk: //书桌
-                return 1.2
-            case VectorType.BalconyChair: //阳台椅
-                return 2
-            case VectorType.Elevator: //电梯
-                return 1.5
+    isContain(position){
+        for(let i=0;i<this.points.length;++i){
+            const dis = mathUtil.getDistance(position, this.points[i])
+            if(dis < Constant.minAdsorb){
+                return SelectState.Scale
+            }
+        }
+
+        const dis = mathUtil.getDistance(position, this.center)
+        if(Math.abs(this.radius - dis)<Constant.minAdsorb){
+            return SelectState.All
         }
         }
+
+        return null;
     }
     }
 }
 }

+ 10 - 0
src/views/draw-file/board/editCAD/Geometry/Wall.js

@@ -18,4 +18,14 @@ export default class Wall extends Geometry {
             return this.end
             return this.end
         }
         }
     }
     }
+
+    getOtherPointId(pointId) {
+        if (this.start == pointId) {
+            return this.end
+        } else if (this.end == pointId) {
+            return this.start
+        } else {
+            return null
+        }
+    }
 }
 }

+ 0 - 88
src/views/draw-file/board/editCAD/History/Change.js

@@ -29,9 +29,7 @@ export default class Change {
         let flag = this.compareAngle()
         let flag = this.compareAngle()
         if (!flag) {
         if (!flag) {
             this.comparePoints()
             this.comparePoints()
-            this.compareSymbols()
             this.compareWalls()
             this.compareWalls()
-            this.compareComponents()
             this.compareTags()
             this.compareTags()
             this.compareSigns()
             this.compareSigns()
         }
         }
@@ -44,7 +42,6 @@ export default class Change {
         if (
         if (
             this.elements.points.length == 0 &&
             this.elements.points.length == 0 &&
             this.elements.walls.length == 0 &&
             this.elements.walls.length == 0 &&
-            this.elements.symbols.length == 0 &&
             this.elements.components.length == 0 &&
             this.elements.components.length == 0 &&
             this.elements.tags.length == 0 &&
             this.elements.tags.length == 0 &&
             this.elements.signs.length == 0
             this.elements.signs.length == 0
@@ -137,91 +134,6 @@ export default class Change {
         }
         }
     }
     }
 
 
-    compareSymbols() {
-        //const currentFloor = floorplanService.getCurrentFloorNum();
-
-        this.elements.symbols = []
-        const symbols = floorplanService.getSymbols()
-
-        const wallIds = []
-
-        for (const key in symbols) {
-            const symbol = symbols[key]
-            const lastSymbol = this.lastData.symbols[key]
-
-            // 不存在意味着增加
-            if (!lastSymbol) {
-                const item = {
-                    handle: HistoryEvents.AddSymbol,
-                    symbol: historyUtil.getDataForSymbol(symbol),
-                }
-                this.elements.symbols.push(item)
-            } else {
-                if (!historyUtil.isDifferentForSymbols(symbol, lastSymbol)) {
-                    delete this.lastData.symbols[key]
-                    continue
-                } else {
-                    const item = {
-                        handle: HistoryEvents.ModifySymbol,
-                        preSymbol: historyUtil.getDataForSymbol(lastSymbol),
-                        curSymbol: historyUtil.getDataForSymbol(symbol),
-                    }
-                    this.elements.symbols.push(item)
-                }
-            }
-            delete this.lastData.symbols[key]
-        }
-
-        for (const key in this.lastData.symbols) {
-            const item = {
-                handle: HistoryEvents.DeleteSymbol,
-                symbol: historyUtil.getDataForSymbol(this.lastData.symbols[key]),
-            }
-            this.elements.symbols.push(item)
-        }
-    }
-
-    compareComponents() {
-        //const currentFloor = floorplanService.getCurrentFloorNum();
-        this.elements.components = []
-        const components = floorplanService.getComponents()
-
-        for (const key in components) {
-            const component = components[key]
-            const lastComponent = this.lastData.components[key]
-
-            // 不存在意味着增加
-            if (!lastComponent) {
-                const item = {
-                    handle: HistoryEvents.AddComponent,
-                    component: historyUtil.getDataForComponent(component),
-                }
-                this.elements.components.push(item)
-            } else {
-                if (!historyUtil.isDifferentForComponents(component, lastComponent)) {
-                    delete this.lastData.components[key]
-                    continue
-                } else {
-                    const item = {
-                        handle: HistoryEvents.ModifyComponent,
-                        preComponent: historyUtil.getDataForComponent(lastComponent),
-                        curComponent: historyUtil.getDataForComponent(component),
-                    }
-                    this.elements.components.push(item)
-                }
-            }
-            delete this.lastData.components[key]
-        }
-
-        for (const key in this.lastData.components) {
-            const item = {
-                handle: HistoryEvents.DeleteComponent,
-                component: historyUtil.getDataForComponent(this.lastData.components[key]),
-            }
-            this.elements.components.push(item)
-        }
-    }
-
     compareTags() {
     compareTags() {
         this.elements.tags = []
         this.elements.tags = []
         const tags = floorplanService.getTags()
         const tags = floorplanService.getTags()

+ 39 - 39
src/views/draw-file/board/editCAD/History/History.js

@@ -17,14 +17,14 @@ export default class History {
 
 
     init() {
     init() {
         change.saveCurrentInfo()
         change.saveCurrentInfo()
-        const points = floorplanService.getPoints()
-        if (Object.keys(points).length > 0) {
-            this.layer.$xui.toolbar.clear = true
-            this.layer.$xui.toolbar.download = true
-        } else {
-            this.layer.$xui.toolbar.clear = false
-            this.layer.$xui.toolbar.download = false
-        }
+        // const points = floorplanService.getPoints()
+        // if (Object.keys(points).length > 0) {
+        //     this.layer.$xui.toolbar.clear = true
+        //     this.layer.$xui.toolbar.download = true
+        // } else {
+        //     this.layer.$xui.toolbar.clear = false
+        //     this.layer.$xui.toolbar.download = false
+        // }
     }
     }
 
 
     save() {
     save() {
@@ -36,22 +36,22 @@ export default class History {
         change.saveCurrentInfo()
         change.saveCurrentInfo()
         this.setState()
         this.setState()
         const historyState = historyService.getHistoryState()
         const historyState = historyService.getHistoryState()
-        if (historyState.pre) {
-            this.layer.$xui.toolbar.recall = true
-        }
-        this.layer.$xui.toolbar.recover = false
+        // if (historyState.pre) {
+        //     this.layer.$xui.toolbar.recall = true
+        // }
+        // this.layer.$xui.toolbar.recover = false
 
 
-        const points = floorplanService.getPoints()
-        if (Object.keys(points).length > 0) {
-            this.layer.$xui.toolbar.clear = true
-            this.layer.$xui.toolbar.download = true
-        } else {
-            this.layer.$xui.toolbar.clear = false
-            this.layer.$xui.toolbar.download = false
-        }
+        // const points = floorplanService.getPoints()
+        // if (Object.keys(points).length > 0) {
+        //     this.layer.$xui.toolbar.clear = true
+        //     this.layer.$xui.toolbar.download = true
+        // } else {
+        //     this.layer.$xui.toolbar.clear = false
+        //     this.layer.$xui.toolbar.download = false
+        // }
 
 
         //给UI发送事件
         //给UI发送事件
-        this.layer.emit('change')
+        // this.layer.emit('change')
 
 
         return change.elements
         return change.elements
     }
     }
@@ -134,14 +134,14 @@ export default class History {
             change.saveCurrentInfo()
             change.saveCurrentInfo()
             this.setState()
             this.setState()
 
 
-            const points = floorplanService.getPoints()
-            if (Object.keys(points).length > 0) {
-                this.layer.$xui.toolbar.clear = true
-                this.layer.$xui.toolbar.download = true
-            } else {
-                this.layer.$xui.toolbar.clear = false
-                this.layer.$xui.toolbar.download = false
-            }
+            // const points = floorplanService.getPoints()
+            // if (Object.keys(points).length > 0) {
+            //     this.layer.$xui.toolbar.clear = true
+            //     this.layer.$xui.toolbar.download = true
+            // } else {
+            //     this.layer.$xui.toolbar.clear = false
+            //     this.layer.$xui.toolbar.download = false
+            // }
         } else {
         } else {
             console.error('goPreState超出范围!')
             console.error('goPreState超出范围!')
         }
         }
@@ -167,7 +167,7 @@ export default class History {
         for (let i = 0; i < itemForWalls.length; ++i) {
         for (let i = 0; i < itemForWalls.length; ++i) {
             const item = itemForWalls[i]
             const item = itemForWalls[i]
             if (item.handle == HistoryEvents.AddWall) {
             if (item.handle == HistoryEvents.AddWall) {
-                floorplanService.deleteWallNoSymbol(item.wall.id)
+                floorplanService.deleteWall(item.wall.id)
             } else if (item.handle == HistoryEvents.DeleteWall) {
             } else if (item.handle == HistoryEvents.DeleteWall) {
                 const preWall = item.wall
                 const preWall = item.wall
                 let newWall = wallService.createWall(preWall.start, preWall.end, preWall.id)
                 let newWall = wallService.createWall(preWall.start, preWall.end, preWall.id)
@@ -255,7 +255,7 @@ export default class History {
                 let newWall = wallService.createWall(preWall.start, preWall.end, preWall.id)
                 let newWall = wallService.createWall(preWall.start, preWall.end, preWall.id)
                 historyUtil.assignWallFromWall(newWall, preWall)
                 historyUtil.assignWallFromWall(newWall, preWall)
             } else if (item.handle == HistoryEvents.DeleteWall) {
             } else if (item.handle == HistoryEvents.DeleteWall) {
-                floorplanService.deleteWallNoSymbol(item.wall.id)
+                floorplanService.deleteWall(item.wall.id)
             } else if (item.handle == HistoryEvents.ModifyWall) {
             } else if (item.handle == HistoryEvents.ModifyWall) {
                 const currentWall = item.curWall
                 const currentWall = item.curWall
                 let preWall = floorplanService.getWall(item.preWall.id)
                 let preWall = floorplanService.getWall(item.preWall.id)
@@ -338,14 +338,14 @@ export default class History {
             change.saveCurrentInfo()
             change.saveCurrentInfo()
             this.setState()
             this.setState()
 
 
-            const points = floorplanService.getPoints()
-            if (Object.keys(points).length > 0) {
-                this.layer.$xui.toolbar.clear = true
-                this.layer.$xui.toolbar.download = true
-            } else {
-                this.layer.$xui.toolbar.clear = false
-                this.layer.$xui.toolbar.download = false
-            }
+            // const points = floorplanService.getPoints()
+            // if (Object.keys(points).length > 0) {
+            //     this.layer.$xui.toolbar.clear = true
+            //     this.layer.$xui.toolbar.download = true
+            // } else {
+            //     this.layer.$xui.toolbar.clear = false
+            //     this.layer.$xui.toolbar.download = false
+            // }
         } else {
         } else {
             historyService.undoHistoryRecord()
             historyService.undoHistoryRecord()
             console.error('goNextState超出范围!')
             console.error('goNextState超出范围!')

+ 2 - 50
src/views/draw-file/board/editCAD/History/HistoryUtil.js

@@ -8,32 +8,13 @@ export default class HistoryUtil {
     constructor() {}
     constructor() {}
 
 
     isDifferentForWalls(wall1, wall2) {
     isDifferentForWalls(wall1, wall2) {
-        if (wall1.start == wall2.start && wall1.end == wall2.end && wall1.out == wall2.out && wall1.important == wall2.important) {
-            return false
-        } else {
-            return true
-        }
-    }
-    isDifferentForSymbols(symbol1, symbol2) {
-        if (
-            mathUtil.equalPoint(symbol1.startPoint, symbol2.startPoint) &&
-            mathUtil.equalPoint(symbol1.endPoint, symbol2.endPoint) &&
-            symbol1.openSide == symbol2.openSide &&
-            symbol1.parent == symbol2.parent &&
-            symbol1.enter == symbol2.enter
-        ) {
-            return false
-        } else {
-            return true
-        }
-    }
-    isDifferentForComponents(component1, component2) {
-        if (JSON.stringify(component1.points2d) == JSON.stringify(component2.points) && component1.angle == component2.angle) {
+        if (wall1.start == wall2.start && wall1.end == wall2.end) {
             return false
             return false
         } else {
         } else {
             return true
             return true
         }
         }
     }
     }
+  
     isDifferentForTags(tag1, tag2) {
     isDifferentForTags(tag1, tag2) {
         if (mathUtil.equalPoint(tag1.center, tag2.center) && tag1.title == tag2.title && tag1.des == tag2.des && tag1.unit == tag2.unit) {
         if (mathUtil.equalPoint(tag1.center, tag2.center) && tag1.title == tag2.title && tag1.des == tag2.des && tag1.unit == tag2.unit) {
             return false
             return false
@@ -61,9 +42,6 @@ export default class HistoryUtil {
     assignWallFromWall(wall1, wall2) {
     assignWallFromWall(wall1, wall2) {
         const wallInfo = {}
         const wallInfo = {}
         wallInfo.vectorId = wall1.vectorId
         wallInfo.vectorId = wall1.vectorId
-        wallInfo.children = JSON.parse(JSON.stringify(wall2.children))
-        wallInfo.out = wall2.out
-        wallInfo.important = wall2.important
         wallInfo.start = wall2.start
         wallInfo.start = wall2.start
         wallInfo.end = wall2.end
         wallInfo.end = wall2.end
         wallService.setWallInfo(wallInfo)
         wallService.setWallInfo(wallInfo)
@@ -115,36 +93,10 @@ export default class HistoryUtil {
         data.id = wall.vectorId
         data.id = wall.vectorId
         data.start = wall.start
         data.start = wall.start
         data.end = wall.end
         data.end = wall.end
-        data.out = wall.out
-        data.important = wall.important
-        data.children = JSON.parse(JSON.stringify(wall.children))
         data.type = wall.geoType
         data.type = wall.geoType
         return data
         return data
     }
     }
 
 
-    getDataForSymbol(symbol) {
-        const data = {}
-        data.id = symbol.vectorId
-        data.start = JSON.parse(JSON.stringify(symbol.startPoint))
-        data.end = JSON.parse(JSON.stringify(symbol.endPoint))
-        data.openSide = symbol.openSide
-        data.enter = symbol.enter
-        data.points = JSON.parse(JSON.stringify(symbol.points2d))
-        data.parent = symbol.parent
-        data.type = symbol.geoType
-        return data
-    }
-
-    getDataForComponent(component) {
-        const data = {}
-        data.id = component.vectorId
-        data.type = component.geoType
-        data.center = JSON.parse(JSON.stringify(component.center))
-        data.angle = component.angle
-        data.points = [].concat(component.points2d)
-        return data
-    }
-
     getDataForSign(sign) {
     getDataForSign(sign) {
         const data = {}
         const data = {}
         data.id = sign.vectorId
         data.id = sign.vectorId

+ 11 - 46
src/views/draw-file/board/editCAD/Layer.js

@@ -166,11 +166,11 @@ export default class Layer {
                 stateService.clearDraggingItem()
                 stateService.clearDraggingItem()
                 stateService.clearFocusItem()
                 stateService.clearFocusItem()
                 needAutoRedraw = true
                 needAutoRedraw = true
-                listenLayer.start(position)
                 let startPosition = {
                 let startPosition = {
                     x: addWall.startInfo.position.x,
                     x: addWall.startInfo.position.x,
                     y: addWall.startInfo.position.y,
                     y: addWall.startInfo.position.y,
                 }
                 }
+                listenLayer.start(position,null,null,startPosition)
                 if (listenLayer.modifyPoint) {
                 if (listenLayer.modifyPoint) {
                     position = {
                     position = {
                         x: listenLayer.modifyPoint.x,
                         x: listenLayer.modifyPoint.x,
@@ -185,9 +185,14 @@ export default class Layer {
                     elementService.showNewWall() //画墙
                     elementService.showNewWall() //画墙
                 } else {
                 } else {
                     if (!listenLayer.modifyPoint && addWall.startInfo.linkedPointId) {
                     if (!listenLayer.modifyPoint && addWall.startInfo.linkedPointId) {
+                        //角度很正
                         let newEndPosition = elementService.checkAngle(position, addWall.startInfo.linkedPointId, null)
                         let newEndPosition = elementService.checkAngle(position, addWall.startInfo.linkedPointId, null)
                         if (newEndPosition) {
                         if (newEndPosition) {
                             mathUtil.clonePoint(position, newEndPosition)
                             mathUtil.clonePoint(position, newEndPosition)
+                            listenLayer.modifyPoint = {
+                                x:newEndPosition.x,
+                                y:newEndPosition.y
+                            }
                         }
                         }
                     }
                     }
                     elementService.setNewWallEndPosition(position) //改变end位置
                     elementService.setNewWallEndPosition(position) //改变end位置
@@ -196,12 +201,9 @@ export default class Layer {
                 addWall.canAdd = addWall.canAddWallForEnd(position)
                 addWall.canAdd = addWall.canAddWallForEnd(position)
                 if (!addWall.canAdd) {
                 if (!addWall.canAdd) {
                     elementService.setNewWallState('error')
                     elementService.setNewWallState('error')
-                } else {
-                    if (this.uiControl.selectUI == UIEvents.OutWall) {
-                        elementService.setNewWallState('normal-out')
-                    } else {
-                        elementService.setNewWallState('normal')
-                    }
+                } 
+                else {
+                    elementService.setNewWallState('normal')
                 }
                 }
                 break
                 break
             case LayerEvents.MoveWall:
             case LayerEvents.MoveWall:
@@ -326,7 +328,6 @@ export default class Layer {
             y: Y,
             y: Y,
         })
         })
         let needAutoRedraw = false
         let needAutoRedraw = false
-        let symbol = null
         switch (eventName) {
         switch (eventName) {
             case null:
             case null:
                 return
                 return
@@ -374,32 +375,12 @@ export default class Layer {
                 needAutoRedraw = true
                 needAutoRedraw = true
                 if (focusItem != null && focusItem.type == VectorType.Wall) {
                 if (focusItem != null && focusItem.type == VectorType.Wall) {
                     const wall = floorplanService.getWall(focusItem.vectorId)
                     const wall = floorplanService.getWall(focusItem.vectorId)
-                    if (wall.import || wall.out) {
-                        this.uiControl.currentUI = 'OutWall'
-                    } else {
-                        this.uiControl.currentUI = focusItem.type
-                    }
+                    this.uiControl.currentUI = focusItem.type
                     this.history.save()
                     this.history.save()
                 } else {
                 } else {
                     this.history.save()
                     this.history.save()
                 }
                 }
                 break
                 break
-            case LayerEvents.AddSymbol:
-                if (draggingItem == null) {
-                    this.setEventName('mouseUp')
-                    return
-                }
-                focusItem = {
-                    vectorId: draggingItem.vectorId,
-                    type: draggingItem.type,
-                    cursor: { x: this.lastX, y: this.lastY },
-                }
-
-                stateService.setFocusItem(focusItem)
-                this.uiControl.showAttributes()
-                this.uiControl.currentUI = focusItem.type
-                this.history.save()
-                break
             case LayerEvents.MoveTag:
             case LayerEvents.MoveTag:
                 needAutoRedraw = true
                 needAutoRedraw = true
                 if (focusItem != null && focusItem.type == VectorType.Tag) {
                 if (focusItem != null && focusItem.type == VectorType.Tag) {
@@ -477,17 +458,9 @@ export default class Layer {
         }
         }
 
 
         if (e.ctrlKey && e.code == 'KeyZ') {
         if (e.ctrlKey && e.code == 'KeyZ') {
-            // 撤销
-            if (!this.$xui.toolbar.recall) {
-                return
-            }
             this.revokeHistory()
             this.revokeHistory()
             console.log('ctrl+z')
             console.log('ctrl+z')
         } else if (e.ctrlKey && e.code == 'KeyY') {
         } else if (e.ctrlKey && e.code == 'KeyY') {
-            // 恢复
-            if (!this.$xui.toolbar.recover) {
-                return
-            }
             this.recoveryHistory()
             this.recoveryHistory()
             console.log('ctrl+y')
             console.log('ctrl+y')
         } else if (e.code == 'Delete') {
         } else if (e.code == 'Delete') {
@@ -545,15 +518,7 @@ export default class Layer {
         if (eventName != LayerEvents.AddingWall) {
         if (eventName != LayerEvents.AddingWall) {
             stateService.clearEventName()
             stateService.clearEventName()
             const draggingItem = stateService.getDraggingItem()
             const draggingItem = stateService.getDraggingItem()
-            if (eventName == LayerEvents.AddSymbol) {
-                if (draggingItem && draggingItem.vectorId) {
-                    stateService.clearDraggingItem()
-                }
-            } else if (eventName == LayerEvents.AddComponent) {
-                if (draggingItem && draggingItem.vectorId) {
-                    floorplanService.deleteComponent(draggingItem.vectorId)
-                }
-            } else if (eventName == LayerEvents.AddTag) {
+            if (eventName == LayerEvents.AddTag) {
                 if (draggingItem && draggingItem.vectorId) {
                 if (draggingItem && draggingItem.vectorId) {
                     tagService.deleteTag(draggingItem.vectorId)
                     tagService.deleteTag(draggingItem.vectorId)
                     this.uiControl.currentUI = null
                     this.uiControl.currentUI = null

+ 78 - 49
src/views/draw-file/board/editCAD/ListenLayer.js

@@ -57,14 +57,14 @@ export default class ListenLayer {
     }
     }
 
 
     //开始监听,exceptPointId表示不考虑的点,exceptWallIds表示不考虑的墙
     //开始监听,exceptPointId表示不考虑的点,exceptWallIds表示不考虑的墙
-    start(position, exceptPointId, exceptWallIds) {
-        let nearest = this.getNearForVectors(position, exceptPointId, exceptWallIds)
+    start(position, exceptPointId, exceptWallIds,startPosition) {
+        let nearest = this.getNearForVectors(position, exceptPointId, exceptWallIds,startPosition)
         if (
         if (
-            nearest.modifyPoint &&
-            (nearest.modifyPoint.hasOwnProperty('linkedPointId') ||
-                nearest.modifyPoint.hasOwnProperty('linkedPointIdX') ||
-                nearest.modifyPoint.hasOwnProperty('linkedPointIdY') ||
-                nearest.modifyPoint.hasOwnProperty('linkedWallId'))
+            nearest.modifyPoint //&&
+            // (nearest.modifyPoint.hasOwnProperty('linkedPointId') ||
+            //     nearest.modifyPoint.hasOwnProperty('linkedPointIdX') ||
+            //     nearest.modifyPoint.hasOwnProperty('linkedPointIdY') ||
+            //     nearest.modifyPoint.hasOwnProperty('linkedWallId'))
         ) {
         ) {
             this.modifyPoint = {
             this.modifyPoint = {
                 x: nearest.modifyPoint.x,
                 x: nearest.modifyPoint.x,
@@ -93,15 +93,12 @@ export default class ListenLayer {
 
 
     // 获得最近的墙面和墙角
     // 获得最近的墙面和墙角
     // 同时获得吸附的相关信息
     // 同时获得吸附的相关信息
-    // 找到选中的symbol(只有选中了,才算是最近的)
-    getNearForVectors(position, exceptPointId, exceptWallIds) {
+    getNearForVectors(position, exceptPointId, exceptWallIds,startPosition) {
         let min1 = null // 与墙角的距离
         let min1 = null // 与墙角的距离
         let min2 = null // 与墙面的距离
         let min2 = null // 与墙面的距离
         // 纠正
         // 纠正
-        // 垂直,水平
-        const modifyPoint = {}
-        // 吸附在墙面上
-        let _modifyPoint = null
+        let modifyPoint = {}     //离墙角近,墙角的x/y近
+        let _modifyPoint = null   //只与墙面相交,会截断墙
         const hasPointIds = []
         const hasPointIds = []
         if (exceptPointId) {
         if (exceptPointId) {
             hasPointIds.push(exceptPointId)
             hasPointIds.push(exceptPointId)
@@ -120,11 +117,9 @@ export default class ListenLayer {
             let distance = null
             let distance = null
             const line = wallService.getLine(wall)
             const line = wallService.getLine(wall)
             if (!line) {
             if (!line) {
-                //debugger
                 //删除墙
                 //删除墙
                 floorplanService.deleteWall(wallId)
                 floorplanService.deleteWall(wallId)
                 continue
                 continue
-                console.error('getNearForVectors************************************')
             }
             }
             const join = mathUtil.getJoinLinePoint(position, line)
             const join = mathUtil.getJoinLinePoint(position, line)
 
 
@@ -228,6 +223,7 @@ export default class ListenLayer {
             //是否在墙上,可能在墙外
             //是否在墙上,可能在墙外
             const _flag = wallService.isContain(wall, join)
             const _flag = wallService.isContain(wall, join)
 
 
+            //找最近的
             if (_flag && (min2 == null || min2.distance > distance)) {
             if (_flag && (min2 == null || min2.distance > distance)) {
                 min2 = {
                 min2 = {
                     distance: distance,
                     distance: distance,
@@ -265,6 +261,17 @@ export default class ListenLayer {
             result.modifyPoint = JSON.parse(JSON.stringify(modifyPoint))
             result.modifyPoint = JSON.parse(JSON.stringify(modifyPoint))
             result.modifyPoint.x = position.x
             result.modifyPoint.x = position.x
             result.modifyPoint.y = modifyPoint.y
             result.modifyPoint.y = modifyPoint.y
+        } else if(startPosition && mathUtil.getDistance(position, startPosition)>Constant.minAdsorb){
+            if (Math.abs(position.x - startPosition.x) < Constant.minAdsorb) {
+                result.modifyPoint = {}
+                result.modifyPoint.x = startPosition.x
+                result.modifyPoint.y = position.y
+            }
+            else if (Math.abs(position.y - startPosition.y) < Constant.minAdsorb) {
+                result.modifyPoint = {}
+                result.modifyPoint.y = startPosition.y
+                result.modifyPoint.x = position.x
+            }
         }
         }
 
 
         const tags = floorplanService.getTags()
         const tags = floorplanService.getTags()
@@ -361,7 +368,6 @@ export default class ListenLayer {
         return result
         return result
     }
     }
 
 
-    // position用来判断是否在墙的symbol上
     updateSelectInfos(nearest, minDistance) {
     updateSelectInfos(nearest, minDistance) {
         // 墙角状态是否改变
         // 墙角状态是否改变
         let flag1 = false
         let flag1 = false
@@ -409,17 +415,17 @@ export default class ListenLayer {
                 state: null,
                 state: null,
             }
             }
         }
         }
-        // symbols状态是否改变
-        // const flag3 = this.isChanged(nearest.symbolInfo.symbolId, nearest.symbolInfo.state, 3)
-        // this.symbolInfo = {
-        //     symbolId: nearest.symbolInfo.symbolId,
-        //     state: nearest.symbolInfo.state,
-        // }
 
 
-        const flag4 = this.isChanged(nearest.componentInfo.componentId, nearest.componentInfo.state, 4)
-        this.componentInfo = {
-            componentId: nearest.componentInfo.componentId,
-            state: nearest.componentInfo.state,
+        const flag3 = this.isChanged(nearest.rectangleInfo.rectangleId, nearest.rectangleInfo.state, 5)
+        this.rectangleInfo = {
+            rectangleId: nearest.rectangleInfo.rectangleId,
+            state: nearest.rectangleInfo.state,
+        }
+
+        const flag4 = this.isChanged(nearest.circleInfo.circleId, nearest.circleInfo.state, 5)
+        this.circleInfo = {
+            circleId: nearest.circleInfo.circleId,
+            state: nearest.circleInfo.state,
         }
         }
 
 
         const flag5 = this.isChanged(nearest.tagInfo.tagId, nearest.tagInfo.state, 5)
         const flag5 = this.isChanged(nearest.tagInfo.tagId, nearest.tagInfo.state, 5)
@@ -434,10 +440,21 @@ export default class ListenLayer {
             state: nearest.signInfo.state,
             state: nearest.signInfo.state,
         }
         }
 
 
-        return flag1 || flag2  || flag4 || flag5 || flag6
+        const flag7 = this.isChanged(nearest.arrowInfo.arrowId, nearest.arrowInfo.state, 6)
+        this.arrowInfo = {
+            arrowId: nearest.arrowInfo.arrowId,
+            state: nearest.arrowInfo.state,
+        }
+
+        const flag8 = this.isChanged(nearest.iconInfo.iconId, nearest.iconInfo.state, 6)
+        this.iconInfo = {
+            iconId: nearest.iconInfo.iconId,
+            state: nearest.iconInfo.state,
+        }
+
+        return flag1 || flag2 || flag3 || flag4  || flag5 || flag6 || flag7 || flag8
     }
     }
 
 
-    // type是1表示点,2表示墙,3表示symbol,4表示component, 5表示tag,6表示sign
     isChanged(vectorId, state, type) {
     isChanged(vectorId, state, type) {
         let flag = false
         let flag = false
         if (type == 1) {
         if (type == 1) {
@@ -457,24 +474,25 @@ export default class ListenLayer {
                 flag = true
                 flag = true
             }
             }
         } 
         } 
-        // else if (type == 3) {
-        //     if (state == null && state == this.symbolInfo.state) {
-        //         flag = false
-        //     } else if (this.symbolInfo.symbolId == vectorId && state == this.symbolInfo.state) {
-        //         flag = false
-        //     } else {
-        //         flag = true
-        //     }
-        // } 
+        else if (type == 3) {
+            if (state == null && state == this.rectangleInfo.state) {
+                flag = false
+            } else if (this.rectangleInfo.rectangleId == vectorId && state == this.rectangleInfo.state) {
+                flag = false
+            } else {
+                flag = true
+            }
+        } 
         else if (type == 4) {
         else if (type == 4) {
-            if (state == null && state == this.componentInfo.state) {
+            if (state == null && state == this.circleInfo.state) {
                 flag = false
                 flag = false
-            } else if (this.componentInfo.componentId == vectorId && state == this.componentInfo.state) {
+            } else if (this.circleInfo.circleId == vectorId && state == this.circleInfo.state) {
                 flag = false
                 flag = false
             } else {
             } else {
                 flag = true
                 flag = true
             }
             }
-        } else if (type == 5) {
+        } 
+        else if (type == 5) {
             if (state == null && state == this.tagInfo.state) {
             if (state == null && state == this.tagInfo.state) {
                 flag = false
                 flag = false
             } else if (this.tagInfo.tagId == vectorId && state == this.tagInfo.state) {
             } else if (this.tagInfo.tagId == vectorId && state == this.tagInfo.state) {
@@ -482,7 +500,8 @@ export default class ListenLayer {
             } else {
             } else {
                 flag = true
                 flag = true
             }
             }
-        } else if (type == 6) {
+        } 
+        else if (type == 6) {
             if (state == null && state == this.signInfo.state) {
             if (state == null && state == this.signInfo.state) {
                 flag = false
                 flag = false
             } else if (this.signInfo.signsId == vectorId && state == this.signInfo.state) {
             } else if (this.signInfo.signsId == vectorId && state == this.signInfo.state) {
@@ -491,6 +510,24 @@ export default class ListenLayer {
                 flag = true
                 flag = true
             }
             }
         }
         }
+        else if (type == 7) {
+            if (state == null && state == this.arrowInfo.state) {
+                flag = false
+            } else if (this.arrowInfo.arrowId == vectorId && state == this.arrowInfo.state) {
+                flag = false
+            } else {
+                flag = true
+            }
+        }
+        else if (type == 8) {
+            if (state == null && state == this.iconInfo.state) {
+                flag = false
+            } else if (this.iconInfo.iconId == vectorId && state == this.iconInfo.state) {
+                flag = false
+            } else {
+                flag = true
+            }
+        }
 
 
         return flag
         return flag
     }
     }
@@ -499,9 +536,6 @@ export default class ListenLayer {
         if (this.tagInfo.tagId != null && this.tagInfo.state != null) {
         if (this.tagInfo.tagId != null && this.tagInfo.state != null) {
             const tag = floorplanService.getTag(this.tagInfo.tagId)
             const tag = floorplanService.getTag(this.tagInfo.tagId)
             stateService.setSelectItem(this.tagInfo.tagId, tag.geoType, this.tagInfo.state)
             stateService.setSelectItem(this.tagInfo.tagId, tag.geoType, this.tagInfo.state)
-        } else if (this.componentInfo.componentId != null && this.componentInfo.state != null) {
-            const component = floorplanService.getComponent(this.componentInfo.componentId)
-            stateService.setSelectItem(this.componentInfo.componentId, component.geoType, this.componentInfo.state)
         } else if (this.signInfo.signsId != null && this.signInfo.state != null) {
         } else if (this.signInfo.signsId != null && this.signInfo.state != null) {
             const sign = floorplanService.getSign(this.signInfo.signsId)
             const sign = floorplanService.getSign(this.signInfo.signsId)
             stateService.setSelectItem(this.signInfo.signsId, sign.geoType, this.signInfo.state)
             stateService.setSelectItem(this.signInfo.signsId, sign.geoType, this.signInfo.state)
@@ -525,11 +559,6 @@ export default class ListenLayer {
             state: null,
             state: null,
         }
         }
 
 
-        this.componentInfo = {
-            componentId: null,
-            state: null,
-        }
-
         this.signInfo = {
         this.signInfo = {
             signsId: null,
             signsId: null,
             state: null,
             state: null,

+ 1 - 2
src/views/draw-file/board/editCAD/Load.js

@@ -26,8 +26,7 @@ export default class Load {
             }
             }
 
 
             for (let key in floor.walls) {
             for (let key in floor.walls) {
-                let wall = wallService.createWall(floor.walls[key].start, floor.walls[key].end, floor.walls[key].vectorId, i)
-                wall.setChildren(floor.walls[key].children)
+                wallService.createWall(floor.walls[key].start, floor.walls[key].end, floor.walls[key].vectorId, i)
             }
             }
 
 
             for (let key in floor.tags) {
             for (let key in floor.tags) {

+ 57 - 679
src/views/draw-file/board/editCAD/Renderer/Draw.js

@@ -7,7 +7,6 @@ import SelectState from '../enum/SelectState.js'
 import { mathUtil } from '../MathUtil.js'
 import { mathUtil } from '../MathUtil.js'
 import ElementEvents from '../enum/ElementEvents.js'
 import ElementEvents from '../enum/ElementEvents.js'
 import Constant from '../Constant.js'
 import Constant from '../Constant.js'
-import { compassService } from '../Service/CompassService'
 import { signService } from '../Service/SignService.js'
 import { signService } from '../Service/SignService.js'
 export default class Draw {
 export default class Draw {
     constructor() {
     constructor() {
@@ -37,17 +36,12 @@ export default class Draw {
 
 
     // }
     // }
 
 
-    drawWall(vector, styleType) {
+    drawWall(vector) {
         let start = floorplanService.getPoint(vector.start)
         let start = floorplanService.getPoint(vector.start)
         let end = floorplanService.getPoint(vector.end)
         let end = floorplanService.getPoint(vector.end)
 
 
         let points = []
         let points = []
         points.push(start)
         points.push(start)
-        for (let i = 0; i < vector.children.length; ++i) {
-            let symbol = floorplanService.getSymbol(vector.children[i])
-            points.push(symbol.startPoint)
-            points.push(symbol.endPoint)
-        }
         points.push(end)
         points.push(end)
 
 
         points = points.sort(sortNumber.bind(this))
         points = points.sort(sortNumber.bind(this))
@@ -61,76 +55,26 @@ export default class Draw {
         //this.context.lineJoin= 'miter';
         //this.context.lineJoin= 'miter';
         this.context.strokeStyle = Style.Wall.strokeStyle
         this.context.strokeStyle = Style.Wall.strokeStyle
 
 
-        if (vector.out || vector.important) {
-            this.context.lineWidth = Style.Wall.important.lineWidth * coordinate.ratio
-            this.context.strokeStyle = Style.Wall.important.strokeStyle
-        } else {
-            this.context.lineWidth = Style.Wall.lineWidth * coordinate.ratio
-            this.context.strokeStyle = Style.Wall.strokeStyle
-        }
+        this.context.lineWidth = Style.Wall.lineWidth * coordinate.ratio
+        this.context.strokeStyle = Style.Wall.strokeStyle
 
 
         const selectItem = stateService.getSelectItem()
         const selectItem = stateService.getSelectItem()
         const draggingItem = stateService.getDraggingItem()
         const draggingItem = stateService.getDraggingItem()
         const focusItem = stateService.getFocusItem()
         const focusItem = stateService.getFocusItem()
 
 
-        //下载的时候,根据样式
-        if (styleType) {
-            if (styleType == 'style-1') {
-                if (vector.out || vector.important) {
-                    this.context.lineWidth = Style.DownLoad.style1.Wall.important.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style1.Wall.important.strokeStyle
-                } else {
-                    this.context.lineWidth = Style.DownLoad.style1.Wall.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style1.Wall.strokeStyle
-                }
-            } else if (styleType == 'style-2') {
-                if (vector.out || vector.important) {
-                    this.context.lineWidth = Style.DownLoad.style2.Wall.important.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style2.Wall.important.strokeStyle
-                } else {
-                    this.context.lineWidth = Style.DownLoad.style2.Wall.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style2.Wall.strokeStyle
-                }
-            } else if (styleType == 'style-3') {
-                if (vector.out || vector.important) {
-                    this.context.lineWidth = Style.DownLoad.style3.Wall.important.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style3.Wall.important.strokeStyle
-                } else {
-                    this.context.lineWidth = Style.DownLoad.style3.Wall.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style3.Wall.strokeStyle
-                }
-            } else if (styleType == 'style-4') {
-                if (vector.out || vector.important) {
-                    this.context.lineWidth = Style.DownLoad.style4.Wall.important.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style4.Wall.important.strokeStyle
-                } else {
-                    this.context.lineWidth = Style.DownLoad.style4.Wall.lineWidth * coordinate.ratio
-                    this.context.strokeStyle = Style.DownLoad.style4.Wall.strokeStyle
-                }
+        if (selectItem && selectItem.type == VectorType.Wall) {
+            if (vector.vectorId == selectItem.vectorId) {
+                this.context.strokeStyle = Style.Select.Wall.strokeStyle
             }
             }
-        } else {
-            if (selectItem && selectItem.type == VectorType.Wall) {
-                if (vector.vectorId == selectItem.vectorId) {
-                    if (vector.out || vector.important) {
-                        this.context.strokeStyle = Style.Select.Wall_out.strokeStyle
-                    } else {
-                        this.context.strokeStyle = Style.Select.Wall.strokeStyle
-                    }
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.Wall) {
-                if (vector.vectorId == draggingItem.vectorId) {
-                    if (vector.out || vector.important) {
-                        this.context.strokeStyle = Style.Select.Wall_out.strokeStyle
-                    } else {
-                        this.context.strokeStyle = Style.Select.Wall.strokeStyle
-                    }
-                }
+        } else if (draggingItem && draggingItem.type == VectorType.Wall) {
+            if (vector.vectorId == draggingItem.vectorId) {
+                this.context.strokeStyle = Style.Select.Wall.strokeStyle
             }
             }
+        }
 
 
-            if (focusItem && focusItem.type == VectorType.Wall) {
-                if (vector.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Wall.strokeStyle
-                }
+        if (focusItem && focusItem.type == VectorType.Wall) {
+            if (vector.vectorId == focusItem.vectorId) {
+                this.context.strokeStyle = Style.Focus.Wall.strokeStyle
             }
             }
         }
         }
 
 
@@ -142,21 +86,6 @@ export default class Draw {
         }
         }
         this.context.stroke()
         this.context.stroke()
         this.context.restore()
         this.context.restore()
-
-        // const mid = {
-        //     x: (start.x + end.x) / 2,
-        //     y: (start.y + end.y) / 2,
-        // }
-        // this.drawText(mid, vector.vectorId)
-
-        if (
-            (selectItem && selectItem.type == VectorType.Wall && vector.vectorId == selectItem.vectorId) ||
-            (draggingItem && draggingItem.type == VectorType.Wall && vector.vectorId == draggingItem.vectorId) ||
-            (focusItem && focusItem.type == VectorType.Wall && vector.vectorId == focusItem.vectorId)
-        ) {
-            //添加测量值
-            this.drawMeasureTxt(start, end)
-        }
     }
     }
 
 
     drawSpecialPoint() {
     drawSpecialPoint() {
@@ -265,515 +194,6 @@ export default class Draw {
         this.context.restore()
         this.context.restore()
     }
     }
 
 
-    drawSingleDoor(geometry, styleType, noEnter) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-        const distance = mathUtil.getDistance(points[0], points[1])
-        this.context.save()
-
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.lineCap = 'square'
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-
-        let isFill = false
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.SingleDoor && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.SingleDoor && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.SingleDoor) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Focus.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.arcTo(points[2].x, points[2].y, points[3].x, points[3].y, distance) // 创建弧
-        this.context.closePath()
-        this.context.stroke()
-        if (isFill) {
-            this.context.fill()
-        }
-
-        this.context.restore()
-
-        if (!noEnter && geometry.enter != null) {
-            this.drawEntranceDoor(geometry)
-        }
-    }
-
-    drawDoubleDoor(geometry, styleType, noEnter) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-        const distance = mathUtil.getDistance(points[0], points[1])
-        this.context.save()
-
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.lineCap = 'square'
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-
-        let isFill = false
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.DoubleDoor && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.DoubleDoor && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.DoubleDoor) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Focus.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.arcTo(points[4].x, points[4].y, points[5].x, points[5].y, distance) // 创建弧
-        this.context.closePath()
-        this.context.stroke()
-        if (isFill) {
-            this.context.fill()
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[2].x, points[2].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.arcTo(points[4].x, points[4].y, points[3].x, points[3].y, distance) // 创建弧
-        this.context.closePath()
-        this.context.stroke()
-        if (isFill) {
-            this.context.fill()
-        }
-
-        this.context.restore()
-
-        if (!noEnter && geometry.enter != null) {
-            this.drawEntranceDoor(geometry)
-        }
-    }
-
-    drawSlideDoor(geometry, styleType, noEnter) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-
-        this.context.save()
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-        //this.context.fillStyle = Style.Symbol.fillStyle
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.SlideDoor && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.SlideDoor && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.SlideDoor) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.lineTo(points[2].x, points[2].y)
-        this.context.lineTo(points[3].x, points[3].y)
-        this.context.closePath()
-        this.context.stroke()
-
-        this.context.beginPath()
-        this.context.moveTo(points[4].x, points[4].y)
-        this.context.lineTo(points[5].x, points[5].y)
-        this.context.lineTo(points[6].x, points[6].y)
-        this.context.lineTo(points[7].x, points[7].y)
-        this.context.closePath()
-        this.context.stroke()
-
-        this.context.restore()
-
-        if (!noEnter && geometry.enter != null) {
-            this.drawEntranceDoor(geometry)
-        }
-    }
-
-    drawSingleWindow(geometry, styleType) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-
-        this.context.save()
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.SingleWindow && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.SingleWindow && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.SingleWindow) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.stroke()
-
-        this.context.beginPath()
-        this.context.moveTo(points[2].x, points[2].y)
-        this.context.lineTo(points[3].x, points[3].y)
-        this.context.lineTo(points[4].x, points[4].y)
-        this.context.lineTo(points[5].x, points[5].y)
-        this.context.closePath()
-        this.context.stroke()
-        this.context.restore()
-    }
-
-    drawBayWindow(geometry, styleType) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-
-        this.context.save()
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-        //this.context.fillStyle = Style.Symbol.fillStyle
-
-        let isFill = false
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.BayWindow && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.BayWindow && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Select.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.BayWindow) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                    this.context.fillStyle = Style.Focus.Symbol.fillStyle
-                    isFill = true
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.lineTo(points[2].x, points[2].y)
-        this.context.lineTo(points[3].x, points[3].y)
-        this.context.closePath()
-        this.context.stroke()
-        if (isFill) {
-            this.context.fill()
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[5].x, points[5].y)
-        this.context.lineTo(points[6].x, points[6].y)
-        this.context.lineTo(points[7].x, points[7].y)
-        this.context.lineTo(points[4].x, points[4].y)
-        //this.context.closePath()
-        this.context.stroke()
-        this.context.restore()
-    }
-
-    drawFrenchWindow(geometry, styleType) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-
-        this.context.save()
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.FrenchWindow && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.FrenchWindow && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.FrenchWindow) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-
-        this.context.moveTo(points[2].x, points[2].y)
-        this.context.lineTo(points[3].x, points[3].y)
-
-        this.context.moveTo(points[4].x, points[4].y)
-        this.context.lineTo(points[5].x, points[5].y)
-
-        this.context.moveTo(points[2].x, points[2].y)
-        this.context.lineTo(points[4].x, points[4].y)
-
-        this.context.moveTo(points[3].x, points[3].y)
-        this.context.lineTo(points[5].x, points[5].y)
-
-        this.context.moveTo(points[6].x, points[6].y)
-        this.context.lineTo(points[7].x, points[7].y)
-        this.context.stroke()
-
-        this.context.restore()
-    }
-
-    drawPass(geometry, styleType) {
-        let points2d = geometry.points2d
-        let points = []
-        for (let i = 0; i < points2d.length; ++i) {
-            points[i] = coordinate.getScreenXY({ x: points2d[i].x, y: points2d[i].y })
-        }
-
-        this.context.save()
-        this.context.lineWidth = Style.Symbol.lineWidth * coordinate.ratio
-        this.context.strokeStyle = Style.Symbol.strokeStyle
-
-        if (styleType) {
-            if (styleType == 'style-1') {
-                this.context.lineWidth = Style.DownLoad.style1.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style1.Symbol.strokeStyle
-            } else if (styleType == 'style-2') {
-                this.context.lineWidth = Style.DownLoad.style2.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style2.Symbol.strokeStyle
-            } else if (styleType == 'style-3') {
-                this.context.lineWidth = Style.DownLoad.style3.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style3.Symbol.strokeStyle
-            } else if (styleType == 'style-4') {
-                this.context.lineWidth = Style.DownLoad.style4.Symbol.lineWidth * coordinate.ratio
-                this.context.strokeStyle = Style.DownLoad.style4.Symbol.strokeStyle
-            }
-        } else {
-            const selectItem = stateService.getSelectItem()
-            const draggingItem = stateService.getDraggingItem()
-            const focusItem = stateService.getFocusItem()
-
-            if (selectItem && selectItem.type == VectorType.Pass && selectItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == selectItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            } else if (draggingItem && draggingItem.type == VectorType.Pass && draggingItem.selectIndex == SelectState.All) {
-                if (geometry.vectorId == draggingItem.vectorId) {
-                    this.context.strokeStyle = Style.Select.Symbol.strokeStyle
-                }
-            }
-
-            if (focusItem && focusItem.type == VectorType.Pass) {
-                if (geometry.vectorId == focusItem.vectorId) {
-                    this.context.strokeStyle = Style.Focus.Symbol.strokeStyle
-                }
-            }
-        }
-
-        this.context.beginPath()
-        this.context.moveTo(points[0].x, points[0].y)
-        this.context.lineTo(points[1].x, points[1].y)
-        this.context.lineTo(points[2].x, points[2].y)
-        this.context.lineTo(points[3].x, points[3].y)
-
-        this.context.closePath()
-        this.context.stroke()
-
-        this.context.beginPath()
-        this.context.moveTo(points[4].x, points[4].y)
-        this.context.lineTo(points[5].x, points[5].y)
-        this.context.setLineDash([3, 2, 2])
-        //this.context.dashedLine(points[4].x, points[4].y, points[5].x, points[5].y, dashGapArray);
-        this.context.stroke()
-
-        this.context.beginPath()
-        this.context.moveTo(points[6].x, points[6].y)
-        this.context.lineTo(points[7].x, points[7].y)
-        this.context.setLineDash([3, 2, 2])
-        //this.context.dashedLine(points[6].x, points[6].y, points[7].x, points[7].y, dashGapArray);
-        this.context.stroke()
-        this.context.restore()
-    }
-
     drawTag(geometry, styleType, hide) {
     drawTag(geometry, styleType, hide) {
         this.context.save()
         this.context.save()
 
 
@@ -935,19 +355,6 @@ export default class Draw {
             radius = Style.Element.StartAddWall.radius * coordinate.ratio
             radius = Style.Element.StartAddWall.radius * coordinate.ratio
             this.context.strokeStyle = Style.Element.StartAddWall.strokeStyle
             this.context.strokeStyle = Style.Element.StartAddWall.strokeStyle
             this.context.fillStyle = Style.Element.StartAddWall.fillStyle
             this.context.fillStyle = Style.Element.StartAddWall.fillStyle
-        } else if (element.name == ElementEvents.StartSymbolPoints) {
-            radius = Style.Element.StartSymbolPoints.radius * coordinate.ratio
-            this.context.strokeStyle = Style.Element.StartSymbolPoints.strokeStyle
-            this.context.fillStyle = Style.Element.StartSymbolPoints.fillStyle
-        } else if (element.name == ElementEvents.EndSymbolPoints) {
-            radius = Style.Element.EndSymbolPoints.radius * coordinate.ratio
-            this.context.strokeStyle = Style.Element.EndSymbolPoints.strokeStyle
-            this.context.fillStyle = Style.Element.EndSymbolPoints.fillStyle
-        } else if (element.name == 'pano') {
-            radius = Style.Pano.radius * coordinate.ratio
-            this.context.strokeStyle = Style.Pano.strokeStyle
-            this.context.fillStyle = Style.Pano.fillStyle
-            this.context.lineWidth = Style.Pano.lineWidth
         }
         }
 
 
         this.context.beginPath()
         this.context.beginPath()
@@ -979,9 +386,6 @@ export default class Draw {
             this.context.strokeStyle = Style.Element.NewWall.strokeStyle
             this.context.strokeStyle = Style.Element.NewWall.strokeStyle
             if (element.state == 'error') {
             if (element.state == 'error') {
                 this.context.strokeStyle = Style.Element.NewWall.errorStrokeStyle
                 this.context.strokeStyle = Style.Element.NewWall.errorStrokeStyle
-            } else if (element.state == 'normal-out') {
-                this.context.strokeStyle = Style.Element.NewWall.strokeStyle_out
-                this.context.lineWidth = Style.Element.NewWall.lineWidth_out * coordinate.ratio
             }
             }
         } else if (element.name == ElementEvents.CheckLinesX) {
         } else if (element.name == ElementEvents.CheckLinesX) {
             this.context.lineWidth = Style.Element.CheckLinesX.lineWidth * coordinate.ratio
             this.context.lineWidth = Style.Element.CheckLinesX.lineWidth * coordinate.ratio
@@ -992,17 +396,13 @@ export default class Draw {
             this.context.strokeStyle = Style.Element.CheckLinesY.strokeStyle
             this.context.strokeStyle = Style.Element.CheckLinesY.strokeStyle
             this.context.setLineDash([3, 2, 2])
             this.context.setLineDash([3, 2, 2])
         }
         }
+
         this.context.beginPath()
         this.context.beginPath()
         this.context.moveTo(start.x, start.y)
         this.context.moveTo(start.x, start.y)
         this.context.lineTo(end.x, end.y)
         this.context.lineTo(end.x, end.y)
         this.context.stroke()
         this.context.stroke()
         this.context.restore()
         this.context.restore()
 
 
-        if (element.name == ElementEvents.NewWall) {
-            //添加测量值
-            this.drawMeasureTxt(element.start, element.end)
-        }
-
         this.context.save()
         this.context.save()
         this.context.lineWidth = Style.Point.lineWidth * coordinate.ratio
         this.context.lineWidth = Style.Point.lineWidth * coordinate.ratio
         this.context.strokeStyle = Style.Point.strokeStyle
         this.context.strokeStyle = Style.Point.strokeStyle
@@ -1015,28 +415,6 @@ export default class Draw {
         this.context.restore()
         this.context.restore()
     }
     }
 
 
-    drawCompass(styleType) {
-        const padTop = 160
-        const padRight = 310
-
-        let img = null
-        if (styleType == 'style-1' || styleType == 'style-3') {
-            img = compassService.getWhiteImg()
-        } else {
-            img = compassService.getBlackImg()
-        }
-        let angle = floorplanService.getCompass()
-
-        this.context.save()
-
-        this.context.translate((coordinate.width - padRight) * coordinate.ratio, padTop * coordinate.ratio)
-        this.context.rotate((angle / 180) * Math.PI)
-        this.context.scale(coordinate.ratio / 2, coordinate.ratio / 2)
-        this.context.drawImage(img, -img.width / 2, -img.height / 2)
-
-        this.context.restore()
-    }
-
     setCanvasStyle(style) {
     setCanvasStyle(style) {
         for (const key in style) {
         for (const key in style) {
             if (key != 'isFill' && key != 'isStroke') {
             if (key != 'isFill' && key != 'isStroke') {
@@ -1047,49 +425,49 @@ export default class Draw {
 
 
     /*************************************************************************************家具**********************************************************************************************/
     /*************************************************************************************家具**********************************************************************************************/
     drawSign(geometry) {
     drawSign(geometry) {
-        if (geometry.geoType == VectorType.TV) {
-            this.drawTV(geometry)
-        } else if (geometry.geoType == VectorType.CombinationSofa) {
-            this.drawCombinationSofa(geometry)
-        } else if (geometry.geoType == VectorType.SingleSofa) {
-            this.drawSingleSofa(geometry)
-        } else if (geometry.geoType == VectorType.TeaTable) {
-            this.drawTeaTable(geometry)
-        } else if (geometry.geoType == VectorType.Carpet) {
-            this.drawCarpet(geometry)
-        } else if (geometry.geoType == VectorType.Plant) {
-            this.drawPlant(geometry)
-        } else if (geometry.geoType == VectorType.DiningTable) {
-            this.drawDiningTable(geometry)
-        } else if (geometry.geoType == VectorType.DoubleBed) {
-            this.drawDoubleBed(geometry)
-        } else if (geometry.geoType == VectorType.SingleBed) {
-            this.drawSingleBed(geometry)
-        } else if (geometry.geoType == VectorType.Wardrobe) {
-            this.drawWardrobe(geometry)
-        } else if (geometry.geoType == VectorType.Dresser) {
-            this.drawDresser(geometry)
-        } else if (geometry.geoType == VectorType.BedsideCupboard) {
-            this.drawBedsideCupboard(geometry)
-        } else if (geometry.geoType == VectorType.Pillow) {
-            this.drawPillow(geometry)
-        } else if (geometry.geoType == VectorType.GasStove) {
-            this.drawGasStove(geometry)
-        } else if (geometry.geoType == VectorType.Cupboard) {
-            this.drawCupboard(geometry)
-        } else if (geometry.geoType == VectorType.Bathtub) {
-            this.drawBathtub(geometry)
-        } else if (geometry.geoType == VectorType.Closestool) {
-            this.drawClosestool(geometry)
-        } else if (geometry.geoType == VectorType.Washstand) {
-            this.drawWashstand(geometry)
-        } else if (geometry.geoType == VectorType.Desk) {
-            this.drawDesk(geometry)
-        } else if (geometry.geoType == VectorType.BalconyChair) {
-            this.drawBalconyChair(geometry)
-        } else if (geometry.geoType == VectorType.Elevator) {
-            this.drawElevator(geometry)
-        }
+        // if (geometry.geoType == VectorType.Cigaret) {
+        //     this.drawCigaret(geometry)
+        // } else if (geometry.geoType == VectorType.FirePoint) {
+        //     this.drawFirePoint(geometry)
+        // } else if (geometry.geoType == VectorType.SingleSofa) {
+        //     this.drawSingleSofa(geometry)
+        // } else if (geometry.geoType == VectorType.TeaTable) {
+        //     this.drawTeaTable(geometry)
+        // } else if (geometry.geoType == VectorType.Carpet) {
+        //     this.drawCarpet(geometry)
+        // } else if (geometry.geoType == VectorType.Plant) {
+        //     this.drawPlant(geometry)
+        // } else if (geometry.geoType == VectorType.DiningTable) {
+        //     this.drawDiningTable(geometry)
+        // } else if (geometry.geoType == VectorType.DoubleBed) {
+        //     this.drawDoubleBed(geometry)
+        // } else if (geometry.geoType == VectorType.SingleBed) {
+        //     this.drawSingleBed(geometry)
+        // } else if (geometry.geoType == VectorType.Wardrobe) {
+        //     this.drawWardrobe(geometry)
+        // } else if (geometry.geoType == VectorType.Dresser) {
+        //     this.drawDresser(geometry)
+        // } else if (geometry.geoType == VectorType.BedsideCupboard) {
+        //     this.drawBedsideCupboard(geometry)
+        // } else if (geometry.geoType == VectorType.Pillow) {
+        //     this.drawPillow(geometry)
+        // } else if (geometry.geoType == VectorType.GasStove) {
+        //     this.drawGasStove(geometry)
+        // } else if (geometry.geoType == VectorType.Cupboard) {
+        //     this.drawCupboard(geometry)
+        // } else if (geometry.geoType == VectorType.Bathtub) {
+        //     this.drawBathtub(geometry)
+        // } else if (geometry.geoType == VectorType.Closestool) {
+        //     this.drawClosestool(geometry)
+        // } else if (geometry.geoType == VectorType.Washstand) {
+        //     this.drawWashstand(geometry)
+        // } else if (geometry.geoType == VectorType.Desk) {
+        //     this.drawDesk(geometry)
+        // } else if (geometry.geoType == VectorType.BalconyChair) {
+        //     this.drawBalconyChair(geometry)
+        // } else if (geometry.geoType == VectorType.Elevator) {
+        //     this.drawElevator(geometry)
+        // }
     }
     }
 
 
     /*
     /*

+ 0 - 41
src/views/draw-file/board/editCAD/Renderer/Render.js

@@ -67,14 +67,6 @@ export default class Render {
             this.drawElement(elementService.newWall)
             this.drawElement(elementService.newWall)
         }
         }
 
 
-        if (elementService.symbolPoints.Start && elementService.symbolPoints.Start.display) {
-            this.drawElement(elementService.symbolPoints.Start)
-        }
-
-        if (elementService.symbolPoints.End && elementService.symbolPoints.End.display) {
-            this.drawElement(elementService.symbolPoints.End)
-        }
-
         if (elementService.checkLines.X && elementService.checkLines.X.display) {
         if (elementService.checkLines.X && elementService.checkLines.X.display) {
             this.drawElement(elementService.checkLines.X)
             this.drawElement(elementService.checkLines.X)
         }
         }
@@ -161,18 +153,6 @@ export default class Render {
         // for (let key in points) {
         // for (let key in points) {
         //     this.drawGeometry(points[key])
         //     this.drawGeometry(points[key])
         // }
         // }
-
-        let symbols = data.symbols
-        let noEnter = true
-        for (let key in symbols) {
-            this.drawGeometry(symbols[key], null, noEnter)
-        }
-
-        let components = data.components
-        for (let key in components) {
-            this.drawGeometry(components[key])
-        }
-
         let signs = data.signs
         let signs = data.signs
         for (let key in signs) {
         for (let key in signs) {
             this.drawGeometry(signs[key])
             this.drawGeometry(signs[key])
@@ -212,17 +192,6 @@ export default class Render {
             this.drawGeometry(walls[key], styleType)
             this.drawGeometry(walls[key], styleType)
         }
         }
 
 
-        let symbols = data.symbols
-        let noEnter = false
-        for (let key in symbols) {
-            this.drawGeometry(symbols[key], styleType, noEnter)
-        }
-
-        let components = data.components
-        for (let key in components) {
-            this.drawGeometry(components[key])
-        }
-
         let signs = data.signs
         let signs = data.signs
         for (let key in signs) {
         for (let key in signs) {
             this.drawGeometry(signs[key])
             this.drawGeometry(signs[key])
@@ -253,16 +222,6 @@ export default class Render {
             this.drawGeometry(points[key])
             this.drawGeometry(points[key])
         }
         }
 
 
-        let symbols = data.symbols
-        for (let key in symbols) {
-            this.drawGeometry(symbols[key])
-        }
-
-        let components = data.components
-        for (let key in components) {
-            this.drawGeometry(components[key])
-        }
-
         let signs = data.signs
         let signs = data.signs
         for (let key in signs) {
         for (let key in signs) {
             this.drawGeometry(signs[key])
             this.drawGeometry(signs[key])

+ 5 - 5
src/views/draw-file/board/editCAD/Service/AnalyService.js

@@ -22,12 +22,13 @@ export default class AnalyService {
             floorplanData.floors[floorNum] = {}
             floorplanData.floors[floorNum] = {}
             floorplanData.floors[floorNum].points = {}
             floorplanData.floors[floorNum].points = {}
             floorplanData.floors[floorNum].walls = {}
             floorplanData.floors[floorNum].walls = {}
-            floorplanData.floors[floorNum].symbols = {}
-            floorplanData.floors[floorNum].components = {}
+            floorplanData.floors[floorNum].tables = {}
+            floorplanData.floors[floorNum].rectangles = {}
+            floorplanData.floors[floorNum].circles = {}
+            floorplanData.floors[floorNum].arrows = {}
+            floorplanData.floors[floorNum].icons = {}
             floorplanData.floors[floorNum].tags = {}
             floorplanData.floors[floorNum].tags = {}
             floorplanData.floors[floorNum].signs = {}
             floorplanData.floors[floorNum].signs = {}
-            floorplanData.floors[floorNum].boundingBox = {}
-            floorplanData.floors[floorNum].rooms = []
             let minX = null,
             let minX = null,
                 minY = null,
                 minY = null,
                 maxX = null,
                 maxX = null,
@@ -116,7 +117,6 @@ export default class AnalyService {
                 wall.start = floorplanData.floors[i].walls[key].start
                 wall.start = floorplanData.floors[i].walls[key].start
                 wall.end = floorplanData.floors[i].walls[key].end
                 wall.end = floorplanData.floors[i].walls[key].end
 
 
-                wall.children = []
                 wall.vectorId = floorplanData.floors[i].walls[key].vectorId
                 wall.vectorId = floorplanData.floors[i].walls[key].vectorId
                 wall.width = 0.2
                 wall.width = 0.2
 
 

+ 0 - 25
src/views/draw-file/board/editCAD/Service/CompassService.js

@@ -1,25 +0,0 @@
-export default class CompassService {
-    constructor() {
-        this.whiteImg = null
-        this.blackImg = null
-    }
-
-    setWhiteImg(img) {
-        this.whiteImg = img
-    }
-
-    setBlackImg(img) {
-        this.blackImg = img
-    }
-
-    getWhiteImg() {
-        return this.whiteImg
-    }
-
-    getBlackImg() {
-        return this.blackImg
-    }
-}
-
-const compassService = new CompassService()
-export { compassService }

+ 0 - 26
src/views/draw-file/board/editCAD/Service/ElementService.js

@@ -11,10 +11,6 @@ export class ElementService {
     constructor() {
     constructor() {
         this.startAddWall = null
         this.startAddWall = null
         this.newWall = null
         this.newWall = null
-        this.symbolPoints = {
-            Start: null,
-            End: null,
-        }
         this.checkLines = {
         this.checkLines = {
             X: null,
             X: null,
             Y: null,
             Y: null,
@@ -35,12 +31,6 @@ export class ElementService {
         this.newWall = new Line({ x: 0, y: 0 }, { x: 1, y: 1 })
         this.newWall = new Line({ x: 0, y: 0 }, { x: 1, y: 1 })
         this.newWall.name = ElementEvents.NewWall
         this.newWall.name = ElementEvents.NewWall
 
 
-        this.symbolPoints.Start = new Point(0, 0)
-        this.symbolPoints.Start.name = ElementEvents.StartSymbolPoints
-
-        this.symbolPoints.End = new Point(0, 0)
-        this.symbolPoints.End.name = ElementEvents.EndSymbolPoints
-
         this.checkLines.X = new Line({ x: 0, y: 0 }, { x: 1, y: 1 })
         this.checkLines.X = new Line({ x: 0, y: 0 }, { x: 1, y: 1 })
         this.checkLines.X.name = ElementEvents.CheckLinesX
         this.checkLines.X.name = ElementEvents.CheckLinesX
 
 
@@ -66,21 +56,6 @@ export class ElementService {
         this.startAddWall.setPosition(position)
         this.startAddWall.setPosition(position)
     }
     }
 
 
-    showSymbolPoints() {
-        this.symbolPoints.Start.display = true
-        this.symbolPoints.End.display = true
-    }
-
-    hideSymbolPoints() {
-        this.symbolPoints.Start.display = false
-        this.symbolPoints.End.display = false
-    }
-
-    setSymbolPoints(start, end) {
-        this.symbolPoints.Start.setPosition(start)
-        this.symbolPoints.End.setPosition(end)
-    }
-
     showNewWall() {
     showNewWall() {
         this.newWall.display = true
         this.newWall.display = true
     }
     }
@@ -160,7 +135,6 @@ export class ElementService {
         this.hideCheckLinesY()
         this.hideCheckLinesY()
         this.hideStartAddWall()
         this.hideStartAddWall()
         this.hideNewWall()
         this.hideNewWall()
-        this.hideSymbolPoints()
         this.hideVCheckLinesX()
         this.hideVCheckLinesX()
         this.hideVCheckLinesY()
         this.hideVCheckLinesY()
     }
     }

+ 18 - 289
src/views/draw-file/board/editCAD/Service/FloorplanService.js

@@ -94,20 +94,7 @@ export class FloorplanService {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
         let wall = this.getWall(wallId, floor)
         let wall = this.getWall(wallId, floor)
-        for (let i = 0; i < wall.children.length; ++i) {
-            this.deleteSymbol(wall.children[i], floor)
-        }
-
-        this.deletePoint(wall.start, wallId, floor)
-        this.deletePoint(wall.end, wallId, floor)
-        delete floorplanData.floors[floor].walls[wallId]
-    }
 
 
-    deleteWallNoSymbol(wallId, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        let wall = this.getWall(wallId, floor)
         this.deletePoint(wall.start, wallId, floor)
         this.deletePoint(wall.start, wallId, floor)
         this.deletePoint(wall.end, wallId, floor)
         this.deletePoint(wall.end, wallId, floor)
         delete floorplanData.floors[floor].walls[wallId]
         delete floorplanData.floors[floor].walls[wallId]
@@ -121,102 +108,6 @@ export class FloorplanService {
         this.angle = angle
         this.angle = angle
     }
     }
 
 
-    setBoundingBox(boundingBox, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        floorplanData.floors[floor].boundingBox = JSON.parse(JSON.stringify(boundingBox))
-    }
-
-    // getBoundingBox(floor) {
-    //     if (floor == null || typeof floor == 'undefined') {
-    //         floor = this.currentFloor
-    //     }
-    //     if (
-    //         floorplanData.floors[floor].boundingBox.hasOwnProperty('maxX') &&
-    //         floorplanData.floors[floor].boundingBox.hasOwnProperty('maxY') &&
-    //         floorplanData.floors[floor].boundingBox.hasOwnProperty('minX') &&
-    //         floorplanData.floors[floor].boundingBox.hasOwnProperty('minY')
-    //     ) {
-    //         return floorplanData.floors[floor].boundingBox
-    //     } else {
-    //         this.updateBoundingBox(floor)
-    //         return floorplanData.floors[floor].boundingBox
-    //     }
-    // }
-
-    getBoundingBox(floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            let minX = null,
-                maxX = null,
-                minY = null,
-                maxY = null
-            for (let i = 0; i < floorplanData.floors.length; ++i) {
-                if (
-                    !floorplanData.floors[i].boundingBox.hasOwnProperty('maxX') ||
-                    !floorplanData.floors[i].boundingBox.hasOwnProperty('minX') ||
-                    !floorplanData.floors[i].boundingBox.hasOwnProperty('maxY') ||
-                    !floorplanData.floors[i].boundingBox.hasOwnProperty('minY')
-                ) {
-                    this.updateBoundingBox(i)
-                }
-                if (minX == null || minX > floorplanData.floors[i].boundingBox.minX) {
-                    minX = floorplanData.floors[i].boundingBox.minX
-                }
-                if (maxX == null || maxX < floorplanData.floors[i].boundingBox.maxX) {
-                    maxX = floorplanData.floors[i].boundingBox.maxX
-                }
-                if (minY == null || minY > floorplanData.floors[i].boundingBox.minY) {
-                    minY = floorplanData.floors[i].boundingBox.minY
-                }
-                if (maxY == null || maxY < floorplanData.floors[i].boundingBox.maxY) {
-                    maxY = floorplanData.floors[i].boundingBox.maxY
-                }
-            }
-
-            return {
-                minX: minX,
-                maxX: maxX,
-                minY: minY,
-                maxY: maxY,
-            }
-        } else {
-            return floorplanData.floors[floor].boundingBox
-        }
-    }
-
-    updateBoundingBox(floor) {
-        const points = this.getPoints(floor)
-        let minX = null,
-            maxX = null,
-            minY = null,
-            maxY = null
-        for (let key in points) {
-            let point = points[key]
-            if (minX == null || minX > point.x) {
-                minX = point.x
-            }
-            if (maxX == null || maxX < point.x) {
-                maxX = point.x
-            }
-            if (minY == null || minY > point.y) {
-                minY = point.y
-            }
-            if (maxY == null || maxY < point.y) {
-                maxY = point.y
-            }
-        }
-        this.setBoundingBox(
-            {
-                minX: minX,
-                maxX: maxX,
-                minY: minY,
-                maxY: maxY,
-            },
-            floor
-        )
-    }
-
     getFloorData(floor) {
     getFloorData(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
@@ -238,13 +129,6 @@ export class FloorplanService {
         return floorplanData.floors[floor].points
         return floorplanData.floors[floor].points
     }
     }
 
 
-    getSymbol(symbolId, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        return floorplanData.floors[floor].symbols[symbolId]
-    }
-
     addWall(wall, floor) {
     addWall(wall, floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
@@ -259,20 +143,6 @@ export class FloorplanService {
         floorplanData.floors[floor].points[point.vectorId] = point
         floorplanData.floors[floor].points[point.vectorId] = point
     }
     }
 
 
-    addSymbol(symbol, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        floorplanData.floors[floor].symbols[symbol.vectorId] = symbol
-    }
-
-    addComponent(component, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        floorplanData.floors[floor].components[component.vectorId] = component
-    }
-
     addSign(sign, floor) {
     addSign(sign, floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
@@ -280,31 +150,6 @@ export class FloorplanService {
         floorplanData.floors[floor].signs[sign.vectorId] = sign
         floorplanData.floors[floor].signs[sign.vectorId] = sign
     }
     }
 
 
-    deleteSymbol(symbolId, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        let symbol = this.getSymbol(symbolId, floor)
-        symbol = null
-        delete floorplanData.floors[floor].symbols[symbolId]
-    }
-
-    getComponent(componentId, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        return floorplanData.floors[floor].components[componentId]
-    }
-
-    deleteComponent(componentId, floor) {
-        if (floor == null || typeof floor == 'undefined') {
-            floor = this.currentFloor
-        }
-        let component = this.getComponent(componentId, floor)
-        component = null
-        delete floorplanData.floors[floor].components[componentId]
-    }
-
     getSign(signId, floor) {
     getSign(signId, floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
@@ -344,173 +189,57 @@ export class FloorplanService {
         delete floorplanData.floors[floor].tags[tagId]
         delete floorplanData.floors[floor].tags[tagId]
     }
     }
 
 
-    getSymbols(floor) {
+    getTags(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
-        return floorplanData.floors[floor].symbols
+        return floorplanData.floors[floor].tags
     }
     }
 
 
-    getComponents(floor) {
+    getRectangles(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
-        return floorplanData.floors[floor].components
+        return floorplanData.floors[floor].rectangles
     }
     }
 
 
-    getTags(floor) {
+    getCircles(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
-        return floorplanData.floors[floor].tags
+        return floorplanData.floors[floor].circles
     }
     }
 
 
-    getSigns(floor) {
+    getArrows(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
-        return floorplanData.floors[floor].signs
+        return floorplanData.floors[floor].arrows
     }
     }
 
 
-    getAllBoundingBox() {
-        let bounds = []
-        for (let i = 0; i < floorplanData.floors.length; ++i) {
-            let minX, minY, maxX, maxY
-            let bound = {}
-            for (let key in floorplanData.floors[i].points) {
-                let x = floorplanData.floors[i].points[key].x
-                let y = floorplanData.floors[i].points[key].y
-                if (typeof minX == 'undefined' || minX > x) {
-                    minX = x
-                }
-                if (typeof maxX == 'undefined' || maxX < x) {
-                    maxX = x
-                }
-                if (typeof minY == 'undefined' || minY > y) {
-                    minY = y
-                }
-                if (typeof maxY == 'undefined' || maxY < y) {
-                    maxY = y
-                }
-            }
-
-            bound.left = minX
-            bound.top = maxY
-            bound.right = maxX
-            bound.bottom = minY
-
-            bounds.push(bound)
-        }
-        return bounds
-    }
-
-    getCadInfo(canvas) {
-        let cadInfo = []
-        let bounds = this.getAllBoundingBox()
-        for (let i = 0; i < bounds.length; ++i) {
-            let item = {}
-
-            let leftTop = coordinate.getScreenXY({
-                x: bounds[i].left,
-                y: bounds[i].top,
-            })
-
-            let rightBottom = coordinate.getScreenXY({
-                x: bounds[i].right,
-                y: bounds[i].bottom,
-            })
-
-            let left = leftTop.x
-            let top = leftTop.y
-
-            let right = canvas.width - rightBottom.x
-            let bottom = canvas.height - rightBottom.y
-
-            // item.left = Constant.ratio * left
-            // item.top = Constant.ratio * top
-            // item.right = Constant.ratio * right
-            // item.bottom = Constant.ratio * bottom
-            item.left = left
-            item.top = top
-            item.right = right
-            item.bottom = bottom
-
-            item.bound = bounds[i]
-            item.bound.top = -1 * item.bound.top
-            item.bound.bottom = -1 * item.bound.bottom
-            cadInfo.push(item)
+    getIcons(floor) {
+        if (floor == null || typeof floor == 'undefined') {
+            floor = this.currentFloor
         }
         }
-        return cadInfo
+        return floorplanData.floors[floor].icons
     }
     }
-
-    getRooms(floor) {
+    getSigns(floor) {
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
             floor = this.currentFloor
             floor = this.currentFloor
         }
         }
-        return floorplanData.floors[floor].rooms
+        return floorplanData.floors[floor].signs
     }
     }
 
 
     clear() {
     clear() {
-        // for (let i = 0; i < floorplanData.floors.length; ++i) {
-        //     floorplanData.floors[i].points = {}
-        //     floorplanData.floors[i].walls = {}
-        //     floorplanData.floors[i].symbols = {}
-        //     floorplanData.floors[i].components = {}
-        //     floorplanData.floors[i].tags = {}
-        //     floorplanData.floors[i].boundingBox = {}
-        //     floorplanData.floors[i].rooms = []
-        // }
         if (floorplanData.floors[this.currentFloor]) {
         if (floorplanData.floors[this.currentFloor]) {
             floorplanData.floors[this.currentFloor].points = {}
             floorplanData.floors[this.currentFloor].points = {}
             floorplanData.floors[this.currentFloor].walls = {}
             floorplanData.floors[this.currentFloor].walls = {}
-            floorplanData.floors[this.currentFloor].symbols = {}
-            floorplanData.floors[this.currentFloor].components = {}
+            floorplanData.floors[this.currentFloor].rectangles = {}
+            floorplanData.floors[this.currentFloor].circles = {}
             floorplanData.floors[this.currentFloor].tags = {}
             floorplanData.floors[this.currentFloor].tags = {}
             floorplanData.floors[this.currentFloor].signs = {}
             floorplanData.floors[this.currentFloor].signs = {}
-            floorplanData.floors[this.currentFloor].boundingBox = {}
-            floorplanData.floors[this.currentFloor].rooms = []
-        }
-
-        //floorplanData.angle = 0
-    }
-
-    // getBoundingBox2DPosition(floorIndex) {
-    //     let bound = floorplanData.floors[floorIndex].boundingBox
-    //     let leftTop = coordinate.getScreenXY({
-    //         x: bound.minX,
-    //         y: bound.maxY,
-    //     })
-
-    //     let rightBottom = coordinate.getScreenXY({
-    //         x: bound.maxX,
-    //         y: bound.minY,
-    //     })
-
-    //     return {
-    //         top: leftTop.y,
-    //         bottom: rightBottom.y,
-    //         left: leftTop.x,
-    //         right: rightBottom.x,
-    //     }
-    // }
-
-    //boundingBox3d是__sdk.core.get('Player').model.floors.index[floorIndex].boundingBox.Box3
-    getBoundingBox2DPosition(boundingBox3d) {
-        let leftTop = coordinate.getScreenXY({
-            x: boundingBox3d.min.x,
-            y: boundingBox3d.max.z,
-        })
-
-        let rightBottom = coordinate.getScreenXY({
-            x: boundingBox3d.max.x,
-            y: boundingBox3d.min.z,
-        })
-
-        return {
-            top: leftTop.y,
-            bottom: rightBottom.y,
-            left: leftTop.x,
-            right: rightBottom.x,
+            floorplanData.floors[this.currentFloor].arrows = {}
+            floorplanData.floors[this.currentFloor].icons = []
         }
         }
     }
     }
 
 

+ 0 - 44
src/views/draw-file/board/editCAD/Service/WallService.js

@@ -21,13 +21,6 @@ export class WallService {
         return mathUtil.isContainForSegment(point, startPoint, endPoint, minDis)
         return mathUtil.isContainForSegment(point, startPoint, endPoint, minDis)
     }
     }
 
 
-    addChildren(wall, symbolId) {
-        let index = wall.children.indexOf(symbolId)
-        if (index < 0) {
-            wall.children.push(symbolId)
-        }
-    }
-
     createWall(startId, endId, vectorId, floor) {
     createWall(startId, endId, vectorId, floor) {
         let wall = new Wall(startId, endId, vectorId, floor)
         let wall = new Wall(startId, endId, vectorId, floor)
         if (floor == null || typeof floor == 'undefined') {
         if (floor == null || typeof floor == 'undefined') {
@@ -79,8 +72,6 @@ export class WallService {
             delete endPoint.parent[wallId]
             delete endPoint.parent[wallId]
             //新墙
             //新墙
             newWall = this.createWall(pointId, wall.end)
             newWall = this.createWall(pointId, wall.end)
-            newWall.setOut(wall.out)
-            newWall.setImportant(wall.important)
 
 
             //修改旧墙的end
             //修改旧墙的end
             this.setPointParent(wallId, pointId, 'end')
             this.setPointParent(wallId, pointId, 'end')
@@ -91,29 +82,12 @@ export class WallService {
             delete startPoint.parent[wallId]
             delete startPoint.parent[wallId]
             //新墙
             //新墙
             newWall = this.createWall(wall.start, pointId)
             newWall = this.createWall(wall.start, pointId)
-            newWall.setOut(wall.out)
-            newWall.setImportant(wall.important)
 
 
             //修改旧墙的end
             //修改旧墙的end
             this.setPointParent(wallId, pointId, 'start')
             this.setPointParent(wallId, pointId, 'start')
             //旧墙的end的parent换成新墙
             //旧墙的end的parent换成新墙
             startPoint.setPointParent(newWall.vectorId, dir)
             startPoint.setPointParent(newWall.vectorId, dir)
         }
         }
-        //更新symbol的所属
-        for (let i = 0; i < wall.children.length; ++i) {
-            const symbolId = wall.children[i]
-            let symbol = floorplanService.getSymbol(symbolId)
-            let symbolMid = {
-                x: (symbol.startPoint.x + symbol.endPoint.x) / 2,
-                y: (symbol.startPoint.y + symbol.endPoint.y) / 2,
-            }
-            if (this.isContain(newWall, symbolMid)) {
-                symbol.setSymbolParent(newWall.vectorId)
-                wall.children.splice(i, 1)
-                --i
-                newWall.children.push(symbolId)
-            }
-        }
 
 
         return newWall.vectorId
         return newWall.vectorId
     }
     }
@@ -395,7 +369,6 @@ export class WallService {
         const wall2 = floorplanService.getWall(wallId2)
         const wall2 = floorplanService.getWall(wallId2)
         const targetPointId = wall2.getOtherPointId(linkPointId)
         const targetPointId = wall2.getOtherPointId(linkPointId)
         const targetPoint = floorplanService.getPoint(targetPointId)
         const targetPoint = floorplanService.getPoint(targetPointId)
-        this.changeSymbolsWallToWall(wallId2, wallId1)
 
 
         if (Object.keys(targetPoint.parent).length > 1) {
         if (Object.keys(targetPoint.parent).length > 1) {
             // 将linkPointId 移动到 targetPointId
             // 将linkPointId 移动到 targetPointId
@@ -409,20 +382,6 @@ export class WallService {
         return targetPointId
         return targetPointId
     }
     }
 
 
-    // wall1.deleteSymbol(symbolId);
-    // 合并墙的时候用的上
-    changeSymbolsWallToWall(wallId1, wallId2, floor) {
-        const wall1 = floorplanService.getWall(wallId1, floor)
-        const wall2 = floorplanService.getWall(wallId2, floor)
-        for (let i = 0; i < wall1.children.length; ++i) {
-            const symbolId = wall1.children[i]
-            const symbol = floorplanService.getSymbol(symbolId, floor)
-            symbol.setSymbolParent(wallId2)
-            this.addChildren(wall2, symbolId)
-        }
-        wall1.clearChildren()
-    }
-
     mergeWallForPoint(pointId) {
     mergeWallForPoint(pointId) {
         const point = floorplanService.getPoint(pointId)
         const point = floorplanService.getPoint(pointId)
         if (point != null && Object.keys(point.parent).length == 2) {
         if (point != null && Object.keys(point.parent).length == 2) {
@@ -596,9 +555,6 @@ export class WallService {
         let wall = floorplanService.getWall(wallInfo.vectorId)
         let wall = floorplanService.getWall(wallInfo.vectorId)
         wall.start = wallInfo.start
         wall.start = wallInfo.start
         wall.end = wallInfo.end
         wall.end = wallInfo.end
-        wall.children = wallInfo.children
-        wall.out = wallInfo.out
-        wall.important = wallInfo.important
         return wall
         return wall
     }
     }
 
 

+ 7 - 188
src/views/draw-file/board/editCAD/Style.js

@@ -1,13 +1,7 @@
 const Style = {
 const Style = {
     Wall: {
     Wall: {
-        strokeStyle: '#FFFFFF',
+        strokeStyle: '#000000',
         lineWidth: 4,
         lineWidth: 4,
-        lineWidth_out: 6,
-        //承重墙
-        important: {
-            strokeStyle: '#FFFFFF',
-            lineWidth: 6,
-        },
         error: {
         error: {
             strokeStyle: 'rgba(255,0,0,0.5)',
             strokeStyle: 'rgba(255,0,0,0.5)',
             fillStyle: 'rgba(255,0,0,0.8)',
             fillStyle: 'rgba(255,0,0,0.8)',
@@ -18,20 +12,15 @@ const Style = {
         fillStyle: 'rgb(0, 200, 175)',
         fillStyle: 'rgb(0, 200, 175)',
         radius: 4,
         radius: 4,
     },
     },
-    Component: {
-        strokeStyle: 'rgba(255,255,255,1)',
-        fillStyle: 'rgba(255,255,255,0)',
-        lineWidth: 1,
-    },
     Tag: {
     Tag: {
-        strokeStyle: 'rgb(255,255,255,1)',
-        fillStyle: 'rgb(255,255,255,1)',
+        strokeStyle: 'rgb(0,0,0,1)',
+        fillStyle: 'rgb(0,0,0,1)',
         strokeStyle_adding: 'rgba(243, 255, 0, 0.8)',
         strokeStyle_adding: 'rgba(243, 255, 0, 0.8)',
         fillStyle_adding: 'rgba(243, 255, 0, 0.8)',
         fillStyle_adding: 'rgba(243, 255, 0, 0.8)',
         lineWidth: 1,
         lineWidth: 1,
     },
     },
     Sign: {
     Sign: {
-        strokeStyle: 'rgb(255,255,255,1)',
+        strokeStyle: 'rgb(0,0,0,1)',
         fillStyle: 'rgba(0,0,0,0)',
         fillStyle: 'rgba(0,0,0,0)',
         lineWidth: 1,
         lineWidth: 1,
     },
     },
@@ -39,9 +28,6 @@ const Style = {
         Wall: {
         Wall: {
             strokeStyle: 'rgba(243, 255, 0, 1)',
             strokeStyle: 'rgba(243, 255, 0, 1)',
         },
         },
-        Wall_out: {
-            strokeStyle: 'rgba(243, 255, 0, 1)',
-        },
         Component: {
         Component: {
             strokeStyle: 'rgba(243, 255, 0, 0.8)',
             strokeStyle: 'rgba(243, 255, 0, 0.8)',
             fillStyle: 'rgba(243, 255, 0, 0.5)',
             fillStyle: 'rgba(243, 255, 0, 0.5)',
@@ -92,21 +78,9 @@ const Style = {
         },
         },
         NewWall: {
         NewWall: {
             lineWidth: 4,
             lineWidth: 4,
-            lineWidth_out: 6,
-            strokeStyle: 'rgba(255,255,255,0.3)',
-            strokeStyle_out: 'rgba(102,102,102,0.3)',
+            strokeStyle: 'rgba(0,0,0,0.3)',
             errorStrokeStyle: 'rgb(250,63,72,0.3)',
             errorStrokeStyle: 'rgb(250,63,72,0.3)',
         },
         },
-        StartSymbolPoints: {
-            radius: 4,
-            fillStyle: 'yellow',
-            strokeStyle: 'green',
-        },
-        EndSymbolPoints: {
-            radius: 4,
-            fillStyle: 'yellow',
-            strokeStyle: 'green',
-        },
         CheckLinesX: {
         CheckLinesX: {
             lineWidth: 2,
             lineWidth: 2,
             strokeStyle: '#CED806',
             strokeStyle: '#CED806',
@@ -128,167 +102,12 @@ const Style = {
     },
     },
     Font: {
     Font: {
         font: '14px Microsoft YaHei',
         font: '14px Microsoft YaHei',
-        fillStyle: '#FFFFFF',
-        strokeStyle: '#FFFFFF',
+        fillStyle: '#000000',
+        strokeStyle: '#000000',
         textAlign: 'center',
         textAlign: 'center',
         textBaseline: 'middle',
         textBaseline: 'middle',
         miterLimit: 10,
         miterLimit: 10,
         direction: 'ltr',
         direction: 'ltr',
     },
     },
-    Pano: {
-        radius: 10,
-        lineWidth: 2,
-        strokeStyle: 'rgba(255,255,255,0.4)',
-        fillStyle: 'rgba(255,255,255,0.1)',
-    },
-    Measure: {
-        txt: 'rgba(255,255,255,1)', //画墙/选墙的时候 测量值的颜色
-        strokeStyle: 'rgba(255,255,255,1)',
-        lineWidth: 1,
-    },
-    DownLoad: {
-        style1: {
-            Wall: {
-                strokeStyle: '#666666',
-                lineWidth: 4,
-                lineWidth_out: 6,
-                //承重墙
-                important: {
-                    strokeStyle: '#666666',
-                    lineWidth: 6,
-                },
-            },
-            Component: {
-                strokeStyle: '#666666',
-                fillStyle: '#666666',
-                lineWidth: 1,
-            },
-            Tag: {
-                strokeStyle: '#000000', //标注的颜色
-                fillStyle: '#000000', //标注的颜色
-                lineWidth: 1,
-            },
-            Font: {
-                font: '14px Microsoft YaHei',
-                fillStyle: '#000000', //上下左右测量值
-                strokeStyle: '#000000',
-                textAlign: 'center',
-                textBaseline: 'middle',
-                miterLimit: 10,
-                direction: 'ltr',
-            },
-            Measure: {
-                strokeStyle: '#CCCCCC',
-                lineWidth: 1,
-            },
-        },
-        style2: {
-            Wall: {
-                strokeStyle: '#FFFFFF',
-                lineWidth: 4,
-                lineWidth_out: 6,
-                //承重墙
-                important: {
-                    strokeStyle: '#FFFFFF',
-                    lineWidth: 6,
-                },
-            },
-            Component: {
-                strokeStyle: '#FFFFFF',
-                fillStyle: '#FFFFFF',
-                lineWidth: 1,
-            },
-            Tag: {
-                strokeStyle: '#FFFFFF', //标注的颜色
-                fillStyle: '#FFFFFF', //标注的颜色
-                lineWidth: 1,
-            },
-            Font: {
-                font: '14px Microsoft YaHei',
-                fillStyle: '#FFFFFF', //上下左右测量值
-                strokeStyle: '#FFFFFF',
-                textAlign: 'center',
-                textBaseline: 'middle',
-                miterLimit: 10,
-                direction: 'ltr',
-            },
-            Measure: {
-                strokeStyle: '#FFFFFF',
-                lineWidth: 1,
-            },
-        },
-        style3: {
-            Wall: {
-                strokeStyle: '#666666',
-                lineWidth: 4,
-                lineWidth_out: 6,
-                //承重墙
-                important: {
-                    strokeStyle: '#666666',
-                    lineWidth: 6,
-                },
-            },
-            Component: {
-                strokeStyle: '#666666',
-                fillStyle: '#666666',
-                lineWidth: 1,
-            },
-            Tag: {
-                strokeStyle: '#000000', //标注的颜色
-                fillStyle: '#000000', //标注的颜色
-                strokeStyle_adding: 'rgba(243, 255, 0, 0.8)',
-                fillStyle_adding: 'rgba(243, 255, 0, 0.8)',
-                lineWidth: 1,
-            },
-            Font: {
-                font: '14px Microsoft YaHei',
-                fillStyle: '#000000', //上下左右测量值
-                strokeStyle: '#000000',
-                textAlign: 'center',
-                textBaseline: 'middle',
-                miterLimit: 10,
-                direction: 'ltr',
-            },
-            Measure: {
-                strokeStyle: '#CCCCCC',
-                lineWidth: 2,
-            },
-        },
-        style4: {
-            Wall: {
-                strokeStyle: '#FFFFFF',
-                lineWidth: 4,
-                lineWidth_out: 6,
-                //承重墙
-                important: {
-                    strokeStyle: '#FFFFFF',
-                    lineWidth: 6,
-                },
-            },
-            Component: {
-                strokeStyle: '#FFFFFF',
-                fillStyle: '#FFFFFF',
-                lineWidth: 1,
-            },
-            Tag: {
-                strokeStyle: '#FFFFFF', //标注的颜色
-                fillStyle: '#FFFFFF', //标注的颜色
-                lineWidth: 1,
-            },
-            Font: {
-                font: '14px Microsoft YaHei',
-                fillStyle: '#FFFFFF', //上下左右测量值
-                strokeStyle: '#FFFFFF',
-                textAlign: 'center',
-                textBaseline: 'middle',
-                miterLimit: 10,
-                direction: 'ltr',
-            },
-            Measure: {
-                strokeStyle: '#FFFFFF',
-                lineWidth: 1,
-            },
-        },
-    },
 }
 }
 export default Style
 export default Style

+ 0 - 2
src/views/draw-file/board/editCAD/enum/ElementEvents.js

@@ -1,8 +1,6 @@
 const ElementEvents = {
 const ElementEvents = {
     StartAddWall: 'StartAddWall',
     StartAddWall: 'StartAddWall',
     NewWall: 'NewWall',
     NewWall: 'NewWall',
-    StartSymbolPoints: 'StartSymbolPoints',
-    EndSymbolPoints: 'EndSymbolPoints',
     CheckLinesX: 'CheckLinesX',
     CheckLinesX: 'CheckLinesX',
     CheckLinesY: 'CheckLinesY',
     CheckLinesY: 'CheckLinesY',
     VCheckLinesX: 'vCheckLinesX',
     VCheckLinesX: 'vCheckLinesX',