Procházet zdrojové kódy

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

YaolongHan před 4 roky
rodič
revize
e53843f540

+ 1 - 1
package.json

@@ -9,7 +9,7 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.22",
-    "@saga-web/big": "1.0.78",
+    "@saga-web/big": "1.0.79",
     "@saga-web/draw": "2.1.100",
     "@saga-web/feng-map": "1.0.23",
     "@saga-web/graph": "2.1.108",

+ 12 - 12
src/components/baseEditer.vue

@@ -90,7 +90,7 @@ export default {
     // 自动保存(时间差为一分钟)
     this.autoSave = setInterval(() => {
       this.saveMsgNoMessage();
-    }, 6000);
+    }, 60000);
   },
   methods: {
     init() {
@@ -190,9 +190,9 @@ export default {
     // 读取绘制数据
     readGraph() {
       this.readGroup().then(data => {
-        this.graphId = data.Data[0].ID;
-        bus.$emit("setGraphId", this.graphId);
         if (data.Data) {
+          this.graphId = data.Data[0].ID;
+          bus.$emit("setGraphId", this.graphId);
           const parserData = new STopologyParser(null);
           const itemMap = {};
           parserData.parseData(data.Data[0].Elements);
@@ -266,14 +266,14 @@ export default {
               t.endAnchor = endAnc || null;
             }
           });
-          this.view.fitSceneToView();
-            // 设置初始化缩放比例
-          this.initScale = this.view.scale;
-          this.view.maxScale = this.initScale * 10;
-          this.view.minScale = this.initScale / 10;
-          bus.$emit("initScale", this.view.scale);
-          bus.$emit("elementDataChange", this.scene);
         }
+        this.view.fitSceneToView();
+          // 设置初始化缩放比例
+        this.initScale = this.view.scale;
+        this.view.maxScale = this.initScale * 10;
+        this.view.minScale = this.initScale / 10;
+        bus.$emit("initScale", this.view.scale);
+        bus.$emit("elementDataChange", this.scene);
         this.loadings.close()
       });
     },
@@ -401,8 +401,8 @@ export default {
                         Num: 1, // 此num与信息工程化得num无关
                         sWidth: 32,  //icon 的宽
                         sHeight: 32,   //icon 的高
-                        font: 20,    //font
-                        color: '#646A73',  //字体颜色
+                        font: 14,    //font
+                        color: "#1F2429",  //字体颜色
                         GraphCategoryId: val.age.GraphCategoryId,
                         InfoSystemId: val.age.InfoSystemId?val.age.InfoSystemId:'',   //信息工程话分类ID分类
                         FID: t.data.SourceId,

+ 13 - 10
src/components/edit/attr_select.vue

@@ -576,18 +576,9 @@ export default {
           newval.itemType == "Line" ||
           newval.itemType == "Image"
         ) {
-          this.lengedName = Item.name;
-          this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
-          this.fillColor = Item.fillColor ? Item.fillColor.value : "";
-          this.itemExplain = "";
-          if (Item.data.Properties.ItemExplain) {
-            this.itemExplain = Item.data.Properties.ItemExplain
-              ? Item.data.Properties.ItemExplain
-              : "";
-          }
-
           if (newval.itemType == "Image") {
             this.imageNum = Item.num;
+            this.lengedName = Item.name;
             this.color = Item.color.value;
             this.fontSize = Item.font.size;
           } else if (newval.itemType == "Line") {
@@ -595,6 +586,18 @@ export default {
             this.fillColor = Item.fillColor.value;
             this.borderColor = Item.strokeColor.value;
             this.lineWidth = Item.lineWidth;
+          } else if (newval.itemType == "Zone") {
+            this.lengedName = Item.name;
+            this.fontSize = Item.font.size;
+            this.fontColor = Item.color.value;
+            this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
+            this.fillColor = Item.fillColor ? Item.fillColor.value : "";
+            this.itemExplain = "";
+            if (Item.data.Properties.ItemExplain) {
+              this.itemExplain = Item.data.Properties.ItemExplain
+                ? Item.data.Properties.ItemExplain
+                : "";
+            }
           }
         }
       }

+ 5 - 0
src/components/edit/right_toolbar.vue

@@ -325,6 +325,11 @@ li {
           display: inline-block;
           vertical-align: top;
           line-height: 38px;
+          width: calc(100% - 45px);
+          height: 100%;
+          overflow: hidden;
+          white-space: nowrap;
+          text-overflow: ellipsis;
         }
         &:hover {
           background: #f5f6f7;

+ 10 - 10
src/components/mapClass/EditScence.ts

@@ -276,8 +276,8 @@ export class EditScence extends SGraphScene {
                 FillColor: this._legend.FillColor,
                 LineDash: this._legend.LineDash,
                 LineWidth: this._legend.LineWidth,
-                font: 20,
-                color: '#646A73',
+                font: 14,
+                color: "#1F2429",
                 TextPos: { X: 0, Y: 0 },
                 InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
                 InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'',
@@ -332,8 +332,8 @@ export class EditScence extends SGraphScene {
                     FillColor: this._legend.FillColor,
                     LineDash: this._legend.LineDash,
                     LineWidth: this._legend.LineWidth,
-                    font: 20,
-                    color: '#646A73',
+                    font: 14,
+                    color: "#1F2429",
                     FID: item.data.SourceId,
                     TextPos: { X: item.data.Location.Points[0].X, Y: -item.data.Location.Points[0].Y },
                     InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
@@ -353,7 +353,7 @@ export class EditScence extends SGraphScene {
             //设置状态
             Polylines.status = SItemStatus.Normal;
             this.addItem(Polylines);
-            this.Nodes.push(Polylines);
+            // this.Nodes.push(Polylines);
             this.finishCreated(Polylines)
             this.focusItem = Polylines;
             this.scenceUpdate(this);
@@ -410,9 +410,9 @@ export class EditScence extends SGraphScene {
             Properties: {
                 IconUrl: require(`../../assets/images/t-text-hover.png`),
                 Text: '请在右侧属性栏输入文字!',
-                Color: '#646A73',
-                Font: 20,
-                BackgroundColor: '#f7f9fa'
+                Color: "#646C73",
+                Font: 14,
+                BackgroundColor: "#f7f9facc"
             }
         }
         const item = new STextMarkerItem(null, data);
@@ -452,8 +452,8 @@ export class EditScence extends SGraphScene {
                 Num: 1, // 此num与信息工程化得num无关
                 sWidth: 32,  //icon 的宽
                 sHeight: 32,   //icon 的高
-                font: 20,    //font
-                color: '#646A73',  //字体颜色
+                font: 16,    //font
+                color: '#1F2429',  //字体颜色
                 FrameColor: this._legend.FrameColor,
                 GraphCategoryId: this._legend.GraphCategoryId,
                 InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'' ,

+ 1 - 1
src/lib/items/SImageLegendItem.ts

@@ -99,7 +99,7 @@ export class SImageLegendItem extends SIconTextItem {
             this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
         } else {
             // 偏移二分之一文本高度
-            this.textItem.moveTo((this.img.width * 0.5) + 2, -(this.font.size * 0.5));
+            this.textItem.moveTo((this.img.width * 0.5), -(this.font.size * 1.25 * 0.5));
         }
         if (data.Properties && data.Properties.color) {
             this.color = new SColor(data.Properties.color);