Ver código fonte

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

haojianlong 4 anos atrás
pai
commit
f5cb9d1330

+ 12 - 1
public/index.html

@@ -1,3 +1,11 @@
+<!--
+ * @Author: your name
+ * @Date: 2020-06-28 13:40:38
+ * @LastEditTime: 2020-07-16 16:19:35
+ * @LastEditors: Please set LastEditors
+ * @Description: In User Settings Edit
+ * @FilePath: \wanda-bm-guide\public\index.html
+--> 
 <!DOCTYPE html>
 <html lang="en">
 <head>
@@ -13,6 +21,9 @@
             background-color:transparent!important;
             border:none!important;
             box-shadow:none!important;
+        } 
+        .leaflet-popup-close-button{
+            display: none;
         }
         .leaflet-container{
             background: #f7f9fa!important;
@@ -65,7 +76,7 @@
         .leaflet-mypopup-content .line span:nth-of-type(3) em{
             font-size: 12px;
             color: #F54E45;
-        }
+        } 
     </style>
     <script>
         var remHandle = function () {

+ 4 - 4
public/systemConf.js

@@ -24,11 +24,11 @@ var __systemConf = {
     systemCode: 'wandaBmGuide',
     conf: {
         // 阿里云
-        editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
-        wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
+        // editerUrl: 'http://60.205.177.43:80/wandaEditer/', // 编辑器地址
+        // wandaBmGuideUrl: 'http://60.205.177.43:80/wandaBmGuide/', //管理书地址
         // http://glsms.wanda-dev.cn/ 测试服
-        // editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
-        // wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
+        editerUrl: 'http://glsms.wanda-dev.cn/wandaEditer/', // 编辑器地址
+        wandaBmGuideUrl: 'http://glsms.wanda-dev.cn/wandaBmGuide/', //管理书地址
         // editerUrl: 'http://localhost:8091/wandaEditer/', // 编辑器地址
         // wandaBmGuideUrl: 'http://localhost:8090/wandaBmGuide/', //管理书地址
     },

+ 6 - 3
src/App.vue

@@ -19,7 +19,8 @@ export default {
             appName: '万达可视化系统',
             mapServerURL: `http://map.wanda.cn/editor`,
             mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
-            isMounted: false
+            isMounted: false,
+            plazaIds: ''
         }
     },
     /**
@@ -37,6 +38,8 @@ export default {
     },
     mounted() {
         this.isMounted = true
+        this.plazaIds = localStorage.getItem('PLAZAID')
+        console.log(this.plazaIds)
     },
     computed: {
         ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel'])
@@ -67,7 +70,7 @@ export default {
         }
     },
     watch: {
-        plazaId(plazaId) {
+        plazaIds(plazaId) {
             console.log('获取到id', plazaId)
             window.fengmapData = null
             // 当获取到到项目id,请求底图
@@ -79,7 +82,7 @@ export default {
             }
         },
         isMounted(isMounted) {
-            if (isMounted && this.plazaId) {
+            if (isMounted && this.plazaIds) {
                 this.getFengMap()
             }
         }

+ 4 - 4
src/router/index.js

@@ -5,10 +5,10 @@ import { query } from '@/utils/query'
 
 Vue.use(VueRouter)
 const routes = [
-    // {
-    //     path: '/',
-    //     redirect: '/home/overview', // 只有区域,及区域以上用户才能进入总部首页这一套
-    // },
+    {
+        path: '/',
+        redirect: '/home/overview', // 只有区域,及区域以上用户才能进入总部首页这一套
+    },
     {
         path: '/404',
         component: () => import('../components/404'),

+ 22 - 11
src/store/index.js

@@ -154,23 +154,34 @@ export default new Vuex.Store({
                 if (res.result === 'success') {
                     commit('STOREACCESSLEVEL', res.level)
                     let level = res.level
-                    if (level === 0) {
-                        if (res.treeData[0].ccode) {
-                            localStorage.setItem('PLAZAID', res.treeData[0].ccode)
-                            commit('STOREPLAZAID', res.treeData[0].ccode)
-                            commit('SETPLAZENAME', res.treeData[0].cname)
-                        }
+                    if (window.opener) {
+                        let data = window.opener.__fromGroupPage
+                        level = data.level
+                        commit('SETPLAZENAME', data.plazaName)
+                        localStorage.setItem('PLAZAID', data.plazaId)
+                        commit('STOREPLAZAID', data.plazaId)
                         router.push({ path: './home/homepage' })
                     } else {
-                        router.push({ path: './group' })
+                        if (level === 0) {
+                            if (res.treeData[0].ccode) {
+                                localStorage.setItem('PLAZAID', res.treeData[0].ccode)
+                                commit('STOREPLAZAID', res.treeData[0].ccode)
+                                commit('SETPLAZENAME', res.treeData[0].cname)
+                            }
+                            router.push({ path: './home/homepage' })
+                        } else {
+                            router.push({ path: './group' })
+                        }
                     }
                     // commit('SETISREQUESTtAUTH', false)
+
+                    // commit('SETISREQUESTtAUTH', false)
                 }
             })
         },
         getFloors(context) {
             queryFloor({
-                plazaId: context.state.plazaId || localStorage.getItem('PLAZAID'),
+                plazaId: localStorage.getItem('PLAZAID') || context.state.plazaId,
             }).then((res) => {
                 if (res.result == 'success') {
                     context.commit('SETFLOORS', res.data)
@@ -179,14 +190,14 @@ export default new Vuex.Store({
         },
         async getfmapID(context) {
             await queryfmapID({
-                mapId: context.state.plazaId,
+                mapId: localStorage.getItem('PLAZAID') || context.state.plazaId,
             }).then((res) => {
-                context.commit('SETMAPID', `${context.state.plazaId}_${res.mapVersion}`)
+                context.commit('SETMAPID', `${localStorage.getItem('PLAZAID') || context.state.plazaId}_${res.mapVersion}`)
             })
         },
         async getBrand(context) {
             let data = {
-                plazaId: context.state.plazaId,
+                plazaId: `${localStorage.getItem('PLAZAID') || context.state.plazaId}`,
             }
             await queryBrand({
                 data,

Diferenças do arquivo suprimidas por serem muito extensas
+ 462 - 464
src/utils/ganttChart/GanttChart_day.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 481 - 468
src/utils/ganttChart/GanttChart_month.js


+ 5 - 5
src/views/analysis/GanttChart.vue

@@ -384,7 +384,7 @@ export default {
               viewWidth: width,
               cWidth: 3 * width,
               tasks: taskData,
-              daysCount: this.timeType === 'month'? 365 : parseInt((3 * width) / 40),
+              daysCount: this.timeType === 'month'? (365*1.5) : parseInt((3 * width) / 40),
               callback: this.showDialog,
               pageToCallback: (data)=>{
                 const { startAt, endAt } = data;
@@ -465,16 +465,16 @@ export default {
           } = data;
           let color;
           switch (statusType) {
-            case 1:
+            case 0:
               color = ['#c3c7cb', '#e7e9ea'];
               break
-            case 2:
+            case 1:
               color = ['#5b8ff9', '#5b8ff933'];
               break
-            case 3:
+            case 2:
               color = ['#f58300', '#fbce99'];
               break
-            case 4:
+            case 3:
               color = ['#f54e45', '#fbb8b5'];
               break
             default:

+ 1 - 6
src/views/equipment/index.vue

@@ -230,12 +230,7 @@ export default {
         this.$refs.floorMap.init(this.floorInfo.gname)
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId', 'showView', 'legendTable']),
-        Height() {
-            console.log(document.body.clientHeight)
-            // return document.body.clientHeight
-            return 300
-        }
+        ...mapGetters(['floorsArr', 'plazaId', 'showView', 'legendTable'])
     }
 }
 </script>

+ 1 - 0
src/views/homepage/index.vue

@@ -434,6 +434,7 @@ export default {
                     align-items: center;
                     padding: 6px;
                     border-bottom: 1px solid #e4e6e7;
+                    font-size: 1.4rem;                   
                     article {
                         margin-right: 10px;
                     }

+ 81 - 69
src/views/statistics/index.vue

@@ -168,16 +168,16 @@ export default {
             toolTipHtml:'',
             crumbsHtml: [],
             zoneNames: {
-                东北: 'dongbei',
-                西北: 'xibei',
-                华北: 'huabei',
-                华中: 'huazhong',
-                华东: 'huadong',
-                中南: 'zhongnan',
-                西南: 'xinan',
-                华南: 'huanan',
-                东南: 'dongnan',
-                其他: 'Other'
+                "东北": 'dongbei',
+                "西北": 'xibei',
+                "华北": 'huabei',
+                "华中": 'huazhong',
+                "华东": 'huadong',
+                "中南": 'zhongnan',
+                "西南": 'xinan',
+                "华南": 'huanan',
+                "东南": 'dongnan',
+                "其他": 'Other'
             },
             provinceCities: {
                 "青岛区域": { province: 'shandong', center: [36.06667, 120.33333], zoom: 8 },
@@ -338,6 +338,9 @@ export default {
             } else {
                 this.queryPlazaInfoCount(data.ccode, data.level)
             }
+            if (data.level !== 0) {
+                this.getSystemList(data.ccode, data.level) 
+            }
             this.getEventStatusData(this.currentLevel, data.ccode)
             this.createNavpathByData(data)
             this.currentZoneData = data
@@ -351,12 +354,21 @@ export default {
                 let res = this.provinceCities[JSONName]
                 this.pantProjectsMap(data, this.currentSysId)
             } else {
-                this.$router.push({path:'/home/homePage'})  // 点击广场时 直接跳转到详情页  地图不用响应
+                let pathData = {fromGroup: 'true'}
+                let routeData = this.$router.resolve({ // 点击广场时 直接跳转到详情页  地图不用响应
+                    name:'/home/homePage',
+                })
+                window.open(routeData.href, '_blank');
+                window.__fromGroupPage = {
+                    level: 0,
+                    plazaName: data.cname,
+                    plazaId: data.ccode
+                }
                 this.$store.commit('SETPLAZENAME', data.cname) 
-                localStorage.setItem('PLAZAID', data.ccode)
-                 this.$store.commit('STOREPLAZAID', data.ccode) 
-                 this.$store.commit('SETISGETMAP',true)
-            }
+                localStorage.setItem('PLAZAID', data.ccode)       
+                this.$store.commit('STOREPLAZAID', data.ccode) 
+                this.$store.commit('SETISGETMAP',true)                
+            }  
         },
    
         /**
@@ -666,7 +678,9 @@ export default {
                 attributionControl: false,
                 contextmenu: true,
                 contextmenuWidth: 140,
-                dragging: false
+                dragging: false,
+                closePopupOnClick:true,
+                doubleClickZoom:false
             })
             let JsonData = require('../../assets/geoData/china.json')
             let layer = L.geoJSON(JsonData.features, {
@@ -720,6 +734,7 @@ export default {
             this.currentSelectedSys = system
             this.currentSysId = system.smsxt
             //1集团 2中心 3区域 0广场
+            this.clearAllLayers()
             if (this.currentLevel === 1) {
                 this.pantGroupMap(this.currentZoneData, system.smsxt)
             } else if (this.currentLevel === 2) {
@@ -778,13 +793,12 @@ export default {
                     let center = this.zoneCenter[zone]
                     let contentHtml = that.createPopupHtmlContent(item.list.assetTypeList, item.fullName)
                     if (contentHtml) {
-                        this.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.name , 'group')
+                        this.createPointOnMap(item.num, groupLayer, contentHtml, center, item.data, item.name , 'group', 4)
                     }
                 })
             })
             groupLayer.addTo(myMaps)
         },
-       
         /**
          * 用于绘制中心下的地图
          */
@@ -795,14 +809,8 @@ export default {
             let zoom, inner, outer, offset
             if (['xibei'].includes(zone)) {
                 zoom = 5
-                inner = 20000
-                outer = 40000
-                offset = 1
             } else {
                 zoom = 6
-                inner = 10000
-                outer = 20000
-                offset = 0.5
             }
             this.panTo(this.zoneCenter[zone], zoom)
             let that = this
@@ -830,7 +838,7 @@ export default {
                                     }
                                 })
                             }
-                            this.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'zone')
+                            that.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'zone', 6)
                         }
                     }
                 })
@@ -846,13 +854,13 @@ export default {
             let geo = this.provinceCities[data.cname]
             this.panTo(geo.center, geo.zoom)
             data.children.forEach(item => {
-                this.pantPlazaMap(item)
+                this.pantPlazaMap(item, geo.zoom)
             })
         },
         /**
          * 用于绘制广场的点
          */
-        pantPlazaMap(item, flag) {
+        pantPlazaMap(item, zoom) {
             let that = this
             let groupLayer = new L.layerGroup()
             if (flag) {
@@ -882,7 +890,7 @@ export default {
                                     }
                                 })
                             }
-                            this.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'project')
+                            that.createPointOnMap(num, groupLayer, contentHtml, center, item, item.cname, 'project', zoom)
                         }
                     }
                 }
@@ -892,7 +900,7 @@ export default {
          /**
          * 
          */
-        createPointOnMap (num, groupLayer, contentHtml, center, data,  name, type) {
+        createPointOnMap (num, groupLayer, contentHtml, center, data,  name, type , zoom) {
             let popup = null
             let marker = null
             let outCircle = null
@@ -902,42 +910,49 @@ export default {
                 html: name,
                 className: 'my-leaflet-div-icon',
                 iconSize: 30
-            })
-            setTimeout(()=>{
-                let zoom = myMaps.getZoom()
-                let sizes = this.circleSize[zoom]
-                if (color  && center) { 
-                    popup = L.popup({closeOnClick:true}).setLatLng(center).setContent(contentHtml)
-                    marker = L.marker([center[0] - sizes.offset,  center[1]], { icon: myIcon }).addTo(groupLayer)
-                    outCircle = L.circle(center, sizes.outer, { color: 'transparent', fillColor: color.border, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
-                    innerCircle =L.circle(center, sizes.inner, { color: 'transparent', fillColor: color.area, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
-                    let feaureGroup = L.featureGroup([marker, outCircle, innerCircle])
-                    feaureGroup.on('mouseover', ev => {
-                        popup.openOn(myMaps)
-                    })
-                    feaureGroup.on('click', ev => {
-                        this.currentZoneData = data
-                        this.currentLevel = data.level
-                        this.getEventStatusData(data.level, data.ccode)
-                        this.queryPlazaInfoCount(data.ccode, data.level) 
-                        groupLayer.clearLayers()
-                        this.createNavpathByData(data)
-                        if (type === 'group') {
-                            this.pantZonesMap(data, this.currentSysId)
-                        } 
-                        if (type === 'zone') {
-                            this.pantProjectsMap(data, this.currentSysId)
-                        } 
-                        if (type === 'project') {
-                            this.$router.push({path:'/home/homePage' })  
-                            this.$store.commit('SETPLAZENAME', data.cname) 
-                            localStorage.setItem('PLAZAID', data.ccode)
-                            this.$store.commit('STOREPLAZAID', data.ccode) ;
-                            this.$store.commit('SETISGETMAP',true)
-                        }   
-                    })
-                }
-            }, 200)
+            }) 
+            let sizes = this.circleSize[zoom]
+            if (color  && center) { 
+                popup = L.popup({closeOnClick:true}).setLatLng(center).setContent(contentHtml)
+
+                marker = L.marker([center[0] - sizes.offset,  center[1]], { icon: myIcon }).addTo(groupLayer)
+                outCircle = L.circle(center, sizes.outer, { color: 'transparent', fillColor: color.border, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
+                innerCircle =L.circle(center, sizes.inner, { color: 'transparent', fillColor: color.area, fillOpacity: 1 }).bindPopup(contentHtml).addTo(groupLayer)
+                let feaureGroup = L.featureGroup([marker, outCircle, innerCircle, popup])
+                feaureGroup.on('mouseover', ev => {
+                    popup.openOn(myMaps)
+                })
+                feaureGroup.on('click', ev => {
+                    this.currentZoneData = data
+                    this.currentLevel = data.level
+                    this.getEventStatusData(data.level, data.ccode)
+                    this.queryPlazaInfoCount(data.ccode, data.level) 
+                    groupLayer.clearLayers()
+                    this.createNavpathByData(data)
+                    if (type === 'group') {
+                        this.pantZonesMap(data, this.currentSysId)
+                    } 
+                    if (type === 'zone') {
+                        this.pantProjectsMap(data, this.currentSysId)
+                    } 
+                    if (type === 'project') {
+                        let routeData = this.$router.resolve({
+                            name:'/home/homePage',
+                        })
+                        window.open(routeData.href, '_blank');
+                        window.__fromGroupPage = {
+                            level: 0,
+                            plazaName: data.cname,
+                            plazaId: data.ccode
+                        }
+                        this.$store.commit('SETPLAZENAME', data.cname) 
+                        localStorage.setItem('PLAZAID', data.ccode)
+                         this.$store.commit('STOREPLAZAID', data.ccode) 
+                         this.$store.commit('SETISGETMAP',true)              
+                    }   
+                })
+            }
+          
         },
         /**
          * 生成弹框HTML
@@ -1352,9 +1367,6 @@ export default {
                             width: 20px;
                             margin-right: 12px;
                         }
-                        em{
-
-                        }
                     }
                 }
             }
@@ -1382,7 +1394,7 @@ export default {
                     padding: 0.8rem 1.6rem 1.6rem;
                     font-size: 1.4rem;
                     line-height: 2.2rem;
-                    background: rgba(247, 249, 250, 1);
+                    background: white;
                     border:1px solid rgba(151,151,151, 0.2);
                     filter: drop-shadow(0 2px 4px rgba(31, 35, 41, .1)) ;
                     .tip-triangle{