Browse Source

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

zhulizhen1111 4 years ago
parent
commit
cc36ce72b5

+ 1 - 1
package.json

@@ -11,7 +11,7 @@
         "@saga-web/base": "2.1.22",
         "@saga-web/big": "1.0.66",
         "@saga-web/draw": "2.1.100",
-        "@saga-web/feng-map": "1.0.17",
+        "@saga-web/feng-map": "1.0.19",
         "@saga-web/graph": "2.1.101",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",

+ 3 - 2
src/App.vue

@@ -17,7 +17,8 @@ export default {
             canvasID: '',
             key: '23f30a832a862c58637a4aadbf50a566',
             appName: '万达可视化系统',
-            mapServerURL: `http://map.wanda.cn/editor`
+            mapServerURL: `http://map.wanda.cn/editor`,
+            mapthemeUrl: `http://map.wanda.cn/editor/webtheme`
         }
     },
     mounted() {
@@ -53,7 +54,7 @@ export default {
         },
         getMap() {
             if (!window.fengmapData) {
-                window.fengmapData = new SFengParser(`fengMap${this.id}`, `${this.mapServerURL}/fmap/${this.fmapID}`, this.key, this.appName, null)
+                window.fengmapData = new SFengParser(`fengMap${this.id}`, `${this.mapServerURL}/fmap/${this.fmapID}`, this.key, this.appName, null, this.mapthemeUrl)
                 window.fengmapData.loadMap(this.fmapID, () => {
                     // 获取主题数据
                     window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then(res => {

+ 1 - 1
src/components/mapClass/EditScence.js

@@ -593,7 +593,7 @@ export class EditScence extends SGraphScene {
                 borderStyle = SLineStyle.Dotted;
             }
             else if (val == 'solid') {
-                borderStyle = SLineStyle.Soild;
+                borderStyle = SLineStyle.Solid;
             }
             this.focusItem.lineStyle = borderStyle;
         }

+ 1 - 1
src/components/mapClass/EditScence.ts

@@ -609,7 +609,7 @@ export class EditScence extends SGraphScene {
             } else if (val == 'dotted') {
                 borderStyle = SLineStyle.Dotted
             } else if (val == 'solid') {
-                borderStyle = SLineStyle.Soild
+                borderStyle = SLineStyle.Solid
             }
             this.focusItem.lineStyle = borderStyle;
         }

+ 26 - 3
src/lib/items/SFHFQZoneLegendItem.ts

@@ -143,9 +143,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -166,6 +176,19 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

+ 26 - 3
src/lib/items/SSCPZZoneLegendItem.ts

@@ -151,9 +151,19 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -174,6 +184,19 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

+ 26 - 3
src/lib/items/SZoneLegendItem.ts

@@ -145,9 +145,19 @@ export class SZoneLegendItem extends SPolygonItem {
             if (data.Properties.font) {
                 this.font = new SFont("sans-serif", data.Properties.font);
             }
-            //    if( data.Properties.LineDash){
-            //     this.LineDash =this._legend.Properties.LineDash
-            //    }
+            switch (data.Properties.LineDash) {
+                case "solid":
+                    this.lineStyle = SLineStyle.Solid;
+                    break;
+                case "dotted":
+                    this.lineStyle = SLineStyle.Dotted;
+                    break;
+                case "dashed":
+                    this.lineStyle = SLineStyle.Dashed;
+                    break;
+                default:
+                    this.lineStyle = SLineStyle.Solid;
+            }
         }
         // 监听多边形创建完成事件,并动态计算文本位置
         this.connect("finishCreated", this, () => {
@@ -168,6 +178,19 @@ export class SZoneLegendItem extends SPolygonItem {
         this.data.Properties.FillColor = this.fillColor.value;
         this.data.Properties.StrokeColor = this.strokeColor.value;
         this.data.Properties.LineWidth = this.lineWidth;
+        switch (this.lineStyle) {
+            case SLineStyle.Solid:
+                this.data.Properties.LineDash = "solid";
+                break;
+            case SLineStyle.Dotted:
+                this.data.Properties.LineDash = "dotted";
+                break;
+            case SLineStyle.Dashed:
+                this.data.Properties.LineDash = "dashed";
+                break;
+            default:
+                this.data.Properties.LineDash = "solid";
+        }
         this.data.OutLine = this.getPointList.map(pos => {
             return {
                 X: pos.x,

+ 5 - 4
src/router/index.js

@@ -1,7 +1,9 @@
 import Vue from "vue"
 import store from "@/store"
 import VueRouter from "vue-router"
-import { query } from "@/utils/query"
+import {
+    query
+} from "@/utils/query"
 Vue.use(VueRouter)
 
 const routes = [
@@ -20,8 +22,7 @@ const routes = [
         name: "home",
         component: () => import("../views/index"),
         redirect: "/home/first",
-        children: [
-            {
+        children: [{
                 path: "first",
                 component: () => import("../views/first"),
             },
@@ -101,4 +102,4 @@ router.beforeEach(async (to, from, next) => {
         return
     }
 })
-export default router
+export default router

+ 36 - 9
src/store/index.js

@@ -1,7 +1,13 @@
 import Vue from "vue"
 import Vuex from "vuex"
-import { login, queryFloor, queryfmapID } from "@/api/login.js"
-import { queryBrand } from "@/api/public.js"
+import {
+    login,
+    queryFloor,
+    queryfmapID
+} from "@/api/login.js"
+import {
+    queryBrand
+} from "@/api/public.js"
 import axios from "axios"
 import router from "../router"
 
@@ -111,7 +117,9 @@ export default new Vuex.Store({
     },
     actions: {
         // 获取项目列表、userId
-        async getUserInfo({ commit }, palyload) {
+        async getUserInfo({
+            commit
+        }, palyload) {
             await login({}).then((res) => {
                 if (res.result == "success") {
                     // token校验成功 拿到权限
@@ -120,24 +128,41 @@ export default new Vuex.Store({
                     if (res.permissions.length == 0) {
                         //权限不足
                         console.log("权限不足!!")
-                        router.push({ path: "/404", query: { result: "权限不足" } })
+                        router.push({
+                            path: "/404",
+                            query: {
+                                result: "权限不足"
+                            }
+                        })
                     }
                     commit("SETAUTHMSG", res)
                 } else if (res.result == "no_auth") {
                     //登录失败
                     console.log("登录失败!!")
                     commit("SETISREQUESTtAUTH", false)
-                    router.push({ path: "/404", query: { result: "登录失败" } })
+                    router.push({
+                        path: "/404",
+                        query: {
+                            result: "登录失败"
+                        }
+                    })
                 } else {
                     //访问出错 500
                     console.log("访问出错!!")
                     commit("SETISREQUESTtAUTH", false)
-                    router.push({ path: "/404", query: { result: "访问出错" } })
+                    router.push({
+                        path: "/404",
+                        query: {
+                            result: "访问出错"
+                        }
+                    })
                 }
             })
         },
         getFloors(context) {
-            queryFloor({ plazaId: context.state.plazaId }).then((res) => {
+            queryFloor({
+                plazaId: context.state.plazaId
+            }).then((res) => {
                 if (res.result == "success") {
                     context.commit("SETFLOORS", res.data)
                 }
@@ -154,7 +179,9 @@ export default new Vuex.Store({
             let data = {
                 plazaId: context.state.plazaId,
             }
-            await queryBrand({ data }).then((res) => {
+            await queryBrand({
+                data
+            }).then((res) => {
                 let obj = {}
                 if (res.data.data) {
                     let Data = res.data.data
@@ -167,4 +194,4 @@ export default new Vuex.Store({
         },
     },
     modules: {},
-})
+})

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

@@ -619,21 +619,21 @@ export default {
     }
     .device-position {
         /deep/ .p-select-input-caption {
-            display: block;
+            display: block !important;
             width: 250px !important;
             max-width: 250px !important;
         }
     }
     .instructions {
         /deep/ .p-select-input-caption {
-            display: block;
+            display: block !important;
             width: 100px !important;
             max-width: 200px !important;
         }
     }
     .visualization {
         /deep/ .p-select-input-caption {
-            display: block;
+            display: block !important;
             width: 100px !important;
             max-width: 200px !important;
         }

+ 27 - 3
src/views/legendRules/index.vue

@@ -239,10 +239,22 @@ export default {
         init() {
             let getParams = {}
             getLegendTree({ getParams }).then(res => {
-                this.treeData = res.Content
+                // this.treeData = res.Content
+                this.treeData = this.recursion(res.Content)
                 this.getData()
             })
         },
+        recursion(arr) {
+            arr.map(i => {
+                i.selectable = true
+                if (i.Category && i.Category.length > 0) {
+                    i.selectable = false
+                    this.recursion(i.Category)
+                }
+                return i
+            })
+            return arr
+        },
         getData() {
             let postParams = this.GraphCategoryId
             let data = {}
@@ -263,6 +275,7 @@ export default {
     display: flex;
     flex-direction: column;
     color: #1f2329;
+
     .nav {
         height: 48px;
         line-height: 48px;
@@ -323,8 +336,19 @@ export default {
     .el-tree {
         background: rgba(247, 249, 250, 1);
     }
-    /deep/.ant-tree li .ant-tree-node-content-wrapper {
-        width: 90%;
+    // /deep/.ant-tree li .ant-tree-node-content-wrapper {
+    //     width: 90%;
+    // }
+    .ant-tree-treenode-selected {
+        background: #e1f2ff !important;
+        color: #0091ff !important;
+    }
+    /deep/ .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected {
+        background: transparent !important;
+        color: #0091ff !important;
+    }
+    /deep/ .ant-tree li .ant-tree-node-content-wrapper:hover {
+        background: transparent !important;
     }
     .is-current {
         background: #e1f2ff !important;