Browse Source

xxd - fjw 代码合并

fujunwen 5 years ago
parent
commit
a06d8b024e

+ 155 - 128
src/App.vue

@@ -1,25 +1,50 @@
 <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`,
-            mapthemeUrl: `http://map.wanda.cn/editor/webtheme`
-        }
+  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()
+      
     },
     mounted() {
         // 监听页面刷新事件
@@ -29,49 +54,39 @@ export default {
         // 请求该项目下的楼层数据
         this.getFengMap()
     },
-    computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'haveFengMap'])
+    getFengMap() {
+      if (!this.fmapID) {
+        this.getfmapID().then(() => {
+          this.getMap();
+        });
+        return;
+      }
+      this.getMap();
     },
-    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))
-        },
-        load() {
-            sessionStorage.clear()
-        },
-        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()
-                    })
-                })
-            }
-        }
+    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,
@@ -99,8 +114,8 @@ input,
 textarea,
 th,
 td {
-    margin: 0;
-    padding: 0;
+  margin: 0;
+  padding: 0;
 }
 
 body,
@@ -108,7 +123,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,
@@ -117,7 +132,7 @@ h3,
 h4,
 h5,
 h6 {
-    font-size: 100%;
+  font-size: 100%;
 }
 
 address,
@@ -127,133 +142,145 @@ 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;
-            }
-        }
-    }
-    //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%);
+  //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%
+    );
+  }
 }
 .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,

src/assets/images/图标/提示.png → src/assets/images/icons/notice.png


BIN
src/assets/images/图标/notice.png


+ 3 - 1
src/store/index.js

@@ -130,6 +130,9 @@ export default new Vuex.Store({
         STOREACCESSLEVEL(state, data) {
             state.accessLevel = data
         },
+        STOREPLAZAID(state, id) {
+            state.plazaId = id
+        }
     },
     actions: {
         // 获取项目列表、userId
@@ -141,7 +144,6 @@ export default new Vuex.Store({
                 console.log(res)
                 if (res.result === 'success') {
                     commit('STOREACCESSLEVEL', res.level)
-                    console.log("res.level", res.level)
                     let level = res.level
                     if (level === 0) {
                         router.push({ path: './home/homepage' })

+ 21 - 0
src/views/analysis/CoreDeviceReport.vue

@@ -509,6 +509,24 @@ export default {
       this.getDetailData(val);
     },
     /**
+     * 显示附件详情
+     */
+    showReportDetail(val) {
+      console.log('val', val)
+      if (type === 'equip') {
+        if (!val.file_type || !val.file_type_id) {
+          return
+        }
+      } else {
+        if (!val.attachments_num) {
+          return
+        }
+      }
+      this.showDetail = true;
+      this.detailTitle = '附件预览';
+      this.getDetailData(val);
+    },
+    /**
      * 获取图片/报告详情
      */
     getDetailData(val, type) {
@@ -694,6 +712,9 @@ export default {
       &:not(:last-of-type) {
         margin-bottom: 20px;
       }
+      .active>img{
+        border-color: rgba(31, 35, 41, 0.15);
+      }
     }
     .active > img {
       border-color: rgba(31, 35, 41, 0.15);

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

@@ -88,7 +88,7 @@
                 <div class="num">{{accessoryList.length}}张</div>
               </div>
               <div class="accessory-container" :style="{'max-height': accessoryIsExpand?'' : '115px'}">
-                <a :href="item.url" target="_blank" v-for="(item) in accessoryList" :key="'id_' + item.id" class="item">
+                <a :href="item.url?item.url : 'javascript:void(0)'" target="_blank" v-for="(item) in accessoryList" :key="'id_' + item.id" class="item">
                   <img src="../../assets/imgs/analysis/report_pdf.png" alt />
                   <div class="info" :title="item.name">{{item.name}}</div>
                 </a>
@@ -118,12 +118,12 @@
           <div class="detail-container">
             <div class="pictures-menu">
               <div v-for="(item) in pictureList" :key="'id_' + item.id" class="item" @click="changeCurImg(item.id)" :class="{'active': item.isActive}">
-                <img :src="item.url" alt="">
+                <img :src="item.url?item.url : ''" alt="">
                 <div class="name" :title="item.name">{{item.name}}</div>
               </div>
             </div>
             <div class="cur-img-container">
-              <img :src="curImg.url" alt="">
+              <img v-if="curImg && curImg.url" :src="curImg.url" alt="">
             </div>
           </div>
         </el-dialog>

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

@@ -111,7 +111,7 @@ export default {
         }
     },
     created () {
-        let plazaId = this.$route.query.plazaId
+        let plazaId = localStorage.getItem('PLAZAID')  
         if (plazaId) {
             this.plazaId = plazaId
         }

+ 103 - 22
src/views/statistics/index.vue

@@ -31,6 +31,7 @@
                     :isReadOnly='false'
                     :caption='"选择管理分区"'
                     :data='regulateDistrictData'
+                    placeholder="全部"
                     :disabled='false'
                     @change='selectProjectItem'
                 />
@@ -57,10 +58,10 @@
                             </div>
                             <div class='system-equipments' v-if='item.assetTypeList'>
                                 <div class='number' v-for='(equip , index) in item.assetTypeList' :key='index'>
-                                    <p>
-                                        {{equip.category_name}}
+                                    <div class="title">
+                                        <P>{{equip.category_name}}</p>
                                         <span v-if='equip.is_exception_num'>{{equip.is_exception_num}}</span>
-                                    </p>
+                                    </div>
                                     <p>
                                         <span>{{equip.asset_num}}</span>
                                         <span>台</span>
@@ -108,7 +109,14 @@
             </section>
             <section class='ratio-list'>
                 <section class='block' :style='panelStyle(item)' v-for='(item , index) in maintainList' :key='index'>
-                    <h4 class='section-title' @click='toggerPanel(item)'>{{item.title}}</h4>
+                    <h4 class='section-title' @click='toggerPanel(item)'>{{item.title}}<img @mouseenter="showToolTip(index, item.title)" @mouseleave="hideToolTip(index, item.title)" src="../../assets/images/icons/notice.png" /></h4>
+                    <transition name="selectDownUpExtendTop">
+                        <div class="tool-tip" v-if="item.showToolTip">
+                            <h5 style="font-weight:bold;">{{item.title + '比值'}}</h5>
+                            <p>{{item.title === '专维' ? '逾期未完成/即将到期任务数/任务总数' : '逾期未完成/任务总数'}}</p>
+                            <div class="tip-triangle" :style="{left: item.title === '第三方检测' ? '12.5rem': '7.8rem'}"> </div>
+                        </div>
+                    </transition>
                     <div class='list'>
                         <ul>
                             <li v-for='(option , index) in item.data' :key='index'>
@@ -157,6 +165,7 @@ import 'leaflet-contextmenu'
 export default {
     data() {
         return {
+            toolTipHtml:'',
             crumbsHtml: [],
             zoneNames: {
                 东北: 'dongbei',
@@ -254,11 +263,20 @@ export default {
         this.currentTime()
     },
     mounted() {
+    
         window.vm = this
         this.getFrameworkTreeData()
         window.addEventListener('resize', this.reinitalMap, false)
     },
-    methods: {
+    methods: {  
+        showToolTip (index, title) {
+            
+            this.maintainList.forEach(item => {item.showToolTip = false})
+            this.maintainList[index].showToolTip = true
+        },
+        hideToolTip (index, title) {
+            this.maintainList[index].showToolTip = false
+        },
         reinitalMap () {
             if (myMaps) {
                 myMaps.invalidateSize(true);
@@ -325,7 +343,9 @@ export default {
                 let res = this.provinceCities[JSONName]
                 this.pantProjectsMap(data, this.currentSysId)
             } else {
-                this.$router.push({path:'/home/homePage',query:{plazaId: data.cid}})  // 点击广场时 直接跳转到详情页  地图不用响应
+                this.$router.push({path:'/home/homePage'})  // 点击广场时 直接跳转到详情页  地图不用响应
+                this.$store.commit('SETPLAZENAME', data.cname) 
+                localStorage.setItem('PLAZAID', data.cid)
             }
         },
    
@@ -582,9 +602,9 @@ export default {
                 if (res.result === 'success') {
                     let data = res.data
                     let orginalObj = { 
-                        0:{title:'专维',data:[], expand: 0},
-                        1:{title:'维保',data:[], expand: 0},
-                        2:{title:'第三方检测',data:[], expand: 0}
+                        0:{title:'专维',data:[], expand: 0, showToolTip:false},
+                        1:{title:'维保',data:[], expand: 0, showToolTip:false},
+                        2:{title:'第三方检测',data:[], expand: 0, showToolTip:false}
                     }
                     let arr = []
                     for (let key in data) {
@@ -885,8 +905,10 @@ export default {
                             this.pantProjectsMap(data, this.currentSysId)
                         } 
                         if (type === 'project') {
-                            this.$router.push({path:'/home/homePage',query:{plazaId: data.cid}})  
-                        }
+                            this.$router.push({path:'/home/homePage' })  
+                            this.$store.commit('SETPLAZENAME', data.cname) 
+                            localStorage.setItem('PLAZAID', data.cid)
+                        }   
                     })
                 }
             }, 200)
@@ -895,7 +917,6 @@ export default {
          * 生成弹框HTML
          */
         createPopupHtmlContent(data, name) {
-            // return "<div>fdfdsfsdfdfds</div>"
             if (Array.isArray(data) && data.length) {
                 let that = this
                 let html = ''
@@ -940,12 +961,28 @@ export default {
         }
     },
     beforeDestroy() {
-        window.removeEventListener(this.reinitalMap, true)
+        window.removeEventListener('resize', this.reinitalMap)
     }
 }
 </script>
 
 <style scoped lang="less">
+@keyframes selectDownUpExtendTop {
+    from {
+        transform: translateY(8px);
+        opacity: 0;
+    }
+    to {
+        transform: translateY(0);
+        opacity: 1;
+    }
+}
+.selectDownUpExtendTop-enter-active {
+    animation: selectDownUpExtendTop .3s
+}
+.selectDownUpExtendTop-leave-active {
+    animation: selectDownUpExtendTop .3s reverse
+}
 .overview {
     height: 100vh;
     background: rgba(247, 249, 250, 1);
@@ -1095,6 +1132,8 @@ export default {
         height: calc(100vh - 98px);
         padding: 1.2rem 1.6rem;
         .section-title {
+            display: flex;
+            align-items: center;
             padding-left: 10px;
             border-left: 4px solid #025baa;
             color: #1f2429;
@@ -1102,7 +1141,12 @@ export default {
             font-weight: bolder;
             line-height: 2rem;
             cursor: pointer;
+            img{
+                width: 2rem;
+                margin-left: 1.2rem;
+            }
         }
+        
         .system-general {
             width: 25.4%;
             box-sizing: border-box;
@@ -1112,13 +1156,15 @@ export default {
             }
             .system-list {
                 ul {
+                    height: 80vh;
                     li.system-item {
                         display: flex;
                         justify-content: flex-start;
                         align-items: center;
                         width: calc(100% - 3.2rem);
+                        height: calc(100% / 8);
                         margin-left: 1.6rem;
-                        padding: 2rem 0;
+                        // padding: 1rem 0;
                         box-sizing: border-box;
                         border: 1px solid white;
                         border-radius: 4px;
@@ -1163,14 +1209,25 @@ export default {
                             padding-left: 1.4rem;
                             .number {
                                 width: 33.3%;
-                                p:nth-of-type(1) {
+                                margin-right: 1.2rem;
+                                .title{
+                                    display: inline-block;
                                     position: relative;
-                                    color: #1f2429;
-                                    font-size: 1.4rem;
-                                    line-height: 1.6rem;
+                                    p{
+                                        display: inline-block;
+                                        position: relative;
+                                        width: 100%;
+                                        color: #1f2429;
+                                        font-size: 1.4rem;
+                                        line-height: 1.6rem;
+                                        white-space: nowrap;
+                                        text-overflow: ellipsis;
+                                        overflow: hidden;
+                                    }
                                     span {
                                         position: absolute;
-                                        top: -10px;
+                                        top: -1.6rem;
+                                        right: -1rem;
                                         padding: 2px 4px;
                                         border-radius: 0.9rem;
                                         font-size: 1.2rem;
@@ -1247,9 +1304,9 @@ export default {
             }
             .map-container {
                 position: relative;
-                height: 70rem;
+                height: 70vh;
                 #map {
-                    height: 70rem;
+                    height: 70vh;
                     overflow: hidden;
                     pointer-events: none;
                 }
@@ -1281,11 +1338,35 @@ export default {
                 border-radius: 4px;
                 margin-bottom: 1rem;
                 background: white;
-                overflow: hidden;
+                // overflow: auto;
                 transition: height 0.3s ease-in-out;
                 .section-title {
                     font-size: 1.6rem;
                 }
+                .tool-tip{
+                    position: absolute;
+                    left: 0;
+                    top: -6.6rem;
+                    width: 100%;
+                    border-radius: 4px;
+                    padding: 0.8rem 1.6rem 1.6rem;
+                    font-size: 1.4rem;
+                    line-height: 2.2rem;
+                    background: rgba(247, 249, 250, 1);
+                    border:1px solid rgba(151,151,151, 0.2);
+                    filter: drop-shadow(0 2px 4px rgba(31, 35, 41, .1)) ;
+                    .tip-triangle{
+                        position: absolute;
+                        position: absolute;
+                        left: 7.8rem;
+                        border-style: solid;
+                        width: 0;
+                        height: 0;
+                        bottom: -6px;
+                        border-width: 6px 6px 0 6px;
+                        border-color: rgba(247, 249, 250, 1) transparent transparent transparent;
+                    }
+                }
                 .list {
                     margin-top: 1.4rem;
                     overflow: hidden;