guoxiaohuan 4 年 前
コミット
11f47d1890
6 ファイル変更1569 行追加317 行削除
  1. 4 4
      public/systemConf.js
  2. 135 170
      src/App.vue
  3. 7 7
      src/components/Legend/src/legend.vue
  4. 4 4
      src/router/index.js
  5. 8 20
      src/store/index.js
  6. 1411 112
      src/views/analysis/index.vue

+ 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/', //管理书地址
     },

+ 135 - 170
src/App.vue

@@ -1,104 +1,81 @@
 <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";
-window.fengmapData = null;
+import { mapGetters, mapActions, mapMutations } from 'vuex'
+import { SFengParser } from '@saga-web/feng-map'
+window.fengmapData = null
 export default {
-  data() {
-    return {
-      view: "",
-      scene: "",
-      id: "2",
-      canvasID: "",
-      key: "23f30a832a862c58637a4aadbf50a566",
-      appName: "万达可视化系统",
-      mapServerURL: `http://map.wanda.cn/editor`
-    };
-  },
-  mounted() {
-    const state = this.$store.state;
-    sessionStorage.setItem("STATE", JSON.stringify(state));
-    // 监听页面刷新事件
-    window.addEventListener("unload", this.unload);
-
-    // 页面加载完成后,移除session里的存储的信息
-    window.addEventListener("load", this.load);
-    // 请求该项目下的楼层数据
-    // this.getFengMap();
-  },
-  computed: {
-    ...mapGetters(["plazaId", "fmapID", "haveFengMap"])
-  },
-  methods: {
-    ...mapActions(["getfmapID"]),
-    ...mapMutations(["SETHAVEFENGMAP"]),
-    load () {
-      const state = this.$store.state;
-      sessionStorage.setItem("STATE", JSON.stringify(state));
-    },
-    unload() {
-      // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
-       sessionStorage.clear()
-      
-    },
-    /**
-     * 刷新保存vuex信息
-     */
-    created() {
-        this.$store.replaceState(Object.assign(this.$store.state, JSON.parse(localStorage.getItem('beforeunload'))))
-        localStorage.removeItem('beforeunload')
-        window.addEventListener('beforeunload', () => {
-            let state = JSON.stringify(this.$store.state)
-            localStorage.setItem('beforeunload', state)
-        })
+    data() {
+        return {
+            view: '',
+            scene: '',
+            id: '2',
+            canvasID: '',
+            key: '23f30a832a862c58637a4aadbf50a566',
+            appName: '万达可视化系统',
+            mapServerURL: `http://map.wanda.cn/editor`
+        }
     },
     mounted() {
-        window.vm = this
         // 监听页面刷新事件
-        // window.addEventListener('unload', this.unload)
+        window.addEventListener('unload', this.unload)
         // 页面加载完成后,移除session里的存储的信息
-        // window.addEventListener('load', this.load)
+        window.addEventListener('load', this.load)
         // 请求该项目下的楼层数据
-        this.getFengMap()
+        // this.getFengMap();
     },
-    getFengMap() {
-      if (!this.fmapID) {
-        this.getfmapID().then(() => {
-          this.getMap();
-        });
-        return;
-      }
-      this.getMap();
+    computed: {
+        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap'])
     },
-    getMap() {
-      if (!window.fengmapData) {
-        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 => {
-              this.SETHAVEFENGMAP();
-            });
-        });
-      }
+    methods: {
+        ...mapActions(['getfmapID']),
+        ...mapMutations(['SETHAVEFENGMAP']),
+        unload() {
+            // const { userInfo, projectId, menuStatus,manualAutoMode } = this.$store.state;
+            const state = this.$store.state
+            sessionStorage.setItem('state', JSON.stringify(state))
+        },
+        mounted() {
+            // 监听页面刷新事件
+            window.addEventListener('unload', this.unload)
+            // 页面加载完成后,移除session里的存储的信息
+            window.addEventListener('load', this.load)
+            // 请求该项目下的楼层数据
+            this.getFengMap()
+        },
+        getFengMap() {
+            if (!this.fmapID) {
+                this.getfmapID().then(() => {
+                    this.getMap()
+                })
+                return
+            }
+            this.getMap()
+        },
+        getMap() {
+            if (!window.fengmapData) {
+                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 => {
+                        this.SETHAVEFENGMAP()
+                    })
+                })
+            }
+        }
     }
-  }
-};
+}
 </script>
 <style lang="less">
 body,
@@ -126,8 +103,8 @@ input,
 textarea,
 th,
 td {
-  margin: 0;
-  padding: 0;
+    margin: 0;
+    padding: 0;
 }
 
 body,
@@ -135,7 +112,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,
@@ -144,7 +121,7 @@ h3,
 h4,
 h5,
 h6 {
-  font-size: 100%;
+    font-size: 100%;
 }
 
 address,
@@ -154,145 +131,133 @@ 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: 100%;
+    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,

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

@@ -270,11 +270,11 @@ export default {
                         remarksText = Res
                     } else {
                         if (this.planNum && this.typeNum) {
-                            remarksText = `${this.text1}${this.text2}`
+                            remarksText = `1.${this.text1}2.${this.text2}`
                         } else if (this.planNum) {
-                            remarksText = `${this.text1}`
+                            remarksText = `1.${this.text1}`
                         } else if (this.typeNum) {
-                            remarksText = `${this.text2}`
+                            remarksText = `1.${this.text2}`
                         } else {
                             remarksText = ''
                         }
@@ -377,13 +377,13 @@ export default {
                 }
                 let remarksTexts = ''
                 if (this.planNum && this.typeNum) {
-                    remarksTexts = `${this.text1}${this.text2}`
+                    remarksText = `1.${this.text1}2.${this.text2}`
                 } else if (this.planNum) {
-                    remarksTexts = `${this.text1}`
+                    remarksText = `1.${this.text1}`
                 } else if (this.typeNum) {
-                    remarksTexts = `${this.text2}`
+                    remarksText = `1.${this.text2}`
                 } else {
-                    remarksTexts = ''
+                    remarksText = ''
                 }
                 this.$store.commit('SETREMARKSTEXT', remarksTexts)
                 this.$nextTick(() => {

+ 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'),

+ 8 - 20
src/store/index.js

@@ -8,8 +8,8 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        ssoToken: 'admin:xuliping',
-        // ssoToken: null,
+        // ssoToken: 'admin:lengqiang',
+        ssoToken: null,
         plazaName: '',
         isPreview: false,
         lastRoute: '',
@@ -131,34 +131,22 @@ export default new Vuex.Store({
     actions: {
         // 获取项目列表、userId
         async getUserInfo({ commit }, palyload) {
-            await login({}).then((res) => {
+            await login({ returnTree: true }).then((res) => {
                 // 获取用户当前权限
-                console.log(res)
                 if (res.result === 'success') {
                     commit('STOREACCESSLEVEL', res.level)
                     let level = res.level
                     if (level === 0) {
-                        router.push({
-                            path: './home/homepage',
-                        })
+                        if (res.treeData[0].ccode) {
+                            localStorage.setItem('PLAZAID', res.treeData[0].ccode)
+                        }
+                        router.push({ path: './home/homepage' })
                     } else {
-                        router.push({
-                            path: './group',
-                        })
+                        router.push({ path: './group' })
                     }
                     // commit('SETISREQUESTtAUTH', false)
                 }
             })
-            // token校验成功 拿到权限
-            //commit("SETISREQUESTtAUTH", true)
-            //     if (res.permissions.length == 0) {
-            //         router.push('/404')
-            //     }
-            //     commit('SETAUTHMSG', res)
-            // } else {
-            //     commit('SETISREQUESTtAUTH', false)
-            //     router.push('/404')
-            // }
         },
         getFloors(context) {
             queryFloor({

ファイルの差分が大きいため隠しています
+ 1411 - 112
src/views/analysis/index.vue