guoxiaohuan 4 jaren geleden
bovenliggende
commit
31c4bd8723

+ 25 - 5
src/components/Legend/src/legend.vue

@@ -65,7 +65,7 @@
                 </p>
             </el-tooltip>
             <!-- 编辑分布图 -->
-            <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' content='编辑分布图' placement='left'>
+            <el-tooltip v-if='editPmt' class='bjpmt' effect='dark' :content='editTips' placement='left'>
                 <span class='edit-icon' @click='goToEditer'>
                     <i class='el-icon-edit' style='color:#fff;font-size:16px;'></i>
                 </span>
@@ -102,7 +102,8 @@ export default {
             remarksText: '', //查询出来的备注
             text1:
                 '<p>1.主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房。</p>',
-            text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
+            // text2: '<p>2.图例后×的数字,代表此位置的数量。</p>',
+            text2: '',
             show: false,
             show2: false,
             loading: true,
@@ -119,7 +120,9 @@ export default {
             editPmt: true, //是否有跳转道图例库的权限
             floorSelectAble: [],
             floor: '', //传的楼层
-            floorName: ''
+            floorName: '',
+            planNum: '', //主要设备房
+            typeNum: ''
         }
     },
     computed: {
@@ -143,6 +146,10 @@ export default {
         categoryId: {
             default: '',
             type: String
+        },
+        editTips: {
+            type: String,
+            default: ''
         }
     },
     components: { lengendView, legendRemarks, lengendEdit },
@@ -171,6 +178,13 @@ export default {
             queryRead({ data, postParams }).then(res => {
                 if (res.data.Data && res.data.Data[0].Note) {
                     let note = res.data.Data[0].Note
+                    console.log('notenotenote', note)
+                    if (this.planNum > 0) {
+                        this.remarksText = `${this.text1}${note}`
+                    }
+                    if (this.typeNum > 1) {
+                        this.remarksText = `${this.text2}${note}`
+                    }
                     if (note.search(this.text1) != -1 && note.search(this.text2) != -1) {
                         this.remarksText = `${note}`
                     } else if (note.search(this.text1) != -1) {
@@ -221,8 +235,6 @@ export default {
                 { editerUrl } = conf
             let floorName = this.floorName ? this.floorName : this.$cookie.get('floorNow')
             let data = `categoryId=${categoryId}&projectId=${this.plazaId}&BuildingID=1&FloorID=${FloorID}&FloorName=${floorName}&fmapID=${this.fmapID}`
-            console.log('data', data)
-            console.log('this.categoryId', this.categoryId, this.$cookie.get('categoryId'))
             let url = editerUrl + 'editer?' + encodeURIComponent(data)
             window.open(url, true)
         },
@@ -248,6 +260,14 @@ export default {
                 this.loading = false
                 //console.log('图例', res)
                 this.viewTable = res.data.Data ? res.data.Data : []
+                if (this.viewTable.length > 0) {
+                    this.viewTable.forEach(el => {
+                        console.log(el)
+                        if (el.Name == '主要设备房') {
+                            this.planNum = el.Num
+                        }
+                    })
+                }
                 this.$nextTick(() => {
                     if (this.$refs.viewLengend) {
                         this.$refs.viewLengend.setSelected()

+ 2 - 2
src/components/floorMap/canvasFun.vue

@@ -22,7 +22,7 @@
                     </el-tooltip>
                 </i>
             </div>
-            <div class='small-block' @click='showText'>
+            <div class='small-block' @click='fitToWindow'>
                 <i>
                     <img src='../../assets/imgs/qp.png' alt />
                 </i>
@@ -49,7 +49,7 @@ export default {
             max: 1000,
             everyScale: 1, // 每份的放大倍数
             isSwitch: false, // 是否开启吸附
-            isShow: true
+            isShow: false
         }
     },
 

+ 21 - 21
src/components/floorMap/index.vue

@@ -38,7 +38,8 @@ export default {
             urlMsg: {},
             canvasID: 'canvas',
             floorid: '', //楼层id
-            topologyParser: null // 解析器数据
+            topologyParser: null, // 解析器数据
+            fParser: null // 底图解析器
         }
     },
     props: {
@@ -100,24 +101,23 @@ export default {
                             console.log('errr', res.err)
                             return
                         }
-                        const fParser = new SFloorParser(null)
-                        fParser.parseData(res)
-                        fParser.spaceList.forEach(t => {
+                        this.fParser = new SFloorParser(null)
+                        this.fParser.parseData(res)
+                        this.fParser.spaceList.forEach(t => {
                             //   t.selectable = true;
                             this.scene.addItem(t)
                         })
-                        fParser.wallList.forEach(t => this.scene.addItem(t))
-                        fParser.virtualWallList.forEach(t => this.scene.addItem(t))
-                        fParser.doorList.forEach(t => this.scene.addItem(t))
-                        fParser.columnList.forEach(t => this.scene.addItem(t))
-                        fParser.casementList.forEach(t => this.scene.addItem(t))
+                        this.fParser.wallList.forEach(t => this.scene.addItem(t))
+                        this.fParser.virtualWallList.forEach(t => this.scene.addItem(t))
+                        this.fParser.doorList.forEach(t => this.scene.addItem(t))
+                        this.fParser.columnList.forEach(t => this.scene.addItem(t))
+                        this.fParser.casementList.forEach(t => this.scene.addItem(t))
                         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()
-                        //console.log('success')
                     })
                 } else {
                     console.log('楼层不正确')
@@ -126,23 +126,20 @@ export default {
             this.readGroup(this.floorid).then(data => {
                 this.loading = false
                 if (data.Result == 'failure') {
-                    // 取消 失败时的提示: 图不存在
-                    /* this.$message({
-                        message: data.Message,
-                        type: 'warning'
-                    }) */
                     this.$store.commit('SETISMESSAGE', false)
                     return
-                    //    一会回来存这个
                 } else {
                     this.$store.commit('SETISMESSAGE', true)
                 }
-                // FIXME:   Cannot read property '0' of undefined
                 // 无返回Data处理
                 if (!(data.Data && data.Data.length)) {
                     return false
-                    //console.log(data.data.Data[0].ID)
-                    // this.$cookie.set('graphId', data.Data[0].ID, 3)
+                }
+                if (this.$cookie.get('categoryId') == 'SCPZ') {
+                    let scpzTable = []
+                    scpzTable = data.Data[0].Elements.Nodes || []
+                    console.log(scpzTable)
+                    this.$store.commit('SETSCPZTABLE', scpzTable)
                 }
                 // 放到后边 $cookie graphId
                 this.$cookie.set('graphId', data.Data[0].ID, 3)
@@ -215,8 +212,11 @@ export default {
             this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2)
         },
         showText(val) {
-            this.topologyParser.zoneLegendList.forEach(t => {
-                t.showText = val
+            // this.topologyParser.zoneLegendList.forEach(t => {
+            //     t.showText = val
+            // })
+            this.fParser.spaceList.forEach(t => {
+                t.showBaseName = val
             })
         },
         // 读取数据

+ 16 - 10
src/components/viewLengend.vue

@@ -5,26 +5,22 @@
 */
 <template>
     <div class='view'>
-        <div v-if='systemName=="土建系统"'>
+        <div v-if='systemName=="土建系统"' style='height:300px'>
             <el-table
-                v-loading='loading'
                 ref='dataTable'
-                :data='viewTable'
+                :data='scpzTable'
                 tooltip-effect='dark'
                 style='width:100%;'
                 :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>{{'--'}}</span>
+                        <span>{{(row.Properties && row.Properties.ItemExplain)?row.Properties.ItemExplain:'--'}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column prop label='图例' width='60'>
                     <template slot-scope='{row}'>
-                        <div v-if='row.Url' class='Url-img'>
-                            <img :src='`/serve/topology-wanda/Picture/query/${row.Url}`' alt />
-                        </div>
-                        <div v-else>{{'--'}}</div>
+                        <div class='scpz-img' :style='`background:${row.Properties.FillColor};border:1px solid ${row.Properties.StrokeColor}`'></div>
                     </template>
                 </el-table-column>
             </el-table>
@@ -73,7 +69,8 @@
     </div>
 </template>
 <script>
-import bus from "@/utils/bus.js"
+import bus from '@/utils/bus.js'
+import { mapGetters } from 'vuex'
 export default {
     props: ['viewTable', 'loading', 'remarksText', 'systemName'],
     data() {
@@ -99,6 +96,9 @@ export default {
             })
         }
     },
+    computed: {
+        ...mapGetters(['scpzTable'])
+    },
     mounted() {}
 }
 </script>
@@ -115,6 +115,10 @@ export default {
             margin-left: 8px;
         }
     }
+    .scpz-img {
+        width: 32px;
+        height: 16px;
+    }
     .remark {
         font-size: 12px;
         font-family: MicrosoftYaHeiSemibold;
@@ -142,4 +146,6 @@ export default {
         }
     }
 }
-</style>
+</style>
+
+

+ 6 - 0
src/store/index.js

@@ -19,6 +19,7 @@ export default new Vuex.Store({
         fmapID: '',
         haveFengMap: false, //是否有蜂鸟地图的数据
         isMessage: true,
+        scpzTable: [],
     },
     getters: {
         floorsArr: (state) => state.floorsArr,
@@ -28,6 +29,7 @@ export default new Vuex.Store({
         fmapID: (state) => state.fmapID,
         haveFengMap: (state) => state.haveFengMap,
         isMessage: (state) => state.isMessage,
+        scpzTable: (state) => state.scpzTable,
     },
     mutations: {
         // 设置是否登陆校验
@@ -63,6 +65,10 @@ export default new Vuex.Store({
         SETHAVEFENGMAP(state) {
             state.haveFengMap = true
         },
+        // 土建的图例
+        SETSCPZTABLE(state, data) {
+            state.scpzTable = data
+        },
     },
     actions: {
         // 获取项目列表、userId

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

@@ -25,7 +25,7 @@
                     </div>
                     <div class='eq-content'>
                         <div class='legend-boxs'>
-                            <Legend :systemName='systemName' :floors='floorsArr' type='1'></Legend>
+                            <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'>

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

@@ -5,7 +5,7 @@
         </div>
         <!-- 图例 -->
         <div class='legend-boxs'>
-            <Legend :floors='floorsArr' type='1'></Legend>
+            <Legend :floors='floorsArr' type='1' :editTips='`编辑${floorInfo.code}层楼层功能平面图`'></Legend>
         </div>
         <floor-list v-if='floorsArr.length>0' :floorsArr='floorsArr' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
         <!-- <div class='additional-box'>