소스 검색

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

zhulizhen1111 4 년 전
부모
커밋
38938b40cb
5개의 변경된 파일91개의 추가작업 그리고 79개의 파일을 삭제
  1. 1 1
      src/components/404.vue
  2. 1 1
      src/components/Legend/src/legend.vue
  3. 21 20
      src/components/floorMap/index.vue
  4. 61 50
      src/main.js
  5. 7 7
      src/views/room/index.vue

+ 1 - 1
src/components/404.vue

@@ -3,7 +3,7 @@
         <div class='not-img'>
             <img src='@/assets/imgs/dlsb.png' alt />
         </div>
-        <div class='not-text' v-if='!isPermissions'>
+        <div class='not-text' v-if='isPermissions'>
             <span>您的权限不足……</span>
             <span>建议您联系管理员开通管理说明书相关权限</span>
         </div>

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

@@ -379,7 +379,7 @@ export default {
                 this.isShow2()
             } else {
                 this.isShow2()
-                this.queryEditNum(this.editSwitch)
+                this.queryEditNum(true)
             }
             this.show2 = true
         },

+ 21 - 20
src/components/floorMap/index.vue

@@ -41,7 +41,7 @@ export default {
             floorid: '', //楼层id
             topologyParser: null, // 解析器数据
             fParser: null, // 底图解析器
-            wellMap: {}, // 电井控制商铺映射
+            wellMap: {} // 电井控制商铺映射
         }
     },
     props: {
@@ -204,14 +204,15 @@ export default {
                 let selectItem1 = ev[0][0],
                     name = selectItem1.data.Name,
                     location = selectItem1.data.AttachObjectIds[0] ? selectItem1.data.AttachObjectIds[0].id : ''
-                if (!location) {
-                    this.$message('未添加位置类型')
-                }
-                if (name.slice(name.length - 2, name.length) == '机房' && location) {
-                    this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
+                if (name.slice(name.length - 2, name.length) == '机房') {
+                    if (location) {
+                        this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
+                    } else {
+                        this.$message('未添加位置类型')
+                    }
                 }
                 // 选中电井设置电井关联的商铺高亮
-                this.setHightLight(ev[0]);
+                this.setHightLight(ev[0])
             } else {
                 this.clearHightLight()
             }
@@ -223,10 +224,10 @@ export default {
                 let location = item.data.AttachObjectIds[0] ? item.data.AttachObjectIds[0].id : ''
                 // 添加了位置类型并且选中的类型为电井类型
                 if (
-                    (item.data.GraphElementId == "100050" ||
-                    item.data.GraphElementId == "100055" ||
-                    item.data.GraphElementId == "100056" ||
-                    item.data.GraphElementId == "100057") &&
+                    (item.data.GraphElementId == '100050' ||
+                        item.data.GraphElementId == '100055' ||
+                        item.data.GraphElementId == '100056' ||
+                        item.data.GraphElementId == '100057') &&
                     location
                 ) {
                     if (this.wellMap.hasOwnProperty(location)) {
@@ -238,17 +239,17 @@ export default {
                         let getParams = {
                             plazaId: this.plazaId,
                             floor: this.floorid,
-                            keyword: `${location}:wellnum;`,
+                            keyword: `${location}:wellnum;`
                         }
-                        queryShops({getParams}).then(res => {
-                            let shopsnumList = [];
-                            let shopsnumItemList = [];
+                        queryShops({ getParams }).then(res => {
+                            let shopsnumList = []
+                            let shopsnumItemList = []
                             if (res.data && res.data.length) {
-                                for(let floor in res.data[0]) {
+                                for (let floor in res.data[0]) {
                                     if (res.data[0][floor].length) {
                                         res.data[0][floor].forEach(v => {
-                                            shopsnumList = shopsnumList.concat(v.shopsnumList.split(","))
-                                        }) 
+                                            shopsnumList = shopsnumList.concat(v.shopsnumList.split(','))
+                                        })
                                     }
                                 }
                             }
@@ -259,7 +260,7 @@ export default {
                                         item.zOrder = 30
                                         shopsnumItemList.push(item)
                                     }
-                                });
+                                })
                                 this.wellMap[location] = shopsnumItemList
                             }
                         })
@@ -269,7 +270,7 @@ export default {
         },
         // 清除电井关联商铺的高亮状态
         clearHightLight() {
-            for(let key in this.wellMap) {
+            for (let key in this.wellMap) {
                 this.wellMap[key].forEach(item => {
                     item.highLightFlag = false
                     item.zOrder = ItemOrder.spaceOrder

+ 61 - 50
src/main.js

@@ -1,55 +1,66 @@
-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';
-/////////////////
-// 在跳入路由之前要请求获取权限信息
-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');
-        yield store.dispatch('getBrand');
+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())
+        })
     }
-    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)
+
 new Vue({
     router,
     store,
     render: (h) => h(App),
-}).$mount('#app');
+}).$mount('#app')

+ 7 - 7
src/views/room/index.vue

@@ -7,7 +7,7 @@
     <div class='compute-box'>
         <el-dialog :title='`${systemName}`||"机房"' :visible.sync='visible' :fullscreen='true'>
             <div class='compute-span'></div>
-            <el-tooltip class='item' effect='dark' :content='content' placement='top'>
+            <el-tooltip class='item' effect='dark' :content='content' placement='top' v-if='smsxtArr.length>0'>
                 <div class='compute-zf' @click='jumpFloor'></div>
             </el-tooltip>
 
@@ -854,13 +854,13 @@ export default {
         },
         // 机房右上角的跳转 如果是在楼层功能打开的机房则要跳转到设备设施对应的系统\楼层 反之亦然
         jumpFloor() {
-            if (this.smsxtArr.smsxt) {
-                if (location.pathname.split('/')[3] == 'equipment') {
-                    this.$router.push({ path: '/home/floorFunc' })
-                } else {
-                    this.$router.push({ path: '/home/equipment', query: { smsxt: this.smsxtArr.smsxt } })
-                }
+            // if (this.smsxtArr.smsxt) {
+            if (location.pathname.split('/')[3] == 'equipment') {
+                this.$router.push({ path: '/home/floorFunc' })
+            } else {
+                this.$router.push({ path: '/home/equipment', query: { smsxt: this.smsxtArr.smsxt } })
             }
+            // }
         }
     },
     mounted() {}