Przeglądaj źródła

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

zhangyu 4 lat temu
rodzic
commit
370cdb2ade

+ 7 - 7
src/components/baseEditer.vue

@@ -27,7 +27,7 @@ import store from "../store";
 import { Loading } from "element-ui";
 import { Message } from "element-ui";
 import { SCircleItem } from "@/lib/items/SCircleItem"
-let fengmap = null;
+window.FENGMAP = null;
 //// 底图空间增加字段 isExtracted:boolean true 已被提取过
 export default {
   props: {
@@ -103,7 +103,7 @@ export default {
       document.getElementById(`canvas`).focus();
       this.clearGraphy();
       this.scene = new EditScence();
-      fengmap = new SFengParser(
+      window.FENGMAP = new SFengParser(
         "fengMap",
         this.mapServerURL + "/fmap/" + this.urlMsg.fmapID,
         this.key,
@@ -112,9 +112,9 @@ export default {
         this.mapthemeUrl
       );
       const floorid = this.urlMsg.FloorID;
-      fengmap.loadMap(this.urlMsg.fmapID, resp => {
+      window.FENGMAP.loadMap(this.urlMsg.fmapID, resp => {
         this.floorList = resp;
-        fengmap
+        window.FENGMAP
           .loadTheme(
             `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${this.urlMsg.fmapID}.theme`
           )
@@ -134,10 +134,10 @@ export default {
     parserData(floor) {
       if (floor == "g80") {
         // 屋顶
-        if (fengmap.frImg) {
+        if (window.FENGMAP.frImg) {
           const imgItem = new SImageItem(
             null,
-            `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${fengmap.frImg}`
+            `${this.mapServerURL}/webtheme/${this.urlMsg.fmapID}/${window.FENGMAP.frImg}`
           );
           this.scene.addItem(imgItem);
           this.view.scene = this.scene;
@@ -147,7 +147,7 @@ export default {
         }
       } else {
         if (this.floorList[floor]) {
-          fengmap.parseData(this.floorList[floor], res => {
+          window.FENGMAP.parseData(this.floorList[floor], res => {
             if (res.err) {
               console.log(res.err);
               return;

+ 11 - 1
src/components/edit/attr_select.vue

@@ -159,7 +159,7 @@
           <!-- 防火分区 -->
           <div class="row-tit">颜色</div>
           <div class="row">
-            <swatches @input="changefillColor" :swatches="swatchess" v-model="fillColor" inline></swatches>
+            <swatches @input="fhfqchangefillColor" :swatches="swatchess" v-model="fillColor" inline></swatches>
           </div>
           <div class="row">
             <div class="row-tit">名称显示</div>
@@ -479,11 +479,19 @@ export default {
       }
       bus.$emit("changeImageNum", this.imageNum);
     },
+    // 石材铺装
     changefillColor() {
       if (this.fillColor) {
         bus.$emit("changefillColor", this.fillColor);
       }
     },
+    // 防火分区
+    fhfqchangefillColor() {
+      if (this.fillColor) {
+        bus.$emit("changeBorderColor", this.fillColor);
+        bus.$emit("changefillColor", this.fillColor);
+      }
+    },
     //设置缩小item为编辑状态
     OpenEditStatus() {
       bus.$emit("OpenEditStatus");
@@ -499,6 +507,8 @@ export default {
   },
   watch: {
     focusItemList: function(newval) {
+      console.log('------------')
+      console.log(FENGMAP)
       const Item = newval.itemList[0];
       this.getmajorId = Item.data.Properties.InfoSystemId;
       this.imageNum = 1; //切换item初始化

+ 48 - 39
src/components/edit/left_toolbar.vue

@@ -43,7 +43,6 @@
     <div class="border-line"></div>
     <!--    提取-->
     <ul class="list-2 border-top">
-
       <li
         v-on:mouseout="mouseoutActive(item)"
         v-on:mouseover="mouseoverActive(item)"
@@ -89,7 +88,12 @@
           <a-spin :spinning="spinning">
             <div class="drawer-model-body" v-if="!isExtract">
               <div class="btn-list">
-                <Tabs type="card"  v-show="showDrawerItem.type == 'Zone'" :data="tabData" v-model="tabActive"/>
+                <Tabs
+                  type="card"
+                  v-show="showDrawerItem.type == 'Zone'"
+                  :data="tabData"
+                  v-model="tabActive"
+                />
               </div>
               <div class="list" v-for="(item,index) in itemList" :key="index">
                 <div class="title">{{item.Name}}</div>
@@ -125,7 +129,10 @@
                   </div>
                 </template>
                 <template slot="address" slot-scope="text, record, index">
-                  <div style="color:#0091FFFF;cursor:pointer;" @click="pickUp(text, record, index)">{{ text }}</div>
+                  <div
+                    style="color:#0091FFFF;cursor:pointer;"
+                    @click="pickUp(text, record, index)"
+                  >{{ text }}</div>
                 </template>
               </a-table>
             </div>
@@ -137,7 +144,7 @@
 </template>
 <script>
 import itemTree from "./leftbar_components/itemTree";
-import { graphElementGroup, graphElementSearch} from "@/api/editer.js";
+import { graphElementGroup, graphElementSearch } from "@/api/editer.js";
 import bus from "@/bus";
 import { queryGroup } from "@/api/editer.js";
 import { mapState, mapActions } from "vuex";
@@ -257,11 +264,11 @@ export default {
       drawerVisible: false,
       spinning: false,
       showDrawerItem: {},
-      tabData:[
-        {name: '绘制', id:'draw'},
-        {name: '点选', id:'select' }
+      tabData: [
+        { name: "绘制", id: "draw" },
+        { name: "点选", id: "select" }
       ],
-      tabActive:'select'
+      tabActive: "select"
     };
   },
   computed: {
@@ -339,14 +346,16 @@ export default {
         a.isChoice = false;
       });
     },
-    getexampleItem(item,indexs,index) {
-      if(this.showDrawerItem.type == 'Zone'){
-  //       if(item.SubType == "SCPZ" || item.SubType == "SCPZ" ){
-  //  {name: '绘制', id:'draw'},
-  //       {name: '点选', id:'select' }
-  //       }else{
-
-  //       }
+    getexampleItem(item, indexs, index) {
+      if (this.showDrawerItem.type == "Zone") {
+        if (
+          (item.SubType && item.SubType == "SCPZ") ||
+          (item.SubType && item.SubType == "FHFQ")
+        ) {
+          this.tabActive = "draw"; //
+        } else {
+          this.tabActive = "select";
+        }
       }
       this.activeIndex = index;
       this.activeIndexs = indexs;
@@ -386,18 +395,18 @@ export default {
               InfoTypeIds: [t.key],
               PageSize: 1000,
               Type: t.type
-            }
-            this.spinning = true
+            };
+            this.spinning = true;
             graphElementSearch(pa).then(res => {
-              this.spinning = false
+              this.spinning = false;
               if (res.Content && res.Content.length) {
                 t.age = res.Content[0];
-                t.name = this.TypeIdToGraphElement[t.key].Name
-                t.properties = this.TypeIdToGraphElement[t.key]
-                this.data.push(t)
+                t.name = this.TypeIdToGraphElement[t.key].Name;
+                t.properties = this.TypeIdToGraphElement[t.key];
+                this.data.push(t);
               }
-            })
-          })
+            });
+          });
         }
       });
     },
@@ -417,8 +426,8 @@ export default {
           item.isChoice = true;
         }
       });
-      if(cmd == "choice"){
-           this.activeIndex = -1;
+      if (cmd == "choice") {
+        this.activeIndex = -1;
       }
     },
     drawerVisible(val) {
@@ -426,8 +435,8 @@ export default {
         this.showDrawer(this.showDrawerItem);
       }
     },
-    tabActive(val){
-      this.changeDrawType(val)
+    tabActive(val) {
+      this.changeDrawType(val);
     }
   },
   mounted() {
@@ -616,7 +625,7 @@ export default {
           text-indent: 8px;
           height: 20px;
           line-height: 20px;
-          color: #1F2329;
+          color: #1f2329;
           margin-bottom: 12px;
         }
         .example {
@@ -661,7 +670,7 @@ export default {
               font-size: 12px;
               text-align: center;
               overflow: hidden;
-              text-overflow:ellipsis;
+              text-overflow: ellipsis;
               white-space: nowrap;
             }
           }
@@ -671,16 +680,16 @@ export default {
         }
       }
     }
-    /deep/ .edit-drawer .ant-drawer-body{
+    /deep/ .edit-drawer .ant-drawer-body {
       padding: 0;
-      .ant-table-small{
+      .ant-table-small {
         border-left: none;
         border-right: none;
         border-radius: 0;
       }
-      .ant-table-small > .ant-table-content > .ant-table-body{
+      .ant-table-small > .ant-table-content > .ant-table-body {
         margin: 0;
-        .ant-table-thead{
+        .ant-table-thead {
           font-size: 12px;
         }
       }
@@ -690,14 +699,14 @@ export default {
       position: absolute;
       left: 0;
       right: 0;
-      /deep/ .ant-table-thead tr th{
+      /deep/ .ant-table-thead tr th {
         background: #f8f9fa;
       }
-      .exportImg.item-Zone{
+      .exportImg.item-Zone {
         width: 28px;
         height: 16px;
       }
-      .exportImg.item-Image{
+      .exportImg.item-Image {
         width: 20px;
         height: 20px;
       }
@@ -709,10 +718,10 @@ export default {
   .border-top {
     /*border-top: 1px solid #c3c7cb;*/
   }
-  .border-line{
+  .border-line {
     width: 48px;
     height: 2px;
-    background: #C3C7CB ;
+    background: #c3c7cb;
     margin: 0 auto;
   }
 }

+ 4 - 0
src/components/mapClass/EditScence.ts

@@ -1228,6 +1228,7 @@ export class EditScence extends SGraphScene {
         let minAnchor = null;
         let len: number = -1;
         this.Nodes.forEach(image => {
+            image.showAnchor = false;
             if (image.anchorList && image.anchorList.length) {
                 image.anchorList.forEach(anchor => {
                     let anchorPoint = anchor.mapToScene(0, 0);
@@ -1250,6 +1251,9 @@ export class EditScence extends SGraphScene {
         console.log('-----------------------')
         console.log(minAnchor)
         console.log('-----------------------')
+        if (minAnchor&&minAnchor.parent) {
+            minAnchor.parent.showAnchor = true
+        }
         return minAnchor;
     }