Browse Source

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

shaun-sheep 4 years ago
parent
commit
71cadc471b

+ 2 - 2
src/api/equipmentList.js

@@ -41,10 +41,10 @@ export function queryRecord({ getParams }) {
 
 // 设备设施=查看图纸
 export function queryxxx({ getParams }) {
-    return httputils.getJson(`/data/xxX`, getParams)
+    return httputils.getJson(`/data/data/xxX`, getParams)
 }
 
 // 设备设施-楼层电井口(间)控制商铺范围清单
 export function queryShops({ getParams }) {
-    return httputils.getJson(`/data/v_glsms_shops/query`, getParams)
+    return httputils.getJson(`/data/data/v_glsms_shops/query`, getParams)
 }

+ 3 - 0
src/api/login.js

@@ -8,3 +8,6 @@ export function login(params) {
 export function queryFloor(params) {
     return httputils.getJson(`/data/plaza/floor`, params)
 }
+export function queryfmapID(params) {
+    return httputils.getJson(`/version`, params)
+}

+ 1 - 3
src/components/Legend/src/legend.vue

@@ -245,9 +245,7 @@ export default {
             }
         }
     },
-    mounted() {
-        // this.queryMarks()
-    }
+    mounted() {}
 }
 </script>
 <style lang="less" scoped>

+ 213 - 208
src/components/floorMap/index.vue

@@ -1,227 +1,232 @@
 <!-- 底图 -->
 <template>
-  <div id="floor_base" v-loading="loading" ref="graphy">
-    <div id="fengMap"></div>
-    <canvas id="canvas" :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 id='floor_base' v-loading='loading' ref='graphy'>
+        <div id='fengMap'></div>
+        <canvas id='canvas' :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>
-    <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 { 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 } from 'vuex'
 // import { uuid } from "@/components/mapClass/until";
-let fengmap = null;
+let fengmap = null
 
 export default {
-  data() {
-    return {
-      appName: "万达可视化系统",
-      key: "23f30a832a862c58637a4aadbf50a566",
-      mapServerURL: `/wdfn`,
-      canvasWidth: 1100,
-      canvasHeight: 800,
-      loading: false,
-      view: null,
-      isQuerying: false, // 限制重复查询
-      urlMsg: {},
-      fmapID: "1000423_120"
-    };
-  },
-  components: { RoomBox, canvasFun },
-  methods: {
-    init(floorid) {
-      if (this.isQuerying) {
-        console.log("正在查询...");
-        return;
-      }
-      this.isQuerying = true;
-      this.clearGraphy();
-      this.scene = new FloorScene();
-      this.scene.selectContainer.connect("listChange", this, this.listChange);
-      if (!fengmap) {
-        fengmap = new SFengParser(
-          "fengMap",
-          `${this.mapServerURL}/${this.fmapID}`,
-          this.key,
-          this.appName,
-          null
-        );
-
-        fengmap.loadMap(this.fmapID, res => {
-          this.floorList = res;
-          this.parserData(floorid);
-        });
-        this.readGroup().then(data => {
-          const parserData = new STopologyParser(null);
-          parserData.parseData(data.data.Data[0].Elements);
-          // 多边形
-          parserData.zoneLegendList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Nodes.push(t);
-          });
-          // 增加文字
-          parserData.textMarkerList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Markers.push(t);
-          });
-          // 增加图片
-          parserData.imageMarkerList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Markers.push(t);
-          });
-          // 增加直线
-          parserData.lineMarkerList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Markers.push(t);
-          });
-          // 增加图标类图例
-          parserData.imageLegendList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Nodes.push(t);
-          });
-          // 增加管线类
-          // 增加图标类图例
-          parserData.relationList.forEach(t => {
-            this.scene.addItem(t);
-            this.scene.Relations.push(t);
-          });
-          this.view.fitSceneToView();
-        });
-      } else {
-        this.parserData(floorid);
-      }
-    },
-    parserData(floor) {
-      if (this.floorList[floor]) {
-        console.log(this.floorList[floor]);
-        fengmap.parseData(this.floorList[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.loading = false;
-          this.isQuerying = false;
-          console.log("success");
-        });
-      } else {
-        console.log("楼层不正确");
-      }
-    },
-    clearGraphy() {
-      console.log(new FloorView("canvas"));
-      if (this.view) {
-        this.view.scene = null;
-        return;
-      }
-      this.view = new FloorView("canvas");
-    },
-    listChange(item, ev) {
-      let name = ev[0][0].data.Name;
-      if (name.slice(name.length - 2, name.length) == "机房") {
-        this.$refs.boxRoom.open(name);
-      }
-    },
-    // 适配底图到窗口
-    fit() {
-      this.view.fitSceneToView();
+    data() {
+        return {
+            appName: '万达可视化系统',
+            key: '23f30a832a862c58637a4aadbf50a566',
+            mapServerURL: `/wdfn`,
+            canvasWidth: 1100,
+            canvasHeight: 800,
+            loading: false,
+            view: null,
+            isQuerying: false, // 限制重复查询
+            urlMsg: {}
+        }
     },
-    // 保存为png
-    savePng() {
-      this.view.saveImage(`1.png`, "png");
+    components: { RoomBox, canvasFun },
+    computed: {
+        ...mapGetters(['plazaId', 'fmapID'])
     },
-    // 保存为svg
-    saveSvg() {
-      this.view.saveSceneSvg(`1.svg`, 6400, 4800);
+    methods: {
+        init(floorid) {
+            if (this.isQuerying) {
+                console.log('正在查询...')
+                return
+            }
+            console.log(this.fmapID)
+            this.isQuerying = true
+            this.clearGraphy()
+            this.scene = new FloorScene()
+            this.scene.selectContainer.connect('listChange', this, this.listChange)
+            if (!fengmap) {
+                fengmap = new SFengParser('fengMap', `${this.mapServerURL}/${this.fmapID}`, this.key, this.appName, null)
+
+                fengmap.loadMap(this.fmapID, res => {
+                    this.floorList = res
+                    this.parserData(floorid)
+                })
+                this.readGroup().then(data => {
+                    const parserData = new STopologyParser(null)
+                    parserData.parseData(data.data.Data[0].Elements)
+                    // 多边形
+                    parserData.zoneLegendList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Nodes.push(t)
+                    })
+                    // 增加文字
+                    parserData.textMarkerList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Markers.push(t)
+                    })
+                    // 增加图片
+                    parserData.imageMarkerList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Markers.push(t)
+                    })
+                    // 增加直线
+                    parserData.lineMarkerList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Markers.push(t)
+                    })
+                    // 增加图标类图例
+                    parserData.imageLegendList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Nodes.push(t)
+                    })
+                    // 增加管线类
+                    // 增加图标类图例
+                    parserData.relationList.forEach(t => {
+                        this.scene.addItem(t)
+                        this.scene.Relations.push(t)
+                    })
+                    this.view.fitSceneToView()
+                })
+            } else {
+                this.parserData(floorid)
+            }
+        },
+        parserData(floor) {
+            if (this.floorList[floor]) {
+                console.log(this.floorList[floor])
+                fengmap.parseData(this.floorList[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.loading = false
+                    this.isQuerying = false
+                    console.log('success')
+                })
+            } else {
+                console.log('楼层不正确')
+            }
+        },
+        clearGraphy() {
+            console.log(new FloorView('canvas'))
+            if (this.view) {
+                this.view.scene = null
+                return
+            }
+            this.view = new FloorView('canvas')
+        },
+        listChange(item, ev) {
+            let name = ev[0][0].data.Name
+            if (name.slice(name.length - 2, name.length) == '机房') {
+                this.$refs.boxRoom.open(name)
+            }
+        },
+        // 适配底图到窗口
+        fit() {
+            this.view.fitSceneToView()
+        },
+        // 保存为png
+        savePng() {
+            this.view.saveImage(`1.png`, 'png')
+        },
+        // 保存为svg
+        saveSvg() {
+            this.view.saveSceneSvg(`1.svg`, 6400, 4800)
+        },
+        // 保存为json
+        saveJson() {
+            console.log(2222)
+            this.view.saveFloorJson(`1.json`)
+        },
+        // 缩放
+        scale(val) {
+            if (!this.view) {
+                return
+            }
+            let scale = this.view.scale
+            this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
+        },
+        // 读取数据
+        readGroup() {
+            const data = {
+                categoryId: this.urlMsg.categoryId,
+                projectId: this.urlMsg.ProjectID
+            }
+            return readGroup(data)
+        }
+        // handleFmapID(fmapID) {
+        //     if (fmapID) {
+        //         this.fmapID = fmapID
+        //     }
+        // }
     },
-    // 保存为json
-    saveJson() {
-      console.log(2222);
-      this.view.saveFloorJson(`1.json`);
+    watch: {
+        // '$store.state.fmapID': 'handleFmapID'
     },
-    // 缩放
-    scale(val) {
-      if (!this.view) {
-        return;
-      }
-      let scale = this.view.scale;
-      this.view.scaleByPoint(
-        val / scale,
-        this.canvasWidth / 2,
-        this.canvasHeight / 2
-      );
+    mounted() {
+        this.$nextTick(() => {
+            // console.log('-------------')
+            // console.log(this.$store.state.fmapID)
+            // console.log('-------------')
+        })
+        setTimeout(() => {
+            console.log(this.$store.state.fmapID)
+        }, 50000)
+        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 = this.$refs.graphy.offsetHeight
+        }
     },
-    // 读取数据
-    readGroup() {
-      const data = {
-        categoryId: this.urlMsg.categoryId,
-        projectId: this.urlMsg.ProjectID
-      };
-      return readGroup(data);
-    }
-  },
-  mounted() {
-    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 = this.$refs.graphy.offsetHeight;
+    created() {
+        this.urlMsg = {
+            categoryId: this.$cookie.get('categoryId') || 'LCGN',
+            ProjectID: this.plazaId,
+            BuildingID: '1',
+            FloorID: this.$cookie.get('floorMapId') || 'f1',
+            fmapID: this.fmapID
+        }
+        console.log('this.urlMsg', this.urlMsg)
     }
-  },
-  created() {
-    this.urlMsg = {
-      categoryId: "NTXT",
-      ProjectID: "6",
-      BuildingID: "1",
-      FloorID: "1"
-    };
-  }
-};
+}
 </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>

+ 1 - 1
src/components/menuList.vue

@@ -56,6 +56,7 @@ export default {
     },
     created() {},
     mounted() {
+        this.$store.dispatch('getfmapID')
         let val = ''
         if (location.pathname.split('/')[3] == 'first') {
             this.modelNum(1)
@@ -72,7 +73,6 @@ export default {
         }
         console.log(this.plazas)
     },
-    watch: {},
     methods: {
         formatter(str, arrv) {
             if (str && arrv) {

+ 71 - 47
src/main.js

@@ -1,54 +1,78 @@
-var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
-    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
-    return new (P || (P = Promise))(function (resolve, reject) {
-        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
-        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
-        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
-        step((generator = generator.apply(thisArg, _arguments || [])).next());
-    });
-};
-import Vue from 'vue';
-import App from './App.vue';
-import router from './router';
-import store from './store';
-Vue.config.productionTip = false;
-import design from 'ant-design-vue';
-import 'ant-design-vue/dist/antd.css';
-Vue.use(design);
-import ElementUI from 'element-ui';
-import 'element-ui/lib/theme-chalk/index.css';
-Vue.use(ElementUI);
-import VueQuillEditor from 'vue-quill-editor';
-import 'quill/dist/quill.core.css';
-import 'quill/dist/quill.snow.css';
-import 'quill/dist/quill.bubble.css';
-Vue.use(VueQuillEditor);
-import WdEditor from '@/components/Editor';
-Vue.use(WdEditor);
-import Rotation from '@/components/Rotation';
-Vue.use(Rotation);
-import PicLarge from '@/components/PicLarge';
-Vue.use(PicLarge);
-import Legend from '@/components/Legend';
-Vue.use(Legend);
-import cookies from 'vue-cookie';
-Vue.use(cookies);
-import Pui from 'meri-design';
-import 'meri-design/dist/index.css';
-Vue.use(Pui);
+var __awaiter =
+    (this && this.__awaiter) ||
+    function(thisArg, _arguments, P, generator) {
+        function adopt(value) {
+            return value instanceof P
+                ? value
+                : new P(function(resolve) {
+                      resolve(value)
+                  })
+        }
+        return new (P || (P = Promise))(function(resolve, reject) {
+            function fulfilled(value) {
+                try {
+                    step(generator.next(value))
+                } catch (e) {
+                    reject(e)
+                }
+            }
+            function rejected(value) {
+                try {
+                    step(generator['throw'](value))
+                } catch (e) {
+                    reject(e)
+                }
+            }
+            function step(result) {
+                result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
+            }
+            step((generator = generator.apply(thisArg, _arguments || [])).next())
+        })
+    }
+import Vue from 'vue'
+import App from './App.vue'
+import router from './router'
+import store from './store'
+Vue.config.productionTip = false
+import design from 'ant-design-vue'
+import 'ant-design-vue/dist/antd.css'
+Vue.use(design)
+import ElementUI from 'element-ui'
+import 'element-ui/lib/theme-chalk/index.css'
+Vue.use(ElementUI)
+import VueQuillEditor from 'vue-quill-editor'
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
+import 'quill/dist/quill.bubble.css'
+Vue.use(VueQuillEditor)
+import WdEditor from '@/components/Editor'
+Vue.use(WdEditor)
+import Rotation from '@/components/Rotation'
+Vue.use(Rotation)
+import PicLarge from '@/components/PicLarge'
+Vue.use(PicLarge)
+import Legend from '@/components/Legend'
+Vue.use(Legend)
+import cookies from 'vue-cookie'
+Vue.use(cookies)
+import Pui from 'meri-design'
+import 'meri-design/dist/index.css'
+Vue.use(Pui)
 //////////模拟传入参数
-const username = 'lengqiang';
+const username = 'lengqiang'
 /////////////////
 // 在跳入路由之前要请求获取权限信息
-router.beforeEach((to, from, next) => __awaiter(void 0, void 0, void 0, function* () {
-    if (!store.state.isrequestAuth) {
-        yield store.dispatch('getUserInfo', username);
-        yield store.dispatch('getFloors');
-    }
-    next();
-}));
+router.beforeEach((to, from, next) =>
+    __awaiter(void 0, void 0, void 0, function*() {
+        if (!store.state.isrequestAuth) {
+            yield store.dispatch('getUserInfo', username)
+            yield store.dispatch('getFloors')
+        }
+        next()
+    })
+)
 new Vue({
     router,
     store,
     render: (h) => h(App),
-}).$mount('#app');
+}).$mount('#app')

+ 13 - 1
src/store/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
-import { login, queryFloor } from '@/api/login.js'
+import { login, queryFloor, queryfmapID } from '@/api/login.js'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
@@ -16,12 +16,14 @@ export default new Vuex.Store({
         projectName: '', //全局项目名称
         floorsArr: [], //楼层数组
         floorSelect: [], //楼层下拉框
+        fmapID: '',
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
         floorSelect: (state) => state.floorSelect,
         plazaId: (state) => state.plazaId,
         plazas: (state) => state.plazas,
+        fmapID: (state) => state.fmapID,
     },
     mutations: {
         // 设置是否登陆校验
@@ -48,6 +50,9 @@ export default new Vuex.Store({
                 })
             }
         },
+        SETMAPID(state, data) {
+            state.fmapID = data
+        },
     },
     //   const params = {
     //     username: 'aiyu6'
@@ -76,6 +81,13 @@ export default new Vuex.Store({
                 }
             })
         },
+        async getfmapID(context) {
+            await queryfmapID({
+                mapId: context.state.plazaId,
+            }).then((res) => {
+                context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
+            })
+        },
     },
     modules: {},
 })

+ 1 - 1
src/views/equipment/eqDialog.vue

@@ -23,7 +23,7 @@
                 <!-- 主要设备清单 标准设备表格 -->
                 <standTable v-else-if='dialogInfo.id.slice(2,4)=="QD"' :param='param' :major='dialogInfo.id'></standTable>
                 <!-- 电井商铺范围清单 -->
-                <djsp-table v-else-if='dialogInfo.id.slice(0,4)=="GJSP"'></djsp-table>
+                <djsp-table v-else-if='dialogInfo.id.slice(0,4)=="GJSP"' :param='param'></djsp-table>
                 <!-- 查看图纸 -->
                 <look-page v-else-if='dialogInfo.id.slice(2,4)=="TZ"' param major></look-page>
             </div>

+ 2 - 2
src/views/equipment/index.vue

@@ -92,7 +92,7 @@ export default {
         emitFloor(item) {
             console.log('item', item)
             this.floorInfo = item
-            this.$refs.floorMap.init(this.floorInfo.gname)
+            // this.$refs.floorMap.init(this.floorInfo.gname)
         },
         dialogVisible(eve) {
             console.log(eve)
@@ -104,7 +104,7 @@ export default {
     },
     mounted() {
         this.everySystem = this.system[0].children
-        this.$refs.floorMap.init(this.floorInfo.gname)
+        // this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>

+ 53 - 10
src/views/equipment/table/djspTable.vue

@@ -22,17 +22,17 @@
             ></el-input>
             <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
         </div>
-        <el-table :data='tableData' style='width: 100%' @row-click='innerVisible = true'>
-            <el-table-column prop='floor' label='楼层' width='120'>
+        <el-table :data='tableData' :span-method='objectSpanMethod' border style='width: 100%' @row-click='innerVisible = true'>
+            <el-table-column prop='floor' label='楼层' width='200'>
                 <template slot-scope='{row}'>{{row.floor || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='welldes' label='电井间' width='160'>
+            <el-table-column prop='welldes' label='电井间'>
                 <template slot-scope='{row}'>{{row.welldes || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='meterbox' label='商铺电表数'>
+            <el-table-column prop='meterbox' label='商铺电表数' width='200'>
                 <template slot-scope='{row}'>{{row.meterbox || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='shopsnum' label='商铺编号'>
+            <el-table-column prop='shopsnum' label='商铺编号' width='200'>
                 <template slot-scope='{row}'>{{row.shopsnum || '--'}}</template>
             </el-table-column>
         </el-table>
@@ -59,14 +59,32 @@ export default {
     computed: {
         ...mapGetters(['floorSelect'])
     },
-
+    props: ['param'],
     methods: {
+        objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+            if (columnIndex === 0) {
+                if (row.col0count > 0) {
+                    return {
+                        rowspan: row.col0count,
+                        colspan: 1
+                    }
+                } else {
+                    return {
+                        rowspan: 0,
+                        colspan: 0
+                    }
+                }
+            }
+        },
         pageChanged(page) {
             this.currentPage = page
             this.getList()
         },
         getList() {
-            let getParams = {}
+            let getParams = {
+                page: 1,
+                size: 10
+            }
             if (this.floor) {
                 getParams.floor = this.floorSelect
             }
@@ -82,12 +100,37 @@ export default {
             }
             queryShops({ getParams }).then(res => {
                 console.log(res)
-                this.tableData = res.data.data
-                this.total = res.data.count
+                this.tableData = []
+                let floor = {}
+                res.data.forEach(i => {
+                    Object.keys(i).forEach(key => (floor[key] = 0)) // 初始化每一楼层个数为0
+                    Object.values(i).forEach(j => {
+                        Object.values(j).forEach(k => {
+                            this.tableData.push(...k)
+                        })
+                    })
+                })
+
+                this.tableData.map(n => {
+                    if (floor[n.floor] === 0) {
+                        const count = this.tableData.filter(m => m.floor === n.floor).length
+                        floor[n.floor] = count
+                        n.col0count = count
+                    } else {
+                        n.col0count = 0
+                    }
+                    return n
+                })
             })
         }
     },
-
+    watch: {
+        param(newV, oldV) {
+            if (newV !== oldV) {
+                this.getList()
+            }
+        }
+    },
     mounted() {
         this.getList()
     }

+ 2 - 2
src/views/floorFunc/index.vue

@@ -36,14 +36,14 @@ export default {
     methods: {
         emitFloor(item) {
             this.floorInfo = item
-            this.$refs.floorMap.init(this.floorInfo.gname)
+            // this.$refs.floorMap.init(this.floorInfo.gname)
         },
         additionalColl() {
             this.show = !this.show
         }
     },
     mounted() {
-        this.$refs.floorMap.init(this.floorInfo.gname)
+        // this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>

+ 1 - 0
src/views/index.vue

@@ -61,6 +61,7 @@ export default {
             }
         }
     },
+
     components: {
         menuList
     }

+ 25 - 18
vue.config.js

@@ -1,26 +1,33 @@
 module.exports = {
     devServer: {
         proxy: {
-            "/data": {
-                target: "http://192.168.200.87:9003",
+            '/data': {
+                target: 'http://192.168.200.87:9003',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {
-                    "^/data": "",
+                    '^/data': '',
                 },
             },
-            "/wdfn": {
-                target: "http://map.wanda.cn",
+            '/wdfn': {
+                target: 'http://map.wanda.cn',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/wdfn": "/editor/fmap",
+                    '^/wdfn': '/editor/fmap',
                 },
             },
-            "/serve": {
-                target: "http://192.168.200.87:8088",
+            '/serve': {
+                target: 'http://192.168.200.87:8088',
                 changeOrigin: true,
                 pathRewrite: {
-                    "^/serve": "",
+                    '^/serve': '',
+                },
+            },
+            '/version': {
+                target: 'http://mapapp.wanda.cn/',
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/version': '/sgmap/mapversion',
                 },
             },
         },
@@ -32,19 +39,19 @@ module.exports = {
         },
     },
     chainWebpack: (config) => {
-        const svgRule = config.module.rule("svg")
+        const svgRule = config.module.rule('svg')
         svgRule.uses.clear()
         svgRule
-            .use("babel-loader")
-            .loader("babel-loader")
+            .use('babel-loader')
+            .loader('babel-loader')
             .end()
-            .use("vue-svg-loader")
-            .loader("vue-svg-loader")
+            .use('vue-svg-loader')
+            .loader('vue-svg-loader')
     },
     lintOnSave: false,
-    publicPath: "/wandaBmGuide",
+    publicPath: '/wandaBmGuide',
     // 打包名称
-    outputDir: "wandaBmGuide",
+    outputDir: 'wandaBmGuide',
     // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录
-    assetsDir: "static",
-}
+    assetsDir: 'static',
+}