浏览代码

合并代码 解决冲突 代码修复

fujunwen 4 年之前
父节点
当前提交
9ee2e62267
共有 57 个文件被更改,包括 1375 次插入36075 次删除
  1. 0 3
      .gitignore
  2. 3 8
      public/index.html
  3. 6 4
      public/systemConf.js
  4. 0 9
      src/api/coreDeviceReport.js
  5. 0 1
      src/api/equipmentList.js
  6. 9 7
      src/api/httputils.js
  7. 6 1
      src/api/specificationUpdateRecord.js
  8. 0 39
      src/assets/CHN.geo2.json
  9. 0 31986
      src/assets/china.json
  10. 0 1594
      src/assets/cityData/济南区域.json
  11. 0 1447
      src/assets/cityData/青岛区域.json
  12. 1 0
      src/assets/geoData/china.json
  13. 二进制
      src/assets/provinceData.rar
  14. 83 34
      src/components/Legend/src/legend.vue
  15. 39 3
      src/components/Rotation/src/rotation.vue
  16. 91 51
      src/components/editLengend.vue
  17. 13 0
      src/components/floorList.vue
  18. 28 25
      src/components/floorMap/index.vue
  19. 3 3
      src/components/menuList.vue
  20. 5 4
      src/components/viewLengend.vue
  21. 1 1
      src/lib/items/SFHFQZoneLegendItem.js
  22. 1 1
      src/lib/items/SFHFQZoneLegendItem.ts
  23. 11 0
      src/lib/items/SImageLegendItem.js
  24. 58 48
      src/lib/items/SImageLegendItem.ts
  25. 1 1
      src/lib/items/SSCPZZoneLegendItem.js
  26. 1 1
      src/lib/items/SSCPZZoneLegendItem.ts
  27. 1 0
      src/lib/items/TipelineItem.js
  28. 1 0
      src/lib/items/TipelineItem.ts
  29. 5 21
      src/main.ts
  30. 38 37
      src/router/index.js
  31. 37 17
      src/store/index.js
  32. 45 29
      src/utils/ganttChart/GanttChart_day.js
  33. 9 5
      src/views/analysis/CoreDeviceReport.vue
  34. 1 0
      src/views/analysis/GanttChart.vue
  35. 4 2
      src/views/analysis/SpecificationUpdateRecord.vue
  36. 8 8
      src/views/analysis/index.vue
  37. 8 6
      src/views/equipment/eqDialog.vue
  38. 17 5
      src/views/equipment/index.vue
  39. 25 10
      src/views/equipment/table/djspTable.vue
  40. 13 2
      src/views/equipment/table/eqListTable.vue
  41. 13 1
      src/views/equipment/table/standTable.vue
  42. 1 0
      src/views/equipment/table/wbTable.vue
  43. 6 3
      src/views/equipment/table/wxTable.vue
  44. 31 13
      src/views/homepage/index.vue
  45. 13 9
      src/views/legendLibrary/addForm.vue
  46. 30 0
      src/views/legendLibrary/addLegend.vue
  47. 1 2
      src/views/legendLibrary/index.vue
  48. 3 3
      src/views/legendRules/index.vue
  49. 24 12
      src/views/other/index.vue
  50. 1 1
      src/views/other/zhsxDialog.vue
  51. 2 2
      src/views/other/zhsxOtherTable2.vue
  52. 30 9
      src/views/overview/index.vue
  53. 4 2
      src/views/overview/picModal.vue
  54. 11 4
      src/views/room/index.vue
  55. 1 1
      src/views/room/room1.vue
  56. 632 592
      src/views/statistics/index.vue
  57. 0 8
      vue.config.js

+ 0 - 3
.gitignore

@@ -1,9 +1,6 @@
 .DS_Store
 node_modules
 package-lock.json
-/src/assets/geoData
-/src/assets/regionData
-/src/assets/provinceData
 /dist
 # 忽略提交打包后的wandaBmGuide目录
 /wandaBmGuide 

+ 3 - 8
public/index.html

@@ -1,7 +1,5 @@
- 
 <!DOCTYPE html>
 <html lang="en">
-
 <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -16,15 +14,12 @@
             border:none!important;
             box-shadow:none!important;
         }
-        .my-leaflet-div-icon{
-            width: auto!important;
-            white-space: nowrap;
-            word-break: normal;
-        }
         .leaflet-container{
             background: #f7f9fa!important;
         }
-        
+        .my-leaflet-div-icon{
+            white-space: nowrap;
+        }
         .leaflet-popup-content-wrapper{
             padding: 0px!important;
             border-radius: 0px!important;

+ 6 - 4
public/systemConf.js

@@ -24,11 +24,13 @@ 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/', //管理书地址
     },
 }
 window.__systemConf = __systemConf

+ 0 - 9
src/api/coreDeviceReport.js

@@ -1,12 +1,3 @@
-/*
- * @Author: your name
- * @Date: 2020-07-03 19:04:47
- * @LastEditTime: 2020-07-12 11:15:12
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \wanda-bm-guide\src\api\coreDeviceReport.js
- */
-
 // 核心设备报表 接口
 import httputils from '@/api/httputils'
 /**

+ 0 - 1
src/api/equipmentList.js

@@ -1,4 +1,3 @@
- 
 import httputils from "@/api/httputils"
 
 // 设备设施-主要设备清单

+ 9 - 7
src/api/httputils.js

@@ -21,17 +21,19 @@ axiosservice.interceptors.request.use(
     (config) => {
         config.withCredentials = true // 允许携带token ,这个是解决跨域产生的相关问题
         let token = store.getters['ssoToken']
+        console.log()
         let isPreview = store.getters['isPreview']
-        if (config.url.indexOf('mapapp') < 0) {
-            config.headers = {
-                'sso-token': token,
-                isPreview: isPreview, //默认false,当预览开启的时候是true
-            }
-        }
+        // if (config.url.indexOf('mapapp') < 0) {
+        //     config.headers = {
+        //         'sso-token': token,
+        //         isPreview: isPreview, //默认false,当预览开启的时候是true
+        //     }
+        // }
         // if (config.url.indexOf('/data') > -1 && config.url !== '/data/data/auth/check') {
         if (config.url.indexOf('/data') > -1) {
             config.headers = {
-                'sso-token': 'admin:xiejialin1',
+                'sso-token': token,
+                isPreview: isPreview, //默认false,当预览开启的时候是true
             }
         }
         return config

+ 6 - 1
src/api/specificationUpdateRecord.js

@@ -1,6 +1,11 @@
 // 说明说更新记录 接口
 import httputils from "@/api/httputils";
 
+/**
+ * 获取事件类型
+ * @param {*} url 
+ * @param {*} param 
+ */
 export function queryEventypes(url, param) {
   return httputils.postJson(url, param);
 }
@@ -12,4 +17,4 @@ export function queryEventypes(url, param) {
  */
 export function getSpecificaltionData(url, param) {
   return httputils.getJson(url, param);
-}
+}

文件差异内容过多而无法显示
+ 0 - 39
src/assets/CHN.geo2.json


文件差异内容过多而无法显示
+ 0 - 31986
src/assets/china.json


文件差异内容过多而无法显示
+ 0 - 1594
src/assets/cityData/济南区域.json


文件差异内容过多而无法显示
+ 0 - 1447
src/assets/cityData/青岛区域.json


文件差异内容过多而无法显示
+ 1 - 0
src/assets/geoData/china.json


二进制
src/assets/provinceData.rar


+ 83 - 34
src/components/Legend/src/legend.vue

@@ -6,9 +6,9 @@
 <template>
     <div>
         <div class='legend-container'>
-            <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage'>图例</div>
+            <div :class='showView===1?"legend2":"legend"' @click='showTl' v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>图例</div>
             <!-- 图里展示状态组件 -->
-            <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage'>
+            <el-collapse-transition v-if='(type==1 || floors.length>0)&& isMessage && legendTable.length>0 '>
                 <div class='legend-tab' v-if='showView===1'>
                     <div class='legend-table2' v-if='systemName=="土建系统"'>
                         <lengend-view @changeSwitch='handleSwich' :remarksText='remarksText' ref='viewLengend' :systemName='systemName'></lengend-view>
@@ -19,11 +19,11 @@
                 </div>
             </el-collapse-transition>
             <!-- 图例编辑状态组件 -->
-            <el-collapse-transition @isShow2='isShow2'>
+            <el-collapse-transition>
                 <div v-if='showView===2'>
                     <lengend-edit
                         @handleSwich2='handleSwich2'
-                        v-if='editTable.length>=0'
+                        v-if='editTable.length>0'
                         :loading='loading1'
                         ref='editLen'
                         :editTable='editTable'
@@ -51,12 +51,12 @@
             </el-tooltip>
             <!-- 编辑图例 -->
             <el-tooltip effect='dark' content='编辑图例' placement='left'>
-                <p v-if='systemName != "土建系统" && isMessage' @click='editTl' class='tltk'>
+                <p v-if='systemName != "土建系统" && isMessage' @click='editTl' class='tltk-1'>
                     <img src='@/assets/imgs/bjtl.png' alt />
                 </p>
             </el-tooltip>
             <!-- 新增分布图 -->
-            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && !isMessage && type==0'>
+            <el-tooltip effect='dark' content='新增分布图' placement='left' v-if='floorSelect.length!=floors.length && type==0'>
                 <p class='tltk' style='margin-left: -5px;' @click='addFloor'>
                     <img src='@/assets/imgs/bjj.png' alt />
                 </p>
@@ -64,7 +64,13 @@
             <!-- 编辑分布图 -->
 
             <!-- 有修改权限 -->
-            <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' :content='editTips' placement='left'>
+            <el-tooltip
+                v-if='editPmt'
+                class='bjpmt'
+                effect='dark'
+                :content='editTips?editTips:`编辑${categoryId=="FZQZL"?"分水器支路分布图":"消防泵房引出管路分布图"}`'
+                placement='left'
+            >
                 <span class='edit-icon corner-con' @click='goToEditer'>
                     <img src='@/assets/imgs/bjs.png' alt />
                     <!-- 角标 -->
@@ -112,8 +118,6 @@ export default {
                 '<p>主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房</p>',
             text2: '<p>图例后×的数字,代表此位置的数量</p>',
             text2: '',
-            show: true,
-            show2: false,
             loading: true,
             loading1: true,
             viewTable: [],
@@ -137,16 +141,18 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView'])
+        ...mapGetters(['plazaId', 'fmapID', 'floorSelect', 'isMessage', 'ssoToken', 'showView', 'legendTable'])
     },
     props: {
         floors: {
+            //原理图中有数据楼层
             default: () => {
                 ;[]
             },
             type: Array
         },
         type: {
+            // 原理图类型 == 0 ;
             default: '1',
             type: String
         },
@@ -159,6 +165,7 @@ export default {
             type: String
         },
         editTips: {
+            // 编辑器文案
             type: String,
             default: ''
         }
@@ -187,14 +194,18 @@ export default {
         async getDraftNum() {
             let res = null,
                 // floorId = this.$cookie.get('floorMapId'),
-                floorId = this.$store.state.currentFloor.gname,
-                data = {
-                    Distinct: true,
-                    Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
-                    PageNumber: 1,
-                    PageSize: 500,
-                    Projection: ['floorId']
-                }
+                floorId = this.$store.state.currentFloor.gname || this.$cookie.get('floorMapId')
+            // 增加校验 floorId,防止上传 undefined
+            if (!floorId) {
+                return true
+            }
+            let data = {
+                Distinct: true,
+                Filters: `projectId='${this.plazaId}';isPub=false;floorId='${floorId}'`,
+                PageNumber: 1,
+                PageSize: 500,
+                Projection: ['floorId']
+            }
             try {
                 // 调用接口
                 res = await queryDraftNum(data)
@@ -259,14 +270,10 @@ export default {
             } else {
                 this.$store.commit('SETSHOWVIEW', 0)
             }
-            // this.showView = !this.showView
             this.queryView(false)
-            // if (this.showView) {
-            //     this.show2 = false
-            // }
         },
         cance() {
-            this.show2 = false
+            // this.show2 = false
         },
         // 编辑图例
         editTl() {
@@ -275,8 +282,6 @@ export default {
             } else {
                 this.$store.commit('SETSHOWVIEW', 0)
             }
-            // this.show = false
-            // this.show2 = true
             this.queryEditNum(true)
         },
         /**
@@ -314,6 +319,7 @@ export default {
         handleSwich(val) {
             this.queryView(!val)
         },
+        // 默认隐藏为0的项目
         handleSwich2(val) {
             this.editSwitch = val
             this.queryEditNum(!this.editSwitch)
@@ -323,16 +329,18 @@ export default {
         queryView(flag) {
             let postParams = {}
             let data = {
+                categoryId: this.$cookie.get('categoryId'),
                 graphId: this.$cookie.get('graphId'),
                 projectId: this.$store.state.plazaId,
-                flag: flag
+                flag: flag,
+                buildingId: '1',
+                floorId: this.$store.state.currentFloor.gname
             }
             queryStatis({ data, postParams }).then(res => {
                 this.loading = false
                 let viewTable = []
                 viewTable = res.data.Data ? res.data.Data : []
                 this.$store.commit('SETLEGENDTABLE', viewTable)
-
                 if (viewTable.length > 0) {
                     viewTable.forEach(el => {
                         if (el.Name == '主要设备房') {
@@ -354,9 +362,12 @@ export default {
         queryEditNum(flag) {
             let postParams = {}
             let data = {
+                categoryId: this.$cookie.get('categoryId'),
                 graphId: this.$cookie.get('graphId'),
                 projectId: this.$store.state.plazaId,
-                flag: flag
+                flag: flag,
+                buildingId: '1',
+                floorId: this.$store.state.currentFloor.gname
             }
             queryStatis({ data, postParams }).then(res => {
                 //console.log('编辑图例数', res)
@@ -366,9 +377,24 @@ export default {
         },
         // 编辑数量
         queryEdit(val) {
+            let arr = []
+            if (val.length > 0) {
+                val.forEach(el => {
+                    let obj = {
+                        BuildingId: '1',
+                        FloorId: this.$store.state.currentFloor.gname,
+                        ProjectId: this.plazaId,
+                        CategoryId: el.GraphCategoryId,
+                        GraphId: this.$cookie.get('graphId'),
+                        GraphElementId: el.GraphElementId,
+                        Num: el.Num
+                    }
+                    arr.push(obj)
+                })
+            }
             let params = {
                 postParams: {
-                    Content: val
+                    Content: arr
                 }
             }
             updateStatis(params).then(res => {
@@ -378,9 +404,8 @@ export default {
                         message: '操作成功',
                         type: 'success'
                     })
-                    this.queryEditNum(this.editSwitch)
-                    this.show2 = false
-                    this.show = true
+                    this.$store.commit('SETSHOWVIEW', 1)
+                    // this.queryEditNum(this.editSwitch)
                 } else {
                     this.$message({
                         message: '操作失败',
@@ -395,9 +420,9 @@ export default {
                     element.Modify = element.IsModify
                 })
                 this.queryEdit(val)
-                this.isShow2()
+                // this.isShow2()
             } else {
-                this.show2 = false
+                // this.show2 = false
                 // this.isShow2()
                 // this.queryEditNum(true)
             }
@@ -443,6 +468,7 @@ export default {
         }
     },
     mounted() {
+        console.log('editTips', this.editTips)
         this.init()
         // 定时查询草稿箱数量
         this.getDraftNum() //首次查询
@@ -602,8 +628,31 @@ export default {
         cursor: pointer;
         border: 1px solid #eee;
     }
+    .tltk-1 {
+        margin-bottom: 10px;
+        display: none;
+        cursor: pointer;
+        border: 1px solid #eee;
+    }
 }
 .edit_map:hover .tltk {
+    // display: block;
+    // position: fixed;
+    // bottom: 70px;
+    margin-left: -10px;
+    right: 22px;
+    z-index: 1;
+    width: 48px;
+    height: 48px;
+    background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
+    box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
+    border-radius: 90px;
+    text-align: center;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+.edit_map:hover .tltk-1 {
     display: block;
 }
 .edit_map:hover .bjtk {

+ 39 - 3
src/components/Rotation/src/rotation.vue

@@ -4,7 +4,7 @@
 *@info:图片轮播
 */
 <template>
-    <div :class='[type?"rotationFull":"rotation"]'>
+    <div :class='[type==1?"rotationFull":(type==3?"rotationFullYlt":"rotation")]'>
         <div v-if='rotationImg.length==1' class='rotationCon'>
             <!-- <img
                 src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1592807833&di=5adf17cda9f46c37696da5b1d0aec9dc&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'
@@ -13,7 +13,7 @@
             <img :src='rotationImg[0].url' alt />
             <!-- <img src='./3440.jpg' alt /> -->
         </div>
-        <el-carousel v-else trigger='click' style='height:100%;width:100%' :interval='5000' arrow='always'>
+        <el-carousel v-else trigger='click' style='height:100%;width:100%' :interval='5000' arrow='always' @change='changePic'>
             <el-carousel-item v-for='(item,index) in rotationImg' :key='index'>
                 <img :src='item.url' alt />
             </el-carousel-item>
@@ -29,7 +29,18 @@ export default {
             rotationImgs: [{ url: require('@/assets/images/login_back.png') }]
         }
     },
-    mounted() {}
+    methods: {
+        changePic(val) {
+            if (this.type == 2) {
+                this.$emit('scan', val + 1)
+            }
+        }
+    },
+    mounted() {
+        if (this.type == 2) {
+            this.changePic(1)
+        }
+    }
 }
 </script>
 <style lang="less" scoped>
@@ -75,6 +86,31 @@ export default {
         min-width: 100%;
     }
 }
+.rotationFullYlt {
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    // 轮播图适配
+    /deep/ .el-carousel__container {
+        height: 100% !important;
+    }
+    .rotationCon {
+        height: 100%;
+        width: 100%;
+        overflow: auto;
+    }
+    img {
+        // width: 100%;
+        // height: 100%;
+        // object-fit: fill;
+        // min-width: 100%;
+        width: 100%;
+        min-height: 100%;
+    }
+}
 </style>
 <style lang="less">
 .rotation,

+ 91 - 51
src/components/editLengend.vue

@@ -7,7 +7,7 @@
     <div class='view'>
         <div class='legend-tab2'>
             <div class='legend-table2-box'>
-                <div class='legend-table2' v-if='editTable.length>=0'>
+                <div class='legend-table2' v-if='editTable.length>0'>
                     <el-table
                         v-loading='loading'
                         :header-cell-style='{background:"rgba(2,91,170,0.1)",fontFamily:"PingFangSC-Medium,PingFang SC;",color:"rgba(0,0,0,0.85);",fontSize:"12px"}'
@@ -116,6 +116,8 @@
     </div>
 </template>
 <script>
+import { updateStatis } from '@/api/public.js'
+
 export default {
     props: ['editTable', 'loading'],
     data() {
@@ -131,64 +133,102 @@ export default {
         handleSelectionChange(val) {
             this.multipleSelection = val
         },
+        // 编辑图例取消
         cancel() {
-            this.save()
-            // this.$emit('cance')
+            if (this.editNum.length > 0) {
+                this.$confirm('图例中的数据发生变化, 是否需要保存?', {
+                    confirmButtonText: '保存',
+                    cancelButtonText: '放弃修改',
+                    type: 'warning'
+                })
+                    .then(() => {
+                        this.$emit('saveNum', this.editNum)
+                    })
+                    .catch(() => {
+                        this.$message({
+                            type: 'info',
+                            message: '已放弃修改'
+                        })
+                        this.editNum = []
+                        this.$emit('saveNum', this.editNum)
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    })
+            } else {
+                this.$store.commit('SETSHOWVIEW', 1)
+            }
+        },
+        // 编辑图里保存
+        save() {
+            this.queryEdit(this.editNum)
+        },
+        // 编辑数量
+        queryEdit(val) {
+            val.map(item => {
+                item.BuildingId = '1'
+                item.FloorId = this.$store.state.currentFloor.gname
+                item.ProjectId = this.$store.state.plazaId
+                item.CategoryId = this.$cookie.get('categoryId')
+            })
+            let params = {
+                postParams: {
+                    Content: val
+                }
+            }
+            updateStatis(params).then(res => {
+                if (res.Result == 'success') {
+                    this.$message({
+                        message: '操作成功',
+                        type: 'success'
+                    })
+                    this.$store.commit('SETSHOWVIEW', 1)
+                } else {
+                    this.$message({
+                        message: '操作失败',
+                        type: 'error'
+                    })
+                }
+            })
         },
+        // 修改图例数量
         changeTable(val) {
             this.editNum.push(val)
-            var obj = {}
-            this.editNum = this.editNum.reduce(function(item, next) {
-                obj[next.key] ? '' : (obj[next.key] = true && item.push(next))
-                return item
-            }, [])
+            let result = [],
+                obj = {}
+            for (var i = 0; i < this.editNum.length; i++) {
+                if (!obj[this.editNum[i].GraphElementId]) {
+                    result.push(this.editNum[i])
+                    obj[this.editNum[i].GraphElementId] = true
+                }
+            }
         },
+        // 修改隐藏为0的项目的开关
         changeSwitch(val) {
             this.$emit('handleSwich2', val)
-        },
-        save() {
-            this.$emit('saveNum', this.editNum)
-            // this.$confirm('图例中的数据发生变化, 是否需要保存?', {
-            //     confirmButtonText: '保存',
-            //     cancelButtonText: '放弃修改',
-            //     type: 'warning'
-            // })
-            //     .then(() => {
-            //         this.$emit('saveNum', this.editNum)
-            //     })
-            //     .catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已放弃修改'
-            //         })
-            //         this.editNum = []
-            //         this.$emit('saveNum', this.editNum)
-            //     })
-        },
-        init() {
-            this.tbData1 = []
-            this.tbData2 = []
-            this.tbData3 = []
-            if (this.editTable.length > 0) {
-                this.tbData1 = this.editTable
-                // 以下不要动 不要删
-                // let len = this.tableData.length
-                // if (len <= 10) {
-                //     this.tbData1 = this.tableData
-                // } else if (len > 10 && len <= 20) {
-                //     this.tbData1 = this.tableData.slice(0, 10)
-                //     this.tbData2 = this.tableData.slice(10, len)
-                // } else if (len > 10 && len <= 30) {
-                //     this.tbData1 = this.tableData.slice(0, 10)
-                //     this.tbData2 = this.tableData.slice(10, 20)
-                //     this.tbData3 = this.tableData.slice(20, len)
-                // } else {
-                //     this.tbData1 = this.tableData.slice(0, parseInt(len / 3))
-                //     this.tbData2 = this.tableData.slice(parseInt(len / 3), parseInt(len / 3) * 2)
-                //     this.tbData3 = this.tableData.slice(parseInt(len / 3) * 2, len)
-                // }
-            }
         }
+        // init() {
+        // this.tbData1 = []
+        // this.tbData2 = []
+        // this.tbData3 = []
+        // if (this.editTable.length > 0) {
+        //     this.tbData1 = this.editTable
+        // 以下不要动 不要删
+        // let len = this.tableData.length
+        // if (len <= 10) {
+        //     this.tbData1 = this.tableData
+        // } else if (len > 10 && len <= 20) {
+        //     this.tbData1 = this.tableData.slice(0, 10)
+        //     this.tbData2 = this.tableData.slice(10, len)
+        // } else if (len > 10 && len <= 30) {
+        //     this.tbData1 = this.tableData.slice(0, 10)
+        //     this.tbData2 = this.tableData.slice(10, 20)
+        //     this.tbData3 = this.tableData.slice(20, len)
+        // } else {
+        //     this.tbData1 = this.tableData.slice(0, parseInt(len / 3))
+        //     this.tbData2 = this.tableData.slice(parseInt(len / 3), parseInt(len / 3) * 2)
+        //     this.tbData3 = this.tableData.slice(parseInt(len / 3) * 2, len)
+        // }
+        // }
+        // }
     },
     mounted() {}
 }

+ 13 - 0
src/components/floorList.vue

@@ -45,6 +45,7 @@
 </template>
 <script>
 import store from '../store'
+import { mapGetters } from 'vuex'
 export default {
     data() {
         return {
@@ -74,7 +75,11 @@ export default {
             }
         }
     },
+    computed: {
+        ...mapGetters(['legendTable'])
+    },
     mounted() {
+        window.vm = this
         this.init()
     },
     methods: {
@@ -177,6 +182,14 @@ export default {
             this.handleCookie()
             this.handlePosition(1, index, this.floorIdArr.length)
             this.handleUpDownStatus(index, this.floorIdArr.length)
+            this.viewLengend()
+        },
+        viewLengend() {
+            if (this.legendTable.length > 0) {
+                this.$store.commit('SETSHOWVIEW', 1)
+            } else {
+                this.$store.commit('SETSHOWVIEW', 0)
+            }
         },
         /**
          * @description 楼层位置动画处理

+ 28 - 25
src/components/floorMap/index.vue

@@ -91,10 +91,6 @@ export default {
                     let imgItem = new SImageItem(null, `${this.mapServerURL}/webtheme/${this.fmapID}/${window.fengmapData.frImg}`)
                     this.scene.addItem(imgItem)
                     this.view.scene = this.scene
-                    this.view.minScale = this.view.scale
-                    if (this.$refs.canvasFun) {
-                        this.$refs.canvasFun.everyScale = this.view.scale
-                    }
                     this.view.fitSceneToView()
                 }
             } else {
@@ -122,10 +118,6 @@ export default {
                         this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         this.view.scene = this.scene
                         this.view.fitSceneToView()
-                        this.view.minScale = this.view.scale
-                        if (this.$refs.canvasFun) {
-                            this.$refs.canvasFun.everyScale = this.view.scale
-                        }
                     })
                 } else {
                     console.log('楼层不正确')
@@ -137,7 +129,16 @@ export default {
                     this.$store.commit('SETISMESSAGE', false)
                     return
                 } else {
-                    this.$store.commit('SETISMESSAGE', true)
+                    console.log('data[0].Elements.Node', data)
+                    if (
+                        data.Data[0].Elements.Nodes.length === 0 &&
+                        data.Data[0].Elements.Markers.length === 0 &&
+                        data.Data[0].Elements.Relations.length === 0
+                    ) {
+                        this.$store.commit('SETISMESSAGE', false)
+                    } else {
+                        this.$store.commit('SETISMESSAGE', true)
+                    }
                 }
                 // 无返回Data处理
                 if (!(data.Data && data.Data.length)) {
@@ -191,6 +192,10 @@ export default {
                     this.scene.addItem(t)
                 })
                 this.view.fitSceneToView()
+                this.view.minScale = this.view.scale
+                if (this.$refs.canvasFun) {
+                    this.$refs.canvasFun.everyScale = this.view.scale
+                }
             })
         },
         clearGraphy() {
@@ -208,8 +213,6 @@ export default {
                 if (name.slice(name.length - 2, name.length) == '机房') {
                     if (location) {
                         this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
-                    } else {
-                        this.$message('未添加位置类型')
                     }
                 }
                 // 选中电井设置电井关联的商铺高亮
@@ -342,25 +345,25 @@ export default {
                     let id = t.data.GraphElementId
                     t.maskFlag = !(res.indexOf(id) > -1)
                 })
-                this.topologyParser.textMarkerList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
-                })
-                this.topologyParser.imageMarkerList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
-                })
-                this.topologyParser.lineMarkerList.forEach(t => {
-                    let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
-                })
+                // this.topologyParser.textMarkerList.forEach(t => {
+                //     let id = t.data.GraphElementId
+                //     t.maskFlag = !(res.indexOf(id) > -1)
+                // })
+                // this.topologyParser.imageMarkerList.forEach(t => {
+                //     let id = t.data.GraphElementId
+                //     t.maskFlag = !(res.indexOf(id) > -1)
+                // })
+                // this.topologyParser.lineMarkerList.forEach(t => {
+                //     let id = t.data.GraphElementId
+                //     t.maskFlag = !(res.indexOf(id) > -1)
+                // })
                 this.topologyParser.imageLegendList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
+                    t.selected = res.indexOf(id) > -1
                 })
                 this.topologyParser.relationList.forEach(t => {
                     let id = t.data.GraphElementId
-                    t.maskFlag = !(res.indexOf(id) > -1)
+                    t.selected = res.indexOf(id) > -1
                 })
             })
         }

+ 3 - 3
src/components/menuList.vue

@@ -5,7 +5,7 @@
             <div class='downright'></div>
             <div class='home-box'>
                 <img src='@/assets/imgs/logo.png' alt />
-                <span>大连高新万达广场</span>
+                <span>{{plazaName}}</span>
                 <!-- <span v-if='plazas'>{{plazas.length>0?formatter(plazaId,plazas):'--'}}</span> -->
             </div>
         </div>
@@ -72,7 +72,7 @@ export default {
         }
     },
     computed: {
-        ...mapGetters(['plazas', 'plazaId', 'fmapID'])
+        ...mapGetters(['plazas', 'plazaId', 'fmapID', 'plazaName'])
     },
     watch: {
         $route: 'handleRoute'
@@ -109,7 +109,7 @@ export default {
                 }
             try {
                 // 调用接口
-                // res = await queryDraftNum(data)
+                res = await queryDraftNum(data)
             } catch (error) {
                 console.error(error)
             }

+ 5 - 4
src/components/viewLengend.vue

@@ -14,12 +14,12 @@
                 :header-cell-style='{background:"rgba(2,91,170,0.1)",fontFamily:"PingFangSC-Medium,PingFang SC;",color:"rgba(0,0,0,0.85);",fontSize:"12px"}'
             >
                 <el-table-column prop label='说明'>
-                    <template slot-scope='{row}'>
-                        <span>{{(row.Properties && row.Properties.ItemExplain)?row.Properties.ItemExplain:'--'}}</span>
+                    <template slot-scope='{row}' v-if='row.Properties && row.Properties.ItemExplain'>
+                        <span>{{row.Properties.ItemExplain}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop label='图例' width='60' align='center'>
-                    <template slot-scope='{row}'>
+                    <template slot-scope='{row}' v-if='row.Properties && row.Properties.ItemExplain'>
                         <div class='scpz-img' :style='`background:${row.Properties.FillColor};border:1px solid ${row.Properties.StrokeColor}`'></div>
                     </template>
                 </el-table-column>
@@ -42,7 +42,8 @@
                 <el-table-column prop='Num' label='数量'>
                     <template slot-scope='{row}'>
                         <span v-if='row.Num || row.Num==0'>{{row.Num}}</span>
-                        <span v-else>--</span>
+                        <span v-else-if='row.Num==null'></span>
+                        <span v-else>{{'--'}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop='Unit' label='单位' width='70'>

+ 1 - 1
src/lib/items/SFHFQZoneLegendItem.js

@@ -153,7 +153,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
     }
     toData() {
         this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.text
+        this.data.Name = this.name
         this.data.Properties.FillColor = this.fillColor.value
         this.data.Properties.StrokeColor = this.strokeColor.value
         this.data.Properties.LineWidth = this.lineWidth

+ 1 - 1
src/lib/items/SFHFQZoneLegendItem.ts

@@ -175,7 +175,7 @@ export class SFHFQZoneLegendItem extends SPolygonItem {
 
     toData(): any {
         this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.text
+        this.data.Name = this.name
         this.data.Properties.FillColor = this.fillColor.value
         this.data.Properties.StrokeColor = this.strokeColor.value
         this.data.Properties.LineWidth = this.lineWidth

+ 11 - 0
src/lib/items/SImageLegendItem.js

@@ -54,6 +54,15 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.color) {
             this.color = new SColor(data.Properties.color);
         }
+        if (data.Properties && data.Properties.IsActive) {
+            this.isActive = data.Properties.IsActive;
+        }
+        if (data.AttachObjectIds && data.AttachObjectIds.length) {
+            this.isActive = true;
+        }
+        if (data.Properties && data.Properties.FrameColor) {
+            this.activeColor = new SColor(data.Properties.FrameColor);
+        }
     }
     get num() {
         return this._num;
@@ -82,6 +91,8 @@ export class SImageLegendItem extends SIconTextItem {
         this.data.Properties.sHeight = this.sHeight;
         this.data.Properties.font = this.font.size;
         this.data.Properties.color = this.color.value;
+        this.data.Properties.FrameColor = this.activeColor.value;
+        this.data.Properties.IsActive = this.isActive;
         this.data.AnchorList = this.anchorList.map(t => {
             return {
                 ID: t.id,

+ 58 - 48
src/lib/items/SImageLegendItem.ts

@@ -1,9 +1,8 @@
-
-import { SGraphItem } from "@saga-web/graph/lib";
-import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem';
-import { Legend } from '../types/Legend';
-import { ItemOrder } from '@saga-web/big/lib';
-import { SFont, SColor } from '@saga-web/draw/lib';
+import { SGraphItem } from '@saga-web/graph/lib'
+import { SIconTextItem } from '@saga-web/big/lib/items/SIconTextItem'
+import { Legend } from '../types/Legend'
+import { ItemOrder } from '@saga-web/big/lib'
+import { SFont, SColor } from '@saga-web/draw/lib'
 /**
  * 图例节点Item(图标类型)
  *
@@ -11,23 +10,23 @@ import { SFont, SColor } from '@saga-web/draw/lib';
  */
 export class SImageLegendItem extends SIconTextItem {
     /** 图例节点对象数据 */
-    data: Legend;
+    data: Legend
     /** 图例数量 */
-    _num: number = 1;
+    _num: number = 1
     get num(): number {
-        return this._num;
+        return this._num
     }
     set num(v: number) {
         if (v) {
-            this._num = v;
-            this.data.Num = v;
+            this._num = v
+            this.data.Num = v
         } else {
-            this._num = 1;
-            this.data.Num = 1;
+            this._num = 1
+            this.data.Num = 1
         }
-        this.data.Properties.Num = this._num;
-        this.text = `${this.data.Name}${this.data.Num > 1 ? ` × ${this.data.Num}` : ''}`;
-        this.update();
+        this.data.Properties.Num = this._num
+        this.text = `${this.data.Name}${this.data.Num > 1 ? ` × ${this.data.Num}` : ''}`
+        this.update()
     }
 
     /**
@@ -37,66 +36,77 @@ export class SImageLegendItem extends SIconTextItem {
      * @param data      图例节点对象数据
      */
     constructor(parent: SGraphItem | null, data: Legend) {
-        super(parent, data.AnchorList);
-        this.isTransform = false;
-        this.zOrder = ItemOrder.markOrder;
-        this.data = data;
-        this.id = data.ID;
-        this.name = data.Name;
-        this.moveTo(data.Pos.X, data.Pos.Y);
+        super(parent, data.AnchorList)
+        this.isTransform = false
+        this.zOrder = ItemOrder.markOrder
+        this.data = data
+        this.id = data.ID
+        this.name = data.Name
+        this.moveTo(data.Pos.X, data.Pos.Y)
         if (data.Num) {
-            this._num = data.Num;
+            this._num = data.Num
         }
         if (data.Size) {
-            this.width = data.Size.Width;
-            this.height = data.Size.Height;
+            this.width = data.Size.Width
+            this.height = data.Size.Height
         }
         if (data.Num) {
-            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`;
+            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`
         }
         if (data.Properties && data.Properties.Url) {
-            this.img.url = data.Properties.Url;
+            this.img.url = data.Properties.Url
         }
         if (data.Properties.ImgPos) {
-            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y)
         }
         if (data.Properties.TextPos) {
-            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y)
         }
         if (data.Properties && data.Properties.sWidth) {
-            this.sWidth = data.Properties.sWidth;
+            this.sWidth = data.Properties.sWidth
         }
         if (data.Properties && data.Properties.sHeight) {
-            this.sHeight = data.Properties.sHeight;
+            this.sHeight = data.Properties.sHeight
         }
         if (data.Properties && data.Properties.font) {
-            this.font = new SFont("sans-serif", data.Properties.font);
+            this.font = new SFont('sans-serif', data.Properties.font)
         }
         if (data.Properties && data.Properties.color) {
-            this.color = new SColor(data.Properties.color);
+            this.color = new SColor(data.Properties.color)
+        }
+        if (data.Properties && data.Properties.IsActive) {
+            this.isActive = data.Properties.IsActive
+        }
+        if (data.AttachObjectIds && data.AttachObjectIds.length) {
+            this.isActive = true
+        }
+        if (data.Properties && data.Properties.FrameColor) {
+            this.activeColor = new SColor(data.Properties.FrameColor)
         }
     }
 
     toData(): Legend {
-        this.data.Pos = { X: this.x, Y: this.y };
-        this.data.Size = { Width: this.width, Height: this.height };
-        this.data.Name = this.name;
-        this.data.Properties.Url = this.img.url;
-        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y };
-        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y };
-        this.data.Properties.sWidth = this.sWidth;
-        this.data.Properties.sHeight = this.sHeight;
-        this.data.Properties.font = this.font.size;
-        this.data.Properties.color = this.color.value;
-        this.data.AnchorList = this.anchorList.map(t => {
+        this.data.Pos = { X: this.x, Y: this.y }
+        this.data.Size = { Width: this.width, Height: this.height }
+        this.data.Name = this.name
+        this.data.Properties.Url = this.img.url
+        this.data.Properties.TextPos = { X: this.textItem.x, Y: this.textItem.y }
+        this.data.Properties.ImgPos = { X: this.img.x, Y: this.img.y }
+        this.data.Properties.sWidth = this.sWidth
+        this.data.Properties.sHeight = this.sHeight
+        this.data.Properties.font = this.font.size
+        this.data.Properties.color = this.color.value
+        this.data.Properties.FrameColor = this.activeColor.value
+        this.data.Properties.IsActive = this.isActive
+        this.data.AnchorList = this.anchorList.map((t) => {
             return {
                 ID: t.id,
                 Pos: {
                     X: t.x,
-                    Y: t.y
-                }
+                    Y: t.y,
+                },
             }
         })
-        return this.data;
+        return this.data
     }
 } // Class SImageLegendItem

+ 1 - 1
src/lib/items/SSCPZZoneLegendItem.js

@@ -160,7 +160,7 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
     }
     toData() {
         this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.text
+        this.data.Name = this.name
         this.data.Properties.FillColor = this.fillColor.value
         this.data.Properties.StrokeColor = this.strokeColor.value
         this.data.Properties.LineWidth = this.lineWidth

+ 1 - 1
src/lib/items/SSCPZZoneLegendItem.ts

@@ -183,7 +183,7 @@ export class SSCPZZoneLegendItem extends SPolygonItem {
 
     toData(): any {
         this.data.Pos = { X: this.x, Y: this.y }
-        this.data.Name = this.text
+        this.data.Name = this.name
         this.data.Properties.FillColor = this.fillColor.value
         this.data.Properties.StrokeColor = this.strokeColor.value
         this.data.Properties.LineWidth = this.lineWidth

+ 1 - 0
src/lib/items/TipelineItem.js

@@ -137,6 +137,7 @@ export class TipelineItem extends SPolylineItem {
             }
         })
         if (this.data) {
+            this.data.Name = this.name;
             this.data.PointList = pointList
             this.data.Properties.LineWidth = this.lineWidth
             // this.data.Properties.LineDash = this.LineDash;

+ 1 - 0
src/lib/items/TipelineItem.ts

@@ -146,6 +146,7 @@ export class TipelineItem extends SPolylineItem {
         })
 
         if (this.data) {
+            this.data.Name = this.name;
             this.data.PointList = pointList
             this.data.Properties.LineWidth = this.lineWidth
             // this.data.Properties.LineDash = this.LineDash;

+ 5 - 21
src/main.ts

@@ -29,7 +29,6 @@ import Pui from 'meri-design'
 import 'meri-design/dist/index.css'
 import 'leaflet/dist/leaflet.css'
 
-import {login} from './api/login.js';
 Vue.use(Pui)
 
  
@@ -45,23 +44,8 @@ const username = 'lengqiang'
 //     }
 //     next()
 // })
-
-login({}).then( (res ) => {  // 获取用户当前权限
-    if (res.result === 'success') {
-        store.commit('STOREACCESSLEVEL', res)
-        new Vue({
-            router,
-            store,
-            render: (h) => h(App),
-            mounted() {
-                // let level = store.state.accessLevel
-                let level = 0
-                if (level === 0) {
-                    router.push({path:'./home/homepage'})
-                } else {
-                    router.push({path:'./group'})
-                }
-            },
-        }).$mount('#app')
-    }
-})
+new Vue({
+    router,
+    store,
+    render: (h) => h(App),
+}).$mount('#app')

+ 38 - 37
src/router/index.js

@@ -5,7 +5,6 @@ import { query } from '@/utils/query'
 
 Vue.use(VueRouter)
 const routes = [
-    // 登陆页面
     {
         path: '/',
         redirect: '/home/overview',        // 只有区域,及区域以上用户才能进入总部首页这一套
@@ -24,7 +23,8 @@ const routes = [
         name: 'home',
         component: () => import('../views/index'),
         redirect: '/home/homepage',
-        children: [{
+        children: [
+            {
                 path: 'homepage',
                 component: () => import('../views/homepage'),
             },
@@ -72,39 +72,40 @@ const router = new VueRouter({
     routes,
 })
 //不需要token的路由
-const ignore = ['/404', '/legendLibrary', '/legendRules']
-router.beforeEach(async (to, from, next) => {
-    if (!ignore.includes(to.path)) {
-        console.log("vuex", store.state.accessLevel)
-        const token = query().token
-        const ssoToken = store.getters['ssoToken']
-        if (ssoToken) {
-            store.commit('SETSSOTOKEN', ssoToken)
-            await store.dispatch('getUserInfo', router)
-            await store.dispatch('getFloors')
-            await store.dispatch('getBrand')
-            next()
-        } else if (token) {
-            store.commit('SETSSOTOKEN', token)
-            await store.dispatch('getUserInfo', router)
-            next()
-        } else {
-            let lastRoute = {
-                path: to.path,
-                params: to.params,
-                query: to.query,
-            }
-            store.commit('SETLASTROUTER', lastRoute)
-            let ssoServer = 'http://oauth.wanda-dev.cn'
-            let systemcode = 'CAD156',
-                signal = new Date().getTime(),
-                version = '1.0.0'
-            window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
-            
-        }
-    } else {
-        next()
-        return
-    }
-})
+// const ignore = ['/404', '/home/legendLibrary', '/home/legendRules']
+// router.beforeEach(async (to, from, next) => {
+//     if (!ignore.includes(to.path)) {
+//         const token = store.getters['ssoToken'] || query().token
+//         if (token) {
+//             store.commit('SETSSOTOKEN', token)
+//             if (to.path == '/') {
+//                 next('/group')
+//             }
+//             if (to.path == '/group' || to.path == '/home/homepage') {
+//                 if (store.state.accessLevel == -1) {
+//                     await store.dispatch('getUserInfo', router)
+//                     await store.dispatch('getBrand')
+//                 }
+//             }
+//             await store.dispatch('getFloors')
+//             await store.dispatch('getBrand')
+//             next()
+//         } else {
+//             let lastRoute = {
+//                 path: to.path,
+//                 params: to.params,
+//                 query: to.query,
+//             }
+//             store.commit('SETLASTROUTER', lastRoute)
+//             let ssoServer = 'http://oauth.wanda-dev.cn'
+//             let systemcode = 'CAD156',
+//                 signal = new Date().getTime(),
+//                 version = '1.0.0'
+//             window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
+//         }
+//     } else {
+//         next()
+//         return
+//     }
+// })
 export default router

+ 37 - 17
src/store/index.js

@@ -14,8 +14,9 @@ import router from '../router'
 Vue.use(Vuex)
 export default new Vuex.Store({
     state: {
-        ssoToken: 'admin:lengqiang',
+        ssoToken: 'admin:xuliping',
         // ssoToken: null,
+        plazaName: '',
         isPreview: false,
         lastRoute: '',
         isrequestAuth: true, // 是否请求登录校验接口
@@ -38,9 +39,12 @@ export default new Vuex.Store({
         remarksText: '', //备注
         bunkObj: {}, // 铺位名称
         currentFloor: {}, //当前选中的楼层信息
-        accessLevel:0, // 
+        accessLevel: -1, // 权限级别
+        showView: 1,
     },
     getters: {
+        plazaName: (state) => state.plazaName,
+        accessLevel: (state) => state.accessLevel,
         isPreview: (state) => state.isPreview,
         ssoToken: (state) => state.ssoToken,
         lastRoute: (state) => state.lastRoute,
@@ -58,6 +62,12 @@ export default new Vuex.Store({
         showView: (state) => state.showView,
     },
     mutations: {
+        SETPLAZENAME(state, data) {
+            state.plazaName = data
+        },
+        SETSHOWVIEW(state, data) {
+            state.showView = data
+        },
         SETISPREVIEW(state, data) {
             state.isPreview = data
         },
@@ -117,9 +127,9 @@ export default new Vuex.Store({
         SETCURRENTFLOOR(state, data) {
             state.currentFloor = data
         },
-        STOREACCESSLEVEL(state, data) {
-            state.accessLevel = data.level
-        }
+        STOREACCESSLEVEL(state, data) {
+            state.accessLevel = data
+        },
     },
     actions: {
         // 获取项目列表、userId
@@ -127,20 +137,30 @@ export default new Vuex.Store({
             commit
         }, palyload) {
             await login({}).then((res) => {
-                if (res.result == 'success') {
-                    commit('STOREACCESSLEVEL', res)
+                // 获取用户当前权限
+                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' })
+                    } else {
+                        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')
-                // }
             })
+            // 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({

+ 45 - 29
src/utils/ganttChart/GanttChart_day.js

@@ -1,5 +1,9 @@
 import moment from 'moment';
 /**
+ * 数据定义区域
+ *
+ */
+/**
  * 甘特图
  * @param {} options 
  */
@@ -24,7 +28,7 @@ export function GanttChartDay(options) {
   // 拖动过程事件
   this.dragingEvent = null;
   // 拖动偏移量
-  this.offsetDis = (options['viewWidth']/2) || 800;
+  this.offsetDis = options['viewWidth'] || 800;
   // 拖动定时器
   this.dragTimer = null;
   // 每天的间隔宽度
@@ -46,8 +50,7 @@ export function GanttChartDay(options) {
   // 当前视图开始时间,向前推N天
   this.startAt = moment().subtract(this.daysCount / 3, 'days');
   this.endAt = moment(this.startAt).add(this.daysCount, 'days');
-  this.graphDiv = document.getElementById(options['chartParentContainer']);
-  this.chartContainer = options['chartContainer']
+  this.graphDiv = document.getElementById(options['chartContainer']);
   // 图形容器组
   this.graphGroup = null;
   // 上一次拖动的事件
@@ -121,7 +124,6 @@ GanttChartDay.prototype.forceRefreshGraph = function(keepTimeZone = false) {
   this.tasks.forEach((topTask) => {
     topTask.gGroup = null;
   });
-  this.todayTimeLineEl = null
   this.gCanvas.destroy();
   this.initDrawingReady();
 }
@@ -131,13 +133,11 @@ GanttChartDay.prototype.forceRefreshGraph = function(keepTimeZone = false) {
  */
 GanttChartDay.prototype.initDrawingReady = function() {
   this.initCanvas();
-  setTimeout(() => {
-    this.initDragHandler();
-    this.drawTimeZone();
-    this.processData();
-    this.drawTasks();
-    this.graphGroup = null
-  }, 200);
+  this.initDragHandler();
+  this.drawTimeZone();
+  this.processData();
+  this.drawTasks();
+  this.graphGroup = null
 }
 
 /**
@@ -186,7 +186,7 @@ GanttChartDay.prototype.doDrag = function(sEvent, eEvent) {
     this.offsetDis = this.viewWidth;
     this.pageTo('prev');
   }
-  if ((this.offsetDis - 20) >= this.viewWidth*2.2 ){ //cWidth - viewWidth) {
+  if (this.offsetDis - 20 >= 2964 ){ //cWidth - viewWidth) {
     // 向后滑动,向后翻页
     console.log('此处应该向后翻页', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'),this.offsetDis);
     this.offsetDis = this.viewWidth;
@@ -200,7 +200,7 @@ GanttChartDay.prototype.doDrag = function(sEvent, eEvent) {
  */
 GanttChartDay.prototype.initDragHandler = function() {
   this.graphDiv.scrollLeft = this.offsetDis;
-  let _canvas = this._canvas
+  let _canvas = document.getElementsByTagName('canvas')[1];
   _canvas.addEventListener('mousedown', (ev) => {
     this.draging = true;
     this.startEvent = ev;
@@ -211,13 +211,6 @@ GanttChartDay.prototype.initDragHandler = function() {
     this.lastDragEv = ev;
   });
 
-
-  _canvas.addEventListener('mouseleave', (ev) => {
-    console.log('leave...恢复')
-    this.draging = false;
-    this.endEvent = ev;
-  });
-
   _canvas.addEventListener('mouseup', (ev) => {
     this.draging = false;
     this.endEvent = ev;
@@ -234,6 +227,11 @@ GanttChartDay.prototype.initDragHandler = function() {
       this.lastDragEv = ev;
     }
   });
+  _canvas.addEventListener('mouseleave', (ev) => {
+    console.log('leave...恢复')
+    this.draging = false;
+    this.endEvent = ev;
+  });
 }
 /**
  * 初始化画布
@@ -243,9 +241,9 @@ GanttChartDay.prototype.initDragHandler = function() {
 GanttChartDay.prototype.initCanvas = function() {
   console.error('初始化画布...')
   this.gCanvas = new G.Canvas({
-    container: this.chartContainer,
+    container: 'ganttContainer',
     width: this.cWidth,
-    height: this.cHeight,
+    height: 800,
   });
   this._canvas = document.querySelector('#ganttContainer>canvas');
 }
@@ -258,12 +256,9 @@ GanttChartDay.prototype.drawTimeZone = function() {
   console.log('时间段', this.startAt.format('YYYY-MM-DD'),this.endAt.format('YYYY-MM-DD'));
   let start = moment(this.startAt);
   let timeGroup = this.gCanvas.addGroup();
-  this.timeGroupEl = timeGroup
   timeGroup._tname = 'TimeGroup';
-  let startSecond = moment(this.startAt);
-
-  // 顶部底部边框
-  timeGroup.addShape('rect',{
+  // 绘制第一级
+  timeGroup.addShape('text', {
     attrs: {
       x: 0,
       y: 0,
@@ -272,7 +267,28 @@ GanttChartDay.prototype.drawTimeZone = function() {
       fill: '#F8F9FA',
       radius: [2, 4],
     },
-  })
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  timeGroup.addShape('text', {
+    attrs: {
+      x: 20 + this.viewWidth * 2,
+      y: 20,
+      fontSize: 12,
+      text: start.add(this.daysCount / 3, 'days').format('YYYY-MM'),
+      lineDash: [10, 10],
+      fill: '#8D9399',
+    },
+  });
+  let startSecond = moment(this.startAt);
   // 绘制第二级
   let nowAtStr = moment().format('YYYY-MM-DD')
   this.timeZoneLineEls = []
@@ -323,7 +339,7 @@ GanttChartDay.prototype.drawTimeZone = function() {
     }
     timeGroup.addShape('text', {
       attrs: {
-        x: this.dayStep * i,
+        x: 40 * i,
         y: 40,
         fontSize: 10,
         text: timeText,

+ 9 - 5
src/views/analysis/CoreDeviceReport.vue

@@ -12,6 +12,7 @@
         v-model="systemId" 
         :selectdata="systemList"
         :placeholder="'请选择'"
+        hideClear
       />
       <div class="system-content">
         <div v-for="(item) in systemContentData" :key="'key_' + item.category_code" class="item-content" :class="{'active': item.isActive}" @click="changeEquipment(item.category_code)">
@@ -33,7 +34,7 @@
       <el-table :data="tableData" style="width: 100%;margin-bottom: 63px;" @row-click="showEquipmentStatus">
         <el-table-column label="序号" type="index" :index="indexMethod"></el-table-column>
         <el-table-column prop="sbjc" label="设备简称"></el-table-column>
-        <el-table-column prop="sbjbm" label="设备编号"></el-table-column>
+        <el-table-column prop="assetnum" label="设备编号"></el-table-column>
         <el-table-column prop="is_exception" label="状态">
           <template slot-scope="scope">
             <span style="display: inline-block;width: 6px;height:6px;border-radius: 3px;background: #0091FF;" :style="{'background': !scope.row.is_exception?'#0091FF' : '#F54E45'}"></span>
@@ -178,8 +179,6 @@ export default {
 
   mounted() {
     this.getSystemList();
-    // this.getEquipmentOfSystem();
-    
   },
 
   methods: {
@@ -222,7 +221,9 @@ export default {
       let param = {
         plazaId: 1000423,
         ccode: 1002347,
-        smsxt: this.systemId
+      }
+      if (this.systemId !== '') {
+        param.smsxt = this.systemId;
       }
       queryEquipmentList('/data/home/querySystemCard', param).then((res) => {
         const { result, data } = res;
@@ -238,6 +239,9 @@ export default {
               abnormal: item.is_exception_num !== 0,
               category_code: item.category_code
             }
+            if (!item.category_code) {
+              console.error('without category_code..', item)
+            }
             if (item.is_exception_num === 0) {
               newData.push(itemData)
             } else {
@@ -249,7 +253,7 @@ export default {
           const { query } = this.$route;
           this.systemContentData = newData;
           if (!_.isEmpty(query) && query.equipId) {
-            _.map(this.systemContentData, (o) => {return o.isActive = o.id == query.equipId});
+            _.map(this.systemContentData, (o) => {return o.isActive = o.category_code == query.equipId});
           }
           this.getTableData();
         }

+ 1 - 0
src/views/analysis/GanttChart.vue

@@ -12,6 +12,7 @@
         :selectdata="systemList"
         :placeholder="'请选择'"
         @change="changeSystem"
+        hideClear
       />
       <div class="legend-container">
         <div v-for="(item) in legends" :key="'key_' + item.id" class="item-legend">

+ 4 - 2
src/views/analysis/SpecificationUpdateRecord.vue

@@ -12,6 +12,7 @@
         v-model="incidentType" 
         :selectdata="incidentList" 
         :placeholder="'请选择'"
+        hideClear
       />
       <el-date-picker
         v-model="timeVal"
@@ -58,7 +59,7 @@ export default {
         {id: 3, name: '重点关注'},
       ], // 事件列表字典表
       incidentType: 'all', // 事件类型
-      timeVal: null, // 时间
+      timeVal: '', // 时间
       tableData: [], // 表数据
       curPage: 1, // 当前页码
       pageSize: 10, // 每页条数
@@ -161,7 +162,8 @@ export default {
         this.startTime = moment.unix(new Date(this.timeVal[0]).getTime() / 1000).format('YYYYMMDDHHmmss');
         this.endTime = moment.unix(new Date(this.timeVal[1]).getTime() / 1000).format('YYYYMMDDHHmmss');
       } else {
-        this.initTimePicker();
+        this.startTime = 20171027000000;
+        this.endTime = 20171028000000;
       }
       this.getTableData();
     },

+ 8 - 8
src/views/analysis/index.vue

@@ -46,14 +46,14 @@ export default {
 		GanttChart
 	},
 	mounted() {
-		const { query } = this.$route;
-		if (!_.isEmpty(query)) {
-			if (query.module === 'specification') {
-				_.map(this.navList, (o) => {return o.isActive = o.id === 2});
-			} else if (query.module === 'gantt') {
-				_.map(this.navList, (o) => {return o.isActive = o.id === 3});
-			}
-		}
+    const { query } = this.$route;
+    if (!_.isEmpty(query)) {
+      if (query.module === 'specification') {
+        _.map(this.navList, (o) => {return o.isActive = o.id === 2});
+      } else if (query.module === 'gantt') {
+        _.map(this.navList, (o) => {return o.isActive = o.id === 3});
+      }
+    }
 		this.findCurModule();
 	},
 	methods: {

+ 8 - 6
src/views/equipment/eqDialog.vue

@@ -5,8 +5,10 @@
             <!-- 除了清单和原理页面,别的都有记录事项detailDialog页面 -->
             <div slot='title' class='header-title' v-if='Object.keys(dialogInfo).length>0'>
                 <span class='title-name'>{{systemName}}-{{dialogInfo.label}}</span>
+                <!-- 2020-7-12 查看图纸时 隐藏图标(查看入口) -->
+                <!-- v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"' -->
                 <img
-                    v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP"'
+                    v-if='dialogInfo.id.slice(2,4)!="QD" && dialogInfo.id.slice(2,4)!="YL" && dialogInfo.id.slice(0,4)!="GJSP" && dialogInfo.label !== "查看图纸"'
                     src='../../assets/imgs/zy1.png'
                     @click='visibalBox'
                     style='margin-top:-4px;'
@@ -14,10 +16,10 @@
                 />
             </div>
             <!-- 没有tab的页面 -->
-            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px;height:90%'>
+            <div v-if='Object.keys(dialogInfo).length>0 && dialogInfo.children.length==0' style='margin:16px 0 0 24px;height:100%'>
                 <!-- 原理图 -->
-                <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:90%;overflow:hidden;height:100%'>
-                    <rotation :rotationImg='rotationImg'></rotation>
+                <div v-if='dialogInfo.id.slice(2,4)=="YL"' style='width:100%;overflow:auto;height:100%;margin:0 auto'>
+                    <rotation type='3' :rotationImg='rotationImg'></rotation>
                 </div>
                 <!-- 土建系统主要材料清单 -->
                 <tj-table v-else-if='dialogInfo.id.slice(0,4)=="TJQD"' :param='param'></tj-table>
@@ -62,8 +64,8 @@
                                     v-if='value.id.slice(2,4)=="YL" && eve.count>0 && value.param.type_code.slice(0,3)!="FBT"'
                                 >
                                     <!-- 有tab的原理图 -->
-                                    <div style='width:100%;height:600px;overflow:hidden'>
-                                        <rotation :rotationImg='rotationImg'></rotation>
+                                    <div style='width:100%;height:600px;'>
+                                        <rotation type='3' :rotationImg='rotationImg'></rotation>
                                     </div>
                                 </el-tab-pane>
                                 <!-- 发布之后的编辑器的分支图 -->

+ 17 - 5
src/views/equipment/index.vue

@@ -28,7 +28,6 @@
                             <Legend :systemName='systemName' :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层${systemName}平面图`'></Legend>
                         </div>
                         <floorMap ref='floorMap' :id='"equip"' :loadName='loadName' :type='"system"'></floorMap>
-                        <!--  -->
                         <div class='additional-box' v-if='fqPic.length>0'>
                             <div class='additional2' @click='additionalColl' v-if='showView===3'>
                                 <img src='../../assets/imgs/bg2.png' alt />
@@ -79,7 +78,6 @@ export default {
             dialogInfo: {},
             brand: [], //品牌
             manufacturer: [],
-            show: false,
             fqPic: [],
             loadName: '',
             type: '',
@@ -97,6 +95,7 @@ export default {
             this.$cookie.set('categoryId', item.categoryId, 3)
             this.$refs.floorMap.init(this.floorInfo.gname)
             this.querySmsxt()
+            this.viewLengend()
         },
         querySmsxt() {
             // 目前消防和弱电下面有特殊的数据表格
@@ -146,6 +145,13 @@ export default {
         // 从设备设施进入的机房
         queryType(val) {
             this.type = val
+        },
+        viewLengend() {
+            if (this.legendTable.length > 0) {
+                this.$store.commit('SETSHOWVIEW', 1)
+            } else {
+                this.$store.commit('SETSHOWVIEW', 0)
+            }
         }
     },
     mounted() {
@@ -164,7 +170,7 @@ export default {
         this.$refs.floorMap.init(this.floorInfo.gname)
     },
     computed: {
-        ...mapGetters(['floorsArr', 'plazaId', 'showView'])
+        ...mapGetters(['floorsArr', 'plazaId', 'showView', 'legendTable'])
     }
 }
 </script>
@@ -176,11 +182,11 @@ export default {
     overflow: hidden;
     color: #1f2429;
     .eq-top {
-        margin-left: 260px;
+        // margin-left: 260px;
+        width: 100%;
         padding-top: 24px;
         position: fixed;
         z-index: 3;
-        min-width: 1300px;
         display: flex;
         justify-content: center;
         .eq-system {
@@ -343,6 +349,12 @@ export default {
         }
     }
 }
+@media screen and (max-width: 1366px) {
+    /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
+    .eq-top {
+        margin-left: 0 !important;
+    }
+}
 </style>
 <style lang="less">
 .el-table {

+ 25 - 10
src/views/equipment/table/djspTable.vue

@@ -44,7 +44,7 @@ import { Select } from 'meri-design'
 import EqDetail from './eqDetaileDialog'
 import { queryShops } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
-
+import store from '../../../store/index'
 export default {
     components: { Select, EqDetail },
     data() {
@@ -102,16 +102,17 @@ export default {
                 console.log(res)
                 this.tableData = []
                 let floor = {}
-                res.data.forEach(i => {
-                    console.log(i)
-                    Object.keys(i).forEach(key => (floor[key] = 0)) // 初始化每一楼层个数为0
-                    Object.values(i).forEach(j => {
-                        Object.values(j).forEach(k => {
-                            console.log(k)
-                            this.tableData.push(k)
+                res.data &&
+                    res.data.forEach(i => {
+                        console.log(i)
+                        Object.keys(i).forEach(key => (floor[key] = 0)) // 初始化每一楼层个数为0
+                        Object.values(i).forEach(j => {
+                            Object.values(j).forEach(k => {
+                                console.log(k)
+                                this.tableData.push(k)
+                            })
                         })
                     })
-                })
 
                 this.tableData.map(n => {
                     if (floor[n.floor] === 0) {
@@ -132,11 +133,25 @@ export default {
                 this.getList()
             }
         },
-        floor() {
+        /* floor() {
+            console.log('watch floor')
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {
+        console.log('商铺电表数 mounted')
+        this.floor = this.$cookie.get('floorMapId')
+        console.log(this.floor)
         this.getList()
     }
 }

+ 13 - 2
src/views/equipment/table/eqListTable.vue

@@ -60,7 +60,7 @@
             <el-table-column prop='wzjc' label='安装位置' show-overflow-tooltip resizable>
                 <template slot-scope='{row}'>{{row.wzjc || '--'}}</template>
             </el-table-column>
-            <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width="300">
+            <el-table-column prop='manufacturer' label='生产厂商' show-overflow-tooltip resizable min-width='300'>
                 <template slot-scope='{row}'>{{row.manufacturer || '--'}}</template>
             </el-table-column>
         </el-table>
@@ -86,6 +86,7 @@ import { Select } from 'meri-design'
 import EqDetail from './eqDetaileDialog'
 import { queryEquipmentList } from '@/api/equipmentList.js'
 import { mapGetters } from 'vuex'
+import store from '../../../store/index'
 
 export default {
     components: { Select, EqDetail },
@@ -162,9 +163,19 @@ export default {
                 this.getList()
             }
         },
-        floor(newV, oldV) {
+        /* floor(newV, oldV) {
             console.log(newV, oldV)
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {

+ 13 - 1
src/views/equipment/table/standTable.vue

@@ -85,6 +85,8 @@ import EqDetail from './eqDetaileDialog'
 
 import { mapGetters } from 'vuex'
 import { Select } from 'meri-design'
+import store from '../../../store/index'
+
 export default {
     data() {
         return {
@@ -170,8 +172,18 @@ export default {
                 this.getList()
             }
         },
-        floor(newV, oldV) {
+        /* floor(newV, oldV) {
             this.getList()
+        }, */
+        // 监听 vuex 中currentFloor的变化,切换楼层后,更新下拉菜单
+        '$store.state.currentFloor': {
+            handler(newV, oldV) {
+                if (newV.gname !== oldV.gname) {
+                    this.floor = newV.gname
+                    this.getList()
+                }
+            },
+            deep: true
         }
     },
     mounted() {

+ 1 - 0
src/views/equipment/table/wbTable.vue

@@ -172,6 +172,7 @@ export default {
         },
         //工单详情
         innerTable(row) {
+            console.log(row)
             if (row.apptype == '外委' || row.apptype == '自维') {
                 if (row.wb_gzglid) {
                     window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=WB_GZGL&uniqueid=${row.wb_gzglid}`, true)

+ 6 - 3
src/views/equipment/table/wxTable.vue

@@ -95,7 +95,11 @@
             </el-table-column>
             <el-table-column prop='brand' label='现场照片' width='80'>
                 <template slot-scope='{row}'>
-                    <div v-if='row.glsmsImage' style='cursor:pointer;color: #0091ff;' @click='clickPic(row.glsmsImage)'>{{row.glsmsImage.length+'张'}}</div>
+                    <div
+                        v-if='row.glsmsImage'
+                        style='cursor:pointer;color: #0091ff;'
+                        @click.prevent='clickPic(row.glsmsImage)'
+                    >{{row.glsmsImage.length+'张'}}</div>
                     <div v-else>{{'---'}}</div>
                 </template>
             </el-table-column>
@@ -189,8 +193,7 @@ export default {
                     diff: this.diff,
                     plazaId: this.$store.state.plazaId,
                     page: this.currentPage,
-                    size: this.size,
-                    
+                    size: this.size
                 }
             }
             //下拉

+ 31 - 13
src/views/homepage/index.vue

@@ -5,11 +5,11 @@
                 <h4>{{item.smsxtname}}</h4>
                 <div class='equipment-list' v-if='item.assetTypeList'>
                     <div @click='navToInnerPage(item, equip)' class='equipment-item' v-for='(equip , index) in item.assetTypeList' :key="index">
-                        <div class='equip-name'>
+                        <div class='equip-name' >
                             <h5>{{equip.category_name}}</h5>
-                            <div class='exception-number' v-if='equip.is_exception_num'>{{equip.is_exception_num}}</div>
+                            <div class='exception-number' v-if="equip.is_exception_num">{{equip.is_exception_num}}</div>
                         </div>
-                        <section>
+                        <section  >
                             <div class='equip-statis'>
                                 <span class='equip-number'>{{equip.asset_num}}</span>
                                 <span class='equip-unit'>台</span>
@@ -90,6 +90,7 @@ export default {
             cardsList: [],
             itemsList: [],
             changeList: [],
+            plazaId:'',
             srcList: {
                 0: {
                     1: require('../../assets/images/icons/edit_blue_b.png'), //1.正常(蓝色) 2.警告(黄色) 3.严重(红色)
@@ -109,6 +110,12 @@ export default {
             }
         }
     },
+    created () {
+        let plazaId = this.$route.query.plazaId
+        if (plazaId) {
+            this.plazaId = plazaId
+        }
+    },
     mounted() {
         this.testAjax()
         this.getItemsQuery()
@@ -150,7 +157,7 @@ export default {
             }
         },
         navToInnerPage (item, equip) {
-            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.id, module:'core'}})
+            this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, equipId: equip.category_code, module:'core'}})
         },
          
         /**
@@ -159,17 +166,29 @@ export default {
         navToGanttPage (item) {
             this.$router.push({path:"./analysis", query:{smsxt:item.smsxt, module:'gantt'}})
         },
-        //TODO plazaId目前是写死的 后期需要更换成用户对应的ID
+  
         testAjax() {
             let params = {
                 getParams: {
-                    plazaId: 1000423
+                    plazaId: this.plazaId
                 }
             }
             getCardList(params).then(res => {
                 if (res.result == 'success') {
                     let result = res.data
                     if (result && Array.isArray(result)) {
+                        result.forEach(item => {
+                            if (item.assetTypeList) {
+                                let list = item.assetTypeList
+                                let len = list.length
+                                for (let i=0; i< len; i++) {
+                                    if (list[i] && !list[i].asset_num) {
+                                        list.splice(i, 1)
+                                        i--
+                                    }
+                                }
+                            }
+                        })
                         this.cardsList = result
                     }
                 }
@@ -181,14 +200,14 @@ export default {
         getInstructionList() {
             let params = {
                 getParams: {
-                    plazaId: 1000423,
+                    plazaId: this.plazaId,
                     page: 1,
                     size: 10
                 }
             }
 
             getChangeList(params).then(res => {
-                if (res.result == 'success') {
+                if (res.result == 'success' && res.data) {
                     let result = res.data
                     result.forEach(item => {
                         item.changedate = moment.unix(item.changedate / 1000).format('YYYY.MM.DD')
@@ -213,13 +232,12 @@ export default {
             let params = {
                 getParams: {
                     // department=部门 //部门
-                    startDate: '20200208000000', //开始时间
-                    endDate: '20200608000000', //结束时间
-                    plazaId: 1000423, //广场id 必填
+                    // startDate: '20200208000000', //开始时间
+                    // endDate: '20200608000000', //结束时间
+                    plazaId: this.plazaId, //广场id 必填
                     page: 1, //页数
                     size: 10 //条数
-                    // "orderBy":字段名,1;//排序,1正序,0,倒序
-                    // keyword=关键字1:字段名11,字段名12;关键字2:字段名21,字段名22;//模糊查询参数
+              
                 }
             }
             getQueryList(params).then(res => {

+ 13 - 9
src/views/legendLibrary/addForm.vue

@@ -333,7 +333,7 @@ export default {
                 })
 
                 var hex = '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1) + opacity
-                console.log(hex)
+
                 return hex
             } else {
                 return
@@ -353,14 +353,18 @@ export default {
         },
         //线条类型改变
         changeLineType(val) {
-            this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
-            if (this.$refs.select1 && this.$refs.select1.$el) {
-                this.$refs.select1.$el.children[0].children[0].setAttribute(
-                    'style',
-                    'background:#ffffff url(' + this.borderLineOptionObject.src + ')  10px center no-repeat;color:transparent;'
-                )
-            }
-            this.$set(this.ruleForm, 'LineDash', val)
+            if (val) {
+                this.borderLineOptionObject = val && this.borderLineOption.find(item => item.id == val)
+                this.$nextTick(() => {
+                    if (this.$refs.select1 && this.$refs.select1.$el) {
+                        this.$refs.select1.$el.children[0].children[0].setAttribute(
+                            'style',
+                            'background:#ffffff url(' + this.borderLineOptionObject.src + ')  10px center no-repeat;color:transparent;'
+                        )
+                    }
+                })
+                this.$set(this.ruleForm, 'LineDash', val)
+            }
             if (this.view) {
                 this.view.lineType = val
             }

+ 30 - 0
src/views/legendLibrary/addLegend.vue

@@ -16,6 +16,36 @@
             </span>
         </el-dialog>
 
+        <!-- <Modal :show='dialogVisible' :title='title' mode='middle' @close='dialogVisible = false,cancal()'>
+            <template #content>
+                <add-form
+                    ref='add'
+                    :InfosList='InfosList'
+                    :InfoTypeIdList='InfoTypeIdList'
+                    :ruleForm='info'
+                    @addSuccess='addSuccess'
+                    @updateSuccess='updateSuccess'
+                    :title='title'
+                ></add-form>
+            </template>
+            <template #handle>
+                <Button @click='dialogVisible = false,cancal()' type='default'>取 消</Button>
+                <Button @click='save' type='primary'>确 定</Button>
+            </template>
+        </Modal>-->
+        <!-- 
+        <a-modal v-model='dialogVisible' :title='title' @ok='save' @cancel='dialogVisible = false,cancal()' okText='确定' cancelText='取消' width='900px'>
+            <add-form
+                ref='add'
+                :InfosList='InfosList'
+                :InfoTypeIdList='InfoTypeIdList'
+                :ruleForm='info'
+                @addSuccess='addSuccess'
+                @updateSuccess='updateSuccess'
+                :title='title'
+            ></add-form>
+        </a-modal>-->
+
         <TransferSelectModal
             defaultExpandAll
             default-expand-all

+ 1 - 2
src/views/legendLibrary/index.vue

@@ -165,7 +165,7 @@
                 ></el-pagination>
             </div>
         </div>
-        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal' :key='Date.now()'></add-legend>
+        <add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess' @cancal='cancal'></add-legend>
         <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
             <template #content>作废后则不可更改</template>
             <template #handle>
@@ -189,7 +189,6 @@ import {
     getVisualization,
     queryRelation
 } from '@/api/legendLibrary.js'
-import { Container } from 'element-ui'
 
 function hexToRgba(hex) {
     let opacity = '',

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

@@ -61,11 +61,11 @@
                     @tool-button-click='buttonClickHandle'
                 >
                     <img slot-scope='{col, row}' v-if='col.key==="Url"' class='img' :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
-                    <span slot-scope='{col, row}' v-else-if='col.key==="caozuo"' style='color:#0091FF'>删除</span>
+                    <span slot-scope='{col}' v-else-if='col.key==="caozuo"' style='color:#0091FF'>删除</span>
                 </Table>
             </div>
         </div>
-        <add-legend ref='addLegend' @mesg='mesg'></add-legend>
+        <add-legend ref='addLegends' @mesg='mesg'></add-legend>
     </div>
 </template>
 <script>
@@ -234,7 +234,7 @@ export default {
             this.getData()
         },
         add() {
-            this.$refs.addLegend.open('', '', this.GraphCategoryId)
+            this.$refs.addLegends.open('', '', this.GraphCategoryId)
         },
         init() {
             let getParams = {}

+ 24 - 12
src/views/other/index.vue

@@ -96,27 +96,27 @@ export default {
             let postParams = [
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f1' }
+                    params: { module: '1004', floor: 'f6' }
                 },
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f2' }
+                    params: { module: '1004', floor: 'f5' }
                 },
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f3' }
+                    params: { module: '1004', floor: 'f4' }
                 },
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f4' }
+                    params: { module: '1004', floor: 'f3' }
                 },
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f5' }
+                    params: { module: '1004', floor: 'f2' }
                 },
                 {
                     tableName: 'glsms_proimgup',
-                    params: { module: '1004', floor: 'f6' }
+                    params: { module: '1004', floor: 'f1' }
                 },
                 {
                     tableName: 'glsms_proimgup',
@@ -130,9 +130,7 @@ export default {
             queryTab({ data, postParams }).then(res => {
                 //console.log('查询哪几层楼有图', res)
                 this.floorData = []
-                let data = res.data.data
-                console.log('data', data)
-
+                let data = res.data.data || []
                 data.forEach(el => {
                     if (el.count > 0) {
                         let obj = {
@@ -144,9 +142,9 @@ export default {
                                 .reverse()
                                 .join(''),
                             seq:
-                                el.params.floor.substring(1, 2) == 'b'
-                                    ? el.params.floor.substring(1, 2) + '00'
-                                    : -el.params.floor.substring(1, 2) + '00'
+                                el.params.floor.substring(0, 1) == 'b'
+                                    ? -Number(el.params.floor.substring(1, 2)) + '00'
+                                    : Number(el.params.floor.substring(1, 2)) + '00'
                         }
                         this.floorData.push(obj)
                     }
@@ -287,4 +285,18 @@ export default {
         }
     }
 }
+@media screen and (max-width: 1600px) {
+    /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
+    .fzyfImg {
+        margin-top: 120px !important;
+        height: 500px !important;
+    }
+}
+@media screen and (max-width: 1366px) {
+    /*当屏幕尺寸小于1366px时,应用下面的CSS样式*/
+    .fzyfImg {
+        margin-top: 90px !important;
+        height: 400px !important;
+    }
+}
 </style> 

+ 1 - 1
src/views/other/zhsxDialog.vue

@@ -10,7 +10,7 @@
                 <div class='bottom-table'>
                     <el-table :data='tableData' height='480' style='width:100%;' :span-method='objectSpanMethod' border v-if='tableData.length>0'>
                         <el-table-column label='序号' type='index' width='60'></el-table-column>
-                        <el-table-column prop='jcsx' label='检测事项' :show-overflow-tooltip='true'></el-table-column>
+                        <el-table-column prop='jcsx' label='检测事项' :show-overflow-tooltip='true' width='400'></el-table-column>
                         <el-table-column prop='zgbm' label='主管部门' :show-overflow-tooltip='true'></el-table-column>
                         <el-table-column prop='jlsx' label='记录事项' :show-overflow-tooltip='true'></el-table-column>
                     </el-table>

+ 2 - 2
src/views/other/zhsxOtherTable2.vue

@@ -154,8 +154,8 @@ export default {
         },
         //第三方任务
         innerTable(row) {
-            if (row.wbgzglid) {
-                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=DSF_GZGL&uniqueid=${row.wbgzglid}`, true)
+            if (row.id) {
+                window.open(`http://gcgl.wanda.cn/maximo/ui/?event=loadapp&value=DSF_GZGL&uniqueid=${row.id}`, true)
             }
         },
         changeSelect() {

+ 30 - 9
src/views/overview/index.vue

@@ -19,7 +19,7 @@
             <div class='view-left'>
                 <div class='lb-left'>
                     <div v-if='pic2.length>0' style='height:100%'>
-                        <rotation :rotationImg='pic2'></rotation>
+                        <rotation :key='2' type='2' :rotationImg='pic2' @scan='scan'></rotation>
                         <div class='lb-icon' @click='picClick("2")'></div>
                         <img class='lb-img' @click='picClick("2")' src='../../assets/imgs/zk.png' alt />
                     </div>
@@ -78,7 +78,7 @@
                 <div class='view-right-box'>
                     <div class='lb-right'>
                         <div v-if='pic1.length>0' style='height:100%'>
-                            <rotation :rotationImg='pic1'></rotation>
+                            <rotation type='2' :rotationImg='pic1' :key='1' @scan='scan'></rotation>
                             <div class='lb-icon' @click='picClick("1")'></div>
                             <img class='lb-img' @click='picClick("1")' src='../../assets/imgs/zk.png' alt />
                         </div>
@@ -199,15 +199,27 @@ export default {
             pic2: [], //鸟瞰图
             build: {}, //左下信息
             constructions: [], //右下数组
-            shuzihuayijiao: ''
+            shuzihuayijiao: '',
+            va: ''
         }
     },
     methods: {
+        scan(val) {
+            this.va = val
+        },
         picClick(type) {
-            if (type == 1) {
-                this.$refs.picModal.showModal(this.pic1)
+            if (type === '1') {
+                if (this.pic1.length >= this.va) {
+                    this.$refs.picModal.showModal([this.pic1[this.va - 1]])
+                } else {
+                    this.$refs.picModal.showModal(this.pic1)
+                }
             } else {
-                this.$refs.picModal.showModal(this.pic2)
+                if (this.pic2.length >= this.va) {
+                    this.$refs.picModal.showModal([this.pic2[this.va - 1]])
+                } else {
+                    this.$refs.picModal.showModal(this.pic2)
+                }
             }
         },
         findxmzl() {
@@ -235,6 +247,9 @@ export default {
                     this.build = res.build ? res.build : {}
                     this.constructions = res.constructions ? res.constructions : []
                     this.shuzihuayijiao = res.shuzihuayijiao ? res.shuzihuayijiao : ''
+                    if (res.plazaName) {
+                        this.$store.commit('SETPLAZENAME', res.plazaName)
+                    }
                 }
             })
         },
@@ -262,13 +277,11 @@ export default {
         // }
         let previewUrl = location.href.split('=')[1] ? location.href.split('=')[1].split('&')[0] : false,
             plazaId = location.href.split('=')[2] ? location.href.split('=')[2] : '1000423'
-        console.log('previewUrl:', previewUrl)
-        console.log('plazaId:', plazaId)
         this.$store.commit('SETISPREVIEW', previewUrl)
         this.query()
     },
     computed: {
-        ...mapGetters(['isPreview'])
+        ...mapGetters(['isPreview', 'pic'])
     },
     components: {
         PicModal
@@ -277,6 +290,14 @@ export default {
 </script>
 <style lang="less" scoped>
 @import '../../assets/css/rotation.less';
+.overview {
+    .view-box .view-left {
+        overflow: hidden;
+        .lb-left {
+            margin-bottom: 0;
+        }
+    }
+}
 </style>
 <style lang="less">
 .view-right-bottom {

+ 4 - 2
src/views/overview/picModal.vue

@@ -5,7 +5,7 @@
                 src='https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1592807833&di=5adf17cda9f46c37696da5b1d0aec9dc&src=http://a3.att.hudong.com/14/75/01300000164186121366756803686.jpg'
                 alt
             />-->
-            <rotation :type='1' v-if='rotationImg.length>0' :rotationImg='rotationImg' style='height:100%;width:100%'></rotation>
+            <rotation :key='key' :type='1' v-if='rotationImg.length>0' :rotationImg='rotationImg' style='height:100%;width:100%'></rotation>
             <span class='close' @click='close'>X</span>
         </el-dialog>
     </div>
@@ -17,11 +17,13 @@ export default {
         return {
             dialogVisible: false,
             mode: 'top',
-            rotationImg: []
+            rotationImg: [],
+            key: 1
         }
     },
     methods: {
         showModal(params) {
+            this.key++
             this.dialogVisible = true
             this.rotationImg = params
         },

+ 11 - 4
src/views/room/index.vue

@@ -6,8 +6,13 @@
 <template>
     <div class='compute-box'>
         <el-dialog :title='`${systemName}`||"机房"' :visible.sync='visible' :fullscreen='true'>
-            <div class='compute-span'></div>
-            <el-tooltip class='item' effect='dark' :content='content' placement='top' v-if='(type=="floor" && smsxtArr.length>0)||type=="system"'>
+            <el-tooltip
+                class='item'
+                effect='dark'
+                :content='content'
+                placement='top'
+                v-if='(type=="floor"&& Object.keys(smsxtArr).length>0)||type=="system"'
+            >
                 <div class='compute-zf' @click='jumpFloor'></div>
             </el-tooltip>
 
@@ -493,7 +498,7 @@ export default {
             rwwcrq: '',
             ycgdtbsj: '',
             ycgdyssj: '',
-            smsxtArr: { smsx: '1001', smsxtname: '供电系统' },
+            smsxtArr: {},
             type: ''
         }
     },
@@ -827,7 +832,7 @@ export default {
         },
         // 查询楼层功能下的机房属于哪类设备
         init() {
-            this.smsxtArr = []
+            this.smsxtArr = {}
             let params = {
                 getParams: {
                     locationid: this.location,
@@ -836,6 +841,8 @@ export default {
             }
             querySystem(params).then(res => {
                 this.smsxtArr = res.data ? res.data[0] : {}
+                console.log(this.smsxtArr)
+
                 this.Index(this.smsxtArr.smsxt)
                 this.content = `查看${this.$cookie.get('floorNow')}层${this.smsxtArr.smsxtname}分布图`
             })

+ 1 - 1
src/views/room/room1.vue

@@ -1,6 +1,6 @@
 <template>
     <div class='jf-inner' style='width:100%;height:85vh;overflow:hidden'>
-        <rotation :rotationImg='tableImg'></rotation>
+        <rotation :rotationImg='tableImg' :type='3'></rotation>
     </div>
 </template>
 <script>

文件差异内容过多而无法显示
+ 632 - 592
src/views/statistics/index.vue


+ 0 - 8
vue.config.js

@@ -1,11 +1,3 @@
-/*
- * @Author: your name
- * @Date: 2020-06-28 13:40:38
- * @LastEditTime: 2020-07-08 13:56:32
- * @LastEditors: Please set LastEditors
- * @Description: In User Settings Edit
- * @FilePath: \wanda-bm-guide\vue.config.js
- */ 
 module.exports = {
     devServer: {
         port: 8090,