zhangyu %!s(int64=4) %!d(string=hai) anos
pai
achega
c0db88bfae

+ 4 - 32
package-lock.json

@@ -1080,39 +1080,11 @@
       }
     },
     "@saga-web/feng-map": {
-      "version": "1.0.8",
-      "resolved": "http://192.168.200.80:8081/repository/npm-saga/@saga-web/feng-map/-/feng-map-1.0.8.tgz",
-      "integrity": "sha512-t43r0jYpaUu1Pa1g1Vbbzkqhw6kGX++VuDvEjduCjepNHNJXZFSlFjSwsTy5Zun1dtqMvXzKqThpWcIpEgtZjA==",
+      "version": "1.0.10",
+      "resolved": "http://192.168.200.80:8081/repository/npm-saga/@saga-web/feng-map/-/feng-map-1.0.10.tgz",
+      "integrity": "sha512-TmalJ2Ka3B1z/aK1keD5E3drf4aRhdF3DEFqdZQ16qGIKnC6CXIlO3300iEKekbaqVxl3rBWTGrcHL/PrZZ0PQ==",
       "requires": {
-        "@saga-web/big": "1.0.35"
-      },
-      "dependencies": {
-        "@saga-web/big": {
-          "version": "1.0.35",
-          "resolved": "http://192.168.200.80:8081/repository/npm-saga/@saga-web/big/-/big-1.0.35.tgz",
-          "integrity": "sha512-0VMastxCUglX2mOgIfwJT2uPT9SaMiOwtYlk+J5HQJf1ANwhWkgtYmQ0FPLL0v8l+QhX601iKCQsrZ8UsLagFg==",
-          "requires": {
-            "@saga-web/graph": "2.1.78"
-          }
-        },
-        "@saga-web/graph": {
-          "version": "2.1.78",
-          "resolved": "http://192.168.200.80:8081/repository/npm-saga/@saga-web/graph/-/graph-2.1.78.tgz",
-          "integrity": "sha512-pnNMSY+zy2QuHsMaSTdJs0qVcyuq6yToCGYhpKrLQF4tCcjuaLnAnhvbUHm9Tv8XlWAGGtO8BlXDwOoHK0vxYA==",
-          "requires": {
-            "@saga-web/draw": "2.1.90"
-          },
-          "dependencies": {
-            "@saga-web/draw": {
-              "version": "2.1.90",
-              "resolved": "http://192.168.200.80:8081/repository/npm-saga/@saga-web/draw/-/draw-2.1.90.tgz",
-              "integrity": "sha512-KFICPt9qULAqQbMVXzdKAm/1iIUu0yA7qhJIzzmHrHfyRvofZAu/LVPBIOfNakrmZXkY5g+Bl3z0WboP6b1igg==",
-              "requires": {
-                "@saga-web/base": "^2.1.16"
-              }
-            }
-          }
-        }
+        "@saga-web/big": "1.0.39"
       }
     },
     "@saga-web/graph": {

+ 1 - 1
package.json

@@ -11,7 +11,7 @@
     "@saga-web/base": "2.1.19",
     "@saga-web/big": "1.0.39",
     "@saga-web/draw": "2.1.94",
-    "@saga-web/feng-map": "1.0.8",
+    "@saga-web/feng-map": "1.0.10",
     "@saga-web/graph": "2.1.81",
     "@saga-web/topology": "1.0.84",
     "ant-design-vue": "^1.6.0",

+ 3 - 0
src/components/baseEditer.vue

@@ -137,6 +137,9 @@ export default {
       bus.$on("deleiteItem", () => {
         this.scene.deleiteItem();
       });
+      bus.$on("changeAlignItem", (val) => {
+        this.scene.changeAlignItem(val);
+      });
       bus.$on("extractItem", () => {
         const map = {};
         this.fParser.spaceList.forEach(t => {

+ 7 - 3
src/components/edit/left_toolbar.vue

@@ -77,7 +77,7 @@
           @close="onClose"
           :getContainer="false"
         >
-          <div class="drawer-model-body">
+          <div class="drawer-model-body" v-if="!isExtract">
             <div class="btn-list">
               <a-button-group>
                 <a-button type="primary">绘制</a-button>
@@ -102,7 +102,7 @@
               </ul>
             </div>
           </div>
-          <div class="drawer-model-body drawer-model-body-extract">
+          <div v-else class="drawer-model-body drawer-model-body-extract">
             <a-table :columns="columns" :data-source="data" size="small" :pagination="false">
               <a-tag
                 slot="address"
@@ -164,7 +164,7 @@ export default {
   props: {
     cmdType: {
       type: String,
-      default: '',
+      default: "",
       required: false
     }
   },
@@ -242,6 +242,7 @@ export default {
           name: "提取" //类型
         }
       ],
+      isExtract: false, //是否为提取框
       data,
       columns,
       itemList: [] //图例数组
@@ -272,6 +273,7 @@ export default {
       this.$emit("setCmdType", item.type);
     },
     showDrawer(item) {
+      this.isExtract = false;
       if (item.isChoice) {
         this.systemChoice.forEach(a => {
           a.isChoice = false;
@@ -313,6 +315,8 @@ export default {
     },
     // 提取元素
     extractItem() {
+      // 打开提取元素列表
+      this.isExtract = true;
       this.visible = !this.visible;
       bus.$emit("extractItem");
     },

+ 85 - 10
src/components/edit/top_toolbar.vue

@@ -18,10 +18,29 @@
           <a-icon type="edit" />
           <span>重做</span>
         </li>-->
-        <li>缩放窗口</li>
-        <li @click="alignItem">
-          <img class="lock" :src="require(`./../../assets/images/t-format.png`)" alt />
-          <span>对齐</span>
+        <li class="zoom-window">
+          <div>
+            <img class="lock" :src="require(`./../../assets/images/缩小.png`)" alt />
+            <span class="percentage">100%</span>
+            <img class="lock" :src="require(`./../../assets/images/放大 amplification.png`)" alt />
+          </div>
+          <span>缩放窗口</span>
+        </li>
+        <li>
+          <a-dropdown :trigger="['click']">
+            <div class="ant-dropdown-link dropdown-flex" @click="e => e.preventDefault()">
+              <div>
+                <img class="lock" :src="require(`./../../assets/images/t-format.png`)" alt/>
+                <div>对齐</div>
+              </div>
+              <a-icon type="caret-down" class="down-icon"/>
+            </div>
+            <a-menu slot="overlay">
+              <a-menu-item v-for="item in alignmentOptions" :key="item.value" @click="changeAlignItem(item.value)">
+                {{item.label}}
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
         </li>
         <!-- <li>
           <a-icon type="edit" />
@@ -55,11 +74,46 @@
 </template>
 <script>
 import bus from "@/bus";
+import {SGraphLayoutType} from "@saga-web/graph/lib";
 export default {
   data() {
     return {
       isLock: false, //是否锁定
-      focusItem: null
+      focusItem: null,
+      alignmentOptions:[  //对齐数据
+        {
+          value:SGraphLayoutType.Left,
+          label:'左对齐'
+        },
+        {
+          value:SGraphLayoutType.Right,
+          label:'右对齐'
+        },
+        {
+          value:SGraphLayoutType.Top,
+          label:'顶对齐'
+        },
+        {
+          value:SGraphLayoutType.Bottom,
+          label:'底对齐'
+        },
+        {
+          value:SGraphLayoutType.Center,
+          label:'水平居中对齐'
+        },
+        {
+          value:SGraphLayoutType.Middle,
+          label:'垂直居中对齐'
+        },
+        {
+          value:SGraphLayoutType.Vertical,
+          label:'垂直分布'
+        },
+        {
+          value:SGraphLayoutType.Horizontal,
+          label:'水平分布'
+        }
+      ]
     };
   },
   methods: {
@@ -99,8 +153,8 @@ export default {
       }
     },
     // 对齐item
-    alignItem() {
-
+    changeAlignItem(val) {
+      bus.$emit("changeAlignItem",val);
     }
   },
   mounted() {
@@ -113,8 +167,8 @@ export default {
 <style lang="less" scoped>
 ul,
 li {
-  margin: 0;
-  padding: 0;
+  /*margin: 0;*/
+  /*padding: 0;*/
   list-style: none;
 }
 #top_toolbar {
@@ -139,7 +193,9 @@ li {
         display: flex;
         justify-content: center;
         flex-direction: column;
-        width: 48px;
+        /*width: 62px;*/
+        padding: 0 7px;
+        margin-left: 7px;
         font-size: 12px;
         align-items: center;
         text-align: center;
@@ -148,6 +204,25 @@ li {
           width: 16px;
           height: 16px;
         }
+        .percentage{
+          border-bottom: 1px solid #C3C7CB;
+          margin: 0 13px;
+          font-size: 14px;
+        }
+        .dropdown-flex{
+          display: flex;
+          align-items: center;
+          .down-icon{
+            margin-left: 12px;
+          }
+        }
+      }
+      li:hover{
+        background: #F5F6F7;
+      }
+      .zoom-window{
+        border-left:1px solid #8D9399;
+        border-right:1px solid #8D9399;
       }
     }
   }

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

@@ -1,11 +1,11 @@
-import {SMouseEvent, SUndoStack} from "@saga-web/base";
-import {SGraphAddCommand, SGraphItem, SGraphLayoutType, SGraphScene, SImageItem, STextItem} from '@saga-web/graph/lib';
-import {ItemOrder, SLineItem, SPolylineItem} from "@saga-web/big";
-import {SZoneLegendItem} from "@/lib/items/SZoneLegendItem";
-import {TipelineItem} from "@/lib/items/TipelineItem";
-import {SImgTextItem} from "@/lib/items/SImgTextItem"
-import {SFont, SPoint} from '@saga-web/draw/lib';
-import {SItemStatus} from "@saga-web/big/lib";
+import { SMouseEvent, SUndoStack } from "@saga-web/base";
+import { SGraphScene, SGraphLayoutType } from '@saga-web/graph/lib';
+import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder } from "@saga-web/big";
+import { SGraphItem, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
+import { SZoneLegendItem } from "@/lib/items/SZoneLegendItem";
+import { TipelineItem } from "@/lib/items/TipelineItem";
+import { SImgTextItem } from "@/lib/items/SImgTextItem"
+import { SPoint, SFont } from '@saga-web/draw/lib';
 
 
 /**
@@ -337,7 +337,8 @@ export class EditScence extends SGraphScene {
      * @param v
      */
     changeAlignItem(v: any): void {
-        this.selectContainer.layout(SGraphLayoutType.v);
+        console.log(v);
+        this.selectContainer.layout(v);
     }
 
     /**

+ 4 - 4
vue.config.js

@@ -6,12 +6,12 @@ module.exports = {
             errors: false
         },
         proxy: {
-            "/wanda": {
-                target: "http://map.wanda.cn/editor/fmap/1001724_29",
+            '/wdfn': {
+                target: 'http://map.wanda.cn',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/wanda": ""
-                }
+                    '^/wdfn': '/editor/fmap',
+                },
             },
             "/serve": {
                 target: 'http://192.168.200.87:8088/',