Procházet zdrojové kódy

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

zhangyu před 4 roky
rodič
revize
35dd68d58b

+ 5 - 2
src/components/baseEditer.vue

@@ -397,7 +397,8 @@ export default {
                         GraphCategoryId: val.age.GraphCategoryId,
                         InfoSystemId: val.age.InfoSystemId?val.age.InfoSystemId:'',   //信息工程话分类ID分类
                         FID: t.data.SourceId,
-                        InfoTypeId:val.age.InfoTypeId.length? val.age.InfoTypeId :[]
+                        InfoTypeId:val.age.InfoTypeId.length? val.age.InfoTypeId :[],
+                        InfoLocal:val.age.InfoLocal.length ?val.age.InfoLocal :[]
                     },
                   };
                   const item = new SImageLegendItem(null, data)
@@ -428,6 +429,7 @@ export default {
                     SubType: "",
                     Properties: {
                       IconUrl: '/serve/topology-wanda/Picture/query/' + val.age.Url,
+                      InfoSystemId: val.age.InfoSystemId?val.age.InfoSystemId:'',   //信息工程话分类ID分类
                       StrokeColor: val.age.Color,
                       FillColor: val.age.FillColor,
                       LineDash: val.age.LineDash,
@@ -435,7 +437,8 @@ export default {
                       color: "",
                       TextPos: { X: 0, Y: 0},
                       FID: t.data.SourceId,
-                      InfoTypeId:val.age.InfoTypeId.length? val.age.InfoTypeId :[]
+                      InfoTypeId:val.age.InfoTypeId.length? val.age.InfoTypeId :[],
+                      InfoLocal:val.age.InfoLocal.length ?val.age.InfoLocal :[]
                     },
                     Num: 1
                   };

+ 28 - 2
src/components/edit/attr_select.vue

@@ -300,7 +300,7 @@
         </a-collapse-panel>
       </a-collapse>
     </div>
-    <editDialog ref="dialog" :attrCards="attrCards" :sysNum="imageNum" :key="new Date().getTime()" />
+    <editDialog ref="dialog" :attrCards="attrCards" :getmajorId="getmajorId"  :sysNum="imageNum" :key="new Date().getTime()" />
     <!--    <editDialog ref="dialog" :typeEdit="2" :getmajorId="'1001'" :sysNum="5" />-->
   </div>
 </template>
@@ -511,13 +511,39 @@ export default {
       console.log('------------')
       console.log(FENGMAP)
       const Item = newval.itemList[0];
-      this.getmajorId = Item.data.Properties.InfoSystemId;
       this.imageNum = 1; //切换item初始化
       if (Item.data && Item.data.SubType) {
         this.SubType = Item.data.SubType;
       } else {
         this.SubType = "";
       }
+      this.getmajorId = Item.data.Properties.InfoSystemId;
+      //判断点 面 带回专业类
+      // let InfoTypeIdArr = [];
+      // if( Item.data.Properties.InfoTypeId.length){
+      //   let InfoTypeId = Item.data.Properties.InfoTypeId;
+      //   console.log('poiList',11111111111111,FENGMAP.poiList);
+      //   console.log('spaceType',2222222222222222,FENGMAP.spaceType);
+      //   if(FENGMAP.poiList.length){
+      //     FENGMAP.poiList.join(',').split(',').map((item,index)=>{
+      //       let n = InfoTypeId.includes(item)
+      //       if(n){
+      //         InfoTypeIdArr.push(item);
+      //       }
+      //     })
+      //   }else if(FENGMAP.spaceType.length){
+      //     FENGMAP.spaceType.join(',').split(',').map((item,index)=>{
+      //       let n = InfoTypeId.includes(item)
+      //       if(n){
+      //         InfoTypeIdArr.push(item);
+      //       }
+      //     })
+      //   }else{
+      //     this.getmajorId = '';
+      //   }
+      // }
+      // InfoTypeIdArr.length? this.getmajorId = InfoTypeIdArr[0]:this.getmajorId ='';
+      //结束
 
       if (newval.itemList.length == 1) {
         if (newval.itemType == "baseText") {

+ 16 - 8
src/components/edit/edit-dialog.vue

@@ -12,7 +12,7 @@
       <div class="left">
         <div class="header">
           <div class="select">
-            <a-select style="width: 236px;margin: 0 10px" >
+            <a-select style="width: 236px;margin: 0 10px"  :default-value="majorId">
               <a-select-opt-group>
                 <span slot="label">设备设施</span>
                 <a-select-option v-for="item in majorList" :value="item.id" @click="handleChange(item)">
@@ -87,7 +87,13 @@
         components: {searchTree},
       props:{
         sysNum:Number ,//设备总数
-        attrCards:Array
+        attrCards:Array,
+        getmajorId:String
+      },
+      computed:{
+        majorId(){
+          return this.getmajorId || ''
+        }
       },
         data() {
             return {
@@ -193,9 +199,9 @@
                 },1000);
             },
             handleCancel(e) {
-                this.visible = false;
+              this.visible = false;
               let arr = [];
-              let lists = [];
+              const lists = [];
               console.log(this.selectList);
               arr = JSON.parse(JSON.stringify( this.selectList))
               arr.map(item =>{
@@ -455,6 +461,11 @@
         },
         created() {
           this.floorId = getUrlMsg().FloorID;
+          //如果有专业就带过来
+          console.log(this.getmajorId);
+          if(this.getmajorId){
+            this.getQuerySmsxtBy(this.getmajorId,'Image')
+          }
           if(this.attrCards.length){
             this.attrCards.map(item=>{
               this.selectedRowKeys.push(item.location||item.assetnum)
@@ -465,10 +476,7 @@
             this.selectedRowKeys = [];
           }
           this.getQuerySmsxt();
-          // //如果有专业就带过来
-          // if(this.majorId){
-          //   this.getQuerySmsxtBy(this.majorId)
-          // }
+
           this.getPlazaFloor();
 
         }

+ 18 - 10
src/components/edit/left_toolbar.vue

@@ -90,7 +90,7 @@
               <div class="btn-list">
                 <Tabs
                   type="card"
-                  v-show="showDrawerItem.type == 'Zone'"
+                  v-if="showDrawerItem.type == 'Zone'"
                   :data="tabData"
                   v-model="tabActive"
                 />
@@ -435,13 +435,16 @@ export default {
         this.showDrawer(this.showDrawerItem);
       }
     },
-    tabActive(val) {
-      this.changeDrawType(val);
+    tabActive: {
+      handler: function(val) {
+        this.changeDrawType(val);
+      },
+      immediate: true
     }
   },
   mounted() {
     const ele = document.getElementById("drawer-model");
-    ele.style.width = "256px";
+    ele.style.width = "270px";
     this.getBus();
   },
   created() {
@@ -464,6 +467,7 @@ export default {
     });
     this.categoryId = obj.categoryId;
     this.categoryIdS.push(obj.categoryId);
+    this.categoryId;
   }
 };
 </script>
@@ -476,6 +480,10 @@ export default {
 }
 /deep/ .ant-drawer-body {
   height: 100% !important;
+  padding: 12px;
+}
+/deep/ .ant-drawer-content-wrapper{
+  width: 270px !important;
 }
 #left_toolbar {
   min-width: 80px;
@@ -633,7 +641,7 @@ export default {
           display: flex;
           flex-wrap: wrap;
           li {
-            width: 67px;
+            width: 82px;
             height: 60px;
             display: flex;
             justify-content: center;
@@ -646,13 +654,13 @@ export default {
               border-radius: 5px;
             }
             .item {
-              width: 54px;
-              height: 32px;
+              width: 30px;
+              height: 22px;
               margin: 0 auto;
             }
             .item-Image {
-              width: 28px;
-              height: 28px;
+              width: 18px;
+              height: 18px;
               margin: 0 auto;
             }
             .item-Line {
@@ -669,7 +677,7 @@ export default {
             }
             .text {
               width: 100%;
-              padding: 0 4px;
+              padding:6px 2px 0;
               font-size: 12px;
               text-align: center;
               overflow: hidden;

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

@@ -1,6 +1,6 @@
 import { SMouseEvent, SUndoStack } from "@saga-web/base";
 import { SGraphScene, SGraphLayoutType, SAnchorItem } from '@saga-web/graph/lib';
-import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem, ItemColor,Transparency } from "@saga-web/big";
+import { SFloorParser, SLineItem, SPolylineItem, SItemStatus, ItemOrder, STooltipItem, ItemColor,Transparency, SPolygonItem } from "@saga-web/big";
 import { SGraphItem, SLineStyle, SGraphPropertyCommand, SImageItem, STextItem, SGraphPointListInsert, SGraphPointListDelete, SGraphPointListUpdate, SGraphAddCommand } from "@saga-web/graph/lib";
 import { SGraphAddListCommand } from "./SGraphAddListCommand"
 import { SGraphDeleteCommand } from "./SGraphDeleteCommand"
@@ -55,7 +55,7 @@ export class EditScence extends SGraphScene {
         }
     };
     /** 绘制区域时 是否为点选   */
-    isSelecting: boolean = false;
+    isSelecting: boolean = true;
 
     /** 是否开启吸附  */
     isAbsorbing: boolean = false;
@@ -279,7 +279,9 @@ export class EditScence extends SGraphScene {
                 font: 0,
                 color: '',
                 TextPos: { X: 0, Y: 0 },
-                InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]
+                InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
+                InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'',
+                InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
             },
         }
         let Polylines = null;
@@ -335,7 +337,9 @@ export class EditScence extends SGraphScene {
                     color: '',
                     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 :[]
+                    InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],
+                    InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'',
+                    InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
                 },
             }
             let Polylines = null;
@@ -431,7 +435,6 @@ export class EditScence extends SGraphScene {
      */
     addIconItem(event: SMouseEvent): void {
         //获取信息工程化相关参数
-        const InfoSystemId = this._legend.InfoSystemId ? this._legend.InfoSystemId : '';
         const LegendData: Legend = {
             ID: uuid(),
             Name: this._legend.Name,
@@ -454,8 +457,9 @@ export class EditScence extends SGraphScene {
                 color: '',  //字体颜色
                 FrameColor: this._legend.FrameColor,
                 GraphCategoryId: this._legend.GraphCategoryId,
-                InfoSystemId: InfoSystemId,   //信息工程话分类ID分类
-                InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[]// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
+                InfoSystemId:this._legend.InfoSystemId ? this._legend.InfoSystemId :'' ,
+                InfoTypeId:this._legend.InfoTypeId.length? this._legend.InfoTypeId :[],// 铺位可视化Typeid(用于编辑工程信息化时默认问题)
+                InfoLocal:this._legend.InfoLocal.length ?this._legend.InfoLocal :[]
             },
         }
         const item = new SImageLegendItem(null, LegendData);
@@ -598,8 +602,11 @@ export class EditScence extends SGraphScene {
             let p = this.focusItem.mapFromScene(x, y)
             // newx - oldx = newleft - oldleft
             // 要求的值(新的x坐标) - 旧的x坐标 = 新的左边界(用户输入的值) - 旧的左边界
-            this.focusItem.x = p.x - this.focusItem.boundingRect().left + this.focusItem.x;
-            this.focusItem.y = p.y - this.focusItem.boundingRect().top + this.focusItem.y;
+            this.focusItem.x = (p.x - this.focusItem.boundingRect().left)*this.focusItem.inverseScale + this.focusItem.x;
+            this.focusItem.y = (p.y - this.focusItem.boundingRect().top)*this.focusItem.inverseScale + this.focusItem.y;
+            if(this.focusItem instanceof SPolylineItem || this.focusItem instanceof SPolygonItem || this.focusItem instanceof SLineItem){
+                this.focusItem.moveToOrigin(this.focusItem.x, this.focusItem.y)
+            }
         }
     }
 

+ 4 - 4
src/views/drafts.vue

@@ -89,6 +89,7 @@ import { uuid } from "@/components/mapClass/until";
 import { SImageItem } from "@saga-web/graph/lib";
 import store from "../store";
 import { Loading } from "element-ui";
+import {getUrlMsg}  from '@/components/urlMsg.js'
 let fengmap = null;
 export default {
   components: { Tree },
@@ -360,16 +361,15 @@ export default {
         projectId: this.projectId,
         flag: true,
         graphId: this.graphId,
-        pub: false
+        pub: false,
+        categoryId:getUrlMsg().categoryId
       }).then(res => {
         console.log(res);
         this.legendLoading = false;
         if (res.data.Result == "success") {
           const data = res.data.Data;
           data.map(item => {
-            if (item.RealNum == 0) {
-              this.legendData.push(item);
-            }
+            this.legendData.push(item);
           });
         } else {
           this.legendData = [];