Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	docs/dev/data-center/relations/belongs/Sp2Sp2.md
jxing 4 éve
szülő
commit
9062904c14

+ 0 - 1
docs/.vuepress/components/example/web/graph/Circle1.vue

@@ -1,4 +1,3 @@
-import {SLineCapStyle} from "@saga-web/draw/lib";
 <template>
     <canvas id="circle" width="740" height="250" />
 </template>

+ 3 - 3
docs/.vuepress/components/example/web/graph/DrawLine1.vue

@@ -43,12 +43,12 @@
 
             canvas.pen.color = new SColor('#03a9f4');
             canvas.pen.lineWidth = 5;
-            canvas.drawLine(400, 50, 700, 50);
+            canvas.drawLine(450, 50, 700, 50);
             canvas.pen.lineWidth = 3;
-            canvas.pen.dashOffset = new Date().getTime()/50%60;
+            canvas.pen.dashOffset = new Date().getTime()/50%80;
             canvas.pen.lineDash = [30,50];
             canvas.pen.color = SColor.White;
-            canvas.drawLine(400, 50, 700, 50);
+            canvas.drawLine(450, 50, 700, 50);
             this.update();
         }
     }

+ 55 - 0
docs/.vuepress/components/example/web/graph/scene/PolylineItem.vue

@@ -0,0 +1,55 @@
+<template>
+    <div>
+        <el-button size="mini" @click="init">清空画布,并初始化折线item</el-button>
+        <el-button size="mini" @click="undo">undo</el-button>
+        <el-button size="mini" @click="redo">redo</el-button>
+        <canvas id="editPolyline" width="740" height="400" tabindex="0"></canvas>
+    </div>
+</template>
+
+<script>
+    import {SGraphScene, SGraphView} from "@saga-web/graph/lib";
+    import {SPolylineItem} from "@saga-web/big/lib";
+    export default {
+        name: "editPolyline",
+        data() {
+            return {
+                scene: null,
+                view: null,
+                item: null,
+            };
+        },
+        mounted() {
+            this.view = new SGraphView("editPolyline");
+            this.scene = new SGraphScene();
+            this.view.scene = this.scene;
+            this.init()
+        },
+        methods:{
+            init(){
+                this.scene.root.children = [];
+                this.item = new SPolylineItem(null,[]);
+                this.scene.addItem(this.item);
+                this.scene.grabItem = this.item;
+                this.view.update();
+            },
+            undo(){
+                if(this.scene.grabItem) {
+                    this.scene.grabItem.undo()
+                }
+            },
+            redo(){
+                if(this.scene.grabItem) {
+                    this.scene.grabItem.redo()
+                }
+            }
+        }
+    }
+</script>
+
+<style scoped>
+canvas{
+    border: 1px solid #eeeeee;
+    outline: none;
+}
+</style>

+ 187 - 47
docs/.vuepress/components/example/web/graph/scene/SEditLine.vue

@@ -16,11 +16,30 @@
     /**
      * 直线item
      *
+     * @author  张宇(taohuzy@163.com)
      * */
 
     class SLineItem extends SGraphItem {
+        /** X坐标最小值  */
+        private minX = Number.MAX_SAFE_INTEGER;
+        /** X坐标最大值  */
+        private maxX = Number.MIN_SAFE_INTEGER;
+        /** Y坐标最小值  */
+        private minY = Number.MAX_SAFE_INTEGER;
+        /** Y坐标最大值  */
+        private maxY = Number.MIN_SAFE_INTEGER;
+
         /** 线段   */
-        line: SPoint[] = [];
+        _line: SPoint[] = [];
+        get line(): SPoint[] {
+            return this._line;
+        }
+        set line(arr: SPoint[]) {
+            this._line = arr;
+            this._xyzListToSPointList(arr);
+            this.update();
+        }
+
         /** 是否完成绘制  */
         _status: SRelationState = SRelationState.Create;
         get status(): SRelationState {
@@ -30,6 +49,7 @@
             this._status = v;
             this.update();
         }
+
         /** 线条颜色    */
         _strokeColor: string = "#000000";
         get strokeColor(): string {
@@ -39,6 +59,7 @@
             this._strokeColor = v;
             this.update();
         }
+
         /** 填充色 */
         _fillColor: string = "#2196f3";
         get fillColor(): string {
@@ -48,6 +69,7 @@
             this._fillColor = v;
             this.update();
         }
+
         /** 线条宽度    */
         _lineWidth: number = 1;
         get lineWidth(): number {
@@ -57,11 +79,16 @@
             this._lineWidth = v;
             this.update();
         }
+
         /** 拖动灵敏度   */
         dis: number = 10;
+
         /** 拖动灵敏度   */
         sceneDis: number = 10;
 
+        /** 当前点索引   */
+        curIndex: number = -1;
+
         /**
          * 构造函数
          *
@@ -94,24 +121,77 @@
         }
 
         /**
+         * 添加点至数组中
+         *
+         * @param   p       添加的点
+         * @param   index   添加到的索引
+         * */
+        private addPoint(p: SPoint): void {
+            if (this.line.length < 2) {
+                this.line.push(p);
+            } else {
+                this.line[1] = p;
+                this.status = SRelationState.Normal;
+            }
+            this._xyzListToSPointList(this.line);
+            this.update();
+        } // Function addPoint()
+
+        /**
+         * 鼠标双击事件
+         *
+         * @param	event         事件参数
+         * @return	boolean
+         */
+        onDoubleClick(event: SMouseEvent): boolean {
+            if (this.contains(event.x, event.y)) { // 判断是否点击到线上
+                if (this.status == SRelationState.Normal) {
+                    if (this.scene) {
+                        this.scene.grabItem = this;
+                    }
+                    this.status = SRelationState.Edit;
+                } else if (this.status = SRelationState.Edit) {
+                    this.status = SRelationState.Normal;
+                }
+                this.update();
+            }
+            return true;
+        } // Function onDoubleClick()
+
+        /**
          * 鼠标按下事件
          *
          * @param   event   鼠标事件
          * @return  是否处理事件
          * */
         onMouseDown(event: SMouseEvent): boolean {
-            console.log(this);
             if (this.status == SRelationState.Normal) {
                 return super.onMouseDown(event);
             } else if (this.status == SRelationState.Edit) {
+                // 判断是否点击到端点上(获取端点索引值)
+                this.findNearestPoint(new SPoint(event.x, event.y));
             } else if (this.status == SRelationState.Create) {
-
+                this.addPoint(new SPoint(event.x, event.y));
+                return true;
             }
             this.$emit("mousedown");
             return true;
         } // Function onMouseDown()
 
         /**
+         * 鼠标抬起事件
+         *
+         * @param	event         事件参数
+         * @return	boolean
+         */
+        onMouseUp(event: SMouseEvent): boolean {
+            if (this._status == SRelationState.Edit) {
+                this.curIndex = -1;
+            }
+            return true;
+        } // Function onMouseUp()
+
+        /**
          * 鼠标移动事件
          *
          * @param   event   鼠标事件
@@ -119,27 +199,72 @@
          * */
         onMouseMove(event: SMouseEvent): boolean {
             if (this.status == SRelationState.Create) {
-
-                return true;
+                if (this.line[0] instanceof SPoint) {
+                    this.line[1] = new SPoint(event.x, event.y);
+                }
+            } else if (this.status == SRelationState.Edit) {
+                if (-1 != this.curIndex) {
+                    this.line[this.curIndex].x = event.x;
+                    this.line[this.curIndex].y = event.y;
+                }
             } else {
                 return super.onMouseMove(event);
             }
+            this._xyzListToSPointList(this.line);
+            this.update();
+            return true;
         } // Function onMouseMove()
 
         /**
-         * 鼠标移动事件
+         * 获取点击点与Point[]中的点距离最近点
          *
-         * @param   event   鼠标事件
-         * @return  是否处理事件
+         * @param   p   鼠标点击点
          * */
-        onMouseUp(event: SMouseEvent): boolean {
-            // if (this.status == SRelationState.Create) {
-            //     this.status = SRelationState.Edit;
-            //     return true;
-            // } else {
-                return super.onMouseUp(event);
-            // }
-        } // Function onMouseUp()
+        findNearestPoint(p: SPoint): void {
+            let len = this.sceneDis;
+            for (let i = 0; i < 2; i++) {
+                let dis = SMathUtil.pointDistance(
+                    p.x,
+                    p.y,
+                    this.line[i].x,
+                    this.line[i].y
+                );
+                if (dis < len) {
+                    len = dis;
+                    this.curIndex = i;
+                }
+            }
+        } // Function findNearestPoint()
+
+        /**
+         * xyz数据转换为SPoint格式函数;获取外接矩阵参数
+         *
+         * @param arr    外层传入的数据PointList
+         */
+        protected _xyzListToSPointList(arr: SPoint[]): void {
+            if (arr.length) {
+                this.minX = Number.MAX_SAFE_INTEGER;
+                this.maxX = Number.MIN_SAFE_INTEGER;
+                this.minY = Number.MAX_SAFE_INTEGER;
+                this.maxY = Number.MIN_SAFE_INTEGER;
+                arr.forEach(it => {
+                    let x = it.x,
+                        y = it.y;
+                    if (x < this.minX) {
+                        this.minX = x;
+                    }
+                    if (y < this.minY) {
+                        this.minY = y;
+                    }
+                    if (x > this.maxX) {
+                        this.maxX = x;
+                    }
+                    if (y > this.maxY) {
+                        this.maxY = y;
+                    }
+                });
+            }
+        }
 
         /**
          * 判断点是否在区域内
@@ -162,25 +287,31 @@
         } // Function contains()
 
         /**
+         * 取消操作item事件
+         *
+         * */
+        cancelOperate(): void {
+            if (this.status == SRelationState.Create) {
+                this.parent = null;
+                this.releaseItem();
+            } else if (this.status == SRelationState.Edit) {
+                this.status = SRelationState.Normal;
+                this.releaseItem();
+            }
+        } // Function cancelOperate()
+
+        /**
          * Item对象边界区域
          *
          * @return	SRect
          */
         boundingRect(): SRect {
-            if (this.line.length == 2) {
-                let x: number = this.line[0].x > this.line[1].x ? this.line[1].x : this.line[0].x;
-                let y: number = this.line[0].x > this.line[1].x ? this.line[1].y : this.line[0].y;
-                let width: number = Math.abs(this.line[0].x - this.line[1].x);
-                let height: number = Math.abs(this.line[0].y - this.line[1].y);
-                return new SRect(
-                    x,
-                    y,
-                    width,
-                    height
-                );
-            } else {
-                return new SRect();
-            }
+            return new SRect(
+                this.minX,
+                this.minY,
+                this.maxX - this.minX,
+                this.maxY - this.minY
+            );
         } // Function boundingRect()
 
         /**
@@ -192,25 +323,27 @@
             this.sceneDis = painter.toPx(this.dis);
             painter.pen.lineWidth = painter.toPx(this.lineWidth);
             painter.pen.color = new SColor(this.strokeColor);
-            if (this.p1 instanceof SPoint && this.p2 instanceof SPoint) {
+            if (this.line.length == 2) {
                 // 绘制外轮廓
-                painter.brush.color = SColor.Transparent;
-                painter.pen.color = new SColor("#128eee");
-                painter.drawRect(this.boundingRect());
-
-                // 绘制基本图形
-                painter.pen.color = new SColor(this.strokeColor);// 需注释
-                painter.drawLine(this.p1, this.p2);
-
-                // 编辑态
-                if (this.status == SRelationState.Edit) {
-                    painter.brush.color = SColor.White;
+                // painter.brush.color = SColor.Transparent;
+                // painter.pen.color = new SColor("#128eee");
+                // painter.drawRect(this.boundingRect());
 
-                    // painter.brush.color = new SColor(this.fillColor);
+                // 绘制直线
+                painter.pen.color = new SColor(this.strokeColor);
+                painter.drawLine(this.line[0], this.line[1]);
 
-                    painter.drawCircle(this.p1.x, this.p1.y, painter.toPx(5));
-
-                    painter.drawCircle(this.p2.x, this.p2.y, painter.toPx(5));
+                if (this.status == SRelationState.Edit || this.status == SRelationState.Create) {
+                    // 绘制端点
+                    painter.brush.color = new SColor(this.fillColor);
+                    painter.drawCircle(this.line[0].x, this.line[0].y, painter.toPx(5));
+                    painter.drawCircle(this.line[1].x, this.line[1].y, painter.toPx(5));
+                }
+            } else if (this.line.length == 1) {
+                if (this.status == SRelationState.Edit || this.status == SRelationState.Create) {
+                    // 绘制端点
+                    painter.brush.color = new SColor(this.fillColor);
+                    painter.drawCircle(this.line[0].x, this.line[0].y, painter.toPx(5));
                 }
             }
         } // Function onDraw()
@@ -246,7 +379,14 @@
                 this.view.fitSceneToView();
             },
             edit() {
-
+                const scene = new SGraphScene();
+                this.view.scene = scene;
+                const line: SPoint[] = [new SPoint(100, 100), new SPoint(300, 300)];
+                const lineItem = new SLineItem(null, line);
+                lineItem.status = SRelationState.Edit;
+                scene.addItem(lineItem);
+                scene.grabItem = lineItem;
+                this.view.fitSceneToView();
             }
         }
     };

+ 103 - 39
docs/.vuepress/components/example/web/graph/scene/SImgTextItem.vue

@@ -1,15 +1,14 @@
-import {SItemStatus} from "@saga-web/big/lib";
 <template>
     <div>
-        <el-input v-model="input" placeholder="请输入内容"></el-input>
-        <el-button @click="change">00000</el-button>
+        <el-button @click="changemaodian">切换锚点显示状态</el-button>
+        <el-button @click="changetext">切换文本显示状态</el-button>
         <canvas id="editPolygon" width="740" height="400" tabindex="0"></canvas>
     </div>
 </template>
 
 <script lang="ts">
     import {SGraphItem, SGraphScene, SGraphView} from "@saga-web/graph/lib";
-    import {SImageItem, SItemStatus, SObjectItem, STextItem} from "@saga-web/big/lib";
+    import {SAnchorItem, SImageItem, SItemStatus, SObjectItem, STextItem} from "@saga-web/big/lib";
     import {SColor, SPainter, SRect, SSize, STextBaseLine} from "@saga-web/draw/lib";
     import {SMouseEvent} from "@saga-web/base/lib";
 
@@ -17,35 +16,62 @@ import {SItemStatus} from "@saga-web/big/lib";
      * 图例item  icon
      *
      * */
-    class SImgTextItem extends SObjectItem{
+    class SImgTextItem extends SObjectItem {
 
         /** item状态  */
-        _status:SItemStatus = SItemStatus.Create;
-        get status():SItemStatus{
+        _status: SItemStatus = SItemStatus.Normal;
+        get status(): SItemStatus {
             return this._status;
         }
-        set status(v:SItemStatus){
+        set status(v: SItemStatus) {
             this._status = v;
             this.update();
         }
 
         /** 是否显示文字  */
-        _showText:boolean = true;
-        get showText():boolean{
+        _showText: boolean = true;
+        get showText(): boolean {
             return this._showText;
         }
-        set showText(v:boolean){
+        set showText(v: boolean) {
             if (v === this._showText) {
                 return
             }
             this._showText = v;
-            if (v) {
-                this.textItem.show();
-            } else {
-                this.textItem.hide();
-            }
+            this.textItem.visible = v;
+        }
+
+        /** 是否显示锚点  */
+        _showAnchor: boolean = false;
+        get showAnchor():boolean{
+            return this._showAnchor;
+        }
+        set showAnchor(v:boolean){
+            this._showAnchor = v;
+            this.anchorList.forEach(t => {
+                t.visible = v;
+            })
         }
 
+        /** X轴坐标 */
+        get x(): number {
+            return this.pos.x;
+        } // Get x
+        set x(v: number) {
+            this.pos.x = v;
+            this.$emit("changePos");
+            this.update();
+        } // Set x
+        /** Y轴坐标 */
+        get y(): number {
+            return this.pos.y;
+        } // Get y
+        set y(v: number) {
+            this.pos.y = v;
+            this.$emit("changePos");
+            this.update();
+        } // Set y
+
         /** img Item    */
         img: SImageItem = new SImageItem(this);
 
@@ -56,20 +82,51 @@ import {SItemStatus} from "@saga-web/big/lib";
          * 构造体
          *
          * */
-        constructor(parent:SGraphItem|null){
+        constructor(parent: SGraphItem | null) {
             super(parent);
             this.img.url = `http://adm.sagacloud.cn:8080/doc/assets/img/logo.png`;
-            setTimeout(() => {
-                this.img.width = 28;
-                this.img.height = 28;
-                this.update();
-            },1000);
-            this.img.isTransform = true;
-            this.textItem.text = `图例item示例`;
-            this.textItem.moveTo(16,0);
-            this.textItem.font.textBaseLine = STextBaseLine.Middle;
+            this.img.width = 32;
+            this.img.height = 32;
+            let anchorPoint = [{ x: 0, y: this.img.height / 2 }, { x: 0, y: -this.img.height / 2 }, { x: -this.img.width / 2, y: 0 }, { x: this.img.width / 2, y: 0 }];
+            this.anchorList = anchorPoint.map(t => {
+                let item = new SAnchorItem(this);
+                item.moveTo(t.x, t.y);
+                return item;
+            });
+            this.update();
+            this.textItem.text = "请填写文本";
+            this.textItem.moveTo(16, -6);
+            this.moveable = true;
+            this.selectable = true;
+        }
+
+        onMouseEnter(event: SMouseEvent): boolean {
+            this.showAnchor = true;
+            return true;
+        }
+
+        onMouseLeave(event: SMouseEvent): boolean {
+            this.showAnchor = false;
+            return true;
         }
 
+        onMouseMove(event: SMouseEvent): boolean {
+            return super.onMouseMove(event);
+        }
+
+        /**
+         * 鼠标按下事件
+         *
+         * */
+        onMouseDown(event: SMouseEvent): boolean {
+            if (this.status == SItemStatus.Normal) {
+                return super.onMouseDown(event);
+            } else if (this.status == SItemStatus.Edit) {
+                return super.onMouseDown(event);
+            }
+            return true;
+        } // Function onMouseDown()
+
         /**
          * 宽高发发生变化
          *
@@ -98,9 +155,13 @@ import {SItemStatus} from "@saga-web/big/lib";
          * @return  SRect   所有子对象的并集
          * */
         boundingRect(): SRect {
-            let rect = new SRect();
+            let rect :SRect = new SRect();
             this.children.forEach(t => {
-                rect = rect.unioned(t.boundingRect());
+                if (rect.isNull()) {
+                    rect = t.boundingRect().adjusted(t.pos.x,t.pos.y,0,0);
+                } else {
+                    rect = rect.unioned(t.boundingRect().adjusted(t.pos.x,t.pos.y,0,0));
+                }
             });
             return rect;
         } // Function boundingRect()
@@ -114,14 +175,11 @@ import {SItemStatus} from "@saga-web/big/lib";
             painter.pen.lineWidth = painter.toPx(1);
             painter.pen.color = new SColor("#00FF00");
             painter.brush.color = SColor.Transparent;
-            painter.drawRect(this.boundingRect());
-            super.onDraw(painter);
-
-            if (this.status == SItemStatus.Edit) {
-                this.anchorList.forEach(t => {
-
-                })
+            if (this.showAnchor) {
+                painter.brush.color = SColor.Gray
             }
+            painter.drawRect(this.boundingRect());
+            // super.onDraw(painter);
         } // Function onDraw()
     }
 
@@ -144,14 +202,20 @@ import {SItemStatus} from "@saga-web/big/lib";
         },
         methods:{
             init(){
-                const item = new SImgTextItem(null);
-                item.moveable = true;
+                this.item = new SImgTextItem(null);
+                this.item.moveable = true;
 
-                this.scene.addItem(item);
-                this.view.fitSceneToView();
+                this.scene.addItem(this.item);
+                // this.view.fitSceneToView();
             },
             change() {
 
+            },
+            changemaodian(){
+                this.item.showAnchor = !this.item.showAnchor;
+            },
+            changetext(){
+                this.item.showText = !this.item.showText;
             }
         }
     }

+ 11 - 0
docs/.vuepress/config.js

@@ -5,6 +5,7 @@ const dataCenterContent = require("../dev/data-center/index");
 const paasContent = require("../dev/paas/index");
 const revitCenterContent = require("../dev/revit-center/index");
 const sagaGraphyContent = require("../dev/saga-graphy/index");
+const dataCenterScheme = require("../dev/data-center-scheme/index");
 
 module.exports = {
     title: "数字化交付开发文档",
@@ -67,6 +68,15 @@ module.exports = {
                             { text: "系统图", link: "/dev/database/topo/" }
                         ]
                     },
+                    {
+                        text: "新版数据字典物理世界对接",
+                        items: [
+                            { text: "新版字典中台工具接口对接", link: "/dev/data-center-scheme/" },
+                            // { text: "新版字典ADM对接", link: "/dev/data-center-scheme/" },
+                            // { text: "新版字典对接数据中心", link: "/dev/data-center-scheme/" },
+                            // { text: "新版物理世界对接数据中心", link: "/dev/data-center-scheme/" }
+                        ]
+                    },
                 ]
             },
             {
@@ -117,6 +127,7 @@ module.exports = {
             "/dev/paas/" : paasContent,
             "/dev/revit-center/" : revitCenterContent,
             "/dev/saga-graphy/": sagaGraphyContent,
+            "/dev/data-center-scheme/" : dataCenterScheme,
         }
     }
 };

+ 3 - 0
docs/.vuepress/styles/palette.styl

@@ -0,0 +1,3 @@
+body{
+  user-select :none;
+}

+ 2 - 0
docs/dev/data-center-scheme/README.md

@@ -0,0 +1,2 @@
+# 数据中台字典、新版物理世界、新版ADM 对接方案
+

+ 3 - 0
docs/dev/data-center-scheme/dict-ADM.md

@@ -0,0 +1,3 @@
+# 新版字典ADM对接方案
+
+

+ 463 - 0
docs/dev/data-center-scheme/dict-dataplatform.md

@@ -0,0 +1,463 @@
+# 中台工具字典接口使用对接方案
+测试环境IP以及端口号
+```
+172.16.44.212:8081/paas
+```
+
+
+## 集团管理
+
+#### 查询所有集团列表 
+```
+POST: /usercenter/groupCompany/query
+```
+
+请求参数
+```
+{}
+```
+
+应答内容
+
+```
+{
+    "result": "success",
+    "data": [
+        {
+            "code": "SN",             集团id
+            "name": "苏宁集团"         集团名称
+        },
+        {
+            "code": "WD",
+            "name": "万达集团"
+        },
+        {
+            "code": "WK",
+            "name": "万科集团"
+        }
+    ],
+    "count": 3
+}
+```
+
+#### 添加集团
+
+```
+POST: /usercenter/groupCompany/save
+```
+请求参数
+```
+{
+    "code":"546455",      集团id
+    "name":"12123213"     集团名称
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success"
+}
+```
+
+#### 编辑集团信息 注意编辑集团和创建使用的同一个接口
+
+```
+POST: /usercenter/groupCompany/save
+```
+请求参数
+```
+{
+    "code":"546455",      集团id
+    "name":"12123213"     集团名称
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success"
+}
+```
+
+##### 中台工具中只修改集团名称,前端控制ID不可以修改,确保集团id入参是要修改集团ID否则会创建新的集团
+
+
+#### 集团字典搜索 功能前端自行筛选
+
+创建集团后,自动创建集团字典(字典默认为平台字典全部内容);并创建默认方案(默认为集团字典全部内容)
+
+创建集团后调用创建方案接口 ,然后调用方案订阅接口订阅所有类型,以及每个类型下的信息点
+
+#### 创建集团下默认方案
+
+```
+dict/scheme/create
+```
+
+请求参数
+
+```
+{
+    "groupId":"142563",             集团id
+    "note":null,                    备注
+    "name":"默认方案"                方案名称
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success",
+    "id":5
+}
+```
+
+
+方案中订阅类型  需要把平台级字典的所有类型查询出来  然后组合成数组调用方案订阅接口   
+方案种类型订阅信息点,需要把平台级的每个类型的信息点查出来,然后一个一个类型的信息点通过接口执行订阅
+
+## 项目管理
+
+#### 根据集团查询项目
+
+```
+POST: usercenter/project/query
+```
+
+请求参数
+
+```
+{
+    "criteria":{
+        "groupCompanyCode":"WK"   集团id
+    }
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success",
+    "data":[
+        {
+            "id":"Pj1106479820",
+            "name":"北京万科国际大厦",
+            "groupCompany":{
+                "code":"WK",
+                "name":"万科集团"
+            }
+        }
+    ],
+    "count":1
+}
+```
+
+#### 添加项目
+
+```
+POST: usercenter/project/save
+```
+
+请求参数
+
+```
+{
+    "id":"Pj3264971164",      项目id
+    "name":"测试项目",         项目名称
+    "groupCompany":{          
+        "code":"WK"           集团id
+    }
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success"
+}
+```
+#### 集团方案列表
+
+```
+POST: /dict/scheme/query
+```
+
+请求参数
+
+```
+{
+    "criteria":{
+        "groupId":"WD"  集团id
+    }
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success",
+    "data":[
+        {
+            "id":3,                         方案id
+            "name":"商业综合体",             方案名称
+            "groupId":"WD"                  集团id
+        },
+        {
+            "id":4,
+            "name":"酒店管理方案",
+            "note":"wanda03156",
+            "groupId":"WD"
+        }
+    ],
+    "count":2
+}
+```
+#### 项目设置集团方案
+
+```
+dict/scheme/project/set
+```
+
+请求参数
+
+```
+{
+    "criteria":{
+        "projectId":[    项目id列表
+            "Pj1101050029"
+        ]
+    }
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success"
+}
+```
+
+#### 编辑项目
+
+```
+POST: usercenter/project/save
+```
+
+请求参数
+
+```
+{
+    "id":"Pj1101050029",            项目id
+    "name":"东坝万达广场1",           项目名称
+    "groupCompany":{                集团对象
+        "code":"WD",                集团id
+        "name":"万达集团"            集团名称
+    }
+}
+```
+
+应答内容
+
+```
+{
+    "result":"success"
+}
+```
+
+## 集团字典
+
+### 集团字典管理
+
+#### 获取集团下类型树结构
+
+```
+ Get: dict/class?&groupId=WD&subFlag=false     //groupId: 集团id   subFlag: 是否显示所有子分类
+```
+
+应答内容
+
+```
+{
+    "result":"success",
+    "data":[
+        {
+            "code":"project",
+            "name":"项目",
+            "aliasCode":"project",
+            "aliasName":"项目"
+        },
+        {
+            "code":"building",
+            "name":"建筑",
+            "aliasCode":"building",
+            "aliasName":"建筑"
+        },
+        {
+            "code":"floor",
+            "name":"楼层",
+            "aliasCode":"floor",
+            "aliasName":"楼层"
+        },
+        {
+            "code":"space",
+            "name":"空间",
+            "aliasCode":"space",
+            "aliasName":"空间"
+        },
+        {
+            "code":"system",
+            "name":"系统",
+            "aliasCode":"system",
+            "aliasName":"系统",
+            "children":[
+                {
+                    "code":"system-AC",
+                    "name":"空调专业",
+                    "aliasCode":"system-AC",
+                    "aliasName":"空调专业",
+                    "children":[
+                        {
+                            "code":"ACAT",
+                            "name":"空调末端系统",
+                            "aliasCode":"ACAT",
+                            "aliasName":"空调末端系统",
+                            "parentCode":"system",
+                            "majorCode":"AC"
+                        },
+                        {
+                            "code":"ACAD",
+                            "name":"空调人防系统",
+                            "aliasCode":"ACAD",
+                            "aliasName":"空调人防系统",
+                            "parentCode":"system",
+                            "majorCode":"AC"
+                        }
+                    ]
+                },
+                {
+                    "code":"system-FF",
+                    "name":"消防专业",
+                    "aliasCode":"system-FF",
+                    "aliasName":"消防专业",
+                    "children":[
+                        {
+                            "code":"FFSC",
+                            "name":"防排烟系统",
+                            "aliasCode":"FFSC",
+                            "aliasName":"防排烟系统",
+                            "parentCode":"system",
+                            "majorCode":"FF"
+                        }
+                    ]
+                }
+            ]
+        },
+        {
+            "code":"equipment",
+            "name":"设备",
+            "aliasCode":"equipment",
+            "aliasName":"设备",
+            "children":[
+                {
+                    "code":"equipment-AC",
+                    "name":"空调专业",
+                    "aliasCode":"equipment-AC",
+                    "aliasName":"空调专业",
+                    "children":[
+                        {
+                            "code":"equipment-ACAT",
+                            "name":"空调末端系统",
+                            "aliasCode":"equipment-ACAT",
+                            "aliasName":"空调末端系统",
+                            "children":[
+                                {
+                                    "code":"ACATAH",
+                                    "name":"空调机组",
+                                    "aliasCode":"ACATAH",
+                                    "aliasName":"空调机组",
+                                    "parentCode":"equipment",
+                                    "majorCode":"AC",
+                                    "systemCode":"ACAT"
+                                }
+                            ]
+                        },
+                        {
+                            "code":"equipment-ACCH",
+                            "name":"中央供热系统",
+                            "aliasCode":"equipment-ACCH",
+                            "aliasName":"中央供热系统",
+                            "children":[
+                                {
+                                    "code":"ACCHWT",
+                                    "name":"供热水箱",
+                                    "aliasCode":"ACCHWT",
+                                    "aliasName":"供热水箱",
+                                    "parentCode":"equipment",
+                                    "majorCode":"AC",
+                                    "systemCode":"ACCH"
+                                }
+                            ]
+                        }
+                    ]
+                }
+            ]
+        }
+    ]
+}
+```
+
+
+
+
+
+
+
+
+
+## 注意事项
+1.某一个类型显示子分类功能新版字典还没有实现
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 
+
+

+ 8 - 0
docs/dev/data-center-scheme/index.js

@@ -0,0 +1,8 @@
+const content = [
+
+            // ["/dev/data-center-scheme/dict-dataplatform", "中台工具字典接口使用对接方案"],
+            ["/dev/data-center-scheme/dict-ADM", "新版字典ADM对接方案"],
+            ["/dev/data-center-scheme/dict-dataplatform", "关系表设计"]
+];
+
+module.exports = content;

+ 222 - 5
docs/dev/paas/data-dict.md

@@ -1,4 +1,3 @@
-# 数据字典接口文档
 ### 术语说明:
 
 #### 平台级字典
@@ -33,13 +32,13 @@
 站在用户或数据字典使用方的角度来看数据字典有三层:平台级字典,集团级字典,项目级字典
 类型相同或信息点相同时项目级字典优先级最高,集团级次之,平台级字典最低,优先级高的会覆盖优先级低的
 
-使用数据字典时明确"使用的字典位于哪个层级"对需求的分析和理解会有很大帮
+使用数据字典时明确"使用的字典位于哪个层级"对需求的分析和理解会有很大帮
 
 集团级数据、集团方案、项目级数据是数据字典内部逻辑概念
 应用和服务应该关注的是项目级字典和应用订阅内容
 
 ```
-		
+
 
 ### 字段约定
 
@@ -118,9 +117,9 @@
 使用新的数据类型时,使用新的数据类型时,创建或编辑信息点需要明确指出数据类型、动静分类、是否复数、是否区间、长度(可选)、取值区间(可选)、格式(可选)
 Tree、Topology、Route、Function四种类型不再支持(有需求再加回来)
 
-动静分类(静态、脉冲、时序、阶段)应该是信息点的一个分类,不是数据类型的属性,放在这里是为了更直观更容易理解
+动静分类(静态 STATIC、脉冲 PULSE、时序 SEQUENTIAL、阶段 GRADATION)应该是信息点的一个分类,不是数据类型的属性,放在这里是为了更直观更容易理解
 根据动静分类区分动态量或静态量,静态量的值存储的是具体的数据,动态量的值存储的是表号-功能号,动态量包括脉冲量、时序量和阶段量
-根据是否区间来判断存储的值是具体值还是区间, 比如INT非区间的值12, 区间值[8, 15],为了区分开闭区间,这里实际存储为{$gt: 12, $lte: 15}, 其中$gt大于,$lt小于,$gte大于等于,$lte小于等于
+根据是否区间来判断存储的值是具体值还是区间, 比如INTEGER非区间的值12, 区间值[8, 15],为了区分开闭区间,这里实际存储为{$gt: 12, $lte: 15}, 其中$gt大于,$lt小于,$gte大于等于,$lte小于等于
 根据是否复数区分存储的值是单个值还是多个值,单个值存储形式为xxx,多个值存储形式为[xxx, yyy],如果同时是复数和区间,存储的是多个区间
 取值区间可以约束值的取值范围,可以通过取值区间做一次校验,如果是区间值,区间也应该是在取值区间的内部
 统一用DATETIME表示日期和时间,通过格式设定具体存储的内容,格式由数据字典进行维护,物理世界存储的数据严格符合格式
@@ -669,4 +668,222 @@ POST: /req/query
 |                         |        |                                      |      |
 |                         |        |                                      |      |
 
+#### 基础接口:批量添加应用订阅信息
+
+请求地址
+
+```
+POST: /app/funcid/add?groupId=SN&projectId=Pj01&app=test&classCode=project
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |   备注   |
+| --------- | --------------------------------------- | ---- |
+| classCode   | 类型编码                                | 必填 |
+| groupId   | 集团id                                  | 必填 |
+| projectId | 项目id                                  | 必填 |
+| app     | 应用id| 必填 |
+| json参数          |信息点列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+
+#### 基础接口:批量删除应用订阅信息
+
+请求地址
+
+```
+POST: /app/funcid/remove?groupId=SN&projectId=Pj01&app=test&classCode=project
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |   备注   |
+| --------- | --------------------------------------- | ---- |
+| classCode   | 类型编码                                | 必填 |
+| groupId   | 集团id                                  | 必填 |
+| projectId | 项目id                                  | 必填 |
+| app     | 应用id| 必填 |
+| json参数          |信息点列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+
+#### 基础接口:批量添加应用订阅类型
+
+请求地址
+
+```
+POST: /app/class/add?groupId=SN&projectId=Pj01&app=test
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |  备注    |
+| --------- | --------------------------------------- | ---- |
+| groupId   | 集团id                                  | 必填 |
+| projectId | 项目id                                  | 必填 |
+| app     | 应用id| 必填 |
+| json参数          |类型列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+#### 基础接口:批量删除应用订阅类型
+
+请求地址
+
+```
+POST: /app/class/remove?groupId=SN&projectId=Pj01&app=test
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |   备注   |
+| --------- | --------------------------------------- | ---- |
+| groupId   | 集团id                                  | 必填 |
+| projectId | 项目id                                  | 必填 |
+| app     | 应用id| 必填 |
+| json参数          |类型列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+
+
+#### 基础接口:批量添加方案订阅信息
+
+请求地址
+
+```
+POST: /scheme/funcid/add?schemeId=test&classCode=project
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |  备注    |
+| --------- | --------------------------------------- | ---- |
+| classCode   | 类型编码                                | 必填 |
+| schemeId     | 方案id| 必填 |
+| json参数          |信息点列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+
+#### 基础接口:批量删除方案订阅信息
+
+请求地址
+
+```
+POST: /scheme/funcid/remove?projectId=Pj01&schemeId=test&classCode=project
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |   备注   |
+| --------- | --------------------------------------- | ---- |
+| classCode   | 类型编码                                | 必填 |
+| projectId | 项目id                                  | 必填 |
+| schemeId     | 方案id| 必填 |
+| json参数          |信息点列表                                         |  列表size大于0    |
+
+返回参数
 
+```
+{
+    "result": "success"
+}
+```
+
+#### 基础接口:批量添加方案订阅类型
+
+请求地址
+
+```
+POST: /scheme/class/add?schemeId=test
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |   备注   |
+| --------- | --------------------------------------- | ---- |
+| schemeId     | 方案id| 必填 |
+| json参数          |类型列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```
+#### 基础接口:批量删除方案订阅类型
+
+请求地址
+
+```
+POST: /scheme/class/romove?schemeId=test
+```
+
+请求参数
+```json
+["ProjUnderArea","Group"]
+```
+
+| 参数名    | 说明                                    |    备注  |
+| --------- | --------------------------------------- | ---- |
+| schemeId     | 方案id| 必填 |
+| json参数          |类型列表                                         |  列表size大于0    |
+
+返回参数
+
+```
+{
+    "result": "success"
+}
+```

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

@@ -26,7 +26,8 @@ const content = [
                     ["/dev/saga-graphy/scene-manage/items/text", "文本"],
                     ["/dev/saga-graphy/scene-manage/items/image", "图片"],
                     ["/dev/saga-graphy/scene-manage/items/editLine", "可编辑直线"],
-                    ["/dev/saga-graphy/scene-manage/items/edit-polygon", "可编辑多边形示例"],
+                    ["/dev/saga-graphy/scene-manage/items/editPolyline", "可编辑折线"],
+                    ["/dev/saga-graphy/scene-manage/items/editPolygon", "可编辑多边形示例"],
                     ["/dev/saga-graphy/scene-manage/items/imgText", "图例item(图片文本组合)"]
                 ]
             },

+ 2 - 4
docs/dev/saga-graphy/scene-manage/items/editLine.md

@@ -6,10 +6,8 @@
 <example-web-graph-scene-SEditLine/>
 
 ::: tip 注
-1、可以通过双击table在编辑状态和展示状态来回切换,<br/>
-2、创建状态时;enter + 左键闭合多边形 <br/>
-3、编辑状态时:鼠标点击在边上可加点,可拖动点;<br/>
-4、编辑状态时:通过ALT键 + 鼠标左键 删除顶点
+1、可以通过双击直线在编辑状态和展示状态来回切换,<br/>
+2、编辑状态时:鼠标点击在直线端点上,可拖动点;<br/>
 :::
 
 ::: details 查看代码

docs/dev/saga-graphy/scene-manage/items/edit-polygon.md → docs/dev/saga-graphy/scene-manage/items/editPolygon.md


+ 15 - 0
docs/dev/saga-graphy/scene-manage/items/editPolyline.md

@@ -0,0 +1,15 @@
+# 可编辑折线示例
+
+<example-web-graph-scene-PolylineItem/>
+
+::: tip 注
+1、enter完成创建 <br/>
+2、双击折线附近,进入编辑态;再次双击进入查看态 <br/>
+3、编辑态时:点击点附近更改点位置 <br/>
+4、编辑状态时:通过ALT键 + 鼠标左键 删除顶点
+:::
+
+
+::: details 查看代码
+<<< @/docs/.vuepress/components/example/web/graph/scene/PolylineItem.vue
+:::

+ 4 - 4
package.json

@@ -12,10 +12,10 @@
     "publish": "node publish.js"
   },
   "dependencies": {
-    "@saga-web/base": "^2.1.9",
-    "@saga-web/big": "^1.0.24",
-    "@saga-web/draw": "^2.1.84",
-    "@saga-web/graph": "^2.1.67",
+    "@saga-web/base": "2.1.16",
+    "@saga-web/big": "1.0.29",
+    "@saga-web/draw": "2.1.86",
+    "@saga-web/graph": "2.1.72",
     "@saga-web/feng-map": "1.0.6",
     "axios": "^0.18.1",
     "element-ui": "^2.12.0",