guoxiaohuan 4 years ago
parent
commit
55948899d3

+ 26 - 22
src/components/Legend/src/legend.vue

@@ -400,18 +400,17 @@ export default {
             })
         },
         // 编辑数量
-        queryEddit(val) {
+        queryEdit(val) {
             let arr = []
             if (val.length > 0) {
-                val.forEach(el => {
+                val.forEach(e => {
                     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
+                        Num: Number(e.Num),
+                        GraphElementId: e.GraphElementId,
+                        FloorId: this.$cookie.get('floorMapId'),
+                        ProjectId: e.ProjectId,
+                        CategoryId: e.GraphCategoryId
                     }
                     arr.push(obj)
                 })
@@ -421,22 +420,27 @@ export default {
                     Content: arr
                 }
             }
-            updateStatis(params).then(res => {
-                if (res.Result == 'success') {
-                    //console.log('更新图例', res)
-                    this.$message({
-                        message: '操作成功',
-                        type: 'success'
-                    })
-                    this.$store.commit('SETSHOWVIEW', 1)
-                    // this.queryEditNum(this.editSwitch)
-                } else {
+            updateStatis(params)
+                .then(res => {
+                    if (res.Result == 'success') {
+                        this.$message({
+                            message: '操作成功',
+                            type: 'success'
+                        })
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    } else {
+                        this.$message({
+                            message: '操作失败',
+                            type: 'error'
+                        })
+                    }
+                })
+                .catch(err => {
                     this.$message({
-                        message: '操作失败',
+                        message: err,
                         type: 'error'
                     })
-                }
-            })
+                })
         },
         saveNum(val) {
             if (val.length > 0) {
@@ -548,7 +552,7 @@ export default {
         right: 47px;
         .legend-table {
             padding: 16px;
-            height: 546px;
+            height: 460px;
             width: 385px;
             // width: 420px;
             overflow: auto;

+ 410 - 25
src/components/editLengend.vue

@@ -7,13 +7,13 @@
     <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='editTable2.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"}'
                         ref='multipleTable'
-                        height='430px'
-                        :data='editTable'
+                        height='350px'
+                        :data='editTable2'
                         tooltip-effect='dark'
                         width='100%'
                         @selection-change='handleSelectionChange'
@@ -24,7 +24,7 @@
                         <el-table-column prop label='数量'>
                             <template slot-scope='{row}'>
                                 <div v-if='row.IsModify'>
-                                    <div v-if='row.Num!=row.RealNum && (rowNum!=null && RealNum!=null)' class='redData'>
+                                    <div v-if='row.Num!=row.RealNum && (row.Num!=null && row.RealNum!=null)' class='redData'>
                                         <el-tooltip
                                             class='item'
                                             effect='dark'
@@ -120,7 +120,7 @@
 </template>
 <script>
 import { updateStatis } from '@/api/public.js'
-
+import { mapGetters } from 'vuex'
 export default {
     props: ['editTable', 'loading'],
     data() {
@@ -129,9 +129,378 @@ export default {
             tbData1: [],
             tbData2: [],
             tbData3: [],
-            editNum: []
+            editNum: [],
+            editTable2: [
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100144',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '商铺数量',
+                    Num: null,
+                    OrderId: 0,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: '间',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100138',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '机动车位',
+                    Num: null,
+                    OrderId: 1,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: '个',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100139',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '建筑面积',
+                    Num: null,
+                    OrderId: 2,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: 'm²',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100141',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '商铺数量',
+                    Num: null,
+                    OrderId: 3,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: '间',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100142',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '主出入口',
+                    Num: null,
+                    OrderId: 4,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: '个',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100140',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '租赁面积',
+                    Num: null,
+                    OrderId: 5,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'None',
+                    Unit: 'm²',
+                    Url: ''
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100115',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '主要设备房',
+                    Num: null,
+                    OrderId: 6,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Zone',
+                    Unit: '处',
+                    Url: 'be806e3d04934715b38b0cb1c484608e'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100119',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '空调机房',
+                    Num: 1.0,
+                    OrderId: 7,
+                    ProjectId: '1000423',
+                    RealNum: 1.0,
+                    Type: 'Zone',
+                    Unit: '间',
+                    Url: '20c7df01d89649c7bd295be2991b17fa'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100067',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '观光电梯',
+                    Num: null,
+                    OrderId: 8,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '部',
+                    Url: 'b85f9646e4f543fb9f70bc02296d661d'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100064',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '货梯',
+                    Num: null,
+                    OrderId: 9,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '部',
+                    Url: '7d1893ec48744d42887d10469f1461ff'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100063',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '客梯',
+                    Num: null,
+                    OrderId: 10,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '部',
+                    Url: 'd59bbe68cf1e4c07bf06e40686ef13be'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100066',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '人行步道',
+                    Num: null,
+                    OrderId: 11,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: '15a35100d7f548f083d82343db6c5f83'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100065',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '自动扶梯',
+                    Num: null,
+                    OrderId: 12,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '部',
+                    Url: '82ac7def995543ff9f129581585630a2'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100039',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '卫生间',
+                    Num: 1.0,
+                    OrderId: 13,
+                    ProjectId: '1000423',
+                    RealNum: 1.0,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: '00fcc43e72024baa93398efd112ec254'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100090',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '加压送风机',
+                    Num: null,
+                    OrderId: 14,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '个',
+                    Url: 'f936bd61190546e7b25b8a74c498d6a9'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100089',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '排烟风机',
+                    Num: null,
+                    OrderId: 15,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '个',
+                    Url: '40450dd6096d4c22a6f8caa442e6c070'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100076',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '冷却塔',
+                    Num: null,
+                    OrderId: 16,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '间',
+                    Url: 'd104a4dc6b0243209c5a6b7d5a7f6030'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100128',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '燃气表间',
+                    Num: null,
+                    OrderId: 17,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Zone',
+                    Unit: '间',
+                    Url: '41878742ecc8418ea9c2827b8c0426ec'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100102',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '污水干管',
+                    Num: null,
+                    OrderId: 18,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Line',
+                    Unit: '——',
+                    Url: '557e7ac0433947fdb13eaaae6225854a'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100059',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '安全出口',
+                    Num: null,
+                    OrderId: 19,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '个',
+                    Url: 'd711aeceeda848b0b9eda45a2009310b'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100062',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '连通口',
+                    Num: null,
+                    OrderId: 20,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: '02b7816d35f846798e08beb7bff33a82'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100135',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '母婴室',
+                    Num: null,
+                    OrderId: 21,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: '60448b41ed5342909b8d4e287b278372'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100060',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '疏散通道',
+                    Num: null,
+                    OrderId: 22,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: '6b1ad59c7c5d48a2b99390cba0935267'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100041',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '吸烟室',
+                    Num: null,
+                    OrderId: 23,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Image',
+                    Unit: '处',
+                    Url: 'f5696ac97a174323a03ade2d24f998c2'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100112',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '商管办公室',
+                    Num: null,
+                    OrderId: 24,
+                    ProjectId: '1000423',
+                    RealNum: null,
+                    Type: 'Zone',
+                    Unit: '处',
+                    Url: 'e76ed5f2e5ec4ee4b1f6c36a7734ecd6'
+                },
+                {
+                    GraphCategoryId: 'LCGN',
+                    GraphElementId: '100131',
+                    GraphId: '2daade9cadac4183bd91754bb338fa74',
+                    IsModify: true,
+                    Name: '防火分区',
+                    Num: 1.0,
+                    OrderId: 25,
+                    ProjectId: '1000423',
+                    RealNum: 1.0,
+                    Type: 'Zone',
+                    Unit: '个',
+                    Url: '68a2b17621b24cb288d9093594032467'
+                }
+            ]
         }
     },
+    computed: {
+        ...mapGetters(['plazaId'])
+    },
     methods: {
         handleSelectionChange(val) {
             this.multipleSelection = val
@@ -166,31 +535,46 @@ export default {
         },
         // 编辑数量
         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 arr = []
+            if (val.length > 0) {
+                val.forEach(e => {
+                    let obj = {
+                        BuildingId: '1',
+                        Num: Number(e.Num),
+                        GraphElementId: e.GraphElementId,
+                        FloorId: this.$cookie.get('floorMapId'),
+                        ProjectId: e.ProjectId,
+                        CategoryId: e.GraphCategoryId
+                    }
+                    arr.push(obj)
+                })
+            }
             let params = {
                 postParams: {
-                    Content: val
+                    Content: arr
                 }
             }
-            updateStatis(params).then(res => {
-                if (res.Result == 'success') {
-                    this.$message({
-                        message: '操作成功',
-                        type: 'success'
-                    })
-                    this.$store.commit('SETSHOWVIEW', 1)
-                } else {
+            updateStatis(params)
+                .then(res => {
+                    if (res.Result == 'success') {
+                        this.$message({
+                            message: '操作成功',
+                            type: 'success'
+                        })
+                        this.$store.commit('SETSHOWVIEW', 1)
+                    } else {
+                        this.$message({
+                            message: '操作失败',
+                            type: 'error'
+                        })
+                    }
+                })
+                .catch(err => {
                     this.$message({
-                        message: '操作失败',
+                        message: err,
                         type: 'error'
                     })
-                }
-            })
+                })
         },
         // 修改图例数量
         changeTable(val) {
@@ -203,6 +587,7 @@ export default {
                     obj[this.editNum[i].GraphElementId] = true
                 }
             }
+            this.editNum = result
         },
         // 修改隐藏为0的项目的开关
         changeSwitch(val) {
@@ -245,7 +630,7 @@ export default {
         right: 47px;
         width: 385px;
         // width: 420px;
-        height: 535px;
+        height: 460px;
         // min-width: 350px;
         // width: auto;
         background: rgba(255, 255, 255, 1);

+ 10 - 7
src/components/floorMap/index.vue

@@ -207,16 +207,19 @@ export default {
             this.view = new FloorView(`canvas${this.id}`)
         },
         listChange(item, ev) {
-            console.log('--------------------')
-            console.log(item)
-            console.log(ev)
             if (ev[0].length) {
                 let selectItem1 = ev[0][0],
-                    name = selectItem1.data.Name,
                     location = selectItem1.data.AttachObjectIds[0] ? selectItem1.data.AttachObjectIds[0].id : ''
-                if (name.slice(name.length - 2, name.length) == '机房') {
-                    if (location) {
-                        this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
+                // 空间类型都可打开弹窗(除防火分区 编号100131,商管办公室 编号100112,铺装石材 编号100129)
+                if (selectItem1.data.GraphElementType == 'Zone') {
+                    if (
+                        selectItem1.data.GraphElementId != '100131' &&
+                        selectItem1.data.GraphElementId != '100112' &&
+                        selectItem1.data.GraphElementId != '100129'
+                    ) {
+                        if (location) {
+                            this.$refs.boxRoom.open({ name: name, type: this.type, location: location })
+                        }
                     }
                 }
                 // 选中电井设置电井关联的商铺高亮

+ 1 - 1
src/components/viewLengend.vue

@@ -102,7 +102,7 @@ export default {
         },
         setSelected() {
             this.legendTable.forEach(t => {
-                this.$refs.dataTable.toggleRowSelection(t, true)
+                this.$refs.dataTable.toggleRowSelection(t, t.Type != 'None')
             })
         }
     },

+ 28 - 20
src/views/other/index.vue

@@ -169,7 +169,7 @@ export default {
 .other {
     background: rgba(242, 245, 247, 1);
     height: 100%;
-    overflow: hidden;
+    overflow: auto;
     .other-top {
         margin-top: 24px;
         position: fixed;
@@ -240,14 +240,22 @@ export default {
         }
     }
     .qtfugl {
+        // border: 1px solid blue;
+        // height: 95%;
+        background: #ffffff;
+        margin: 80px 80px 10px 230px;
+        overflow: auto;
+        height: calc(100% - 140px);
         .fzyfImg {
-            width: 1035px;
-            height: 544px;
-            margin: 0 auto;
-            margin-top: 200px;
+            // width: 100%;
+            // height: 100%;
+            // width: 1035px;
+            // height: 544px;
+            // margin: 0 auto;
+            // margin-top: 200px;
             img {
                 width: 100%;
-                height: 100%;
+                // height: 100%;
                 object-fit: cover;
                 // max-width: 100%;
                 // max-height: 100%;
@@ -285,18 +293,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;
-    }
-}
+// @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>