Browse Source

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

haojianlong 5 years ago
parent
commit
ab07f5af91

+ 2 - 1
src/components/baseEditer.vue

@@ -567,7 +567,8 @@ export default {
                         : [],
                       InfoLocal: val.age.InfoLocal.length
                         ? val.age.InfoLocal
-                        : []
+                        : [],
+                      lengendName: this._legend.Name, //图例名称
                     },
                     Num: 1
                   };

+ 244 - 107
src/components/edit/attr_select.vue

@@ -32,7 +32,7 @@
             :label="item.src"
             :value="item.id"
           >
-            <img :src="item.src" alt width='180' />
+            <img :src="item.src" alt width="180" />
           </a-select-option>
         </a-select>
       </div>
@@ -56,7 +56,12 @@
           <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
         </div>
         <div class="color-choice">
-          <swatches v-model="fontColor" :swatches="swatchesFont" popover-x="left" @close="changeFontColor" />
+          <swatches
+            v-model="fontColor"
+            :swatches="swatchesFont"
+            popover-x="left"
+            @close="changeFontColor"
+          />
         </div>
       </div>
       <div class="row">
@@ -115,17 +120,22 @@
       <div v-if="type =='Image'|| type == 'Line'">
         <div class="row">
           <div class="row-tit">显示名称</div>
-          <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
+          <a-button
+            type="link"
+            class="edit-option-btn"
+            @click="OpenEditStatus"
+          >{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
         </div>
         <div :class="['row' ,type == 'Line'?'disabled-textarea':'']">
-          <a-textarea :disabled="type == 'Line' "
-                  placeholder=""
-                  v-model="lengedName"
-                  allow-clear
-                  @change="changeLengedName"
-                  :rows="2"
+          <a-textarea
+            :disabled="type == 'Line' "
+            placeholder
+            v-model="lengedName"
+            allow-clear
+            @change="changeLengedName"
+            :rows="2"
           />
-<!--          <a-input v-model="lengedName" @change="changeLengedName" />-->
+          <!--          <a-input v-model="lengedName" @change="changeLengedName" />-->
         </div>
         <div class="row" v-show="type =='Image'">
           <div class="row-tit">字号</div>
@@ -133,7 +143,12 @@
             <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
           </div>
           <div class="color-choice">
-            <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
+            <swatches
+              v-model="fontColor"
+              :swatches="swatchesFont"
+              @close="changeFontColor"
+              popover-x="left"
+            />
           </div>
         </div>
         <!-- 当为设备状态时 -->
@@ -179,13 +194,13 @@
           </div>
           <div class="row">
             <a-textarea
-                    placeholder=""
-                    v-model="lengedName"
-                    allow-clear
-                    @change="changeLengedName"
-                    :rows="2"
+              placeholder
+              v-model="lengedName"
+              allow-clear
+              @change="changeLengedName"
+              :rows="2"
             />
-<!--            <a-input v-model="lengedName" @change="changeLengedName" />-->
+            <!--            <a-input v-model="lengedName" @change="changeLengedName" />-->
           </div>
           <div class="row">
             <div class="row-tit">字号</div>
@@ -198,7 +213,12 @@
               />
             </div>
             <div class="color-choice">
-              <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
+              <swatches
+                v-model="fontColor"
+                :swatches="swatchesFont"
+                @close="changeFontColor"
+                popover-x="left"
+              />
             </div>
           </div>
         </div>
@@ -206,14 +226,14 @@
           <!-- 石材铺装 -->
           <div class="row">
             <div class="row-tit">图例说明</div>
-            <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
+            <a-button
+              type="link"
+              class="edit-option-btn"
+              @click="OpenEditStatus"
+            >{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
           </div>
           <div class="row">
-            <a-textarea
-              @change="changeitemExplain"
-              v-model="itemExplain"
-              :rows="4"
-            />
+            <a-textarea @change="changeitemExplain" v-model="itemExplain" :rows="4" />
           </div>
           <div class="row">
             <div class="row-tit">描边</div>
@@ -241,32 +261,78 @@
           <!-- 自定义 -->
           <div class="row-tit">
             <span style="margin-right:10px;color:#8d9399">填充颜色</span>
-            <el-color-picker show-alpha v-model="CUSTOMbgColor" @change='changBgColor' style="vertical-align:middle;"></el-color-picker>
+            <el-color-picker
+              show-alpha
+              v-model="CUSTOMbgColor"
+              @change="changBgColor"
+              style="vertical-align:middle;"
+            ></el-color-picker>
           </div>
           <div class="row-tit">
             <span style="margin-right:10px;color:#8d9399">边框颜色</span>
-            <el-color-picker show-alpha v-model="CUSTOMbdColor" @change='changBdColor' style="vertical-align:middle;"></el-color-picker>
+            <el-color-picker
+              show-alpha
+              v-model="CUSTOMbdColor"
+              @change="changBdColor"
+              style="vertical-align:middle;"
+            ></el-color-picker>
           </div>
           <div class="row">
             <div class="row-tit">显示名称</div>
-            <a-button type="link" class="edit-option-btn" @click="OpenEditStatus">{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
+            <a-button
+              type="link"
+              class="edit-option-btn"
+              @click="OpenEditStatus"
+            >{{isEdit? "取消编辑" : editStatus[type]}}</a-button>
           </div>
           <div class="row">
-            <a-textarea placeholder="" v-model="lengedName" allow-clear @change="changeLengedName" :rows="2"/>
+            <a-textarea
+              placeholder
+              v-model="lengedName"
+              allow-clear
+              @change="changeLengedName"
+              :rows="2"
+            />
           </div>
           <div class="row">
             <div class="row-tit">字号</div>
             <div class="grid-content">
-              <a-input-number v-model="fontSize" :min="1" @change="changeFont" style="width: 168px" />
+              <a-input-number
+                v-model="fontSize"
+                :min="1"
+                @change="changeFont"
+                style="width: 168px"
+              />
             </div>
             <div class="color-choice">
-              <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
+              <swatches
+                v-model="fontColor"
+                :swatches="swatchesFont"
+                @close="changeFontColor"
+                popover-x="left"
+              />
             </div>
           </div>
         </div>
-        <div v-if="!SubType">
+        <div v-show="!SubType">
           <!-- 普通分区 -->
           <div class="row">
+            <!-- 修改图例 -->
+            <div class="row-tit">图例名称</div>
+            <div>
+              <a-spin :spinning="isGetLengend">
+                <a-dropdown :trigger="['click']">
+                  <a class="ant-dropdown-link" @click="changeLengend">{{lengendName}}</a>
+                  <a-menu slot="overlay">
+                    <a-menu-item v-for="(item,key) in lengendArr" :key="key">
+                      <a href="javascript:;">{{item.Name}}</a>
+                    </a-menu-item>
+                  </a-menu>
+                </a-dropdown>
+              </a-spin>
+            </div>
+          </div>
+          <div class="row">
             <div class="row-tit">显示名称</div>
             <a-button
               type="link"
@@ -276,13 +342,13 @@
           </div>
           <div class="row">
             <a-textarea
-                    placeholder=""
-                    v-model="lengedName"
-                    allow-clear
-                    @change="changeLengedName"
-                    :rows="2"
+              placeholder
+              v-model="lengedName"
+              allow-clear
+              @change="changeLengedName"
+              :rows="2"
             />
-<!--            <a-input v-model="lengedName" @change="changeLengedName" />-->
+            <!--            <a-input v-model="lengedName" @change="changeLengedName" />-->
           </div>
           <div class="row">
             <div class="row-tit">字号</div>
@@ -295,7 +361,12 @@
               />
             </div>
             <div class="color-choice">
-              <swatches v-model="fontColor" :swatches="swatchesFont" @close="changeFontColor" popover-x="left" />
+              <swatches
+                v-model="fontColor"
+                :swatches="swatchesFont"
+                @close="changeFontColor"
+                popover-x="left"
+              />
             </div>
           </div>
         </div>
@@ -315,7 +386,11 @@
         </div>
 
         <div class="grid-content" style="margin-top: 12px;">
-          <a-card class="attr-card" v-for="(item,index) in attrCards" :key="index">{{item.sbjc ||item.wzjc}}</a-card>
+          <a-card
+            class="attr-card"
+            v-for="(item,index) in attrCards"
+            :key="index"
+          >{{item.sbjc ||item.wzjc}}</a-card>
         </div>
       </a-spin>
     </div>
@@ -349,8 +424,15 @@
         </a-collapse-panel>
       </a-collapse>
     </div>
-    <editDialog ref="dialog" :attrCards="attrCards" :GraphElementId="GraphElementId" :InfoLocal="InfoLocal" :sysNum="imageNum" :key="keys" />
-<!--    <editDialog ref="dialog" :attrCards="attrCards" :getmajorId="getmajorId" :InfoLocal="InfoLocal" :sysNum="imageNum" :key="new Date().getTime()" />-->
+    <editDialog
+      ref="dialog"
+      :attrCards="attrCards"
+      :GraphElementId="GraphElementId"
+      :InfoLocal="InfoLocal"
+      :sysNum="imageNum"
+      :key="keys"
+    />
+    <!--    <editDialog ref="dialog" :attrCards="attrCards" :getmajorId="getmajorId" :InfoLocal="InfoLocal" :sysNum="imageNum" :key="new Date().getTime()" />-->
     <!--    <editDialog ref="dialog" :typeEdit="2" :getmajorId="'1001'" :sysNum="5" />-->
   </div>
 </template>
@@ -359,6 +441,7 @@
 import editDialog from "./edit-dialog";
 import Swatches from "vue-swatches";
 import bus from "@/bus";
+import bus2 from "@/bus2";
 import "vue-swatches/dist/vue-swatches.css";
 import { SLineStyle } from "@saga-web/graph/lib";
 import { SItemStatus } from "@saga-web/big";
@@ -369,8 +452,9 @@ import {
 } from "@/api/editer.js";
 import { getUrlMsg } from "@/components/urlMsg.js";
 // mapclass里边的没有透明度
-import { hexify } from "@/utils/rgbaUtil"
-import { SCustomLegendItem } from '@/lib/items/SCustomLegendItem';
+import { hexify } from "@/utils/rgbaUtil";
+import { SCustomLegendItem } from "@/lib/items/SCustomLegendItem";
+import { graphElementGroup } from "@/api/editer.js";
 export default {
   name: "attr_select",
   props: ["type", "focusItemList"],
@@ -442,7 +526,7 @@ export default {
         "#8E43AD",
         "#3D556E",
         "#222F3D",
-        "#00000000",
+        "#00000000"
       ],
       swatchesFont: [
         "#1fbc9c",
@@ -471,11 +555,17 @@ export default {
       spinning: false,
       isEdit: false,
       getmajorId: "",
-      InfoLocal:[],
-      GraphElementId:'',//图例Id
-      CUSTOMbgColor: 'rgba(0,0,0,0.15)', // 自定义多边形背景色
-      CUSTOMbdColor: 'rgba(0,0,0,1)', // 自定义多边形线条色
-      keys:new Date().getTime()
+      InfoLocal: [],
+      GraphElementId: "", //图例Id
+      CUSTOMbgColor: "rgba(0,0,0,0.15)", // 自定义多边形背景色
+      CUSTOMbdColor: "rgba(0,0,0,1)", // 自定义多边形线条色
+      keys: new Date().getTime(),
+      getCategroyIdS: [], //选择原件的数据
+      categoryId: "", //类型ide
+      lengendName: "", //lengend图例Id
+      isGetLengend: false,
+      isOpenGend: false,
+      lengendArr: [] //图例数组
     };
   },
   methods: {
@@ -518,14 +608,14 @@ export default {
       }
     },
     // 用户自定义多边形 修改背景色
-    changBgColor(val){
+    changBgColor(val) {
       const color = hexify(val); // 转为16进制
-      bus.$emit('CUSTOMbgColor',color)
+      bus.$emit("CUSTOMbgColor", color);
     },
     // 用户自定义多边形 修改现调颜色
-    changBdColor(val){
+    changBdColor(val) {
       const color = hexify(val); // 转为16进制
-      bus.$emit('CUSTOMbdColor',color)
+      bus.$emit("CUSTOMbdColor", color);
     },
     customRequest(info) {
       const formData = new FormData();
@@ -559,10 +649,10 @@ export default {
       }
     },
     handleEdit() {
-      this.keys = new Date().getTime()
-      setTimeout(()=>{
-          this.$refs.dialog.showModal();
-      })
+      this.keys = new Date().getTime();
+      setTimeout(() => {
+        this.$refs.dialog.showModal();
+      });
     },
     // 修改设备数量
     changeImageNum() {
@@ -600,13 +690,44 @@ export default {
     // 更改工程信息化数据
     changeAttachObjectIds(arr) {
       bus.$emit("changeAttachObjectIds", arr);
+    },
+    // 下拉框获取图例数据
+    changeLengend(val) {
+      this.isGetLengend = true;
+      this.lengendArr = [];
+      const obj = {
+        InfoSystems: this.getCategroyIdS,
+        Type: "Zone",
+        categoryId: this.categoryId
+      };
+      return graphElementGroup(obj)
+        .then(res => {
+          const arr = [];
+          res.Data.forEach(res => {
+            if (res.GraphElements && res.GraphElements.length) {
+              res.GraphElements.forEach(item => {
+                if (
+                  !(item.SubType && item.SubType == "FHFQ") &&
+                  !(item.SubType && item.SubType == "SCPZ")
+                ) {
+                  arr.push(item);
+                }
+              });
+            }
+          });
+          this.isGetLengend = false;
+          this.lengendArr = arr;
+          console.log("arrarrarr",  this.lengendArr);
+        })
+        .catch(() => {
+          this.isGetLengend = false;
+        });
     }
   },
   watch: {
     focusItemList: function(newval) {
-      console.log('------------')
-      console.log(FENGMAP)
-      console.log('newval',newval)
+      console.log("------------");
+      console.log("newval", newval);
       const Item = newval.itemList[0];
       this.GraphElementId = Item.data.GraphElementId;
       this.imageNum = 1; //切换item初始化
@@ -663,14 +784,14 @@ export default {
         } else if (newval.itemType == "baseImage") {
           this.lineWidth = Item.lineWidth;
           this.borderColor = Item.strokeColor.value;
-        }else if (
+        } else if (
           newval.itemType == "Zone" ||
           newval.itemType == "Line" ||
           newval.itemType == "Image"
         ) {
           setTimeout(() => {
-            this.isEdit = (Item.status == SItemStatus.Edit);
-          }, 300)
+            this.isEdit = Item.status == SItemStatus.Edit;
+          }, 300);
           if (newval.itemType == "Image") {
             this.imageNum = Item.num;
             this.lengedName = Item.name;
@@ -690,6 +811,9 @@ export default {
             this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
             this.fillColor = Item.fillColor ? Item.fillColor.value : "";
             this.itemExplain = "";
+            this.lengendName = Item.data.Properties.lengendName
+              ? Item.data.Properties.lengendName
+              : Item.name; //图例名称
             if (Item.data.Properties.ItemExplain) {
               this.itemExplain = Item.data.Properties.ItemExplain
                 ? Item.data.Properties.ItemExplain
@@ -698,10 +822,14 @@ export default {
             if (newval.itemList.length) {
               if (newval.itemList[0] instanceof SCustomLegendItem) {
                 const fColor = newval.itemList[0].fillColor;
-                this.CUSTOMbgColor = `rgba(${fColor.red}, ${fColor.green}, ${fColor.blue}, ${fColor.alpha/100})`
+                this.CUSTOMbgColor = `rgba(${fColor.red}, ${fColor.green}, ${
+                  fColor.blue
+                }, ${fColor.alpha / 100})`;
 
                 const bColor = newval.itemList[0].strokeColor;
-                this.CUSTOMbdColor = `rgba(${bColor.red}, ${bColor.green}, ${bColor.blue}, ${bColor.alpha/100})`
+                this.CUSTOMbdColor = `rgba(${bColor.red}, ${bColor.green}, ${
+                  bColor.blue
+                }, ${bColor.alpha / 100})`;
               }
             }
           }
@@ -711,14 +839,14 @@ export default {
       const assetnumList = [];
       let params = {};
       this.attrCards = [];
-      if(Item.data.AttachObjectIds && Item.data.AttachObjectIds.length ){
-          Item.data.AttachObjectIds.map(item => {
-        if (item.type == "Zone") {
-          locationList.push(item.id);
-        } else if (item.type == "Image") {
-          assetnumList.push(item.id);
-        }
-      });
+      if (Item.data.AttachObjectIds && Item.data.AttachObjectIds.length) {
+        Item.data.AttachObjectIds.map(item => {
+          if (item.type == "Zone") {
+            locationList.push(item.id);
+          } else if (item.type == "Image") {
+            assetnumList.push(item.id);
+          }
+        });
       }
       // if(newval.itemType == 'Zone'){
       this.spinning = true;
@@ -727,26 +855,26 @@ export default {
       } else {
         params = { locationList: [""] };
       }
-      queryGlsmsLocation({ plazaId: getUrlMsg().projectId }, params).then(
-        res => {
+      queryGlsmsLocation({ plazaId: getUrlMsg().projectId }, params)
+        .then(res => {
           this.spinning = false;
           if (res.data.result == "success") {
             console.log(res.data);
             if (res.data.data && res.data.data.length) {
-              let ZoneData = res.data.data
-              ZoneData.map(item=>{
-                item.type='Zone'
-              })
+              const ZoneData = res.data.data;
+              ZoneData.map(item => {
+                item.type = "Zone";
+              });
               this.attrCards = this.attrCards.concat(ZoneData);
             }
           } else {
             // this.$message.error("工程信息化中的位置信息获取失败");
           }
-        }
-      ).catch(()=>{
-        this.spinning = false;
-        // this.$message.error("工程信息化中的位置信息获取失败");
-      });
+        })
+        .catch(() => {
+          this.spinning = false;
+          // this.$message.error("工程信息化中的位置信息获取失败");
+        });
       // }else if(newval.itemType == 'Image'){
       this.spinning = true;
       if (assetnumList.length) {
@@ -754,37 +882,46 @@ export default {
       } else {
         params = { assetnumList: [""] };
       }
-      queryGlsmsAsset({ plazaId: getUrlMsg().projectId }, params).then(res => {
-        this.spinning = false;
-        if (res.data.result == "success") {
-          console.log(res.data);
-          if (res.data.data && res.data.data.length) {
-            let data =  res.data.data;
-            data.map(item=>{
-              item.type='Image'
-            })
-            this.attrCards = this.attrCards.concat(data);
+      queryGlsmsAsset({ plazaId: getUrlMsg().projectId }, params)
+        .then(res => {
+          this.spinning = false;
+          if (res.data.result == "success") {
+            console.log(res.data);
+            if (res.data.data && res.data.data.length) {
+              const data = res.data.data;
+              data.map(item => {
+                item.type = "Image";
+              });
+              this.attrCards = this.attrCards.concat(data);
+            }
+          } else {
+            // this.$message.error("工程信息化中的设备信息获取失败");
           }
-        } else {
+        })
+        .catch(() => {
+          this.spinning = false;
           // this.$message.error("工程信息化中的设备信息获取失败");
-        }
-      }).catch(()=>{
-        this.spinning = false;
-        // this.$message.error("工程信息化中的设备信息获取失败");
-      });
+        });
       // }
       console.log(this.attrCards);
     }
+  },
+  mounted() {
+    // 获取原件id
+    bus2.$on("getCategroyIdS", data => {
+      this.getCategroyIdS = data;
+    });
+    this.categoryId = getUrlMsg().categoryId;
   }
 };
 </script>
 
 <style scoped lang="less">
-  .disabled-textarea{
-    /deep/ .ant-input{
-      resize: none;
-    }
+.disabled-textarea {
+  /deep/ .ant-input {
+    resize: none;
   }
+}
 /deep/ .ant-spin-nested-loading {
   height: 100% !important;
   .ant-spin-container {
@@ -811,7 +948,7 @@ export default {
         width: 26px !important;
         height: 26px !important;
         border-radius: 2px !important;
-        border: 1px solid #dcdcdc ;
+        border: 1px solid #dcdcdc;
       }
     }
     .row-tit {
@@ -819,7 +956,7 @@ export default {
       font-size: 14px;
     }
   }
-  .row:first-child{
+  .row:first-child {
     margin-top: 0;
   }
   .grid {
@@ -831,7 +968,7 @@ export default {
   }
 
   .grid-content {
-     /*margin-top: 12px;*/
+    /*margin-top: 12px;*/
     height: calc(100% - 48px);
     overflow-y: scroll;
     position: relative;

+ 38 - 36
src/components/edit/left_toolbar.vue

@@ -312,27 +312,27 @@ export default {
       });
       items.isChoice = true;
       this.$emit("setCmdType", items.type);
-      if (items.name == "画多边形"){
-        bus.$emit('changeDrawType','draw')
+      if (items.name == "画多边形") {
+        bus.$emit("changeDrawType", "draw");
         const item = {
-            "Color":"#57C5FC",
-            "Deleted":false,
-            "FillColor":"#57c5fc0F",
-            "Id":"-10",
-            "InfoLocal":[],
-            "InfoTypeId":[],
-            "LineDash":"solid",
-            "LineWidth":2,
-            "Name":"",
-            "SubType":"CUSTOM",
-            "Type":"Zone",
-            "Unit":"",
-            "Url":"137ee878925448a699ec10c33e67fc95"
-        }
+          Color: "#57C5FC",
+          Deleted: false,
+          FillColor: "#57c5fc0F",
+          Id: "-10",
+          InfoLocal: [],
+          InfoTypeId: [],
+          LineDash: "solid",
+          LineWidth: 2,
+          Name: "",
+          SubType: "CUSTOM",
+          Type: "Zone",
+          Unit: "",
+          Url: "137ee878925448a699ec10c33e67fc95"
+        };
         this.$emit("toolActionClick", item);
       }
     },
-   async showDrawer(item) {
+    async showDrawer(item) {
       this.showDrawerItem = item;
       this.isExtract = false;
       if (item.isChoice) {
@@ -351,19 +351,19 @@ export default {
         // 接口请求
         this.itemList = [];
         this.spinning = true;
-      //   const data = {
-      //     GraphCategoryIds: this.categoryId,
-      //     Type: item.type
-      //   };
-      // await  queryGroup(data).then(res => {
-      //     this.itemList = res.Data;
-      //   });
+        //   const data = {
+        //     GraphCategoryIds: this.categoryId,
+        //     Type: item.type
+        //   };
+        // await  queryGroup(data).then(res => {
+        //     this.itemList = res.Data;
+        //   });
         const arr = {
           InfoSystems: this.categoryIdS,
           Type: item.type,
-          categoryId:this.categoryId
+          categoryId: this.categoryId
         };
-       await graphElementGroup(arr).then(res => {
+        await graphElementGroup(arr).then(res => {
           this.spinning = false;
           res.Data.map(item => {
             this.itemList.push(item);
@@ -381,6 +381,8 @@ export default {
     getSelectId(data) {
       this.categoryIdS = data;
       this.drawerVisible = false;
+      // 同步选择原件数据
+      bus2.$emit('getCategroyIdS',data)
     },
     onClose() {
       this.visible = false;
@@ -442,7 +444,7 @@ export default {
       }
     },
     getBus() {
-      bus2.$off('exportItem');
+      bus2.$off("exportItem");
       bus2.$on("exportItem", data => {
         this.data = [];
         if (data.length) {
@@ -451,8 +453,8 @@ export default {
           for (let i = 0; i < this.GraphElement.length; i++) {
             const t = this.GraphElement[i];
             for (let j = 0; j < data.length; j++) {
-              if(t.Type == data[j].type){
-                if (t.InfoTypeId.indexOf(data[j].key) > -1){
+              if (t.Type == data[j].type) {
+                if (t.InfoTypeId.indexOf(data[j].key) > -1) {
                   const obj = {
                     key: data[j].key,
                     name: t.Name,
@@ -461,20 +463,20 @@ export default {
                     type: data[j].type,
                     address: data[j].address,
                     id: t.Id
-                  }
+                  };
                   if (!map[t.Id]) {
-                    map[t.Id] = obj
+                    map[t.Id] = obj;
                   } else {
-                    map[t.Id].number += obj.number
-                    map[t.Id].key += obj.key
+                    map[t.Id].number += obj.number;
+                    map[t.Id].key += obj.key;
                   }
                 }
               }
             }
           }
           try {
-            for(const k in map) {
-              this.data.push(map[k])
+            for (const k in map) {
+              this.data.push(map[k]);
             }
           } catch (err) {
             console.log(err);
@@ -502,7 +504,7 @@ export default {
     changeDrawType(v) {
       // bus.$emit("changeDrawType", v.target.value);
       bus.$emit("changeDrawType", v);
-    }
+    },
   },
   watch: {
     cmdType(cmd) {

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

@@ -131,7 +131,6 @@ export default {
         if (val.Relations.length) {
           this.elementData = this.elementData.concat(val.Relations);
         }
-        console.log(this.elementData);
       });
     },
     callback(key) {

+ 8 - 6
src/components/mapClass/EditScence.ts

@@ -295,7 +295,8 @@ export class EditScence extends SGraphScene {
                 TextPos: { X: 0, Y: 0 },
                 InfoTypeId: this._legend.InfoTypeId.length ? this._legend.InfoTypeId : [],
                 InfoSystemId: this._legend.InfoSystemId ? this._legend.InfoSystemId : '',
-                InfoLocal: this._legend.InfoLocal.length ? this._legend.InfoLocal : []
+                InfoLocal: this._legend.InfoLocal.length ? this._legend.InfoLocal : [],
+                lengendName: this._legend.Name, //图例名称
             },
         }
         let Polylines = null;
@@ -352,7 +353,8 @@ export class EditScence extends SGraphScene {
                     TextPos: { X: item.data.Location.Points[0].X, Y: -item.data.Location.Points[0].Y },
                     InfoTypeId: this._legend.InfoTypeId.length ? this._legend.InfoTypeId : [],
                     InfoSystemId: this._legend.InfoSystemId ? this._legend.InfoSystemId : '',
-                    InfoLocal: this._legend.InfoLocal.length ? this._legend.InfoLocal : []
+                    InfoLocal: this._legend.InfoLocal.length ? this._legend.InfoLocal : [],
+                    lengendName: this._legend.Name, //图例名称
                 },
             }
             let Polylines = null;
@@ -1299,7 +1301,7 @@ export class EditScence extends SGraphScene {
         try {
             console.log(crossPageString);
             const pageObj = JSON.parse(crossPageString)
-            
+
             const parserData = new STopologyParser(null);
             // 需要深拷贝
             parserData.parseData(JSON.parse(JSON.stringify(pageObj)))
@@ -1878,7 +1880,7 @@ export class EditScence extends SGraphScene {
 
     /**
      * 图标旋转更新角度
-     * 
+     *
      * @param   ang 旋转角度
     */
     updateItemAng(ang: number) :void{
@@ -1893,7 +1895,7 @@ export class EditScence extends SGraphScene {
         }
     }
 
-    /** 
+    /**
      * 框选
     */
     addRectSelect(event: SMouseEvent) {
@@ -1915,7 +1917,7 @@ export class EditScence extends SGraphScene {
             this.arrToSelect(this.Nodes, rect)
             this.arrToSelect(this.Markers, rect)
             this.arrToSelect(this.Relations, rect)
-        }    
+        }
     }
     /**
      * 选中item:框选

+ 0 - 1
src/components/urlMsg.js

@@ -11,7 +11,6 @@ if (!params) {
 params = decodeURIComponent(params);
 // params = "categoryId=NTXT&ProjectID=5&BuildingID=1&FloorID=1"; // mock 参数
 const paramsArr = params.split("&");
-console.log("paramsArr", paramsArr);
 const obj = {};
 paramsArr.map(item => {
     const arr = item.split("=");

+ 3 - 2
src/views/drafts.vue

@@ -350,11 +350,12 @@ export default {
       this.legendData = [];
       this.systemName = "";
       this.floorName = "";
+      this.seq =''
       this.systemName = items.Gcode;
       this.floorName = id.Code;
       this.floorId = id.Gname;
       this.categoryId = items.Id;
-      this.seq = items.Seq;
+      this.seq = id.Seq;
       // this.getLegend();
       this.checkFloor(id.Gname);
       console.log(items);
@@ -375,6 +376,7 @@ export default {
             this.systemName = "";
             this.floorName = "";
             this.floorId = "";
+            this.seq = "";
             this.categoryId = "";
             if (data.length) {
               (function recursion(newObj) {
@@ -593,7 +595,6 @@ export default {
 
         // 发布成功跳转草稿箱
         const token = this.$store.getters["token"];
-        alert(this.seq)
         this.$router.push({
           path: "editer",
           query: {