Переглянути джерело

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

YaolongHan 4 роки тому
батько
коміт
eff7e6a4b2
3 змінених файлів з 222 додано та 242 видалено
  1. 218 238
      src/App.vue
  2. 2 2
      src/assets/css/rotation.css
  3. 2 2
      src/assets/css/rotation.less

+ 218 - 238
src/App.vue

@@ -1,153 +1,145 @@
 <template>
-  <div id="app">
-    <div :id="`fengMap${id}`" class="fengMap"></div>
-    <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";
-import { setFloor } from "@/api/public.js";
-window.fengmapData = null;
+import { mapGetters, mapActions, mapMutations } from 'vuex'
+import { SFengParser } from '@saga-web/feng-map'
+import { setFloor } from '@/api/public.js'
+window.fengmapData = null
 export default {
-  data() {
-    return {
-      view: "",
-      scene: "",
-      id: "2",
-      canvasID: "",
-      key: "23f30a832a862c58637a4aadbf50a566",
-      appName: "万达可视化系统",
-      mapServerURL: `http://map.wanda.cn/editor`,
-      mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
-      isMounted: false,
-      plazaIds: ""
-    };
-  },
-  /**
-   * 刷新保存vuex信息
-   */
-  created() {
-    let beforeunload = JSON.parse(localStorage.getItem("beforeunload"));
-    // 删除 store中的ssoToken
-    if (beforeunload) {
-      delete beforeunload.ssoToken;
-      delete beforeunload.plazaId;
-      delete beforeunload.isPreview;
-    }
+    data() {
+        return {
+            view: '',
+            scene: '',
+            id: '2',
+            canvasID: '',
+            key: '23f30a832a862c58637a4aadbf50a566',
+            appName: '万达可视化系统',
+            mapServerURL: `http://map.wanda.cn/editor`,
+            mapthemeUrl: `http://map.wanda.cn/editor/webtheme`,
+            isMounted: false,
+            plazaIds: '',
+        }
+    },
+    /**
+     * 刷新保存vuex信息
+     */
+    created() {
+        let beforeunload = JSON.parse(localStorage.getItem('beforeunload'))
+        // 删除 store中的ssoToken
+        if (beforeunload) {
+            delete beforeunload.ssoToken
+            delete beforeunload.plazaId
+            delete beforeunload.isPreview
+        }
 
-    let plazaId = localStorage.getItem("PLAZAID");
-    let isPreview = sessionStorage.getItem("SETISPREVIEW");
-    this.$store.replaceState(
-      Object.assign(this.$store.state, beforeunload, { plazaId, isPreview })
-    );
-    //    刷新时,将haveFengMap 置为false,解决设备设施页面,刷新时不出新楼层图的问题
-    this.SETHAVEFENGMAP(false);
-    localStorage.removeItem("beforeunload");
-    window.addEventListener("beforeunload", () => {
-      let state = JSON.stringify(this.$store.state);
-      localStorage.setItem("beforeunload", state);
-    });
-  },
-  mounted() {
-    this.isMounted = true;
-    this.plazaIds = localStorage.getItem("PLAZAID");
-  },
-  computed: {
-    ...mapGetters(["plazaId", "fmapID", "haveFengMap", "accessLevel"])
-  },
-  methods: {
-    ...mapActions(["getfmapID"]),
-    ...mapMutations(["SETHAVEFENGMAP"]),
-    getFengMap() {
-      this.getfmapID().then(() => {
-        this.getMap();
-      });
+        let plazaId = localStorage.getItem('PLAZAID')
+        let isPreview = sessionStorage.getItem('SETISPREVIEW')
+        this.$store.replaceState(Object.assign(this.$store.state, beforeunload, { plazaId, isPreview }))
+        //    刷新时,将haveFengMap 置为false,解决设备设施页面,刷新时不出新楼层图的问题
+        this.SETHAVEFENGMAP(false)
+        localStorage.removeItem('beforeunload')
+        window.addEventListener('beforeunload', () => {
+            let state = JSON.stringify(this.$store.state)
+            localStorage.setItem('beforeunload', state)
+        })
+    },
+    mounted() {
+        this.isMounted = true
+        this.plazaIds = localStorage.getItem('PLAZAID')
+    },
+    computed: {
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap', 'accessLevel']),
     },
-    getMap() {
-      //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
-      // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
-      //     let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
-      //     setFloor({ plazaId: this.plazaIds }, arr)
-      //     .then(res => {
-      //       console.log("缓存楼层", res);
-      //     })
-      //     .catch(error => {
-      //       console.log("缓存楼层", error);
-      //     });
-      //     return
-      //   }
+    methods: {
+        ...mapActions(['getfmapID']),
+        ...mapMutations(['SETHAVEFENGMAP']),
+        getFengMap() {
+            this.getfmapID().then(() => {
+                this.getMap()
+            })
+        },
+        getMap() {
+            //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
+            // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
+            //     let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
+            //     setFloor({ plazaId: this.plazaIds }, arr)
+            //     .then(res => {
+            //       console.log("缓存楼层", res);
+            //     })
+            //     .catch(error => {
+            //       console.log("缓存楼层", error);
+            //     });
+            //     return
+            //   }
 
-      window.fengmapData = new SFengParser(
-        `fengMap${this.id}`,
-        `${this.mapServerURL}/fmap/${this.fmapID}`,
-        this.key,
-        this.appName,
-        null,
-        this.mapthemeUrl
-      );
-      if (this.fmapID.includes("null")) {
-        this.SETHAVEFENGMAP(0);
-      }
-      window.fengmapData.loadMap(this.fmapID, (a, b) => {
-        const dataArr = b.map(item => {
-          return item.gname;
-        });
-        // 获取主题数据
-        window.fengmapData
-          .loadTheme(
-            `${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`
-          )
-          .then(res => {
-            this.SETHAVEFENGMAP(1);
-          });
-        // 缓存楼层数据
-        if (dataArr.length) {
-          //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
-          // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
-          //   let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
-          //   setFloor({ plazaId: this.plazaIds }, arr)
-          //   .then(res => {
-          //     console.log("缓存楼层", res);
-          //   })
-          //   .catch(error => {
-          //     console.log("缓存楼层", error);
-          //   });
-          //   return
-          // }
-          setFloor({ plazaId: this.plazaIds }, dataArr)
-            .then(res => {
-              console.log("缓存楼层", res);
+            window.fengmapData = new SFengParser(
+                `fengMap${this.id}`,
+                `${this.mapServerURL}/fmap/${this.fmapID}`,
+                this.key,
+                this.appName,
+                null,
+                this.mapthemeUrl
+            )
+            if (this.fmapID.includes('null')) {
+                this.SETHAVEFENGMAP(0)
+            }
+            window.fengmapData.loadMap(this.fmapID, (a, b) => {
+                const dataArr = b.map((item) => {
+                    return item.gname
+                })
+                // 获取主题数据
+                window.fengmapData.loadTheme(`${this.mapServerURL}/webtheme/${this.fmapID}/${this.fmapID}.theme`).then((res) => {
+                    this.SETHAVEFENGMAP(1)
+                })
+                // 缓存楼层数据
+                if (dataArr.length) {
+                    //如果项目为 南昌八一路 长春重庆路 青岛台东路 则不走楼层缓存接口
+                    // if(this.plazaIds == "1001064" || this.plazaIds == "1001065" || this.plazaIds == "1001066"){
+                    //   let arr = ["b2","b1","f1","f2","f3","f4","f5","f6","g80"];
+                    //   setFloor({ plazaId: this.plazaIds }, arr)
+                    //   .then(res => {
+                    //     console.log("缓存楼层", res);
+                    //   })
+                    //   .catch(error => {
+                    //     console.log("缓存楼层", error);
+                    //   });
+                    //   return
+                    // }
+                    setFloor({ plazaId: this.plazaIds }, dataArr)
+                        .then((res) => {
+                            console.log('缓存楼层', res)
+                        })
+                        .catch((error) => {
+                            console.log('缓存楼层', error)
+                        })
+                }
             })
-            .catch(error => {
-              console.log("缓存楼层", error);
-            });
-        }
-      });
-    }
-  },
-  watch: {
-    plazaId(plazaId) {
-      let plazaid = this.$route.query.plazaId
-        ? this.$route.query.plazaId
-        : plazaId;
-      console.log("获取到id", plazaid);
-      window.fengmapData = null;
-      // 当获取到到项目id,请求底图
-      if (plazaid) {
-        // 请求该项目下的楼层数据
-        this.getFengMap();
-      } else {
-        window.fengmapData = null;
-      }
+        },
     },
-    isMounted(isMounted) {
-      if (isMounted && this.plazaIds) {
-        this.getFengMap();
-      }
-    }
-  }
-};
+    watch: {
+        plazaId(plazaId) {
+            let plazaid = this.$route.query.plazaId ? this.$route.query.plazaId : plazaId
+            console.log('获取到id', plazaid)
+            window.fengmapData = null
+            // 当获取到到项目id,请求底图
+            if (plazaid) {
+                // 请求该项目下的楼层数据
+                this.getFengMap()
+            } else {
+                window.fengmapData = null
+            }
+        },
+        isMounted(isMounted) {
+            if (isMounted && this.plazaIds) {
+                this.getFengMap()
+            }
+        },
+    },
+}
 </script>
 <style lang="less">
 body,
@@ -175,8 +167,8 @@ input,
 textarea,
 th,
 td {
-  margin: 0;
-  padding: 0;
+    margin: 0;
+    padding: 0;
 }
 
 body,
@@ -184,7 +176,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,
@@ -193,7 +185,7 @@ h3,
 h4,
 h5,
 h6 {
-  font-size: 100%;
+    font-size: 100%;
 }
 
 address,
@@ -203,170 +195,158 @@ 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: 8px;
+    width: 5px;
+    height: 8px;
 }
 
 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;
 }
 
 #app {
-  //meri-design组件select的字体颜色
-  /deep/ .p-select-fakePlaceholder {
-    span {
-      span {
-        color: #606266 !important;
-        font-size: 13px;
-        font-weight: normal;
-      }
+    //meri-design组件select的字体颜色
+    /deep/ .p-select-fakePlaceholder {
+        span {
+            span {
+                color: #606266 !important;
+                font-size: 13px;
+                font-weight: normal;
+            }
+        }
+    }
+    //element 分页组件背景色
+    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+    }
+    //element button
+    /deep/ .el-button--primary,
+    .p-button-primary {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
     }
-  }
-  //element 分页组件背景色
-  /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
-    background: linear-gradient(
-      180deg,
-      rgba(54, 156, 247, 1) 0%,
-      rgba(2, 91, 170, 1) 100%
-    );
-  }
-  //element button
-  /deep/ .el-button--primary,
-  .p-button-primary {
-    background: linear-gradient(
-      180deg,
-      rgba(54, 156, 247, 1) 0%,
-      rgba(2, 91, 170, 1) 100%
-    );
-  }
 }
 .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%;
-  position: relative;
-  .fengMap {
-    position: fixed;
-    width: 100px;
-    height: 100px;
-    z-index: -1;
-    opacity: 0;
-  }
+    height: calc(100% - 26px) !important;
+    width: 100%;
+    position: relative;
+    .fengMap {
+        position: fixed;
+        width: 100px;
+        height: 100px;
+        z-index: -1;
+        opacity: 0;
+    }
 }
 // element表头背景颜色修改
 .core-device-report,
 .specification-update-record {
-  .el-table thead th {
-    background-color: #f8f9fa;
-  }
-  .el-pagination.is-background .el-pager li:not(.disabled).active {
-    background: linear-gradient(
-      180deg,
-      rgba(54, 156, 247, 1) 0%,
-      rgba(2, 91, 170, 1) 100%
-    );
-  }
+    .el-table thead th {
+        background-color: #f8f9fa;
+    }
+    .el-pagination.is-background .el-pager li:not(.disabled).active {
+        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+    }
 }
 // 说明书更新记录 element 时间控件样式重写
 .specification-update-record,
 .core-device-report {
-  .el-input__inner {
-    height: 32px;
-    line-height: 32px;
-  }
-  .el-date-editor .el-range__icon,
-  .el-date-editor .el-range-separator {
-    line-height: 26px;
-    width: 8%;
-  }
+    .el-input__inner {
+        height: 32px;
+        line-height: 32px;
+    }
+    .el-date-editor .el-range__icon,
+    .el-date-editor .el-range-separator {
+        line-height: 26px;
+        width: 8%;
+    }
 }
 .el-dialog__header {
-  border-bottom: 1px solid rgba(239, 240, 241, 1);
+    border-bottom: 1px solid rgba(239, 240, 241, 1);
 }
 .gantt-chart .el-dialog__title {
-  font-weight: 500;
+    font-weight: 500;
 }
 .img-detail-container {
-  .el-dialog__body {
-    padding-top: 0;
-    padding-bottom: 0;
-    padding-right: 0;
-  }
+    .el-dialog__body {
+        padding-top: 0;
+        padding-bottom: 0;
+        padding-right: 0;
+    }
 }
 </style>

+ 2 - 2
src/assets/css/rotation.css

@@ -64,7 +64,7 @@
 }
 .overview .view-box .view-left .lb-left {
   width: 100%;
-  height: 66%;
+  height: 64%;
   flex: 1;
   margin-top: 12px;
   margin-bottom: 10px;
@@ -101,7 +101,7 @@
   object-fit: fill;
 }
 .overview .view-box .view-left .lb-bottom {
-  height: 34%;
+  height: 36%;
   background: #ffffff;
   padding: 12px 16px;
 }

+ 2 - 2
src/assets/css/rotation.less

@@ -64,7 +64,7 @@
                 width: 100%;
                 // TODO: lb-left
                 // max-height: 300px;
-                height: 66%;
+                height: 64%;
                 // overflow: hidden;
                 flex: 1;
                 margin-top: 12px;
@@ -103,7 +103,7 @@
                 }
             }
             .lb-bottom {
-                height: 34%;
+                height: 36%;
                 background: #ffffff;
                 padding: 12px 16px;
                 nav {