Selaa lähdekoodia

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

haojianlong 4 vuotta sitten
vanhempi
commit
927da3719b

+ 1 - 0
public/systemConf.js

@@ -23,6 +23,7 @@ var __systemConf = {
     // 系统编码
     systemCode: 'wandaBmGuide',
     conf: {
+        // 阿里云
         editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
         wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
     },

+ 115 - 57
src/App.vue

@@ -1,30 +1,80 @@
 <template>
-    <div id='app'>
-        <router-view />
-    </div>
+  <div id="app">
+    <div :id="`fengMap${id}`" class="fengMap"></div>
+    <router-view />
+  </div>
 </template>
 <script>
+import { mapGetters, mapActions, mapMutations } from "vuex";
+import { SFengParser } from "@saga-web/feng-map";
+window.fengmapData = null;
 export default {
-    data() {
-        return {}
+  data() {
+    return {
+      view: "",
+      scene: "",
+      id: "2",
+      canvasID: "",
+      key: "23f30a832a862c58637a4aadbf50a566",
+      appName: "万达可视化系统",
+      mapServerURL: `/wdfn`
+    };
+  },
+  mounted() {
+    // 监听页面刷新事件
+    window.addEventListener("unload", this.unload);
+    // 页面加载完成后,移除session里的存储的信息
+    window.addEventListener("load", this.load);
+    // 请求该项目下的楼层数据
+    this.getFengMap();
+  },
+  computed: {
+    ...mapGetters(["plazaId", "fmapID", "haveFengMap"])
+  },
+  methods: {
+    ...mapActions(["getfmapID"]),
+    ...mapMutations(["SETHAVEFENGMAP"]),
+    unload() {
+      // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
+      const state = this.$store.state;
+      sessionStorage.setItem("state", JSON.stringify(state));
     },
-    mounted() {
-        // 监听页面刷新事件
-        window.addEventListener('unload', this.unload)
-        // 页面加载完成后,移除session里的存储的信息
-        window.addEventListener('load', this.load)
+    load() {
+      sessionStorage.clear();
     },
-    methods: {
-        unload() {
-            // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
-            const state = this.$store.state
-            sessionStorage.setItem('state', JSON.stringify(state))
-        },
-        load() {
-            sessionStorage.clear()
-        }
+    getFengMap() {
+      if (!this.fmapID) {
+        this.getfmapID().then(() => {
+          this.getMap();
+        });
+        return;
+      }
+      this.getMap();
+    },
+    getMap() {
+      if (!window.fengmapData) {
+        window.fengmapData = new SFengParser(
+          `fengMap${this.id}`,
+          `${this.mapServerURL}/fmap/${this.fmapID}`,
+          this.key,
+          this.appName,
+          null
+        );
+        window.fengmapData.loadMap(this.fmapID, () => {
+          // 获取主题数据
+          window.fengmapData
+            .loadTheme(
+              `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
+            )
+            .then(res => {
+              console.log("获取rf成功", res);
+               this.SETHAVEFENGMAP()
+            });
+        });
+      }
     }
-}
+  },
+};
 </script>
 <style lang="less">
 body,
@@ -52,8 +102,8 @@ input,
 textarea,
 th,
 td {
-    margin: 0;
-    padding: 0;
+  margin: 0;
+  padding: 0;
 }
 
 body,
@@ -61,7 +111,7 @@ button,
 input,
 select,
 textarea {
-    font: 12px/1.5 Arial, 'Microsoft YaHei', '\65b0\5b8b\4f53';
+  font: 12px/1.5 Arial, "Microsoft YaHei", "\65b0\5b8b\4f53";
 }
 
 h1,
@@ -70,7 +120,7 @@ h3,
 h4,
 h5,
 h6 {
-    font-size: 100%;
+  font-size: 100%;
 }
 
 address,
@@ -80,93 +130,101 @@ var,
 em,
 i,
 u {
-    font-style: normal;
+  font-style: normal;
 }
 
 ol,
 ul {
-    list-style: none;
+  list-style: none;
 }
 
 a {
-    text-decoration: none;
+  text-decoration: none;
 }
 
 a:hover {
-    text-decoration: underline;
+  text-decoration: underline;
 }
 
 img {
-    border: none;
-    vertical-align: middle;
+  border: none;
+  vertical-align: middle;
 }
 
 :focus {
-    outline: 0;
+  outline: 0;
 }
 
 button,
 input,
 select,
 textarea {
-    font-size: 100%;
+  font-size: 100%;
 }
 
 table {
-    border-collapse: collapse;
-    border-spacing: 0;
+  border-collapse: collapse;
+  border-spacing: 0;
 }
 
 /* 滚动条样式 */
 
 body ::-webkit-scrollbar {
-    width: 5px;
-    height: 5px;
+  width: 5px;
+  height: 5px;
 }
 
 body ::-webkit-scrollbar-track {
-    background-color: rgba(0, 0, 0, 0);
-    border-radius: 3px;
+  background-color: rgba(0, 0, 0, 0);
+  border-radius: 3px;
 }
 
 body ::-webkit-scrollbar-thumb {
-    border-radius: 3px;
-    background: #e6e6e6;
-    border: 1px solid #e6e6e6;
+  border-radius: 3px;
+  background: #e6e6e6;
+  border: 1px solid #e6e6e6;
 }
 
 body ::-webkit-scrollbar-thumb:vertical:hover {
-    background: #e6e6e6;
-    border: 1px solid #e6e6e6;
+  background: #e6e6e6;
+  border: 1px solid #e6e6e6;
 }
 
 .clearfix::after {
-    content: '.';
-    display: block;
-    height: 0;
-    clear: both;
-    visibility: hidden;
+  content: ".";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
 }
 .clearfix {
-    zoom: 1;
+  zoom: 1;
 }
 
 .left {
-    float: left;
+  float: left;
 }
 
 .right {
-    float: right;
+  float: right;
 }
 html,
 body {
-    width: 100%;
-    height: 100%;
-    // min-width: 1920px;
-    //   background: url('./assets/images/back.jpg') no-repeat;
+  width: 100%;
+  height: 100%;
+  // min-width: 1920px;
+  //   background: url('./assets/images/back.jpg') no-repeat;
 }
 #app {
-    height: 100%;
-    width: 100%;
+  height: 100%;
+  width: 100%;
+  position: relative;
+  .fengMap {
+    position: fixed;
+    width: 100px;
+    height: 100px;
+    z-index: -1;
+    opacity: 0
+  }
 }
 </style>

+ 254 - 254
src/components/floorMap/index.vue

@@ -1,275 +1,275 @@
+
 <!-- 底图 -->
 <template>
-    <div id='floor_base' v-loading='loading' ref='graphy'>
-        <div :id='`fengMap${id}`' class='fengMap'></div>
-        <canvas :id='`canvas${id}`' :width='canvasWidth' :height='canvasHeight' tabindex='0'></canvas>
-        <!-- 地图底部操作按钮 -->
-        <div class='strip-bottom'>
-            <canvasFun @fit='fit' @savePng='savePng' @saveSvg='saveSvg' @saveJson='saveJson' @scale='scale' ref='canvasFun'></canvasFun>
-        </div>
-        <room-box ref='boxRoom'></room-box>
+  <div id="floor_base" v-loading="loading" ref="graphy">
+    <canvas :id="`canvas${id}`" :width="canvasWidth" :height="canvasHeight" tabindex="0"></canvas>
+    <!-- 地图底部操作按钮 -->
+    <div class="strip-bottom">
+      <canvasFun
+        @fit="fit"
+        @savePng="savePng"
+        @saveSvg="saveSvg"
+        @saveJson="saveJson"
+        @scale="scale"
+        ref="canvasFun"
+      ></canvasFun>
     </div>
+    <room-box ref="boxRoom"></room-box>
+  </div>
 </template>
 <script>
-import { SFengParser } from '@saga-web/feng-map'
-import { SFloorParser } from '@saga-web/big'
-import { FloorView } from '@/lib/FloorView'
-import { FloorScene } from '@/lib/FloorScene'
-import RoomBox from '@/views/room/index'
-import canvasFun from '@/components/floorMap/canvasFun'
-import { readGroup } from '@/api/public'
-import { STopologyParser } from '@/lib/parsers/STopologyParser'
-import { mapGetters, mapActions } from 'vuex'
-import { SImageItem } from '@saga-web/graph/lib'
-import bus from "@/utils/bus.js"
+import { SFengParser } from "@saga-web/feng-map";
+import { SFloorParser } from "@saga-web/big";
+import { FloorView } from "@/lib/FloorView";
+import { FloorScene } from "@/lib/FloorScene";
+import RoomBox from "@/views/room/index";
+import canvasFun from "@/components/floorMap/canvasFun";
+import { readGroup } from "@/api/public";
+import { STopologyParser } from "@/lib/parsers/STopologyParser";
+import { mapGetters, mapActions } from "vuex";
+import { SImageItem } from "@saga-web/graph/lib";
 // import { uuid } from "@/components/mapClass/until";
-let fengmap = null
 
 export default {
-    data() {
-        return {
-            appName: '万达可视化系统',
-            key: '23f30a832a862c58637a4aadbf50a566',
-            mapServerURL: `/wdfn`,
-            canvasWidth: 1100,
-            canvasHeight: 800,
-            loading: false, // 限制重复查询
-            view: null,
-            urlMsg: {},
-            canvasID: 'canvas'
-            // fmapID:'1001012_42',
-        }
-    },
-    props: {
-        id: {
-            default: '1',
-            type: String
-        },
-        loadName: null,
-        type: null
-    },
-    components: { RoomBox, canvasFun },
-    computed: {
-        ...mapGetters(['plazaId', 'fmapID'])
+  data() {
+    return {
+      appName: "万达可视化系统",
+      key: "23f30a832a862c58637a4aadbf50a566",
+      mapServerURL: `/wdfn`,
+      canvasWidth: 1100,
+      canvasHeight: 800,
+      loading: false, // 限制重复查询
+      view: null,
+      urlMsg: {},
+      canvasID: "canvas",
+      floorid: "" //楼层id
+    };
+  },
+  props: {
+    id: {
+      default: "1",
+      type: String
     },
-    methods: {
-        ...mapActions(['getfmapID']),
-        init(floorid) {
-            if (this.loading) {
-                //console.log('正在查询...')
-                return
-            }
-            this.loading = true
-            if (!this.fmapID) {
-                this.getfmapID().then(() => {
-                    this.urlMsg.fmapID = this.fmapID
-                    this.getMap(floorid)
-                })
-                return
-            }
-            this.getMap(floorid)
-        },
-        getMap(floorid) {
-            this.clearGraphy()
-            this.scene = new FloorScene()
-            this.scene.selectContainer.connect('listChange', this, this.listChange)
-            if (!fengmap || this.canvasID != `canvas${this.id}`) {
-                this.canvasID = `canvas${this.id}`
-                fengmap = new SFengParser(`fengMap${this.id}`, `${this.mapServerURL}/fmap/${this.fmapID}`, this.key, this.appName, null)
-                fengmap.loadMap(this.fmapID, () => {
-                    this.parserData(floorid)
-                    this.readGroup(floorid).then(data => {
-                        if (data.Data.length > 0) {
-                            //console.log(data.data.Data[0].ID)
-                            this.$cookie.set('graphId', data.Data[0].ID, 3)
-                        }
-                        const parserData = new STopologyParser(null)
-                        parserData.parseData(data.Data[0].Elements)
-                        // 多边形
-                        parserData.zoneLegendList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        // 增加文字
-                        parserData.textMarkerList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        // 增加图片
-                        parserData.imageMarkerList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        // 增加直线
-                        parserData.lineMarkerList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        // 增加图标类图例
-                        parserData.imageLegendList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        // 增加管线类
-                        // 增加图标类图例
-                        parserData.relationList.forEach(t => {
-                            this.scene.addItem(t)
-                        })
-                        this.view.fitSceneToView()
-                    })
-                })
-                // 获取主题数据
-                fengmap.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {
-                    //console.log('获取rf成功', res)
-                })
-            } else {
-                this.parserData(floorid)
-            }
-        },
-        parserData(floor) {
-            if (floor == 'g80') {
-                // 屋顶
-                if (fengmap.frImg) {
-                    let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${fengmap.frImg}`)
-                    this.scene.addItem(imgItem)
-                    this.view.scene = this.scene
-                    this.view.fitSceneToView()
-                    this.view.minScale = this.view.scale
-                    if (this.$refs.canvasFun) {
-                        this.$refs.canvasFun.everyScale = this.view.scale
-                    }
-                    this.loading = false
-                }
-            } else {
-                if (fengmap.gnameToGid[floor]) {
-                    fengmap.parseData(fengmap.gnameToGid[floor], res => {
-                        if (res.err) {
-                            //console.log(res.err)
-                            return
-                        }
-                        const fParser = new SFloorParser(null)
-                        fParser.parseData(res)
-                        fParser.spaceList.forEach(t => {
-                            //   t.selectable = true;
-                            this.scene.addItem(t)
-                        })
-                        fParser.wallList.forEach(t => this.scene.addItem(t))
-                        fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        fParser.doorList.forEach(t => this.scene.addItem(t))
-                        fParser.columnList.forEach(t => this.scene.addItem(t))
-                        fParser.casementList.forEach(t => this.scene.addItem(t))
-                        this.view.scene = this.scene
-                        this.view.fitSceneToView()
-                        this.view.minScale = this.view.scale
-                        if (this.$refs.canvasFun) {
-                            this.$refs.canvasFun.everyScale = this.view.scale
-                        }
-                        this.loading = false
-                        //console.log('success')
-                    })
-                } else {
-                    //console.log('楼层不正确')
-                }
-            }
-        },
-        clearGraphy() {
-            if (this.view) {
-                this.view.scene = null
-                return
-            }
-            this.view = new FloorView(`canvas${this.id}`)
-        },
-        listChange(item, ev) {
-            let name = ev[0][0].data.Name
-            if (name.slice(name.length - 2, name.length) == '机房') {
-                this.$refs.boxRoom.open({ name: name, type: this.type })
-            }
-        },
-        // 适配底图到窗口
-        fit() {
-            this.view.fitSceneToView()
-        },
-        // 保存为png
-        savePng() {
-            this.view.saveImage(`${this.loadName}.png`, 'png')
-            //console.log(`${this.loadName}.png`)
-        },
-        // 保存为svg
-        saveSvg() {
-            this.view.saveSceneSvg(`${this.loadName}.svg`, 6400, 4800)
-        },
-        // 保存为json
-        saveJson() {
-            this.view.saveFloorJson(`${this.loadName}.json`)
-        },
-        // 缩放
-        scale(val) {
-            if (!this.view) {
-                return
-            }
-            let scale = this.view.scale
-            this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
-        },
-        // 读取数据
-        readGroup(FloorID) {
-            const data = {
-                BuildingID: '1',
-                FloorID: FloorID,
-                categoryId: this.$cookie.get('categoryId'),
-                projectId: this.urlMsg.ProjectID
-            }
-            return readGroup(data)
-        },
-        // 地图尺寸
-        mapSize() {
-            if (window.screen.height == '768') {
-                this.canvasWidth = this.$refs.graphy.offsetWidth
-                this.canvasHeight = this.$refs.graphy.offsetHeight - 100
-            } else {
-                this.canvasWidth = this.$refs.graphy.offsetWidth
-                this.canvasHeight = 900
-            }
-        },
-        bindEvent(){
-          bus.$on("changeShow", res => {
-            console.log(res)
-          })
+    loadName: null,
+    type: null
+  },
+  components: { RoomBox, canvasFun },
+  computed: {
+    ...mapGetters(["plazaId", "fmapID", "haveFengMap"])
+  },
+  methods: {
+    ...mapActions(["getfmapID"]),
+    init(floorid) {
+      this.loading = true;
+      this.floorid = floorid;
+      setTimeout(() => {
+        if (this.haveFengMap) {
+          this.clearGraphy();
+          this.scene = new FloorScene();
+          this.scene.selectContainer.connect(
+            "listChange",
+            this,
+            this.listChange
+          );
+          if (this.canvasID != `canvas${this.id}`) {
+            this.canvasID = `canvas${this.id}`;
+          }
+          this.parserData(floorid);
         }
+      },100);
     },
-    watch: {
-        'view.scale': {
-            handler(n) {
-                if (this.$refs.canvasFun) {
-                    let s = (n * 10) / this.view.minScale
-                    this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s
-                }
+    parserData(floor) {
+      if (floor == "g80") {
+        // 屋顶
+        if (window.fengmapData.frImg) {
+          let imgItem = new SImageItem(
+            null,
+            `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`
+          );
+          this.scene.addItem(imgItem);
+          this.view.scene = this.scene;
+          this.view.minScale = this.view.scale;
+          if (this.$refs.canvasFun) {
+            this.$refs.canvasFun.everyScale = this.view.scale;
+          }
+          this.view.fitSceneToView();
+        }
+      } else {
+        if (window.fengmapData.gnameToGid[floor]) {
+          window.fengmapData.parseData(
+            window.fengmapData.gnameToGid[floor],
+            res => {
+              if (res.err) {
+                console.log("errr", res.err);
+                return;
+              }
+              const fParser = new SFloorParser(null);
+              fParser.parseData(res);
+              fParser.spaceList.forEach(t => {
+                //   t.selectable = true;
+                this.scene.addItem(t);
+              });
+              fParser.wallList.forEach(t => this.scene.addItem(t));
+              fParser.virtualWallList.forEach(t => this.scene.addItem(t));
+              fParser.doorList.forEach(t => this.scene.addItem(t));
+              fParser.columnList.forEach(t => this.scene.addItem(t));
+              fParser.casementList.forEach(t => this.scene.addItem(t));
+              this.view.scene = this.scene;
+              this.view.minScale = this.view.scale;
+              if (this.$refs.canvasFun) {
+                this.$refs.canvasFun.everyScale = this.view.scale;
+              }
+              this.view.fitSceneToView();
+              //console.log('success')
             }
+          );
+        } else {
+          console.log("楼层不正确");
         }
+      }
+      this.readGroup(this.floorid).then(data => {
+        this.loading = false;
+        if (data.Data.length > 0) {
+          //console.log(data.data.Data[0].ID)
+          this.$cookie.set("graphId", data.Data[0].ID, 3);
+        }
+        const parserData = new STopologyParser(null);
+        parserData.parseData(data.Data[0].Elements);
+        // 多边形
+        parserData.zoneLegendList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        // 增加文字
+        parserData.textMarkerList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        // 增加图片
+        parserData.imageMarkerList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        // 增加直线
+        parserData.lineMarkerList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        // 增加图标类图例
+        parserData.imageLegendList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        // 增加管线类
+        // 增加图标类图例
+        parserData.relationList.forEach(t => {
+          this.scene.addItem(t);
+        });
+        this.view.fitSceneToView();
+      });
+    },
+    clearGraphy() {
+      if (this.view) {
+        this.view.scene = null;
+        return;
+      }
+      this.view = new FloorView(`canvas${this.id}`);
+    },
+    listChange(item, ev) {
+      let name = ev[0][0].data.Name;
+      if (name.slice(name.length - 2, name.length) == "机房") {
+        this.$refs.boxRoom.open({ name: name, type: this.type });
+      }
+    },
+    // 适配底图到窗口
+    fit() {
+      this.view.fitSceneToView();
+    },
+    // 保存为png
+    savePng() {
+      this.view.saveImage(`${this.loadName}.png`, "png");
+      //console.log(`${this.loadName}.png`)
+    },
+    // 保存为svg
+    saveSvg() {
+      this.view.saveSceneSvg(`${this.loadName}.svg`, 6400, 4800);
+    },
+    // 保存为json
+    saveJson() {
+      this.view.saveFloorJson(`${this.loadName}.json`);
     },
-    mounted() {
-        this.mapSize()
-        this.bindEvent()
+    // 缩放
+    scale(val) {
+      if (!this.view) {
+        return;
+      }
+      let scale = this.view.scale;
+      console.log(val / scale, this.canvasWidth / 2, this.canvasHeight / 2);
+      this.view.scaleByPoint(
+        val / scale,
+        this.canvasWidth / 2,
+        this.canvasHeight / 2
+      );
     },
-    created() {
-        this.urlMsg = {
-            categoryId: this.$cookie.get('categoryId'),
-            ProjectID: this.plazaId,
-            BuildingID: '1',
-            FloorID: this.$cookie.get('floorMapId') || 'f1',
-            fmapID: this.fmapID
+    // 读取数据
+    readGroup(FloorID) {
+      const data = {
+        BuildingID: "1",
+        FloorID: FloorID,
+        categoryId: this.$cookie.get("categoryId"),
+        projectId: this.urlMsg.ProjectID
+      };
+      return readGroup(data);
+    },
+    // 地图尺寸
+    mapSize() {
+      if (window.screen.height == "768") {
+        this.canvasWidth = this.$refs.graphy.offsetWidth;
+        this.canvasHeight = this.$refs.graphy.offsetHeight - 100;
+      } else {
+        this.canvasWidth = this.$refs.graphy.offsetWidth;
+        this.canvasHeight = 900;
+      }
+    }
+  },
+  watch: {
+    "view.scale": {
+      handler(n) {
+        if (this.$refs.canvasFun) {
+          let s = (n * 10) / this.view.minScale;
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
         }
+      }
+    },
+    haveFengMap(val) {
+      if (val) {
+        this.init(this.floorid);
+      }
     }
-}
+  },
+  mounted() {
+    this.mapSize();
+  },
+  created() {
+    this.urlMsg = {
+      categoryId: this.$cookie.get("categoryId"),
+      ProjectID: this.plazaId,
+      BuildingID: "1",
+      FloorID: this.$cookie.get("floorMapId") || "f1",
+      fmapID: this.fmapID
+    };
+  }
+};
 </script>
 <style lang="less" scoped>
 #floor_base {
-    position: relative;
-    .fengMap {
-        position: fixed;
-        width: 100px;
-        height: 100px;
-        z-index: -1;
-    }
-    .strip-bottom {
-        position: absolute;
-        right: 0;
-        bottom: 40px;
-        width: 100%;
-    }
+  position: relative;
+  .fengMap {
+    position: fixed;
+    width: 100px;
+    height: 100px;
+    z-index: -1;
+  }
+  .strip-bottom {
+    position: absolute;
+    right: 0;
+    bottom: 40px;
+    width: 100%;
+  }
 }
-</style>
+</style>

+ 5 - 0
src/store/index.js

@@ -17,6 +17,7 @@ export default new Vuex.Store({
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
         fmapID: '',
+        haveFengMap:false ,//是否有蜂鸟地图的数据
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
@@ -24,6 +25,7 @@ export default new Vuex.Store({
         plazaId: (state) => state.plazaId,
         plazas: (state) => state.plazas,
         fmapID: (state) => state.fmapID,
+        haveFengMap:(state) => state.haveFengMap
     },
     mutations: {
         // 设置是否登陆校验
@@ -53,6 +55,9 @@ export default new Vuex.Store({
         SETMAPID(state, data) {
             state.fmapID = data
         },
+        SETHAVEFENGMAP(state) {
+            state.haveFengMap = true;
+        },
     },
     actions: {
         // 获取项目列表、userId

+ 2 - 1
src/views/legendLibrary/addForm.vue

@@ -208,7 +208,8 @@ export default {
             })
         },
         handleRemove(file, fileList) {
-            // //console.log(file, fileList, 'file')
+            console.log(file, fileList, 'file')
+            this.ruleForm.Url = ''
         },
         getFile(file) {
             // let imgSrc = document.querySelector('.input-right>img')

+ 18 - 3
src/views/legendLibrary/index.vue

@@ -4,7 +4,7 @@
             <img class='img-menu' src='@/assets/imgs/menu.png' alt />
             <el-divider direction='vertical'></el-divider>
             <img class='img-logo' src='@/assets/imgs/logo_tu.png' alt />
-            <span style='color:#1F2329'>万达管理说明书</span>
+            <span class='nav-span1'>万达管理说明书</span>
             <span class='circular'></span>
             <!-- <span style='color:#1F2329'>图例库管理</span>
             <i class='el-icon-caret-bottom'></i>-->
@@ -426,30 +426,45 @@ export default {
         width: 100%;
         background: #fff;
         margin-left: 17px;
+        display: flex;
+        align-items: center;
         .img-menu {
             margin-right: 9px;
         }
         .img-logo {
             margin: 0 9px;
         }
+        .nav-span1 {
+            height: 26px;
+            font-size: 14px;
+            font-family: MicrosoftYaHei;
+            color: rgba(31, 35, 41, 1);
+            line-height: 26px;
+        }
         .circular {
             display: inline-block;
             width: 4px;
             height: 4px;
             background: rgba(195, 198, 203, 1);
             border-radius: 50%;
-            margin: 0 8px 3px 8px;
+            margin: 0 8px 0px 8px;
         }
     }
+    /deep/ .p-drop {
+        height: 48px;
+    }
     /deep/ .p-drop .p-drop-title .p-drop-triangle {
         margin-top: -5px;
     }
     .legend-library-top {
-        height: 48px;
+        height: 45px;
         background: rgba(247, 249, 250, 1);
         text-align: center;
         line-height: 48px;
         color: #1f2329;
+        font-size: 14px;
+        font-family: MicrosoftYaHei;
+        color: rgba(31, 36, 41, 1);
         .library-btn {
             float: right;
             margin-right: 16px;

+ 5 - 4
src/views/legendRules/index.vue

@@ -156,9 +156,9 @@ export default {
                     let upDate = _this.tableData[index - 1]
                     _this.tableData.splice(index - 1, 1)
                     _this.tableData.splice(index, 0, upDate)
+                    let ids = _this.tableData.map(({ Id }) => Id)
+                    _this.upDateGraphy(ids)
                 }
-                let ids = _this.tableData.map(({ Id }) => Id)
-                _this.upDateGraphy(ids)
             }
 
             function down() {
@@ -168,9 +168,9 @@ export default {
                     let downDate = _this.tableData[index + 1]
                     _this.tableData.splice(index + 1, 1)
                     _this.tableData.splice(index, 0, downDate)
+                    let ids = _this.tableData.map(({ Id }) => Id)
+                    _this.upDateGraphy(ids)
                 }
-                let ids = _this.tableData.map(({ Id }) => Id)
-                _this.upDateGraphy(ids)
             }
         },
         // 更新图例关系信息
@@ -180,6 +180,7 @@ export default {
                 GraphElementIds: ids,
                 Move: true
             }
+
             graphElementUpdate({ posParams }).then(res => {
                 this.getData()
             })